diff options
-rw-r--r-- | plugins/Db3x_mmap/src/database.cpp | 2 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 23 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbevents.cpp | 32 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.h | 6 | ||||
-rw-r--r-- | plugins/ProfileManager/src/pmanagerEx.cpp | 19 | ||||
-rw-r--r-- | src/mir_app/src/database.cpp | 2 |
6 files changed, 2 insertions, 82 deletions
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp index 0b5eb895ce..bd7a60a893 100644 --- a/plugins/Db3x_mmap/src/database.cpp +++ b/plugins/Db3x_mmap/src/database.cpp @@ -76,7 +76,7 @@ DWORD CDb3Mmap::ReallocSpace(DWORD ofs, int oldSize, int newSize) static DWORD DatabaseCorrupted = 0;
static wchar_t *msg = nullptr;
static DWORD dwErr = 0;
-static wchar_t tszPanic[] = LPGENW("Miranda has detected corruption in your database. This corruption may be fixed by DbChecker plugin. Please download it from https://miranda-ng.org/p/DbChecker/. Miranda will now shut down.");
+static wchar_t tszPanic[] = LPGENW("Miranda has detected corruption in your database. Miranda will now shut down.");
void __cdecl dbpanic(void *)
{
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index a882666539..087c159046 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -317,29 +317,6 @@ protected: char* GetModuleNameByOfs(DWORD ofs);
////////////////////////////////////////////////////////////////////////////
- // checker
-
- int PeekSegment(DWORD ofs, PVOID buf, int cbBytes);
- int ReadSegment(DWORD ofs, PVOID buf, int cbBytes);
- int ReadWrittenSegment(DWORD ofs, PVOID buf, int cbBytes);
- int SignatureValid(DWORD ofs, DWORD signature);
- void FreeModuleChain();
-
- DWORD ConvertModuleNameOfs(DWORD ofsOld);
- void ConvertOldEvent(DBEvent*& dbei);
-
- int WorkSettingsChain(DBContact *dbc, int firstTime);
- int WorkEventChain(DWORD ofsContact, DBContact *dbc, int firstTime);
-
- DWORD WriteSegment(DWORD ofs, PVOID buf, int cbBytes);
- DWORD WriteEvent(DBEvent *dbe);
- DWORD PeekEvent(DWORD ofs, DWORD dwContactID, DBEvent &dbe);
- void WriteOfsNextToPrevious(DWORD ofsPrev, DBContact *dbc, DWORD ofsNext);
- void FinishUp(DWORD ofsLast, DBContact *dbc);
-
- DWORD sourceFileSize, ofsAggrCur;
-
- ////////////////////////////////////////////////////////////////////////////
// encryption
int InitCrypt(void);
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 0262cf89ec..baf75a04fe 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -463,35 +463,3 @@ STDMETHODIMP_(MEVENT) CDbxMDBX::FindPrevEvent(MCONTACT contactID, MEVENT hDbEven cc->t_tsLast = pKey->ts;
return cc->t_evLast = (pKey->hContact == contactID) ? pKey->hEvent : 0;
}
-
-///////////////////////////////////////////////////////////////////////////////
-// checker
-
-int CDbxMDBX::CheckEvents1()
-{
-/* txn_ptr_ro trnlck(m_txn_ro);
- cursor_ptr_ro cursor(m_curEvents);
-
- uint32_t eventID = 0;
- MDBX_val key = { &eventID, sizeof(eventID) }, data;
-
- while (mdbx_cursor_get(cursor, &key, &data, MDBX_NEXT) == MDBX_SUCCESS) {
- const DBEvent *dbe = (const DBEvent*)data.iov_base;
-
- DBEventSortingKey lookupkey = { dbe->contactID, eventID, dbe->timestamp };
- MDBX_val key2 = { &lookupkey, sizeof(lookupkey) }, data2;
- if (!mdbx_get(m_txn_ro, m_dbEventsSort, &key, nullptr))
- continue;
-
- txn_ptr trnlck(StartTran());
- if (mdbx_del(txn, m_dbEvents, &key, nullptr) == MDBX_SUCCESS)
- txn.commit();
- }
- */
- return ERROR_NO_MORE_ITEMS;
-}
-
-int CDbxMDBX::CheckEvents2()
-{
- return ERROR_NO_MORE_ITEMS;
-}
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h index 66515934b3..ac29a30115 100644 --- a/plugins/Dbx_mdbx/src/dbintf.h +++ b/plugins/Dbx_mdbx/src/dbintf.h @@ -209,12 +209,6 @@ protected: public:
MICryptoEngine *m_crypto;
- ////////////////////////////////////////////////////////////////////////////
- // checker
-
- int CheckEvents1();
- int CheckEvents2();
-
protected:
MDBX_env *m_env;
CMDBX_txn_ro m_txn_ro;
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index 860414c0d5..fad24aae35 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -11,7 +11,6 @@ There is no warranty. #define SRV_LOAD_PM "Database/LoadPM"
#define SRV_CHANGE_PM "Database/ChangePM"
-#define SRV_CHECK_DB "Database/CheckDb"
#define SRV_RESTART_ME "System/RestartMe"
HINSTANCE hInst;
@@ -62,21 +61,6 @@ static INT_PTR LoadPM(WPARAM, LPARAM) return 0;
}
-static INT_PTR CheckDb(WPARAM, LPARAM)
-{
- if (MessageBox(nullptr, TranslateT("Miranda NG will exit and Database checker will start.\n\nAre you sure you want to do this?"), TranslateT("Check database"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES) {
- wchar_t mirandaPath[MAX_PATH], cmdLine[100];
- PROCESS_INFORMATION pi;
- STARTUPINFO si = { 0 };
- si.cb = sizeof(si);
- GetModuleFileName(nullptr, mirandaPath, _countof(mirandaPath));
- mir_snwprintf(cmdLine, L"\"%s\" /restart:%d /svc:dbchecker", mirandaPath, GetCurrentProcessId());
- CallService("CloseAction", 0, 0);
- CreateProcess(mirandaPath, cmdLine, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi);
- }
- return 0;
-}
-
static INT_PTR RestartMe(WPARAM, LPARAM)
{
CallService(MS_SYSTEM_RESTART, 1, 0);
@@ -87,7 +71,6 @@ static IconItem iconList[] = {
{ LPGEN("Load profile"), SRV_LOAD_PM, IDI_LoadPM },
{ LPGEN("Change profile"), SRV_CHANGE_PM, IDI_ChangePM },
- { LPGEN("Check database"), SRV_CHECK_DB, IDI_Dbchecker },
{ LPGEN("Restart"), SRV_RESTART_ME, IDI_Restart }
};
@@ -95,7 +78,6 @@ static MUUID uids[_countof(iconList)] = {
{ 0xF57779C7, 0xB593, 0x4851, 0x94, 0x3A, 0xEB, 0x90, 0x95, 0x40, 0x0D, 0x2A },
{ 0x701BFC6C, 0x6963, 0x4A4C, 0xA6, 0x39, 0x9B, 0xC0, 0x97, 0x64, 0xFD, 0xCE },
- { 0x3C4409EC, 0xF733, 0x4C33, 0x94, 0x0C, 0x35, 0xAF, 0x36, 0xC6, 0x64, 0x32 },
{ 0x5A2EDCCD, 0xB43B, 0x48FA, 0x8A, 0xE8, 0xB5, 0x8B, 0xD7, 0xA5, 0x5A, 0x13 }
};
@@ -106,7 +88,6 @@ extern "C" __declspec(dllexport) int Load(void) Icon_Register(hInst, LPGEN("Profile manager"), iconList, _countof(iconList));
CreateServiceFunction(SRV_LOAD_PM, LoadPM);
- CreateServiceFunction(SRV_CHECK_DB, CheckDb);
CreateServiceFunction(SRV_CHANGE_PM, ChangePM);
CreateServiceFunction(SRV_RESTART_ME, RestartMe);
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp index 56710838e5..ce47bd9981 100644 --- a/src/mir_app/src/database.cpp +++ b/src/mir_app/src/database.cpp @@ -462,7 +462,7 @@ static int FindMirandaForProfile(wchar_t *szProfile) }
static wchar_t tszNoDrivers[] = LPGENW("Miranda is unable to open '%s' because you do not have any profile plugins installed.\nYou need to install dbx_mmap.dll");
-static wchar_t tszUnknownFormat[] = LPGENW("Miranda was unable to open '%s', it's in an unknown format.\nThis profile might also be damaged, please run DbChecker which should be installed.");
+static wchar_t tszUnknownFormat[] = LPGENW("Miranda was unable to open '%s', it's in an unknown format.");
static wchar_t tszProfileLocked[] = LPGENW("Miranda was unable to open '%s'\nIt's inaccessible or used by other application or Miranda instance");
static wchar_t tszNoSuitableDriver[] = LPGENW("Miranda was unable to open '%s'\nThere is no suitable database driver installed");
|