summaryrefslogtreecommitdiffstats
path: root/libvncclient/sockets.c
diff options
context:
space:
mode:
authordscho <dscho>2004-06-15 13:20:27 +0000
committerdscho <dscho>2004-06-15 13:20:27 +0000
commite70c3be7362db1c2860a6cff84bdb47394788ef2 (patch)
tree995c02d29e44f960d7b0cb48271a11042b98c5ac /libvncclient/sockets.c
parent6bda09f03c8d45e205227afdb064d61aa9a918ee (diff)
downloadlibvncserver-e70c3be7362db1c2860a6cff84bdb47394788ef2.zip
libvncserver-e70c3be7362db1c2860a6cff84bdb47394788ef2.tar.gz
debug
Diffstat (limited to 'libvncclient/sockets.c')
-rw-r--r--libvncclient/sockets.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
index 6954ed3..a1e13b2 100644
--- a/libvncclient/sockets.c
+++ b/libvncclient/sockets.c
@@ -58,10 +58,19 @@ static int buffered = 0;
rfbBool
ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
{
+//#define DEBUG_READ_EXACT
+#ifdef DEBUG_READ_EXACT
+ char* oout=out;
+ int nn=n;
+ rfbClientLog("ReadFromRFBServer %d bytes\n",n);
+#endif
if (n <= buffered) {
memcpy(out, bufoutptr, n);
bufoutptr += n;
buffered -= n;
+#ifdef DEBUG_READ_EXACT
+ goto hexdump;
+#endif
return TRUE;
}
@@ -101,7 +110,6 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
memcpy(out, bufoutptr, n);
bufoutptr += n;
buffered -= n;
- return TRUE;
} else {
@@ -129,6 +137,14 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
n -= i;
}
+#ifdef DEBUG_READ_EXACT
+hexdump:
+ { int ii;
+ for(ii=0;ii<nn;ii++)
+ fprintf(stderr,"%02x ",(unsigned char)oout[ii]);
+ fprintf(stderr,"\n");
+ }
+#endif
return TRUE;
}
}
OpenPOWER on IntegriCloud