aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-30 15:09:26 -0700
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-30 15:09:26 -0700
commite7507e024d6c168aa43543f3a064c19c64d3f55b (patch)
tree971326eb12c11049d9163716e34ec71f55a7985b /src/libmime
parent8fafe7395acaff58e95255e82901eab7b195c8a7 (diff)
downloadrspamd-e7507e024d6c168aa43543f3a064c19c64d3f55b.tar.gz
rspamd-e7507e024d6c168aa43543f3a064c19c64d3f55b.zip
Fix issues with scanning messages via controller.
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/protocol.c6
-rw-r--r--src/libmime/protocol.h7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/libmime/protocol.c b/src/libmime/protocol.c
index 57ef9fe42..52336c81c 100644
--- a/src/libmime/protocol.c
+++ b/src/libmime/protocol.c
@@ -697,8 +697,8 @@ rspamd_ucl_tolegacy_output (struct rspamd_task *task, ucl_object_t *top, GString
g_string_append_printf (out, "Message-ID: %s\r\n", task->message_id);
}
-static void
-write_check_reply (struct rspamd_http_message *msg, struct rspamd_task *task)
+void
+rspamd_protocol_http_reply (struct rspamd_http_message *msg, struct rspamd_task *task)
{
GString *logbuf;
struct metric_result *metric_res;
@@ -794,7 +794,7 @@ rspamd_protocol_write_reply (struct rspamd_task *task)
case CMD_SYMBOLS:
case CMD_PROCESS:
case CMD_SKIP:
- write_check_reply (msg, task);
+ rspamd_protocol_http_reply (msg, task);
break;
case CMD_PING:
msg->body = g_string_new ("pong");
diff --git a/src/libmime/protocol.h b/src/libmime/protocol.h
index 8d2efe118..b3643ac7a 100644
--- a/src/libmime/protocol.h
+++ b/src/libmime/protocol.h
@@ -29,6 +29,13 @@ struct metric;
gboolean rspamd_protocol_handle_request (struct rspamd_task *task, struct rspamd_http_message *msg);
/**
+ * Write task results to http message
+ * @param msg
+ * @param task
+ */
+void rspamd_protocol_http_reply (struct rspamd_http_message *msg, struct rspamd_task *task);
+
+/**
* Write reply for specified task command
* @param task task object
* @return 0 if we wrote reply and -1 if there was some error