X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp_command.c;h=e8bba87fba3ed0e41fb0019ecd07486b3676fd6c;hb=b88bc9d42416104c748f1325540478be993598dd;hp=5e804ce8279ff32f4387403cc2ba0ecce7c29483;hpb=13316443850a6b60216219c3cab5915d9a28751a;p=pazpar2-moved-to-github.git 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;