1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-20 10:13:17 +00:00

1. Added KVM Jumbo Support for Linux/FreeBSD/MacOS

2. Added compile switch for Jumbo eenable/disable
3. Updated Linux Mouse Cursor HAshing, so 32-bit and 64-bit interop
4. Updated KVM to fetch initial mouse cursor on connect
This commit is contained in:
Bryan Roe
2020-04-09 22:41:56 -07:00
parent aa48bfe70a
commit 7dd40ff52f
9 changed files with 274 additions and 124 deletions

View File

@@ -635,19 +635,29 @@ void kvm_relay_StdOutHandler(ILibProcessPipe_Process sender, char *buffer, int b
if (bufferLen > 4)
{
size = ntohs(((unsigned short*)(buffer))[1]);
if (size <= bufferLen)
if (ntohs(((unsigned short*)(buffer))[0]) == (unsigned short)MNG_JUMBO)
{
if (ntohs(((unsigned short*)(buffer))[0]) == MNG_DEBUG)
if (bufferLen > 8)
{
char tmp[255];
int x = sprintf_s(tmp, sizeof(tmp), "DEBUG: %d\n", ((int*)buffer)[1]);
write(STDOUT_FILENO, tmp, x);
if (bufferLen >= (8 + (int)ntohl(((unsigned int*)(buffer))[1])))
{
*bytesConsumed = 8 + (int)ntohl(((unsigned int*)(buffer))[1]);
writeHandler(buffer, *bytesConsumed, reserved);
printf("JUMBO PACKET: %d\n", *bytesConsumed);
return;
}
}
}
else
{
size = ntohs(((unsigned short*)(buffer))[1]);
if (size <= bufferLen)
{
*bytesConsumed = size;
writeHandler(buffer, size, reserved);
printf("Normal PACKET: %d\n", *bytesConsumed);
return;
}
*bytesConsumed = size;
writeHandler(buffer, size, reserved);
return;
}
}
*bytesConsumed = 0;