diff --git a/mbfido/Makefile b/mbfido/Makefile index df259eff..05615207 100644 --- a/mbfido/Makefile +++ b/mbfido/Makefile @@ -4,7 +4,7 @@ include ../Makefile.global -SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c \ +SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c qualify.c \ ptic.c sendmail.c tracker.c addpkt.c bwrite.c forward.c lhash.c \ mbfido.c mkftnhdr.c ping.c rfc2ftn.c storeecho.c unpack.c aliasdb.c \ fsort.c magic.c mbfile.c mover.c post.c rnews.c storenet.c \ @@ -15,7 +15,7 @@ SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c \ mbfkill.c mbfutil.c mbfindex.c mbfcheck.c mbfpack.c mbflist.c mbfadopt.c \ mbfimport.c virscan.c mbftoberep.c mbfmove.c mbfdel.c bounce.c \ createm.c createf.c msgflags.c dirsession.c queue.c dirlock.c -HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h \ +HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h qualify.h \ postnetmail.h scannews.h tosspkt.h addpkt.h bwrite.h forward.h \ lhash.h mbfido.h mkftnhdr.h ptic.h sendmail.h tracker.h \ aliasdb.h fsort.h magic.h mbfile.h mover.h ping.h rfc2ftn.h \ @@ -33,7 +33,7 @@ MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o rollover.o \ bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o postnetmail.o \ postecho.o backalias.o createm.o createf.o msgflags.o dirsession.o \ - queue.o dirlock.o + queue.o dirlock.o qualify.o MBSEQ_OBJS = mbseq.o MBAFF_OBJS = announce.o fflist.o filefind.o grlist.o mbaff.o msgutil.o MBINDEX_OBJS = mbindex.o @@ -141,6 +141,7 @@ flock.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/clcomm.h flock.h hatch.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbtic.h utic.h rollover.h hatch.h mbdiff.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/mberrors.h mbdiff.h mgrutil.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/diesel.h sendmail.h rollover.h addpkt.h createm.h createf.h mgrutil.h +qualify.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h qualify.h ptic.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbtic.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbdupe.h unpack.h mover.h toberep.h tic.h utic.h addbbs.h magic.h forward.h rollover.h ptic.h magic.h createf.h virscan.h sendmail.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbnode.h ../lib/clcomm.h ../lib/dbmsgs.h addpkt.h rollover.h sendmail.h tracker.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbftn.h tracker.h @@ -169,7 +170,7 @@ ftn2rfc.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/u makestat.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/diesel.h ../lib/msg.h mgrutil.h makestat.h mbindex.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbftn.h ../lib/mberrors.h mbindex.h msgutil.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h -postecho.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h +postecho.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h qualify.h rollover.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h rollover.h tic.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/dbftn.h ../lib/clcomm.h unpack.h ptic.h fsort.h tic.h areamgr.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h diff --git a/mbfido/postecho.c b/mbfido/postecho.c index 0a40b60c..f89a705c 100644 --- a/mbfido/postecho.c +++ b/mbfido/postecho.c @@ -49,6 +49,7 @@ #include "storeecho.h" #include "addpkt.h" #include "rollover.h" +#include "qualify.h" @@ -68,8 +69,6 @@ extern int echo_bad; /* Bad echomail */ #define MAXSEEN 70 -void tidy_qualify(qualify **); -void fill_qualify(qualify **, fidoaddr, int, int); int EchoOut(fidoaddr, char *, char *, char *, FILE *, int, int, time_t); @@ -130,34 +129,6 @@ int EchoOut(fidoaddr aka, char *toname, char *fromname, char *subj, FILE *fp, in -void tidy_qualify(qualify **qal) -{ - qualify *tmp, *old; - - for (tmp = *qal; tmp; tmp = old) { - old = tmp->next; - free(tmp); - } - *qal = NULL; -} - - - -void fill_qualify(qualify **qal, fidoaddr aka, int orig, int insb) -{ - qualify *tmp; - - tmp = (qualify *)malloc(sizeof(qualify)); - tmp->next = *qal; - tmp->aka = aka; - tmp->inseenby = insb; - tmp->send = ((!insb) && (!orig)); - tmp->orig = orig; - *qal = tmp; -} - - - /* * Post echomail message, forward if needed. * pkt_from, from, to, subj, orig, mdate, flags, cost, file diff --git a/mbfido/postecho.h b/mbfido/postecho.h index 47c4556b..785b9da4 100644 --- a/mbfido/postecho.h +++ b/mbfido/postecho.h @@ -1,17 +1,7 @@ #ifndef _POSTECHO_H #define _POSTECHO_H - -/* - * Structure for qualified systems to receive a echomail message - */ -typedef struct _qualify { - struct _qualify *next; /* Linked list */ - fidoaddr aka; /* AKA of the linked system */ - unsigned inseenby : 1; /* System is in SEEN-BY */ - unsigned send : 1; /* Send message to link */ - unsigned orig : 1; /* Is originator of message */ -} qualify; +/* $Id$ */ int postecho(faddr *, faddr *, faddr *, char *, char *, time_t, int, int, FILE *, int); diff --git a/mbfido/qualify.c b/mbfido/qualify.c new file mode 100644 index 00000000..4a7e69be --- /dev/null +++ b/mbfido/qualify.c @@ -0,0 +1,65 @@ +/***************************************************************************** + * + * $Id$ + * Purpose ...............: List of qualified systems + * + ***************************************************************************** + * Copyright (C) 1997-2002 + * + * Michiel Broek FIDO: 2:280/2802 + * Beekmansbos 10 + * 1971 BV IJmuiden + * the Netherlands + * + * This file is part of MBSE BBS. + * + * This BBS 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, or (at your option) any + * later version. + * + * MBSE BBS 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 MBSE BBS; see the file COPYING. If not, write to the Free + * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + *****************************************************************************/ + +#include "../config.h" +#include "../lib/libs.h" +#include "../lib/memwatch.h" +#include "../lib/structs.h" +#include "qualify.h" + + + +void tidy_qualify(qualify **qal) +{ + qualify *tmp, *old; + + for (tmp = *qal; tmp; tmp = old) { + old = tmp->next; + free(tmp); + } + *qal = NULL; +} + + + +void fill_qualify(qualify **qal, fidoaddr aka, int orig, int insb) +{ + qualify *tmp; + + tmp = (qualify *)malloc(sizeof(qualify)); + tmp->next = *qal; + tmp->aka = aka; + tmp->inseenby = insb; + tmp->send = ((!insb) && (!orig)); + tmp->orig = orig; + *qal = tmp; +} + + diff --git a/mbfido/qualify.h b/mbfido/qualify.h new file mode 100644 index 00000000..4670ca52 --- /dev/null +++ b/mbfido/qualify.h @@ -0,0 +1,23 @@ +#ifndef _QUALIFY_H +#define _QUALIFY_H + +/* $Id$ */ + +/* + * Structure for qualified systems to receive a echomail message/tic file + */ +typedef struct _qualify { + struct _qualify *next; /* Linked list */ + fidoaddr aka; /* AKA of the linked system */ + unsigned inseenby : 1; /* System is in SEEN-BY */ + unsigned send : 1; /* Send message to link */ + unsigned orig : 1; /* Is originator of message */ +} qualify; + + + +void tidy_qualify(qualify **); +void fill_qualify(qualify **, fidoaddr, int, int); + + +#endif