This is an automated email from the ASF dual-hosted git repository.
mmartell pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new 8233e2f GEODE-7511: Fix endpoint truncation bug (#557)
8233e2f is described below
commit 8233e2fdc44cebf3ebfac607960b2003ba864f54
Author: Michael Martell <[email protected]>
AuthorDate: Thu Nov 28 12:10:50 2019 -0800
GEODE-7511: Fix endpoint truncation bug (#557)
* DNS name was being truncated to 128 characters
* Also replace char[128] with std::string
---
cppcache/src/ThinClientPoolDM.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cppcache/src/ThinClientPoolDM.cpp
b/cppcache/src/ThinClientPoolDM.cpp
index 120332e..1dc6e31 100644
--- a/cppcache/src/ThinClientPoolDM.cpp
+++ b/cppcache/src/ThinClientPoolDM.cpp
@@ -579,10 +579,10 @@ std::string ThinClientPoolDM::selectEndpoint(
getStats().setLocators((m_locHelper)->getCurLocatorsNum());
getStats().incLoctorResposes();
- char epNameStr[128] = {0};
- std::snprintf(epNameStr, 128, "%s:%d", outEndpoint.getServerName().c_str(),
- outEndpoint.getPort());
- LOGFINE("ThinClientPoolDM: Locator returned endpoint [%s]", epNameStr);
+ std::string epNameStr = outEndpoint.getServerName() + ":" +
+ std::to_string(outEndpoint.getPort());
+ LOGFINE("ThinClientPoolDM: Locator returned endpoint [%s]",
+ epNameStr.c_str());
return epNameStr;
} else if (!m_attrs->m_initServList.empty()) {
// use specified server endpoints