Remove proxy override.
[pazpar2-moved-to-github.git] / src / pazpar2_config.c
index 3e2290e..c937927 100644 (file)
@@ -849,7 +849,7 @@ static int process_config_includes(struct conf_config *config, xmlNode *n)
     return 0;
 }
 
-struct conf_config *config_create(const char *fname)
+struct conf_config *config_create(const char *fname, int verbose)
 {
     xmlDoc *doc = xmlParseFile(fname);
     xmlNode *n;
@@ -887,7 +887,12 @@ struct conf_config *config_create(const char *fname)
     r = process_config_includes(config, n);
     if (r == 0) /* OK */
     {
-        xmlDocFormatDump(stdout, doc, 0);
+        if (verbose)
+        {
+            yaz_log(YLOG_LOG, "Configuration %s after include processing",
+                    fname);
+            xmlDocFormatDump(yaz_log_file(), doc, 0);
+        }
         r = parse_config(config, n);
     }
     xmlFreeDoc(doc);
@@ -930,16 +935,13 @@ void config_destroy(struct conf_config *config)
     }
 }
 
-void config_read_settings(struct conf_config *config,
-                          const char *path_override)
+void config_read_settings(struct conf_config *config)
 {
     struct conf_service *s = config->servers->service;
     for (;s ; s = s->next)
     {
         init_settings(s);
-        if (path_override)
-            settings_read(s, path_override);
-        else if (s->settings)
+        if (s->settings)
             settings_read(s, s->settings);
         else if (config->servers->server_settings)
             settings_read(s, config->servers->server_settings);
@@ -956,8 +958,7 @@ void config_stop_listeners(struct conf_config *conf)
 }
 
 int config_start_listeners(struct conf_config *conf,
-                           const char *listener_override,
-                           const char *proxy_override)
+                           const char *listener_override)
 {
     struct conf_server *ser;
     for (ser = conf->servers; ser; ser = ser->next)
@@ -986,9 +987,7 @@ int config_start_listeners(struct conf_config *conf,
             return -1;
 
         w = wrbuf_alloc();
-        if (proxy_override)
-            wrbuf_puts(w, proxy_override);
-        else if (ser->proxy_host || ser->proxy_port)
+        if (ser->proxy_host || ser->proxy_port)
         {
             if (ser->proxy_host)
                 wrbuf_puts(w, ser->proxy_host);