diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-02 21:45:00 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-02 21:45:00 +0000 |
commit | e9794d53f3882ec44fba535a14249058d552d248 (patch) | |
tree | e16b563c3aa18d0d454aa4a14dc60f32e7b538d1 /src | |
parent | 0449b56df04b3d55e6f7d3738ae1040ba595af47 (diff) | |
download | rspamd-e9794d53f3882ec44fba535a14249058d552d248.tar.gz rspamd-e9794d53f3882ec44fba535a14249058d552d248.zip |
[Minor] Move checks to the correct branch
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/scan_result.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c index 137f30ca0..e160d34a7 100644 --- a/src/libmime/scan_result.c +++ b/src/libmime/scan_result.c @@ -319,9 +319,6 @@ insert_metric_result (struct rspamd_task *task, } else { if (sdef) { - max_shots = sdef->nshots; - } - else { if (sdef->groups) { PTR_ARRAY_FOREACH(sdef->groups, i, gr) { if (gr->flags & RSPAMD_SYMBOL_GROUP_ONE_SHOT) { @@ -329,9 +326,11 @@ insert_metric_result (struct rspamd_task *task, } } } - else { - max_shots = task->cfg->default_max_shots; - } + + max_shots = MIN(max_shots, sdef->nshots); + } + else { + max_shots = task->cfg->default_max_shots; } } |