commit 7ae4bcccecac6e5933a9686cb5bb7647fb3a3432
parent 31dd1b054fece1e2d0939d62afe29ecd5362683c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 19 Sep 2023 12:28:50 +0300
Fixed MHD_CONNECTION_INFO_DAEMON: return master daemon
Previously a worker daemon could be returned for thread pool
configuration. The worker daemon should not be used directly by
application, it is for internal use only.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -6962,7 +6962,8 @@ MHD_get_connection_info (struct MHD_Connection *connection,
}
return NULL;
case MHD_CONNECTION_INFO_DAEMON:
- connection->connection_info_dummy.daemon = connection->daemon;
+ connection->connection_info_dummy.daemon =
+ MHD_get_master (connection->daemon);
return &connection->connection_info_dummy;
case MHD_CONNECTION_INFO_CONNECTION_FD:
connection->connection_info_dummy.connect_fd = connection->socket_fd;