summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-09-23 11:28:10 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-09-23 11:28:10 +0200
commit93144c8b87e620892fd6f5c0edeb0f3bb819f788 (patch)
tree3ec787c05f9c790d8b485aec7cdd8a0b80c2bebd /cpp/src
parentFixed potential IceStorm/stress test failures (diff)
downloadice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.tar.bz2
ice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.tar.xz
ice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.zip
Fixed ICE-7230 - Issue with adpater IDs with spaces
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/Util.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp
index 1553c8be228..c56e30717c0 100644
--- a/cpp/src/IceGrid/Util.cpp
+++ b/cpp/src/IceGrid/Util.cpp
@@ -16,7 +16,7 @@ using namespace std;
using namespace Ice;
using namespace IceGrid;
-string
+string
IceGrid::toString(const vector<string>& v, const string& sep)
{
ostringstream os;
@@ -61,7 +61,7 @@ IceGrid::toString(const Ice::Exception& exception)
string
IceGrid::getProperty(const PropertyDescriptorSeq& properties, const string& name, const string& def)
-{
+{
string result;
for(PropertyDescriptorSeq::const_iterator q = properties.begin(); q != properties.end(); ++q)
{
@@ -79,7 +79,7 @@ IceGrid::getProperty(const PropertyDescriptorSeq& properties, const string& name
int
IceGrid::getPropertyAsInt(const PropertyDescriptorSeq& properties, const string& name, int def)
-{
+{
string strVal;
for(PropertyDescriptorSeq::const_iterator q = properties.begin(); q != properties.end(); ++q)
{
@@ -88,7 +88,7 @@ IceGrid::getPropertyAsInt(const PropertyDescriptorSeq& properties, const string&
strVal = q->value;
}
}
-
+
int result = def;
if(!strVal.empty())
@@ -104,7 +104,7 @@ IceGrid::getPropertyAsInt(const PropertyDescriptorSeq& properties, const string&
bool
IceGrid::hasProperty(const PropertyDescriptorSeq& properties, const string& name)
-{
+{
for(PropertyDescriptorSeq::const_iterator q = properties.begin(); q != properties.end(); ++q)
{
if(q->name == name)
@@ -156,7 +156,7 @@ IceGrid::escapeProperty(const string& s, bool escapeEqual)
previousCharIsEscape = false;
break;
}
-
+
case '\\':
case '#':
case '=':
@@ -212,7 +212,7 @@ IceGrid::toObjectInfo(const Ice::CommunicatorPtr& communicator, const ObjectDesc
{
proxyStr << ' ' << obj.proxyOptions;
}
- proxyStr << " @ " << adapterId;
+ proxyStr << " @ \"" << adapterId << "\"";
try
{
info.proxy = communicator->stringToProxy(proxyStr.str());
@@ -220,7 +220,7 @@ IceGrid::toObjectInfo(const Ice::CommunicatorPtr& communicator, const ObjectDesc
catch(const Ice::ProxyParseException&)
{
ostringstream fallbackProxyStr;
- fallbackProxyStr << "\"" << communicator->identityToString(obj.id) << "\"" << " @ " << adapterId;
+ fallbackProxyStr << "\"" << communicator->identityToString(obj.id) << "\"" << " @ \"" << adapterId << "\"";
info.proxy = communicator->stringToProxy(fallbackProxyStr.str());
}
return info;
@@ -246,7 +246,7 @@ IceGrid::setupThreadPool(const PropertiesPtr& properties, const string& name, in
{
sizeMax = size * 10;
}
-
+
ostringstream os;
os << sizeMax;
properties->setProperty(name + ".SizeMax", os.str());
@@ -277,7 +277,7 @@ IceGrid::getMMVersion(const string& o)
}
if(patchPos != string::npos)
- {
+ {
if((minorPos == 1 && patchPos != 3 && patchPos != 4) || (minorPos == 2 && patchPos != 4 && patchPos != 5))
{
return -1;
@@ -326,6 +326,6 @@ IceGrid::getMMVersion(const string& o)
// }
// ver += v;
// }
-
+
return ver;
}