diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-21 16:28:26 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-21 16:28:26 +0100 |
commit | 07815f232975a0d7d431805cea618276c47d275d (patch) | |
tree | 0a5cf9a787aa30832d6a9a9dba18456a26a0a450 /src | |
parent | 7299f62dc0aeaa15057aac74ae74e95bd9ebb9b6 (diff) | |
download | rspamd-07815f232975a0d7d431805cea618276c47d275d.tar.gz rspamd-07815f232975a0d7d431805cea618276c47d275d.zip |
Fix assignment order.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fuzzy_check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 8d9aaf926..0b5cd97ed 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1105,9 +1105,6 @@ register_fuzzy_client_call (struct rspamd_task *task, session = rspamd_mempool_alloc (task->task_pool, sizeof (struct fuzzy_client_session)); - event_set (&session->ev, sock, EV_WRITE, fuzzy_io_callback, - session); - event_base_set (session->task->ev_base, &session->ev); msec_to_tv (fuzzy_module_ctx->io_timeout, &session->tv); session->state = 0; session->commands = commands; @@ -1115,6 +1112,9 @@ register_fuzzy_client_call (struct rspamd_task *task, session->fd = sock; session->server = selected; session->rule = rule; + event_set (&session->ev, sock, EV_WRITE, fuzzy_io_callback, + session); + event_base_set (session->task->ev_base, &session->ev); event_add (&session->ev, &session->tv); rspamd_session_add_event (task->s, fuzzy_io_fin, |