summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpEndpointI.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-02-11 10:05:46 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-02-11 10:05:46 -0330
commit03367336089bb13363b2a1c745dd3474ebebb742 (patch)
tree1f3f7d719c6090bf0990580da73c8fa37f85b18e /cpp/src/Ice/UdpEndpointI.cpp
parentFix for bug 2665 (diff)
downloadice-03367336089bb13363b2a1c745dd3474ebebb742.tar.bz2
ice-03367336089bb13363b2a1c745dd3474ebebb742.tar.xz
ice-03367336089bb13363b2a1c745dd3474ebebb742.zip
Improved UDP multicast configuration
Diffstat (limited to 'cpp/src/Ice/UdpEndpointI.cpp')
-rw-r--r--cpp/src/Ice/UdpEndpointI.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/cpp/src/Ice/UdpEndpointI.cpp b/cpp/src/Ice/UdpEndpointI.cpp
index e6664fe9d8e..e535a6c23af 100644
--- a/cpp/src/Ice/UdpEndpointI.cpp
+++ b/cpp/src/Ice/UdpEndpointI.cpp
@@ -82,10 +82,27 @@ IceInternal::UdpEndpointI::UdpEndpointI(const InstancePtr& instance, const strin
if(argumentBeg != string::npos && str[argumentBeg] != '-')
{
beg = argumentBeg;
- end = str.find_first_of(delim, beg);
- if(end == string::npos)
+ if(str[beg] == '\"')
{
- end = str.length();
+ end = str.find_first_of('\"', beg + 1);
+ if(end == string::npos)
+ {
+ EndpointParseException ex(__FILE__, __LINE__);
+ ex.str = "udp " + str;
+ throw ex;
+ }
+ else
+ {
+ ++end;
+ }
+ }
+ else
+ {
+ end = str.find_first_of(delim, beg);
+ if(end == string::npos)
+ {
+ end = str.length();
+ }
}
argument = str.substr(beg, end - beg);
if(argument[0] == '\"' && argument[argument.size() - 1] == '\"')