aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-12 15:08:14 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-12 15:08:14 +0000
commit969546a4e5c9c0c17cabf6063cfcb49e19d43974 (patch)
tree63628cedbcc0099398b8c864622b84d3ca3d3324 /src
parenta3a33300be3ea27727f527c63b8deca678f68a77 (diff)
downloadrspamd-969546a4e5c9c0c17cabf6063cfcb49e19d43974.tar.gz
rspamd-969546a4e5c9c0c17cabf6063cfcb49e19d43974.zip
Fix <param> elements in xml config.
Diffstat (limited to 'src')
-rw-r--r--src/cfg_xml.c8
1 files 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;
}
}