aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-14 18:28:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-14 18:28:33 +0000
commit45384ca0ba44f87a34eb1e1207f6f6b545f457a2 (patch)
tree5c85d4ecf5fdf77a59ad29f9e9e01d8a3df3f753 /src/fuzzy_storage.c
parent2638d55b61fcbc37693d6e00c98ce3f6c8e671f3 (diff)
downloadrspamd-45384ca0ba44f87a34eb1e1207f6f6b545f457a2.tar.gz
rspamd-45384ca0ba44f87a34eb1e1207f6f6b545f457a2.zip
Fix fuzzy stats
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 9bb542df8..4bbb96689 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -791,6 +791,7 @@ rspamd_fuzzy_storage_stat (struct rspamd_main *rspamd_main,
GHashTable *ip_hash;
struct fuzzy_key_stat *key_stat;
struct rspamd_http_keypair *kp;
+ rspamd_lru_element_t *lru_elt;
ucl_object_t *obj, *elt, *ip_elt, *ip_cur;
struct ucl_emitter_functions *emit_subr;
guchar fdspace[CMSG_SPACE(sizeof (int))];
@@ -836,7 +837,8 @@ rspamd_fuzzy_storage_stat (struct rspamd_main *rspamd_main,
ip_elt = ucl_object_typed_new (UCL_OBJECT);
while (g_hash_table_iter_next (&ip_it, &k, &v)) {
- ip_cur = rspamd_fuzzy_storage_stat_key (v);
+ lru_elt = v;
+ ip_cur = rspamd_fuzzy_storage_stat_key (lru_elt->data);
ucl_object_insert_key (ip_elt, ip_cur,
rspamd_inet_address_to_string (k), 0, true);
}