libmicrohttpd

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

commit 992b827ada904941972fe455c795f7b60853c33e
parent 90e0124b6caa6e5a126bd0bb1d491ebd7aa4e31c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 11 Oct 2016 15:20:47 +0000

Use MHD_socket_pair_nblk_ for HTTP Upgrade

Diffstat:
Msrc/microhttpd/response.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -719,6 +719,13 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, char *buf; MHD_socket sv[2]; +#ifdef MHD_socket_pair_nblk_ + if (! MHD_socket_pair_nblk_ (sv)) + { + free (urh); + return MHD_NO; + } +#else /* !MHD_socket_pair_nblk_ */ if (! MHD_socket_pair_ (sv)) { free (urh); @@ -733,6 +740,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, MHD_socket_last_strerr_ ()); #endif } +#endif /* !MHD_socket_pair_nblk_ */ if ( (! MHD_SCKT_FD_FITS_FDSET_(sv[1], NULL)) && (0 == (daemon->options & (MHD_USE_POLL | MHD_USE_EPOLL))) ) {