From b004cd46005404ab5636a623db4704e76f23d0e8 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 4 Feb 2005 16:14:44 +0000 Subject: [PATCH] Send encodings _correctly_ this time... --- rdpsrv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rdpsrv.c b/rdpsrv.c index b8bc56a..a6064be 100644 --- a/rdpsrv.c +++ b/rdpsrv.c @@ -149,8 +149,11 @@ int vnc_init() buf[2] = 0; // number of encodings buf[3] = 1; buf[4] = 0; // raw encoding + buf[5] = 0; + buf[6] = 0; + buf[7] = 0; - write(vnc_sock, buf, 5); + write(vnc_sock, buf, 8); // request the entire framebuffer buf[0] = 3; // message type @@ -215,7 +218,10 @@ int serve_client() // activity on VNC socket? if (FD_ISSET(vnc_sock, &readfs)) { - char buf[256]; + unsigned char buf[256]; + + printf("Activity on VNC socket!\n"); + read(vnc_sock, buf, 1); switch (buf[0]) { case 0: -- 2.39.2