From: Vsevolod Stakhov Date: Tue, 18 Jun 2024 14:40:58 +0000 (+0100) Subject: [Minor] Remove bogus message X-Git-Tag: 3.9.0~17^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=902e04a6460136f34e7a60891bf960a403042b11;p=rspamd.git [Minor] Remove bogus message --- diff --git a/src/libserver/symcache/symcache_impl.cxx b/src/libserver/symcache/symcache_impl.cxx index 3fe2eb580..3a1c187cf 100644 --- a/src/libserver/symcache/symcache_impl.cxx +++ b/src/libserver/symcache/symcache_impl.cxx @@ -876,8 +876,7 @@ auto symcache::validate(bool strict) -> bool for (auto &pair: items_by_symbol) { auto &item = pair.second; - auto ghost = item->st->weight == 0; - auto skipped = !ghost; + auto skipped = item->st->weight != 0; if (item->is_scoreable() && g_hash_table_lookup(cfg->symbols, item->symbol.c_str()) == nullptr) { if (!std::isnan(cfg->unknown_weight)) { @@ -891,18 +890,19 @@ auto symcache::validate(bool strict) -> bool msg_info_cache("adding unknown symbol %s with weight: %.2f", item->symbol.c_str(), cfg->unknown_weight); - ghost = false; skipped = false; } else { + /* No `unknown weight`, no static score, and no dynamic score */ skipped = true; } } else { + /* We have a score, so we are not skipped */ skipped = false; } - if (!ghost && skipped) { + if (skipped) { if (!(item->flags & SYMBOL_TYPE_SKIPPED)) { item->flags |= SYMBOL_TYPE_SKIPPED; msg_warn_cache("symbol %s has no score registered, skip its check", @@ -910,12 +910,6 @@ auto symcache::validate(bool strict) -> bool } } - if (ghost) { - msg_debug_cache("symbol %s is registered as ghost symbol, it won't be inserted " - "to any metric", - item->symbol.c_str()); - } - if (item->st->weight < 0 && item->priority == 0) { item->priority++; }