summaryrefslogtreecommitdiff
path: root/econproxy.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 17:04:15 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 17:04:15 +0100
commita0f7e7264e93e21aea7a2a74ee4570b7f8917822 (patch)
tree07ae26e22b5b7a4ee95f8c038eb28934d610f2d8 /econproxy.c
parent0fad0c11cef499b39cbcb14955a69751d7767cfb (diff)
downloadecon-a0f7e7264e93e21aea7a2a74ee4570b7f8917822.tar.gz
econ-a0f7e7264e93e21aea7a2a74ee4570b7f8917822.tar.bz2
econ-a0f7e7264e93e21aea7a2a74ee4570b7f8917822.zip
econproxy: Try RRE encoding (doesnt work..)
Diffstat (limited to 'econproxy.c')
-rw-r--r--econproxy.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/econproxy.c b/econproxy.c
index ac65416..18e29e4 100644
--- a/econproxy.c
+++ b/econproxy.c
@@ -564,6 +564,25 @@ rfb_retrieve_framebuffer_update(struct ep *ep,
}
break;
#endif
+#if 1
+ case 2: /* RRE */
+ {
+ uint32_t subrects;
+ if (read(ep->vnc_fd, &subrects, sizeof subrects) < 0)
+ goto err;
+
+ subrects = ntohl(subrects);
+ offset = sizeof subrects;
+
+ size = offset + 4 + subrects * (4 + 8);
+ data = malloc(size);
+ if (data == NULL)
+ goto err;
+
+ *((uint32_t *) data) = htonl(subrects);
+ }
+ break;
+#endif
default:
goto err;
}
@@ -685,13 +704,13 @@ rfb_init(struct ep *ep)
uint8_t cmd;
uint8_t padding;
uint16_t number_of_encodings;
- uint32_t encodings[4];
+ uint32_t encodings[5];
} cmd_set_encodings = {
- 2, 0, htons(4),
+ 2, 0, htons(5),
#if 0
- { htonl(0) /* RAW */, htonl(7) /* Tight */, htonl(6) /* Zlib */, htonl(16) /* ZRLE */ }
+ { htonl(0) /* RAW */, htonl(7) /* Tight */, htonl(6) /* Zlib */, htonl(16) /* ZRLE */, htonl(2) /* RRE */ }
#else
- { htonl(6) /* Zlib */, htonl(7) /* Tight */, htonl(16) /* ZRLE */, htonl(0) /* RAW */ }
+ { htonl(6) /* Zlib */, htonl(2) /* RRE */, htonl(7) /* Tight */, htonl(16) /* ZRLE */, htonl(0) /* RAW */ }
#endif
};