From df77e258df8cec689a001ec92031538298661b1b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Jul 2012 15:33:58 +0000 Subject: merge of dbtool & database plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@1213 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbheaders.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbheaders.cpp') diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index 394b66acfc..68e7da15e1 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -58,8 +58,14 @@ int CDb3Base::CreateDbHeaders() int CDb3Base::CheckDbHeaders() { - if (memcmp(m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature))) return 1; - if (m_dbHeader.version != DB_THIS_VERSION) return 2; - if (m_dbHeader.ofsUser == 0) return 3; + if (memcmp(m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature))) + return EGROKPRF_UNKHEADER; + + if (m_dbHeader.version != DB_THIS_VERSION) + return EGROKPRF_VERNEWER; + + if (m_dbHeader.ofsUser == 0) + return EGROKPRF_DAMAGED; + return 0; } -- cgit v1.2.3