From 9bcf7906eeb645e18f6ac95b5544f0da2c169eb2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 29 Jan 2015 23:06:45 +0000 Subject: Fix keys initialization. --- src/worker.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/worker.c') diff --git a/src/worker.c b/src/worker.c index 0a6ce4a5e..91797a6dc 100644 --- a/src/worker.c +++ b/src/worker.c @@ -129,6 +129,10 @@ rspamd_worker_body_handler (struct rspamd_http_connection *conn, return 0; } + if (msg->peer_key) { + task->peer_key = g_string_new (msg->peer_key->str); + } + if (!rspamd_task_process (task, msg, ctx->classify_pool, TRUE)) { task->state = WRITE_REPLY; } @@ -354,7 +358,7 @@ start_worker (struct rspamd_worker *worker) rspamd_log_close (rspamd_main->logger); if (ctx->key) { - rspamd_http_connection_key_destroy (ctx->key); + rspamd_http_connection_key_unref (ctx->key); } exit (EXIT_SUCCESS); -- cgit v1.2.3