]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Obsolete old fuzzy epochs
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Mar 2022 22:22:31 +0000 (22:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Mar 2022 22:22:54 +0000 (22:22 +0000)
src/fuzzy_storage.c
src/libserver/fuzzy_wire.h

index 6eb79640e806aa0a25a874942a3395d5d68bd08c..b9397fc2efc86b91e708bca656486501eea658d8 100644 (file)
@@ -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]));
        }
index 82e386657f71475b2575c633e6df97881e77d9c4..8680e16fbd6cbc000c89b99c2ba3f6ce9396223d 100644 (file)
@@ -27,9 +27,6 @@ extern "C" {
  * The epoch of the fuzzy client
  */
 enum rspamd_fuzzy_epoch {
-       RSPAMD_FUZZY_EPOCH6 = 0, /**< pre 0.6.x */
-       RSPAMD_FUZZY_EPOCH8, /**< 0.8 till 0.9 */
-       RSPAMD_FUZZY_EPOCH9, /**< 0.9 + */
        RSPAMD_FUZZY_EPOCH10, /**< 1.0+ encryption */
        RSPAMD_FUZZY_EPOCH11, /**< 1.7+ extended reply */
        RSPAMD_FUZZY_EPOCH_MAX