OSSP CVS Repository

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

Check-in Number: 276
Date: 2001-Jan-15 18:06:48 (local)
2001-Jan-15 17:06:48 (UTC)
User:simons
Branch:
Comment: Had to make is_approved a global variable, because it is actually tested in subroutines of listserv_main() and hermes_main(), like subscribe(), which's parameter list I don't want to change.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/hermes.c      1.6 -> 1.7     2 inserted, 2 deleted
ossp-pkg/petidomo/listserv.c      1.4 -> 1.5     2 inserted, 2 deleted
ossp-pkg/petidomo/main.c      1.6 -> 1.7     5 inserted, 5 deleted
ossp-pkg/petidomo/petidomo.h      1.11 -> 1.12     7 inserted, 3 deleted

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

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


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

--- listserv.c   2001/01/15 16:27:52     1.4
+++ listserv.c   2001/01/15 17:06:48     1.5
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/listserv.c,v $
-   $Revision: 1.4 $
+   $Revision: 1.5 $
 
    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, char is_approved)
+listserv_main(char * incoming_mail, char * default_list)
 {
     const struct List_Config * ListConfig;
     struct Mail *   MailStruct;


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

--- main.c       2001/01/15 16:27:52     1.6
+++ main.c       2001/01/15 17:06:48     1.7
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.6 $
+   $Revision: 1.7 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -33,7 +33,7 @@
 static char*  listname = NULL;
 static char*  mode = NULL;
 static char*  masterconfig_path = SYSCONFDIR "/petidomo.conf";
-static char   is_approved = ARGV_FALSE;
+char          g_is_approved = ARGV_FALSE;
 
 int
 main(int argc, char * argv[])
@@ -45,7 +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_MAYBE, "approved", ARGV_BOOL, &g_is_approved, "approved", "approved flag."},
         {ARGV_LAST}
         };
 
@@ -80,11 +80,11 @@
     /* Now decide what we actually do with the mail. */
 
     if (strcasecmp("listserv", mode) == 0)
-        listserv_main(incoming_mail, listname, is_approved);
+        listserv_main(incoming_mail, listname);
     else if (strcasecmp("deliver", mode) == 0)
         {
         if (listname != NULL)
-            hermes_main(incoming_mail, listname, is_approved);
+            hermes_main(incoming_mail, listname);
         else
             {
             syslog(LOG_ERR, "Wrong command line syntax; deliver mode requires a parameter.");


ossp-pkg/petidomo/petidomo.h 1.11 -> 1.12

--- petidomo.h   2001/01/15 16:58:58     1.11
+++ petidomo.h   2001/01/15 17:06:48     1.12
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v $
-   $Revision: 1.11 $
+   $Revision: 1.12 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -48,6 +48,10 @@
 #  include <dmalloc.h>
 #endif
 
+/********** main.c **********/
+
+extern char g_is_approved;
+
 /********** config.c **********/
 
 struct PD_Config
@@ -185,7 +189,7 @@
 
 /********** listserv.c **********/
 
-int listserv_main(char *incoming_mail, char *default_list, char);
+int listserv_main(char *incoming_mail, char *default_list);
 
 /********** mailer.c **********/
 
@@ -215,7 +219,7 @@
 
 /********** hermes.c **********/
 
-int hermes_main(char *incoming_mail, const char *listname, char);
+int hermes_main(char *incoming_mail, const char *listname);
 
 /********** subscribe.c **********/
 

CVSTrac 2.0.1