diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 7adf57f7..e15eb5c2 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -4232,6 +4232,17 @@ MHD_get_daemon_info (struct MHD_Daemon *daemon, | |||
4232 | case MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY: | 4232 | case MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY: |
4233 | return (const union MHD_DaemonInfo *) &daemon->epoll_fd; | 4233 | return (const union MHD_DaemonInfo *) &daemon->epoll_fd; |
4234 | #endif | 4234 | #endif |
4235 | case MHD_DAEMON_INFO_CURRENT_CONNECTIONS: | ||
4236 | if (daemon->worker_pool) | ||
4237 | { | ||
4238 | /* Collect the connection information stored in the workers. */ | ||
4239 | unsigned int i; | ||
4240 | |||
4241 | daemon->connections = 0; | ||
4242 | for (i=0;i<daemon->worker_pool_size;i++) | ||
4243 | daemon->connections += daemon->worker_pool[i].connections; | ||
4244 | } | ||
4245 | return (const union MHD_DaemonInfo *) &daemon->connections; | ||
4235 | default: | 4246 | default: |
4236 | return NULL; | 4247 | return NULL; |
4237 | }; | 4248 | }; |