OSSP CVS Repository

ossp - Check-in [315]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 315
Date: 2001-Jan-19 14:12:46 (local)
2001-Jan-19 13:12:46 (UTC)
User:simons
Branch:
Comment: Mailing list config files may now have the suffix ".config" or ".conf". Similarly, if the list config file is in a separate directory, it may be called <listname>/config or <listname>/conf.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/config.c      1.17 -> 1.18     15 inserted, 5 deleted

ossp-pkg/petidomo/config.c 1.17 -> 1.18

--- config.c     2001/01/18 20:30:50     1.17
+++ config.c     2001/01/19 13:12:46     1.18
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v $
-   $Revision: 1.17 $
+   $Revision: 1.18 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -215,12 +215,22 @@
     if (stat(buffer, &sb) != 0)
         {
         free(buffer);
-        buffer = text_easy_sprintf("%s/%s.config", MasterConfig->list_dir, listname);
-        list_dir = MasterConfig->list_dir;
+        buffer = text_easy_sprintf("%s/%s/conf", MasterConfig->list_dir, listname);
         if (stat(buffer, &sb) != 0)
             {
-            syslog(LOG_ERR, "Can't find a config file for list \"%s\".", listname);
-            exit(1);
+            free(buffer);
+            buffer = text_easy_sprintf("%s/%s.config", MasterConfig->list_dir, listname);
+            list_dir = MasterConfig->list_dir;
+            if (stat(buffer, &sb) != 0)
+                {
+                free(buffer);
+                buffer = text_easy_sprintf("%s/%s.conf", MasterConfig->list_dir, listname);
+                if (stat(buffer, &sb) != 0)
+                    {
+                    syslog(LOG_ERR, "Can't find a config file for list \"%s\".", listname);
+                    exit(1);
+                    }
+                }
             }
         }
     rc = ReadConfig(buffer, ListCF);

CVSTrac 2.0.1