Remove support for option -t.
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Sep 2009 09:19:37 +0000 (11:19 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 10 Sep 2009 09:22:50 +0000 (11:22 +0200)
Option -t allows a settings file to be given on the command line.
This patch removes that facility. It is a rarely used facility.

doc/pazpar2.xml
src/pazpar2.c
src/pazpar2_config.c
src/pazpar2_config.h

index 54f92b4..072c677 100644 (file)
@@ -32,7 +32,6 @@
    <arg choice="opt"><option>-h <replaceable>ip:port</replaceable></option></arg>
    <arg choice="opt"><option>-l <replaceable>logfile</replaceable></option></arg>
    <arg choice="opt"><option>-p <replaceable>pidfile</replaceable></option></arg>
-   <arg choice="opt"><option>-t <replaceable>path</replaceable></option></arg>
    <arg choice="opt"><option>-T <replaceable>session_timeout</replaceable></option></arg>
    <arg choice="opt"><option>-u <replaceable>uid</replaceable></option></arg>
    <arg choice="opt"><option>-V</option></arg>
    </varlistentry>
 
    <varlistentry>
-    <term><option>-t <replaceable>path</replaceable></option></term>
-    <listitem>
-     <para>
-      Specifies a file or directory with alternative settings. This
-      overrides the <literal>settings</literal> element in the main
-      configuration.
-     </para>
-    </listitem>
-   </varlistentry>
-   <varlistentry>
     <term><option>-T <replaceable>session_timeout</replaceable></option></term>
     <listitem>
      <para>
index 56d2599..d7e8c98 100644 (file)
@@ -34,13 +34,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include <yaz/sc.h>
 
-static char *path_override = 0;
 static struct conf_config *sc_stop_config = 0;
 
 void child_handler(void *data)
 {
     struct conf_config *config = (struct conf_config *) data;
-    config_read_settings(config, path_override);
+    config_read_settings(config);
 
     pazpar2_event_loop();
 }
@@ -105,7 +104,7 @@ static int sc_main(
     yaz_log_init_prefix("pazpar2");
     yaz_log_xml_errors(0, YLOG_WARN);
 
-    while ((ret = options("dDf:h:l:p:t:T:u:VX", argv, argc, &arg)) != -2)
+    while ((ret = options("dDf:h:l:p:T:u:VX", argv, argc, &arg)) != -2)
     {
        switch (ret)
         {
@@ -131,9 +130,6 @@ static int sc_main(
         case 'p':
             pidfile = arg;
             break;
-        case 't':
-            path_override = arg;
-            break;
         case 'T':
            session_timeout = atoi(arg);
            if (session_timeout < 9 || session_timeout > 86400)
@@ -160,7 +156,6 @@ static int sc_main(
                     "    -h [host:]port          (REST protocol listener)\n"
                     "    -l file                 log to file\n"
                     "    -p pidfile              PID file\n"
-                    "    -t settings\n"
                     "    -T session_timeout\n"
                     "    -u uid\n"
                     "    -V                      show version\n"
index 3e2290e..4745458 100644 (file)
@@ -930,16 +930,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);
index 29c7e20..2298cff 100644 (file)
@@ -174,8 +174,7 @@ void config_destroy(struct conf_config *config);
 xsltStylesheet *conf_load_stylesheet(struct conf_config *config,
                                      const char *fname);
 
-void config_read_settings(struct conf_config *config,
-                          const char *path_override);
+void config_read_settings(struct conf_config *config);
 
 struct conf_service *locate_service(struct conf_server *server,
                                     const char *service_id);