OSSP CVS Repository

ossp - Difference in ossp-pkg/petidomo/main.c versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/petidomo/main.c 1.3 -> 1.4

--- main.c       2000/12/16 13:11:54     1.3
+++ main.c       2001/01/08 15:55:07     1.4
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.3 $
+   $Revision: 1.4 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -30,8 +30,9 @@
 #  define LOG_PERROR 0
 #endif
 
-static char* listname = NULL;
-static char* mode = NULL;
+static char*  listname = NULL;
+static char*  mode = NULL;
+static char*  masterconfig_path = SYSCONFDIR "/petidomo.conf";
 
 int
 main(int argc, char * argv[])
@@ -41,6 +42,7 @@
     argv_t        args[] =
         {
         {ARGV_MAND, "mode", ARGV_CHAR_P, &mode, "mode", "listserv, deliver, or approve."},
+        {ARGV_MAYBE, "masterconf", ARGV_CHAR_P, &masterconfig_path, "masterconf", "Path to petidomo.conf."},
         {ARGV_MAYBE, 0L, ARGV_CHAR_P, &listname, "listname", "Default mailing list."},
         {ARGV_LAST}
         };
@@ -58,12 +60,14 @@
 
     /* Init Petidomo's internal stuff. */
 
-    if (InitPetidomo() != 0) {
+    if (InitPetidomo(masterconfig_path) != 0) {
         syslog(LOG_CRIT, "Failed to initialize my internals.");
         exit(1);
     }
     MasterConfig = getMasterConfig();
 
+    return 0;
+
     /* Load the file from standard input and save it, so that it isn't
        lost in case of an error. */
 

CVSTrac 2.0.1