diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 14:19:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 14:19:26 +0000 |
commit | 70c16558572cf5e020f11bb447cc9f3746c3855e (patch) | |
tree | b32da619bf7951811d1e99cd792c9f6b40a790e8 /src/worker.c | |
parent | 66d11b553a17111407c2bd52698e7a7ba09a45b7 (diff) | |
download | rspamd-70c16558572cf5e020f11bb447cc9f3746c3855e.tar.gz rspamd-70c16558572cf5e020f11bb447cc9f3746c3855e.zip |
Adopt worker for new inet_address.
Diffstat (limited to 'src/worker.c')
-rw-r--r-- | src/worker.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/worker.c b/src/worker.c index 9c8b52ae2..d33fcae0f 100644 --- a/src/worker.c +++ b/src/worker.c @@ -199,7 +199,7 @@ accept_socket (gint fd, short what, void *arg) struct rspamd_worker *worker = (struct rspamd_worker *) arg; struct rspamd_worker_ctx *ctx; struct rspamd_task *new_task; - rspamd_inet_addr_t addr; + rspamd_inet_addr_t *addr; gint nfd; ctx = worker->ctx; @@ -224,8 +224,8 @@ accept_socket (gint fd, short what, void *arg) new_task = rspamd_task_new (worker); msg_info ("accepted connection from %s port %d", - rspamd_inet_address_to_string (&addr), - rspamd_inet_address_get_port (&addr)); + rspamd_inet_address_to_string (addr), + rspamd_inet_address_get_port (addr)); /* Copy some variables */ if (ctx->is_mime) { @@ -234,8 +234,9 @@ accept_socket (gint fd, short what, void *arg) else { new_task->flags &= ~RSPAMD_TASK_FLAG_MIME; } + new_task->sock = nfd; - memcpy (&new_task->client_addr, &addr, sizeof (addr)); + new_task->client_addr = addr; worker->srv->stat->connections_count++; new_task->resolver = ctx->resolver; |