diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-21 17:55:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-21 17:55:32 +0300 |
commit | 6071fb87a02cd13fd68671086194a5757204f70d (patch) | |
tree | 844c880927a7acbf3f26a8baa4515aa778bd0cb6 /protocols/JabberG/src/jabber_message_handlers.cpp | |
parent | 4dd0f6f3dbd938c48c9eee40bcb4b4b6943f9810 (diff) |
old crutch removed: error messages to go in Unicode
Diffstat (limited to 'protocols/JabberG/src/jabber_message_handlers.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_message_handlers.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_message_handlers.cpp b/protocols/JabberG/src/jabber_message_handlers.cpp index c8732e273b..d9f7c0fd9f 100644 --- a/protocols/JabberG/src/jabber_message_handlers.cpp +++ b/protocols/JabberG/src/jabber_message_handlers.cpp @@ -34,12 +34,9 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI if (item == nullptr)
item = ListGetItemPtr(LIST_CHATROOM, pInfo->GetFrom());
if (item != nullptr) { // yes, it is
- wchar_t *szErrText = JabberErrorMsg(pInfo->GetChildNode());
- if (id != -1) {
- char *errText = mir_u2a(szErrText);
- ProtoBroadcastAck(pInfo->GetHContact(), ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)id, (LPARAM)errText);
- mir_free(errText);
- }
+ ptrW szErrText(JabberErrorMsg(pInfo->GetChildNode()));
+ if (id != -1)
+ ProtoBroadcastAck(pInfo->GetHContact(), ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)id, szErrText);
else {
wchar_t buf[512];
HXML bodyNode = XmlGetChild(node, "body");
@@ -50,7 +47,6 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI MsgPopup(0, buf, TranslateT("Jabber Error"));
}
- mir_free(szErrText);
}
return TRUE;
}
|