minor fixes
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 19 Jun 2015 17:40:26 +0000 (20:40 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 19 Jun 2015 17:40:26 +0000 (20:40 +0300)
include/netxmsdb.h
sql/setup.in
src/server/tools/nxdbmgr/upgrade.cpp
src/tools/nxgenguid/nxgenguid.cpp
src/tools/nxgenguid/nxgenguid.vcproj

index 70fcb02..b97c83b 100644 (file)
@@ -23,6 +23,6 @@
 #ifndef _netxmsdb_h
 #define _netxmsdb_h
 
-#define DB_FORMAT_VERSION   355
+#define DB_FORMAT_VERSION   356
 
 #endif
index 451e6d3..5b078e5 100644 (file)
@@ -103,21 +103,15 @@ INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('MinPasswordLength','0',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('MinViewRefreshInterval','1000',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('MobileDeviceListenerPort','4747',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfBusinessServicePollers','10',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfConditionPollers','10',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfConfigurationPollers','10',1,1);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfDatabaseWriters','1',1,1);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfDataCollectors','25',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfDiscoveryPollers','1',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfInstancePollers','10',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfRoutingTablePollers','10',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfStatusPollers','25',1,1);
-INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfTopologyTablePollers','10',1,1);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('NumberOfUpgradeThreads','10',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PasswordComplexity','0',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PasswordExpiration','0',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PasswordHistoryLength','0',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PollCountForStatusChange','1',1,1);
+INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PollerThreadPoolBaseSize','10',1,1);
+INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('PollerThreadPoolMaxSize','250',1,1);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('RADIUSNumRetries','5',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('RADIUSPort','1645',1,0);
 INSERT INTO config (var_name,var_value,is_visible,need_server_restart) VALUES ('RADIUSSecondaryPort','1645',1,0);
index cab42aa..789edbb 100644 (file)
@@ -467,6 +467,30 @@ static BOOL ConvertNetMasks(const TCHAR *table, const TCHAR *column, const TCHAR
 }
 
 /**
+ * Upgrade from V355 to V356
+ */
+static BOOL H_UpgradeFromV355(int currVersion, int newVersion)
+{
+   static TCHAR batch[] =
+      _T("DELETE FROM config WHERE var_name='NumberOfBusinessServicePollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfConditionPollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfConfigurationPollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfDiscoveryPollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfInstancePollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfRoutingTablePollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfStatusPollers'\n")
+      _T("DELETE FROM config WHERE var_name='NumberOfTopologyTablePollers'\n")
+      _T("<END>");
+   CHK_EXEC(SQLBatch(batch));
+
+   CHK_EXEC(CreateConfigParam(_T("PollerThreadPoolBaseSize"), _T("10"), 1, 1));
+   CHK_EXEC(CreateConfigParam(_T("PollerThreadPoolMaxSize"), _T("250"), 1, 1));
+
+   CHK_EXEC(SQLQuery(_T("UPDATE metadata SET var_value='356' WHERE var_name='SchemaVersion'")));
+   return TRUE;
+}
+
+/**
  * Upgrade from V354 to V355
  */
 static BOOL H_UpgradeFromV354(int currVersion, int newVersion)
@@ -8605,6 +8629,7 @@ static struct
    { 352, 353, H_UpgradeFromV352 },
    { 353, 354, H_UpgradeFromV353 },
    { 354, 355, H_UpgradeFromV354 },
+   { 355, 356, H_UpgradeFromV355 },
    { 0, 0, NULL }
 };
 
index 560f03a..2f70caa 100644 (file)
@@ -1,6 +1,6 @@
 /* 
-** nxencpasswd - command line tool for encrypting passwords using NetXMS server key
-** Copyright (C) 2004-2013 Victor Kirhenshtein
+** nxgenguid - command line tool for GUID generation
+** Copyright (C) 2004-2015 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: nxencpasswd.cpp
+** File: nxgenguid.cpp
 **
 **/
 
index a27680a..ec76be0 100644 (file)
@@ -23,7 +23,7 @@
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="1"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        WholeProgramOptimization="1"
                        >
                        <Tool
                        OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
                        IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
                        ConfigurationType="1"
-                       CharacterSet="2"
+                       CharacterSet="1"
                        WholeProgramOptimization="1"
                        >
                        <Tool