aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-08 19:21:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-08 19:21:58 +0100
commit5d2e4dc2c1d91741b9937d43756321692ac4a9c0 (patch)
tree576eb01630563d8b90bd40bcec945e0d72d475bf /src/rspamd_proxy.c
parente7a43c0fb358c1947fa3e21f2f2442408372d348 (diff)
downloadrspamd-5d2e4dc2c1d91741b9937d43756321692ac4a9c0.tar.gz
rspamd-5d2e4dc2c1d91741b9937d43756321692ac4a9c0.zip
[Fix] Use the same pool for related sessions
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index c86f73f88..79065d1c7 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1596,7 +1596,8 @@ rspamd_proxy_self_scan (struct rspamd_proxy_session *session)
gsize len;
msg = session->client_message;
- task = rspamd_task_new (session->worker, session->ctx->cfg, NULL);
+ task = rspamd_task_new (session->worker, session->ctx->cfg,
+ session->pool);
task->flags |= RSPAMD_TASK_FLAG_MIME;
task->sock = -1;
@@ -1941,7 +1942,8 @@ proxy_accept_socket (gint fd, short what, void *arg)
session->client_addr = addr;
session->mirror_conns = g_ptr_array_sized_new (ctx->mirrors->len);
- session->pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "proxy");
+ session->pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
+ "proxy");
session->ctx = ctx;
session->worker = worker;
@@ -1973,7 +1975,9 @@ proxy_accept_socket (gint fd, short what, void *arg)
rspamd_inet_address_to_string (addr),
rspamd_inet_address_get_port (addr));
- rspamd_milter_handle_socket (nfd, &ctx->io_tv, ctx->ev_base,
+ rspamd_milter_handle_socket (nfd, &ctx->io_tv,
+ session->pool,
+ ctx->ev_base,
proxy_milter_finish_handler,
proxy_milter_error_handler,
session);