From 969546a4e5c9c0c17cabf6063cfcb49e19d43974 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 12 Nov 2013 15:08:14 +0000 Subject: [PATCH] Fix elements in xml config. --- src/cfg_xml.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cfg_xml.c b/src/cfg_xml.c index 9c60d8a7f..c183e6209 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -876,13 +876,17 @@ rspamd_xml_end_element (GMarkupParseContext *context, const gchar *element_name, if (g_ascii_strcasecmp (ud->section_name[ud->nested - 1], element_name) == 0) { ud->nested --; } + else if (g_ascii_strcasecmp (element_name, "param") == 0) { + /* Another ugly hack */ + ud->nested --; + } else if (g_ascii_strcasecmp (ud->section_name[ud->nested], element_name) != 0) { - *error = g_error_new (xml_error_quark (), XML_EXTRA_ELEMENT, "element %s is umatched", element_name); + *error = g_error_new (xml_error_quark (), XML_EXTRA_ELEMENT, "element %s is unmatched", element_name); ud->state = XML_ERROR; } } else if (g_ascii_strcasecmp ("rspamd", element_name) != 0) { - *error = g_error_new (xml_error_quark (), XML_EXTRA_ELEMENT, "element %s is umatched on the top level", element_name); + *error = g_error_new (xml_error_quark (), XML_EXTRA_ELEMENT, "element %s is unmatched on the top level", element_name); ud->state = XML_ERROR; } } -- 2.39.5