commit e4f5270: [Minor] Fix inversed logic

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Jan 29 14:07:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-01-29 14:02:48 +0000
URL: https://github.com/rspamd/rspamd/commit/e4f52703c82924eeb3240a457ac819451b835468 (HEAD -> master)

[Minor] Fix inversed logic

---
 src/libmime/scan_result.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index 07800ea06..8f9d799fe 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.c
@@ -99,6 +99,8 @@ rspamd_create_metric_result (struct rspamd_task *task,
 			metric_res->actions_config[i].flags = RSPAMD_ACTION_RESULT_DEFAULT;
 			if (!(act->flags & RSPAMD_ACTION_NO_THRESHOLD)) {
 				metric_res->actions_config[i].cur_limit = act->threshold;
+			}
+			else {
 				metric_res->actions_config[i].flags |= RSPAMD_ACTION_RESULT_NO_THRESHOLD;
 			}
 			metric_res->actions_config[i].action = act;


More information about the Commits mailing list