X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fhttp_command.c;h=503f0820bb053a82257d3f951df54c0394b1c228;hb=4ae1e0582f66acaec33dca2c3b023d47d7f431af;hp=309a6174e2dc2bfcbfd8915ecea5214ce6a75396;hpb=22ac82b6522cc7ed34f93fa8dbdcbff383d23dab;p=pazpar2-moved-to-github.git
diff --git a/src/http_command.c b/src/http_command.c
index 309a617..503f082 100644
--- a/src/http_command.c
+++ b/src/http_command.c
@@ -809,6 +809,15 @@ static void bytarget_response(struct http_channel *c, struct http_session *s,
wrbuf_puts(c->wrbuf, ht[i].suggestions_xml);
wrbuf_puts(c->wrbuf, "");
}
+ if (ht[i].query_data)
+ {
+ wrbuf_puts(c->wrbuf, "");
+ wrbuf_xmlputs(c->wrbuf, ht[i].query_type);
+ wrbuf_puts(c->wrbuf, "\n");
+ wrbuf_puts(c->wrbuf, "");
+ wrbuf_xmlputs(c->wrbuf, ht[i].query_data);
+ wrbuf_puts(c->wrbuf, "\n");
+ }
wrbuf_puts(c->wrbuf, "");
}
response_close(c, "bytarget");
@@ -1457,6 +1466,17 @@ static void cmd_stat(struct http_channel *c)
release_session(c, s);
}
+static void cmd_stop(struct http_channel *c)
+{
+ struct http_session *s = locate_session(c);
+ if (!s)
+ return;
+ response_open_ok(c, "stop");
+ session_stop(s->psession);
+ response_close(c, "stop");
+ release_session(c, s);
+}
+
static void cmd_info(struct http_channel *c)
{
char yaz_version_str[20];
@@ -1516,6 +1536,7 @@ struct {
{ "ping", cmd_ping },
{ "record", cmd_record },
{ "info", cmd_info },
+ { "stop", cmd_stop },
{0,0}
};