mirror of
https://github.com/Ylianst/MeshCommander
synced 2025-12-10 21:33:31 +00:00
Added KVM buffer overflow detection.
This commit is contained in:
@@ -269,6 +269,11 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
||||
cmdsize = 12;
|
||||
if (obj.onScreenSizeChange != null) { obj.onScreenSizeChange(obj, obj.ScreenWidth, obj.ScreenHeight); }
|
||||
//console.log('Desktop width: ' + obj.width + ', height: ' + obj.height);
|
||||
|
||||
// Check if the screen size is larger than Intel AMT should be able to handle
|
||||
if ((obj.parent) && ((obj.bpp * obj.width * obj.height) > 8388608)) {
|
||||
obj.parent.disconnectCode = 50002; // Display buffer too large, more than 8MB.
|
||||
}
|
||||
} else if (encoding == 0) {
|
||||
// RAW encoding
|
||||
var ptr = 12, cs = 12 + (s * obj.bpp);
|
||||
|
||||
@@ -8553,10 +8553,12 @@
|
||||
} else if (desktop.disconnectCode == 3) { // UNSUPPORTED
|
||||
messagebox("Remote Desktop", "The device indicated that this type of connection of not supported.");
|
||||
} else if (desktop.disconnectCode == 50000) { // KVM-Disconnect
|
||||
messagebox("Remote Desktop", "KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU.");
|
||||
messagebox("Remote Desktop", "KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU.");
|
||||
} else if (desktop.disconnectCode == 50001) { // Intel AMT disconnect, try to connect again if connection was more than 5 seconds long.
|
||||
reconnect = (desktop.connectTime != null) && ((desktop.connectTime + 5000) < Date.now());
|
||||
console.log(desktop.disconnectCode, reconnect);
|
||||
} else if (desktop.disconnectCode == 50002) { // KVM-BufferOverflow
|
||||
messagebox("Remote Desktop", "KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@@ -13164,13 +13166,11 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user