diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-06-08 21:22:03 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-06-08 21:22:03 +0000 |
commit | 9ec25ba4874ea02532e20df62ea39c2bee437093 (patch) | |
tree | 246e5baf94a22de8845458e9af0294a1703fe09f /cpp/src/Ice/PropertiesI.cpp | |
parent | Better implementation (diff) | |
download | ice-9ec25ba4874ea02532e20df62ea39c2bee437093.tar.bz2 ice-9ec25ba4874ea02532e20df62ea39c2bee437093.tar.xz ice-9ec25ba4874ea02532e20df62ea39c2bee437093.zip |
Better handling of multiples argc/argv calls
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r-- | cpp/src/Ice/PropertiesI.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index 9b72c78c51d..b1dc6c20128 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -262,6 +262,8 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults) setProperty("Ice.ProgramName", name); } StringSeq tmp; + + bool loadConfigFiles = false; while(q != args.end()) { string s = *q; @@ -272,6 +274,7 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults) s += "=1"; } parseLine(s.substr(2)); + loadConfigFiles = true; } else { @@ -281,7 +284,18 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults) } args = tmp; - loadConfig(); + if(!loadConfigFiles) + { + // + // If Ice.Config is not set, load from ICE_CONFIG (if set) + // + loadConfigFiles = (_properties.find("Ice.Config") == _properties.end()); + } + + if(loadConfigFiles) + { + loadConfig(); + } args = parseIceCommandLineOptions(args); } |