From 4458bcfd378b87b8a3b7bebcb31febe369535f4c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 7 Dec 2015 21:44:42 -0700 Subject: [PATCH] * Remove inhSocket stuff at least for now: a) It's untested and liekly dangerous, b) does not work with SSH connections --- core/door.js | 2 +- core/dropfile.js | 3 ++- mods/abracadabra.js | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/door.js b/core/door.js index 4b447629..57561bb4 100644 --- a/core/door.js +++ b/core/door.js @@ -95,7 +95,7 @@ Door.prototype.run = function() { args[i] = self.exeInfo.args[i].format({ dropFile : self.exeInfo.dropFile, node : self.exeInfo.node.toString(), - inhSocket : self.exeInfo.inhSocket.toString(), + //inhSocket : self.exeInfo.inhSocket.toString(), srvPort : sockServer ? sockServer.address().port.toString() : '-1', userId : self.client.user.userId.toString(), }); diff --git a/core/dropfile.js b/core/dropfile.js index a84eaec3..b44d7efe 100644 --- a/core/dropfile.js +++ b/core/dropfile.js @@ -154,7 +154,8 @@ function DropFile(client, fileType) { // :TODO: local/serial/telnet need to be configurable -- which also changes socket handle! return iconv.encode([ '2', // :TODO: This needs to be configurable! - self.client.output._handle.fd.toString(), // :TODO: ALWAYS -1 on Windows! + // :TODO: Completely broken right now -- This need to be configurable & come from temp socket server most likely + '-1', // self.client.output._handle.fd.toString(), // :TODO: ALWAYS -1 on Windows! '57600', Config.general.boardName, self.client.user.userId.toString(), diff --git a/mods/abracadabra.js b/mods/abracadabra.js index 20fc1b19..5e5ff34d 100644 --- a/mods/abracadabra.js +++ b/mods/abracadabra.js @@ -70,6 +70,7 @@ function AbracadabraModule(options) { this.config = options.menuConfig.config; + // :TODO: MenuModule.validateConfig(cb) -- validate config section gracefully instead of asserts! assert(_.isString(this.config.name, 'Config \'name\' is required')); assert(_.isString(this.config.dropFileType, 'Config \'dropFileType\' is required')); assert(_.isString(this.config.cmd, 'Config \'cmd\' is required')); @@ -140,6 +141,7 @@ function AbracadabraModule(options) { ], function complete(err) { if(err) { + self.client.log.warn( { error : err.toString() }, 'Could not start door'); self.lastError = err; self.prevMenu(); } else { @@ -158,7 +160,7 @@ function AbracadabraModule(options) { encoding : self.config.encoding || self.client.term.outputEncoding, dropFile : self.dropFile.fileName, node : self.client.node, - inhSocket : self.client.output._handle.fd, + //inhSocket : self.client.output._handle.fd, }; var doorInstance = new door.Door(self.client, exeInfo);