]> source.dussan.org Git - rspamd.git/commitdiff
* Some logging added
authorcebka@lenovo-laptop <cebka@lenovo-laptop>
Thu, 18 Mar 2010 16:49:22 +0000 (19:49 +0300)
committercebka@lenovo-laptop <cebka@lenovo-laptop>
Thu, 18 Mar 2010 16:49:22 +0000 (19:49 +0300)
src/fuzzy_storage.c

index 4edc77534bb97a6101044524203f4d49694cd01b..882130a04c72bef32565f8f5ff44b6dc583016e0 100644 (file)
@@ -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;
                }