From 65143233de5f23264721ad167ceefbdd757b4042 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 11 Mar 2013 10:56:49 +0100 Subject: econproxy: datasize and nrects should be in network order for econ --- econproxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/econproxy.c b/econproxy.c index 206487b..17b4970 100644 --- a/econproxy.c +++ b/econproxy.c @@ -372,7 +372,7 @@ ep_send_frames(struct ep *ep, struct iovec *iov, int iovcnt, uint32_t datasize) set_ip(hdr.IPaddress, sock_get_ipv4_addr(ep->video_fd)); hdr.commandID = 0; - hdr.datasize = datasize; + hdr.datasize = htonl(datasize); write(ep->video_fd, (void *) &hdr, sizeof hdr); writev(ep->video_fd, iov, iovcnt); @@ -525,6 +525,8 @@ rfb_retrieve_framebuffer_update(struct ep *ep, *iovcnt = 1 + i * 2; *psize = datasize; + framebuffer_update->nrects = htons(framebuffer_update->nrects); + return 0; err: -- cgit