diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-04 18:38:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-04 18:38:40 +0300 |
commit | 3c8113e543388f8c29fdc4e5b311d60a8a0a8302 (patch) | |
tree | 1377f71b3eb6ea3e3957b4c5205348d0329e8a86 /plugins/Dbx_mdbx/src/dbintf.cpp | |
parent | 32cd89f64ef0449eac0ceea2ba9bc1aa36c5759b (diff) |
checker for MDBX, first version
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 679141dc79..93d6a7db09 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -201,7 +201,7 @@ int CDbxMDBX::Map() ///////////////////////////////////////////////////////////////////////////////
// MIDatabaseChecker
-typedef int (CDbxMDBX::*CheckWorker)(int);
+typedef int (CDbxMDBX::*CheckWorker)(void);
int CDbxMDBX::Start(DBCHeckCallback *callback)
{
@@ -209,9 +209,18 @@ int CDbxMDBX::Start(DBCHeckCallback *callback) return ERROR_SUCCESS;
}
-int CDbxMDBX::CheckDb(int, int)
+static CheckWorker Workers[6] =
{
- return ERROR_OUT_OF_PAPER;
+ &CDbxMDBX::CheckEvents1,
+ &CDbxMDBX::CheckEvents2,
+};
+
+int CDbxMDBX::CheckDb(int phase, int)
+{
+ if (phase >= _countof(Workers))
+ return ERROR_OUT_OF_PAPER;
+
+ return (this->*Workers[phase])();
}
void CDbxMDBX::Destroy()
|