summaryrefslogtreecommitdiffstats
path: root/src/cfg_xml.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-16 19:32:39 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-16 19:32:39 +0300
commit0c53751a9afce121ec5da230d942e722b6f8f460 (patch)
treef6a88336e17f69103be4f2ec3414cd93d11277e0 /src/cfg_xml.c
parent20b47b683bc310a47cb19833573d22043ca70ef2 (diff)
downloadrspamd-0c53751a9afce121ec5da230d942e722b6f8f460.tar.gz
rspamd-0c53751a9afce121ec5da230d942e722b6f8f460.zip
* Add ability to define composites from lua. [1]
Write to log when lua values override xml ones. [1] [1] Suggested by Victor Ustugov
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r--src/cfg_xml.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index aa91bfda0..c1d0be95d 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -906,6 +906,11 @@ handle_lua (struct config_file *cfg, struct rspamd_xml_userdata *ctx, GHashTable
lua_newtable (L);
lua_setglobal (L, "metrics");
}
+ lua_getglobal (L, "composites");
+ if (lua_isnil (L, -1)) {
+ lua_newtable (L);
+ lua_setglobal (L, "composites");
+ }
/* Now config tables can be used for configuring rspamd */
/* First check "src" attribute */
if (attrs != NULL && (val = g_hash_table_lookup (attrs, "src")) != NULL) {