+ init_settings(service);
+ if (got_settings)
+ {
+ int pass;
+ /* metadata has been read.. Consider now settings */
+ for (pass = 1; pass <= 2; pass++)
+ {
+ for (n = node->children; n; n = n->next)
+ {
+ if (n->type != XML_ELEMENT_NODE)
+ continue;
+ if (!strcmp((const char *) n->name, "settings"))
+ {
+ xmlChar *src = xmlGetProp(n, (xmlChar *) "src");
+ if (src)
+ {
+ WRBUF w = wrbuf_alloc();
+ conf_dir_path(config, w, (const char *) src);
+ settings_read_file(service, wrbuf_cstr(w), pass);
+ wrbuf_destroy(w);
+ xmlFree(src);
+ }
+ else
+ {
+ settings_read_node(service, n, pass);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if (server_settings)
+ {
+ settings_read_file(service, server_settings, 1);
+ settings_read_file(service, server_settings, 2);
+ }
+ }