command line tools no longer blocks SIGINT; nxshell switched to jython 2.7.1b3
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 1 Mar 2017 08:43:49 +0000 (10:43 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 1 Mar 2017 08:43:49 +0000 (10:43 +0200)
32 files changed:
include/nms_util.h
src/agent/core/nxagentd.cpp
src/agent/tools/nxappget/nxappget.cpp
src/agent/tools/nxapush/nxapush.cpp
src/client/nxalarm/nxalarm.cpp
src/client/nxevent/nxevent.cpp
src/client/nxpush/nxpush.cpp
src/client/nxshell/.cproject [new file with mode: 0644]
src/client/nxshell/.project [new file with mode: 0644]
src/client/nxshell/.settings/language.settings.xml [new file with mode: 0644]
src/client/nxshell/java/pom.xml
src/client/nxshell/nxshell.cpp
src/client/nxsms/nxsms.cpp
src/libnetxms/threads.cpp
src/libnetxms/tools.cpp
src/nxscript/nxscript.cpp
src/server/netxmsd/netxmsd.cpp
src/server/tools/driverloader/loader.cpp
src/server/tools/nxaction/nxaction.cpp
src/server/tools/nxadm/nxadm.cpp
src/server/tools/nxap/nxap.cpp
src/server/tools/nxdbmgr/nxdbmgr.cpp
src/server/tools/nxget/nxget.cpp
src/server/tools/nxminfo/nxminfo.cpp
src/server/tools/nxupload/nxupload.cpp
src/snmp/nxmibc/nxmibc.cpp
src/snmp/nxsnmpget/nxsnmpget.cpp
src/snmp/nxsnmpset/nxsnmpset.cpp
src/snmp/nxsnmpwalk/nxsnmpwalk.cpp
src/tools/nxdevcfg/nxdevcfg.cpp
src/tools/nxencpasswd/nxencpasswd.cpp
src/tools/nxgenguid/nxgenguid.cpp

index e1ef2b1..915fbc9 100644 (file)
@@ -1719,7 +1719,7 @@ extern "C"
 {
 #endif
 
-void LIBNETXMS_EXPORTABLE InitNetXMSProcess();
+void LIBNETXMS_EXPORTABLE InitNetXMSProcess(bool commandLineTool);
 
 #ifndef _WIN32
 #if defined(UNICODE_UCS2) || defined(UNICODE_UCS4)
@@ -2214,7 +2214,7 @@ String LIBNETXMS_EXPORTABLE EscapeStringForAgent(const TCHAR *s);
 StringList LIBNETXMS_EXPORTABLE *ParseCommandLine(const TCHAR *cmdline);
 
 #if !defined(_WIN32) && !defined(_NETWARE) && defined(NMS_THREADS_H_INCLUDED)
-void LIBNETXMS_EXPORTABLE BlockAllSignals(bool processWide);
+void LIBNETXMS_EXPORTABLE BlockAllSignals(bool processWide, bool allowInterrupt);
 void LIBNETXMS_EXPORTABLE StartMainLoop(ThreadFunction pfSignalHandler, ThreadFunction pfMain);
 #endif
 
index 0ac6b10..9d2ca68 100644 (file)
@@ -1417,7 +1417,7 @@ int main(int argc, char *argv[])
        int uid = 0, gid = 0;
 #endif
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(false);
 
    // Check for alternate config file location
 #ifdef _WIN32
index c698804..8043f06 100644 (file)
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
        int ret = 0;
        int c;
 
-       InitNetXMSProcess();
+       InitNetXMSProcess(true);
 
        opterr = 0;
 #if HAVE_DECL_GETOPT_LONG
index 4dad398..e55a1c7 100644 (file)
@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
        int ret = 0;
        int c;
 
-       InitNetXMSProcess();
+       InitNetXMSProcess(true);
 
        opterr = 0;
 #if HAVE_DECL_GETOPT_LONG
index 87130ea..f5d9bcb 100644 (file)
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
    int timeout = 3, ackTimeout = 0;
        int ch;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index c884bb8..fb33ae7 100644 (file)
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
    int ch, rcc = RCC_INVALID_ARGUMENT;
    BOOL bStart = TRUE, bEncrypt = FALSE;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index b508458..23ac5bc 100644 (file)
@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
        int ret = 0;
        int c;
 
-       InitNetXMSProcess();
+       InitNetXMSProcess(true);
 
        opterr = 0;
 #if HAVE_DECL_GETOPT_LONG
diff --git a/src/client/nxshell/.cproject b/src/client/nxshell/.cproject
new file mode 100644 (file)
index 0000000..09bd71d
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+       <storageModule moduleId="org.eclipse.cdt.core.settings">
+               <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.123951220">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.123951220" moduleId="org.eclipse.cdt.core.settings" name="Default">
+                               <externalSettings/>
+                               <extensions>
+                                       <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                               </extensions>
+                       </storageModule>
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+                               <configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.123951220" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+                                       <folderInfo id="cdt.managedbuild.toolchain.gnu.base.123951220.1227624354" name="/" resourcePath="">
+                                               <toolChain id="cdt.managedbuild.toolchain.gnu.base.1596592913" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
+                                                       <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1179450971" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+                                                       <builder id="cdt.managedbuild.target.gnu.builder.base.2006346975" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.archiver.base.1378130327" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1938492574" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
+                                                               <option id="gnu.cpp.compiler.option.include.paths.1505226017" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include/linux&quot;"/>
+                                                               </option>
+                                                               <option id="gnu.cpp.compiler.option.preprocessor.def.1949798204" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
+                                                                       <listOptionValue builtIn="false" value="_THREAD_SAFE"/>
+                                                                       <listOptionValue builtIn="false" value="TRE_WCHAR=1"/>
+                                                                       <listOptionValue builtIn="false" value="UNICODE"/>
+                                                                       <listOptionValue builtIn="false" value="_GNU_SOURCE"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.599964687" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1278397852" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
+                                                               <option id="gnu.c.compiler.option.include.paths.1166957593" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include&quot;"/>
+                                                               </option>
+                                                               <option id="gnu.c.compiler.option.preprocessor.def.symbols.1720550323" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
+                                                                       <listOptionValue builtIn="false" value="_THREAD_SAFE"/>
+                                                                       <listOptionValue builtIn="false" value="TRE_WCHAR=1"/>
+                                                                       <listOptionValue builtIn="false" value="UNICODE"/>
+                                                                       <listOptionValue builtIn="false" value="_GNU_SOURCE"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1692041434" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.linker.base.125843747" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1155693341" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1542622162" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+                                                               </inputType>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.base.1955929866" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+                                                               <option id="gnu.both.asm.option.include.paths.129644700" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${NETXMS_BASE}/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include&quot;"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1267998139" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                               </toolChain>
+                                       </folderInfo>
+                               </configuration>
+                       </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+               </cconfiguration>
+       </storageModule>
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+               <project id="nxshell.null.1223085046" name="nxshell"/>
+       </storageModule>
+       <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+       <storageModule moduleId="scannerConfiguration">
+               <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.123951220;cdt.managedbuild.toolchain.gnu.base.123951220.1227624354;cdt.managedbuild.tool.gnu.cpp.compiler.base.1938492574;cdt.managedbuild.tool.gnu.cpp.compiler.input.599964687">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               </scannerConfigBuildInfo>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.123951220;cdt.managedbuild.toolchain.gnu.base.123951220.1227624354;cdt.managedbuild.tool.gnu.c.compiler.base.1278397852;cdt.managedbuild.tool.gnu.c.compiler.input.1692041434">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               </scannerConfigBuildInfo>
+       </storageModule>
+</cproject>
diff --git a/src/client/nxshell/.project b/src/client/nxshell/.project
new file mode 100644 (file)
index 0000000..a746779
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>nxshell</name>
+       <comment></comment>
+       <projects>
+               <project>libnetxms</project>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+                       <triggers>clean,full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+                       <triggers>full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.cdt.core.cnature</nature>
+               <nature>org.eclipse.cdt.core.ccnature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+       </natures>
+       <filteredResources>
+               <filter>
+                       <id>1488352248972</id>
+                       <name></name>
+                       <type>6</type>
+                       <matcher>
+                               <id>org.eclipse.ui.ide.multiFilter</id>
+                               <arguments>1.0-name-matches-false-false-*.o</arguments>
+                       </matcher>
+               </filter>
+               <filter>
+                       <id>1488352248979</id>
+                       <name></name>
+                       <type>6</type>
+                       <matcher>
+                               <id>org.eclipse.ui.ide.multiFilter</id>
+                               <arguments>1.0-name-matches-false-false-*.lo</arguments>
+                       </matcher>
+               </filter>
+       </filteredResources>
+</projectDescription>
diff --git a/src/client/nxshell/.settings/language.settings.xml b/src/client/nxshell/.settings/language.settings.xml
new file mode 100644 (file)
index 0000000..baead2d
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+       <configuration id="cdt.managedbuild.toolchain.gnu.base.123951220" name="Default">
+               <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+                       <provider class="org.eclipse.cdt.core.language.settings.providers.LanguageSettingsGenericProvider" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" name="CDT User Setting Entries" prefer-non-shared="true"/>
+                       <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+                       <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1092834717854559371" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+                               <language-scope id="org.eclipse.cdt.core.gcc"/>
+                               <language-scope id="org.eclipse.cdt.core.g++"/>
+                       </provider>
+                       <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+               </extension>
+       </configuration>
+</project>
index aba22f8..77f37e1 100644 (file)
@@ -55,7 +55,7 @@
         <dependency>
             <groupId>org.python</groupId>
             <artifactId>jython-standalone</artifactId>
-            <version>2.7.1b1</version>
+            <version>2.7.1b3</version>
         </dependency>
         <dependency>
             <groupId>org.netxms</groupId>
index 1abb0af..af1c805 100644 (file)
@@ -178,7 +178,7 @@ static int StartApp(int argc, char *argv[])
 #if HAVE_DECL_GETOPT_LONG
 static struct option longOptions[] =
 {
-       { (char *)"classpath",      required_argument, NULL,        'c' },
+       { (char *)"classpath",      required_argument, NULL,        'C' },
        { (char *)"help",           no_argument,       NULL,        'h' },
        { (char *)"host",           required_argument, NULL,        'H' },
        { (char *)"jre",            required_argument, NULL,        'j' },
@@ -189,7 +189,7 @@ static struct option longOptions[] =
 };
 #endif
 
-#define SHORT_OPTIONS "c:hH:j:P:u:v"
+#define SHORT_OPTIONS "C:hH:j:P:u:v"
 
 /**
  * Print usage info
@@ -208,7 +208,7 @@ static void usage(bool showVersion)
       _T("  \n")
       _T("Options:\n")
 #if HAVE_GETOPT_LONG
-      _T("  -c, --classpath <path>      Additional Java class path.\n")
+      _T("  -C, --classpath <path>      Additional Java class path.\n")
       _T("  -h, --help                  Display this help message.\n")
       _T("  -H, --host <hostname>       Specify host name or IP address.\n")
       _T("  -j, --jre <path>            Specify JRE location.\n")
@@ -216,7 +216,7 @@ static void usage(bool showVersion)
       _T("  -u, --user <user>           Login to server as user. Default is \"admin\".\n")
       _T("  -v, --version               Display version information.\n\n")
 #else
-      _T("  -c <path>      Additional Java class path.\n")
+      _T("  -C <path>      Additional Java class path.\n")
       _T("  -h             Display this help message.\n")
       _T("  -H <hostname>  Specify host name or IP address.\n")
       _T("  -j <path>      Specify JRE location.\n")
@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
 {
        int ret = 0;
 
-       InitNetXMSProcess();
+       InitNetXMSProcess(true);
 
        opterr = 0;
    int c;
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
        {
                switch(c)
                {
-                  case 'c': // classpath
+                  case 'C': // classpath
                           s_optClassPath = optarg;
                           break;
                   case 'h': // help
index 04609e5..21b661f 100644 (file)
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
        DWORD rcc, timeout = 3;
        int ch;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index 67754f0..40bdaf8 100644 (file)
@@ -175,12 +175,13 @@ Condition& Condition::operator =(const Condition& src)
 /**
  * Block all signals on a thread
  */
-void LIBNETXMS_EXPORTABLE BlockAllSignals(bool processWide)
+void LIBNETXMS_EXPORTABLE BlockAllSignals(bool processWide, bool allowInterrupt)
 {
    sigset_t signals;
    sigemptyset(&signals);
    sigaddset(&signals, SIGTERM);
-   sigaddset(&signals, SIGINT);
+   if (!allowInterrupt)
+      sigaddset(&signals, SIGINT);
    sigaddset(&signals, SIGSEGV);
    sigaddset(&signals, SIGCHLD);
    sigaddset(&signals, SIGHUP);
index 5d5e5fa..76c43a1 100644 (file)
 
 /**
  * Common initialization for any NetXMS process
+ *
+ * @param commandLineTool set to true for command line tool initialization
  */
-void LIBNETXMS_EXPORTABLE InitNetXMSProcess()
+void LIBNETXMS_EXPORTABLE InitNetXMSProcess(bool commandLineTool)
 {
    InitThreadLibrary();
 
@@ -101,7 +103,7 @@ void LIBNETXMS_EXPORTABLE InitNetXMSProcess()
 #endif
 
 #ifndef _WIN32
-   BlockAllSignals(true);
+   BlockAllSignals(true, commandLineTool);
 #endif
 }
 
index 7b22973..e4af9ed 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
    bool dump = false, printResult = false, compileOnly = false, binary = false;
    int runCount = 1, rc = 0;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    func.m_iNumArgs = 0;
    func.m_pfHandler = F_new;
index 022aa71..a7719a9 100644 (file)
@@ -327,7 +327,7 @@ static BOOL ParseCommandLine(int argc, char *argv[])
  */
 int main(int argc, char* argv[])
 {
-   InitNetXMSProcess();
+   InitNetXMSProcess(false);
 
    // Check for alternate config file location
 #ifdef _WIN32
index 623a5b1..ff907c5 100644 (file)
@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
    int snmpPort = 161;
    const char *community = "public";
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index c1558a9..aab726c 100644 (file)
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
    TCHAR szKeyFile[MAX_PATH];
    RSA *pServerKey = NULL;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    GetNetXMSDirectory(nxDirData, szKeyFile);
    _tcscat(szKeyFile, DFILE_KEYS);
index 88f28cf..761fad1 100644 (file)
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
    BOOL bStart = TRUE, bCmdLineOK = FALSE;
    TCHAR *command = NULL;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
 #ifdef _WIN32
    WSADATA wsaData;
index 6aab77e..ff36a57 100644 (file)
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
    RSA *pServerKey = NULL;
    uuid guid;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    GetNetXMSDirectory(nxDirData, szKeyFile);
    _tcscat(szKeyFile, DFILE_KEYS);
index 2a221c1..37bb83a 100644 (file)
@@ -570,7 +570,7 @@ int main(int argc, char *argv[])
    bool replaceValue = true;
    int ch;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    TCHAR configFile[MAX_PATH] = _T("");
 
index bd1d56e..f2cee93 100644 (file)
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
        WCHAR *wcValue;
 #endif
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 #ifdef _WIN32
        SetExceptionHandler(SEHDefaultConsoleHandler, NULL, NULL, _T("nxget"), 0, FALSE, FALSE);
 #endif
index d5fd7e7..9c61bb3 100644 (file)
@@ -34,6 +34,8 @@
  */
 int main(int argc, char *argv[])
 {
+   InitNetXMSProcess(true);
+
    _tprintf(_T("NetXMS Module Info Tool Version ") NETXMS_VERSION_STRING _T(" Build ") NETXMS_BUILD_TAG IS_UNICODE_BUILD_STRING _T("\n\n"));
    if (argc != 2)
    {
index 87bff3b..e656a07 100644 (file)
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
    RSA *pServerKey = NULL;
    NXCPStreamCompressionMethod compression = NXCP_STREAM_COMPRESSION_NONE;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    GetNetXMSDirectory(nxDirData, szKeyFile);
    _tcscat(szKeyFile, DFILE_KEYS);
index f45f172..8bc1506 100644 (file)
@@ -169,10 +169,10 @@ int main(int argc, char *argv[])
    DWORD dwFlags = 0, dwRet;
    int i, ch, rc = 0;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
-   _tprintf(_T("NetXMS MIB Compiler  Version ") NETXMS_VERSION_STRING _T("\n")
-            _T("Copyright (c) 2005-2016 Raden Solutions\n\n"));
+   _tprintf(_T("NetXMS MIB Compiler  Version ") NETXMS_VERSION_STRING _T(" (") NETXMS_BUILD_TAG _T(")\n")
+            _T("Copyright (c) 2005-2017 Raden Solutions\n\n"));
 
    // Parse command line
    opterr = 1;
index 025bc07..61e3cb9 100644 (file)
@@ -139,11 +139,9 @@ int GetData(int argc, TCHAR *argv[])
    return iExit;
 }
 
-
-//
-// Startup
-//
-
+/**
+ * Startup
+ */
 int main(int argc, char *argv[])
 {
    int ch, iExit = 1;
@@ -151,7 +149,7 @@ int main(int argc, char *argv[])
    char *eptr;
    BOOL bStart = TRUE;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index ecef9ca..a66817f 100644 (file)
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
    char *eptr;
    BOOL bStart = TRUE;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index 1ab4b4d..0be6eec 100644 (file)
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
    char *eptr;
    BOOL bStart = TRUE;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index fab8f8b..fa92b92 100644 (file)
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
 #endif
        int ch;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
        if (argc < 2)
        {
index 959223a..6a2e9be 100644 (file)
@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
    bool isAgentSecret = false;
    bool decrypt = false;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;
index 1cb1cb0..eae4623 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int ch;
 
-   InitNetXMSProcess();
+   InitNetXMSProcess(true);
 
    // Parse command line
    opterr = 1;