🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
6 messages
6 total messages Started by Steve McCoole Wed, 05 Feb 1992 21:50
Problem with rn 4.4 and nntp 1.5.11
#1094
Author: Steve McCoole
Date: Wed, 05 Feb 1992 21:50
27 lines
1875 bytes
I'm seeing some strange behaviour between rn 4.4 PL0 and nntp 1.5.11 
running under Ultrix 3.1.  If anyone else has seen this or knows
how to fix it, I'd be greatful for a lead.  The problem manifests
when an "=" command in rn is used on a news group that has less
actual articles than rn thinks it does ( like some have expired, etc ).
The subject lines are listed just fine, all articles are visible, but...

If the spacebar or "n" key is hit, rn prints a "Skipping unavailable
article....." message and jumps over the first article that is really
there.  I have verified that the article really exists, you can even
do a "P" command and back up to it.

If you directly type in an article number instead of space or "n"
from the subject listing, rn prints the "Skipping" message and
marks all of the articles between the real beginning article and the
number you typed in as read.

I'm going to continue to look into this problem in my spare (ha!) time
but also thought that I would poll the net to see if its collective
wisdom could aid me.  Thanks!

Steve
---
Steve McCoole | smm@acd4.acd.com / uunet!acd4!smm
Applied Computing Devices, Inc.
Terre Haute, IN "The Silicon Cornfield"
Re: Problem with rn 4.4 and nntp 1.5.11
#1158
Author: Andrew Hastings
Date: Thu, 06 Feb 1992 20:55
12 lines
1440 bytes
In article <1992Feb5.215015.24805@acd4.acd.com> smm@IEDV4.acd.com (Steve McCoole) writes:
>If the spacebar or "n" key is hit, rn prints a "Skipping unavailable
>article....." message and jumps over the first article that is really
>there.  I have verified that the article really exists, you can even
>do a "P" command and back up to it.

I sent a patch that fixes this bug to rrn@lib.tmc.edu back in October.
I haven't checked yet to see if it was included in rn 4.4 patchlevel 3.
If not, I'll see if I can adapt my fix to patchlevel 3 and post a new
patch in a couple of weeks.

-Andy Hastings			abh@cs.cmu.edu			412/268-8734
Re: Problem with rn 4.4 and nntp 1.5.11
#1167
Author: Cliff Yamamoto
Date: Sat, 08 Feb 1992 22:38
18 lines
1704 bytes
In article <1992Feb06.205543.188242@cs.cmu.edu> Andrew Hastings <abh+@cs.cmu.edu> writes:
>In article <1992Feb5.215015.24805@acd4.acd.com> smm@IEDV4.acd.com (Steve McCoole) writes:
>>If the spacebar or "n" key is hit, rn prints a "Skipping unavailable
>>article....." message and jumps over the first article that is really
>>there.  I have verified that the article really exists, you can even
>>do a "P" command and back up to it.
>
>I sent a patch that fixes this bug to rrn@lib.tmc.edu back in October.
>I haven't checked yet to see if it was included in rn 4.4 patchlevel 3.
>If not, I'll see if I can adapt my fix to patchlevel 3 and post a new
>patch in a couple of weeks.
>
>-Andy Hastings			abh@cs.cmu.edu			412/268-8734

Andy, if you find that your fix hasn't been applied to patchlevel 3 yet
please post your new patch.  Thanks!

-Cliff
Bugfix patch for rn4.4.3
#1175
Author: Andrew Hastings
Date: Tue, 11 Feb 1992 20:03
740 lines
21134 bytes
This patch fixes a problem with rn erroneously skipping over articles.
An earlier version of this patch was sent to rrn@lib.tmc.edu in October.
I stripped out feature enhancements ("J" command and fetching subjects
in bunches) from this version of the patch.

-Andy Hastings			abh@cs.cmu.edu			412/268-8734


diff -rc rn4.4.3/NEW rn4.4.3abh/NEW
*** rn4.4.3/NEW	Thu Feb  6 16:02:11 1992
--- rn4.4.3abh/NEW	Tue Feb 11 13:52:35 1992
***************
*** 257,261 ****
  	rn deals with NFS timeouts better. If the active file (on an NFS
  	mounted partition) goes away, rn shuts down gracefully now.
  
- 	
  
--- 257,308 ----
  	rn deals with NFS timeouts better. If the active file (on an NFS
  	mounted partition) goes away, rn shuts down gracefully now.
  
  
+ HISTORY
+ 07-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+     1.  Fix bugs in subject search mode where rrn may miss unread articles.
+ 	For example, suppose NNTP LIST says the range of articles is 1-11,
+ 	but the following articles actually exist:
+ 	    4   foo
+ 	    5   foo
+ 	    9   bar
+ 	    10  foo
+ 	    11  baz
+ 	The NNTP server's "current article pointer" is set at 4 initially.
+ 	It does NOT change when an attempt is made to access a nonexistent
+ 	article.
+ 	Without this fix, rrn will issue the following sequence of NNTP
+ 	commands:
+ 	    ARTICLE 1	rrn asks for nonexistent article 1
+ 	    HEAD 1	"Skipping unavailable article"
+ 	    HEAD 2
+ 	    HEAD 3
+ 	    STAT 1	it still doesn't exist
+ 	    HEAD 3	ditto
+ 	    NEXT	oops! now we'll miss article 4:  1-4 marked as read
+ 	    HEAD 5	This one exists
+ 	    ARTICLE 5	User reads article 5: 5 marked as read
+ 	    XHDR subject 1  in the meantime, rrn caches subjects
+ 	    XHDR subject 2
+ 	    XHDR subject 3
+ 	    XHDR subject 4
+ 	    XHDR subject 5
+ 	    XHDR subject 6
+ 	    XHDR subject 7
+ 	    XHDR subject 8
+ 	    XHDR subject 9
+ 	    XHDR subject 10
+ 	    XHDR subject 11
+ 	    HEAD 10
+ 	    ARTICLE 10	User reads next article with same subject: 10 marked
+ 	    HEAD 6	"Skipping unavailable article"
+ 	    HEAD 7
+ 	    HEAD 8
+ 	    NEXT	oops! now we'll miss article 9: 6-9 marked as read
+ 	    HEAD 11
+ 	    ARTICLE 11
+     2.  Use NNTP STAT, NEXT, and LAST commands to quickly skip unavailable
+ 	articles when caching subject lines.  Useful when looking at
+ 	newsgroups with lots of non-contiguously numbered articles.
+     3.  Use NNTP STAT and LAST commands to quickly skip unavailable articles
+ 	when using the "p" command.
diff -rc rn4.4.3/artsrch.c rn4.4.3abh/artsrch.c
*** rn4.4.3/artsrch.c	Thu Feb  6 16:02:36 1992
--- rn4.4.3abh/artsrch.c	Tue Feb 11 13:55:02 1992
***************
*** 11,16 ****
--- 11,20 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Speed up searching by using STAT and NEXT or LAST in fetchsubj().
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 68,75 ****
      char *pattern;			/* unparsed pattern */
      register char cmdchr = *patbuf;	/* what kind of search? */
      register char *s;
-     bool backward = cmdchr == '?' || cmdchr == Ctl('p');
- 					/* direction of search */
      COMPEX *compex;			/* which compiled expression */
      char *cmdlst = Nullch;		/* list of commands to do */
      int normal_return = SRCH_NOTFOUND;	/* assume no commands */
--- 72,77 ----
***************
*** 77,83 ****
--- 79,92 ----
      char howmuch;			/* search just the subjects */
      bool doread;			/* search read articles? */
      bool foldcase = TRUE;		/* fold upper and lower case? */
+ #ifndef SERVER
+ #ifndef CACHESUBJ
+     bool backward;
+ #endif
+ #endif
  
+     backward = cmdchr == '?' || cmdchr == Ctl('p');
+ 					/* direction of search */
      int_count = 0;
      if (cmdchr == '/' || cmdchr == '?') {	/* normal search? */
  	if (get_cmd && buf == patbuf)
diff -rc rn4.4.3/cheat.c rn4.4.3abh/cheat.c
*** rn4.4.3/cheat.c	Thu Feb  6 16:03:12 1992
--- rn4.4.3abh/cheat.c	Tue Feb 11 13:57:24 1992
***************
*** 11,16 ****
--- 11,20 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Speed up lookahead by using STAT and NEXT or LAST in fetchsubj().
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 94,99 ****
--- 98,108 ----
  	    srchahead = 0;
  	}
  	if (srchahead) {
+ #if defined(SERVER) && defined(CACHESUBJ)
+ 	    bool obackward = backward;
+ 
+ 	    backward = FALSE;
+ #endif
  	    srchahead = art;
  	    for (;;) {
  		srchahead++;	/* go forward one article */
***************
*** 121,126 ****
--- 130,138 ----
  		if (input_pending())
  		    break;
  	    }
+ #if defined(SERVER) && defined(CACHESUBJ)
+ 	    backward = obackward;
+ #endif
  	    fflush(stdout);
  	}
      }
***************
*** 146,151 ****
--- 158,166 ----
  # ifdef CACHESUBJ
      ART_NUM oldart = openart;
      ART_POS oldartpos;
+ #  ifdef SERVER
+     bool obackward = backward;
+ #  endif
  
      if (!in_ng || !srchahead)
  	return;
***************
*** 153,158 ****
--- 168,176 ----
  	oldartpos = ftell(artfp);
      if (srchahead >= subj_to_get)
  	subj_to_get = srchahead+1;
+ #  ifdef SERVER
+     backward = FALSE;
+ #  endif
      while (!input_pending() && subj_to_get <= lastart)
  	fetchsubj(subj_to_get++,FALSE,FALSE);
      if (oldart) {
***************
*** 159,164 ****
--- 177,185 ----
  	artopen(oldart);
  	fseek(artfp,oldartpos,0);	/* do not screw the pager */
      }
+ #  ifdef SERVER
+     backward = obackward;
+ #  endif
  # endif
  #endif
  }
diff -rc rn4.4.3/head.c rn4.4.3abh/head.c
*** rn4.4.3/head.c	Thu Feb  6 16:02:33 1992
--- rn4.4.3abh/head.c	Tue Feb 11 14:42:30 1992
***************
*** 8,13 ****
--- 8,17 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Skip unavailable articles with NNTP STAT, NEXT, and LAST.
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 29,35 ****
--- 33,42 ----
  #include "bits.h"
  #ifdef SERVER
  #include "server.h"
+ #ifdef CACHESUBJ
+ #include "ng.h"
  #endif
+ #endif /* SERVER */
  #include "util.h"
  #include "INTERN.h"
  #include "head.h"
***************
*** 317,323 ****
  	    s = saferealloc(s, (MEM_SIZE)strlen(s)+1);
  #ifdef CACHESUBJ
  	    subj_list[OFFSET(artnum)] = s;
! #endif 
  	}
      }
  #ifdef CACHESUBJ
--- 324,454 ----
  	    s = saferealloc(s, (MEM_SIZE)strlen(s)+1);
  #ifdef CACHESUBJ
  	    subj_list[OFFSET(artnum)] = s;
! #ifdef SERVER
! 	    if (!*s) {
! 		/*
! 		 * The article we're looking for didn't exist.  Use the
! 		 * "NEXT" ("LAST") command to skip quickly to the next
! 		 * (previous) existing article.
! 		 */
! 		register ART_NUM i;
! 		ART_NUM badart = 0;
! 		ART_NUM prevart, nextart;
! 
! 		prevart = artnum-1 < absfirst ? absfirst : artnum-1;
! 		nextart = artnum+1 > lastart  ? lastart  : artnum+1;
! 		if (!backward && !subj_list[OFFSET(nextart)]) {
! 		    /*
! 		     * STAT first valid article before this one,
! 		     * and issue NEXT command.
! 		     */
! 		    for (; prevart>absfirst; prevart--)
! 			if (subj_list[OFFSET(prevart)] &&
! 			    *subj_list[OFFSET(prevart)])
! 			    break;
! 		    sprintf(ser_line, "STAT %ld", prevart);
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf(">%s\n", ser_line) FLUSH;
! #endif
! 		    put_server(ser_line);
! 		    if (nntp_get(ser_line, sizeof (ser_line)) < 0) {
! 			fprintf(stderr,
! 			    "\nrrn: Unexpected close of server socket.\n");
! 			finalize(1);
! 		    }
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf("<%s\n", ser_line) FLUSH;
! #endif
! 		    if (ser_line[0] == CHAR_OK) {
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf(">NEXT\n"); FLUSH;
! #endif
! 			put_server("NEXT");
! 			if (nntp_get(ser_line, sizeof (ser_line)) < 0) {
! 			    fprintf(stderr,
! 				"\nrrn: Unexpected close of server socket.\n");
! 			    finalize(1);
! 			}
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf("<%s\n", ser_line) FLUSH;
! #endif
! 			if (ser_line[0] == CHAR_OK)
! 			    nextart = atol(ser_line+4);
! 			else
! 			    nextart = lastart+1;
! 			for (i=OFFSET(prevart); i<OFFSET(nextart); i++)
! 			    if (!subj_list[i])
! 				subj_list[i] = nullstr;
! 		    } else
! 			badart = prevart;
! 		} else if (backward && !subj_list[OFFSET(prevart)]) {
! 		    /*
! 		     * STAT first valid article after this one,
! 		     * and issue LAST command.
! 		     */
! 		    for (; nextart<lastart; nextart++)
! 			if (subj_list[OFFSET(nextart)] &&
! 			    *subj_list[OFFSET(nextart)])
! 			    break;
! 		    sprintf(ser_line, "STAT %ld", nextart);
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf(">%s\n", ser_line) FLUSH;
! #endif
! 		    put_server(ser_line);
! 		    if (nntp_get(ser_line, sizeof (ser_line)) < 0) {
! 			fprintf(stderr,
! 			    "\nrrn: Unexpected close of server socket.\n");
! 			finalize(1);
! 		    }
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf("<%s\n", ser_line) FLUSH;
! #endif
! 		    if (ser_line[0] == CHAR_OK) {
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf(">LAST\n"); FLUSH;
! #endif
! 			put_server("LAST");
! 			if (nntp_get(ser_line, sizeof (ser_line)) < 0) {
! 			    fprintf(stderr,
! 				"\nrrn: Unexpected close of server socket.\n");
! 			    finalize(1);
! 			}
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf("<%s\n", ser_line) FLUSH;
! #endif
! 			if (ser_line[0] == CHAR_OK)
! 			    prevart = atol(ser_line+4);
! 			else
! 			    prevart = absfirst-1;
! 			for (i=OFFSET(nextart); i>OFFSET(prevart); i--)
! 			    if (!subj_list[i])
! 				subj_list[i] = nullstr;
! 		    } else
! 			badart = nextart;
! 		}
! 		if (badart) {
! 		    /*
! 		     * The article we tried to STAT doesn't exist.  If it is
! 		     * before the minimum article from the GROUP response,
! 		     * ignore the whole range.
! 		     */
! 		    if (badart < minart) {
! 			for (i=OFFSET(badart); i<OFFSET(minart); i++)
! 			    if (!subj_list[i])
! 				subj_list[i] = nullstr;
! 		    }
! 		}
! 	    }
! #endif
! #endif /* CACHESUBJ */
  	}
      }
  #ifdef CACHESUBJ
diff -rc rn4.4.3/head.h rn4.4.3abh/head.h
*** rn4.4.3/head.h	Thu Feb  6 16:03:05 1992
--- rn4.4.3abh/head.h	Tue Feb 11 14:09:33 1992
***************
*** 8,13 ****
--- 8,17 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Use STAT and NEXT or LAST in fetchsubj().
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 136,141 ****
--- 140,148 ----
  
  #ifdef CACHESUBJ
      EXT char **subj_list INIT(Null(char **));
+ #  ifdef SERVER
+ EXT bool backward INIT(FALSE);
+ #  endif
  #endif
  
  void	head_init ANSI((void));
diff -rc rn4.4.3/ng.c rn4.4.3abh/ng.c
*** rn4.4.3/ng.c	Thu Feb  6 16:01:10 1992
--- rn4.4.3abh/ng.c	Tue Feb 11 14:11:46 1992
***************
*** 8,13 ****
--- 8,18 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Fix bugs in subject search mode.
+  *	Use NNTP STAT and LAST in "p" command.
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 169,174 ****
--- 174,183 ----
  		finalize(1);
  	}
  	return (-1);
+     } else {
+ 	int x, tot;
+ 
+ 	(void) sscanf(ser_line,"%d%d%d%d",&x,&tot,&minart,&maxart);
      }
      {
  	long first, last;
***************
*** 403,438 ****
  #endif /* READDIR */
  #else
  		{
! 			char	ser_line[NNTP_STRLEN];
! 			ART_NUM	newart;
  
! 			if (isfirstart) {
! 				sprintf(ser_line, "STAT %d",absfirst);
! 				put_server(ser_line);
! 				if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 					fprintf(stderr, 
! 					"\nrrn: Unexpected close of server socket.\n");
! 					finalize(1);
! 				}
! 				newart=absfirst;
! 				isfirstart=FALSE;
! 			} 
! 			else {
! 				put_server("NEXT");
! 				if  (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 					fprintf(stderr,
! 					"\nrrn: unexpected close of server socket.\n");
! 					finalize(1);
! 				}
! 				if (ser_line[0] != CHAR_OK) {
! 					newart = lastart + 1;
! 				}
! 				else
! 					newart = atoi(ser_line+4);
  			}				
! 			for (i=art; i<newart; i++)
! 				oneless(i);
! 			art = newart - 1;
  		}
  #endif /* SERVER */
  		break;
--- 412,482 ----
  #endif /* READDIR */
  #else
  		{
! 		    char	ser_line[NNTP_STRLEN];
! 		    ART_NUM	newart;
  
! 		    /*
! 		     * Before doing a "NEXT", make sure the
! 		     * "current article pointer" is pointing to
! 		     * the nearest existing article before this
! 		     * one.  (If we're in subject search mode,
! 		     * the "current article pointer" might be
! 		     * at an article much later than art.)
! 		     */
! 		    if (art < minart)
! 			newart = minart;
! 		    else {
! 			newart = art-1 < absfirst ? absfirst : art-1;
! 			for (; newart>=absfirst; newart--) {
! #ifdef CACHESUBJ
! 			    if (subj_list &&
! 				subj_list[OFFSET(newart)] &&
! 				!*subj_list[OFFSET(newart)])
! 				/* We already know it doesn't exist. */
! 				continue;
! #endif
! 			    sprintf(ser_line, "STAT %ld", newart);
! #ifdef DEBUGGING
! 			    if (debug & DEB_NNTP)
! 				printf(">%s\n", ser_line) FLUSH;
! #endif
! 			    put_server(ser_line);
! 			    if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 				    fprintf(stderr, 
! 				"\nrrn: Unexpected close of server socket.\n");
! 				    finalize(1);
! 			    }
! #ifdef DEBUGGING
! 			    if (debug & DEB_NNTP)
! 				printf("<%s\n", ser_line) FLUSH;
! #endif
! 			    if (ser_line[0] == CHAR_OK)
! 				break;
! 			}
! 			if (newart < art) {
! #ifdef DEBUGGING
! 			    if (debug & DEB_NNTP)
! 				printf(">NEXT\n") FLUSH;
! #endif
! 			    put_server("NEXT");
! 			    if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 				fprintf(stderr,
! 				"\nrrn: unexpected close of server socket.\n");
! 				finalize(1);
! 			    }
! #ifdef DEBUGGING
! 			    if (debug & DEB_NNTP)
! 				printf("<%s\n", ser_line) FLUSH;
! #endif
! 			    if (ser_line[0] != CHAR_OK)
! 				newart = lastart + 1;
! 			    else
! 				newart = atol(ser_line+4);
  			}				
! 		    }
! 		    for (i=art; i<newart; i++)
! 			oneless(i);
! 		    art = newart - 1;
  		}
  #endif /* SERVER */
  		break;
***************
*** 474,480 ****
  		    break;
  		}
  	    }
! 	    if (art >= absfirst)	/* don't mark non-existant articles */
  		mark_as_read();		/* mark current article as read */
  	    do_hiding = TRUE;
  #ifdef ROTATION
--- 518,524 ----
  		    break;
  		}
  	    }
! 	    if (art >= absfirst)	/* don't mark non-existent articles */
  		mark_as_read();		/* mark current article as read */
  	    do_hiding = TRUE;
  #ifdef ROTATION
***************
*** 563,569 ****
  #ifdef CACHESUBJ
      if (subj_list) {
  	for (i=OFFSET(lastart); i>=0; --i)
! 	    if (subj_list[i])
  		free(subj_list[i]);
  #ifndef lint
  	free((char*)subj_list);
--- 607,613 ----
  #ifdef CACHESUBJ
      if (subj_list) {
  	for (i=OFFSET(lastart); i>=0; --i)
! 	    if (subj_list[i] && subj_list[i] != nullstr)
  		free(subj_list[i]);
  #ifndef lint
  	free((char*)subj_list);
***************
*** 600,611 ****
  
      switch (*buf) {
      case 'p':			/* find previous unread article */
  	do {
  	    if (art <= firstart)
  		break;
  	    art--;
  #ifdef SERVER
! 	} while (was_read(art) || nntpopen(art,GET_HEADER) == Nullfp);
  #else
  	} while (was_read(art) || artopen(art) == Nullfp);
  #endif
--- 644,703 ----
  
      switch (*buf) {
      case 'p':			/* find previous unread article */
+ #ifdef SERVER
+ 	i = art;
+ #endif
  	do {
  	    if (art <= firstart)
  		break;
  	    art--;
  #ifdef SERVER
! 	    if (!was_read(art))
! 		if (nntpopen(art, GET_HEADER) != Nullfp) {
! 		    break;
! 		} else while (i > art) {
! 		    sprintf(ser_line, "STAT %ld", i);
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf(">%s\n", ser_line) FLUSH;
! #endif
! 		    put_server(ser_line);
! 		    if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 			fprintf(stderr,
! 			    "\nrrn: unexpected close of server socket.\n");
! 			finalize(1);
! 		    }
! #ifdef DEBUGGING
! 		    if (debug & DEB_NNTP)
! 			printf("<%s\n", ser_line) FLUSH;
! #endif
! 		    if (ser_line[0] != CHAR_OK) {
! 			i = firstart;
! 		    } else {
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf(">LAST\n") FLUSH;
! #endif
! 			put_server("LAST");
! 			if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
! 			    fprintf(stderr,
! 				"\nrrn: unexpected close of server socket.\n");
! 			    finalize(1);
! 			}
! #ifdef DEBUGGING
! 			if (debug & DEB_NNTP)
! 			    printf("<%s\n", ser_line) FLUSH;
! #endif
! 			if (ser_line[0] != CHAR_OK)
! 			    i = art = firstart;
! 			else {
! 			    i = atol(ser_line+4);
! 			    if (i < art)
! 				art = i+1;
! 			}
! 		    }
! 		}
! 	} while (1);
  #else
  	} while (was_read(art) || artopen(art) == Nullfp);
  #endif
***************
*** 902,907 ****
--- 994,1002 ----
  
  	page_init();
  #ifdef CACHESUBJ
+ # ifdef SERVER
+ 	backward = FALSE;
+ # endif
  	if (!subj_list)
  	    fetchsubj(art,TRUE,FALSE);
  #endif
***************
*** 954,959 ****
--- 1049,1057 ----
  #if defined(CACHESUBJ) && defined(DEBUGGING)
      case 'D':
  	printf("\nFirst article: %ld\n",(long)firstart) FLUSH;
+ # ifdef SERVER
+ 	backward = FALSE;
+ # endif
  	if (!subj_list)
  	    fetchsubj(art,TRUE,FALSE);
  	if (subj_list != Null(char **)) {
diff -rc rn4.4.3/ng.h rn4.4.3abh/ng.h
*** rn4.4.3/ng.h	Thu Feb  6 15:59:33 1992
--- rn4.4.3abh/ng.h	Thu Feb  6 17:11:01 1992
***************
*** 5,10 ****
--- 5,14 ----
   * release 4.4
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Remember min & max article numbers from NNTP GROUP response.
+  *
   * 
   */
  /* This software is Copyright 1991 by Stan Barber. 
***************
*** 32,38 ****
  #endif
  EXT char *mailcall INIT(nullstr);
  #ifdef SERVER
! EXT bool isfirstart INIT(TRUE);
  #endif
  EXT bool forcelast INIT(FALSE);		/* ought we show "End of newsgroup"? */
  EXT bool forcegrow INIT(FALSE);		/* do we want to recalculate size */
--- 36,43 ----
  #endif
  EXT char *mailcall INIT(nullstr);
  #ifdef SERVER
! EXT ART_NUM minart INIT(0);		/* min article from GROUP response */
! EXT ART_NUM maxart INIT(0);		/* max article from GROUP response */
  #endif
  EXT bool forcelast INIT(FALSE);		/* ought we show "End of newsgroup"? */
  EXT bool forcegrow INIT(FALSE);		/* do we want to recalculate size */
diff -rc rn4.4.3/patchlevel rn4.4.3abh/patchlevel
*** rn4.4.3/patchlevel	Thu Feb  6 15:58:54 1992
--- rn4.4.3abh/patchlevel	Thu Feb  6 17:39:10 1992
***************
*** 1 ****
! Patch:  3 
--- 1 ----
! Patch:  3abh
diff -rc rn4.4.3/rn.c rn4.4.3abh/rn.c
*** rn4.4.3/rn.c	Thu Feb  6 16:02:10 1992
--- rn4.4.3abh/rn.c	Mon Feb 10 17:09:03 1992
***************
*** 25,31 ****
   */
  
  static char rnid[] = "@(#)$Id: rn.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $";
! static char patchlevel[] = "Patchlevel 3";
  
  /* $Log: rn.c,v $
   * Revision 4.4.3.1  1992/02/01  03:09:32  sob
--- 25,31 ----
   */
  
  static char rnid[] = "@(#)$Id: rn.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $";
! static char patchlevel[] = "Patchlevel 3abh";
  
  /* $Log: rn.c,v $
   * Revision 4.4.3.1  1992/02/01  03:09:32  sob
***************
*** 42,47 ****
--- 42,51 ----
   *
   *
   *
+  * HISTORY
+  * 04-Oct-91  Andrew Hastings (abh) at Carnegie Mellon University
+  *	Update patchlevel.
+  *
   * 
   */
  
Re: Bugfix patch for rn4.4.3
#1203
Author: Susan Cole
Date: Mon, 17 Feb 1992 04:55
22 lines
1531 bytes
In article <1992Feb11.200314.235352@cs.cmu.edu> abh+@cs.cmu.edu (Andrew Hastings) writes:
>This patch fixes a problem with rn erroneously skipping over articles.
>An earlier version of this patch was sent to rrn@lib.tmc.edu in October.
>I stripped out feature enhancements ("J" command and fetching subjects
>in bunches) from this version of the patch.

I applied this patch and had a little problem with the patch to artsrch.c.
I got a complaint about "backward" being undefined.

I added "bool" before the "backward" in the line below and then it
compiled fine.  compiled okay.


+     backward = cmdchr == '?' || cmdchr == Ctl('p');

changed to:

+     bool backward = cmdchr == '?' || cmdchr == Ctl('p');
-- 
cole@unix.sri.com
{amdahl,rutgers}!sri-unix!cole
Re: Bugfix patch for rn4.4.3
#1210
Author: Andrew Hastings
Date: Tue, 18 Feb 1992 18:51
19 lines
1255 bytes
In article <32862@unix.SRI.COM> cole@unix.SRI.COM (Susan Cole) writes:
>I applied this patch and had a little problem with the patch to artsrch.c.
>I got a complaint about "backward" being undefined.

Oops!  The #ifndefs in artsrch.c should be changed from:

#ifndef SERVER
#ifndef CACHESUBJ
    bool backward;
#endif
#endif

to:

#if !defined(SERVER) || !defined(CACHESUBJ)
    bool backward;
#endif

-Andrew Hastings		abh@cs.cmu.edu			412/268-8734
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