diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 15:11:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 15:18:17 +0100 |
commit | 798a6cc321640f579c37dc400a9bca31cb8ad5e2 (patch) | |
tree | ecdcd875bb58e359812961f911e3c22cad95ed65 /src/controller.c | |
parent | e3412399bb82853e6e622188e683080791cf5de6 (diff) | |
download | rspamd-798a6cc321640f579c37dc400a9bca31cb8ad5e2.tar.gz rspamd-798a6cc321640f579c37dc400a9bca31cb8ad5e2.zip |
[Project] Adopt main routines and plugins
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/controller.c b/src/controller.c index 46c02d47c..bb8c67e6f 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1870,7 +1870,8 @@ rspamd_controller_learn_fin_task (void *ud) session = conn_ent->ud; if (task->err != NULL) { - msg_info_session ("cannot learn <%s>: %e", task->message_id, task->err); + msg_info_session ("cannot learn <%s>: %e", + MESSAGE_FIELD (task, message_id), task->err); rspamd_controller_send_error (conn_ent, task->err->code, "%s", task->err->message); @@ -1882,13 +1883,14 @@ rspamd_controller_learn_fin_task (void *ud) msg_info_task ("<%s> learned message as %s: %s", rspamd_inet_address_to_string (session->from_addr), session->is_spam ? "spam" : "ham", - task->message_id); + MESSAGE_FIELD (task, message_id)); rspamd_controller_send_string (conn_ent, "{\"success\":true}"); return TRUE; } if (!rspamd_task_process (task, RSPAMD_TASK_PROCESS_LEARN)) { - msg_info_task ("cannot learn <%s>: %e", task->message_id, task->err); + msg_info_task ("cannot learn <%s>: %e", + MESSAGE_FIELD (task, message_id), task->err); if (task->err) { rspamd_controller_send_error (conn_ent, task->err->code, "%s", @@ -1909,7 +1911,7 @@ rspamd_controller_learn_fin_task (void *ud) msg_info_task ("<%s> learned message as %s: %s", rspamd_inet_address_to_string (session->from_addr), session->is_spam ? "spam" : "ham", - task->message_id); + MESSAGE_FIELD (task, message_id)); rspamd_controller_send_string (conn_ent, "{\"success\":true}"); } @@ -1948,7 +1950,8 @@ rspamd_controller_check_fin_task (void *ud) conn_ent = task->fin_arg; if (task->err) { - msg_info_task ("cannot check <%s>: %e", task->message_id, task->err); + msg_info_task ("cannot check <%s>: %e", + MESSAGE_FIELD (task, message_id), task->err); rspamd_controller_send_error (conn_ent, task->err->code, "%s", task->err->message); return TRUE; @@ -2027,7 +2030,8 @@ rspamd_controller_handle_learn_common ( rspamd_learn_task_spam (task, is_spam, session->classifier, NULL); if (!rspamd_task_process (task, RSPAMD_TASK_PROCESS_LEARN)) { - msg_warn_session ("<%s> message cannot be processed", task->message_id); + msg_warn_session ("<%s> message cannot be processed", + MESSAGE_FIELD (task, message_id)); goto end; } |