aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fuzzy_check.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-24 13:42:09 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-24 13:42:09 +0100
commit10000699cd54920753b47212d7885468ea22c2b7 (patch)
tree342d5d94e6249292a77fd6316e82a4a980d7aadd /src/plugins/fuzzy_check.c
parentdf0b6cd825ad79f2390cae82f57efef2fef399f1 (diff)
downloadrspamd-10000699cd54920753b47212d7885468ea22c2b7.tar.gz
rspamd-10000699cd54920753b47212d7885468ea22c2b7.zip
[Minor] Add temporary workaround to work with 1.2 fuzzy storage
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r--src/plugins/fuzzy_check.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 721f1257a..30eccf0c3 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -53,6 +53,13 @@
#define DEFAULT_RETRANSMITS 3
#define DEFAULT_PORT 11335
+/*
+ * WARNING:
+ * As 1.3 is not yet stable, we want to keep compatibility here as 1.2 won't
+ * recognize version 4 unless 1.2.7
+ */
+#define RSPAMD_FUZZY_PLUGIN_VERSION 3
+
static const gint rspamd_fuzzy_hash_len = 5;
struct fuzzy_mapping {
@@ -1014,7 +1021,7 @@ fuzzy_cmd_from_task_meta (struct fuzzy_rule *rule,
}
cmd->cmd = c;
- cmd->version = RSPAMD_FUZZY_VERSION;
+ cmd->version = RSPAMD_FUZZY_PLUGIN_VERSION;
if (c != FUZZY_CHECK) {
cmd->flag = flag;
cmd->value = weight;
@@ -1172,7 +1179,7 @@ fuzzy_cmd_from_text_part (struct fuzzy_rule *rule,
shcmd->basic.tag = ottery_rand_uint32 ();
shcmd->basic.cmd = c;
- shcmd->basic.version = RSPAMD_FUZZY_VERSION;
+ shcmd->basic.version = RSPAMD_FUZZY_PLUGIN_VERSION;
if (c != FUZZY_CHECK) {
shcmd->basic.flag = flag;
@@ -1221,7 +1228,7 @@ fuzzy_cmd_from_data_part (struct fuzzy_rule *rule,
}
cmd->cmd = c;
- cmd->version = RSPAMD_FUZZY_VERSION;
+ cmd->version = RSPAMD_FUZZY_PLUGIN_VERSION;
if (c != FUZZY_CHECK) {
cmd->flag = flag;
cmd->value = weight;