From: Vsevolod Stakhov Date: Fri, 15 Nov 2013 17:42:07 +0000 (+0000) Subject: Set task dispatcher properly during learning. X-Git-Tag: 0.6.0~61 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1fa2007b649e0746f452dcf7862961fe4afe5020;p=rspamd.git Set task dispatcher properly during learning. --- diff --git a/src/controller.c b/src/controller.c index 6c0480e62..8af87c5a4 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1475,6 +1475,8 @@ controller_read_socket (f_str_t * in, void *arg) } /* Set up async session */ task->s = new_async_session (task->task_pool, fin_learn_task, restore_learn_task, free_task_hard, task); + task->dispatcher = session->dispatcher; + session->learn_task = task; r = process_filters (task); if (r == -1) { session->state = STATE_REPLY; @@ -1498,8 +1500,6 @@ controller_read_socket (f_str_t * in, void *arg) } else { session->state = STATE_LEARN_SPAM; - task->dispatcher = session->dispatcher; - session->learn_task = task; rspamd_dispatcher_pause (session->dispatcher); } break;