From 80ab62471f8aa1921ff28bb3781c8b2233fa8d9b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 16 Jul 2004 20:21:23 +0000 Subject: [PATCH] Added un_attach code to Add_BBS --- ChangeLog | 5 +++++ mbfido/addbbs.c | 13 ++++++++++--- mbfido/addbbs.h | 4 ++-- mbfido/ptic.c | 5 +++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0890c9a..12846df7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,11 @@ v0.61.2 11-Jul-2004 continuous calling. Changed to use direct instead of immediate mail. + mbfido: + Added experimental code to un_attach files during tic import + that are deleted from the system by replace, or keep # magic + actions. + mbout: Changed to use direct instead of immediate mail. diff --git a/mbfido/addbbs.c b/mbfido/addbbs.c index e36b6a14..df644ba9 100644 --- a/mbfido/addbbs.c +++ b/mbfido/addbbs.c @@ -49,7 +49,7 @@ extern int tic_imp; * files database will be packed if necessary. All modifications are * done on temp files first. */ -int Add_BBS() +int Add_BBS(qualify **qal) { struct FILE_record frec; int rc, i, Found = FALSE, Keep = 0, DidDelete = FALSE; @@ -57,6 +57,7 @@ int Add_BBS() fd_list *fdl = NULL; struct _fdbarea *fdb_area = NULL; qualify *tmpq; + faddr *taka; /* * First check for an existing record with the same filename, @@ -281,13 +282,19 @@ int Add_BBS() if (unlink(temp2) != 0) WriteError("$Can't unlink file %s", temp2); sprintf(temp2, "%s/%s", area.Path, fdb.Name); + /* * With the path to the 8.3 name, we can check if this file * is attached for any possible downlink. * We must get the qualify list passed so we have a quick systems list. */ - - + for (tmpq = *qal; tmpq; tmpq = tmpq->next) { + if (tmpq->send) { + taka = fido2faddr(tmpq->aka); + un_attach(*(taka), temp2); + tidy_faddr(taka); + } + } if (unlink(temp2) != 0) WriteError("$Can't unlink file %s", temp2); diff --git a/mbfido/addbbs.h b/mbfido/addbbs.h index aefb025c..64a9f815 100644 --- a/mbfido/addbbs.h +++ b/mbfido/addbbs.h @@ -1,9 +1,9 @@ #ifndef _ADDBBS_H #define _ADDBBS_H +/* $Id$ */ -int Add_BBS(void); +int Add_BBS(qualify **); #endif - diff --git a/mbfido/ptic.c b/mbfido/ptic.c index a42071a2..00d79c6d 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -37,7 +37,6 @@ #include "toberep.h" #include "tic.h" #include "utic.h" -#include "addbbs.h" #include "magic.h" #include "forward.h" #include "rollover.h" @@ -46,6 +45,8 @@ #include "createf.h" #include "virscan.h" #include "qualify.h" +#include "addbbs.h" + #define UNPACK_FACTOR 300 @@ -649,7 +650,7 @@ int ProcessTic(fa_list *sbl) if (tic.FileArea) { Syslog('+', "Import: %s (%s) Area: %s", TIC.NewFile, TIC.NewFullName, TIC.TicIn.Area); - BBS_Imp = Add_BBS(); + BBS_Imp = Add_BBS(&qal); if (!BBS_Imp) { Bad((char *)"File Import Error");