summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-09 17:36:41 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-09 17:36:41 +0300
commit1dcb152734a13419f8641d38c98fb4b138ac90fd (patch)
tree482808579a0d07ed3e1fecb2c0fca55dcaf74ee7 /src
parent3e71b98b176fbaf54ff440e3831b5b1bd6d6e4f3 (diff)
downloadrspamd-1dcb152734a13419f8641d38c98fb4b138ac90fd.tar.gz
rspamd-1dcb152734a13419f8641d38c98fb4b138ac90fd.zip
Print "0.00" instead of "0" in protocol output.
Fix misprint in cdb handling.
Diffstat (limited to 'src')
-rw-r--r--src/cdb/cdb_init.c2
-rw-r--r--src/protocol.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/cdb/cdb_init.c b/src/cdb/cdb_init.c
index af7b25256..b962c43fa 100644
--- a/src/cdb/cdb_init.c
+++ b/src/cdb/cdb_init.c
@@ -133,7 +133,7 @@ cdb_timer_callback (int fd, short what, gpointer ud)
}
(void)close (cdbp->cdb_fd);
cdbp->cdb_fsize = 0;
- (void)cdb_init (cdbp, fd);
+ (void)cdb_init (cdbp, nfd);
}
}
}
diff --git a/src/protocol.c b/src/protocol.c
index 683d291a9..f6b0c30fc 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -703,18 +703,18 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data
if (task->proto_ver >= 11) {
if (!task->is_skipped) {
r = rspamd_snprintf (outbuf, sizeof(outbuf),
- "Metric: default; False; 0 / %.2f / %.2f" CRLF, ms,
+ "Metric: default; False; 0.00 / %.2f / %.2f" CRLF, ms,
rs);
}
else {
r = rspamd_snprintf (outbuf, sizeof(outbuf),
- "Metric: default; Skip; 0 / %.2f / %.2f" CRLF, ms,
+ "Metric: default; Skip; 0.00 / %.2f / %.2f" CRLF, ms,
rs);
}
}
else {
r = rspamd_snprintf (outbuf, sizeof(outbuf),
- "Metric: default; False; 0 / %.2f" CRLF, ms);
+ "Metric: default; False; 0.00 / %.2f" CRLF, ms);
}
r += rspamd_snprintf (outbuf + r, sizeof(outbuf) - r,
"Action: %s" CRLF, str_action_metric (
@@ -723,11 +723,11 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data
if (!task->is_skipped) {
cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset,
cd->log_size - cd->log_offset,
- "(%s: F (no action): [0/%.2f/%.2f] [", "default", ms, rs);
+ "(%s: F (no action): [0.00/%.2f/%.2f] [", "default", ms, rs);
}
else {
cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset,
- cd->log_size - cd->log_offset, "(%s: S: [0/%.2f/%.2f] [",
+ cd->log_size - cd->log_offset, "(%s: S: [0.00/%.2f/%.2f] [",
"default", ms, rs);
}
}