-/* $Id: config.c,v 1.16 2007-03-20 03:42:53 quinn Exp $ */
+/* $Id: config.c,v 1.17 2007-03-20 07:27:51 adam Exp $ */
#include <string.h>
r->num_sortkeys = r->num_metadata = 0;
// Allocate array of conf metadata and sortkey tructs, if necessary
for (n = node->children; n; n = n->next)
- if (n->type == XML_ELEMENT_NODE && !strcmp(n->name, "metadata"))
+ if (n->type == XML_ELEMENT_NODE && !strcmp((const char *)
+ n->name, "metadata"))
{
- xmlChar *sortkey = xmlGetProp(n, "sortkey");
+ xmlChar *sortkey = xmlGetProp(n, (xmlChar *) "sortkey");
r->num_metadata++;
- if (sortkey && strcmp(sortkey, "no"))
+ if (sortkey && strcmp((const char *) sortkey, "no"))
r->num_sortkeys++;
xmlFree(sortkey);
}
{
if (n->type != XML_ELEMENT_NODE)
continue;
- if (!strcmp(n->name, "metadata"))
+ if (!strcmp(n->name, (const char *) "metadata"))
{
struct conf_metadata *md = &r->metadata[md_node];
xmlChar *name = xmlGetProp(n, "name");
/*
- * $Id: http_command.c,v 1.27 2007-03-20 05:32:58 quinn Exp $
+ * $Id: http_command.c,v 1.28 2007-03-20 07:27:51 adam Exp $
*/
#include <stdio.h>
name++;
}
wrbuf_puts(c->wrbuf, "</termlist>");
- rs->payload = nmem_strdup(rq->channel->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(rq->channel->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
}
wrbuf_puts(c->wrbuf, "</bytarget>");
- rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
for (r = rec->records; r; r = r->next)
write_subrecord(r, c->wrbuf, service);
wrbuf_puts(c->wrbuf, "</record>\n");
- rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
}
wrbuf_puts(c->wrbuf, "</show>\n");
- rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
wrbuf_printf(c->wrbuf, "<failed>%d</failed>\n", stat.num_failed);
wrbuf_printf(c->wrbuf, "<error>%d</error>\n", stat.num_error);
wrbuf_puts(c->wrbuf, "</stat>");
- rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
wrbuf_printf(c->wrbuf, " </version>\n");
wrbuf_puts(c->wrbuf, "</info>");
- rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf));
+ rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
}
-/* $Id: pazpar2.c,v 1.50 2007-03-20 05:32:58 quinn Exp $ */
+/* $Id: pazpar2.c,v 1.51 2007-03-20 07:27:51 adam Exp $ */
#include <stdlib.h>
#include <stdio.h>
while (s->clients)
client_destroy(s->clients);
nmem_destroy(s->nmem);
- wrbuf_free(s->wrbuf, 1);
+ wrbuf_destroy(s->wrbuf);
}
struct session *new_session()