aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-22 16:21:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-22 16:21:29 +0100
commit4de471ec12681ce99950e929f39a911473ceb4b6 (patch)
treede6fe8aa9a3674714b687fe803fb098a86125848 /src
parent5f2fda6652dc3c6e7cbf6c0d3ed70556e876c4cf (diff)
downloadrspamd-4de471ec12681ce99950e929f39a911473ceb4b6.tar.gz
rspamd-4de471ec12681ce99950e929f39a911473ceb4b6.zip
[Minor] More fixes to the internal modules
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dkim_check.c13
-rw-r--r--src/plugins/surbl.c6
2 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index 9475164a1..f1a67085e 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -1298,6 +1298,7 @@ dkim_sign_callback (struct rspamd_task *task,
msg_err_task ("invalid return value from sign condition: %e",
err);
g_error_free (err);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1320,6 +1321,7 @@ dkim_sign_callback (struct rspamd_task *task,
lua_settop (L, 0);
luaL_error (L, "unknown key type: %s",
key_type);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1334,6 +1336,7 @@ dkim_sign_callback (struct rspamd_task *task,
if (arc_idx == 0) {
lua_settop (L, 0);
luaL_error (L, "no arc idx specified");
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1343,12 +1346,14 @@ dkim_sign_callback (struct rspamd_task *task,
if (arc_cv == NULL) {
lua_settop (L, 0);
luaL_error (L, "no arc cv specified");
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
if (arc_idx == 0) {
lua_settop (L, 0);
luaL_error (L, "no arc idx specified");
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1357,6 +1362,7 @@ dkim_sign_callback (struct rspamd_task *task,
lua_settop (L, 0);
luaL_error (L, "unknown sign type: %s",
sign_type_str);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1389,6 +1395,7 @@ dkim_sign_callback (struct rspamd_task *task,
msg_err_task ("cannot load dkim key %s: %e",
lru_key, err);
g_error_free (err);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1413,6 +1420,7 @@ dkim_sign_callback (struct rspamd_task *task,
msg_err_task ("cannot load dkim key %s: %e",
lru_key, err);
g_error_free (err);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1432,6 +1440,7 @@ dkim_sign_callback (struct rspamd_task *task,
msg_err_task ("cannot create sign context: %e",
err);
g_error_free (err);
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -1459,9 +1468,13 @@ dkim_sign_callback (struct rspamd_task *task,
if (!sign) {
msg_debug_task ("skip signing as dkim condition callback returned"
" false");
+ rspamd_symbols_cache_finalize_item (task, item);
+
return;
}
}
+
+ rspamd_symbols_cache_finalize_item (task, item);
}
struct rspamd_dkim_lua_verify_cbdata {
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index e2bf97703..52bfe42ca 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -1910,6 +1910,8 @@ surbl_test_url (struct rspamd_task *task,
param->tree);
g_hash_table_foreach (task->urls, surbl_tree_url_callback, param);
+ rspamd_symcache_item_async_inc (task, item);
+
/* We also need to check and process img URLs */
if (suffix->options & SURBL_OPTION_CHECKIMAGES) {
for (i = 0; i < task->text_parts->len; i ++) {
@@ -1971,9 +1973,13 @@ surbl_test_redirector (struct rspamd_task *task,
struct surbl_ctx *surbl_module_ctx = surbl_get_context (task->cfg);
if (!surbl_module_ctx->use_redirector || !surbl_module_ctx->redirector_tlds) {
+ rspamd_symbols_cache_finalize_item (task, item);
+
return;
}
+ rspamd_symcache_item_async_inc (task, item);
+
param = rspamd_mempool_alloc0 (task->task_pool, sizeof (*param));
param->task = task;
param->suffix = NULL;