aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-26 14:00:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-26 14:00:03 +0100
commitf1e2f1acd45ffc6ae8f79bbba23d4734e588898f (patch)
treeecbecaa5f103192933407a24d3668a39a0744545 /src/worker.c
parent537492c40116a8f38c209f7b36dacd0562504b44 (diff)
downloadrspamd-f1e2f1acd45ffc6ae8f79bbba23d4734e588898f.tar.gz
rspamd-f1e2f1acd45ffc6ae8f79bbba23d4734e588898f.zip
Refactor events API.
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/worker.c b/src/worker.c
index dec3d679f..ec8fb464c 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -140,7 +140,7 @@ rspamd_worker_error_handler (struct rspamd_http_connection *conn, GError *err)
msg_info ("abnormally closing connection from: %s, error: %e",
rspamd_inet_address_to_string (task->client_addr), err);
/* Terminate session immediately */
- destroy_session (task->s);
+ rspamd_session_destroy (task->s);
}
static gint
@@ -153,7 +153,7 @@ rspamd_worker_finish_handler (struct rspamd_http_connection *conn,
/* We are done here */
msg_debug ("normally closing connection from: %s",
rspamd_inet_address_to_string (task->client_addr));
- destroy_session (task->s);
+ rspamd_session_destroy (task->s);
}
else if (task->state == WRITE_REPLY) {
/*
@@ -172,7 +172,7 @@ rspamd_worker_finish_handler (struct rspamd_http_connection *conn,
* If all filters have finished their tasks, this function will trigger
* writing a reply.
*/
- check_session_pending (task->s);
+ rspamd_session_pending (task->s);
}
return 0;
@@ -242,7 +242,7 @@ accept_socket (gint fd, short what, void *arg)
(rspamd_mempool_destruct_t)reduce_tasks_count, &ctx->tasks);
/* Set up async session */
- new_task->s = new_async_session (new_task->task_pool, rspamd_task_fin,
+ new_task->s = rspamd_session_create (new_task->task_pool, rspamd_task_fin,
rspamd_task_restore, rspamd_task_free_hard, new_task);
if (ctx->key) {