summaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJose <pepone@users.noreply.github.com>2019-09-10 22:03:44 +0200
committerGitHub <noreply@github.com>2019-09-10 22:03:44 +0200
commitc7b9f79e8bb324dd407eba8503c24f7bba012844 (patch)
tree934b4c0938d6145db919f41bb3851af83ee14444 /js/src
parentDispose the X509Chain with .NET Standard 2.0 - Close #518 (diff)
downloadice-c7b9f79e8bb324dd407eba8503c24f7bba012844.tar.bz2
ice-c7b9f79e8bb324dd407eba8503c24f7bba012844.tar.xz
ice-c7b9f79e8bb324dd407eba8503c24f7bba012844.zip
Fixes for endpoint to string conversion - Close #517 (#519)
Diffstat (limited to 'js/src')
-rw-r--r--js/src/Ice/IPEndpointI.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/js/src/Ice/IPEndpointI.js b/js/src/Ice/IPEndpointI.js
index 9630847396c..06bf0298325 100644
--- a/js/src/Ice/IPEndpointI.js
+++ b/js/src/Ice/IPEndpointI.js
@@ -24,7 +24,7 @@ class IPEndpointI extends Ice.EndpointI
super();
this._instance = instance;
this._host = ho === undefined ? null : ho;
- this._port = po === undefined ? null : po;
+ this._port = po === undefined ? 0 : po;
this._sourceAddr = sa === undefined ? null : sa;
this._connectionId = conId === undefined ? "" : conId;
}
@@ -132,7 +132,17 @@ class IPEndpointI extends Ice.EndpointI
if(this._sourceAddr !== null && this._sourceAddr.length > 0)
{
- s += " --sourceAddr " + this._sourceAddr;
+ s += " --sourceAddress ";
+ const addQuote = this._sourceAddr.indexOf(':') != -1;
+ if(addQuote)
+ {
+ s += "\"";
+ }
+ s += this._sourceAddr;
+ if(addQuote)
+ {
+ s += "\"";
+ }
}
return s;
}