From 286e58b738f953f8ef99b237a7e172b5798ef5cb Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 12 Nov 2005 12:52:30 +0000 Subject: [PATCH] Added orphaned release code --- mbfido/Makefile | 18 +++++++++--------- mbfido/addbbs.c | 1 + mbfido/forward.c | 1 + mbfido/magic.c | 1 + mbfido/mbfido.c | 1 + mbfido/mover.c | 1 + mbfido/ptic.c | 4 ++-- mbfido/ptic.h | 5 +++-- mbfido/tic.c | 11 +++++++---- mbfido/tic.h | 2 +- mbfido/toberep.c | 1 + mbfido/utic.c | 1 + 12 files changed, 29 insertions(+), 18 deletions(-) diff --git a/mbfido/Makefile b/mbfido/Makefile index 3cd522fd..caecdbd9 100644 --- a/mbfido/Makefile +++ b/mbfido/Makefile @@ -124,21 +124,21 @@ depend: # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend -addbbs.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h tic.h fsort.h qualify.h addbbs.h +addbbs.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h orphans.h tic.h fsort.h qualify.h addbbs.h backalias.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h backalias.h flock.o: ../config.h ../lib/mbselib.h flock.h hatch.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h utic.h rollover.h hatch.h mbdiff.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbdiff.h mgrutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h rollover.h addpkt.h createm.h createf.h mgrutil.h qualify.o: ../config.h ../lib/mbselib.h qualify.h -ptic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h mover.h toberep.h tic.h utic.h magic.h forward.h rollover.h ptic.h magic.h createf.h virscan.h qualify.h orphans.h addbbs.h +ptic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h mover.h toberep.h orphans.h tic.h utic.h magic.h forward.h rollover.h ptic.h magic.h createf.h virscan.h qualify.h addbbs.h sendmail.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h rollover.h sendmail.h tracker.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/nodelist.h ../lib/mbsedb.h tracker.h addpkt.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h bwrite.o: ../config.h ../lib/mbselib.h bwrite.h -forward.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/diesel.h tic.h sendmail.h rollover.h mgrutil.h forward.h +forward.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/diesel.h orphans.h tic.h sendmail.h rollover.h mgrutil.h forward.h lhash.o: ../config.h ../lib/mbselib.h lhash.h -mbfido.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h ../lib/mbsedb.h ../lib/msg.h flock.h tosspkt.h unpack.h tic.h fsort.h scan.h mbfido.h tracker.h notify.h rollover.h hatch.h scannews.h maketags.h makestat.h newspost.h rnews.h mgrutil.h backalias.h rfc2ftn.h dirsession.h dirlock.h queue.h msg.h createm.h +mbfido.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h ../lib/mbsedb.h ../lib/msg.h flock.h tosspkt.h unpack.h orphans.h tic.h fsort.h scan.h mbfido.h tracker.h notify.h rollover.h hatch.h scannews.h maketags.h makestat.h newspost.h rnews.h mgrutil.h backalias.h rfc2ftn.h dirsession.h dirlock.h queue.h msg.h createm.h mkftnhdr.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h atoul.h hash.h msgflags.h aliasdb.h mkftnhdr.h ping.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h sendmail.h postnetmail.h ping.h rfc2ftn.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbinet.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h mkftnhdr.h hash.h rollover.h postnetmail.h postecho.h msgflags.h rfc2ftn.h @@ -146,14 +146,14 @@ storeecho.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msg unpack.o: ../config.h ../lib/mbselib.h flock.h unpack.h aliasdb.o: ../config.h ../lib/mbselib.h aliasdb.h fsort.o: ../config.h ../lib/mbselib.h fsort.h -magic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h tic.h utic.h magic.h +magic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h orphans.h tic.h utic.h magic.h mbfile.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfkill.h mbfadopt.h mbfindex.h mbfcheck.h mbfpack.h mbflist.h mbfimport.h mbftoberep.h mbfmove.h mbfdel.h mbfutil.h mbfsort.h mbfile.h mbfrearc.h -mover.o: ../config.h ../lib/mbselib.h tic.h mover.h +mover.o: ../config.h ../lib/mbselib.h orphans.h tic.h mover.h post.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h post.h rnews.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbinet.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h rfc2ftn.h mbfido.h ../paths.h rnews.h storenet.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h msgflags.h rollover.h storenet.h mbfrearc.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbfutil.h mbfmove.h -utic.o: ../config.h ../lib/mbselib.h tic.h mover.h tic.h utic.h +utic.o: ../config.h ../lib/mbselib.h orphans.h tic.h mover.h tic.h utic.h announce.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h grlist.h msgutil.h toberep.h announce.h fflist.o: ../config.h ../lib/mbselib.h ../lib/msg.h fflist.h ftn2rfc.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h rollover.h aliasdb.h postemail.h backalias.h msgflags.h rfc2ftn.h ftn2rfc.h @@ -162,7 +162,7 @@ mbindex.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbindex.h msgutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h postecho.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h qualify.h rollover.o: ../config.h ../lib/mbselib.h rollover.h -tic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h ptic.h fsort.h orphans.h tic.h +tic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h fsort.h orphans.h ptic.h tic.h areamgr.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h filefind.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h fflist.h filefind.h msgutil.h grlist.o: ../config.h ../lib/mbselib.h grlist.h @@ -171,7 +171,7 @@ mbmsg.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/mbsedb. newspost.o: ../config.h ../lib/mbselib.h ../lib/mbinet.h newspost.h postemail.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/mbinet.h ../lib/msg.h postemail.h scan.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h addpkt.h tracker.h ftn2rfc.h rfc2ftn.h rollover.h postemail.h scan.h -toberep.o: ../config.h ../lib/mbselib.h tic.h toberep.h +toberep.o: ../config.h ../lib/mbselib.h orphans.h tic.h toberep.h atoul.o: ../config.h ../lib/mbselib.h atoul.h filemgr.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h mgrutil.h createf.h filemgr.h hash.o: ../config.h ../lib/mbselib.h hash.h lhash.h diff --git a/mbfido/addbbs.c b/mbfido/addbbs.c index 2e9f0cae..d8c1e2fd 100644 --- a/mbfido/addbbs.c +++ b/mbfido/addbbs.c @@ -32,6 +32,7 @@ #include "../lib/mbselib.h" #include "../lib/users.h" #include "../lib/mbsedb.h" +#include "orphans.h" #include "tic.h" #include "fsort.h" #include "qualify.h" diff --git a/mbfido/forward.c b/mbfido/forward.c index 925d5768..795a4a9e 100644 --- a/mbfido/forward.c +++ b/mbfido/forward.c @@ -33,6 +33,7 @@ #include "../lib/users.h" #include "../lib/mbsedb.h" #include "../lib/diesel.h" +#include "orphans.h" #include "tic.h" #include "sendmail.h" #include "rollover.h" diff --git a/mbfido/magic.c b/mbfido/magic.c index b991fe2f..dedba87c 100644 --- a/mbfido/magic.c +++ b/mbfido/magic.c @@ -32,6 +32,7 @@ #include "../lib/mbselib.h" #include "../lib/users.h" #include "../lib/mbsedb.h" +#include "orphans.h" #include "tic.h" #include "utic.h" #include "magic.h" diff --git a/mbfido/mbfido.c b/mbfido/mbfido.c index 65e00e03..2af9b176 100644 --- a/mbfido/mbfido.c +++ b/mbfido/mbfido.c @@ -38,6 +38,7 @@ #include "flock.h" #include "tosspkt.h" #include "unpack.h" +#include "orphans.h" #include "tic.h" #include "fsort.h" #include "scan.h" diff --git a/mbfido/mover.c b/mbfido/mover.c index b9eabb62..d250bc22 100644 --- a/mbfido/mover.c +++ b/mbfido/mover.c @@ -30,6 +30,7 @@ #include "../config.h" #include "../lib/mbselib.h" +#include "orphans.h" #include "tic.h" #include "mover.h" diff --git a/mbfido/ptic.c b/mbfido/ptic.c index 76a045c9..ed57f27f 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -35,6 +35,7 @@ #include "unpack.h" #include "mover.h" #include "toberep.h" +#include "orphans.h" #include "tic.h" #include "utic.h" #include "magic.h" @@ -45,7 +46,6 @@ #include "createf.h" #include "virscan.h" #include "qualify.h" -#include "orphans.h" #include "addbbs.h" @@ -66,7 +66,7 @@ extern int check_dupe; * 1 - Some error * 2 - Orphaned tic */ -int ProcessTic(fa_list **sbl) +int ProcessTic(fa_list **sbl, orphans **opl) { time_t Now, Fdate; int Age, First, Listed = FALSE, DownLinks = 0, MustRearc = FALSE; diff --git a/mbfido/ptic.h b/mbfido/ptic.h index 45eb005d..d88c2ea7 100644 --- a/mbfido/ptic.h +++ b/mbfido/ptic.h @@ -1,7 +1,8 @@ #ifndef _PTIC_H #define _PTIC_H -int ProcessTic(fa_list **); +/* $Id$ */ + +int ProcessTic(fa_list **, orphans **); #endif - diff --git a/mbfido/tic.c b/mbfido/tic.c index 8d8f558d..c6015d15 100644 --- a/mbfido/tic.c +++ b/mbfido/tic.c @@ -33,9 +33,9 @@ #include "../lib/users.h" #include "../lib/mbsedb.h" #include "unpack.h" -#include "ptic.h" #include "fsort.h" #include "orphans.h" +#include "ptic.h" #include "tic.h" #define UNPACK_FACTOR 300 @@ -66,6 +66,7 @@ int Tic() struct stat sbuf; int i, rc = 0; fd_list *fdl = NULL; + orphans *opl = NULL; IsDoing("Process .tic files"); CompileNL = FALSE; @@ -123,7 +124,7 @@ int Tic() sort_fdlist(&fdl); while ((fname = pull_fdlist(&fdl)) != NULL) { - if (LoadTic(inbound, fname) == 0) + if (LoadTic(inbound, fname, &opl) == 0) rc = 1; if (IsSema((char *)"upsalarm")) { rc = 0; @@ -151,6 +152,8 @@ int Tic() if (CompileNL) CreateSema((char *)"mbindex"); + tidy_orphans(&opl); + free(inbound); return rc; } @@ -160,7 +163,7 @@ int Tic() /* * Returns 1 if error, 0 if ok. */ -int LoadTic(char *inb, char *tfn) +int LoadTic(char *inb, char *tfn, orphans **opl) { FILE *tfp; char *Temp, *Temp2, *Buf, *Log = NULL, RealName[256]; @@ -484,7 +487,7 @@ int LoadTic(char *inb, char *tfn) free(Buf); tic_in++; - rc = ProcessTic(&sbl); + rc = ProcessTic(&sbl, opl); tidy_falist(&sbl); return rc; diff --git a/mbfido/tic.h b/mbfido/tic.h index bb1549a7..715d3efa 100644 --- a/mbfido/tic.h +++ b/mbfido/tic.h @@ -66,7 +66,7 @@ int CompileNL; int Tic(void); -int LoadTic(char *, char *); +int LoadTic(char *, char *, orphans **); #endif diff --git a/mbfido/toberep.c b/mbfido/toberep.c index d99636f0..870e2cc4 100644 --- a/mbfido/toberep.c +++ b/mbfido/toberep.c @@ -30,6 +30,7 @@ #include "../config.h" #include "../lib/mbselib.h" +#include "orphans.h" #include "tic.h" #include "toberep.h" diff --git a/mbfido/utic.c b/mbfido/utic.c index 272483b6..ec035009 100644 --- a/mbfido/utic.c +++ b/mbfido/utic.c @@ -30,6 +30,7 @@ #include "../config.h" #include "../lib/mbselib.h" +#include "orphans.h" #include "tic.h" #include "mover.h" #include "tic.h"