diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-26 22:19:12 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-26 22:19:12 +0000 |
commit | abd426c8667985d3eac705b2e434e755cbf106da (patch) | |
tree | edcf52818f37998991945030403c26056c8cddc2 | |
parent | 965ba4945c4efe30614e756c2c7b5ec102cf7c41 (diff) |
fixed message hystory sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@4546 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 1 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 258b629781..5361ada67d 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -21,7 +21,7 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, const char* gu int sendFlag = dbei.flags & DBEF_SENT;
if (dbei.eventType == EVENTTYPE_MESSAGE && sendFlag == flag)
{
- if (::memcmp(&dbei.pBlob[dbei.cbBlob], guid, 32) == 0)
+ if (::memcmp(&dbei.pBlob[dbei.cbBlob - 32], guid, 32) == 0)
{
::mir_free(dbei.pBlob);
result = true;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index 7a79b782a5..ebee196ebd 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -56,6 +56,7 @@ int CSkypeProto::OnMessagePreCreate(WPARAM, LPARAM lParam) {
evt->dbei->pBlob = (PBYTE)::mir_realloc(evt->dbei->pBlob, evt->dbei->cbBlob + guid.size());
::memcpy((char *)&evt->dbei->pBlob[evt->dbei->cbBlob], guid.data(), guid.size());
+ evt->dbei->cbBlob += 32;
}
return 1;
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 2412bc5fd0..ddf36cedb7 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -293,6 +293,7 @@ int __cdecl CSkypeProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre) char *guid = (char *)pre->lParam;
dbei.pBlob = (PBYTE)::mir_realloc(dbei.pBlob, dbei.cbBlob + 32);
::memcpy((char *)&dbei.pBlob[dbei.cbBlob], guid, 32);
+ dbei.cbBlob += 32;
if (pre->flags & PREF_CREATEREAD)
dbei.flags |= DBEF_READ;
|