diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-09-24 20:24:16 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 20:24:16 +0600 |
commit | 464045f814b78b2d4f9ca20cc9e0a0a1b323ad8e (patch) | |
tree | ae407a04511fb7ea75aec9442fd69a0f965a78ac | |
parent | 985351866363c45c54e4cfeb6c3dee16caf39e75 (diff) | |
parent | d0314ba991fe519041773896d473939323ee6c77 (diff) | |
download | rspamd-464045f814b78b2d4f9ca20cc9e0a0a1b323ad8e.tar.gz rspamd-464045f814b78b2d4f9ca20cc9e0a0a1b323ad8e.zip |
Merge pull request #5156 from rspamd/vstakhov-dynamic-fuzzy-keys-iter
[Fix] Iterate over dynamic keys in fuzzy storage
-rw-r--r-- | src/fuzzy_storage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 3064d45a0..f21992a94 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2475,6 +2475,12 @@ rspamd_fuzzy_stat_to_ucl(struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat) rspamd_fuzzy_key_stat_iter(pk_iter, fuzzy_key, keys_obj, ip_stat); }); + if (ctx->dynamic_keys) { + kh_foreach(ctx->dynamic_keys, pk_iter, fuzzy_key, { + rspamd_fuzzy_key_stat_iter(pk_iter, fuzzy_key, keys_obj, ip_stat); + }); + } + ucl_object_insert_key(obj, keys_obj, "keys", 0, false); /* Now generic stats */ |