diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-08 16:21:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-08 16:21:15 +0300 |
commit | 9521739bb14ee44722a44f13ca60251a09dfba11 (patch) | |
tree | 7f7cd28cf1917c28d0eb7362ab19db8af219b639 /protocols/JabberG | |
parent | cc2bb65abaeaec5c30ca96123811247abd5a3ef1 (diff) |
fixes #1910 (Jabber: Service Discovery doesn't work on OpenFire)
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_disco.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index c7d12a37b8..30d9ea5519 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -187,7 +187,7 @@ void CJabberProto::OnIqResultServiceDiscoveryRootInfo(const TiXmlElement *iqNode if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
for (auto *feature : TiXmlFilter(XmlFirstChild(iqNode, "query"), "feature")) {
if (!mir_strcmp(XmlGetAttr(feature, "var"), (char*)pInfo->m_pUserData)) {
- CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttr(iqNode, "node"), nullptr);
+ CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttr(iqNode, "node"));
SendBothRequests(pNode);
break;
}
@@ -334,7 +334,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) if (m_lstTransports.getIndex(item->jid) == -1)
m_lstTransports.insert(mir_strdup(item->jid));
- CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(item->jid, nullptr, nullptr);
+ CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(item->jid);
SendBothRequests(pNode);
}
}
@@ -374,7 +374,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) }
}
else {
- CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(T2Utf(szJid), T2Utf(szNode), nullptr);
+ CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(T2Utf(szJid), szNode[0] == 0 ? nullptr : T2Utf(szNode));
SendBothRequests(pNode);
}
lck.unlock();
diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h index 4edb47c5ae..7f8c6108d0 100644 --- a/protocols/JabberG/src/jabber_disco.h +++ b/protocols/JabberG/src/jabber_disco.h @@ -424,7 +424,7 @@ public: return m_pPrimaryNodes;
}
- CJabberSDNode* AddPrimaryNode(const char *szJid, const char *szNode, const char *szName)
+ CJabberSDNode* AddPrimaryNode(const char *szJid, const char *szNode = nullptr, const char *szName = nullptr)
{
if (!szJid)
return nullptr;
|