]> source.dussan.org Git - rspamd.git/commitdiff
Fix lua expressions in regexp plugin.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Oct 2013 12:18:32 +0000 (13:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Oct 2013 12:18:32 +0000 (13:18 +0100)
src/plugins/regexp.c

index d097439afa768defed1bee05a7bff278b79ebf14..f3eadfa4543dc0088f706a6c6ba5b53ea6a9702c 100644 (file)
@@ -512,7 +512,6 @@ regexp_module_init (struct config_file *cfg, struct module_ctx **ctx)
 {
        regexp_module_ctx = g_malloc (sizeof (struct regexp_ctx));
 
-       regexp_module_ctx->filter = regexp_common_filter;
        regexp_module_ctx->regexp_pool = memory_pool_new (memory_pool_get_size ());
        regexp_module_ctx->dynamic_pool = NULL;
        regexp_module_ctx->autolearn_symbols = g_hash_table_new (rspamd_str_hash, rspamd_str_equal);
@@ -1308,7 +1307,7 @@ process_regexp_item (struct worker_task *task, void *user_data)
                /* Non-threaded version */
                if (item->lua_function) {
                        /* Just call function */
-                       if (lua_call_expression_func ("regexp", item->lua_function, task, NULL, &res) && res) {
+                       if (lua_call_expression_func (item->lua_function, task, NULL, &res) && res) {
                                insert_result (task, item->symbol, 1, NULL);
                        }
                }
@@ -1321,13 +1320,6 @@ process_regexp_item (struct worker_task *task, void *user_data)
        }
 }
 
-static gint
-regexp_common_filter (struct worker_task *task)
-{
-       /* XXX: remove this shit too */
-       return 0;
-}
-
 static                          gboolean
 rspamd_regexp_match_number (struct worker_task *task, GList * args, void *unused)
 {