OSSP CVS Repository

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

Check-in Number: 3126
Date: 2003-Jan-30 20:27:28 (local)
2003-Jan-30 19:27:28 (UTC)
User:rse
Branch:
Comment: Implement the decision from yesterday evening and finally rename fixme.h to lmtp2nntp_common.h because there is little chance this this stuff ever can be moved into more local source contexts.
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/00TODO      1.62 -> 1.63     2 inserted, 0 deleted
ossp-pkg/lmtp2nntp/Makefile.in      1.50 -> 1.51     6 inserted, 6 deleted
ossp-pkg/lmtp2nntp/fixme.h      1.24->removed
ossp-pkg/lmtp2nntp/lmtp2nntp_common.h      added-> 1.1
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.87 -> 1.88     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_config.h      1.9 -> 1.10     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_l2.c      1.3 -> 1.4     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.59 -> 1.60     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c      1.30 -> 1.31     1 inserted, 1 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_nntp.h      1.3 -> 1.4     1 inserted, 1 deleted

ossp-pkg/lmtp2nntp/00TODO 1.62 -> 1.63

--- 00TODO       2003/01/30 19:18:57     1.62
+++ 00TODO       2003/01/30 19:27:28     1.63
@@ -10,6 +10,8 @@
   TODOs are deferred for later releases. There're usually functional enhancements,
   performance improvements, rewrites, integration of external libraries ...
 
+  move as much as possible from lmtp2nntp_common.h into local source contexts.
+
   should we resolv on startup only or for every access or using dns ttl
 
   add --define foo:bar option allowing the user to specify arbitrary variables


ossp-pkg/lmtp2nntp/Makefile.in 1.50 -> 1.51

--- Makefile.in  2002/08/14 21:19:01     1.50
+++ Makefile.in  2003/01/30 19:27:28     1.51
@@ -128,15 +128,15 @@
 $(OBJS): Makefile
 
 #   AUTOMATICALLY GENERATED DEPENDENCY LIST - DO NOT EDIT
-lmtp2nntp_main.o: lmtp2nntp_main.c lmtp2nntp_argz.h lmtp2nntp_shpat.h lmtp2nntp_daemon.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h fixme.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
+lmtp2nntp_main.o: lmtp2nntp_main.c lmtp2nntp_argz.h lmtp2nntp_shpat.h lmtp2nntp_daemon.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h lmtp2nntp_common.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
 lmtp2nntp_daemon.o: lmtp2nntp_daemon.c config.h lmtp2nntp_daemon.h
 lmtp2nntp_lmtp.o: lmtp2nntp_lmtp.c lmtp2nntp_lmtp.h config.h
-lmtp2nntp_nntp.o: lmtp2nntp_nntp.c lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h fixme.h 
+lmtp2nntp_nntp.o: lmtp2nntp_nntp.c lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_common.h 
 lmtp2nntp_argz.o: lmtp2nntp_argz.c lmtp2nntp_argz.h config.h
 lmtp2nntp_shpat.o: lmtp2nntp_shpat.c config.h lmtp2nntp_shpat.h
-lmtp2nntp_msg.o: lmtp2nntp_msg.c lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_argz.h fixme.h lmtp2nntp_nntp.h 
-lmtp2nntp_option.o: lmtp2nntp_option.c lmtp2nntp_argz.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h fixme.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
-lmtp2nntp_config.o: lmtp2nntp_config.c lmtp2nntp_argz.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h fixme.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
+lmtp2nntp_msg.o: lmtp2nntp_msg.c lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_argz.h lmtp2nntp_common.h lmtp2nntp_nntp.h 
+lmtp2nntp_option.o: lmtp2nntp_option.c lmtp2nntp_argz.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h lmtp2nntp_common.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
+lmtp2nntp_config.o: lmtp2nntp_config.c lmtp2nntp_argz.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h lmtp2nntp_option.h lmtp2nntp_config.h lmtp2nntp_common.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_lmtp.h lmtp2nntp_version.c
 lmtp2nntp_exwrap.o: lmtp2nntp_exwrap.c lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h 
 lmtp2nntp_version.o: lmtp2nntp_version.c lmtp2nntp_version.c
-lmtp2nntp_l2.o: lmtp2nntp_l2.c fixme.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h 
+lmtp2nntp_l2.o: lmtp2nntp_l2.c lmtp2nntp_common.h lmtp2nntp_nntp.h lmtp2nntp_msg.h lmtp2nntp_global.h config.h lmtp2nntp_exwrap.h 


ossp-pkg/lmtp2nntp/fixme.h 1.24 -> 1.25



ossp-pkg/lmtp2nntp/lmtp2nntp_common.h -> 1.1

*** /dev/null    Sat Nov 23 01:15:03 2024
--- -    Sat Nov 23 01:15:03 2024
***************
*** 0 ****
--- 1,166 ----
+ /*
+ **  Copyright (c) 2001-2002 The OSSP Project <http://www.ossp.org/>
+ **  Copyright (c) 2001-2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ **
+ **  This file is part of OSSP lmtp2nntp, an LMTP speaking local
+ **  mailer which forwards mails as Usenet news articles via NNTP.
+ **  It can be found at http://www.ossp.org/pkg/lmtp2nntp/.
+ **
+ **  This program is free software; you can redistribute it and/or
+ **  modify it under the terms of the GNU General Public  License
+ **  as published by the Free Software Foundation; either version
+ **  2.0 of the License, or (at your option) any later version.
+ **
+ **  This program is distributed in the hope that it will be useful,
+ **  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ **  General Public License for more details.
+ **
+ **  You should have received a copy of the GNU General Public License
+ **  along with this file; if not, write to the Free Software
+ **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ **  USA, or contact the OSSP project <ossp@ossp.org>.
+ **
+ **  lmtp2nntp_common.h: common stuff
+ */
+ 
+ /*
+  * FIXME this stuff actually should be not global/common! It was mainly
+  * a temporary fix to allow code migration from lmtp2nntp_main.c's
+  * getopt switch to lmtp2nntp_config.[ch]. Unfortunately it is very hard
+  * to move this remaining stuff into local contexts.
+  */
+ 
+ #ifndef __LMTP2NNTP_COMMON_H__
+ #define __LMTP2NNTP_COMMON_H__
+ 
+ #include <val.h>
+ #include <var.h>
+ #include <sa.h>
+ 
+ struct acl {
+     char      *acl;
+     int        not;
+     size_t     prefixlen;
+     sa_addr_t *saa;
+ };
+ struct nntp_st;
+ typedef struct nntp_st nntp_t;
+ #include "lmtp2nntp_nntp.h"
+ struct ns {
+     sa_addr_t      *saa;
+     sa_t           *sa;
+     nntp_t         *nntp;
+     nntp_rc_t       rc;
+     l2_channel_t   *l2;
+ };
+ struct session {
+     int     lhlo_seen;
+     char   *lhlo_domain;
+ };
+ #include <sys/utsname.h>
+ 
+ struct headerrule_st;
+ typedef struct headerrule_st headerrule_t;
+ #include <pcre.h>
+ struct headerrule_st {
+     headerrule_t *next;
+     int           pri;
+     char         *regex;
+     char         *name;
+     char         *val;
+     pcre         *pcreRegex;
+     pcre_extra   *pcreExtra;
+ };
+ headerrule_t *FIXME1;
+ 
+ struct headerdata_st;
+ typedef struct headerdata_st headerdata_t;
+ struct headerdata_st {
+     headerdata_t *prev;
+     headerdata_t *next;
+     char *name;
+     int ndata; /* =0 means data is invalid, =1 means use data.s, >1 means use data.m */
+     union {
+         char *s;
+         char **m;
+     } data;
+ };
+ headerdata_t *FIXME2;
+ 
+ typedef struct {
+     l2_context_t    ctx;
+     val_t          *prival;
+     val_t          *val;
+     char           *progname;
+     int             option_groupmode;
+     int             option_operationmode;
+     char           *option_operationmodefakestatus;
+     char           *option_operationmodefakedsn;
+     int             option_maxmessagesize;
+     headerrule_t   *option_firstheaderrule;
+     int             option_timeout_lmtp_accept;
+     int             option_timeout_lmtp_read;
+     int             option_timeout_lmtp_write;
+     int             option_timeout_nntp_connect;
+     int             option_timeout_nntp_read;
+     int             option_timeout_nntp_write;
+     char           *option_nodename;
+     char           *option_mailfrom;
+     char           *option_restrictheader;
+     char           *option_pidfile;
+     int             option_killflag;
+     uid_t           option_uid;
+     int             option_daemon;
+     int             nacl; /* number of acl structures found at pacl */
+     struct acl     *pacl; /* pointer to an array of acl structures */
+     int             option_childsmax;
+     int             active_childs;
+     l2_env_t       *l2_env;
+     l2_channel_t   *l2;
+     sa_addr_t      *saaServerbind;
+     sa_t           *saServerbind;
+     sa_addr_t      *saaClientbind;
+     sa_t           *saClientbind;
+     sa_addr_t      *saaIO;
+     sa_t           *saIO;
+     int             fdIOi;
+     int             fdIOo;
+     int             nns; /* number of ns structures found at pns */
+     struct ns      *pns; /* pointer to an array of ns structures */
+     char           *azGroupargs;
+     size_t          asGroupargs;
+     struct          session session;
+     msg_t          *msg;
+     var_t          *config_varregex;
+     var_t          *config_varctx;
+     int             msgcount; /* number of messages processed, used for creating unique ids */
+ } lmtp2nntp_t;
+ 
+ #define ERR_EXECUTION 1
+ #define ERR_DELIVERY -2
+ 
+ enum {
+     GROUPMODE_UNDEF = 0,
+     GROUPMODE_ARG,
+     GROUPMODE_ENVELOPE,
+     GROUPMODE_HEADER
+ };
+ 
+ enum {
+     OPERATIONMODE_UNDEF = 0,
+     OPERATIONMODE_FAKE,
+     OPERATIONMODE_POST,
+     OPERATIONMODE_FEED
+ };
+ 
+ void msg_headermatrixbuildup(msg_t *msg);
+ void msg_headermatrixteardwn(msg_t *msg);
+ void headerrewrite(lmtp2nntp_t *ctx);
+ 
+ #include "l2.h"
+ extern l2_handler_t l2_handler_var;
+ extern void logbook(l2_channel_t *, l2_level_t, const char *, ...);
+ 
+ #endif /* __LMTP2NNTP_COMMON_H__ */
+ 


ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.87 -> 1.88

--- lmtp2nntp_config.c   2003/01/30 19:18:57     1.87
+++ lmtp2nntp_config.c   2003/01/30 19:27:29     1.88
@@ -65,7 +65,7 @@
 #include "lmtp2nntp_lmtp.h"
 #include "lmtp2nntp_nntp.h"
 #include "lmtp2nntp_msg.h"
-#include "fixme.h"
+#include "lmtp2nntp_common.h"
 #define _LMTP2NNTP_VERSION_C_AS_HEADER_
 #include "lmtp2nntp_version.c"
 #undef  _LMTP2NNTP_VERSION_C_AS_HEADER_


ossp-pkg/lmtp2nntp/lmtp2nntp_config.h 1.9 -> 1.10

--- lmtp2nntp_config.h   2003/01/30 15:19:55     1.9
+++ lmtp2nntp_config.h   2003/01/30 19:27:29     1.10
@@ -28,7 +28,7 @@
 #define __LMTP2NNTP_CONFIG_H__
 
 #include "lmtp2nntp_global.h"
-#include "fixme.h"
+#include "lmtp2nntp_common.h"
 
 typedef enum {
     CONFIG_OK,


ossp-pkg/lmtp2nntp/lmtp2nntp_l2.c 1.3 -> 1.4

--- lmtp2nntp_l2.c       2002/04/18 14:27:41     1.3
+++ lmtp2nntp_l2.c       2003/01/30 19:27:29     1.4
@@ -27,7 +27,7 @@
 
 #include <stdarg.h>
 #include <stdlib.h>
-#include "fixme.h"
+#include "lmtp2nntp_common.h"
 
 /* declare private channel configuration */
 typedef struct {


ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.59 -> 1.60

--- lmtp2nntp_main.c     2003/01/30 15:26:24     1.59
+++ lmtp2nntp_main.c     2003/01/30 19:27:29     1.60
@@ -81,7 +81,7 @@
 #include "lmtp2nntp_lmtp.h"
 #include "lmtp2nntp_nntp.h"
 #include "lmtp2nntp_msg.h"
-#include "fixme.h"
+#include "lmtp2nntp_common.h"
 #include "sa.h"
 #define _LMTP2NNTP_VERSION_C_AS_HEADER_
 #include "lmtp2nntp_version.c"


ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c 1.30 -> 1.31

--- lmtp2nntp_msg.c      2003/01/30 13:30:41     1.30
+++ lmtp2nntp_msg.c      2003/01/30 19:27:29     1.31
@@ -29,7 +29,7 @@
 
 #include "lmtp2nntp_msg.h"
 #include "lmtp2nntp_argz.h"
-#include "fixme.h" /* FIMXE logbook only */
+#include "lmtp2nntp_common.h" /* FIMXE logbook only */
 #include "tai.h"
 #include "str.h"
 


ossp-pkg/lmtp2nntp/lmtp2nntp_nntp.h 1.3 -> 1.4

--- lmtp2nntp_nntp.h     2002/01/24 12:07:13     1.3
+++ lmtp2nntp_nntp.h     2003/01/30 19:27:29     1.4
@@ -59,7 +59,7 @@
 } nntp_rc_t;
 
 /*FIXME see fixme above */
-#include "fixme.h"
+#include "lmtp2nntp_common.h"
 
 typedef struct {
     int fd;

CVSTrac 2.0.1