From: cebka@lenovo-laptop Date: Thu, 18 Mar 2010 16:49:22 +0000 (+0300) Subject: * Some logging added X-Git-Tag: 0.3.0~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a23a0cbb2c5373f05fae566d7fbfac5ffbe86809;p=thirdparty%2Frspamd.git * Some logging added --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 4edc77534b..882130a04c 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; }