aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-15 17:42:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-15 17:42:07 +0000
commit1fa2007b649e0746f452dcf7862961fe4afe5020 (patch)
tree9e28bb1e20834097589d9133d2a160fbc8857f87
parent308fea3428a07d03a748b8b997098778eb03a730 (diff)
downloadrspamd-1fa2007b649e0746f452dcf7862961fe4afe5020.tar.gz
rspamd-1fa2007b649e0746f452dcf7862961fe4afe5020.zip
Set task dispatcher properly during learning.
-rw-r--r--src/controller.c4
1 files changed, 2 insertions, 2 deletions
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;