APF/MPS fix.

This commit is contained in:
Ylian Saint-Hilaire 2020-10-07 23:18:15 -07:00
parent bd61bfe2d0
commit 47db002aaf
2 changed files with 7 additions and 1 deletions

View File

@ -641,6 +641,12 @@ module.exports.CreateApfServer = function (parent, db, args) {
}
}
obj.SetupCiraChannelToHost = function (host, targetport) {
var apfconn = obj.apfConnections[host];
if (apfconn == null) return null;
return obj.SetupCiraChannel(apfconn, targetport);
}
obj.SetupCiraChannel = function (socket, targetport) {
var sourceport = (socket.tag.nextsourceport++ % 30000) + 1024;
var cirachannel = { targetport: targetport, channelid: socket.tag.nextchannelid++, socket: socket, state: 1, sendcredits: 0, amtpendingcredits: 0, amtCiraWindow: 0, ciraWindow: 32768 };

View File

@ -867,7 +867,7 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) {
}
obj.SetupCiraChannelToHost = function (host, targetport) {
var ciraconn = obj.parent.mpsserver.ciraConnections[host];
var ciraconn = obj.ciraConnections[host];
if (ciraconn == null) return null;
return obj.SetupCiraChannel(ciraconn, targetport);
}