]> source.dussan.org Git - rspamd.git/commitdiff
Set task dispatcher properly during learning.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Nov 2013 17:42:07 +0000 (17:42 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Nov 2013 17:42:07 +0000 (17:42 +0000)
src/controller.c

index 6c0480e623ca770d8994de0547aea2addceb8943..8af87c5a4eb25dc1230a50f1d84a744fed55dc21 100644 (file)
@@ -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;