libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 149db58a0625bf02109d7a715f905a0b921cc9e5
parent e35469ec9bec0b30e8dda99ad458175fe8ecdbf6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Fri, 17 Nov 2023 11:00:07 +0300

MHD_quiesce_daemon(): fixed return value if already quiesced

Fixed to return proper documented value when MHD_quiesce_daemon() was
already called for the daemon.

Diffstat:
Msrc/microhttpd/daemon.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -6128,7 +6128,8 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon) MHD_socket ret; ret = daemon->listen_fd; - if (MHD_INVALID_SOCKET == ret) + if ((MHD_INVALID_SOCKET == ret) + || daemon->was_quiesced) return MHD_INVALID_SOCKET; if ( (0 == (daemon->options & (MHD_USE_ITC))) && MHD_D_IS_USING_THREADS_ (daemon) )