diff --git a/lib/server/console.js b/lib/server/console.js index a776bc25..fc58aa6d 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -109,7 +109,7 @@ */ function getOnMessage(pConnNum, callback) { return function(pCommand) { - var lMsg, lWinCommand, lExec_func, firstChar, + var lWinCommand, lExec_func, firstChar, connName, lError, lRet, lExecSymbols, isContain, dir, options = {}; @@ -169,11 +169,9 @@ pCommand = connName + pCommand; pCommand = Util.addNewLine(pCommand); - lMsg = Util.stringifyJSON({ + Util.exec(callback, { stdout: pCommand }); - - io.sockets.emit('message', lMsg); } else if (WIN32 || firstChar === ' ' || isContain) exec(pCommand, options, lExec_func); else