diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-15 17:59:52 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-08-15 17:59:52 +0400 |
commit | d031614b5c3191d49248c6aa0ce06d1665963fbf (patch) | |
tree | 366ff4cc950eceeba8c2ed5133be6959974000c6 /src | |
parent | cf375e93567a30071df53f9c1c13618e8fb7a140 (diff) | |
download | rspamd-d031614b5c3191d49248c6aa0ce06d1665963fbf.tar.gz rspamd-d031614b5c3191d49248c6aa0ce06d1665963fbf.zip |
Fix output for spamc proto.
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/protocol.c b/src/protocol.c index c70cae16b..fe9621e21 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -969,7 +969,7 @@ print_metric_data_rspamc (struct worker_task *task, gchar *outbuf, gsize size, if (metric_res == NULL) { if (task->proto == SPAMC_PROTO) { r = rspamd_snprintf (outbuf, size, - "Spam: False ; 0 / %.2f" CRLF, ms); + "Spam: False ; 0.00 / %.2f" CRLF, ms); } else { if (task->proto_ver >= 11) { @@ -1106,6 +1106,10 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data ms = m->required_score; rs = m->reject_score; } + else if (metric_res == NULL) { + ms = m->required_score; + rs = m->reject_score; + } if (!task->is_json) { r = print_metric_data_rspamc (task, outbuf, sizeof (outbuf), NULL, m, ms, rs, action); |