diff options
author | Jose <pepone@users.noreply.github.com> | 2019-09-10 22:03:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 22:03:44 +0200 |
commit | c7b9f79e8bb324dd407eba8503c24f7bba012844 (patch) | |
tree | 934b4c0938d6145db919f41bb3851af83ee14444 /csharp/src | |
parent | Dispose the X509Chain with .NET Standard 2.0 - Close #518 (diff) | |
download | ice-c7b9f79e8bb324dd407eba8503c24f7bba012844.tar.bz2 ice-c7b9f79e8bb324dd407eba8503c24f7bba012844.tar.xz ice-c7b9f79e8bb324dd407eba8503c24f7bba012844.zip |
Fixes for endpoint to string conversion - Close #517 (#519)
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Ice/IPEndpointI.cs | 13 | ||||
-rw-r--r-- | csharp/src/Ice/UdpEndpointI.cs | 12 |
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) |