diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-18 15:40:58 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-06-18 15:40:58 +0100 |
commit | 902e04a6460136f34e7a60891bf960a403042b11 (patch) | |
tree | 283502ca608016c3325b6d2337ebb7d54da3a549 /src | |
parent | 69d3b15744276d857f228e252ad2bb07cdb379da (diff) | |
download | rspamd-902e04a6460136f34e7a60891bf960a403042b11.tar.gz rspamd-902e04a6460136f34e7a60891bf960a403042b11.zip |
[Minor] Remove bogus message
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/symcache/symcache_impl.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
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++; } |