summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-22 16:34:09 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-22 16:34:09 +0100
commitb96418cea8bf33dfda016e96c2d3183e60a0dfee (patch)
tree1fb6155be63b879869bf4c5087439d51b5039214
parentbbc4c1eee1f8bd1bcb55189d6ad692ff6c28f72a (diff)
downloadrspamd-b96418cea8bf33dfda016e96c2d3183e60a0dfee.tar.gz
rspamd-b96418cea8bf33dfda016e96c2d3183e60a0dfee.zip
Fix issue when there is no reject score for any metric.
-rw-r--r--src/libserver/symbols_cache.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index b21caab8a..52b62fac5 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -863,10 +863,15 @@ rspamd_symbols_cache_metric_limit (struct rspamd_task *task,
}
}
- g_assert (cp->rs != NULL);
+ if (cp->rs) {
- if (cp->rs->score > cp->lim) {
- return TRUE;
+ if (cp->rs->score > cp->lim) {
+ return TRUE;
+ }
+ }
+ else {
+ /* No reject score define, always check all rules */
+ cp->lim = -1;
}
return FALSE;