diff options
Diffstat (limited to 'econproxy.c')
-rw-r--r-- | econproxy.c | 28 |
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 }; |