/* This file is part of Pazpar2.
- Copyright (C) 2006-2008 Index Data
+ Copyright (C) 2006-2009 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
http_session_destroy(s);
}
-struct http_session *http_session_create()
+struct http_session *http_session_create(void)
{
NMEM nmem = nmem_create();
struct http_session *r = nmem_malloc(nmem, sizeof(*r));
http_send_response(c);
}
-unsigned int make_sessionid()
+unsigned int make_sessionid(void)
{
static int seq = 0;
unsigned int res;
wrbuf_xmlputs(c->wrbuf, ht[i].id);
wrbuf_puts(c->wrbuf, "</id>\n");
+ if (ht[i].name && ht[i].name[0])
+ {
+ wrbuf_puts(c->wrbuf, "<name>");
+ wrbuf_xmlputs(c->wrbuf, ht[i].name);
+ wrbuf_puts(c->wrbuf, "</name>\n");
+ }
+
wrbuf_printf(c->wrbuf, "<hits>%d</hits>\n", ht[i].hits);
wrbuf_printf(c->wrbuf, "<diagnostic>%d</diagnostic>\n", ht[i].diagnostic);
wrbuf_printf(c->wrbuf, "<records>%d</records>\n", ht[i].records);
wrbuf_xmlputs(w, *name ? name : "Unknown");
wrbuf_puts(w, "\">");
- if (show_details)
- write_metadata(w, service, r->metadata, 1);
+ write_metadata(w, service, r->metadata, show_details);
wrbuf_puts(w, "</location>\n");
}