1
0
mirror of https://github.com/Ylianst/MeshCommander synced 2025-12-06 06:03:20 +00:00

Fixed KVM playback viewer.

This commit is contained in:
Ylian Saint-Hilaire
2022-01-24 13:36:26 -08:00
parent 0836dae806
commit 9c8037f64a
2 changed files with 18 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
//var version = parseFloat(obj.acc.substring(4, 11));
//console.log('KVersion: ' + version);
obj.state = 1;
delete obj.parent.connectTime;
if (obj.parent) { delete obj.parent.connectTime; }
obj.send('RFB 003.008\n');
}
else if ((obj.state == 1) && (obj.acc.byteLength >= 1)) {
@@ -188,8 +188,11 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
}
obj.state = 4;
obj.parent.connectTime = Date.now();
if (obj.parent) { obj.parent.disconnectCode = 0; obj.parent.xxStateChange(3); }
if (obj.parent) {
obj.parent.connectTime = Date.now();
obj.parent.disconnectCode = 0;
obj.parent.xxStateChange(3);
}
//obj.timer = setInterval(obj.xxOnTimer, 50);
// ###BEGIN###{DesktopFocus}

View File

@@ -13160,8 +13160,18 @@
if ((readState == 0) && (rstr2hex(data).startsWith('4100000000000000'))) {
// We are not authenticated, KVM data starts here.
readState = 1;
if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
} else if (readState == 1) { amtDesktop.ProcessData(data); }
if (data.length > 8) {
var view = new Uint8Array(data.length - 8);
for (var i = 8; i < data.length; i++) { view[i] = data.charCodeAt(i); }
amtDesktop.ProcessBinaryData(view.buffer);
//amtDesktop.ProcessData(data.substring(8));
}
} else if (readState == 1) {
var view = new Uint8Array(data.length);
for (var i = 0; i < data.length; i++) { view[i] = data.charCodeAt(i); }
amtDesktop.ProcessBinaryData(view.buffer);
//amtDesktop.ProcessData(data);
}
} else if (recFileProtocol == 200) {
// Intel AMT midstream KVM
var view = new Uint8Array(data.length);