mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added desktop console message when getting invalid commands.
This commit is contained in:
parent
66bb5b9458
commit
e5811dc37e
2 changed files with 15 additions and 7 deletions
|
@ -72,8 +72,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
//console.log(controlMsg);
|
||||
if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', controlMsg); }
|
||||
if (controlMsg.type == 'console') {
|
||||
obj.consoleMessage = controlMsg.msg;
|
||||
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); }
|
||||
setConsoleMessage(controlMsg.msg);
|
||||
} else if ((controlMsg.type == 'rtt') && (typeof controlMsg.time == 'number')) {
|
||||
obj.latency.current = (new Date().getTime()) - controlMsg.time;
|
||||
if (obj.latency.callbacks != null) { obj.latency.callback(obj.latency.current); }
|
||||
|
@ -91,6 +90,13 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
}
|
||||
}
|
||||
|
||||
// Set the console message
|
||||
obj.setConsoleMessage = function (str) {
|
||||
if (obj.consoleMessage == str) return;
|
||||
obj.consoleMessage = str;
|
||||
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); }
|
||||
}
|
||||
|
||||
obj.sendCtrlMsg = function (x) { if (obj.ctrlMsgAllowed == true) { if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirSend', typeof x, x); } try { obj.socket.send(x); } catch (ex) { } } }
|
||||
|
||||
function performWebRtcSwitch() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue