summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/CommunicatorI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/CommunicatorI.cpp')
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index b7a1a324960..02ff7d95913 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -80,7 +80,7 @@ Ice::CommunicatorI::createObjectAdapter(const string& name)
{
throw CommunicatorDestroyedException(__FILE__, __LINE__);
}
- string endpts = _instance->properties()->getProperty("ice.adapter." + name + ".endpoints");
+ string endpts = _instance->properties()->getProperty("Ice.Adapter." + name + ".Endpoints");
return createObjectAdapterWithEndpoints(name, endpts);
}
@@ -173,13 +173,7 @@ Ice::initialize(int&, char*[], Int version)
}
#endif
- PropertiesPtr properties;
- const char* file = getenv("ICE_CONFIG");
- if (file && *file != '\0')
- properties = new PropertiesI(file);
- else
- properties = new PropertiesI;
- return new CommunicatorI(properties);
+ return new CommunicatorI(getDefaultProperties());
}
CommunicatorPtr
@@ -196,6 +190,22 @@ Ice::initializeWithProperties(int&, char*[], const PropertiesPtr& properties, In
}
PropertiesPtr
+Ice::getDefaultProperties()
+{
+ PropertiesPtr properties;
+ const char* file = getenv("ICE_CONFIG");
+ if (file && *file != '\0')
+ {
+ properties = new PropertiesI(file);
+ }
+ else
+ {
+ properties = new PropertiesI;
+ }
+ return properties;
+}
+
+PropertiesPtr
Ice::createProperties()
{
return new PropertiesI;