diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-09 15:08:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-09 15:08:13 +0000 |
commit | 89ad49f95ee83fb4f4f0f41b5f91d6bc62e1790e (patch) | |
tree | 24e5814a110d3315862f91eff0458afff1017e63 /protocols | |
parent | 399e3828179a3e1af5a1b874fa16f4469245addc (diff) |
fix for doubled sent messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@4609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_messages.cpp | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 2b6c6b1292..d7e010d125 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -18,7 +18,7 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, SEBinary &guid int sendFlag = dbei.flags & DBEF_SENT;
if (dbei.eventType == EVENTTYPE_MESSAGE && sendFlag == flag)
- if (::memcmp(&dbei.pBlob[dbei.cbBlob - 32], guid.data(), guid.size()) == 0)
+ if (::memcmp(&dbei.pBlob[dbei.cbBlob - guid.size()], guid.data(), guid.size()) == 0)
return true;
}
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp index d52a5184e4..031f9a0239 100644 --- a/protocols/Skype/src/skype_messages.cpp +++ b/protocols/Skype/src/skype_messages.cpp @@ -80,6 +80,11 @@ void CSkypeProto::OnMessageSent(CConversation::Ref &conversation, CMessage::Ref g_skype->GetContact(data, receiver);
HANDLE hContact = this->AddContact(receiver);
+ this->SendBroadcast(
+ hContact,
+ ACKTYPE_MESSAGE,
+ sstatus == CMessage::FAILED_TO_SEND ? ACKRESULT_FAILED : ACKRESULT_SUCCESS,
+ (HANDLE)message->getOID(), 0);
SEBinary guid;
message->GetPropGuid(guid);
@@ -90,12 +95,6 @@ void CSkypeProto::OnMessageSent(CConversation::Ref &conversation, CMessage::Ref guid,
text,
status == CMessage::UNCONSUMED_NORMAL);
-
- this->SendBroadcastAsync(
- hContact,
- ACKTYPE_MESSAGE,
- sstatus == CMessage::FAILED_TO_SEND ? ACKRESULT_FAILED : ACKRESULT_SUCCESS,
- (HANDLE)message->getOID(), 0);
}
void CSkypeProto::OnMessageEvent(CConversation::Ref conversation, CMessage::Ref message)
|