summaryrefslogtreecommitdiff
path: root/econproxy.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 16:29:10 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 16:29:10 +0100
commit978a35f467f9219ee3d3a25e93272697581ea19e (patch)
tree5d85059d932fccd1d178ef708446ae39b3294ba5 /econproxy.c
parentaceae83203bf459a476ee64201c2e6a48143d9a3 (diff)
downloadecon-978a35f467f9219ee3d3a25e93272697581ea19e.tar.gz
econ-978a35f467f9219ee3d3a25e93272697581ea19e.tar.bz2
econ-978a35f467f9219ee3d3a25e93272697581ea19e.zip
Add ZRLE encoding which doesnt seem to be supported
..but lets test it further, maybe its just an implementation fault.
Diffstat (limited to 'econproxy.c')
-rw-r--r--econproxy.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/econproxy.c b/econproxy.c
index c7919f9..f1e55a1 100644
--- a/econproxy.c
+++ b/econproxy.c
@@ -543,6 +543,26 @@ rfb_retrieve_framebuffer_update(struct ep *ep,
}
break;
#endif
+#if 0
+ /* seems to be not supported */
+ case 16: /* ZRLE */
+ {
+ uint32_t length;
+ if (read(ep->vnc_fd, &length, sizeof length) < 0)
+ goto err;
+
+ length = ntohl(length);
+ offset = sizeof length;
+ size = offset + length;
+
+ data = malloc(size);
+ if (data == NULL)
+ goto err;
+
+ *((uint32_t *) data) = htonl(length);
+ }
+ break;
+#endif
default:
goto err;
}
@@ -664,13 +684,13 @@ rfb_init(struct ep *ep)
uint8_t cmd;
uint8_t padding;
uint16_t number_of_encodings;
- uint32_t encodings[2];
+ uint32_t encodings[3];
} cmd_set_encodings = {
- 2, 0, htons(2),
+ 2, 0, htons(3),
#if 1
- { htonl(0) /* RAW */, htonl(7) /* Tight */ }
+ { htonl(0) /* RAW */, htonl(7) /* Tight */, htonl(16) /* ZRLE */ }
#else
- { htonl(7) /* Tight */, htonl(0) /* RAW */ }
+ { htonl(7) /* Tight */, htonl(16) /* ZRLE */, htonl(0) /* RAW */ }
#endif
};