Browse Source

- cleaning up upnp code

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
3ea7685405
  1. 8
      src/UPnP.cpp
  2. 11
      src/UPnP.h

8
src/UPnP.cpp

@ -296,7 +296,7 @@ const std::string CUPnPLib::Element_GetAttributeByTag( @@ -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( @@ -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: @@ -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;
}

11
src/UPnP.h

@ -147,17 +147,6 @@ public: @@ -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);
};

Loading…
Cancel
Save