diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-16 16:13:43 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-16 16:13:43 +0400 |
commit | 561d5f4c2424f2ff4b1066d1efb308ddcc8aa06b (patch) | |
tree | 0787767907c096a5440bd526edab417bae7db669 /src/expressions.c | |
parent | be9387183439cea52013c97fa1e047c1d7ac472f (diff) | |
download | rspamd-561d5f4c2424f2ff4b1066d1efb308ddcc8aa06b.tar.gz rspamd-561d5f4c2424f2ff4b1066d1efb308ddcc8aa06b.zip |
* Add more debug to comparing parts distance function
* Write action even if message has no symbols
Diffstat (limited to 'src/expressions.c')
-rw-r--r-- | src/expressions.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/expressions.c b/src/expressions.c index 650721b9e..14ac3d98f 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -924,7 +924,7 @@ rspamd_header_exists (struct worker_task * task, GList * args, void *unused) gboolean rspamd_parts_distance (struct worker_task * task, GList * args, void *unused) { - int threshold; + int threshold, diff; struct mime_text_part *p1, *p2; GList *cur; struct expression_argument *arg; @@ -952,7 +952,9 @@ rspamd_parts_distance (struct worker_task * task, GList * args, void *unused) return FALSE; } p2 = cur->data; - if (fuzzy_compare_hashes (p1->fuzzy, p2->fuzzy) <= threshold) { + diff = fuzzy_compare_hashes (p1->fuzzy, p2->fuzzy); + debug_task ("got likeliness between parts of %d%%, threshold is %d%%", diff, threshold); + if (diff <= threshold) { return TRUE; } } |