X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhttp_command.c;h=2670b26cf5822be984ac5fd5f101a29840981a91;hb=3de3ea11e6756214a2e2d1e8f3631aac10ec266c;hp=0de007bcecc708a4309cb2299d6747d4d5d1a4d2;hpb=cc178327044177f177d0474b757f53bcd86b4d42;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index 0de007b..2670b26 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -17,15 +17,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - * $Id: http_command.c,v 1.66 2007-10-28 18:55:26 adam Exp $ - */ - +#if HAVE_CONFIG_H +#include +#endif #include #include -#if HAVE_SYS_UIO_H -#include -#endif #if HAVE_UNISTD_H #include #endif @@ -36,10 +32,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif #include -#if HAVE_CONFIG_H -#include -#endif - #include #include "util.h" @@ -246,7 +238,7 @@ static int process_settings(struct session *se, struct http_request *rq, static void cmd_exit(struct http_channel *c) { yaz_log(YLOG_WARN, "exit"); - exit(0); + http_close_server(); } static void cmd_init(struct http_channel *c) @@ -542,8 +534,8 @@ static void show_raw_record_ok_binary(void *data, const char *buf, size_t sz) void show_raw_reset(void *data, struct http_channel *c, void *data2) { - struct client *client = data; - client_show_raw_remove(client, data2); + //struct client *client = data; + //client_show_raw_remove(client, data2); } static void cmd_record_ready(void *data); @@ -621,7 +613,9 @@ static void cmd_record(struct http_channel *c) else { wrbuf_puts(c->wrbuf, "\n"); - wrbuf_printf(c->wrbuf, "%s\n", rec->recid); + wrbuf_puts(c->wrbuf, ""); + wrbuf_xmlputs(c->wrbuf, rec->recid); + wrbuf_puts(c->wrbuf, "\n"); write_metadata(c->wrbuf, service, rec->metadata, 1); for (r = rec->records; r; r = r->next) write_subrecord(r, c->wrbuf, service, 1); @@ -696,7 +690,9 @@ static void show_records(struct http_channel *c, int active) write_subrecord(p, c->wrbuf, service, 0); // subrecs w/o details if (ccount > 1) wrbuf_printf(c->wrbuf, "%d\n", ccount); - wrbuf_printf(c->wrbuf, "%s\n", rec->recid); + wrbuf_puts(c->wrbuf, ""); + wrbuf_xmlputs(c->wrbuf, rec->recid); + wrbuf_puts(c->wrbuf, "\n"); wrbuf_puts(c->wrbuf, "\n"); } @@ -833,9 +829,7 @@ static void cmd_stat(struct http_channel *c) wrbuf_printf(c->wrbuf, "%d\n", stat.num_clients); wrbuf_printf(c->wrbuf, "%d\n", stat.num_no_connection); wrbuf_printf(c->wrbuf, "%d\n", stat.num_connecting); - wrbuf_printf(c->wrbuf, "%d\n", stat.num_initializing); - wrbuf_printf(c->wrbuf, "%d\n", stat.num_searching); - wrbuf_printf(c->wrbuf, "%d\n", stat.num_presenting); + wrbuf_printf(c->wrbuf, "%d\n", stat.num_working); wrbuf_printf(c->wrbuf, "%d\n", stat.num_idle); wrbuf_printf(c->wrbuf, "%d\n", stat.num_failed); wrbuf_printf(c->wrbuf, "%d\n", stat.num_error);