[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.
- [libmicrohttpd] branch master updated (9bdb6835 -> 32eae456), gnunet, 2023/11/08
- [libmicrohttpd] 01/07: daemon.c: cosmetics, gnunet, 2023/11/08
- [libmicrohttpd] 04/07: Upgraded connection: added missing check, gnunet, 2023/11/08
- [libmicrohttpd] 02/07: MHD_run_from_select(): reworked workaround for missing except_fd_set, gnunet, 2023/11/08
- [libmicrohttpd] 06/07: Added ignore of MHD_OPTION_APP_FD_SETSIZE when poll() is used, gnunet, 2023/11/08
- [libmicrohttpd] 03/07: mhd_itc.h: cosmetics, gnunet, 2023/11/08
- [libmicrohttpd] 05/07: Additional corrections for MHD_get_fdset2(),
gnunet <=
- [libmicrohttpd] 07/07: Added new function MHD_run_from_select2() with FD_SETSIZE value, gnunet, 2023/11/08