From aa171cb607fbe7f461f67d77b710ca2d65b87b10 Mon Sep 17 00:00:00 2001 From: samhed Date: Fri, 26 Aug 2016 12:20:51 +0200 Subject: [PATCH] Add missing return values --- include/rfb.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/rfb.js b/include/rfb.js index 3e7ee7d..bc5555a 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -249,6 +249,7 @@ var RFB; } this._updateState('connect'); + return true; }, disconnect: function () { @@ -274,6 +275,7 @@ var RFB; RFB.messages.keyEvent(this._sock, XK_Delete, 0); RFB.messages.keyEvent(this._sock, XK_Alt_L, 0); RFB.messages.keyEvent(this._sock, XK_Control_L, 0); + return true; }, xvpOp: function (ver, op) { @@ -307,6 +309,7 @@ var RFB; RFB.messages.keyEvent(this._sock, code, 1); RFB.messages.keyEvent(this._sock, code, 0); } + return true; }, clipboardPasteFrom: function (text) { @@ -822,7 +825,7 @@ var RFB; } } - this._fail("No supported sub-auth types!"); + return this._fail("No supported sub-auth types!"); }, _negotiate_authentication: function () { @@ -873,6 +876,8 @@ var RFB; return false; case 2: return this._fail("Too many auth attempts"); + default: + return this._fail("Unknown SecurityResult"); } }, @@ -989,6 +994,7 @@ var RFB; } else { this._updateState('normal', 'Connected (unencrypted) to: ' + this._fb_name); } + return true; }, _init_msg: function () { @@ -1012,6 +1018,9 @@ var RFB; case 'ServerInitialisation': return this._negotiate_server_init(); + + default: + return this._fail("Unknown state: " + this._rfb_state); } },