From a1892356917081446d2714369c68da7322a824a4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 6 Sep 2015 12:05:05 +0200 Subject: [PATCH] Remove unused code in server-status --- src/http_command.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/src/http_command.c b/src/http_command.c index 731a635..4123ccc 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -694,43 +694,17 @@ static void cmd_session_status(struct http_channel *c) release_session(c, s); } -#ifdef HAVE_RESULTSETS_COUNT -int resultsets_count(void); -#else -#define resultsets_count() 0 -#endif - static void cmd_server_status(struct http_channel *c) { int sessions = sessions_count(); int clients = clients_count(); - int resultsets = resultsets_count(); response_open_ok(c, "server-status"); - wrbuf_printf(c->wrbuf, "\n %u\n", sessions); - wrbuf_printf(c->wrbuf, " %u\n", clients); - /* Only works if yaz has been compiled with enabling of this */ - wrbuf_printf(c->wrbuf, " %u\n",resultsets); + + wrbuf_printf(c->wrbuf, "\n %d\n", sessions); + wrbuf_printf(c->wrbuf, " %d\n", clients); print_meminfo(c->wrbuf); -/* TODO add all sessions status */ -/* http_sessions_t http_sessions = c->http_sessions; */ -/* struct http_session *p; */ -/* - yaz_mutex_enter(http_sessions->mutex); - for (p = http_sessions->session_list; p; p = p->next) - { - p->activity_counter++; - wrbuf_puts(c->wrbuf, "\n"); - wrbuf_printf(c->wrbuf, "%s\n", p->session_id); - yaz_mutex_leave(http_sessions->mutex); - session_status(c, p); - wrbuf_puts(c->wrbuf, "\n"); - yaz_mutex_enter(http_sessions->mutex); - p->activity_counter--; - } - yaz_mutex_leave(http_sessions->mutex); -*/ response_close(c, "server-status"); xmalloc_trav(0); } -- 1.7.10.4