X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp_command.c;h=7b296c729eeeff01f7ba9080981d20537b8f797a;hb=7087f7cc9945cfacfbe7341a1099eef773914772;hp=2f893c8a86aa843a392a55d657d8bcd483000241;hpb=8d9de1cd1d62b61855e5cf0dc166d131092286c2;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index 2f893c8..7b296c7 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -126,7 +126,7 @@ void http_sessions_destroy(http_sessions_t hs) { struct http_session *s_next = s->next; iochan_destroy(s->timeout_iochan); - destroy_session(s->psession); + session_destroy(s->psession); nmem_destroy(s->nmem); s = s_next; } @@ -199,7 +199,7 @@ void http_session_destroy(struct http_session *s) { /* destroying for real */ yaz_log(http_sessions->log_level, "%p HTTP Session %u destroyed", s, s->session_id); iochan_destroy(s->timeout_iochan); - destroy_session(s->psession); + session_destroy(s->psession); http_session_use(-1); nmem_destroy(s->nmem); } @@ -642,6 +642,11 @@ static void cmd_bytarget(struct http_channel *c) wrbuf_puts(c->wrbuf, ht[i].settings_xml); wrbuf_puts(c->wrbuf, "\n"); } + if (ht[i].suggestions_xml && ht[i].suggestions_xml[0]) { + wrbuf_puts(c->wrbuf, ""); + wrbuf_puts(c->wrbuf, ht[i].suggestions_xml); + wrbuf_puts(c->wrbuf, ""); + } wrbuf_puts(c->wrbuf, ""); } response_close(c, "bytarget"); @@ -1049,7 +1054,6 @@ static void cmd_search(struct http_channel *c) } response_open(c, "search"); response_close(c, "search"); - http_send_response(c); release_session(c, s); }