Browse Source

Fuzzy actual version is now 3 not 2.

tags/0.9.0
Vsevolod Stakhov 9 years ago
parent
commit
f74ba68df2
2 changed files with 15 additions and 1 deletions
  1. 14
    0
      src/fuzzy_storage.c
  2. 1
    1
      src/fuzzy_storage.h

+ 14
- 0
src/fuzzy_storage.c View File

@@ -214,6 +214,20 @@ rspamd_fuzzy_command_valid (struct rspamd_fuzzy_cmd *cmd, gint r)
return (r == sizeof (*cmd));
}
}
else if (cmd->version == 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)) {
return TRUE;
}
}
else {
return (r == sizeof (*cmd));
}
}

return FALSE;
}

+ 1
- 1
src/fuzzy_storage.h View File

@@ -6,7 +6,7 @@
#include "fuzzy.h"
#include "shingles.h"

#define RSPAMD_FUZZY_VERSION 2
#define RSPAMD_FUZZY_VERSION 3

/* Commands for fuzzy storage */
#define FUZZY_CHECK 0

Loading…
Cancel
Save