aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-11 17:36:03 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-11 17:36:03 +0000
commit45fb7d18cac903e5950261113c0c3e4c2624a9df (patch)
tree3a1ed3b93cc41b88dbe08a69bdc841536104384b
parentf15cf65c6ae417e7744492b3e3961749637b123d (diff)
downloadrspamd-45fb7d18cac903e5950261113c0c3e4c2624a9df.tar.gz
rspamd-45fb7d18cac903e5950261113c0c3e4c2624a9df.zip
Be more informative about lua errors.
-rw-r--r--src/plugins/regexp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index f22a1503f..d1f456a9f 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -1081,8 +1081,12 @@ process_regexp_item (struct rspamd_task *task, void *user_data)
/* Non-threaded version */
if (item->lua_function) {
/* Just call function */
- if (rspamd_lua_call_expression_func (item->lua_function, task, NULL,
- &res) && res) {
+ res = FALSE;
+ if (!rspamd_lua_call_expression_func (item->lua_function, task, NULL,
+ &res)) {
+ msg_err ("error occurred when checking symbol %s", item->symbol);
+ }
+ if (res) {
rspamd_task_insert_result (task, item->symbol, 1, NULL);
}
}