summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 12:55:38 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 12:55:38 +0100
commitc4aaf10bc5a832824fc0144ea0cc6bac95f94d60 (patch)
tree4f5cc7497f097478d402b7f8f7a7d2944e97789f
parentbdb82bacf044be5681c7ad07a5d2fc30f6cc6d62 (diff)
downloadecon-c4aaf10bc5a832824fc0144ea0cc6bac95f94d60.tar.gz
econ-c4aaf10bc5a832824fc0144ea0cc6bac95f94d60.tar.bz2
econ-c4aaf10bc5a832824fc0144ea0cc6bac95f94d60.zip
econproxy: add some debugging output
-rw-r--r--econproxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/econproxy.c b/econproxy.c
index 41bcaf3..de61210 100644
--- a/econproxy.c
+++ b/econproxy.c
@@ -446,6 +446,7 @@ rfb_retrieve_framebuffer_update(struct ep *ep,
/* The Epson Beamer Protocol also stores it in host order,
* so make this permanent. */
framebuffer_update->nrects = ntohs(framebuffer_update->nrects);
+ printf("nrects: %d\n", framebuffer_update->nrects);
if (framebuffer_update->nrects == 0) {
fprintf(stderr, "error: invalid number of rects\n");
@@ -467,6 +468,7 @@ rfb_retrieve_framebuffer_update(struct ep *ep,
for (i = 0; i < framebuffer_update->nrects; ++i) {
char *data;
size_t size;
+ ssize_t r;
struct rfb_frame *frame = malloc(sizeof *frame);
if (frame == NULL)
@@ -476,7 +478,8 @@ rfb_retrieve_framebuffer_update(struct ep *ep,
iov[i*2+0].iov_len = sizeof *frame;
datasize += sizeof *frame;
- readv(ep->vnc_fd, &iov[i*2+0], 1);
+ r = readv(ep->vnc_fd, &iov[i*2+0], 1);
+ printf("r: %zd\n", r);
if (ntohs(frame->width) == 0 || ntohs(frame->height) == 0)
goto err;