🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #2219

Re: rrn stopped dead

#2219
From: Kevin Rodgers
Date: Fri, 29 Oct 1993 16:48
73 lines
3757 bytes
In article <1993Oct25.013114.8680@news.vanderbilt.edu> cctimar@athena.cas.vanderbilt.edu (Cary Timar) writes:
>When rrn starts up, it does a LIST, which lists all the server's
>newsgroups, and terminates with a line containing only a dot.
>
>Unfortunately, rrn only checks whether the first character on the line
>is a dot, assuming that nobody would be so stupid as to create a
>newsgroup whose name begins with a dot.  It therefore assumes that the
>line beginning '.cabal' indicates the end of the list.
>
>Before the next command, rrn does not flush its input stream, so the
>first response it finds to its GROUP command is the line that really
>terminates the list, which confuses it.  This is why it terminates.
>
>The quick fix is to edit ng_init to check the second character on the
                          ^^^^^^^
                          ngdata_init

>line when the first is a dot.
>
>A more robust fix would do this, and also flush server input before
>sending each command to the server.  (Admittedly, there are arguments
>against doing this.)

Here's a patch to implement the quick fix to both ngdata.c:ngdata_init
and getactive.c:main, the other function that sends the LIST command to
the server:

SCCS/s.ngdata.c: 1.1 vs. 1.2
*** /tmp/geta16362	Fri Oct 29 10:35:53 1993
--- /tmp/getb16362	Fri Oct 29 10:35:54 1993
***************
*** 83,89 ****
  	    printf("Can't get active file from server:\ntransfer failed after %d entries\n", activeitems);
  	    finalize(1);
  	}
! 	if (ser_line[0] == '.')		/* while there's another line */
  		break;			/* get it and write it to */
  	activeitems++;
  	fputs(ser_line, actfp);
--- 83,89 ----
  	    printf("Can't get active file from server:\ntransfer failed after %d entries\n", activeitems);
  	    finalize(1);
  	}
! 	if (ser_line[0] == '.' && ser_line[1] == '\0')		/* while there's another line */
  		break;			/* get it and write it to */
  	activeitems++;
  	fputs(ser_line, actfp);

SCCS/s.getactive.c: 1.1 vs. 1.2
*** /tmp/geta16377	Fri Oct 29 10:36:13 1993
--- /tmp/getb16377	Fri Oct 29 10:36:14 1993
***************
*** 94,100 ****
  	}
  
  	while (get_server(ser_line, sizeof(ser_line)) >= 0) {  /* while */
! 		if (ser_line[0] == '.')		/* there's another line */
  			break;			/* get it and write it to */
  		if (actfp != NULL) {		/* the temporary active file */
  			fputs(ser_line, actfp);
--- 94,100 ----
  	}
  
  	while (get_server(ser_line, sizeof(ser_line)) >= 0) {  /* while */
! 		if (ser_line[0] == '.' && ser_line[1] == '\0')		/* there's another line */
  			break;			/* get it and write it to */
  		if (actfp != NULL) {		/* the temporary active file */
  			fputs(ser_line, actfp);
-- 
Kevin Rodgers				kevin@traffic.den.mmc.com
Martin Marietta MS DC5695		(303) 971-2396
P.O. Box 179				"Shoulder to shoulder, we will
Denver CO 80201 USA			 Fight!  Fight!  Fight, Fight, Fight!"
Technical Details
Message-ID: <1993Oct29.164818.27214@den.mmc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!kevin
References: <CFB1sH.7t5@bofa.com> <1993Oct25.013114.8680@news.vanderbilt.edu>

Show Full Headers
Complete Article Headers
Message-ID: <1993Oct29.164818.27214@den.mmc.com>
Subject: Re: rrn stopped dead
Date: Fri, 29 Oct 1993 16:48:18 GMT
From: kevin@traffic.den.mmc.com (Kevin Rodgers)
References: <CFB1sH.7t5@bofa.com> <1993Oct25.013114.8680@news.vanderbilt.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!kevin
Newsgroups: news.software.readers,news.software.nntp
Sender: news@den.mmc.com (News)
Nntp-Posting-Host: traffic.den.mmc.com
Organization: Martin Marietta Internal Information Systems,
Lines: 73