From a23a0cbb2c5373f05fae566d7fbfac5ffbe86809 Mon Sep 17 00:00:00 2001 From: "cebka@lenovo-laptop" Date: Thu, 18 Mar 2010 19:49:22 +0300 Subject: [PATCH] * Some logging added --- src/fuzzy_storage.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.39.5