summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-27 15:33:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-27 15:33:58 +0000
commitdf77e258df8cec689a001ec92031538298661b1b (patch)
tree56ec236ca9675f049c4806e8d41986c40b537f07 /plugins/Db3x_mmap/src/dbtool/settingschain.cpp
parent414ffc78d69f09d48fc43051e0806a30e8fb5c67 (diff)
merge of dbtool & database plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@1213 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbtool/settingschain.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbtool/settingschain.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
index a2bfc48482..aaa52d9e22 100644
--- a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
+++ b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp
@@ -16,11 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "..\commonheaders.h"
static DWORD ofsThisSettings,ofsDestPrevSettings;
-int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
+int CDb3Base::WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
{
DBContactSettings *dbcsNew,dbcsOld;
DWORD ofsDestThis;
@@ -33,14 +34,15 @@ int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
}
if (ofsThisSettings == 0)
return ERROR_NO_MORE_ITEMS;
+
if (!SignatureValid(ofsThisSettings,DBCONTACTSETTINGS_SIGNATURE)) {
- AddToStatus(STATUS_ERROR,TranslateT("Settings chain corrupted, further entries ignored"));
+ cb->pfnAddLogMessage(STATUS_ERROR,TranslateT("Settings chain corrupted, further entries ignored"));
return ERROR_NO_MORE_ITEMS;
}
if (PeekSegment(ofsThisSettings,&dbcsOld,sizeof(dbcsOld)) != ERROR_SUCCESS)
return ERROR_NO_MORE_ITEMS;
if (dbcsOld.cbBlob>256*1024 || dbcsOld.cbBlob == 0) {
- AddToStatus(STATUS_ERROR,TranslateT("Infeasibly large settings blob: skipping"));
+ cb->pfnAddLogMessage(STATUS_ERROR,TranslateT("Infeasibly large settings blob: skipping"));
ofsThisSettings = dbcsOld.ofsNext;
return ERROR_SUCCESS;
}
@@ -55,7 +57,7 @@ int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
return ERROR_SUCCESS;
}
if (dbcsNew->blob[0] == 0) {
- AddToStatus(STATUS_MESSAGE,TranslateT("Empty settings group at %08X: skipping"),ofsThisSettings);
+ cb->pfnAddLogMessage(STATUS_MESSAGE,TranslateT("Empty settings group at %08X: skipping"),ofsThisSettings);
ofsThisSettings = dbcsOld.ofsNext;
return ERROR_SUCCESS;
}