🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Bob Sloane Tue, 15 Feb 2000 00:00
Cleanfeed and INN 2.3 problems.
#44102
Author: Bob Sloane
Date: Tue, 15 Feb 2000 00:00
15 lines
1030 bytes
Hi All,

I am having a problem getting cleanfeed working with inn 2.3
(inn-2000-02-11_03-01).  The filter apparently starts and then dies
with the error message:

    Modification of a read-only value attempted at
        /usr/local/news/bin/filter/filter_innd.pl line 572.

Is there a newer version of cleanfeed than cleanfeed-0.95.7b?
-- 
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@ukans.edu http://www.ukans.edu/home/sloane Phone:(785)864-0444

Re: Cleanfeed and INN 2.3 problems.
#44103
Author: Russ Allbery
Date: Tue, 15 Feb 2000 00:00
21 lines
1476 bytes
Bob Sloane <sloane@ukans.edu> writes:

> I am having a problem getting cleanfeed working with inn 2.3
> (inn-2000-02-11_03-01).  The filter apparently starts and then dies with
> the error message:

>     Modification of a read-only value attempted at
>         /usr/local/news/bin/filter/filter_innd.pl line 572.

> Is there a newer version of cleanfeed than cleanfeed-0.95.7b?

I don't think a newer one has been released.  This particular error
message is caused by the means by which cleanfeed counts the number of
lines in the body of the message; if you change that line (I forget
exactly where it is; look for lines) to use $hdr{__LINES__} instead, it
will both be faster and will make this error go away.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Cleanfeed and INN 2.3 problems.
#44105
Author: Bob Sloane
Date: Tue, 15 Feb 2000 00:00
26 lines
1736 bytes
In article <ylu2ja5qer.fsf@windlord.stanford.edu>,
 Russ Allbery <rra@stanford.edu> writes:
> Bob Sloane <sloane@ukans.edu> writes:
> 
>> I am having a problem getting cleanfeed working with inn 2.3
>> (inn-2000-02-11_03-01).  The filter apparently starts and then dies with
>> the error message:
> 
>>     Modification of a read-only value attempted at
>>         /usr/local/news/bin/filter/filter_innd.pl line 572.
> 
>> Is there a newer version of cleanfeed than cleanfeed-0.95.7b?
> 
> I don't think a newer one has been released.  This particular error
> message is caused by the means by which cleanfeed counts the number of
> lines in the body of the message; if you change that line (I forget
> exactly where it is; look for lines) to use $hdr{__LINES__} instead, it
> will both be faster and will make this error go away.

Very good! The line in question is in fact line 572, and changing it
seems to have fixed the problem. Thanks.
-- 
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@ukans.edu http://www.ukans.edu/home/sloane Phone:(785)864-0444

Re: Cleanfeed and INN 2.3 problems.
#44118
Author: those who know me have no need o...
Date: Wed, 16 Feb 2000 00:00
60 lines
2858 bytes
sloane@ukans.edu (Bob Sloane) wrote:
>Very good! The line in question is in fact line 572, and changing it
>seems to have fixed the problem. Thanks.

of course that would depend on what other patches present ...
(minimal -- suggestions welcome)

--- cleanfeed.orig      Thu Sep  3 00:55:05 1998
+++ cleanfeed   Wed Feb 16 15:19:17 2000
@@ -523,6 +523,10 @@
         $timer{'articles'}++;
     }

+    if ($hdr{'Distribution'} =~ /(^|,)\s*,\s*(,|$)/) {
+       return reject ("Bogus distribution header with null element", "Bad distribution header");
+    }
+
     if (! $hdr{'Control'}) {

        &trimhashes if ($cycles++ > $config{'trimcycles'});
@@ -568,8 +572,8 @@
        # If all newsgroups are excluded from filtering, bail now
        return "" if ($gr{'skip'});

-       # count the lines in the article
-       $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;
+       # number of lines in the article
+       $lines = $hdr{'__LINES__'};

        # call a local filter if it exists
        if (defined &local_filter_before_emp) {
@@ -1220,6 +1224,7 @@
     if ($config{'refuse_messageids'}) {
         if ($mid =~ /$config{'refuse_messageids'}/o) {
             $status{'refused'}++;
+            $timer{'articles'}++ if ($config{'timer_info'});
             return "No";
         }
     }
@@ -1227,6 +1232,7 @@
     if ($config{'block_late_cancels'}) {
         if ($mid =~ /^<cancel\.(.*)/ && $MIDhistory{'<'.$1}) {
             $status{'refused'}++;
+            $timer{'articles'}++ if ($config{'timer_info'});
             return "No";
         }
     }
@@ -1288,6 +1294,7 @@
     my ($superentries) = scalar keys %supersede;

     open FILE, ">$config{'statfile'}" or return 0;
+    print FILE "Updated: " . (scalar localtime) . "\n";
     print FILE "Accepted: $status{'accepted'}\n";
     print FILE "Rejected: $status{'rejected'}\n";
     print FILE "Refused: $status{'refused'}\n" if ($config{'do_mid_filter'});

-- 
okay, have a sig then

Re: Cleanfeed and INN 2.3 problems.
#44355
Author: Russ Allbery
Date: Wed, 23 Feb 2000 00:00
20 lines
1548 bytes
bill davidsen <davidsen@tmr.com> writes:
> Russ Allbery  <rra@stanford.edu> wrote:

>> I don't think a newer one has been released.  This particular error
>> message is caused by the means by which cleanfeed counts the number of
>> lines in the body of the message; if you change that line (I forget
>> exactly where it is; look for lines) to use $hdr{__LINES__} instead, it
>> will both be faster and will make this error go away.

> Unless this is a real value and not the user Lines: header I don't know
> that I'd want to trust it. Call me paranoid...

Me too, which is why I added __LINES__.  :)  (INN already does its own
lines count for every article; that key just exposes it to the Perl
filter.)

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Cleanfeed and INN 2.3 problems.
#44376
Author: Chunk Light Fluffy
Date: Thu, 24 Feb 2000 00:00
13 lines
1154 bytes
bill davidsen wrote:
> 
> Russ Allbery  <rra@stanford.edu> wrote:
> 
> | [...] use $hdr{__LINES__} instead, [...]

>   Unless this is a real value and not the user Lines: header I don't
> know that I'd want to trust it. Call me paranoid...

Both are available.  'Lines' has the header contents, '__LINES__' is
calculated by innd.

Re: Cleanfeed and INN 2.3 problems.
#44387
Author: bill davidsen
Date: Thu, 24 Feb 2000 00:00
20 lines
1576 bytes
In article <ylu2ja5qer.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:

| I don't think a newer one has been released.  This particular error
| message is caused by the means by which cleanfeed counts the number of
| lines in the body of the message; if you change that line (I forget
| exactly where it is; look for lines) to use $hdr{__LINES__} instead, it
| will both be faster and will make this error go away.

  Unless this is a real value and not the user Lines: header I don't
know that I'd want to trust it. Call me paranoid...

--
bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
  When taking small children to a carnival, always have them go potty
*before* you let them go on the rides, and let them eat all the junk
food and candy *after*.

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