From: Victor Kirhenshtein Date: Fri, 19 Aug 2016 07:10:58 +0000 (+0300) Subject: fixed bug in data tables check X-Git-Tag: 2.1-M0~107 X-Git-Url: http://git.netxms.org/public/netxms.git/commitdiff_plain/b29e5407f9804881edc7c3ad33a3f31911da1aad fixed bug in data tables check --- diff --git a/src/server/tools/nxdbmgr/check.cpp b/src/server/tools/nxdbmgr/check.cpp index e94e64102..9564f5e93 100644 --- a/src/server/tools/nxdbmgr/check.cpp +++ b/src/server/tools/nxdbmgr/check.cpp @@ -758,7 +758,7 @@ static void CheckIData() /** * Check if given data table exist */ -BOOL IsDataTableExist(const TCHAR *format, DWORD id) +bool IsDataTableExist(const TCHAR *format, UINT32 id) { TCHAR table[256]; _sntprintf(table, 256, format, id); @@ -797,7 +797,7 @@ static void CheckDataTablesForClass(const TCHAR *className, const TCHAR *classDe } // TDATA - if (IsDataTableExist(_T("tdata_%d"), id)) + if (!IsDataTableExist(_T("tdata_%d"), id)) { m_iNumErrors++; if (GetYesNo(_T("\rData collection table (TDATA) for %s [%d] not found. Create? (Y/N) "), classDescr, id)) diff --git a/src/server/tools/nxdbmgr/nxdbmgr.h b/src/server/tools/nxdbmgr/nxdbmgr.h index ed568b592..491409342 100644 --- a/src/server/tools/nxdbmgr/nxdbmgr.h +++ b/src/server/tools/nxdbmgr/nxdbmgr.h @@ -80,7 +80,7 @@ DWORD ConfigReadULong(const TCHAR *pszVar, DWORD dwDefault); bool CreateConfigParam(const TCHAR *name, const TCHAR *value, bool isVisible, bool needRestart, bool forceUpdate = false); bool CreateConfigParam(const TCHAR *name, const TCHAR *value, const TCHAR *description, char dataType, bool isVisible, bool needRestart, bool isPublic, bool forceUpdate = false); -BOOL IsDataTableExist(const TCHAR *format, DWORD id); +bool IsDataTableExist(const TCHAR *format, UINT32 id); bool RenameDatabaseTable(const TCHAR *oldName, const TCHAR *newName);