From: Vsevolod Stakhov Date: Tue, 31 Mar 2009 08:58:38 +0000 (+0400) Subject: * Fix error in regexp processing X-Git-Tag: 0.2.7~207 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7408d6fd0fc4652ffbc0fa8b13cabf455f8ed0c1;p=rspamd.git * Fix error in regexp processing --- diff --git a/src/cfg_file.l b/src/cfg_file.l index 8d347409f..d0efa5c2f 100644 --- a/src/cfg_file.l +++ b/src/cfg_file.l @@ -161,7 +161,7 @@ yes|YES|no|NO|[yY]|[nN] yylval.flag=parse_flag(yytext); return FLAG; [ \t]+ /* ignore whitespace */; [ \t]*#.* /* ignore comments */; ^.endlua$ BEGIN(INITIAL); -.* add_luabuf(yytext); +.* add_luabuf(yytext); return LUACODE; %% /* diff --git a/src/cfg_file.y b/src/cfg_file.y index 92b695d55..8517878ae 100644 --- a/src/cfg_file.y +++ b/src/cfg_file.y @@ -48,7 +48,7 @@ struct statfile_section *cur_section = NULL; %token LOGGING LOG_TYPE LOG_TYPE_CONSOLE LOG_TYPE_SYSLOG LOG_TYPE_FILE %token LOG_LEVEL LOG_LEVEL_DEBUG LOG_LEVEL_INFO LOG_LEVEL_WARNING LOG_LEVEL_ERROR LOG_FACILITY LOG_FILENAME %token STATFILE ALIAS PATTERN WEIGHT STATFILE_POOL_SIZE SIZE TOKENIZER CLASSIFIER -%token DELIVERY LMTP ENABLED AGENT SECTION +%token DELIVERY LMTP ENABLED AGENT SECTION LUACODE %type STRING %type VARIABLE @@ -92,6 +92,7 @@ command : | statfile_pool_size | lmtp | delivery + | luacode ; tempdir : @@ -830,6 +831,10 @@ deliveryagent: } ; +luacode: + LUACODE + ; + %% /* * vi:ts=4 diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 3b3328f3e..6f6efd4be 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -423,7 +423,7 @@ rspamd_regexp_match_number (struct worker_task *task, GList *args) } res += process_regexp (re, task); } - cur = g_list_next (args); + cur = g_list_next (cur); } return res >= param_count;