From: Vsevolod Stakhov Date: Sat, 7 May 2022 12:49:08 +0000 (+0100) Subject: [Minor] Fix composites processing X-Git-Tag: 3.3~271 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8fc5a0fa1dfb01857dd8de69c6b3eb015098155;p=rspamd.git [Minor] Fix composites processing --- 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; }