[3302] in SIPB bug reports

home help back first fref pref prev next nref lref last post

nntpfetch -u sometimes saves one read article

daemon@ATHENA.MIT.EDU (mhpower@stan.mit.edu)
Sun Nov 15 20:57:39 1992

Date: Sun, 15 Nov 1992 20:54:27 -0500
From: mhpower@stan.mit.edu
To: bug-sipb@Athena.MIT.EDU

The -u "Search only articles which are unread." option to nntpfetch
sometimes fails in that a single read article is saved, in addition to
zero or more unread articles.

The circumstances where I've noticed this always include all of: (1)
the -v "Match the inverse of the specified pattern." option must also
be specified, (2) the newsrc file must indicate that there are
unavailable unread articles between the first and last articles held
by the server, (3) the single read article that is saved is the first
article held by the server, (4) no article number is printed for this
read article, i.e., the message is

   Saving group-name:  in file foo.N

rather than

   Saving group-name: M in file foo.N

For example, with "211 124 494 666 comp.mail.misc", and

   494 has Subject: Mail Archive Server (MAS) software list
   665 has Subject: Looking for secretmail mailer.
   666 has Subject: Re: Any Public-Domain cc:Mail Gateways Available By FTP?

test-newsrc is "comp.mail.misc: 1-510, 512-664", and 511 is unavailable.

   % nntpfetch -u -v -F ./test-newsrc -S senator-bedfellow.mit.edu Mail comp.mail.misc
   Saving comp.mail.misc:  in file: xxyy.1
   Saving comp.mail.misc: 665 in file: xxyy.2

and xxyy.1 then contains article 494. The correct behavior is to save
only 665.

The patch below should fix this problem, although there may be changes
to nntp.pl that would be preferable to this.

Matt


*** nntpfetch.old	Sun Nov 15 20:29:03 1992
--- nntpfetch	Sun Nov 15 20:38:46 1992
***************
*** 170,178 ****
  	}
  	foreach (@arts)
  	{
! 	    split(?: ?);
! 	    $nums{$_[1]} = "$ng: $_[0]"; # news group and article number
! 	    $arts{$_[1]} = &nntp'field($server, "date", $_[1]);
  	}
      }
  }
--- 170,181 ----
  	}
  	foreach (@arts)
  	{
!           if ($_)
!           {        
!               split(?: ?);
!               $nums{$_[1]} = "$ng: $_[0]"; # news group and article number
!               $arts{$_[1]} = &nntp'field($server, "date", $_[1]);
!           }
  	}
      }
  }

home help back first fref pref prev next nref lref last post