aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-07 20:03:35 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-11-07 20:03:35 +0300
commit229fd540109f92cb8662dd085fcfe46aad3130cf (patch)
tree48504709b22738f671cdd21650e9d1d885e721a1 /src
parent15b079d79c99ed77b90ed510f9666612d518c5cc (diff)
downloadrspamd-229fd540109f92cb8662dd085fcfe46aad3130cf.tar.gz
rspamd-229fd540109f92cb8662dd085fcfe46aad3130cf.zip
Fix main rspamd worker to work with buffer.c changes.
Diffstat (limited to 'src')
-rw-r--r--src/main.h3
-rw-r--r--src/worker.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index fa72c7794..b7531fa83 100644
--- a/src/main.h
+++ b/src/main.h
@@ -182,7 +182,8 @@ struct worker_task {
WRITE_REPLY,
WRITE_ERROR,
WAIT_FILTER,
- CLOSING_CONNECTION
+ CLOSING_CONNECTION,
+ WRITING_REPLY
} state; /**< current session state */
size_t content_length; /**< length of user's input */
enum rspamd_protocol proto; /**< protocol (rspamc or spamc) */
diff --git a/src/worker.c b/src/worker.c
index bd2c5de2e..b3e56c13f 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -349,6 +349,7 @@ write_socket (void *arg)
switch (task->state) {
case WRITE_REPLY:
+ task->state = WRITING_REPLY;
if (!write_reply (task)) {
return FALSE;
}
@@ -359,6 +360,7 @@ write_socket (void *arg)
return FALSE;
break;
case WRITE_ERROR:
+ task->state = WRITING_REPLY;
if (!write_reply (task)) {
return FALSE;
}
@@ -376,6 +378,9 @@ write_socket (void *arg)
destroy_session (task->s);
return FALSE;
break;
+ case WRITING_REPLY:
+ /* Do nothing here */
+ break;
default:
msg_info ("abnormally closing connection");
if (ctx->is_custom) {