summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-14 14:01:19 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-14 14:01:29 +0300
commit10d0ba293418ce0b3452396f2a82b735ceb7ba26 (patch)
tree8ea28d2799fe4587c2db9b97e6050254d59d42b5 /protocols/JabberG/src
parent5bed820b5e10082b9437aaecab79ad6b0740ff48 (diff)
another crazy piece of code removed
Diffstat (limited to 'protocols/JabberG/src')
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index bf1979cb11..bebc647c12 100755
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -239,30 +239,11 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const wchar_t *jid, bool app
wchar_t *token = wcstok(caps, L" ");
while (token) {
- switch (jcbExtCaps = m_clientCapsManager.GetClientCaps(pCaps->GetNode(), token)) {
- case JABBER_RESOURCE_CAPS_ERROR:
- break;
-
- case JABBER_RESOURCE_CAPS_UNINIT:
- {
- // send disco#info query
-
- CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE);
- pInfo->SetTimeout(JABBER_RESOURCE_CAPS_QUERY_TIMEOUT);
- m_clientCapsManager.SetClientCaps(pCaps->GetNode(), pCaps->GetHash(), token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
-
- m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", CMStringW(FORMAT, L"%s#%s", pCaps->GetNode(), token)));
-
- bRequestSent = TRUE;
+ for (int i = 0; i < _countof(g_JabberFeatCapPairsExt); i++) {
+ if (!mir_wstrcmp(g_JabberFeatCapPairsExt[i].szFeature, token)) {
+ jcbCaps |= g_JabberFeatCapPairsExt[i].jcbCap;
+ break;
}
- break;
-
- case JABBER_RESOURCE_CAPS_IN_PROGRESS:
- bRequestSent = TRUE;
- break;
-
- default:
- jcbCaps |= jcbExtCaps;
}
token = wcstok(NULL, L" ");