From 3f1be5a881aa6441ff97312482bcd30c945cce8d Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 25 Jan 2003 14:20:12 +0000 Subject: [PATCH] Fixed mbtask to stop after a few days --- ChangeLog | 7 +++++++ lib/nodelist.c | 30 ++++++++++++++++++++++-------- lib/nodelist.conf | 16 +++++++++------- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab128ae2..98e54921 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,10 @@ v0.37.01 14-Jan-2003. if you need to downgrade. Spanish templates and macros added to the examples. + nodelist.a: + Added experimental support for IP nodes lookup using a default + domain method. This is not the final implementation yet! + common.a: Remove a bug which very seldom crashed mbfido with charset translation. Do we really need charset conversion? @@ -22,6 +26,9 @@ v0.37.01 14-Jan-2003. mbtask: Arcmail for non-CM nodes and Txx nodes is now sent during the node's opening hours or ZMH. + Fixed a bug where one of the nodelists was node closed with + each outbound scan and was causing mbtask to stop functioning + after a few days. mbfile: In the import function several bugfixes for reading files.bbs. diff --git a/lib/nodelist.c b/lib/nodelist.c index ca069580..d5cedbf0 100644 --- a/lib/nodelist.c +++ b/lib/nodelist.c @@ -456,7 +456,6 @@ int initnl(void) v++; if ((*k == '\0') || (*k == '#')) { -// Syslog('n', "\"%s\" \"%s\" - ignore", MBSE_SS(k), MBSE_SS(v)); continue; } @@ -660,7 +659,6 @@ node *getnlent(faddr *addr) if ((highest - lowest) <= 1) break; } - fclose(fp); if (!Found) { @@ -1013,11 +1011,11 @@ node *getnlent(faddr *addr) for (tmpd = &nl_domsuffix; *tmpd; tmpd=&((*tmpd)->next)) { if ((*tmpd)->zone == nodebuf.addr.zone) { if (*r++ == '\0') - sprintf(tbuf, "f%d.n%d.z%d.%s", nodebuf.addr.node, nodebuf.addr.net, - nodebuf.addr.zone, (*tmpd)->name); + sprintf(tbuf, "f%d.n%d.z%d.%s.%s", nodebuf.addr.node, nodebuf.addr.net, + nodebuf.addr.zone, nodebuf.addr.domain, (*tmpd)->name); else - sprintf(tbuf, "f%d.n%d.z%d.%s%s", nodebuf.addr.node, nodebuf.addr.net, - nodebuf.addr.zone, (*tmpd)->name, r); + sprintf(tbuf, "f%d.n%d.z%d.%s.%s%s", nodebuf.addr.node, nodebuf.addr.net, + nodebuf.addr.zone, nodebuf.addr.domain, (*tmpd)->name, r); Syslog('n', "Will try default domain \"%s\"", tbuf); nodebuf.url = xstrcat(nodebuf.url, tbuf); break; @@ -1038,10 +1036,25 @@ node *getnlent(faddr *addr) if (strlen(tbuf)) break; Syslog('n', "Field8 is not usable"); + memset(&tbuf, 0, sizeof(tbuf)); + } else if (strcasecmp((*tmpa)->name, "defdomain") == 0) { + Syslog('n', "Trying default domain"); + for (tmpd = &nl_domsuffix; *tmpd; tmpd=&((*tmpd)->next)) { + if ((*tmpd)->zone == nodebuf.addr.zone) { + sprintf(tbuf, "f%d.n%d.z%d.%s.%s", nodebuf.addr.node, nodebuf.addr.net, + nodebuf.addr.zone, nodebuf.addr.domain, (*tmpd)->name); + Syslog('n', "Will try default domain \"%s\"", tbuf); + nodebuf.url = xstrcat(nodebuf.url, tbuf); + break; + } + } + if (strlen(tbuf)) + break; + Syslog('n', "No matching default domain found for zone %d", nodebuf.addr.zone); + memset(&tbuf, 0, sizeof(tbuf)); } } } - fclose(fp); if (strlen(tbuf) == 0) { Syslog('n', "No FQDN found, cannot call"); @@ -1065,7 +1078,8 @@ node *getnlent(faddr *addr) nodebuf.url = xstrcpy((char *)"pots://"); nodebuf.url = xstrcat(nodebuf.url, nodebuf.phone); } - + fclose(fp); + nodebuf.addr.name = nodebuf.sysop; nodebuf.addr.domain = xstrcpy(fdx.domain); nodebuf.upnet = ndx.upnet; diff --git a/lib/nodelist.conf b/lib/nodelist.conf index 958cbbdc..c6d157d2 100644 --- a/lib/nodelist.conf +++ b/lib/nodelist.conf @@ -153,7 +153,7 @@ tcpip IBN 0x00000004 0x00000004 # IBN:* Proposed, use default domain # IBN:*:port Not yet proposed # eslf - Extended St. Louis Format fields (NOT YET AVAILABLE) -# defdomain - Asume default domain (NOT YET AVAILABLE) +# defdomain - Asume default domain (VERY EXPERIMENTAL) # # In all cases, the nodes setup overrides everything. # Order is important, defdomain must be the last if used. @@ -161,13 +161,15 @@ tcpip IBN 0x00000004 0x00000004 search field3 search field6 search field8 +search defdomain -# The default searchdomain, will be prefixed with f1.n2.z3. +# The default searchdomain, will be prefixed with f1.n2.z3.fidonet. +# Node 3:2/1 will look like: f1.n2.z3.fidonet.net # -# Zone Suffix -domsuffix 1 fidonet.net -domsuffix 2 fidonet.net -domsuffix 3 fidonet.net -domsuffix 92 bibnet.ym +# Zone Suffix (without leading dot!) +domsuffix 1 net +domsuffix 2 net +domsuffix 3 net +domsuffix 92 mbse.ym