]> source.dussan.org Git - rspamd.git/commitdiff
Insert modules to rcl object properly.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 27 Oct 2013 21:49:32 +0000 (21:49 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 27 Oct 2013 21:49:32 +0000 (21:49 +0000)
src/cfg_xml.c

index 7c019acffd2afff034bfb9a44973f77dfd17142c..ead80e4df8c007f3db2c1b7e68b69be2c6d7d241 100644 (file)
@@ -920,6 +920,14 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam
                                        ud->parent_pointer[0] = obj;
                                        ud->nested ++;
                                }
+                               else if (g_ascii_strcasecmp (element_name, "module") == 0 &&
+                                               extract_attr ("name", attribute_names, attribute_values, &res)) {
+                                       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, res, 0, true);
+                                       ud->nested ++;
+                               }
                                else {
                                        obj = ucl_object_new ();
                                        obj->type = UCL_OBJECT;