aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-07 22:09:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-07 22:09:18 +0000
commit99f005462db70fd1d07d1cac838a2f5804790734 (patch)
treedf6755034caeb73f46c4a8fc0f42fc973784e3cd /src
parent5f0b3e44efaae6f8c3c2101b5cbde333f129933c (diff)
downloadrspamd-99f005462db70fd1d07d1cac838a2f5804790734.tar.gz
rspamd-99f005462db70fd1d07d1cac838a2f5804790734.zip
Comvert composites to UCL properly.
Diffstat (limited to 'src')
-rw-r--r--src/cfg_xml.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index 47ab8aca3..e301696d3 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -921,6 +921,16 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam
ud->parent_pointer[0] = obj;
ud->nested ++;
}
+ else if (g_ascii_strcasecmp (element_name, "composite") == 0) {
+ /* Composite is 'special' tag */
+ obj = ucl_object_new ();
+ obj->type = UCL_OBJECT;
+ ud->parent_pointer[0] = obj;
+ ud->cfg->rcl_obj = ucl_object_insert_key (ud->cfg->rcl_obj, obj, element_name, 0, true);
+ process_attrs (attribute_names, attribute_values, obj);
+ ud->nested ++;
+ rspamd_strlcpy (ud->section_name[ud->nested], "expression", MAX_NAME);
+ }
else if (g_ascii_strcasecmp (element_name, "module") == 0 &&
extract_attr ("name", attribute_names, attribute_values, &res)) {
obj = ucl_object_new ();