diff --git a/exec/binkit.js b/exec/binkit.js index b861ff24d5365c30c300cb168409c6bbeade2766..f31fd2b2f99116b180915c37de623cc8f784ae77 100644 --- a/exec/binkit.js +++ b/exec/binkit.js @@ -488,6 +488,7 @@ function callout(addr, scfg, ftnd, semaphores, locks) var myaddr = FIDO.parse_addr(system.fido_addr_list[0], 1, 'fidonet'); var bp = new BinkP('BinkIT/'+("$Revision$".split(' ')[1]), undefined, rx_callback, tx_callback); var port; + var host; var f; var success = false; var src_addr; @@ -506,6 +507,7 @@ function callout(addr, scfg, ftnd, semaphores, locks) if (bp.cb_data.binkitcfg.node[addr] !== undefined) { bp.cb_data.binkitpw = bp.cb_data.binkitcfg.node[addr].pass; port = bp.cb_data.binkitcfg.node[addr].port; + host = bp.cb_data.binkitcfg.node[addr].host; bp.require_md5 = !(bp.cb_data.binkitcfg.node[addr].nomd5); bp.require_crypt = !(bp.cb_data.binkitcfg.node[addr].nocrypt); } @@ -576,7 +578,7 @@ function callout(addr, scfg, ftnd, semaphores, locks) }); // We won't add files until the auth finishes... - success = bp.connect(addr, bp.cb_data.binkitpw, callout_auth_cb, port); + success = bp.connect(addr, bp.cb_data.binkitpw, callout_auth_cb, port, host); callout_done(bp, semaphores); } diff --git a/exec/load/binkp.js b/exec/load/binkp.js index 56817e6ab8b292757e68bec1720cc4584844836b..72611e2db0cb061ba144a79f1f0c383b722d2db4 100644 --- a/exec/load/binkp.js +++ b/exec/load/binkp.js @@ -366,7 +366,7 @@ BinkP.prototype.parseArgs = function(data) * parameter string send with the M_OK message... hopefully either "secure" * or "non-secure" */ -BinkP.prototype.connect = function(addr, password, auth_cb, port) +BinkP.prototype.connect = function(addr, password, auth_cb, port, inet_host) { var pkt; var i; @@ -385,13 +385,15 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port) this.require_md5 = false; if (port === undefined) port = 24554; + if (inet_host === undefined) + inet_host = addr.inet_host; if (this.sock === undefined) this.sock = new Socket(SOCK_STREAM, "binkp"); - if(!this.sock.connect(addr.inet_host, port)) { + if(!this.sock.connect(inet_host, port)) { this.sock = undefined; - log(LOG_INFO, "Connection to "+addr.inet_host+":"+port+" failed."); + log(LOG_INFO, "Connection to "+inet_host+":"+port+" failed."); return false; } diff --git a/exec/load/fidocfg.js b/exec/load/fidocfg.js index 044639614bb4e104ba3faef30787faaff2740a0a..c1ce0c384b117043cb28a6ac5c0d5cd3454326cd 100644 --- a/exec/load/fidocfg.js +++ b/exec/load/fidocfg.js @@ -330,6 +330,7 @@ function BinkITCfg() this.node[sec].norypt = f.iniGetValue(section, 'AllowUnencrypted'); this.node[sec].port = f.iniGetValue(section, 'Port'); this.node[sec].src = f.iniGetValue(section, 'SourceAddress'); + this.node[sec].host = f.iniGetValue(section, 'Host'); if (this.node[sec].nomd5 == undefined) this.node[sec].nomd5 = false; else {