From: Vsevolod Stakhov Date: Mon, 11 Nov 2013 12:56:45 +0000 (+0000) Subject: Fix xml parsing for param tags. X-Git-Tag: 0.6.0~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a3a33300be3ea27727f527c63b8deca678f68a77;p=rspamd.git Fix xml parsing for param tags. --- 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; } }