Thread View: news.software.nntp
1 messages
1 total messages
Started by Kevin Rodgers
Fri, 29 Oct 1993 16:48
Re: rrn stopped dead
Author: Kevin Rodgers
Date: Fri, 29 Oct 1993 16:48
Date: Fri, 29 Oct 1993 16:48
73 lines
3757 bytes
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!"
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