Thread View: news.software.nn
5 messages
5 total messages
Started by Michael T Pins
Thu, 08 Aug 1996 00:00
bug for non-NNTP users
Author: Michael T Pins
Date: Thu, 08 Aug 1996 00:00
Date: Thu, 08 Aug 1996 00:00
21 lines
1167 bytes
1167 bytes
A number of people have reported the following:
In db.c line 1208 reads:
while ( fgets(timline, sizeof timline, timfp)
It should read:
while ( fgets(timline, sizeof timline, timfp) )
This only affects those who don't use NNTP. It's fixed in b6, but I
figured I should let people know in the meantime.
--
**************************************************************************
* Michael T Pins * #include <std.disclaimer> *
* keeper of the nn sources * mtpins@isca.uiowa.edu *
**************************************************************************
Re: bug for non-NNTP users
Author: J. Porter Clark
Date: Thu, 08 Aug 1996 00:00
Date: Thu, 08 Aug 1996 00:00
62 lines
2502 bytes
2502 bytes
mtpins@icaen.uiowa.edu (Michael T Pins) writes: >A number of people have reported the following: >In db.c line 1208 reads: > while ( fgets(timline, sizeof timline, timfp) >It should read: >while ( fgets(timline, sizeof timline, timfp) ) >This only affects those who don't use NNTP. It's fixed in b6, but I >figured I should let people know in the meantime. Caught that one easily enough, but another non-NNTP error is in libnov.c. There's a bug in the code that causes .newsrc to be updated even though the corresponding articles aren't read. The bug is most easily reproduced with the following trivial test case: 1. Find a test newsgroup with no articles in it at all and with a zero-length or nonexistent .overview file. (Good luck! 8-) 2. Post an article to the test newsgroup. Use a short Subject line. 3. Use nn to read the newsgroup and update the .newsrc file. 4. Post a second article to the test newsgroup. Use a long Subject line. 5. Use nn to read the newsgroup. You won't see the second article, but .newsrc will be updated nonetheless. Here's a quick fix similar to the one I gave Toivo Pedaste for nn-tk. For what it's worth, I'm not really happy with the novseek() algorithm; it seems to backtrack over work it has already done. *** nn-6.5.0.b5/libnov.c.orig Sun Aug 4 21:58:41 1996 --- nn-6.5.0.b5/libnov.c Thu Aug 8 10:44:04 1996 *************** *** 156,162 **** /* Seek to middle line. */ middle = (upper + lower) / 2; (void)fseek(fp, middle, 0); ! while (getc(fp) != '\n' && ++middle <= upper) continue; if (middle >= upper) --- 156,162 ---- /* Seek to middle line. */ middle = (upper + lower) / 2; (void)fseek(fp, middle, 0); ! while (++middle <= upper && getc(fp) != '\n') continue; if (middle >= upper) -- J. Porter Clark jpc@drum.msfc.nasa.gov NASA/MSFC Flight Data Systems Branch
Re: bug for non-NNTP users
Author: Michael T Pins
Date: Thu, 08 Aug 1996 00:00
Date: Thu, 08 Aug 1996 00:00
25 lines
1619 bytes
1619 bytes
jpc@hammer.msfc.nasa.gov (J. Porter Clark) writes: >Caught that one easily enough, but another non-NNTP error is in >libnov.c. There's a bug in the code that causes .newsrc to be updated >even though the corresponding articles aren't read. The bug is most >easily reproduced with the following trivial test case: Thanks for the info (and the patch). I don't have anywhere to test nn without using NNTP at the moment, so these help. :-) >Here's a quick fix similar to the one I gave Toivo Pedaste for nn-tk. >For what it's worth, I'm not really happy with the novseek() algorithm; >it seems to backtrack over work it has already done. Hmm, I'll take a look at it. -- ************************************************************************** * Michael T Pins * #include <std.disclaimer> * * keeper of the nn sources * mtpins@isca.uiowa.edu * **************************************************************************
Re: bug for non-NNTP users
Author: John Henders
Date: Fri, 16 Aug 1996 00:00
Date: Fri, 16 Aug 1996 00:00
25 lines
1642 bytes
1642 bytes
In <4udad0$dc6@hammer.msfc.nasa.gov> jpc@hammer.msfc.nasa.gov (J. Porter Clark) writes:
>Caught that one easily enough, but another non-NNTP error is in
>libnov.c. There's a bug in the code that causes .newsrc to be updated
>even though the corresponding articles aren't read. The bug is most
>easily reproduced with the following trivial test case:
Actually, the same bug exists in the NOV version of nntk, at least when
run in text (no TK) mode. I found it by selecting a newsgroup with less
than a full page of articles. (hard to find nowadays, but possible) I
found there was a difference in total articles between entering the
newsgroup in the normal way, and the total if I left the group with N
and returned immediately with P. I didn't notice the connection between
Subject line lengths though. Haven't seen this with the version I'm
running now.
--
Artificial Intelligence stands no chance against Natural Stupidity.
GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*
Re: bug for non-NNTP users
Author: J. Porter Clark
Date: Fri, 16 Aug 1996 00:00
Date: Fri, 16 Aug 1996 00:00
28 lines
1854 bytes
1854 bytes
jhenders@bogon.com (John Henders) writes: >In <4udad0$dc6@hammer.msfc.nasa.gov> jpc@hammer.msfc.nasa.gov (J. Porter Clark) writes: >>Caught that one easily enough, but another non-NNTP error is in >>libnov.c. There's a bug in the code that causes .newsrc to be updated >>even though the corresponding articles aren't read. The bug is most >>easily reproduced with the following trivial test case: >Actually, the same bug exists in the NOV version of nntk, at least when >run in text (no TK) mode. I found it by selecting a newsgroup with less >than a full page of articles. (hard to find nowadays, but possible) I >found there was a difference in total articles between entering the >newsgroup in the normal way, and the total if I left the group with N >and returned immediately with P. I didn't notice the connection between >Subject line lengths though. Haven't seen this with the version I'm >running now. In fact, the first time I ran into this bug was in nn-tk several months ago. I sent a patch to Toivo, but his autoresponder said he was gone until August, and I only recently heard from him again. -- J. Porter Clark jpc@drum.msfc.nasa.gov NASA/MSFC Flight Data Systems Branch
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