libmicrohttpd

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

commit b73339586b9b33d046cba69e7e66195dd39536bf
parent bbb0c2504fc755ac18fcd1efa560b622f46a6f8a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  8 Jun 2015 21:57:59 +0000

send_param_adapter(): fix setting errno on W32

Diffstat:
Msrc/microhttpd/daemon.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -1145,8 +1145,8 @@ send_param_adapter (struct MHD_Connection *connection, /* Handle broken kernel / libc, returning -1 but not setting errno; kill connection as that should be safe; reported on mailinglist here: http://lists.gnu.org/archive/html/libmicrohttpd/2014-10/msg00023.html */ - if ( (-1 == ret) && (0 == errno) ) - errno = ECONNRESET; + if ( (0 > ret) && (0 == MHD_socket_errno_) ) + MHD_set_socket_errno_(ECONNRESET); return ret; }