summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-07 21:22:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-07 21:22:34 +0100
commite9418b12ff5cab4c366af3751906f5e95ba3df7a (patch)
treef83defcc32c8d172d536986d92df9a00a25a9227 /src/lua
parente7c1a6a9a153a5832fd7748927961949b63728cb (diff)
downloadrspamd-e9418b12ff5cab4c366af3751906f5e95ba3df7a.tar.gz
rspamd-e9418b12ff5cab4c366af3751906f5e95ba3df7a.zip
[Project] Rework scan result functions to support shadow results
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index ce15813ac..2d6257443 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1986,7 +1986,7 @@ lua_task_adjust_result (lua_State * L)
metric_res = task->result;
if (metric_res) {
- s = rspamd_task_find_symbol_result (task, symbol_name);
+ s = rspamd_task_find_symbol_result (task, symbol_name, NULL);
}
else {
return luaL_error (L, "no metric result");
@@ -4383,7 +4383,7 @@ lua_push_symbol_result (lua_State *L,
metric_res = task->result;
if (metric_res) {
- s = rspamd_task_find_symbol_result (task, symbol);
+ s = rspamd_task_find_symbol_result (task, symbol, NULL);
}
}
else {
@@ -4493,7 +4493,7 @@ lua_task_has_symbol (lua_State *L)
symbol = luaL_checkstring (L, 2);
if (task && symbol) {
- found = (rspamd_task_find_symbol_result (task, symbol) != NULL);
+ found = (rspamd_task_find_symbol_result (task, symbol, NULL) != NULL);
lua_pushboolean (L, found);
}
else {
@@ -4724,7 +4724,7 @@ tokens_foreach_cb (struct rspamd_symcache_item *item, gpointer ud)
return;
}
- if ((s = rspamd_task_find_symbol_result (cbd->task, sym)) != NULL) {
+ if ((s = rspamd_task_find_symbol_result (cbd->task, sym, NULL)) != NULL) {
if (s->flags & RSPAMD_SYMBOL_RESULT_IGNORED) {
lua_pushnumber (cbd->L, 0.0);
}
@@ -4801,7 +4801,7 @@ lua_task_process_ann_tokens (lua_State *L)
*
* That would lead to N_results lookups which is usually MUCH smaller
*/
- sres = rspamd_task_find_symbol_result (task, sym);
+ sres = rspamd_task_find_symbol_result (task, sym, NULL);
if (sres && !(sres->flags & RSPAMD_SYMBOL_RESULT_IGNORED)) {