From: Dennis Schafroth Date: Wed, 2 Mar 2011 15:22:28 +0000 (+0100) Subject: Add xmalloc_trav. Add/change comments X-Git-Tag: v1.5.5~30 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=fcf6233e96ba839efd79be52d4c85bab243881be;p=pazpar2-moved-to-github.git Add xmalloc_trav. Add/change comments --- 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;