libmicrohttpd

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

commit 77bc8103555ea66216af295ccf8f9176e9fa747c
parent 6bd7866d217214e3cbda0f67b5fda8d8020d6669
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu, 16 Mar 2017 14:55:53 +0300

Added MHD_DAEMON_INFO_FLAGS to get daemon's flags by MHD_get_daemon_info()

Diffstat:
Msrc/include/microhttpd.h | 18+++++++++++++++++-
Msrc/microhttpd/daemon.c | 2++
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -1796,7 +1796,15 @@ enum MHD_DaemonInfoType * Request the number of current connections handled by the daemon. * No extra arguments should be passed. */ - MHD_DAEMON_INFO_CURRENT_CONNECTIONS + MHD_DAEMON_INFO_CURRENT_CONNECTIONS, + + /** + * Request the daemon flags. + * No extra arguments should be passed. + * Note: flags may differ from original 'flags' specified for + * daemon, especially if #MHD_USE_AUTO was set. + */ + MHD_DAEMON_INFO_FLAGS }; @@ -3184,6 +3192,14 @@ union MHD_DaemonInfo * Number of active connections, for #MHD_DAEMON_INFO_CURRENT_CONNECTIONS. */ unsigned int num_connections; + + /** + * Combination of #MHD_FLAG values, for #MHD_DAEMON_INFO_FLAGS. + * This value is actually a bitfield. + * Note: flags may differ from original 'flags' specified for + * daemon, especially if #MHD_USE_AUTO was set. + */ + enum MHD_FLAG flags; }; diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -6259,6 +6259,8 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon, } } return (const union MHD_DaemonInfo *) &daemon->connections; + case MHD_DAEMON_INFO_FLAGS: + return (const union MHD_DaemonInfo *) &daemon->options; default: return NULL; };