From 244d8124b71eafa90e475274e28ba837aa9a1345 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 30 Sep 2002 18:49:21 +0000 Subject: [PATCH] Fix for file attaches to local points --- ChangeLog | 2 ++ mbfido/scan.c | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679aa59b..be76c00f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,8 @@ v0.35.04 29-Sep-2002 Auto created area now get the link security from the group. With message areas auto update it should now only delete missing echomail areas. + File attaches to our own points were placed in the node's + outbound directory instead of the point outbound. mbsetup: Added setup for the nodes record for security flags. diff --git a/mbfido/scan.c b/mbfido/scan.c index eb47fde7..e7e63065 100644 --- a/mbfido/scan.c +++ b/mbfido/scan.c @@ -782,7 +782,7 @@ void ExportNews(unsigned long MsgNum, fa_list **sbl) void ExportNet(unsigned long MsgNum, int UUCPgate) { char *p, *q, ext[4], fromname[37], flavor, MailFrom[128], MailTo[128]; - int i, rc, flags = 0, first, is_fmpt = FALSE, is_topt = FALSE, is_intl = FALSE; + int i, rc, flags = 0, first, is_fmpt = FALSE, is_topt = FALSE, is_intl = FALSE, mypoint = FALSE; FILE *qp, *fp, *fl; fidoaddr Dest, Route, *dest; time_t now; @@ -935,15 +935,34 @@ void ExportNet(unsigned long MsgNum, int UUCPgate) sprintf(ext, (char *)"ccc"); else sprintf(ext, (char *)"nnn"); - point = Dest.point; - Dest.point = 0; - if (point) - Syslog('+', "Routing via Boss %s", aka2str(Dest)); - if ((qp = OpenPkt(msgs.Aka, Dest, (char *)ext)) == NULL) { - net_bad++; - return; + + /* + * If the destination is a point, check if it is our point + */ + for (i = 0; i < 40; i++) { + if (CFG.akavalid[i] && + (CFG.aka[i].zone == Dest.zone) && (CFG.aka[i].net == Dest.net) && (CFG.aka[i].node == Dest.node)) { + if (Dest.point && !CFG.aka[i].point) { + mypoint = TRUE; + } + } + } + if (mypoint) { + if ((qp = OpenPkt(msgs.Aka, Dest, (char *)ext)) == NULL) { + net_bad++; + return; + } + } else { + point = Dest.point; + Dest.point = 0; + if (point) + Syslog('+', "Routing via Boss %s", aka2str(Dest)); + if ((qp = OpenPkt(msgs.Aka, Dest, (char *)ext)) == NULL) { + net_bad++; + return; + } + Dest.point = point; } - Dest.point = point; } else { Syslog('m', "Route via %s", aka2str(Route));