mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-02 15:36:29 +00:00
- cleaning up upnp code
This commit is contained in:
parent
fa2815df49
commit
3ea7685405
@ -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;
|
||||
}
|
||||
|
11
src/UPnP.h
11
src/UPnP.h
@ -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…
Reference in New Issue
Block a user