aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-19 19:55:25 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-19 19:55:25 +0400
commite7f25690a5c13c2dc084aab4b5bd7dc8e052332e (patch)
tree7cde0034381450dc4ed87a7d78cc1a906e171ed9 /src/protocol.c
parentf5bc6840a7db6034eeec338454105814fabbfb32 (diff)
downloadrspamd-e7f25690a5c13c2dc084aab4b5bd7dc8e052332e.tar.gz
rspamd-e7f25690a5c13c2dc084aab4b5bd7dc8e052332e.zip
* Handle cases of broken requests
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/protocol.c b/src/protocol.c
index f86f25677..cb79b258c 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -123,7 +123,7 @@ parse_command (struct worker_task *task, f_str_t * line)
task->proto_ver = RSPAMC_PROTO_1_1;
token = separate_command (line, ' ');
if (line == NULL || token == NULL) {
- debug_task ("bad command: %s", token);
+ debug_task ("bad command");
return -1;
}
@@ -979,9 +979,7 @@ write_reply (struct worker_task *task)
debug_task ("writing error: %s", outbuf);
}
/* Write to bufferevent error message */
- if (! rspamd_dispatcher_write (task->dispatcher, outbuf, r, FALSE, FALSE)) {
- return FALSE;
- }
+ return rspamd_dispatcher_write (task->dispatcher, outbuf, r, FALSE, FALSE);
}
else {
switch (task->cmd) {