summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/MSN/src/msn_proto.cpp
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff)
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_proto.cpp')
-rw-r--r--protocols/MSN/src/msn_proto.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 5a2036a115..acf07cc3a4 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -295,16 +295,13 @@ int __cdecl CMsnProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
db_get_static(hContact, m_szModuleName, "e-mail", email, sizeof(email)))
return 1;
- char* szMsg = mir_utf8encodeT(szMessage);
-
int netId = strncmp(email, "tel:", 4) == 0 ? NETID_MOB : (strncmp(email, "live:", 5) == 0 ? NETID_SKYPE : NETID_MSN);
- if (MSN_AddUser(hContact, email, netId, LIST_FL, szMsg)) {
+ if (MSN_AddUser(hContact, email, netId, LIST_FL, T2Utf(szMessage))) {
MSN_AddUser(hContact, email, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_BL + LIST_REMOVE);
MSN_AddUser(hContact, email, netId, LIST_AL);
}
MSN_SetContactDb(hContact, email);
- mir_free(szMsg);
if (MSN_IsMeByContact(hContact)) displayEmailCount(hContact);
return 0;
@@ -400,7 +397,7 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const TCHAR*)
void __cdecl CMsnProto::MsnSearchAckThread(void* arg)
{
const TCHAR* emailT = (TCHAR*)arg;
- char *email = mir_utf8encodeT(emailT);
+ T2Utf email(emailT);
if (Lists_IsInList(LIST_FL, email)) {
MSN_ShowPopup(emailT, TranslateT("Contact already in your contact list"), MSN_ALLOW_MSGBOX, NULL);
@@ -442,7 +439,6 @@ void __cdecl CMsnProto::MsnSearchAckThread(void* arg)
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
break;
}
- mir_free(email);
mir_free(arg);
}