summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-26 15:19:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-26 15:19:44 +0000
commit324b246fb23cd518bdd1907985c695b8fc4f28d2 (patch)
treeb41cb8a3e91484e1677f11e1a0693075cb8382f5 /protocols/JabberG/src/jabber_thread.cpp
parent65cc377f4b4161dee01c43e0430ff7b236874839 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 4c2495fbfe..64428e6671 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -169,7 +169,7 @@ void ThreadData::xmpp_client_query(void)
dnsList.insert(&rec->Data.Srv);
}
- for (int i = 0; i < dnsList.getCount(); i++) {
+ for (int i=0; i < dnsList.getCount(); i++) {
WORD dnsPort = port == 0 || port == 5222 ? dnsList[i]->wPort : port;
char* dnsHost = dnsList[i]->pNameTarget;
@@ -1258,18 +1258,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info)
}
// parsing extensions
- for (int i = 0; (xNode = xmlGetChild(node, i)) != NULL; i++) {
- xNode = xmlGetNthChild(node, _T("x"), i + 1);
- if (xNode == NULL) {
- xNode = xmlGetNthChild(node, _T("user:x"), i + 1);
- if (xNode == NULL)
- continue;
- }
+ for (int i=0; (xNode = xmlGetChild(node, i)) != NULL; i++) {
+ if ((xNode = xmlGetNthChild(node, _T("x"), i+1)) == NULL)
+ continue;
const TCHAR *ptszXmlns = xmlGetAttrValue(xNode, _T("xmlns"));
if (ptszXmlns == NULL)
- ptszXmlns = xmlGetAttrValue(xNode, _T("xmlns:user"));
- if (ptszXmlns == NULL)
continue;
if ( !_tcscmp(ptszXmlns, JABBER_FEAT_MIRANDA_NOTES)) {
@@ -1481,8 +1475,7 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node)
// check XEP-0115 support, and old style:
if ((n = xmlGetChildByTag(node, "c", "xmlns", JABBER_FEAT_ENTITY_CAPS)) != NULL ||
- (n = xmlGetChildByTag(node, "caps:c", "xmlns:caps", JABBER_FEAT_ENTITY_CAPS)) != NULL ||
- (n = xmlGetChild(node, "c")) != NULL) {
+ (n = xmlGetChild(node, "c")) != NULL) {
const TCHAR *szNode = xmlGetAttrValue(n, _T("node"));
const TCHAR *szVer = xmlGetAttrValue(n, _T("ver"));
const TCHAR *szExt = xmlGetAttrValue(n, _T("ext"));
@@ -1523,7 +1516,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid)
// Determine status to show for the contact based on the remaining resources
int nSelectedResource = -1, i = 0;
int nMaxPriority = -999; // -128...+127 valid range
- for (i = 0; i < item->arResources.getCount(); i++) {
+ for (i=0; i < item->arResources.getCount(); i++) {
pResourceStatus r(item->arResources[i]);
if (r->m_iPriority > nMaxPriority) {
nMaxPriority = r->m_iPriority;