summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-21 16:11:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-21 16:11:58 +0000
commit48266e479d1fcf5153b29c612866845990fccad8 (patch)
treec8cbc908cd3c5f08731e5e8d7eaac6b568007d09 /protocols/MSN/src/msn_proto.cpp
parentebdb556f152734035846f120eb8112f88ef91281 (diff)
war against atavisms continues
- everything that goes to PSS_MESSAGE should be sent as utf8 string; - thus PREF_UNICODE & PREF_UTF support discontinued, these constants are removed; - support for PREF_UNICODE & PREF_UTF in protocols also removed; - PREF_UNICODE used in file transfers (PROTOFILERECVT) replaced with PRFF_UNICODE / PRFF_TCHAR git-svn-id: http://svn.miranda-ng.org/main/trunk@13734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_proto.cpp')
-rw-r--r--protocols/MSN/src/msn_proto.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 3b9a588261..a49e3bca54 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -659,8 +659,7 @@ DWORD_PTR __cdecl CMsnProto::GetCaps(int type, MCONTACT)
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND;
case PFLAGNUM_4:
- return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SUPPORTIDLE | PF4_IMSENDUTF |
- PF4_IMSENDOFFLINE | PF4_NOAUTHDENYREASON;
+ return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SUPPORTIDLE | PF4_IMSENDOFFLINE | PF4_NOAUTHDENYREASON;
case PFLAGNUM_5:
return PF2_ONTHEPHONE;
@@ -824,19 +823,8 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
}
char *msg = (char*)pszSrc;
- if (msg == NULL) return 0;
-
- if (flags & PREF_UNICODE) {
- char* p = strchr(msg, '\0');
- if (p != msg) {
- while (*(++p) == '\0') {}
- msg = mir_utf8encodeW((wchar_t*)p);
- }
- else
- msg = mir_strdup(msg);
- }
- else
- msg = (flags & PREF_UTF) ? mir_strdup(msg) : mir_utf8encode(msg);
+ if (msg == NULL)
+ return 0;
int rtlFlag = (flags & PREF_RTL) ? MSG_RTL : 0;
@@ -911,7 +899,6 @@ int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
break;
}
- mir_free(msg);
return seq;
}