Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs

This commit is contained in:
Bryan Ashby 2017-02-21 21:33:17 -07:00
commit 76706c77bd
2 changed files with 15 additions and 11 deletions

View File

@ -296,7 +296,7 @@ function Packet(options) {
buffer.writeUInt16LE(packetHeader.baud, 16); buffer.writeUInt16LE(packetHeader.baud, 16);
buffer.writeUInt16LE(FTN_PACKET_HEADER_TYPE, 18); buffer.writeUInt16LE(FTN_PACKET_HEADER_TYPE, 18);
buffer.writeUInt16LE(packetHeader.origNet, 20); buffer.writeUInt16LE(-1 === packetHeader.origNet ? 0xff : packetHeader.origNet, 20);
buffer.writeUInt16LE(packetHeader.destNet, 22); buffer.writeUInt16LE(packetHeader.destNet, 22);
buffer.writeUInt8(packetHeader.prodCodeLo, 24); buffer.writeUInt8(packetHeader.prodCodeLo, 24);
buffer.writeUInt8(packetHeader.prodRevHi, 25); buffer.writeUInt8(packetHeader.prodRevHi, 25);
@ -318,7 +318,7 @@ function Packet(options) {
buffer.writeUInt32LE(packetHeader.prodData, 54); buffer.writeUInt32LE(packetHeader.prodData, 54);
return buffer; return buffer;
} };
this.writePacketHeader = function(packetHeader, ws) { this.writePacketHeader = function(packetHeader, ws) {
let buffer = new Buffer(FTN_PACKET_HEADER_SIZE); let buffer = new Buffer(FTN_PACKET_HEADER_SIZE);
@ -334,7 +334,7 @@ function Packet(options) {
buffer.writeUInt16LE(packetHeader.baud, 16); buffer.writeUInt16LE(packetHeader.baud, 16);
buffer.writeUInt16LE(FTN_PACKET_HEADER_TYPE, 18); buffer.writeUInt16LE(FTN_PACKET_HEADER_TYPE, 18);
buffer.writeUInt16LE(packetHeader.origNet, 20); buffer.writeUInt16LE(-1 === packetHeader.origNet ? 0xff : packetHeader.origNet, 20);
buffer.writeUInt16LE(packetHeader.destNet, 22); buffer.writeUInt16LE(packetHeader.destNet, 22);
buffer.writeUInt8(packetHeader.prodCodeLo, 24); buffer.writeUInt8(packetHeader.prodCodeLo, 24);
buffer.writeUInt8(packetHeader.prodRevHi, 25); buffer.writeUInt8(packetHeader.prodRevHi, 25);

View File

@ -803,6 +803,9 @@ function FTNMessageScanTossModule() {
], ],
err => { err => {
// :TODO: do something with |err| ? // :TODO: do something with |err| ?
if(err) {
Log.warn(err.message);
}
nextUplink(); nextUplink();
} }
); );
@ -1214,7 +1217,7 @@ function FTNMessageScanTossModule() {
return false; return false;
}; };
// ends an export block // ends an export block
this.exportingEnd = function() { this.exportingEnd = function() {
this.exportRunning = false; this.exportRunning = false;
@ -1263,14 +1266,15 @@ FTNMessageScanTossModule.prototype.startup = function(cb) {
'Export schedule loaded' 'Export schedule loaded'
); );
if(exportSchedule.sched && this.exportingStart()) { if(exportSchedule.sched) {
this.exportTimer = later.setInterval( () => { this.exportTimer = later.setInterval( () => {
if(this.exportingStart()) {
Log.info( { module : exports.moduleInfo.name }, 'Performing scheduled message scan/export...'); Log.info( { module : exports.moduleInfo.name }, 'Performing scheduled message scan/export...');
this.performExport( () => { this.performExport( () => {
this.exportingEnd(); this.exportingEnd();
}); });
}
}, exportSchedule.sched); }, exportSchedule.sched);
} }