From dc3974e2d9605ac7cc364498f82fb552e4f3c760 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 28 Feb 2022 09:37:25 -0800 Subject: [PATCH] Fix for server exception, #3719 --- apprelays.js | 2 +- public/scripts/agent-desktop-0.0.2.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apprelays.js b/apprelays.js index 5b86c18c..7bf95e58 100644 --- a/apprelays.js +++ b/apprelays.js @@ -62,7 +62,7 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) { if (obj.wsClient != null) { inTraffc += obj.wsClient._socket.bytesRead; outTraffc += obj.wsClient._socket.bytesWritten; } const sessionSeconds = Math.round((Date.now() - obj.startTime) / 1000); const user = parent.users[obj.cookie.userid]; - const username = (user != null) ? user.name : null;e + const username = (user != null) ? user.name : null; const event = { etype: 'relay', action: 'relaylog', domain: domain.id, nodeid: obj.nodeid, userid: obj.cookie.userid, username: username, sessionid: obj.sessionid, msgid: 125, msgArgs: [sessionSeconds, obj.sessionid], msg: "Left Web-RDP session \"" + obj.sessionid + "\" after " + sessionSeconds + " second(s).", protocol: PROTOCOL_WEBRDP, bytesin: inTraffc, bytesout: outTraffc }; parent.parent.DispatchEvent(['*', obj.nodeid, obj.cookie.userid, obj.meshid], obj, event); delete obj.startTime; diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index 7516389d..8ee6956e 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -259,6 +259,8 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { case 15: // KVM_TOUCH obj.TouchArray = {}; break; + case 16: // MNG_KVM_KEYSTATE + break; case 17: // MNG_KVM_MESSAGE var str = String.fromCharCode.apply(null, view.slice(4)); console.log('Got KVM Message: ' + str);