From 00e5f24b527fab74d6447733025ef5a18a814018 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 Jul 2011 10:02:54 +0400 Subject: Change logic of params inside compare parts distance. During learning and classifying compare parts using new algorithm. Raise similarity factor. --- src/expressions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/expressions.c') diff --git a/src/expressions.c b/src/expressions.c index 3dfd542a4..b231bb309 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1093,8 +1093,8 @@ rspamd_parts_distance (struct worker_task * task, GList * args, void *unused) debug_task ("got likeliness between parts of %d%%, threshold is %d%%", diff, threshold); *pdiff = diff; memory_pool_set_variable (task->task_pool, "parts_distance", pdiff, NULL); - if (threshold2 > 0 && threshold > threshold2) { - if (diff <= threshold && diff >= threshold2) { + if (threshold2 > 0 && threshold < threshold2) { + if (diff >= threshold && diff <= threshold2) { return TRUE; } } -- cgit v1.2.3