mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Implemented and documented MHD_OPTION_LISTEN_SOCKET followed by MHD_INVALID_SOCKET
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user