Article View: net.bugs
Article #490Minor bug in readnews
From: Superuser
Date: Wed, 13 Nov 1985 09:31
Date: Wed, 13 Nov 1985 09:31
75 lines
2517 bytes
2517 bytes
Description:
If there are a number of missing directories for newsgroups
mentioned in the active file then "readnews" prints the message
Can't open <directory>
at seemingly random times when listing headers or skipping
newsgroups. This is despite the fact that there are no articles
currently in the indicated newsgroup. (i.e. the lower bound
equals the upper bound.)
(News version: B 2.10.3 alpha 4/15/85, although the problem
is also in B 2.10.2 and, I suspect, even earlier versions)
Repeat-by:
After deleting all the empty directories in /usr/spool/news
run
readnews -x -l > /dev/null
and watch the errors reported.
Diagnosis:
This is caused by not reseting the variable "noaccess" on
entry to a new newsgroup (i.e. directory). So on the
third missing directory in a row it prints the message.
(It's incremented twice for each missing directory!)
Fix-by:
Adding the following patch to the function "readr".
(Actually a lot of the code around here could be rewritten
to check the newsgroup bound more efficiently.)
*** readr.c.old Tue Jun 4 05:53:54 1985
--- readr.c Wed Nov 13 19:37:13 1985
***************
*** 982,993
if (!xflag)
fprintf(stderr,"[Saving .newsrc]\n");
writeoutrc();
timelastsaved = now;
}
}
}
nextart2:
#ifdef DEBUG
fprintf(stderr, "article: %s/%ld\n", groupdir, bit);
#endif
--- 982,994 -----
if (!xflag)
fprintf(stderr,"[Saving .newsrc]\n");
writeoutrc();
timelastsaved = now;
}
}
+ noaccess = 0;
}
nextart2:
#ifdef DEBUG
fprintf(stderr, "article: %s/%ld\n", groupdir, bit);
#endif
-----
Frank Crawford
ACSnet: root@aaec.OZ
UUCP: {seismo,mcvax,ukc,prlb2,ubc-vision}!munnari!aaec.OZ!root
Australian Atomic Energy Commission Phone: +61 2 543 3094
Private Mailbag,
SUTHERLAND,
N.S.W. 2232
Australia.
Technical Details
Message-ID:
<539@aaec.OZ>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!aaec!rootShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site aaec.OZ Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!aaec!root From: root@aaec.OZ (Superuser) Newsgroups: net.bugs,net.news.b Subject: Minor bug in readnews Message-ID: <539@aaec.OZ> Date: Wed, 13-Nov-85 04:31:10 EST Article-I.D.: aaec.539 Posted: Wed Nov 13 04:31:10 1985 Date-Received: Thu, 14-Nov-85 08:24:09 EST Organization: Australian Atomic Energy Commission Lines: 75 Keywords: readnews readr.c news