From e8fc5a0fa1dfb01857dd8de69c6b3eb015098155 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 7 May 2022 13:49:08 +0100 Subject: [PATCH] [Minor] Fix composites processing --- src/libserver/composites/composites.cxx | 2 ++ src/libserver/symcache/symcache_c.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libserver/composites/composites.cxx b/src/libserver/composites/composites.cxx index f1d742ca9..12af51514 100644 --- a/src/libserver/composites/composites.cxx +++ b/src/libserver/composites/composites.cxx @@ -802,6 +802,8 @@ composites_foreach_callback(gpointer key, gpointer value, void *data) cd->composite = comp; task = cd->task; + msg_debug_composites("process composite %s", str_key); + if (!cd->checked[cd->composite->id * 2]) { if (rspamd_symcache_is_checked(cd->task, cd->task->cfg->cache, str_key)) { diff --git a/src/libserver/symcache/symcache_c.cxx b/src/libserver/symcache/symcache_c.cxx index 82ef7c164..d6e1bc6f2 100644 --- a/src/libserver/symcache/symcache_c.cxx +++ b/src/libserver/symcache/symcache_c.cxx @@ -536,7 +536,7 @@ rspamd_symcache_composites_foreach(struct rspamd_task *task, real_cache->composites_foreach([&](const auto *item) { auto *dyn_item = cache_runtime->get_dynamic_item(item->id, false); - if (dyn_item->started) { + if (!dyn_item->started) { func((void *)item->get_name().c_str(), item->get_cbdata(), fd); dyn_item->finished = true; } -- 2.39.5