aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-25 20:33:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-25 20:33:33 +0100
commit967ee15c9ac05fc51f3cad370f18211947896968 (patch)
tree70c6e46450ef23bc06281a975296dde9d84daca9
parent12a5da8807e162197108bce4c0cc5d9a6b4703e5 (diff)
downloadrspamd-967ee15c9ac05fc51f3cad370f18211947896968.tar.gz
rspamd-967ee15c9ac05fc51f3cad370f18211947896968.zip
[Minor] Improve dependencies logging
-rw-r--r--src/libserver/rspamd_symcache.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 169b13e94..f452c1344 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -601,7 +601,10 @@ rspamd_symcache_process_dep (struct rspamd_symcache *cache,
gboolean ok_dep = FALSE;
if (it->is_filter) {
- if (dit->type & SYMBOL_TYPE_PREFILTER) {
+ if (dit->is_filter) {
+ ok_dep = TRUE;
+ }
+ else if (dit->type & SYMBOL_TYPE_PREFILTER) {
ok_dep = TRUE;
}
}
@@ -683,14 +686,20 @@ rspamd_symcache_post_init (struct rspamd_symcache *cache)
it = rspamd_symcache_find_filter (cache, ddep->from, true);
if (it == NULL) {
- msg_err_cache ("cannot register delayed dependency between %s and %s, "
+ msg_err_cache ("cannot register delayed dependency between %s and %s: "
"%s is missing", ddep->from, ddep->to, ddep->from);
}
else {
- msg_debug_cache ("delayed between %s(%d:%d) -> %s", ddep->from,
- it->id, vit->id, ddep->to);
- rspamd_symcache_add_dependency (cache, it->id, ddep->to, vit != it ?
- vit->id : -1);
+ if (it->type & (SYMBOL_TYPE_POSTFILTER|SYMBOL_TYPE_IDEMPOTENT|SYMBOL_TYPE_COMPOSITE)) {
+ msg_err_cache ("cannot register delayed dependency between %s and %s: "
+ "%s is a postfilter", ddep->from, ddep->to, ddep->from);
+ }
+ else {
+ msg_debug_cache ("delayed between %s(%d:%d) -> %s", ddep->from,
+ it->id, vit->id, ddep->to);
+ rspamd_symcache_add_dependency (cache, it->id, ddep->to, vit != it ?
+ vit->id : -1);
+ }
}
cur = g_list_next (cur);