diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-16 14:36:40 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-16 14:36:40 +0400 |
commit | 20b458c1b376e54a9585b6f845a32485bd0d4393 (patch) | |
tree | f511d50cfa2a80dcebd83bbdb09a803757e565f7 /src/controller.c | |
parent | d031614b5c3191d49248c6aa0ce06d1665963fbf (diff) | |
download | rspamd-20b458c1b376e54a9585b6f845a32485bd0d4393.tar.gz rspamd-20b458c1b376e54a9585b6f845a32485bd0d4393.zip |
Stupid bug with learning and task destroying.
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c index cc62b63dd..cb0c3cd22 100644 --- a/src/controller.c +++ b/src/controller.c @@ -929,7 +929,7 @@ controller_read_socket (f_str_t * in, void *arg) r = process_message (task); if (r == -1) { msg_warn ("processing of message failed"); - free_task (task, FALSE); + destroy_session (task->s); session->state = STATE_REPLY; r = rspamd_snprintf (out_buf, sizeof (out_buf), "cannot process message" CRLF); if (! rspamd_dispatcher_write (session->dispatcher, out_buf, r, FALSE, FALSE)) { @@ -942,7 +942,7 @@ controller_read_socket (f_str_t * in, void *arg) if (r == -1) { session->state = STATE_REPLY; r = rspamd_snprintf (out_buf, sizeof (out_buf), "cannot process message" CRLF); - free_task (task, FALSE); + destroy_session (task->s); if (! rspamd_dispatcher_write (session->dispatcher, out_buf, r, FALSE, FALSE)) { return FALSE; } @@ -970,7 +970,7 @@ controller_read_socket (f_str_t * in, void *arg) i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn ok" CRLF END); } - free_task (task, FALSE); + destroy_session (task->s); if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) { return FALSE; } @@ -1109,7 +1109,7 @@ controller_write_socket (void *arg) i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn ok" CRLF END); } session->learn_task->dispatcher = NULL; - free_task (session->learn_task, FALSE); + destroy_session (session->learn_task->s); session->state = STATE_REPLY; if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) { return FALSE; |