diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-13 17:30:06 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-13 17:30:06 +0400 |
commit | c2418c4890493f350198d1d990427e601fa2bf6e (patch) | |
tree | 2e20da62b3bbdd068c25fb329e68bd173f968cd4 /src/smtp_proxy.c | |
parent | db1f276aa8d6ed66340919fe1c7fa454c52fea43 (diff) | |
download | rspamd-c2418c4890493f350198d1d990427e601fa2bf6e.tar.gz rspamd-c2418c4890493f350198d1d990427e601fa2bf6e.zip |
Fix proxy logic.
Diffstat (limited to 'src/smtp_proxy.c')
-rw-r--r-- | src/smtp_proxy.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c index fa9da971a..75f4eaeba 100644 --- a/src/smtp_proxy.c +++ b/src/smtp_proxy.c @@ -182,7 +182,7 @@ free_smtp_proxy_session (gpointer arg) close (session->sock); memory_pool_delete (session->pool); - g_free (session); + g_slice_free1 (sizeof (struct smtp_proxy_session), session); } } @@ -191,7 +191,10 @@ smtp_proxy_err_proxy (GError * err, void *arg) { struct smtp_proxy_session *session = arg; - msg_info ("abnormally closing connection, error: %s", err->message); + if (err) { + g_error_free (err); + msg_info ("abnormally closing connection, error: %s", err->message); + } /* Free buffers */ destroy_session (session->s); } @@ -411,7 +414,10 @@ smtp_proxy_err_socket (GError * err, void *arg) { struct smtp_proxy_session *session = arg; - msg_info ("abnormally closing connection, error: %s", err->message); + if (err) { + g_error_free (err); + msg_info ("abnormally closing connection, error: %s", err->message); + } /* Free buffers */ destroy_session (session->s); } @@ -536,7 +542,7 @@ void start_smtp_proxy (struct rspamd_worker *worker) { struct sigaction signals; - struct smtp_worker_ctx *ctx = worker->ctx; + struct smtp_proxy_ctx *ctx = worker->ctx; gperf_profiler_init (worker->srv->cfg, "worker"); |