aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-02 09:21:24 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-02 09:21:24 +0300
commitc1e155820bb5f16eece4b9b6e93d1446f5466742 (patch)
tree6d061b65d8ff0ca1311086fefe573530cc368758 /src/worker.c
parent496249dabef15cb033c0a5a2a74f5a021f6012c1 (diff)
downloadrspamd-c1e155820bb5f16eece4b9b6e93d1446f5466742.tar.gz
rspamd-c1e155820bb5f16eece4b9b6e93d1446f5466742.zip
* Fix dispatcher bugs and add some debug output
* Fix log output for surbl
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/worker.c b/src/worker.c
index 143cb54de..03912930f 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -144,6 +144,7 @@ read_socket (f_str_t *in, void *arg)
break;
case READ_MESSAGE:
task->msg = in;
+ msg_debug ("read_socket: got string of length %ld", (long int)task->msg->len);
r = process_message (task);
r = process_filters (task);
if (r == -1) {
@@ -242,6 +243,8 @@ accept_socket (int fd, short what, void *arg)
new_task->state = READ_COMMAND;
new_task->sock = nfd;
new_task->cfg = worker->srv->cfg;
+ io_tv.tv_sec = WORKER_IO_TIMEOUT;
+ io_tv.tv_usec = 0;
TAILQ_INIT (&new_task->urls);
new_task->task_pool = memory_pool_new (memory_pool_get_size ());
/* Add destructor for recipients list (it would be better to use anonymous function here */
@@ -289,9 +292,6 @@ start_worker (struct rspamd_worker *worker, int listen_sock)
/* Send SIGUSR2 to parent */
kill (getppid (), SIGUSR2);
- io_tv.tv_sec = WORKER_IO_TIMEOUT;
- io_tv.tv_usec = 0;
-
event_loop (0);
}