summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-19 15:21:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-19 19:24:17 +0300
commitfc8f2a3b692878aa581bf3fcd5c1c3c2295bbcb5 (patch)
tree17ed9d45de9d7f293578150081b5e7e4617290eb /protocols/JabberG/src/jabber_opt.cpp
parentc9e483e0fb1566d210530339d13a0e6e91260200 (diff)
Jabber:
- XmlGetChildText / XmlGetChildInt - new handy helpers for tinyxml2; - Unicode logging replaced with ANSI when appropriate; - JabberErrorMsg rewritten to be more useful
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 05fddd6d2f..598f4c7867 100755
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -1006,8 +1006,8 @@ void CJabberProto::_RosterHandleGetRequest(const TiXmlElement *node, CJabberIqIn
const char *name = item->Attribute("name");
const char *subscription = item->Attribute("subscription");
- auto *group = item->FirstChildElement("group");
- _RosterInsertListItem(hList, jid, name, (group) ? group->GetText() : 0, subscription, TRUE);
+ const char *group = XmlGetChildText(item, "group");
+ _RosterInsertListItem(hList, jid, name, group, subscription, TRUE);
}
// now it is require to process whole contact list to add not in roster contacts
@@ -1080,8 +1080,8 @@ void CJabberProto::_RosterHandleGetRequest(const TiXmlElement *node, CJabberIqIn
bPushed = TRUE;
}
if (!bPushed) {
- auto *rosterGroup = itemRoster->FirstChildElement("group");
- if ((rosterGroup != nullptr || group[0] != 0) && mir_strcmpi(rosterGroup->GetText(), szGroup))
+ auto *rosterGroup = XmlGetChildText(itemRoster, "group");
+ if (rosterGroup != nullptr && mir_strcmpi(rosterGroup, szGroup))
bPushed = TRUE;
}
}