diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-03-18 17:20:35 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-03-18 17:20:35 +0300 |
commit | c3314fe19509cf9e237c1ae3ba9383d692f71c00 (patch) | |
tree | 39ddda15dfcd5ca3c3e3e8305cb8e2c84767c405 /src/cfg_xml.c | |
parent | 9309c11521c7a93357f1160edf9693f8b50f4441 (diff) | |
download | rspamd-c3314fe19509cf9e237c1ae3ba9383d692f71c00.tar.gz rspamd-c3314fe19509cf9e237c1ae3ba9383d692f71c00.zip |
* Add strict priority rules
* Improve and fix multimap module
* Add rspamd_config object to stage of early configure of rspamd
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r-- | src/cfg_xml.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c index 06cdab069..2bc83e109 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -974,6 +974,7 @@ handle_lua (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHashTable { gchar *val, *cur_dir, *lua_dir, *lua_file, *tmp1, *tmp2; lua_State *L = cfg->lua_state; + struct config_file **pcfg; /* First check for global variable 'config' */ lua_getglobal (L, "config"); @@ -993,6 +994,13 @@ handle_lua (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHashTable lua_newtable (L); lua_setglobal (L, "composites"); } + lua_getglobal (L, "rspamd_config"); + if (lua_isnil (L, -1)) { + pcfg = lua_newuserdata (L, sizeof (struct config_file *)); + lua_setclass (L, "rspamd{config}", -1); + *pcfg = cfg; + lua_setglobal (L, "rspamd_config"); + } /* Now config tables can be used for configuring rspamd */ /* First check "src" attribute */ if (attrs != NULL && (val = g_hash_table_lookup (attrs, "src")) != NULL) { |