gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 142/156: daemon.c: redesigned code for clarity and forma


From: gnunet
Subject: [libmicrohttpd] 142/156: daemon.c: redesigned code for clarity and formatting
Date: Sun, 28 May 2023 17:53:15 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to tag v0.9.77
in repository libmicrohttpd.

commit 1426d03b0dba111804f50c13409f274639bce711
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 | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 3801e438..58b7998c 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4289,6 +4289,9 @@ MHD_select (struct MHD_Daemon *daemon,
                               &maxsock,
                               FD_SETSIZE)) )
   {
+    bool retry_succeed;
+
+    retry_succeed = false;
 #if defined(MHD_WINSOCK_SOCKETS)
     /* fdset limit reached, new connections
        cannot be handled. Remove listen socket FD
@@ -4298,24 +4301,23 @@ 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;
-#if defined(MHD_WINSOCK_SOCKETS)
-  }
-}
-
-
-#endif /* MHD_WINSOCK_SOCKETS */
+      err_state = MHD_YES;
+    }
   }
   /* 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]