diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-12 11:55:43 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-12 11:55:43 +0100 |
commit | 8845a0cc0d04afb210457b3739e0a6bd0069239a (patch) | |
tree | 5380d6ba79bc4f0d88197287e087e06d19ba8a58 | |
parent | d3433c78e9ce06409ba999b4d90c572de54b4c94 (diff) | |
download | econ-8845a0cc0d04afb210457b3739e0a6bd0069239a.tar.gz econ-8845a0cc0d04afb210457b3739e0a6bd0069239a.tar.bz2 econ-8845a0cc0d04afb210457b3739e0a6bd0069239a.zip |
econproxy: Move iov from struct ep into rfb_init
Its the only place where it is used.
-rw-r--r-- | econproxy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/econproxy.c b/econproxy.c index 16d4d92..508eae5 100644 --- a/econproxy.c +++ b/econproxy.c @@ -45,7 +45,6 @@ struct ep { int video_fd; int audio_fd; - struct iovec iov[3]; struct econ_packet epkt; uint8_t projUniqInfo[ECON_UNIQINFO_LENGTH]; @@ -525,6 +524,7 @@ rfb_init(struct ep *ep, const char *vnc_server_ip, const char *vnc_server_port) uint8_t auth = NOAUTH; uint32_t auth_result = 0; uint8_t share_desktop = 1; + struct iovec iov[2]; union init { rfbServerInitMsg msg; struct { @@ -600,12 +600,12 @@ rfb_init(struct ep *ep, const char *vnc_server_ip, const char *vnc_server_port) uint16_t padding2; } cmd_set_pixel_format = { 0, 0, 0 }; - ep->iov[0].iov_base = &cmd_set_pixel_format; - ep->iov[0].iov_len = sizeof cmd_set_pixel_format; - ep->iov[1].iov_base = &init.msg.format; - ep->iov[1].iov_len = sizeof init.msg.format; + iov[0].iov_base = &cmd_set_pixel_format; + iov[0].iov_len = sizeof cmd_set_pixel_format; + iov[1].iov_base = &init.msg.format; + iov[1].iov_len = sizeof init.msg.format; - if (writev(ep->vnc_fd, ep->iov, 2) < 0) + if (writev(ep->vnc_fd, iov, 2) < 0) return -1; struct { |