diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-26 22:22:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-26 22:22:25 +0000 |
commit | 38a129e5d3bbb438a63f2a390c4579ac74671a4a (patch) | |
tree | 5dba669bdcab46bb1a3bf13a624930bad1ce9440 /src | |
parent | abac73e5d24c9b1c79ccb179aac069df0e1d4ede (diff) | |
download | rspamd-38a129e5d3bbb438a63f2a390c4579ac74671a4a.tar.gz rspamd-38a129e5d3bbb438a63f2a390c4579ac74671a4a.zip |
Use session pool instead of task pool.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fuzzy_check.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 05a43af93..7f6dcf282 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1409,6 +1409,7 @@ register_fuzzy_controller_call (struct rspamd_http_connection_entry *entry, { struct fuzzy_learn_session *s; struct upstream *selected; + struct rspamd_controller_session *session = entry->ud; gint sock; gboolean ret = FALSE; @@ -1423,7 +1424,7 @@ register_fuzzy_controller_call (struct rspamd_http_connection_entry *entry, } else { s = - rspamd_mempool_alloc0 (task->task_pool, + rspamd_mempool_alloc0 (session->pool, sizeof (struct fuzzy_learn_session)); msec_to_tv (fuzzy_module_ctx->io_timeout, &s->tv); @@ -1461,6 +1462,7 @@ fuzzy_process_handler (struct rspamd_http_connection_entry *conn_ent, struct fuzzy_ctx *ctx) { struct fuzzy_rule *rule; + struct rspamd_controller_session *session = conn_ent->ud; struct rspamd_task *task; gboolean processed = FALSE, res = TRUE; GList *cur; @@ -1478,8 +1480,8 @@ fuzzy_process_handler (struct rspamd_http_connection_entry *conn_ent, task->msg.begin = msg->body_buf.begin; task->msg.len = msg->body_buf.len; - saved = rspamd_mempool_alloc0 (task->task_pool, sizeof (gint)); - err = rspamd_mempool_alloc0 (task->task_pool, sizeof (GError *)); + saved = rspamd_mempool_alloc0 (session->pool, sizeof (gint)); + err = rspamd_mempool_alloc0 (session->pool, sizeof (GError *)); r = rspamd_message_parse (task); if (r == -1) { |