From 42b81716ece887b0011b1e40b0101ad37598997e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Dec 2008 19:48:15 +0300 Subject: * Remove strlcpy code and replace it with glib alternative * Polish code and remove bugs found --- src/protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocol.c') diff --git a/src/protocol.c b/src/protocol.c index b259f6cd9..027e3a91a 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -349,7 +349,7 @@ write_check_reply (struct worker_task *task) char outbuf[OUTBUFSIZ]; struct metric_result *metric_res; - r = snprintf (outbuf, sizeof (outbuf), "%s 0 %s" CRLF, (task->proto == SPAMC_PROTO) ? SPAMD_REPLY_BANNER : RSPAMD_REPLY_BANNER); + r = snprintf (outbuf, sizeof (outbuf), "%s 0 %s" CRLF, (task->proto == SPAMC_PROTO) ? SPAMD_REPLY_BANNER : RSPAMD_REPLY_BANNER, "OK"); bufferevent_write (task->bev, outbuf, r); if (task->proto == SPAMC_PROTO) { /* Ignore metrics, just write report for 'default' metric */ @@ -435,7 +435,7 @@ write_process_reply (struct worker_task *task) char outbuf[OUTBUFSIZ]; r = snprintf (outbuf, sizeof (outbuf), "%s 0 %s" CRLF "Content-Length: %zd" CRLF CRLF, - (task->proto == SPAMC_PROTO) ? SPAMD_REPLY_BANNER : RSPAMD_REPLY_BANNER, task->msg->buf->len); + (task->proto == SPAMC_PROTO) ? SPAMD_REPLY_BANNER : RSPAMD_REPLY_BANNER, "OK", task->msg->buf->len); bufferevent_write (task->bev, outbuf, r); bufferevent_write (task->bev, task->msg->buf->begin, task->msg->buf->len); -- cgit v1.2.3