Fix return value of config_description_doc.

UPNP_E_XXX should not be used instead of IXML_XXX
This commit is contained in:
Peng 2013-09-04 16:00:16 +08:00 committed by Marcelo Roberto Jimenez
parent f6a3102b48
commit 72c29ef1f6
2 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,12 @@
Version 1.6.19 Version 1.6.19
******************************************************************************* *******************************************************************************
2013-09-03 Peng <howtofly(at)gmail.com>
Fix return value of config_description_doc.
UPNP_E_XXX should not be used instead of IXML_XXX
2013-09-03 Peng <howtofly(at)gmail.com> 2013-09-03 Peng <howtofly(at)gmail.com>
Remove faulty free in GetDescDocumentAndURL. Remove faulty free in GetDescDocumentAndURL.

View File

@ -267,6 +267,7 @@ static int config_description_doc(
err_code = err_code =
ixmlNode_appendChild(rootNode, (IXML_Node *) element); ixmlNode_appendChild(rootNode, (IXML_Node *) element);
if (err_code != IXML_SUCCESS) { if (err_code != IXML_SUCCESS) {
err_code = UPNP_E_INVALID_DESC;
goto error_handler; goto error_handler;
} }
textNode = textNode =
@ -277,6 +278,7 @@ static int config_description_doc(
err_code = err_code =
ixmlNode_appendChild((IXML_Node *) element, textNode); ixmlNode_appendChild((IXML_Node *) element, textNode);
if (err_code != IXML_SUCCESS) { if (err_code != IXML_SUCCESS) {
err_code = UPNP_E_INTERNAL_ERROR;
goto error_handler; goto error_handler;
} }
} else { } else {
@ -327,6 +329,7 @@ static int config_description_doc(
} }
err_code = ixmlNode_setNodeValue(textNode, url_str.buf); err_code = ixmlNode_setNodeValue(textNode, url_str.buf);
if (err_code != IXML_SUCCESS) { if (err_code != IXML_SUCCESS) {
err_code = UPNP_E_OUTOF_MEMORY;
goto error_handler; goto error_handler;
} }
} }