From 490b0a5c864999b1ebc76ec3fdd6feaa7601cfdf Mon Sep 17 00:00:00 2001 From: Peng Date: Wed, 4 Sep 2013 16:00:16 +0800 Subject: [PATCH] Fix return value of config_description_doc. UPNP_E_XXX should not be used instead of IXML_XXX (cherry picked from commit 72c29ef1f6f4ba544f4a1a6d97428becca940301) --- ChangeLog | 6 ++++++ upnp/src/urlconfig/urlconfig.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4b57c12..b7e578e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -357,6 +357,12 @@ Version 1.8.0 Version 1.6.19 ******************************************************************************* +2013-09-03 Peng + + Fix return value of config_description_doc. + + UPNP_E_XXX should not be used instead of IXML_XXX + 2013-09-03 Peng Remove faulty free in GetDescDocumentAndURL. diff --git a/upnp/src/urlconfig/urlconfig.c b/upnp/src/urlconfig/urlconfig.c index 3251da6..f3cd7cd 100644 --- a/upnp/src/urlconfig/urlconfig.c +++ b/upnp/src/urlconfig/urlconfig.c @@ -267,6 +267,7 @@ static int config_description_doc( err_code = ixmlNode_appendChild(rootNode, (IXML_Node *) element); if (err_code != IXML_SUCCESS) { + err_code = UPNP_E_INVALID_DESC; goto error_handler; } textNode = @@ -277,6 +278,7 @@ static int config_description_doc( err_code = ixmlNode_appendChild((IXML_Node *) element, textNode); if (err_code != IXML_SUCCESS) { + err_code = UPNP_E_INTERNAL_ERROR; goto error_handler; } } else { @@ -327,6 +329,7 @@ static int config_description_doc( } err_code = ixmlNode_setNodeValue(textNode, url_str.buf); if (err_code != IXML_SUCCESS) { + err_code = UPNP_E_OUTOF_MEMORY; goto error_handler; } }