diff --git a/esp/scm/ws_smc.ecm b/esp/scm/ws_smc.ecm index 1c0e30a570f..5f2d7cc206f 100644 --- a/esp/scm/ws_smc.ecm +++ b/esp/scm/ws_smc.ecm @@ -310,7 +310,8 @@ ESPresponse BrowseResourcesResponse { string PortalURL; - string NetAddress; + [depr_ver("1.27")] string NetAddress; + [min_ver("1.27")] string ESPInstance; int OS; [min_ver("1.13")] bool UseResource; ESParray HPCCResourceRepositories; @@ -436,7 +437,7 @@ ESPresponse [exceptions_inline] GetBuildInfoResponse ESParray BuildInfo; }; -ESPservice [auth_feature("DEFERRED"), noforms, version("1.26"), default_client_version("1.26"), exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC +ESPservice [auth_feature("DEFERRED"), noforms, version("1.27"), default_client_version("1.27"), exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC { ESPmethod Index(SMCIndexRequest, SMCIndexResponse); ESPmethod [resp_xsl_default("/esp/xslt/index.xslt")] Activity(ActivityRequest, ActivityResponse); diff --git a/esp/services/ws_smc/ws_smcService.cpp b/esp/services/ws_smc/ws_smcService.cpp index 1b20ca3c7b3..2aff5b157d7 100644 --- a/esp/services/ws_smc/ws_smcService.cpp +++ b/esp/services/ws_smc/ws_smcService.cpp @@ -127,6 +127,7 @@ void CWsSMCEx::init(IPropertyTree *cfg, const char *process, const char *service throw MakeStringException(-1, "No Dali Connection Active. Please Specify a Dali to connect to in you configuration file"); } + espInstance.set(process); m_BannerAction = 0; m_EnableChatURL = false; m_BannerSize = "4"; @@ -1925,11 +1926,16 @@ bool CWsSMCEx::onBrowseResources(IEspContext &context, IEspBrowseResourcesReques double version = context.getClientVersion(); //The resource files will be downloaded from the same box of ESP (not dali) - StringBuffer ipStr; - IpAddress ipaddr = queryHostIP(); - ipaddr.getIpText(ipStr); - if (ipStr.length() > 0) - resp.setNetAddress(ipStr.str()); + if (version >= 1.27) + resp.setESPInstance(espInstance); + else + { + StringBuffer ipStr; + IpAddress ipaddr = queryHostIP(); + ipaddr.getIpText(ipStr); + if (!ipStr.isEmpty()) + resp.setNetAddress(ipStr.str()); + } #ifdef _WIN32 resp.setOS(MachineOsW2K); #else diff --git a/esp/services/ws_smc/ws_smcService.hpp b/esp/services/ws_smc/ws_smcService.hpp index a28b0f5507b..2c79a4ac17c 100644 --- a/esp/services/ws_smc/ws_smcService.hpp +++ b/esp/services/ws_smc/ws_smcService.hpp @@ -182,6 +182,7 @@ class CWsSMCEx : public CWsSMC StringBuffer m_BannerColor; StringBuffer m_BannerScroll; StringBuffer m_PortalURL; + StringAttr espInstance; int m_BannerAction; bool m_EnableChatURL; CriticalSection crit;