aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/worker.c b/src/worker.c
index 2da9383e9..8a9dd9d3a 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -316,7 +316,7 @@ accept_socket (int fd, short what, void *arg)
* Start worker process
*/
void
-start_worker (struct rspamd_worker *worker, int listen_sock)
+start_worker (struct rspamd_worker *worker)
{
struct sigaction signals;
@@ -350,7 +350,6 @@ start_worker (struct rspamd_worker *worker, int listen_sock)
#endif
worker->srv->pid = getpid ();
- worker->srv->type = TYPE_WORKER;
event_init ();
evdns_init ();
@@ -363,7 +362,7 @@ start_worker (struct rspamd_worker *worker, int listen_sock)
signal_add (&worker->sig_ev, NULL);
/* Accept event */
- event_set(&worker->bind_ev, listen_sock, EV_READ | EV_PERSIST, accept_socket, (void *)worker);
+ event_set(&worker->bind_ev, worker->cf->listen_sock, EV_READ | EV_PERSIST, accept_socket, (void *)worker);
event_add(&worker->bind_ev, NULL);
/* Send SIGUSR2 to parent */