]> source.dussan.org Git - rspamd.git/commitdiff
Show fuzzy checked statistics in the client.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Apr 2015 17:39:59 +0000 (18:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 21 Apr 2015 17:39:59 +0000 (18:39 +0100)
src/client/rspamc.c

index efd44c04f1cb6b265ea18ef40703b079b1d9ae2a..96be01b70eef8f015dbd8cc84c609c97d686209a 100644 (file)
@@ -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);
                }