Skip to content
Snippets Groups Projects
Commit f2b92272 authored by deuce's avatar deuce
Browse files

Add new 'Capabilities' global key in binkit.ini to allow modifying the

'NDL' line that is sent.  There doesn't seem to be a spcification for what
goes here though.
parent 1dfd6787
No related branches found
No related tags found
No related merge requests found
......@@ -534,6 +534,8 @@ function callout(addr, scfg, ftnd, semaphores, locks)
bp.default_zone = myaddr.zone;
bp.default_domain = myaddr.domain;
bp.want_callback = callout_want_callback;
if (bp.cb_data.binkitcfg.caps !== undefined)
bp.capabilities = bp.cb_data.binkitcfg.caps;
/*
* We can't use the defaults since the defaults are only 4D addresses,
......@@ -881,6 +883,8 @@ function run_inbound(sock)
bp.default_zone = myaddr.zone;
bp.default_domain = myaddr.domain;
bp.want_callback = callout_want_callback;
if (bp.cb_data.binkitcfg.caps !== undefined)
bp.capabilities = bp.cb_data.binkitcfg.caps;
// We can't use the defaults since the defaults are only 4D addresses.
bp.addr_list = [];
......
......@@ -83,6 +83,7 @@ function BinkP(name_ver, inbound, rx_callback, tx_callback)
this.will_crypt = false;
this.in_keys = undefined;
this.out_keys = undefined;
this.capabilities = '115200,TCP,BINKP';
this.sent_files = [];
this.failed_sent_files = [];
......@@ -408,7 +409,7 @@ BinkP.prototype.connect = function(addr, password, auth_cb, port)
this.sendCmd(this.command.M_NUL, "SYS "+this.system_name);
this.sendCmd(this.command.M_NUL, "ZYZ "+this.system_operator);
this.sendCmd(this.command.M_NUL, "LOC "+this.system_location);
this.sendCmd(this.command.M_NUL, "NDL 115200,TCP,BINKP");
this.sendCmd(this.command.M_NUL, "NDL "+this.capabilities);
this.sendCmd(this.command.M_NUL, "TIME "+new Date().toString());
this.sendCmd(this.command.M_NUL, "VER "+this.name_ver+",JSBinkP/"+("$Revision$".split(' ')[1])+'/'+system.platform+" binkp/1.1");
this.sendCmd(this.command.M_ADR, this.addr_list.join(' '));
......
......@@ -319,6 +319,7 @@ function BinkITCfg()
log(LOG_ERROR, "Unable to open '"+f.name+"'");
}
else {
this.caps = f.iniGetValue(null, 'Capabilities');
sects = f.iniGetSections();
sects.forEach(function(section) {
var sec = section.toLowerCase();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment