]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Normalize fuzzy probability better
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 1 Jul 2017 15:19:44 +0000 (16:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 1 Jul 2017 15:19:44 +0000 (16:19 +0100)
src/plugins/fuzzy_check.c

index a839aae5f3384955dab12f5e1c8eda75d8412aa7..85e6d2c642845f7e2b38499295056bab06a20870 100644 (file)
@@ -1793,12 +1793,11 @@ fuzzy_insert_result (struct fuzzy_client_session *session,
                type = "img";
        }
        else {
-               /* XXX: we need something better here */
                if (cmd->shingles_count > 0) {
                        type = "txt";
                }
 
-               nval *= rep->prob;
+               nval *= rspamd_normalize_probability (rep->prob, 0.5);
        }
 
        msg_info_task (