static void cmd_service(struct http_channel *c)
{
struct http_session *s = locate_session(c);
- xmlNode *xml_node;
if (!s)
return;
response_open_command(c, 0);
- xml_node = s->psession->service->xml_node;
- if (xml_node)
- {
- xmlNode *tmp = xmlCopyNode(xml_node, 1);
- xmlBufferPtr buf = xmlBufferCreate();
-
- xmlNodeDump(buf, tmp->doc, tmp, 0, 0);
-
- wrbuf_write(c->wrbuf, (const char *) buf->content, buf->use);
- xmlBufferFree(buf);
- xmlFreeNode(tmp);
- }
-
+ if (s->psession->service->xml_node)
+ wrbuf_puts(c->wrbuf, s->psession->service->xml_node);
response_close(c, 0);
release_session(c, s);
}
service->sortkeys
= nmem_malloc(nmem,
sizeof(struct conf_sortkey) * service->num_sortkeys);
-
service->xml_node = 0;
-
return service;
}
if (!pazpar2_decref(&service->ref_count, service->mutex))
{
service_xslt_destroy(service);
- if (service->xml_node)
- xmlFreeNode(service->xml_node);
pp2_charset_fact_destroy(service->charsets);
ccl_qual_rm(&service->ccl_bibset);
yaz_mutex_destroy(&service->mutex);
}
}
}
- service->xml_node = xmlCopyNode(node, 1);
+
+ {
+ xmlBufferPtr buf = xmlBufferCreate();
+ xmlNodeDump(buf, node->doc, node, 0, 0);
+ service->xml_node =
+ nmem_strdupn(service->nmem, (const char *) buf->content, buf->use);
+ xmlBufferFree(buf);
+ }
return service;
}
CCL_bibset ccl_bibset;
struct database *databases;
struct conf_server *server;
- xmlNode *xml_node;
+ char *xml_node;
};
int conf_service_metadata_field_id(struct conf_service *service, const char * name);
<?xml version="1.0" encoding="UTF-8"?>
-<service xmlns="http://www.indexdata.com/pazpar2/1.0">
+<service>
<icu_chain id="relevance" locale="en">
<transform rule="[:Control:] Any-Remove"/>
<tokenize rule="l"/>