From: Adam Dickmeiss Date: Mon, 27 May 2013 07:37:57 +0000 (+0200) Subject: First work on returning service XML X-Git-Tag: v1.6.32~22 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=19a0803f7298f5a0d583f5f70582ba29cb373265;p=pazpar2-moved-to-github.git First work on returning service XML --- diff --git a/src/http_command.c b/src/http_command.c index dc6750d..dd3d5f5 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -648,6 +648,17 @@ static void session_status(struct http_channel *c, struct http_session *s) wrbuf_printf(c->wrbuf, "%zu\n", session_nmem); } +static void cmd_service(struct http_channel *c) +{ + struct http_session *s = locate_session(c); + if (!s) + return; + + response_open(c, "service"); + response_close(c, "service"); + release_session(c, s); +} + static void cmd_session_status(struct http_channel *c) { struct http_session *s = locate_session(c); @@ -1460,6 +1471,7 @@ struct { { "exit", cmd_exit }, { "session-status", cmd_session_status }, { "server-status", cmd_server_status }, + { "service", cmd_service }, { "ping", cmd_ping }, { "record", cmd_record }, { "info", cmd_info }, diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index 81f0e55..770ec7d 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -151,6 +151,7 @@ struct conf_service *service_init(struct conf_server *server, = nmem_malloc(nmem, sizeof(struct conf_sortkey) * service->num_sortkeys); + service->xml_node = 0; return service; } diff --git a/src/pazpar2_config.h b/src/pazpar2_config.h index deacda7..4324fa1 100644 --- a/src/pazpar2_config.h +++ b/src/pazpar2_config.h @@ -134,6 +134,7 @@ struct conf_service CCL_bibset ccl_bibset; struct database *databases; struct conf_server *server; + xmlNode *xml_node; }; int conf_service_metadata_field_id(struct conf_service *service, const char * name);