Browse Source

* Take block size into consideration while searching for fuzzy hash

tags/0.3.0
Vsevolod Stakhov 14 years ago
parent
commit
7ee1ed10ba
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      src/fuzzy_storage.c

+ 7
- 4
src/fuzzy_storage.c View File

@@ -351,11 +351,14 @@ check_hash_node (GQueue *hash, fuzzy_hash_t *s, int update_value)
pvalue = JudySLGet (jtree, s->hash_pipe, PJE0);
if (pvalue != NULL) {
h = *((struct rspamd_fuzzy_node **)pvalue);
msg_info ("fuzzy hash was found in judy tree");
if (update_value) {
h->value += update_value;
/* Also check block size */
if (h->h.block_size== s->block_size) {
msg_info ("fuzzy hash was found in judy tree");
if (update_value) {
h->value += update_value;
}
return h->value;
}
return h->value;
}
}
else {

Loading…
Cancel
Save