libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 5f33c34ae4b9310d537c98c767e1a9f883605757
parent baa2d30d1cb938e03eb1e84a30bb5436797af8d8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 19 Oct 2016 19:37:14 +0300

test_upgrade{,-ssl}: portability, first step

Diffstat:
Msrc/microhttpd/test_upgrade_common.c | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/microhttpd/test_upgrade_common.c b/src/microhttpd/test_upgrade_common.c @@ -24,6 +24,7 @@ * @author Christian Grothoff */ +#include "mhd_sockets.h" /** * Thread we use to run the interaction with the upgraded socket. @@ -166,9 +167,9 @@ send_all (MHD_socket sock, make_blocking (sock); for (size_t off = 0; off < len; off += ret) { - ret = write (sock, - &text[off], - len - off); + ret = MHD_send_ (sock, + &text[off], + len - off); if (-1 == ret) { if (EAGAIN == errno) @@ -199,9 +200,9 @@ recv_hdr (MHD_socket sock) i = 0; while (i < 4) { - ret = read (sock, - &c, - 1); + ret = MHD_recv_ (sock, + &c, + 1); if (-1 == ret) { if (EAGAIN == errno) @@ -242,9 +243,9 @@ recv_all (MHD_socket sock, make_blocking (sock); for (size_t off = 0; off < len; off += ret) { - ret = read (sock, - &buf[off], - len - off); + ret = MHD_recv_ (sock, + &buf[off], + len - off); if (-1 == ret) { if (EAGAIN == errno)