aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/response.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:20:47 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:20:47 +0000
commit992b827ada904941972fe455c795f7b60853c33e (patch)
tree5f2ac38b5bac3766adcb6245962e640186d151a1 /src/microhttpd/response.c
parent90e0124b6caa6e5a126bd0bb1d491ebd7aa4e31c (diff)
downloadlibmicrohttpd-992b827ada904941972fe455c795f7b60853c33e.tar.gz
libmicrohttpd-992b827ada904941972fe455c795f7b60853c33e.zip
Use MHD_socket_pair_nblk_ for HTTP Upgrade
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r--src/microhttpd/response.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index b06e268d..cc1d2028 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -719,6 +719,13 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
719 char *buf; 719 char *buf;
720 MHD_socket sv[2]; 720 MHD_socket sv[2];
721 721
722#ifdef MHD_socket_pair_nblk_
723 if (! MHD_socket_pair_nblk_ (sv))
724 {
725 free (urh);
726 return MHD_NO;
727 }
728#else /* !MHD_socket_pair_nblk_ */
722 if (! MHD_socket_pair_ (sv)) 729 if (! MHD_socket_pair_ (sv))
723 { 730 {
724 free (urh); 731 free (urh);
@@ -733,6 +740,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
733 MHD_socket_last_strerr_ ()); 740 MHD_socket_last_strerr_ ());
734#endif 741#endif
735 } 742 }
743#endif /* !MHD_socket_pair_nblk_ */
736 if ( (! MHD_SCKT_FD_FITS_FDSET_(sv[1], NULL)) && 744 if ( (! MHD_SCKT_FD_FITS_FDSET_(sv[1], NULL)) &&
737 (0 == (daemon->options & (MHD_USE_POLL | MHD_USE_EPOLL))) ) 745 (0 == (daemon->options & (MHD_USE_POLL | MHD_USE_EPOLL))) )
738 { 746 {