- cleaning up upnp code

This commit is contained in:
Christophe Dumez 2007-03-29 13:31:10 +00:00
parent fa2815df49
commit 3ea7685405
2 changed files with 4 additions and 15 deletions

View file

@ -296,7 +296,7 @@ const std::string CUPnPLib::Element_GetAttributeByTag(
{
IXML_NamedNodeMap *NamedNodeMap = ixmlNode_getAttributes(
REINTERPRET_CAST(IXML_Node *)(element));
IXML_Node *attribute = m_ixmlNamedNodeMap_getNamedItem(NamedNodeMap, tag);
IXML_Node *attribute = ixmlNamedNodeMap_getNamedItem(NamedNodeMap, (char*)tag);
const DOMString s = ixmlNode_getNodeValue(attribute);
std::string ret;
if (s) {
@ -656,8 +656,8 @@ bool CUPnPService::Execute(
if (ret != UPNP_E_SUCCESS) {
m_upnpLib.processUPnPErrorMessage(
"m_UpnpSendAction", ret, NULL, RespDoc);
m_upnpLib.m_ixmlDocument_free(ActionDoc);
m_upnpLib.m_ixmlDocument_free(RespDoc);
ixmlDocument_free(ActionDoc);
ixmlDocument_free(RespDoc);
return false;
}
ixmlDocument_free(ActionDoc);
@ -1175,7 +1175,7 @@ upnpDiscovery:
d_event->Location, d_event->Expires);
}
// Free the XML doc tree
upnpCP->m_upnpLib.m_ixmlDocument_free(doc);
ixmlDocument_free(doc);
}
break;
}

View file

@ -147,17 +147,6 @@ public:
const std::string Element_GetAttributeByTag(
IXML_Element *element,
const DOMString tag) const;
// ixml api
IXML_Node *(*m_ixmlNode_getFirstChild)(IXML_Node *nodeptr);
IXML_Node *(*m_ixmlNode_getNextSibling)(IXML_Node *nodeptr);
const DOMString (*m_ixmlNode_getNodeName)(IXML_Node *nodeptr);
const DOMString (*m_ixmlNode_getNodeValue)(IXML_Node *nodeptr);
IXML_NamedNodeMap *(*m_ixmlNode_getAttributes)(IXML_Node *nodeptr);
void (*m_ixmlDocument_free)(IXML_Document *doc);
IXML_Node *(*m_ixmlNamedNodeMap_getNamedItem)(
IXML_NamedNodeMap *nnMap, const DOMString name);
void (*m_ixmlNamedNodeMap_free)(IXML_NamedNodeMap *nnMap);
};