aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-13 17:30:06 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-13 17:30:06 +0400
commitc2418c4890493f350198d1d990427e601fa2bf6e (patch)
tree2e20da62b3bbdd068c25fb329e68bd173f968cd4 /src/smtp_proxy.c
parentdb1f276aa8d6ed66340919fe1c7fa454c52fea43 (diff)
downloadrspamd-c2418c4890493f350198d1d990427e601fa2bf6e.tar.gz
rspamd-c2418c4890493f350198d1d990427e601fa2bf6e.zip
Fix proxy logic.
Diffstat (limited to 'src/smtp_proxy.c')
-rw-r--r--src/smtp_proxy.c14
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");