diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-08 23:18:08 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-08 23:18:08 +0100 |
commit | 18a607a51883dc185a8150f0a4ca4d6ada9777c7 (patch) | |
tree | 111c9cfd2e62725d912f3d2f69dca953a2c1a41c | |
parent | 0d9046effaaf2cc65ef65792c84311011916bdca (diff) | |
download | libmicrohttpd-18a607a51883dc185a8150f0a4ca4d6ada9777c7.tar.gz libmicrohttpd-18a607a51883dc185a8150f0a4ca4d6ada9777c7.zip |
use WSA_FLAG_OVERLAPPED in W32 sockets as per suggestion from Johnathan McDougall on the mailinglist
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/include/microhttpd.h | 2 | ||||
-rw-r--r-- | src/microhttpd/mhd_sockets.c | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ | |||
1 | Sat Dec 8 23:15:53 CET 2018 | ||
2 | Fixed missing WSA_FLAG_OVERLAPPED which can cause W32 to block on | ||
3 | socket races when using threadpool. (See very detailed description | ||
4 | of the issue in the libmicrohttpd mailinglist post of today.) -JM | ||
5 | |||
1 | Sat Dec 8 22:53:56 CET 2018 | 6 | Sat Dec 8 22:53:56 CET 2018 |
2 | Added test for RFC 7616 and documented new API. | 7 | Added test for RFC 7616 and documented new API. |
3 | Releasing libmicrohttpd 0.9.62. -CG | 8 | Releasing libmicrohttpd 0.9.62. -CG |
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index e6643f5c..1d966233 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t; | |||
126 | * Current version of the library. | 126 | * Current version of the library. |
127 | * 0x01093001 = 1.9.30-1. | 127 | * 0x01093001 = 1.9.30-1. |
128 | */ | 128 | */ |
129 | #define MHD_VERSION 0x00096200 | 129 | #define MHD_VERSION 0x00096201 |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * MHD-internal return code for "YES". | 132 | * MHD-internal return code for "YES". |
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c index 356d288f..56a8a852 100644 --- a/src/microhttpd/mhd_sockets.c +++ b/src/microhttpd/mhd_sockets.c | |||
@@ -484,7 +484,7 @@ MHD_socket_create_listen_ (int pf) | |||
484 | 0, | 484 | 0, |
485 | NULL, | 485 | NULL, |
486 | 0, | 486 | 0, |
487 | WSA_FLAG_NO_HANDLE_INHERIT); | 487 | WSA_FLAG_OVERLAPPED | WSA_FLAG_NO_HANDLE_INHERIT); |
488 | cloexec_set = !0; | 488 | cloexec_set = !0; |
489 | #else /* !SOCK_CLOEXEC */ | 489 | #else /* !SOCK_CLOEXEC */ |
490 | fd = MHD_INVALID_SOCKET; | 490 | fd = MHD_INVALID_SOCKET; |