summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/PropertiesI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-08-03 20:02:57 +0000
committerBernard Normier <bernard@zeroc.com>2006-08-03 20:02:57 +0000
commitfe50c3c9389caf6989e35b09c2a171db59eb163f (patch)
tree7bf735fc84efb805a4587441f5565a50e4ee51c6 /cpp/src/Ice/PropertiesI.cpp
parentupdate dependencies (diff)
downloadice-fe50c3c9389caf6989e35b09c2a171db59eb163f.tar.bz2
ice-fe50c3c9389caf6989e35b09c2a171db59eb163f.tar.xz
ice-fe50c3c9389caf6989e35b09c2a171db59eb163f.zip
Fixed bugs #1284 and #1288
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index 7030dd34114..e160fe6cf8f 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -178,6 +178,7 @@ Ice::PropertiesI::parseCommandLineOptions(const string& prefix, const StringSeq&
for(i = 0; i < options.size(); i++)
{
string opt = options[i];
+
if(opt.find(pfx) == 0)
{
if(opt.find('=') == string::npos)
@@ -253,17 +254,22 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults, co
}
StringSeq::iterator q = args.begin();
- if(q != args.end())
+
+ if(_properties.find("Ice.ProgramName") == _properties.end())
{
- //
- // Use the first argument as the value for Ice.ProgramName. Replace
- // any backslashes in this value with forward slashes, in case this
- // value is used by the event logger.
- //
- string name = *q;
- replace(name.begin(), name.end(), '\\', '/');
- setProperty("Ice.ProgramName", name);
+ if(q != args.end())
+ {
+ //
+ // Use the first argument as the value for Ice.ProgramName. Replace
+ // any backslashes in this value with forward slashes, in case this
+ // value is used by the event logger.
+ //
+ string name = *q;
+ replace(name.begin(), name.end(), '\\', '/');
+ setProperty("Ice.ProgramName", name);
+ }
}
+
StringSeq tmp;
bool loadConfigFiles = false;