diff --git a/ChangeLog b/ChangeLog index 37139f53..b286538f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ v0.35.06 mbsebbs: Several user input functions don't allow comma's anymore. + mbfido: + For debug and test added extra logging for tic processing. + This will be for better SEEN-BY lists creation. v0.35.05 19-Oct-2002 - 13-Nov-2002. diff --git a/mbfido/Makefile b/mbfido/Makefile index 05615207..4f71a992 100644 --- a/mbfido/Makefile +++ b/mbfido/Makefile @@ -142,7 +142,7 @@ hatch.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/use 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 +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 qualify.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 addpkt.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/dbnode.h ../lib/dbmsgs.h addpkt.h diff --git a/mbfido/forward.c b/mbfido/forward.c index 8ec0f04e..560664d2 100644 --- a/mbfido/forward.c +++ b/mbfido/forward.c @@ -62,11 +62,6 @@ void ForwardFile(fidoaddr Node, fa_list *sbl) } Syslog('+', "Forward file to %s, %s netmail", aka2str(Node), nodes.Message?"with":"without"); - /* - * Hier moet een nieuwe SEEN-BY check komen, maar dan wel zo dat - * de net toegevoegde seenby niet getest wordt. - */ - /* * If Costsharing active for this node */ diff --git a/mbfido/ptic.c b/mbfido/ptic.c index 364c3541..8b27f30e 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -52,6 +52,7 @@ #include "magic.h" #include "createf.h" #include "virscan.h" +#include "qualify.h" #define UNPACK_FACTOR 300 @@ -84,6 +85,7 @@ int ProcessTic(fa_list *sbl) struct utimbuf ut; int BBS_Imp = FALSE, DidBanner = FALSE; faddr *p_from; + qualify *qal = NULL, *tmpq; Now = time(NULL); @@ -299,13 +301,24 @@ int ProcessTic(fa_list *sbl) } /* - * Count the actual downlinks for this area + * Count the actual downlinks for this area and build the list of + * systems qualified to receive this file. */ First = TRUE; while (GetTicSystem(&Link, First)) { First = FALSE; - if ((Link.aka.zone) && (Link.sendto)) + if ((Link.aka.zone) && (Link.sendto) && (!Link.pause)) { DownLinks++; + p_from = fido2faddr(Link.aka); + if (TIC.TicIn.Hatch) { + fill_qualify(&qal, Link.aka, FALSE, in_list(p_from, &sbl, FALSE)); + } else { + fill_qualify(&qal, Link.aka, ((TIC.Aka.zone == Link.aka.zone) && + (TIC.Aka.net == Link.aka.net) && (TIC.Aka.node == Link.aka.node) && + (TIC.Aka.point == Link.aka.point)), in_list(p_from, &sbl, FALSE)); + } + tidy_faddr(p_from); + } } /* @@ -426,6 +439,7 @@ int ProcessTic(fa_list *sbl) if (mkdir(temp2, 0777)) { WriteError("$Can't create %s", temp2); free(Temp); + tidy_qualify(&qal); return 1; } } @@ -449,12 +463,14 @@ int ProcessTic(fa_list *sbl) if (!checkspace(temp2, TIC.RealName, UNPACK_FACTOR)) { Bad((char *)"Not enough free diskspace left"); free(Temp); + tidy_qualify(&qal); return 1; } if (chdir(temp2) != 0) { WriteError("$Can't change to %s", temp2); free(Temp); + tidy_qualify(&qal); return 1; } @@ -462,6 +478,7 @@ int ProcessTic(fa_list *sbl) WriteError("Can't get archiver for %s", unarc); chdir(TIC.Inbound); free(Temp); + tidy_qualify(&qal); return 1; } @@ -497,6 +514,7 @@ int ProcessTic(fa_list *sbl) if ((rc = file_cp(temp1, temp2))) { WriteError("Can't copy %s to %s: %s", temp1, temp2, strerror(rc)); free(Temp); + tidy_qualify(&qal); return 1; } @@ -504,6 +522,7 @@ int ProcessTic(fa_list *sbl) if (chdir(temp2) != 0) { WriteError("$Can't change to %s", temp2); free(Temp); + tidy_qualify(&qal); return 1; } } @@ -520,6 +539,7 @@ int ProcessTic(fa_list *sbl) chdir(TIC.Inbound); Bad((char *)"Possible virus found!"); free(Temp); + tidy_qualify(&qal); return 1; } @@ -688,6 +708,7 @@ int ProcessTic(fa_list *sbl) if (!BBS_Imp) { Bad((char *)"File Import Error"); free(Temp); + tidy_qualify(&qal); return 1; } } @@ -761,12 +782,24 @@ int ProcessTic(fa_list *sbl) (TIC.Aka.node == Link.aka.node) && (TIC.Aka.point == Link.aka.point))) { sprintf(sbe, "%u:%u/%u", Link.aka.zone, Link.aka.net, Link.aka.node); fill_list(&sbl, sbe, NULL); + Syslog('f', "Old style add SB %s", sbe); } } } uniq_list(&sbl); sort_list(&sbl); + /* + * Debugging, new style SB adding + */ + for (tmpq = qal; tmpq; tmpq = tmpq->next) { + if (tmpq->send) { + Syslog('f', "New style add SB %u:%u/%u", tmpq->aka.zone, tmpq->aka.net, tmpq->aka.node); + } else { + Syslog('f', "New style skip SB %u:%u/%u", tmpq->aka.zone, tmpq->aka.net, tmpq->aka.node); + } + } + /* * Now start forwarding files */ @@ -792,6 +825,7 @@ int ProcessTic(fa_list *sbl) unlink(Temp); free(Temp); + tidy_qualify(&qal); return 0; }