[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28516 - in libmicrohttpd/src: include microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28516 - in libmicrohttpd/src: include microhttpd |
Date: |
Mon, 12 Aug 2013 13:15:26 +0200 |
Author: LRN
Date: 2013-08-12 13:15:26 +0200 (Mon, 12 Aug 2013)
New Revision: 28516
Modified:
libmicrohttpd/src/include/microhttpd.h
libmicrohttpd/src/microhttpd/daemon.c
libmicrohttpd/src/microhttpd/internal.h
Log:
Use socketpair to wake up listenthread on W32
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2013-08-12 09:45:58 UTC (rev
28515)
+++ libmicrohttpd/src/include/microhttpd.h 2013-08-12 11:15:26 UTC (rev
28516)
@@ -430,6 +430,7 @@
* use of this option is automatic (as in, you do not even have to
* specify it), if 'MHD_USE_NO_LISTEN_SOCKET' is specified. In
* "external" select mode, this option is always simply ignored.
+ * On W32 a pair of sockets is used instead of a pipe.
*/
MHD_USE_PIPE_FOR_SHUTDOWN = 1024,
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2013-08-12 09:45:58 UTC (rev
28515)
+++ libmicrohttpd/src/microhttpd/daemon.c 2013-08-12 11:15:26 UTC (rev
28516)
@@ -2968,7 +2968,12 @@
if (0 == (flags & (MHD_USE_SELECT_INTERNALLY |
MHD_USE_THREAD_PER_CONNECTION)))
use_pipe = 0; /* useless if we are using 'external' select */
if ( (use_pipe) &&
- (0 != PIPE (daemon->wpipe)) )
+#ifdef WINDOWS
+ (0 != SOCKETPAIR (AF_INET, SOCK_STREAM, IPPROTO_TCP, daemon->wpipe))
+#else
+ (0 != PIPE (daemon->wpipe))
+#endif
+ )
{
#if HAVE_MESSAGES
MHD_DLOG (daemon,
Modified: libmicrohttpd/src/microhttpd/internal.h
===================================================================
--- libmicrohttpd/src/microhttpd/internal.h 2013-08-12 09:45:58 UTC (rev
28515)
+++ libmicrohttpd/src/microhttpd/internal.h 2013-08-12 11:15:26 UTC (rev
28516)
@@ -1073,6 +1073,7 @@
* Pipe we use to signal shutdown, unless
* 'HAVE_LISTEN_SHUTDOWN' is defined AND we have a listen
* socket (which we can then 'shutdown' to stop listening).
+ * On W32 this is a socketpair, not a pipe.
*/
int wpipe[2];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28516 - in libmicrohttpd/src: include microhttpd,
gnunet <=