diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 14:00:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 14:00:03 +0100 |
commit | f1e2f1acd45ffc6ae8f79bbba23d4734e588898f (patch) | |
tree | ecbecaa5f103192933407a24d3668a39a0744545 /src/libmime | |
parent | 537492c40116a8f38c209f7b36dacd0562504b44 (diff) | |
download | rspamd-f1e2f1acd45ffc6ae8f79bbba23d4734e588898f.tar.gz rspamd-f1e2f1acd45ffc6ae8f79bbba23d4734e588898f.zip |
Refactor events API.
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/smtp_proto.c | 20 | ||||
-rw-r--r-- | src/libmime/smtp_utils.c | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/libmime/smtp_proto.c b/src/libmime/smtp_proto.c index ec7ab191a..713efabac 100644 --- a/src/libmime/smtp_proto.c +++ b/src/libmime/smtp_proto.c @@ -425,7 +425,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (r == 1) { @@ -476,7 +476,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (r == 1) { @@ -512,7 +512,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (r == 1) { @@ -545,7 +545,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (r == 1) { @@ -638,7 +638,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (r == 1) { @@ -650,7 +650,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) session->error, 0, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } session->state = SMTP_STATE_AFTER_DATA; @@ -702,11 +702,11 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) sizeof (CRLF) - 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else { - remove_normal_event (session->s, + rspamd_session_remove_event (session->s, (event_finalizer_t)smtp_upstream_finalize_connection, session); } @@ -726,7 +726,7 @@ smtp_upstream_read_socket (rspamd_fstring_t * in, void *arg) 1, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } @@ -757,7 +757,7 @@ smtp_upstream_err_socket (GError *err, void *arg) return; } rspamd_upstream_fail (session->upstream); - destroy_session (session->s); + rspamd_session_destroy (session->s); } void diff --git a/src/libmime/smtp_utils.c b/src/libmime/smtp_utils.c index c4f0a7b3e..71f57a5b4 100644 --- a/src/libmime/smtp_utils.c +++ b/src/libmime/smtp_utils.c @@ -91,7 +91,7 @@ create_smtp_upstream_connection (struct smtp_session *session) session); session->state = SMTP_STATE_WAIT_UPSTREAM; session->upstream_state = SMTP_STATE_GREETING; - register_async_event (session->s, + rspamd_session_add_event (session->s, (event_finalizer_t)smtp_upstream_finalize_connection, session, g_quark_from_static_string ("smtp proxy")); @@ -120,7 +120,7 @@ err: TRUE)) { return FALSE; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } @@ -286,7 +286,7 @@ write_smtp_reply (struct smtp_session *session) 1, FALSE, TRUE)) { return FALSE; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } else if (cd.action <= METRIC_ACTION_ADD_HEADER || cd.action <= @@ -300,7 +300,7 @@ write_smtp_reply (struct smtp_session *session) 0, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } @@ -345,7 +345,7 @@ write_smtp_reply (struct smtp_session *session) 0, FALSE, TRUE)) { goto err; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } g_object_unref (stream); @@ -359,6 +359,6 @@ err: TRUE)) { return FALSE; } - destroy_session (session->s); + rspamd_session_destroy (session->s); return FALSE; } |