flags & RSPAMD_PASSTHROUGH_LEAST ? "*least " : "",
message, module, priority);
}
+
+ scan_result->nresults ++;
}
static inline gdouble
symbol,
s->score,
final_score);
+ metric_res->nresults ++;
return s;
}
ret = TRUE;
}
+ task->result->nresults ++;
+
return ret;
}
guint nactions;
guint npositive;
guint nnegative;
+ guint nresults; /**< all results: positive, negative, passthrough etc */
+ guint nresults_postfilters; /**< how many results are there before postfilters stage */
struct rspamd_scan_result *prev, *next; /**< double linked list of results */
};
case RSPAMD_TASK_STAGE_COMPOSITES:
rspamd_composites_process_task (task);
+ task->result->nresults_postfilters = task->result->nresults;
break;
case RSPAMD_TASK_STAGE_POST_FILTERS:
}
break;
case RSPAMD_TASK_STAGE_COMPOSITES_POST:
- /* Second run of composites processing before idempotent filters */
- rspamd_composites_process_task (task);
+ /* Second run of composites processing before idempotent filters (if needed) */
+ if (task->result->nresults_postfilters != task->result->nresults) {
+ rspamd_composites_process_task (task);
+ }
+ else {
+ msg_debug_task ("skip second run of composites as the result has not been changed");
+ }
break;
case RSPAMD_TASK_STAGE_IDEMPOTENT: