diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2015-06-08 21:57:59 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2015-06-08 21:57:59 +0000 |
commit | b73339586b9b33d046cba69e7e66195dd39536bf (patch) | |
tree | 6bce8d19bffa3c885e3a656b74d4252cbf02abd5 | |
parent | bbb0c2504fc755ac18fcd1efa560b622f46a6f8a (diff) | |
download | libmicrohttpd-b73339586b9b33d046cba69e7e66195dd39536bf.tar.gz libmicrohttpd-b73339586b9b33d046cba69e7e66195dd39536bf.zip |
send_param_adapter(): fix setting errno on W32
-rw-r--r-- | src/microhttpd/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 0d952a35..a833884b 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1145,8 +1145,8 @@ send_param_adapter (struct MHD_Connection *connection, | |||
1145 | /* Handle broken kernel / libc, returning -1 but not setting errno; | 1145 | /* Handle broken kernel / libc, returning -1 but not setting errno; |
1146 | kill connection as that should be safe; reported on mailinglist here: | 1146 | kill connection as that should be safe; reported on mailinglist here: |
1147 | http://lists.gnu.org/archive/html/libmicrohttpd/2014-10/msg00023.html */ | 1147 | http://lists.gnu.org/archive/html/libmicrohttpd/2014-10/msg00023.html */ |
1148 | if ( (-1 == ret) && (0 == errno) ) | 1148 | if ( (0 > ret) && (0 == MHD_socket_errno_) ) |
1149 | errno = ECONNRESET; | 1149 | MHD_set_socket_errno_(ECONNRESET); |
1150 | return ret; | 1150 | return ret; |
1151 | } | 1151 | } |
1152 | 1152 | ||