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/dbtool/settingschain.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbtool/settingschain.cpp') 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; } -- cgit v1.2.3