]> git.sesse.net Git - rdpsrv/commitdiff
Valgrind fixes, re-request updates all the time.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Feb 2005 17:44:05 +0000 (17:44 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Feb 2005 17:44:05 +0000 (17:44 +0000)
rdp.c
rdpsrv.c

diff --git a/rdp.c b/rdp.c
index db74a32c40336fbdd6e8cbe9e9f6f9f27db37931..56a0f7c90e09ac84cb2993563c869f725a073f62 100644 (file)
--- a/rdp.c
+++ b/rdp.c
@@ -72,7 +72,7 @@ rdp_recv(uint8 * type)
 
 #if WITH_DEBUG
        DEBUG(("RDP packet #%d, (type %x, length %u)\n", ++g_packetno, *type, length));
-       hexdump(g_next_packet, length);
+       //hexdump(g_next_packet, length);
 #endif /*  */
 
        g_next_packet += length;
index 5a1219355a42400cd30dc65fd93e510e654d786a..c838fc7a60c711d7f7ec8434a9b9755ad8040feb 100644 (file)
--- a/rdpsrv.c
+++ b/rdpsrv.c
@@ -113,6 +113,20 @@ void handle_input_pdu(STREAM s, int vnc_sock)
                }
                printf("\n");
        }
+       
+       // re-request the entire framebuffer
+       buf[0] = 3; // message type
+       buf[1] = 1; // incremental
+       buf[2] = 0; // xpos
+       buf[3] = 0;
+       buf[4] = 0; // ypos
+       buf[5] = 0;
+       buf[6] = 640 >> 8; // width
+       buf[7] = 640 & 0xff;
+       buf[8] = 480 >> 8; // height
+       buf[9] = 480 & 0xff;
+
+       write(vnc_sock, buf, 10);
 }
 
 struct ServerInitialization {
@@ -153,7 +167,7 @@ int vnc_init()
        if (read(vnc_sock, buf, ntohl(si.name_len)) != ntohl(si.name_len))
                error("short read on server name\n");
 
-       printf("Server name is '%*s' (%u bytes)\n", ntohl(si.name_len), buf, ntohl(si.name_len));
+//     printf("Server name is '%*s' (%u bytes)\n", ntohl(si.name_len), buf, ntohl(si.name_len));
 
        // we can only accept raw encoding
        buf[0] = 2; // message type
@@ -244,7 +258,7 @@ void handle_vnc_fbupdate(int vnc_sock)
                        
                                dst = smallblock;
                                for (y = 0; y < bh; ++y) {
-                                       src = data + ((yt * 64 + (bh + 1 - y)) * width + (xt * 64)) * 4;
+                                       src = data + ((yt * 64 + (bh - 1 - y)) * width + (xt * 64)) * 4;
                                        for (x = 0; x < bw; ++x) {
                                                *dst++ = *src++;
                                                *dst++ = *src++;