aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-18 16:53:03 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-18 16:53:03 +0300
commit3527f0ec06ab68cc3faefe16f698bc04820d6948 (patch)
tree0f8e3f679cb732910a8b727742c49430ac482607 /src/lua
parent8227c09f9486642cd2792e760fe4659e25e05876 (diff)
downloadrspamd-3527f0ec06ab68cc3faefe16f698bc04820d6948.tar.gz
rspamd-3527f0ec06ab68cc3faefe16f698bc04820d6948.zip
* Add function regexp_occurs_number that allows to test how much occurs of regexp can be found in a message
Fix composites logic. [1] Fix composites registration from lua. [1] Reported by: Victor Ustugov [1]
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_cfg_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c
index 8c44ab809..8a3bc07aa 100644
--- a/src/lua/lua_cfg_file.c
+++ b/src/lua/lua_cfg_file.c
@@ -310,8 +310,8 @@ lua_post_load_config (struct config_file *cfg)
if (name != NULL && lua_isstring (L, -1)) {
val = lua_tostring (L, -1);
sym = memory_pool_strdup(cfg->cfg_pool, name);
- if ((expr = parse_expression (cfg->cfg_pool, sym)) == NULL) {
- msg_err ("cannot parse composite expression: %s", sym);
+ if ((expr = parse_expression (cfg->cfg_pool, memory_pool_strdup(cfg->cfg_pool, val))) == NULL) {
+ msg_err ("cannot parse composite expression: %s", val);
continue;
}
/* Now check hash table for this composite */