From 74e6c0db1b70176a1824b9b6c77e82c534c9312f Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 10 Jul 2004 14:16:21 +0000 Subject: [PATCH] Code cleanup for nodelist processing --- ChangeLog | 2 ++ mbsetup/m_fido.c | 35 ++++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0d7440a..00297c49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,8 @@ v0.61.1 20-Jun-2004. displayed stays around the last area. If a message area is deleted and a rulefile is present, this rulefile is deleted too. + When a new golded.inc file is written, only fidonet records + that are active are written. v0.61.0 06-Jun-2004 - 20-Jun-2004 diff --git a/mbsetup/m_fido.c b/mbsetup/m_fido.c index 8cbb8ee6..e9e3d11e 100644 --- a/mbsetup/m_fido.c +++ b/mbsetup/m_fido.c @@ -470,18 +470,21 @@ void gold_akamatch(FILE *fp) fread(&fidonethdr, sizeof(fidonethdr), 1, fido); while ((fread(&fidonet, fidonethdr.recsize, 1, fido)) == 1) { - for (i = 0; i < 6; i++) - if (fidonet.zone[i]) { - want->zone = fidonet.zone[0]; - want->net = 0; - want->node = 0; - want->point = 0; - want->name = NULL; - want->domain = NULL; - ta = bestaka_s(want); - fprintf(fp, "AKAMATCH %d:* %s\n", fidonet.zone[i], ascfnode(ta, 0xf)); - tidy_faddr(ta); + if (fidonet.available) { + for (i = 0; i < 6; i++) { + if (fidonet.zone[i]) { + want->zone = fidonet.zone[0]; + want->net = 0; + want->node = 0; + want->point = 0; + want->name = NULL; + want->domain = NULL; + ta = bestaka_s(want); + fprintf(fp, "AKAMATCH %d:* %s\n", fidonet.zone[i], ascfnode(ta, 0xf)); + tidy_faddr(ta); + } } + } } free(want); @@ -494,10 +497,12 @@ void gold_akamatch(FILE *fp) fprintf(fp, "NODEPATH %s/\n", CFG.nodelists); fseek(fido, fidonethdr.hdrsize, SEEK_SET); while ((fread(&fidonet, fidonethdr.recsize, 1, fido)) == 1) { - fprintf(fp, "NODELIST %s.*\n", fidonet.nodelist); - for (i = 0; i < 6; i++) - if (strlen(fidonet.seclist[i].nodelist) || fidonet.seclist[i].zone) - fprintf(fp, "NODELIST %s.*\n", fidonet.seclist[i].nodelist); + if (fidonet.available) { + fprintf(fp, "NODELIST %s.*\n", fidonet.nodelist); + for (i = 0; i < 6; i++) + if (strlen(fidonet.seclist[i].nodelist) || fidonet.seclist[i].zone) + fprintf(fp, "NODELIST %s.*\n", fidonet.seclist[i].nodelist); + } } // fprintf(fp, "USERLIST golded.lst\n"); fprintf(fp, "LOOKUPNET YES\n");