[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 29/36: daemon.c: redesigned code for clarity and formatt
From: |
gnunet |
Subject: |
[libmicrohttpd] 29/36: daemon.c: redesigned code for clarity and formatting |
Date: |
Thu, 01 Jun 2023 12:30:34 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 79c57fad8d5d225573fa1277f72211e511a4564a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 25 13:22:16 2023 +0300
daemon.c: redesigned code for clarity and formatting
No functional change
---
src/microhttpd/daemon.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 5e9be378..b14e68f3 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4548,13 +4548,10 @@ MHD_select (struct MHD_Daemon *daemon,
&maxsock,
FD_SETSIZE)) )
{
-#if ! defined(MHD_WINSOCK_SOCKETS)
-#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon, _ ("Could not add control inter-thread " \
- "communication channel FD to fdset.\n"));
-#endif
- err_state = MHD_YES;
-#else /* MHD_WINSOCK_SOCKETS */
+ bool retry_succeed;
+
+ retry_succeed = false;
+#if defined(MHD_WINSOCK_SOCKETS)
/* fdset limit reached, new connections
cannot be handled. Remove listen socket FD
from fdset and retry to add ITC FD. */
@@ -4563,19 +4560,22 @@ MHD_select (struct MHD_Daemon *daemon,
{
FD_CLR (ls,
&rs);
- if (! MHD_add_to_fd_set_ (MHD_itc_r_fd_ (daemon->itc),
- &rs,
- &maxsock,
- FD_SETSIZE))
- {
+ if (MHD_add_to_fd_set_ (MHD_itc_r_fd_ (daemon->itc),
+ &rs,
+ &maxsock,
+ FD_SETSIZE))
+ retry_succeed = true;
+ }
+#endif /* MHD_WINSOCK_SOCKETS */
+
+ if (! retry_succeed)
+ {
#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon, _ ("Could not add control inter-thread " \
- "communication channel FD to fdset.\n"));
+ MHD_DLOG (daemon, _ ("Could not add control inter-thread " \
+ "communication channel FD to fdset.\n"));
#endif
- err_state = MHD_YES;
- }
+ err_state = MHD_YES;
}
-#endif /* MHD_WINSOCK_SOCKETS */
}
/* Stop listening if we are at the configured connection limit */
/* If we're at the connection limit, no point in really
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 17/36: examples/sessions.c: removed non-portable function and improved safety, (continued)
- [libmicrohttpd] 17/36: examples/sessions.c: removed non-portable function and improved safety, gnunet, 2023/06/01
- [libmicrohttpd] 18/36: configure: fixed detection of __FUNCTION__ magic macro, gnunet, 2023/06/01
- [libmicrohttpd] 06/36: test_toolarge: fixed reported error description, gnunet, 2023/06/01
- [libmicrohttpd] 13/36: test_timeout: moved to heavy tests, gnunet, 2023/06/01
- [libmicrohttpd] 16/36: test_post: fixed caseless key name match, gnunet, 2023/06/01
- [libmicrohttpd] 19/36: Simplified usage of the function name magic macros, gnunet, 2023/06/01
- [libmicrohttpd] 23/36: .gitignore: force include all *.{c,h} files, gnunet, 2023/06/01
- [libmicrohttpd] 26/36: test_client_put_stop: fixed typo in diag message, gnunet, 2023/06/01
- [libmicrohttpd] 25/36: Detect sysctl() symbols in configure, gnunet, 2023/06/01
- [libmicrohttpd] 28/36: contrib/make-dist.sh: added use of zopfli if available, gnunet, 2023/06/01
- [libmicrohttpd] 29/36: daemon.c: redesigned code for clarity and formatting,
gnunet <=
- [libmicrohttpd] 35/36: autoinit_funcs.h: fixed warning on MSVC, gnunet, 2023/06/01
- [libmicrohttpd] 27/36: Added support for custom command for tarball compression, gnunet, 2023/06/01
- [libmicrohttpd] 15/36: examples/largepost.c: fixed caseless method match, gnunet, 2023/06/01
- [libmicrohttpd] 20/36: tests: unified use of function name macros, gnunet, 2023/06/01
- [libmicrohttpd] 21/36: Added internal preprocessor macro for magic macro presence, gnunet, 2023/06/01
- [libmicrohttpd] 30/36: Fixed compiler warning when built without poll() support, gnunet, 2023/06/01
- [libmicrohttpd] 31/36: Avoided potential compiler warnings, gnunet, 2023/06/01
- [libmicrohttpd] 32/36: Added macro for base64 decoded size, gnunet, 2023/06/01
- [libmicrohttpd] 36/36: W32 VS Project: fixed warning with external build systems, gnunet, 2023/06/01
- [libmicrohttpd] 34/36: W32 VS Project: minor internal fixes, fixed files for "dist", gnunet, 2023/06/01