aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-18 19:49:22 +0300
committercebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-18 19:49:22 +0300
commita23a0cbb2c5373f05fae566d7fbfac5ffbe86809 (patch)
tree5b145e16f5b2a1115553938173e08fc54d6aed83 /src
parentddba1860ecead8529f6542bb69c4027e8a7e13a4 (diff)
downloadrspamd-a23a0cbb2c5373f05fae566d7fbfac5ffbe86809.tar.gz
rspamd-a23a0cbb2c5373f05fae566d7fbfac5ffbe86809.zip
* Some logging added
Diffstat (limited to 'src')
-rw-r--r--src/fuzzy_storage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 4edc77534..882130a04 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -287,6 +287,10 @@ check_hash_node (GQueue *hash, fuzzy_hash_t *s, int update_value)
h = cur->data;
if ((prob = fuzzy_compare_hashes (&h->h, s)) > LEV_LIMIT) {
msg_info ("fuzzy hash was found, probability %d%%", prob);
+ if (update_value) {
+ msg_info ("new hash weight: %d", h->value);
+ h->value += update_value;
+ }
return h->value;
}
cur = g_list_next (cur);
@@ -299,10 +303,12 @@ check_hash_node (GQueue *hash, fuzzy_hash_t *s, int update_value)
msg_info ("fuzzy hash was found, probability %d%%", prob);
if (update_value) {
h->value += update_value;
+ msg_info ("new hash weight: %d", h->value);
}
if (h->value > FREQUENT_SCORE) {
g_queue_unlink (hash, cur);
g_queue_push_head_link (frequent, cur);
+ msg_info ("moved hash to frequent list");
}
return h->value;
}