Article View: news.software.nntp
Article #90838[PATCH] OVER issue in slrn [was: Bug in SLRN trunk: not seen in 1.0.3.]
From: Kaz Kylheku
Date: Thu, 05 Oct 2023 04:06
Date: Thu, 05 Oct 2023 04:06
56 lines
2815 bytes
2815 bytes
On 2023-09-12, Kaz Kylheku <864-117-4973@kylheku.com> wrote:
> Hi all, I've run into the following little bug.
>
I have a fix for this now.
commit 5b43b2e927f51e30fe1ec14242cdd573ee143621
Author: Kaz Kylheku <kaz@kylheku.com>
Date: Wed Oct 4 20:46:47 2023 -0700
bug: OVER issue: not advancing past articles.
We need to handle the 423 code (ERR_NOARTIG) when OVER is used
instead of XOVER. Just pretending that it is 224 (OK_XOVER)
doesn't work because the code then tries to get headers,
and the connection will abruptly close unlike in the XOVER
case.
The manifestation of the problem is like this. Sometimes
a certain newsgroup shows a positive number of articles
unread. When an attempt is made to select the newsgroup,
slrn shows "No articles unread" --- but the count does not
go to zero. It does not advance the article count.
* src/art.c (get_headers): Do not bail if slrn_open_xover
returns ERR_NOARTIG (423). Furthermore, in this case, do not
try slrn_read_xover, because the socket will close, which
causes a problem. We just skip over the loop, to the state
updates at the end of the function.
diff --git a/src/art.c b/src/art.c
index 66bc1d5..9cbcfa7 100644
--- a/src/art.c
+++ b/src/art.c
@@ -5714,10 +5714,9 @@ static int get_headers (NNTP_Artnum_Type min, NNTP_Artnum_Type max, NNTP_Artnum_
/* slrn_set_suspension (1); */
err = slrn_open_xover (min, max);
- if (err != OK_XOVER)
+ if (err != OK_XOVER && err != ERR_NOARTIG)
{
- if ((err == ERR_NOCRNT) || /* no articles in the range */
- (err == ERR_NOARTIG)) /* this one is not RFC 2980 compliant */
+ if ((err == ERR_NOCRNT))
return 0;
return -1;
@@ -5726,7 +5725,7 @@ static int get_headers (NNTP_Artnum_Type min, NNTP_Artnum_Type max, NNTP_Artnum_
num_processed = 0;
expected_num = min;
num = Total_Num_Headers + Number_Killed;
- while (slrn_read_xover(&xov) > 0)
+ while (err != ERR_NOARTIG && slrn_read_xover(&xov) > 0)
{
NNTP_Artnum_Type this_num;
Technical Details
Message-ID:
<20231004210356.147@kylheku.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<20230911185353.581@kylheku.com>Show Full Headers
Complete Article Headers
Message-ID: <20231004210356.147@kylheku.com> Subject: [PATCH] OVER issue in slrn [was: Bug in SLRN trunk: not seen in 1.0.3.] Date: Thu, 05 Oct 2023 04:06:26 +0000 From: Kaz Kylheku <864-117-4973@kylheku.com> References: <20230911185353.581@kylheku.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: A noiseless patient Spider Lines: 56 Injection-Date: Thu, 5 Oct 2023 04:06:26 -0000 (UTC) User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:wW9SsWuqFCbyZ6zDlhvOx/uciAQ=