]> source.dussan.org Git - rspamd.git/commitdiff
Be more informative about lua errors.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Nov 2014 17:36:03 +0000 (17:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Nov 2014 17:36:03 +0000 (17:36 +0000)
src/plugins/regexp.c

index f22a1503fbe4c7b35e376b18b5ccaeee43429b4e..d1f456a9f183ff1161871fb354865edd11b80c88 100644 (file)
@@ -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);
                        }
                }