[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37088 - in branches/mhd-0.9.50: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37088 - in branches/mhd-0.9.50: . src/microhttpd |
Date: |
Fri, 29 Apr 2016 23:14:11 +0200 |
Author: Karlson2k
Date: 2016-04-29 23:14:11 +0200 (Fri, 29 Apr 2016)
New Revision: 37088
Modified:
branches/mhd-0.9.50/ChangeLog
branches/mhd-0.9.50/src/microhttpd/daemon.c
Log:
Fixed handling of caller-supplied socket with MHD_OPTION_LISTEN_SOCKET.
Was regression in 0.9.49.
Modified: branches/mhd-0.9.50/ChangeLog
===================================================================
--- branches/mhd-0.9.50/ChangeLog 2016-04-29 21:14:08 UTC (rev 37087)
+++ branches/mhd-0.9.50/ChangeLog 2016-04-29 21:14:11 UTC (rev 37088)
@@ -1,3 +1,11 @@
+Tue Apr 13 21:46:01 CET 2016
+ Ignored specific errors in 'test_post' test until libcurl
+ will implement workaround for WinSock bug.
+ Fixed handling of caller-supplied socket with
+ MHD_OPTION_LISTEN_SOCKET (regression in 0.9.49).
+ Minor fixes.
+ Various cosmetics and comments fixes. -EG
+
Sat Apr 09 13:05:42 CET 2016
Releasing libmicrohttpd 0.9.49. -EG
Modified: branches/mhd-0.9.50/src/microhttpd/daemon.c
===================================================================
--- branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:08 UTC (rev
37087)
+++ branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:11 UTC (rev
37088)
@@ -4101,24 +4101,6 @@
}
}
#endif
- if (MHD_NO == make_nonblocking (daemon, socket_fd))
- {
-#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon,
- "Failed to make listen socket non-blocking: %s\n",
- MHD_socket_last_strerr_ ());
-#endif /* HAVE_MESSAGES */
- if (0 != (flags & MHD_USE_EPOLL_LINUX_ONLY) ||
- daemon->worker_pool_size > 0)
- {
- /* Accept must be non-blocking. Multiple children may wake up
- * to handle a new connection, but only one will win the race.
- * The others must immediately return. */
- if (0 != MHD_socket_close_ (socket_fd))
- MHD_PANIC ("close failed\n");
- goto free_and_fail;
- }
- }
if (listen (socket_fd, daemon->listen_backlog_size) < 0)
{
#ifdef HAVE_MESSAGES
@@ -4135,6 +4117,20 @@
{
socket_fd = daemon->socket_fd;
}
+
+ if (MHD_NO == make_nonblocking (daemon, socket_fd))
+ {
+ if (0 != (flags & MHD_USE_EPOLL_LINUX_ONLY) ||
+ daemon->worker_pool_size > 0)
+ {
+ /* Accept must be non-blocking. Multiple children may wake up
+ * to handle a new connection, but only one will win the race.
+ * The others must immediately return. */
+ if (0 != MHD_socket_close_ (socket_fd))
+ MHD_PANIC ("close failed\n");
+ goto free_and_fail;
+ }
+ }
#ifndef MHD_WINSOCK_SOCKETS
if ( (socket_fd >= FD_SETSIZE) &&
(0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL_LINUX_ONLY)) ) )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37088 - in branches/mhd-0.9.50: . src/microhttpd,
gnunet <=