From 46cb46859ce27e2d23da0bcbecbe92da7b349b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 18 Mar 2017 20:47:27 +0100 Subject: SkypeWeb: Revert my invalid attempts related to #608 * reverted commit b225a055f5d3abc754899d115582f39cc2168f3f * reverted commit 88cb4210be8c51a6fb567216bb87d2d6cf7826f8 --- protocols/SkypeWeb/src/skype_db.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index c2bf039e9c..2dbe2ced90 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -68,7 +68,7 @@ MEVENT CSkypeProto::AddDbEvent(WORD type, MCONTACT hContact, DWORD timestamp, DW return hDbEvent; size_t messageLength = mir_strlen(content) + 1; size_t messageIdLength = mir_strlen(uid); - size_t cbBlob = messageLength + messageIdLength + 1; + size_t cbBlob = messageLength + messageIdLength; PBYTE pBlob = (PBYTE)mir_alloc(cbBlob); memcpy(pBlob, content, messageLength); memcpy(pBlob + messageLength, uid, messageIdLength); @@ -128,11 +128,7 @@ MEVENT CSkypeProto::AppendDBEvent(MCONTACT hContact, MEVENT hEvent, const char * } - // First force old event to be read, so it won't be stuck forever because of theoretical bug in DB driver - db_event_markRead(hContact, hEvent); - // Only then delete the original event - db_event_delete(hContact, hEvent); - // Finally add new edited event, but with original event's properties (including flags) + db_event_delete(hContact, hEvent); return AddDbEvent(SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE, hContact, dbei.timestamp, dbei.flags, jMsg.write().c_str(), szUid); } -- cgit v1.2.3