aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-31 12:58:38 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-31 12:58:38 +0400
commit7408d6fd0fc4652ffbc0fa8b13cabf455f8ed0c1 (patch)
tree9304ffece761ce0a6e9561dcd3480b783d402859
parented1438755d0d0399a06ba3824f5839ae287bbf69 (diff)
downloadrspamd-7408d6fd0fc4652ffbc0fa8b13cabf455f8ed0c1.tar.gz
rspamd-7408d6fd0fc4652ffbc0fa8b13cabf455f8ed0c1.zip
* Fix error in regexp processing
-rw-r--r--src/cfg_file.l2
-rw-r--r--src/cfg_file.y7
-rw-r--r--src/plugins/regexp.c2
3 files changed, 8 insertions, 3 deletions
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;
<lua>[ \t]+ /* ignore whitespace */;
<lua>[ \t]*#.* /* ignore comments */;
<lua>^.endlua$ BEGIN(INITIAL);
-<lua>.* add_luabuf(yytext);
+<lua>.* 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> 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
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;