Fixed Zone bug in nodelist compiler

This commit is contained in:
Michiel Broek 2007-03-18 13:30:48 +00:00
parent b435f3a603
commit 97a8c60ccd
2 changed files with 20 additions and 2 deletions

View File

@ -18,6 +18,13 @@ v0.91.7 07-Mar-2007
Content-Transfer-Encoding are temporary stored in the fido
message as kludges.
mbindex:
When the first Zone entry is missing in the nodelist, mbindex
aborts with a fatal error and doesn't replace the nodelist
index.
Keep the latest 4 instead of 2 nodelists in the nodelist
directory to allow a few weeks for recovery.
mbnntp:
Suppress logging of passwords.

View File

@ -630,6 +630,17 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n
udx.node = ndx.node;
udx.point = ndx.point;
if (ndx.zone == 0) {
WriteError("%s(%u): no Zone entry found", nlname,lineno);
fclose(nl);
if (!do_quiet) {
printf(" %d entries\n", entries);
fflush(stdout);
}
return 1;
}
/*
* Now search for the baudrate field, just to check if it's there.
*/
@ -827,12 +838,12 @@ int makelist(char *base, unsigned short zo, unsigned short ne, unsigned short no
}
/*
* Sort found nodelists by age and kill all but the newest 2.
* Sort found nodelists by age and kill all but the newest 4.
*/
sort_fdlist(&fdl);
while (files) {
p = pull_fdlist(&fdl);
if (files > 2) {
if (files > 4) {
Syslog('+', "Remove old \"%s\"", p);
unlink(fullpath(p));
}