summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-28 14:09:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-28 14:09:37 +0300
commit457d7cc7cd21de3000e0a58e4a2e4c278f6032b8 (patch)
treefacd9d723f2898aa17ee792492aa88d751538c08 /protocols
parent08932ac81d01d7673029c8ed64791e4e985e019d (diff)
Jabber: fix for chinese in error handler
Diffstat (limited to 'protocols')
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index be1d8e9671..1b3d83c291 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -802,14 +802,14 @@ void CJabberProto::OnProcessError(const TiXmlElement *node, ThreadData *info)
return;
bool skipMsg = false;
- CMStringW buff;
+ CMStringA buff;
for (auto *n : TiXmlEnum(node)) {
const char *name = n->Name();
const char *desc = n->GetText();
if (desc)
- buff.AppendFormat(L"%s: %s\r\n", name, desc);
+ buff.AppendFormat("%s: %s\r\n", name, desc);
else
- buff.AppendFormat(L"%s\r\n", name);
+ buff.AppendFormat("%s\r\n", name);
if (!mir_strcmp(name, "conflict"))
ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_OTHERLOCATION);
@@ -818,7 +818,7 @@ void CJabberProto::OnProcessError(const TiXmlElement *node, ThreadData *info)
}
}
if (!skipMsg)
- MsgPopup(0, buff, TranslateT("Jabber Error"));
+ MsgPopup(0, Utf2T(buff), TranslateT("Jabber Error"));
if (m_bEnableStreamMgmt) //TODO: check if needed/work here
m_StrmMgmt.SendAck();
@@ -1091,7 +1091,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info)
|| !(message = XmlFirstChild(forwarded, "message")))
return;
- //Unwrap the carbon in any case
+ // Unwrap the carbon in any case
node = message;
type = XmlGetAttr(node, "type");
@@ -1883,7 +1883,7 @@ void CJabberProto::OnProcessIq(const TiXmlElement *node)
auto *pFirstChild = XmlFirstChild(node);
if (pFirstChild)
- iq.InsertEndChild((TiXmlElement*)pFirstChild);
+ iq.InsertEndChild(pFirstChild->DeepClone(&iq)->ToElement());
iq << XCHILD("error") << XATTR("type", "cancel")
<< XCHILDNS("service-unavailable", "urn:ietf:params:xml:ns:xmpp-stanzas");