From fcf6233e96ba839efd79be52d4c85bab243881be Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 2 Mar 2011 16:22:28 +0100 Subject: [PATCH] Add xmalloc_trav. Add/change comments --- src/http_command.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/http_command.c b/src/http_command.c index 5e804ce..e8bba87 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -623,8 +623,6 @@ int resultsets_count(void); static void cmd_server_status(struct http_channel *c) { struct http_response *rs = c->response; - http_sessions_t http_sessions = c->http_sessions; - struct http_session *p; int sessions = sessions_count(); int clients = clients_count(); int resultsets = resultsets_count(); @@ -632,8 +630,13 @@ static void cmd_server_status(struct http_channel *c) wrbuf_puts(c->wrbuf, HTTP_COMMAND_RESPONSE_PREFIX "\n"); wrbuf_printf(c->wrbuf, " %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); - /* + +/* 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++; @@ -650,10 +653,10 @@ static void cmd_server_status(struct http_channel *c) wrbuf_puts(c->wrbuf, "\n"); rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); + xmalloc_trav(0); } - static void cmd_bytarget(struct http_channel *c) { struct http_response *rs = c->response; -- 1.7.10.4