diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-09 16:56:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-09 16:56:30 +0000 |
commit | 7963b60b9f1bcd478f537f57abde51204c97eb90 (patch) | |
tree | d0e892316468ea91d4a87f9ea815ce7224737397 /protocols/MRA/src/MraSendCommand.cpp | |
parent | f6233a8261525da7c1a7ee52afd46d1980275a40 (diff) |
- fixed regression with passive contact addition;
- fixed "Bad date sent"
git-svn-id: http://svn.miranda-ng.org/main/trunk@6032 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/MraSendCommand.cpp')
-rw-r--r-- | protocols/MRA/src/MraSendCommand.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 6f279c6e49..cd6b204a0d 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -190,6 +190,8 @@ DWORD CMraProto::MraAddContact(HANDLE hContact, DWORD dwContactFlag, DWORD dwGro return 0;
dwContactFlag |= CONTACT_FLAG_UNICODE_NAME;
+ if (dwGroupID == -1)
+ dwGroupID = 0;
OutBuffer buf;
buf.SetUL(dwContactFlag);
@@ -213,9 +215,6 @@ DWORD CMraProto::MraAddContact(HANDLE hContact, DWORD dwContactFlag, DWORD dwGro // change contact
DWORD CMraProto::MraModifyContact(HANDLE hContact, DWORD *pdwID, DWORD *pdwContactFlag, DWORD *pdwGroupID, const CMStringA *pszEmail, const CMStringW *pwszCustomName, const CMStringA *pszPhones)
{
- if (pdwID && *pdwID == -1)
- return 0;
-
CMStringA szEmail, szPhones;
CMStringW wszNick, wszCustomName;
DWORD dwID, dwGroupID, dwContactFlag;
@@ -225,17 +224,18 @@ DWORD CMraProto::MraModifyContact(HANDLE hContact, DWORD *pdwID, DWORD *pdwConta dwID = dwGroupID = dwContactFlag = 0;
if (pdwID) dwID = *pdwID;
+ if (dwID == -1)
+ return 0;
+
if (pszEmail) szEmail = *pszEmail;
if (pszPhones) szPhones = *pszPhones;
if (pdwGroupID) dwGroupID = *pdwGroupID;
if (pdwContactFlag) dwContactFlag = *pdwContactFlag;
if (pwszCustomName) wszCustomName = *pwszCustomName;
- dwContactFlag |= CONTACT_FLAG_UNICODE_NAME;
-
OutBuffer buf;
buf.SetUL(dwID);
- buf.SetUL(dwContactFlag);
+ buf.SetUL(dwContactFlag | CONTACT_FLAG_UNICODE_NAME);
buf.SetUL(dwGroupID);
buf.SetLPSLowerCase(szEmail);
buf.SetLPSW(wszCustomName);
|