@@ -26,6 +26,7 @@ | |||
* Rspamd fuzzy storage server | |||
*/ | |||
#include <libserver/rspamd_control.h> | |||
#include "config.h" | |||
#include "util.h" | |||
#include "rspamd.h" | |||
@@ -856,6 +857,10 @@ rspamd_fuzzy_storage_stat (struct rspamd_main *rspamd_main, | |||
else { | |||
rep.reply.fuzzy_stat.status = 0; | |||
memcpy (rep.reply.fuzzy_stat.storage_id, | |||
rspamd_fuzzy_backend_id (ctx->backend), | |||
sizeof (rep.reply.fuzzy_stat.storage_id)); | |||
/* Iterate over all keys */ | |||
obj = ucl_object_typed_new (UCL_OBJECT); | |||
g_hash_table_iter_init (&it, ctx->keys); |
@@ -251,6 +251,14 @@ rspamd_control_write_reply (struct rspamd_control_session *session) | |||
ucl_parser_free (parser); | |||
} | |||
ucl_object_insert_key (cur, | |||
ucl_object_fromlstring ( | |||
elt->reply.reply.fuzzy_stat.storage_id, | |||
MEMPOOL_UID_LEN - 1), | |||
"id", | |||
0, | |||
false); | |||
} | |||
else { | |||
ucl_object_insert_key (cur, |
@@ -26,6 +26,7 @@ | |||
#define RSPAMD_RSPAMD_CONTROL_H | |||
#include "config.h" | |||
#include "mem_pool.h" | |||
#include <event.h> | |||
struct rspamd_main; | |||
@@ -94,6 +95,7 @@ struct rspamd_control_reply { | |||
} hs_loaded; | |||
struct { | |||
guint status; | |||
gchar storage_id[MEMPOOL_UID_LEN]; | |||
} fuzzy_stat; | |||
} reply; | |||
}; |