diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-17 17:06:18 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-17 17:06:18 +0100 |
commit | 948222cb60b41960699afc449f4506ea8b6cfeae (patch) | |
tree | 1676b6c7955109a3b3420edefe7aae9559ae815b /src | |
parent | 7dbf705472279107be200b6ce6388bb5c02bb087 (diff) | |
download | rspamd-948222cb60b41960699afc449f4506ea8b6cfeae.tar.gz rspamd-948222cb60b41960699afc449f4506ea8b6cfeae.zip |
Pass task object to fin_callback.
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/task.c | 6 | ||||
-rw-r--r-- | src/libserver/task.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index 91a669647..2f7635561 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -114,7 +114,7 @@ static void rspamd_task_reply (struct rspamd_task *task) { if (task->fin_callback) { - task->fin_callback (task->fin_arg); + task->fin_callback (task, task->fin_arg); } else { rspamd_protocol_write_reply (task); @@ -318,7 +318,9 @@ rspamd_task_process (struct rspamd_task *task, /* We got body, set wanna_die flag */ task->s->wanna_die = TRUE; - rspamd_protocol_handle_headers (task, msg); + if (msg) { + rspamd_protocol_handle_headers (task, msg); + } if (task->flags & RSPAMD_TASK_FLAG_HAS_CONTROL) { /* We have control chunk, so we need to process it separately */ diff --git a/src/libserver/task.h b/src/libserver/task.h index 608be8685..204ea4cad 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -144,7 +144,7 @@ struct rspamd_task { struct timeval tv; /**< time of connection */ guint32 scan_milliseconds; /**< how much milliseconds passed */ guint32 parser_recursion; /**< for avoiding recursion stack overflow */ - gboolean (*fin_callback)(void *arg); /**< calback for filters finalizing */ + gboolean (*fin_callback)(struct rspamd_task *task, void *arg); /**< calback for filters finalizing */ void *fin_arg; /**< argument for fin callback */ guint32 dns_requests; /**< number of DNS requests per this task */ |