From a3a33300be3ea27727f527c63b8deca678f68a77 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 11 Nov 2013 12:56:45 +0000 Subject: [PATCH] Fix xml parsing for param tags. --- src/cfg_xml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cfg_xml.c b/src/cfg_xml.c index b8b75b715..9c60d8a7f 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -784,8 +784,11 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam if (extract_attr ("value", attribute_names, attribute_values, &res)) { element_name = res; } + else if (extract_attr ("name", attribute_names, attribute_values, &res)) { + element_name = res; + } else { - *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "param 'value' is required for tag 'param'"); + *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "attribute 'value' or 'name' are required for tag 'param'"); ud->state = XML_ERROR; } } -- 2.39.5