X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp_command.c;h=dcb21a7765275614fc423304c2fe2f51bf5fa5fe;hb=37ae4386bd764d62ae43c68df1560be55ff813ca;hp=4a05abd6d54016f5ba6431eaa5f357ff07bbde2e;hpb=6d4317c4e23171219f825163d01cd896fee3d1f5;p=pazpar2-moved-to-github.git
diff --git a/src/http_command.c b/src/http_command.c
index 4a05abd..dcb21a7 100644
--- a/src/http_command.c
+++ b/src/http_command.c
@@ -48,18 +48,18 @@ void print_meminfo(WRBUF wrbuf)
{
struct mallinfo minfo;
minfo = mallinfo();
- wrbuf_printf(wrbuf, " \n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " %d\n"
- " \n",
+ wrbuf_printf(wrbuf, " \n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " %d\n"
+ " \n",
minfo.arena,
minfo.ordblks,
minfo.smblks,
@@ -195,7 +195,7 @@ struct http_session *http_session_create(struct conf_service *service,
r->timeout_iochan, service->session_timeout);
iochan_settimeout(r->timeout_iochan, service->session_timeout);
- iochan_add(service->server->iochan_man, r->timeout_iochan);
+ iochan_add(service->server->iochan_man, r->timeout_iochan, -1);
http_session_use(1);
return r;
}
@@ -703,21 +703,6 @@ static void cmd_session_status(struct http_channel *c)
release_session(c, s);
}
-static void cmd_server_status(struct http_channel *c)
-{
- int sessions = sessions_count();
- int clients = clients_count();
-
- response_open_ok(c, "server-status");
-
- wrbuf_printf(c->wrbuf, "\n %d\n", sessions);
- wrbuf_printf(c->wrbuf, " %d\n", clients);
- print_meminfo(c->wrbuf);
-
- response_close(c, "server-status");
- xmalloc_trav(0);
-}
-
static void bytarget_response(struct http_channel *c, struct http_session *s,
const char *cmd_status)
{
@@ -1496,6 +1481,9 @@ static void cmd_info(struct http_channel *c)
}
}
#endif
+ wrbuf_printf(c->wrbuf, " %d\n", sessions_get_count());
+ wrbuf_printf(c->wrbuf, " %d\n", clients_get_count());
+ print_meminfo(c->wrbuf);
info_services(c->server, c->wrbuf);
response_close(c, "info");
@@ -1514,7 +1502,6 @@ struct {
{ "termlist", cmd_termlist },
{ "exit", cmd_exit },
{ "session-status", cmd_session_status },
- { "server-status", cmd_server_status },
{ "service", cmd_service },
{ "ping", cmd_ping },
{ "record", cmd_record },