diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-19 15:21:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:24:17 +0300 |
commit | fc8f2a3b692878aa581bf3fcd5c1c3c2295bbcb5 (patch) | |
tree | 17ed9d45de9d7f293578150081b5e7e4617290eb /protocols/JabberG/src/jabber_opt.cpp | |
parent | c9e483e0fb1566d210530339d13a0e6e91260200 (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-x | protocols/JabberG/src/jabber_opt.cpp | 8 |
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;
}
}
|