Jelajahi Sumber

HPCC-13092 Revised based on review

1. Check environment before using it; 2. Not increment the
default_client_version.

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 10 tahun lalu
induk
melakukan
8c4ed3aff6
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 1 1
      esp/scm/ws_topology.ecm
  2. 2 0
      esp/smc/SMCLib/TpWrapper.cpp

+ 1 - 1
esp/scm/ws_topology.ecm

@@ -583,7 +583,7 @@ ESPresponse [exceptions_inline,encode(0)] TpGetServicePluginsResponse
     ESParray<ESPstruct TpEspServicePlugin, Plugin> Plugins;
 };
 
-ESPservice [noforms, version("1.21"), default_client_version("1.21"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsTopology
+ESPservice [noforms, version("1.21"), default_client_version("1.20"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsTopology
 {
     ESPuses ESPStruct TpBinding;
     ESPuses ESPstruct TpCluster;

+ 2 - 0
esp/smc/SMCLib/TpWrapper.cpp

@@ -1367,6 +1367,8 @@ bool CTpWrapper::checkGroupReplicateOutputs(const char* groupName, const char* k
 
     Owned<IEnvironmentFactory> factory = getEnvironmentFactory();
     Owned<IConstEnvironment> environment = factory->openEnvironment();
+    if (!environment)
+        throw MakeStringException(ECLWATCH_CANNOT_GET_ENV_INFO, "Failed to get environment information.");
     Owned<IPropertyTree> root = &environment->getPTree();
     if (!root)
         throw MakeStringException(ECLWATCH_CANNOT_GET_ENV_INFO, "Failed to get environment information.");