Handle bell. Minor hacks.
authorSteinar H. Gunderson <sesse@samfundet.no>
Fri, 4 Feb 2005 16:53:16 +0000 (16:53 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Fri, 4 Feb 2005 16:53:16 +0000 (16:53 +0000)
rdpsrv.c

index 1718dc1..5a12193 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -310,14 +310,20 @@ int serve_client()
 
                        printf("Activity on VNC socket!\n");
                        
-                       if (read(vnc_sock, buf, 2) != 2)
+                       if (read(vnc_sock, buf, 1) != 1)
                                error("short read on vnc_sock\n");
 
                        switch (buf[0]) {
                        case 0:
                                // frame buffer update!
+                               printf("Framebuffer update\n");
+                               if (read(vnc_sock, buf, 1) != 1)
+                                       error("short read on vnc_sock\n");
                                handle_vnc_fbupdate(vnc_sock);
                                break;
+                       case 2:
+                               printf("\a\n");
+                               break;
                        default:
                                printf("Unknown VNC server message %x\n", buf[0]);
                                exit(1);