]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix score set in passthrough mode
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 11 Oct 2018 16:19:00 +0000 (17:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 11 Oct 2018 16:19:00 +0000 (17:19 +0100)
src/libmime/filter.c

index c06df1b773fcb50505cb8ab55db49dd8660fd822..ba1e821f39e4812d0d49d1826569d5b05713d0fc 100644 (file)
@@ -489,28 +489,8 @@ rspamd_check_action_metric (struct rspamd_task *task, struct rspamd_metric_resul
        else {
                /* Peek the highest priority result */
                pr = task->result->passthrough_result;
-               sc = NAN;
-
-               if (isnan (pr->target_score)) {
-                       for (i = pr->action; i < METRIC_ACTION_MAX; i++) {
-                               selected_action = &task->cfg->actions[i];
-                               sc = mres->actions_limits[i];
-
-                               if (isnan (sc)) {
-                                       if (i == pr->action) {
-                                               /* No scores defined, just avoid NaN */
-                                               sc = 0;
-                                               break;
-                                       }
-                               }
-                               else {
-                                       break;
-                               }
-                       }
-               }
-               else {
-                       sc = pr->target_score;
-               }
+               sc = pr->target_score;
+               selected_action = &task->cfg->actions[pr->action];
 
                if (!isnan (sc)) {
                        if (pr->action == METRIC_ACTION_NOACTION) {