From 384cd67e60eb8b28004a6382a9ae5bb4a0e283db Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 11 Mar 2016 16:02:41 +0000 Subject: dbx_lmdb: call dbpanic() on base corruption, attempt to implement events (un)encryption on-fly git-svn-id: http://svn.miranda-ng.org/main/trunk@16461 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/dbintf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Dbx_mdb/src/dbintf.cpp') diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index 3c12201951..57374de534 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -100,7 +100,7 @@ int CDbxMdb::Load(bool bSkipInit) MDB_val key = { sizeof(DWORD), &keyVal }, data; if (mdb_get(trnlck, m_dbGlobal, &key, &data) == MDB_SUCCESS) { - DBHeader *hdr = (DBHeader*)data.mv_data; + const DBHeader *hdr = (const DBHeader*)data.mv_data; if (hdr->dwSignature != DBHEADER_SIGNATURE) DatabaseCorruption(NULL); @@ -154,7 +154,7 @@ int CDbxMdb::Load(bool bSkipInit) FillContacts(); } - return ERROR_SUCCESS; + return EGROKPRF_NOERROR; } int CDbxMdb::Create(void) @@ -223,7 +223,7 @@ static const TCHAR *msg = NULL; static DWORD dwErr = 0; static TCHAR tszPanic[] = LPGENT("Miranda has detected corruption in your database. This corruption may be fixed by DbChecker plugin. Please download it from http://miranda-ng.org/p/DbChecker/. Miranda will now shut down."); -void __cdecl dbpanic(void *) +EXTERN_C void __cdecl dbpanic(void *) { if (msg) { if (dwErr == ERROR_DISK_FULL) -- cgit v1.2.3