🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #49967

[slrn] Bug: set_header_score() and header flags

#49967
From: Thomas Schultz
Date: Mon, 19 Jul 1999 00:00
74 lines
2843 bytes
Hi,

I just discovered a behaviour in slrn that I consider a bug:

set_header_score(get_variable_value("min_high_score"));

After using this command, the current article has the
HEADER_HIGH_SCORE flag set. Good. But when I use

set_header_score(get_variable_value("min_high_score")-1);

it does not lose it. A similar problem occurs here:

set_header_score(get_variable_value("max_low_score")-1);

sets the HEADER_LOW_SCORE flag. Again, when using

set_header_score(get_variable_value("max_low_score"));

the article does not lose it. I believe that this should be changed.
Here is a patch which does exactly this (it really only affects a few
lines; the reason why it looks that long is that the indentation of a
couple of lines has changed):

diff -ur slrn-0.9.5.7.orig/src/art.c slrn-0.9.5.7/src/art.c
--- slrn-0.9.5.7.orig/src/art.c	Thu Jul 15 23:19:28 1999
+++ slrn-0.9.5.7/src/art.c	Mon Jul 19 03:01:40 1999
@@ -5438,22 +5438,27 @@
 	h->flags |= HEADER_HIGH_SCORE;
 	Number_High_Scored++;
      }
-   else if (score < Slrn_Low_Score_Max)
+   else
      {
-	if ((score <= Slrn_Kill_Score_Max) && apply_kill)
+	h->flags &= ~(HEADER_HIGH_SCORE);
+		
+	if (score < Slrn_Low_Score_Max)
 	  {
-	     int number = h->number;
-	     free_header (h);
-	     add_to_kill_list (number);
-	     return NULL;
+	     if ((score <= Slrn_Kill_Score_Max) && apply_kill)
+	       {
+		  int number = h->number;
+		  free_header (h);
+		  add_to_kill_list (number);
+		  return NULL;
+	       }
+	     
+	     h->flags |= (HEADER_READ | HEADER_LOW_SCORE);
+	     Number_Low_Scored++;
+	     /* The next line should be made configurable */
+	     kill_cross_references (h);
 	  }
-	
-	h->flags &= ~(HEADER_HIGH_SCORE);
-	h->flags |= (HEADER_READ | HEADER_LOW_SCORE);
-	Number_Low_Scored++;
-	/* The next line should be made configurable */
-	kill_cross_references (h);
-     }
+	else h->flags &= ~(HEADER_LOW_SCORE);
+     }   
 #if SLRN_HAS_SORT_BY_SCORE
    h->thread_score = h->score = score;
 #endif

-- 
Kind regards,
    Thomas Schultz

Technical Details
Message-ID: <slrn7p51ot.8pj.tststs@starflower.tststs.ddns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrn7p51ot.8pj.tststs@starflower.tststs.ddns.org>
Subject: [slrn] Bug: set_header_score() and header flags
Date: Mon, 19 Jul 1999 00:00:00 +0000
From: tststs@gmx.de (Thomas Schultz)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 502566401
X-Server-Date: 19 Jul 1999 02:05:32 GMT
X-Trace: news1.cityweb.de 932350101 62.52.148.74 (Mon, 19 Jul 1999 04:08:21 MET DST)
Organization: Pinguin online
User-Agent: slrn/0.9.5.7 (UNIX)
NNTP-Posting-Date: Mon, 19 Jul 1999 04:08:21 MET DST
Newsgroups: news.software.readers