Return event in unknownOption()

This commit is contained in:
Bryan Ashby 2017-10-29 20:03:33 -06:00
parent c652fb65ea
commit e55b4aa50b
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,7 @@ const SB_COMMANDS = {
// //
// Resources // Resources
// * http://mars.netanya.ac.il/~unesco/cdrom/booklet/HTML/NETWORKING/node300.html // * http://mars.netanya.ac.il/~unesco/cdrom/booklet/HTML/NETWORKING/node300.html
// * http://www.networksorcery.com/enp/protocol/telnet.htm
// //
const OPTIONS = { const OPTIONS = {
TRANSMIT_BINARY : 0, // http://tools.ietf.org/html/rfc856 TRANSMIT_BINARY : 0, // http://tools.ietf.org/html/rfc856
@ -186,6 +187,8 @@ const OPTION_NAMES = Object.keys(OPTIONS).reduce(function(names, name) {
function unknownOption(bufs, i, event) { function unknownOption(bufs, i, event) {
Log.warn( { bufs : bufs, i : i, event : event }, 'Unknown Telnet option'); Log.warn( { bufs : bufs, i : i, event : event }, 'Unknown Telnet option');
event.buf = bufs.splice(0, i).toBuffer();
return event;
} }
const OPTION_IMPLS = {}; const OPTION_IMPLS = {};