summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-08 16:29:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-08 16:29:32 +0000
commit58a252dd51d4a289ecad6733aab4712212f78186 (patch)
tree417bb2074fda3b70409c1e04ee6b238a60f987df
parent9196065a1afd8850b3d66995c5b393c7aec9b5fe (diff)
- fix for contact moving to a group with a short name;
- correct MRIM_CS_AUTHORIZE_ACK buffer filling; - correct flags allocation; git-svn-id: http://svn.miranda-ng.org/main/trunk@6024 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/MRA/src/MraSendCommand.cpp2
-rw-r--r--protocols/MRA/src/Mra_functions.cpp5
-rw-r--r--protocols/MRA/src/Mra_proto.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp
index 7f64f1c3c3..6f279c6e49 100644
--- a/protocols/MRA/src/MraSendCommand.cpp
+++ b/protocols/MRA/src/MraSendCommand.cpp
@@ -186,7 +186,7 @@ DWORD CMraProto::MraMessageRecv(const CMStringA &szFrom, DWORD dwMsgID)
// Adds new contact
DWORD CMraProto::MraAddContact(HANDLE hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMString* wszAuthMessage)
{
- if (szEmail.GetLength() <= 4)
+ if (szEmail.GetLength() <= 4 && !(dwContactFlag & CONTACT_FLAG_GROUP))
return 0;
dwContactFlag |= CONTACT_FLAG_UNICODE_NAME;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 542f750543..2982d45da8 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -316,9 +316,10 @@ DWORD CMraProto::MraMoveContactToGroup(HANDLE hContact, DWORD dwGroupID, LPCTSTR
if (m_groups.find((MraGroupItem*)&id) == NULL)
break;
- p = new MraGroupItem(id, CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP, ptszName);
+ DWORD dwContactFlags = (CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP) + (id << 24);
+ p = new MraGroupItem(id, dwContactFlags, ptszName);
m_groups.insert(p);
- MraAddContact(NULL, (CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP) + (id << 24), 0, ptszName, p->m_name);
+ MraAddContact(NULL, dwContactFlags, 0, ptszName, p->m_name);
}
if (dwGroupID != p->m_id) {
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 38dc8ee104..4a6aa1952e 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -608,7 +608,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf)
dbei.timestamp = (DWORD)_time32(NULL);
dbei.eventType = EVENTTYPE_ADDED;
dbei.cbBlob = szBuff.GetLength();
- dbei.pBlob = (PBYTE)szBuff.GetBuffer();
+ dbei.pBlob = (PBYTE)szBuff.GetString();
db_event_add(0, &dbei);
}