summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/IPEndpointI.cs13
-rw-r--r--csharp/src/Ice/UdpEndpointI.cs12
2 files changed, 23 insertions, 2 deletions
diff --git a/csharp/src/Ice/IPEndpointI.cs b/csharp/src/Ice/IPEndpointI.cs
index 38a84b85fc7..d04b5d91d54 100644
--- a/csharp/src/Ice/IPEndpointI.cs
+++ b/csharp/src/Ice/IPEndpointI.cs
@@ -224,7 +224,18 @@ namespace IceInternal
if(sourceAddr_ != null)
{
- s += " --sourceAddress " + Network.endpointAddressToString(sourceAddr_);
+ string sourceAddr = Network.endpointAddressToString(sourceAddr_);
+ bool addQuote = sourceAddr.IndexOf(':') != -1;
+ s += " --sourceAddress ";
+ if(addQuote)
+ {
+ s += "\"";
+ }
+ s += sourceAddr;
+ if(addQuote)
+ {
+ s += "\"";
+ }
}
return s;
diff --git a/csharp/src/Ice/UdpEndpointI.cs b/csharp/src/Ice/UdpEndpointI.cs
index 49d39f02576..cf0a7cc1768 100644
--- a/csharp/src/Ice/UdpEndpointI.cs
+++ b/csharp/src/Ice/UdpEndpointI.cs
@@ -198,7 +198,17 @@ namespace IceInternal
if(_mcastInterface.Length != 0)
{
- s += " --interface " + _mcastInterface;
+ bool addQuote = _mcastInterface.IndexOf(':') != -1;
+ s += " --interface ";
+ if(addQuote)
+ {
+ s += "\"";
+ }
+ s += _mcastInterface;
+ if(addQuote)
+ {
+ s += "\"";
+ }
}
if(_mcastTtl != -1)