🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Superuser Wed, 13 Nov 1985 09:31
Minor bug in readnews
#490
Author: Superuser
Date: Wed, 13 Nov 1985 09:31
75 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads