Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use send() and recv() for proxy communication (for MinGW's benefit)
Based on a patch from Nikos Mavrogiannopoulos.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Feb 6, 2014
1 parent d096ff2 commit 433132b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http.c
Expand Up @@ -1328,7 +1328,7 @@ static int proxy_write(struct openconnect_info *vpninfo, int fd,
if (!FD_ISSET(fd, &wr_set))
continue;

i = write(fd, buf + count, len - count);
i = send(fd, (void *)&buf[count], len - count, 0);
if (i < 0)
return -errno;

Expand Down Expand Up @@ -1359,7 +1359,7 @@ static int proxy_read(struct openconnect_info *vpninfo, int fd,
if (!FD_ISSET(fd, &rd_set))
continue;

i = read(fd, buf + count, len - count);
i = recv(fd, (void *)&buf[count], len - count, 0);
if (i < 0)
return -errno;

Expand Down

0 comments on commit 433132b

Please sign in to comment.