aboutsummaryrefslogtreecommitdiffstats
path: root/src/expressions.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-16 16:13:43 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-07-16 16:13:43 +0400
commit561d5f4c2424f2ff4b1066d1efb308ddcc8aa06b (patch)
tree0787767907c096a5440bd526edab417bae7db669 /src/expressions.c
parentbe9387183439cea52013c97fa1e047c1d7ac472f (diff)
downloadrspamd-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.c6
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;
}
}