From: Vsevolod Stakhov Date: Sun, 7 Aug 2022 17:25:53 +0000 (+0100) Subject: [Minor] Set current item when processing composites X-Git-Tag: 3.3~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=160c6ad5167ed20fbfd33b5ab413ca48cc4ed1f2;p=thirdparty%2Frspamd.git [Minor] Set current item when processing composites --- diff --git a/src/libserver/symcache/symcache_c.cxx b/src/libserver/symcache/symcache_c.cxx index 76cac67b60..83d6b98422 100644 --- a/src/libserver/symcache/symcache_c.cxx +++ b/src/libserver/symcache/symcache_c.cxx @@ -657,10 +657,14 @@ rspamd_symcache_composites_foreach(struct rspamd_task *task, auto *dyn_item = cache_runtime->get_dynamic_item(item->id); if (!dyn_item->started) { + auto *old_item = cache_runtime->set_cur_item(dyn_item); func((void *)item->get_name().c_str(), item->get_cbdata(), fd); dyn_item->finished = true; + cache_runtime->set_cur_item(old_item); } }); + + cache_runtime->set_cur_item(nullptr); } gboolean