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;
}
}
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);