X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fhttp_command.c;h=f4cc792803eca3c196bba1904f36a3305059e4a0;hb=e9e5603afa14e52f004d64211345f1c3ab17a6a3;hp=f11ae21dfc66867be83eff503df1019daf624d42;hpb=98124d717cec040bd63d002a95fded3ab82064fc;p=pazpar2-moved-to-github.git
diff --git a/src/http_command.c b/src/http_command.c
index f11ae21..f4cc792 100644
--- a/src/http_command.c
+++ b/src/http_command.c
@@ -1,5 +1,5 @@
/* This file is part of Pazpar2.
- Copyright (C) 2006-2013 Index Data
+ Copyright (C) Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@ -299,7 +299,7 @@ static void error(struct http_response *rs,
enum pazpar2_error_code code,
const char *addinfo)
{
- return error2(rs, code, addinfo, 0);
+ error2(rs, code, addinfo, 0);
}
static void response_open_command(struct http_channel *c, const char *command)
@@ -788,9 +788,9 @@ static void bytarget_response(struct http_channel *c, struct http_session *s,
wrbuf_printf(c->wrbuf, "%d\n",
ht[i].records - ht[i].filtered);
+ wrbuf_printf(c->wrbuf, "%d\n", ht[i].filtered);
if (version >= 2)
{
- wrbuf_printf(c->wrbuf, "%d\n", ht[i].filtered);
wrbuf_printf(c->wrbuf, "" ODR_INT_PRINTF
"\n", ht[i].approximation);
}
@@ -925,6 +925,9 @@ static void write_metadata(WRBUF w, struct conf_service *service,
if (md->data.number.min != md->data.number.max)
wrbuf_printf(w, "-%d", md->data.number.max);
break;
+ case Metadata_type_float:
+ wrbuf_printf(w, "%f", md->data.fnumber);
+ break;
default:
wrbuf_puts(w, "[can't represent]");
break;
@@ -1285,7 +1288,7 @@ static void cmd_show(struct http_channel *c)
status = session_active_clients(s->psession);
- if (block)
+ if (block && reclist_get_num_records(s->psession->reclist) == 0)
{
if (!strcmp(block, "preferred")
&& !session_is_preferred_clients_ready(s->psession)