summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2Lib/SessionHelper.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-11-12 18:41:03 +0100
committerJose <jose@zeroc.com>2014-11-12 18:41:03 +0100
commitde04d5d1131efcf445c3055de34e121727591b86 (patch)
tree58d98f657184023d2625d61b7a6beb6f110810a6 /cpp/src/Glacier2Lib/SessionHelper.cpp
parentFixes for the demo distribution java build (diff)
downloadice-de04d5d1131efcf445c3055de34e121727591b86.tar.bz2
ice-de04d5d1131efcf445c3055de34e121727591b86.tar.xz
ice-de04d5d1131efcf445c3055de34e121727591b86.zip
SessionFactoryHelper fixes
Diffstat (limited to 'cpp/src/Glacier2Lib/SessionHelper.cpp')
-rw-r--r--cpp/src/Glacier2Lib/SessionHelper.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp
index a8069ba2414..0e75b6b2136 100644
--- a/cpp/src/Glacier2Lib/SessionHelper.cpp
+++ b/cpp/src/Glacier2Lib/SessionHelper.cpp
@@ -927,6 +927,13 @@ int
Glacier2::SessionFactoryHelper::getPort() const
{
IceUtil::Mutex::Lock sync(_mutex);
+ return getPortInternal();
+}
+
+int
+Glacier2::SessionFactoryHelper::getPortInternal() const
+{
+ // Must be called with the muext lock
return _port == 0 ? ((_protocol == "ssl" || _protocol == "wss") ? GLACIER2_SSL_PORT : GLACIER2_TCP_PORT) : _port;
}
@@ -1016,7 +1023,7 @@ Glacier2::SessionFactoryHelper::createProxyStr(const Ice::Identity& ident)
{
os << ident.category << "/";
}
- os << ident.name << "\":" << _protocol << " -p " << getPort() << " -h " << _routerHost;
+ os << ident.name << "\":" << _protocol << " -p " << getPortInternal() << " -h " << _routerHost;
if(_timeout > 0)
{
os << " -t " << _timeout;