]> source.dussan.org Git - rspamd.git/commitdiff
* Fix error in regexp processing
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 31 Mar 2009 08:58:38 +0000 (12:58 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Tue, 31 Mar 2009 08:58:38 +0000 (12:58 +0400)
src/cfg_file.l
src/cfg_file.y
src/plugins/regexp.c

index 8d347409f477355c3aaab4520f3bd21555b9816f..d0efa5c2fd26efef1c1a076f599fdb2e0a99234d 100644 (file)
@@ -161,7 +161,7 @@ yes|YES|no|NO|[yY]|[nN]                     yylval.flag=parse_flag(yytext); return FLAG;
 <lua>[ \t]+                                                            /* ignore whitespace */;
 <lua>[ \t]*#.*                                                 /* ignore comments */;
 <lua>^.endlua$                                                 BEGIN(INITIAL);
-<lua>.*                                                                        add_luabuf(yytext);
+<lua>.*                                                                        add_luabuf(yytext); return LUACODE;
 
 %%
 /* 
index 92b695d557440009666c74bc8d08bdc84cb966fc..8517878ae47e644f4c93c4ebfd85f3eacdce3970 100644 (file)
@@ -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>        STRING
 %type  <string>        VARIABLE
@@ -92,6 +92,7 @@ command       :
        | statfile_pool_size
        | lmtp
        | delivery
+       | luacode
        ;
 
 tempdir :
@@ -830,6 +831,10 @@ deliveryagent:
        }
        ;
 
+luacode:
+       LUACODE
+       ;
+
 %%
 /* 
  * vi:ts=4 
index 3b3328f3eb54a27f03c4bbeb6b4710bf385a17a1..6f6efd4be8476fa0c8145c672f13f75a4aa2133a 100644 (file)
@@ -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;