summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-04-28 19:27:04 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-04-28 19:27:04 +0200
commite6e102cc642e78cf9da55645c82f5bfe6eacb76d (patch)
treeab5861ee9ad2a909fa0dc8f25b1b12e0dd1d6527 /js
parentFixed ICE-6443 and other SSL fixes (diff)
downloadice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.tar.bz2
ice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.tar.xz
ice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.zip
Fixed previous commit which was incomplete
Diffstat (limited to 'js')
-rw-r--r--js/src/Ice/PropertyNames.js3
-rw-r--r--js/src/Ice/WSEndpoint.js5
-rw-r--r--js/src/Ice/browser/WSTransceiver.js5
-rw-r--r--js/src/Ice/sources.json3
-rw-r--r--js/test/Ice/proxy/Client.js37
5 files changed, 46 insertions, 7 deletions
diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js
index 49b3c928d1f..4b1fe5b144a 100644
--- a/js/src/Ice/PropertyNames.js
+++ b/js/src/Ice/PropertyNames.js
@@ -6,7 +6,7 @@
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Dec 9 12:08:30 2014
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Tue Apr 28 17:34:50 2015
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -189,6 +189,7 @@ PropertyNames.IceProps =
new Property("/^Ice\.Warn\.UnusedProperties/", false, null),
new Property("/^Ice\.CacheMessageBuffers/", false, null),
new Property("/^Ice\.ThreadInterruptSafe/", false, null),
+ new Property("/^Ice\.Voip/", false, null),
];
/* jshint +W044*/
diff --git a/js/src/Ice/WSEndpoint.js b/js/src/Ice/WSEndpoint.js
index 6ccc3dcaf40..42160ed4a05 100644
--- a/js/src/Ice/WSEndpoint.js
+++ b/js/src/Ice/WSEndpoint.js
@@ -16,7 +16,8 @@ Ice.__M.require(module,
"../Ice/StringUtil",
"../Ice/EndpointI",
"../Ice/LocalException",
- "../Ice/WSTransceiver"
+ "../Ice/WSTransceiver",
+ "../Ice/EndpointInfo"
]);
var HashUtil = Ice.HashUtil;
@@ -33,7 +34,7 @@ var WSEndpoint = Class(EndpointI, {
},
getInfo: function()
{
- var info = new Ice.WSEndpointInfo();
+ var info = this._delegate.secure() ? new IceSSL.WSSEndpointInfo() : new Ice.WSEndpointInfo();
info.resource = this._resource;
this._delegate.fillEndpointInfo(info);
return info;
diff --git a/js/src/Ice/browser/WSTransceiver.js b/js/src/Ice/browser/WSTransceiver.js
index e0a16ed45cb..9cea74acd92 100644
--- a/js/src/Ice/browser/WSTransceiver.js
+++ b/js/src/Ice/browser/WSTransceiver.js
@@ -18,7 +18,8 @@ Ice.__M.require(module,
"../Ice/Connection",
"../Ice/Exception",
"../Ice/LocalException",
- "../Ice/Timer"
+ "../Ice/Timer",
+ "../Ice/ConnectionInfo"
]);
var Debug = Ice.Debug;
@@ -284,7 +285,7 @@ var WSTransceiver = Ice.Class({
getInfo: function()
{
Debug.assert(this._fd !== null);
- var info = new Ice.WSConnectionInfo();
+ var info = this._secure ? new IceSSL.WSSConnectionInfo() : new Ice.WSConnectionInfo();
//
// The WebSocket API doens't provide this info
diff --git a/js/src/Ice/sources.json b/js/src/Ice/sources.json
index 953d085b91e..751d4c7cbff 100644
--- a/js/src/Ice/sources.json
+++ b/js/src/Ice/sources.json
@@ -20,7 +20,8 @@
"Ice/Router.ice",
"Ice/SliceChecksumDict.ice",
"Ice/Version.ice",
- "IceSSL/EndpointInfo.ice"],
+ "IceSSL/EndpointInfo.ice",
+ "IceSSL/ConnectionInfo.ice"],
"common": [
"ACM.js",
diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js
index 38bdd4d2310..d31c1f9b1b1 100644
--- a/js/test/Ice/proxy/Client.js
+++ b/js/test/Ice/proxy/Client.js
@@ -10,6 +10,7 @@
(function(module, require, exports)
{
var Ice = require("ice").Ice;
+ var IceSSL = require("ice").IceSSL;
var Test = require("Test").Test;
var Promise = Ice.Promise;
@@ -916,7 +917,7 @@
}
var p1, pstr;
-
+
// Legal TCP endpoint expressed as opaque endpoint
p1 = communicator.stringToProxy("test -e 1.1:opaque -e 1.0 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
pstr = communicator.proxyToString(p1);
@@ -1019,6 +1020,40 @@
).then(
function()
{
+ var p = communicator.stringToProxy("test:default -p 12010");
+ if(defaultProtocol === "tcp")
+ {
+ test(p.ice_getEndpoints()[0].getInfo() instanceof Ice.TCPEndpointInfo);
+ }
+ else if(defaultProtocol === "ws")
+ {
+ test(p.ice_getEndpoints()[0].getInfo() instanceof Ice.WSEndpointInfo);
+ }
+ else if(defaultProtocol === "wss")
+ {
+ test(p.ice_getEndpoints()[0].getInfo() instanceof IceSSL.WSSEndpointInfo);
+ }
+ return p.ice_getConnection()
+ }
+ ).then(
+ function(con)
+ {
+ if(defaultProtocol === "tcp")
+ {
+ test(con.getInfo() instanceof Ice.TCPConnectionInfo);
+ }
+ else if(defaultProtocol === "ws")
+ {
+ test(con.getInfo() instanceof Ice.WSConnectionInfo);
+ }
+ else if(defaultProtocol === "wss")
+ {
+ test(con.getInfo() instanceof IceSSL.WSSConnectionInfo);
+ }
+ }
+ ).then(
+ function()
+ {
out.writeLine("ok");
var derived = Test.MyDerivedClassPrx.uncheckedCast(communicator.stringToProxy("test:default -p 12010"));
return derived.shutdown();