From 40071fa8499384b0edf8084e4abae4113c0b8ddc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 21 Apr 2015 18:39:59 +0100 Subject: [PATCH] Show fuzzy checked statistics in the client. --- src/client/rspamc.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/client/rspamc.c b/src/client/rspamc.c index efd44c04f..96be01b70 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -730,8 +730,34 @@ rspamc_stat_output (ucl_object_t *obj) rspamd_printf_gstring (out, "Fuzzy hashes expired: %L\n", ucl_object_toint (ucl_object_find_key (obj, "fuzzy_expired"))); + st = ucl_object_find_key (obj, "fuzzy_checked"); + if (st != NULL && ucl_object_type (st) == UCL_ARRAY) { + rspamd_printf_gstring (out, "Fuzzy hashes checked: "); + iter = NULL; + + while ((cur = ucl_iterate_object (st, &iter, true)) != NULL) { + rspamd_printf_gstring (out, "%hL ", ucl_object_toint (cur)); + } + + rspamd_printf_gstring (out, "\n"); + } + + st = ucl_object_find_key (obj, "fuzzy_found"); + if (st != NULL && ucl_object_type (st) == UCL_ARRAY) { + rspamd_printf_gstring (out, "Fuzzy hashes found: "); + iter = NULL; + + while ((cur = ucl_iterate_object (st, &iter, true)) != NULL) { + rspamd_printf_gstring (out, "%hL ", ucl_object_toint (cur)); + } + + rspamd_printf_gstring (out, "\n"); + } + st = ucl_object_find_key (obj, "statfiles"); if (st != NULL && ucl_object_type (st) == UCL_ARRAY) { + iter = NULL; + while ((cur = ucl_iterate_object (st, &iter, true)) != NULL) { rspamc_stat_statfile (cur, out); } -- 2.39.5