aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-02 22:22:31 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-03-02 22:22:54 +0000
commit5091e292342eadcd7a5a62c924717a88b4baffe7 (patch)
tree333bf4f6f18f0576726cafd5aa08cb5163cc0018 /src/fuzzy_storage.c
parentdc4d83ffa2d24135efff45647121bcb27449acfb (diff)
downloadrspamd-5091e292342eadcd7a5a62c924717a88b4baffe7.tar.gz
rspamd-5091e292342eadcd7a5a62c924717a88b4baffe7.zip
[Minor] Obsolete old fuzzy epochs
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 6eb79640e..b9397fc2e 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -1228,20 +1228,6 @@ rspamd_fuzzy_command_valid (struct rspamd_fuzzy_cmd *cmd, gint r)
}
}
break;
- case 2:
- /*
- * rspamd 0.8 has slightly different tokenizer then it might be not
- * 100% compatible
- */
- if (cmd->shingles_count > 0) {
- if (r == sizeof (struct rspamd_fuzzy_shingle_cmd)) {
- ret = RSPAMD_FUZZY_EPOCH8;
- }
- }
- else {
- ret = RSPAMD_FUZZY_EPOCH8;
- }
- break;
default:
break;
}
@@ -1890,7 +1876,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* Checked by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_hashes_checked[i]));
}
@@ -1900,7 +1886,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* Shingles by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_shingles_checked[i]));
}
@@ -1910,7 +1896,7 @@ rspamd_fuzzy_stat_to_ucl (struct rspamd_fuzzy_storage_ctx *ctx, gboolean ip_stat
/* Matched by epoch */
elt = ucl_object_typed_new (UCL_ARRAY);
- for (i = RSPAMD_FUZZY_EPOCH6; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
+ for (i = RSPAMD_FUZZY_EPOCH10; i < RSPAMD_FUZZY_EPOCH_MAX; i++) {
ucl_array_append (elt,
ucl_object_fromint (ctx->stat.fuzzy_hashes_found[i]));
}