wrbuf_puts(c->wrbuf, " </version>\n");
+ info_services(c->server, c->wrbuf);
+
wrbuf_puts(c->wrbuf, "</info>");
rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf));
http_send_response(c);
return s;
}
+void info_services(struct conf_server *server, WRBUF w)
+{
+ struct conf_service *s = server->service;
+ wrbuf_puts(w, " <services>\n");
+ for (; s; s = s->next)
+ {
+ wrbuf_puts(w, " <service");
+ if (s->id)
+ {
+ wrbuf_puts(w, " id=\"");
+ wrbuf_xmlputs(w, s->id);
+ wrbuf_puts(w, "\"");
+ }
+ wrbuf_puts(w, "/>");
+
+ wrbuf_puts(w, "\n");
+ }
+ wrbuf_puts(w, " </services>\n");
+}
static int parse_config(struct conf_config *config, xmlNode *root)
{
struct conf_config *config_create(const char *fname, int verbose);
void config_destroy(struct conf_config *config);
void config_process_events(struct conf_config *config);
+void info_services(struct conf_server *server, WRBUF w);
struct conf_service *locate_service(struct conf_server *server,
const char *service_id);