From abd426c8667985d3eac705b2e434e755cbf106da Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 26 Apr 2013 22:19:12 +0000 Subject: fixed message hystory sync git-svn-id: http://svn.miranda-ng.org/main/trunk@4546 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_database.cpp | 2 +- protocols/Skype/src/skype_events.cpp | 1 + protocols/Skype/src/skype_proto.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols') 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; -- cgit v1.2.3