gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/07: Additional corrections for MHD_get_fdset2()


From: gnunet
Subject: [libmicrohttpd] 05/07: Additional corrections for MHD_get_fdset2()
Date: Wed, 08 Nov 2023 18:23:07 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit dcb24300bdeb296335bae0c199d051ed92a92b48
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Nov 8 17:03:29 2023 +0300

    Additional corrections for MHD_get_fdset2()
---
 src/microhttpd/daemon.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 350c6056..20916a2f 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1133,7 +1133,9 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
 #endif
 
 #ifdef HAS_FD_SETSIZE_OVERRIDABLE
-  if (((unsigned int) INT_MAX) < fd_setsize)
+  if (0 == fd_setsize)
+    return MHD_NO;
+  else if (((unsigned int) INT_MAX) < fd_setsize)
     fd_setsize = (unsigned int) INT_MAX;
 #ifdef HAVE_MESSAGES
   else if (daemon->fdset_size > ((int) fd_setsize))
@@ -1141,20 +1143,20 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
     if (daemon->fdset_size_set_by_app)
     {
       MHD_DLOG (daemon,
-                _ ("MHD_get_fdset2() called with fd_setsize (%u) " \
+                _ ("%s() called with fd_setsize (%u) " \
                    "less than value set by MHD_OPTION_APP_FD_SETSIZE (%d). " \
-                   "Some socket FDs may be not added. " \
+                   "Some socket FDs may be not processed. " \
                    "Use MHD_OPTION_APP_FD_SETSIZE with the correct value.\n"),
-                fd_setsize, daemon->fdset_size);
+                "MHD_get_fdset2", fd_setsize, daemon->fdset_size);
     }
     else
     {
       MHD_DLOG (daemon,
-                _ ("MHD_get_fdset2() called with fd_setsize (%u) " \
+                _ ("%s() called with fd_setsize (%u) " \
                    "less than FD_SETSIZE used by MHD (%d). " \
-                   "Some socket FDs may be not added. " \
+                   "Some socket FDs may be not processed. " \
                    "Consider using MHD_OPTION_APP_FD_SETSIZE option.\n"),
-                fd_setsize, daemon->fdset_size);
+                "MHD_get_fdset2", fd_setsize, daemon->fdset_size);
     }
   }
 #endif /* HAVE_MESSAGES */
@@ -1163,10 +1165,10 @@ MHD_get_fdset2 (struct MHD_Daemon *daemon,
   {
 #ifdef HAVE_MESSAGES
     MHD_DLOG (daemon,
-              _ ("MHD_get_fdset2() called with fd_setsize (%u) " \
+              _ ("%s() called with fd_setsize (%u) " \
                  "less than fixed FD_SETSIZE value (%d) used on the " \
                  "platform.\n"),
-              fd_setsize, (int) FD_SETSIZE);
+              "MHD_get_fdset2", fd_setsize, (int) FD_SETSIZE);
 #endif /* HAVE_MESSAGES */
     return MHD_NO;
   }

-- 
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]