aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/cdb_backend.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstat/backends/cdb_backend.cxx')
-rw-r--r--src/libstat/backends/cdb_backend.cxx17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libstat/backends/cdb_backend.cxx b/src/libstat/backends/cdb_backend.cxx
index bd05e8ef8..f6ca9c12d 100644
--- a/src/libstat/backends/cdb_backend.cxx
+++ b/src/libstat/backends/cdb_backend.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 Vsevolod Stakhov
+ * Copyright 2025 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
#include <optional>
#include "contrib/expected/expected.hpp"
#include "contrib/ankerl/unordered_dense.h"
-#include "fmt/base.h"
+#include "contrib/fmt/include/fmt/base.h"
namespace rspamd::stat::cdb {
@@ -393,7 +393,6 @@ rspamd_cdb_process_tokens(struct rspamd_task *task,
gpointer runtime)
{
auto *cdbp = CDB_FROM_RAW(runtime);
- bool seen_values = false;
for (auto i = 0u; i < tokens->len; i++) {
rspamd_token_t *tok;
@@ -403,21 +402,13 @@ rspamd_cdb_process_tokens(struct rspamd_task *task,
if (res) {
tok->values[id] = res.value();
- seen_values = true;
}
else {
tok->values[id] = 0;
}
}
- if (seen_values) {
- if (cdbp->is_spam()) {
- task->flags |= RSPAMD_TASK_FLAG_HAS_SPAM_TOKENS;
- }
- else {
- task->flags |= RSPAMD_TASK_FLAG_HAS_HAM_TOKENS;
- }
- }
+ /* No longer need to set flags - multi-class handles missing data naturally */
return true;
}
@@ -488,4 +479,4 @@ void rspamd_cdb_close(gpointer ctx)
{
auto *cdbp = CDB_FROM_RAW(ctx);
delete cdbp;
-} \ No newline at end of file
+}