From 9c011b382187a454f728f0efc5321a53ed957685 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 Jan 2014 18:23:10 +0000 Subject: dbchecker: skipping encrypted events if "Convert to UTF8" flag is set git-svn-id: http://svn.miranda-ng.org/main/trunk@7525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbtool/eventchain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbtool') diff --git a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp index 872809503e..9062d2f389 100644 --- a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp @@ -235,7 +235,7 @@ int CDb3Base::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) dbeNew->ofsPrev = ofsDestPrevEvent; dbeNew->ofsNext = 0; - if (dbeOld.eventType == EVENTTYPE_MESSAGE && cb->bConvertUtf) { + if (dbeOld.eventType == EVENTTYPE_MESSAGE && cb->bConvertUtf && !(dbeOld.flags & DBEF_ENCRYPTED)) { DWORD oldSize = dbeNew->cbBlob; BYTE* pOldMemo = (BYTE*)_alloca(dbeNew->cbBlob); memcpy(pOldMemo, dbeNew->blob, dbeNew->cbBlob); @@ -252,8 +252,8 @@ int CDb3Base::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) dbePrev->ofsModuleName == dbeNew->ofsModuleName && dbePrev->eventType == dbeNew->eventType && (dbePrev->flags & DBEF_SENT) == (dbeNew->flags & DBEF_SENT) && - !memcmp(dbePrev->blob, dbeNew->blob, dbeNew->cbBlob) - ) { + !memcmp(dbePrev->blob, dbeNew->blob, dbeNew->cbBlob)) + { cb->pfnAddLogMessage(STATUS_WARNING, TranslateT("Duplicate event was found: skipping")); if (dbc->eventCount) dbc->eventCount--; @@ -328,7 +328,6 @@ int CDb3Base::WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime) WriteSegment(dbeNew->ofsNext + offsetof(DBEvent, flags), &dbeTmp.flags, sizeof(DWORD)); } else if (found == 2 && !cb->bCheckOnly) { - dbeNew->ofsPrev = ofsTmp; dbeNew->ofsNext = dbeTmp.ofsNext; -- cgit v1.2.3