[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36742 - libmicrohttpd/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36742 - libmicrohttpd/src/microhttpd |
Date: |
Tue, 8 Dec 2015 20:35:45 +0100 |
Author: Karlson2k
Date: 2015-12-08 20:35:45 +0100 (Tue, 08 Dec 2015)
New Revision: 36742
Modified:
libmicrohttpd/src/microhttpd/daemon.c
Log:
MHD_get_fdset() & MHD_get_fdset2(): continue to add FDs to sets in case of
error.
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2015-12-08 19:35:42 UTC (rev
36741)
+++ libmicrohttpd/src/microhttpd/daemon.c 2015-12-08 19:35:45 UTC (rev
36742)
@@ -714,6 +714,7 @@
unsigned int fd_setsize)
{
struct MHD_Connection *pos;
+ int result = MHD_YES;
if ( (NULL == daemon)
|| (NULL == read_fd_set)
@@ -733,7 +734,7 @@
#endif
if (MHD_INVALID_SOCKET != daemon->socket_fd &&
MHD_YES != add_to_fd_set (daemon->socket_fd, read_fd_set, max_fd,
fd_setsize))
- return MHD_NO;
+ result = MHD_NO;
for (pos = daemon->connections_head; NULL != pos; pos = pos->next)
{
@@ -741,19 +742,19 @@
{
case MHD_EVENT_LOOP_INFO_READ:
if (MHD_YES != add_to_fd_set (pos->socket_fd, read_fd_set, max_fd,
fd_setsize))
- return MHD_NO;
+ result = MHD_NO;
break;
case MHD_EVENT_LOOP_INFO_WRITE:
if (MHD_YES != add_to_fd_set (pos->socket_fd, write_fd_set, max_fd,
fd_setsize))
- return MHD_NO;
+ result = MHD_NO;
if (pos->read_buffer_size > pos->read_buffer_offset &&
MHD_YES != add_to_fd_set (pos->socket_fd, read_fd_set, max_fd,
fd_setsize))
- return MHD_NO;
+ result = MHD_NO;
break;
case MHD_EVENT_LOOP_INFO_BLOCK:
if (pos->read_buffer_size > pos->read_buffer_offset &&
MHD_YES != add_to_fd_set (pos->socket_fd, read_fd_set, max_fd,
fd_setsize))
- return MHD_NO;
+ result = MHD_NO;
break;
case MHD_EVENT_LOOP_INFO_CLEANUP:
/* this should never happen */
@@ -768,7 +769,7 @@
*max_fd);
#endif
#endif
- return MHD_YES;
+ return result;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36742 - libmicrohttpd/src/microhttpd,
gnunet <=