OSSP CVS Repository

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

Check-in Number: 269
Date: 2001-Jan-15 17:27:52 (local)
2001-Jan-15 16:27:52 (UTC)
User:simons
Branch:
Comment: Added --approved command line parameter, which is treated as a boolean. Whether it is set or not will be passed through to listserv_main() and to hermes_main(). The parameter will be used by the spooling mechanism.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/hermes.c      1.5 -> 1.6     2 inserted, 2 deleted
ossp-pkg/petidomo/listserv.c      1.3 -> 1.4     2 inserted, 2 deleted
ossp-pkg/petidomo/main.c      1.5 -> 1.6     5 inserted, 7 deleted

ossp-pkg/petidomo/hermes.c 1.5 -> 1.6

--- hermes.c     2001/01/08 20:36:19     1.5
+++ hermes.c     2001/01/15 16:27:52     1.6
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.5 $
+   $Revision: 1.6 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -25,7 +25,7 @@
 #include "petidomo.h"
 
 int
-hermes_main(char * incoming_mail, const char * listname)
+hermes_main(char * incoming_mail, const char * listname, char is_approved)
 {
     const struct PD_Config *     MasterConfig;
     const struct List_Config *   ListConfig;


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

--- listserv.c   2000/12/15 15:48:00     1.3
+++ listserv.c   2001/01/15 16:27:52     1.4
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/listserv.c,v $
-   $Revision: 1.3 $
+   $Revision: 1.4 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -26,7 +26,7 @@
 char * g_currLine;              /* pointer to the line currently parsed */
 
 int
-listserv_main(char * incoming_mail, char * default_list)
+listserv_main(char * incoming_mail, char * default_list, char is_approved)
 {
     const struct List_Config * ListConfig;
     struct Mail *   MailStruct;


ossp-pkg/petidomo/main.c 1.5 -> 1.6

--- main.c       2001/01/08 20:36:19     1.5
+++ main.c       2001/01/15 16:27:52     1.6
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.5 $
+   $Revision: 1.6 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -33,6 +33,7 @@
 static char*  listname = NULL;
 static char*  mode = NULL;
 static char*  masterconfig_path = SYSCONFDIR "/petidomo.conf";
+static char   is_approved = ARGV_FALSE;
 
 int
 main(int argc, char * argv[])
@@ -44,6 +45,7 @@
         {ARGV_MAND, "mode", ARGV_CHAR_P, &mode, "mode", "listserv, deliver, or approve."},
         {ARGV_MAYBE, "listname", ARGV_CHAR_P, &listname, "listname", "Default mailing list."},
         {ARGV_MAYBE, "masterconf", ARGV_CHAR_P, &masterconfig_path, "masterconf", "Path to petidomo.conf."},
+        {ARGV_MAYBE, "approved", ARGV_BOOL, &is_approved, "approved", "approved flag."},
         {ARGV_LAST}
         };
 
@@ -78,21 +80,17 @@
     /* Now decide what we actually do with the mail. */
 
     if (strcasecmp("listserv", mode) == 0)
-        listserv_main(incoming_mail, listname);
+        listserv_main(incoming_mail, listname, is_approved);
     else if (strcasecmp("deliver", mode) == 0)
         {
         if (listname != NULL)
-            hermes_main(incoming_mail, listname);
+            hermes_main(incoming_mail, listname, is_approved);
         else
             {
             syslog(LOG_ERR, "Wrong command line syntax; deliver mode requires a parameter.");
             exit(1);
             }
         }
-    else if (strcasecmp("petidomo", mode) == 0)
-        {
-        /* do nothing */
-        }
     else
         {
         syslog(LOG_ERR, "I don't know anything about mode \"%s\".", mode);

CVSTrac 2.0.1