diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-12-19 22:06:38 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-12-19 22:06:38 +0100 |
commit | f6121ea342641eb36f7cd67c7c877a1c70ec3055 (patch) | |
tree | b545f3a2548b81fd8dd56a87a58f98b992c0066b /cpp/src/Ice/ReferenceFactory.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-f6121ea342641eb36f7cd67c7c877a1c70ec3055.tar.bz2 ice-f6121ea342641eb36f7cd67c7c877a1c70ec3055.tar.xz ice-f6121ea342641eb36f7cd67c7c877a1c70ec3055.zip |
- Merge IPv6 support from Dwayne's branch.
- Reviewed and fixed IPv6 bugs.
- Fixed bug in the outgoing connection factory where an assert could be
triggered if the proxy contained identical endpoints
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ReferenceFactory.cpp | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 0e894056597..ac8ebec8c10 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -450,10 +450,47 @@ IceInternal::ReferenceFactory::create(const string& str) { beg = end + 1; - end = s.find(':', beg); - if(end == string::npos) + end = beg; + while(true) { - end = s.length(); + end = s.find(':', end); + if(end == string::npos) + { + end = s.length(); + break; + } + else + { + bool quoted = false; + string::size_type quote = beg; + while(true) + { + quote = s.find('\"', quote); + if(quote == string::npos || end < quote) + { + break; + } + else + { + quote = s.find('\"', ++quote); + if(quote == string::npos) + { + break; + } + else if(end < quote) + { + quoted = true; + break; + } + ++quote; + } + } + if(!quoted) + { + break; + } + ++end; + } } string es = s.substr(beg, end - beg); |