summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 10:56:49 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-11 10:56:49 +0100
commit65143233de5f23264721ad167ceefbdd757b4042 (patch)
treee415c2671a107cf856bcb0058ba7ca0b6166c6ef
parenteee49fd26d7fec79748eb1023a52103deffb1ec2 (diff)
downloadecon-65143233de5f23264721ad167ceefbdd757b4042.tar.gz
econ-65143233de5f23264721ad167ceefbdd757b4042.tar.bz2
econ-65143233de5f23264721ad167ceefbdd757b4042.zip
econproxy: datasize and nrects should be in network order for econ
-rw-r--r--econproxy.c4
1 files changed, 3 insertions, 1 deletions
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: