[net.news.b] minor bugs in news 2.10.1

talbot@echbull.UUCP (talbot) (03/23/84)

I recently ported news 2.10.1 to a 68000-based machine.
It went all-right but I found several minor bugs or local peculiarities
listed below with possible cures :


1 : The "recordings" stuff doesn't work with postnews i.e. inews -h 
because recording() is called with an uninitialized newsgroup name.
My "solution" was to call recording again after header.nbuf has been filled.

2 : On our V7 , the r+ mode in fopen(3) is unknown; replaced by append.

-------------- inews.c ---------------
242a243
> 		/* does not work if -h because header.nbuf not filled */
308a310,316
> 			/* kludge talbot 15-mar-84 : retry recording */
> 			if (recording(header.nbuf)) {
> 				if (!tty)
> 					fwait(fsubr(newssave, stdin, NULL));
> 				xerror("aborted due to recording");
> 			}
> 			/* end of kludge */
412a421
> #ifndef DEBUG
418a428
> #endif DEBUG
501a512,514
> #ifdef V7
> 	actfp = fopen(ACTIVE, "r");
> #else
502a516,518
> #endif
> 	if (!actfp)
> 		xerror("cannot open ACTIVE file");
506a523
> 			fclose(actfp);
528a546
> 			fclose(actfp);
535a554,556
> #ifdef V7
> 	actfp = fopen(ACTIVE, "a");
> #else
536a558
> #endif

3 : If you start news with an empty active file, a NULL pointer is 
dereferenced in readnews because the rcline array is empty. This
NULL pointer cores on our machine

-------------- readnews.c ---------------
300c300
< 	for (i=0; ;i++) {
---
> 	for (i=0; rcline[i] ;i++) {

4 : When uux is forked by inews in ifuncs.c around line 209 ( system(bfr) ),
a lot of fd are already used and on our machine uux was then short of fds
to work properly. A quick and dirty solution was to close 3 4 5 on entering uux.

         Jacques Talbot		Bull-Sems Grenoble  FRANCE
	 ...mcvax!vmucnam!echbull!talbot
Subject: minor bugs in news 2.10.1
Newsgroups: net.news.b


I recently ported news 2.10.1 to a 68000-based machine.
It went all-right but I found several minor bugs or local peculiarities
listed below with possible cures :


1 : The "recordings" stuff doesn't work with postnews i.e. inews -h 
because recording() is called with an uninitialized newsgroup name.
My "solution" was to call recording again after header.nbuf has been filled.

2 : On our V7 , the r+ mode in fopen(3) is unknown; replaced by append.

-------------- inews.c ---------------
242a243
> 		/* does not work if -h because header.nbuf not filled */
308a310,316
> 			/* kludge talbot 15-mar-84 : retry recording */
> 			if (recording(header.nbuf)) {
> 				if (!tty)
> 					fwait(fsubr(newssave, stdin, NULL));
> 				xerror("aborted due to recording");
> 			}
> 			/* end of kludge */
412a421
> #ifndef DEBUG
418a428
> #endif DEBUG
501a512,514
> #ifdef V7
> 	actfp = fopen(ACTIVE, "r");
> #else
502a516,518
> #endif
> 	if (!actfp)
> 		xerror("cannot open ACTIVE file");
506a523
> 			fclose(actfp);
528a546
> 			fclose(actfp);
535a554,556
> #ifdef V7
> 	actfp = fopen(ACTIVE, "a");
> #else
536a558
> #endif

3 : If you start news with an empty active file, a NULL pointer is 
dereferenced in readnews because the rcline array is empty. This
NULL pointer cores on our machine

-------------- readnews.c ---------------
300c300
< 	for (i=0; ;i++) {
---
> 	for (i=0; rcline[i] ;i++) {

4 : When uux is forked by inews in ifuncs.c around line 209 ( system(bfr) ),
a lot of fd are already used and on our machine uux was then short of fds
to work properly. A quick and dirty solution was to close 3 4 5 on entering uux.

         Jacques Talbot		Bull-Sems Grenoble  FRANCE
	 ...mcvax!vmucnam!echbull!talbot