diff options
-rw-r--r-- | src/libserver/logger.h | 4 | ||||
-rw-r--r-- | src/libserver/symcache/symcache_runtime.cxx | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/libserver/logger.h b/src/libserver/logger.h index 8f1177666..ae3ea4694 100644 --- a/src/libserver/logger.h +++ b/src/libserver/logger.h @@ -302,6 +302,10 @@ extern guint rspamd_task_log_id; task->task_pool->tag.tagname, task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ __VA_ARGS__) +#define msg_info_task_lambda(...) rspamd_default_log_function (G_LOG_LEVEL_INFO, \ + task->task_pool->tag.tagname, task->task_pool->tag.uid, \ + log_func, \ + __VA_ARGS__) #define msg_debug_task(...) rspamd_conditional_debug_fast (NULL, task->from_addr, \ rspamd_task_log_id, "task", task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ diff --git a/src/libserver/symcache/symcache_runtime.cxx b/src/libserver/symcache/symcache_runtime.cxx index 6c0af2b47..788a36ec9 100644 --- a/src/libserver/symcache/symcache_runtime.cxx +++ b/src/libserver/symcache/symcache_runtime.cxx @@ -151,6 +151,9 @@ symcache_runtime::process_settings(struct rspamd_task *task, const symcache &cac disable_symbol(task, cache, sym); }); + /* Update required limit */ + lim = rspamd_task_get_required_score(task, task->result); + return false; } @@ -317,6 +320,7 @@ symcache_runtime::process_pre_postfilters(struct rspamd_task *task, { auto saved_priority = std::numeric_limits<int>::min(); auto all_done = true; + auto log_func = RSPAMD_LOG_FUNC; auto compare_functor = +[](int a, int b) { return a < b; }; auto proc_func = [&](cache_item *item) { @@ -328,8 +332,9 @@ symcache_runtime::process_pre_postfilters(struct rspamd_task *task, if (stage != RSPAMD_TASK_STAGE_IDEMPOTENT && !(item->flags & SYMBOL_TYPE_IGNORE_PASSTHROUGH)) { if (check_metric_limit(task)) { - msg_info_task("task has already the result being set, ignore further checks"); - return false; + msg_info_task_lambda("task has already the result being set, ignore further checks"); + + return true; } } |