[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Implemented and documented MHD_OP
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Implemented and documented MHD_OPTION_LISTEN_SOCKET followed by MHD_INVALID_SOCKET |
Date: |
Sun, 12 Nov 2023 10:07:32 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 75dbfbc7 Implemented and documented MHD_OPTION_LISTEN_SOCKET followed
by MHD_INVALID_SOCKET
75dbfbc7 is described below
commit 75dbfbc71634af3dae9b5af1bc1e82fec32062e1
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Nov 12 11:14:49 2023 +0300
Implemented and documented MHD_OPTION_LISTEN_SOCKET followed by
MHD_INVALID_SOCKET
---
src/include/microhttpd.h | 2 ++
src/microhttpd/daemon.c | 10 ++++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 9e7e23e2..9d54ddee 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1780,6 +1780,8 @@ enum MHD_OPTION
* option is used, MHD will not open its own listen socket(s). The
* argument passed must be of type `MHD_socket` and refer to an
* existing socket that has been bound to a port and is listening.
+ * If followed by MHD_INVALID_SOCKET value, MHD ignores this option
+ * and creates socket by itself.
*/
MHD_OPTION_LISTEN_SOCKET = 12,
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 283e0839..644e134f 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7405,11 +7405,12 @@ process_interim_params (struct MHD_Daemon *d,
if (params->listen_fd_set)
{
- if (MHD_INVALID_SOCKET == params->listen_fd
+ if (MHD_INVALID_SOCKET == params->listen_fd)
+ {
+ (void) 0; /* Use MHD-created socket */
+ }
#ifdef MHD_POSIX_SOCKETS
- || 0 > params->listen_fd
-#endif /* MHD_POSIX_SOCKETS */
- )
+ else if (0 > params->listen_fd)
{
#ifdef HAVE_MESSAGES
MHD_DLOG (d,
@@ -7418,6 +7419,7 @@ process_interim_params (struct MHD_Daemon *d,
#endif /* HAVE_MESSAGES */
return false;
}
+#endif /* MHD_POSIX_SOCKETS */
else if (0 != (d->options & MHD_USE_NO_LISTEN_SOCKET))
{
#ifdef HAVE_MESSAGES
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: Implemented and documented MHD_OPTION_LISTEN_SOCKET followed by MHD_INVALID_SOCKET,
gnunet <=