🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by armedlemming Tue, 26 Sep 2000 00:00
INN & cleanfeed
#48539
Author: armedlemming
Date: Tue, 26 Sep 2000 00:00
34 lines
1623 bytes
Hello all,

I've got my INNd server running now, but the cleanfeed PERL filter is
erroring out on me.  Here's the message from the log:

Sep 26 11:55:08 jupiter innd: Perl function filter_art died:
Modification of a read-only value attempted at
/usr/local/news/bin/filter/filter_innd.pl line 572.
Sep 26 11:55:08 jupiter innd: SERVER perl filtering disabled

So I go into the file and check out line 572 in filter_innd.pl:
(line 571 included to for reference)

# count the lines in the article
        $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;

I haven't touched the file aside from moving it into place as
filter_innd.pl from the name of "cleanfeed" that it had before moving it
over.

The file (and cleanfeed.conf) is readable by the user news which is what
the server is running as.

Any clues?

Cheers!

Chris H.


Sent via Deja.com http://www.deja.com/
Before you buy.

Re: INN & cleanfeed
#48527
Author: Russ Allbery
Date: Tue, 26 Sep 2000 00:00
16 lines
1350 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
>>>>>> "Paul" == Paul Tomblin <ptomblin@xcski.com> writes:

>  Paul> Doesn't that mean that $lines won't be set if there is no
>  Paul> "Lines:" header in the article, or does inn 2.3 always generate
>  Paul> it even on in-coming articles that didn't come with one?

> I think you'll find that INN 2.3 puts the article linecount in the
> $hdr{__LINES__} entry independently of the actual article headers.

Yup.

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

Re: INN & cleanfeed
#48532
Author: armedlemming
Date: Tue, 26 Sep 2000 00:00
65 lines
2349 bytes

Sorry all, I found the fix in the archives of this group by none other
than Russ himself (back in February 2000).

I have to change the:

$lines = $hdr{'__BODY__'} =~ tr/\n/\n/;

to be:

$lines = $hdr{'__LINES__'} =~ tr/\n/\n/;

instead.  I did it and it worked.

Cool.  Is this something that could be incorporated into the cleanfeed
FAQ (which is 'bout 2 years old now, but useful nonetheless) or maybe as
a note for INN 2.3....

just a suggestion,

Chris H.

In article <8qr5to$hk9$1@nnrp1.deja.com>,
  armedlemming@yahoo.com wrote:
> Hello all,
>
> I've got my INNd server running now, but the cleanfeed PERL filter is
> erroring out on me.  Here's the message from the log:
>
> Sep 26 11:55:08 jupiter innd: Perl function filter_art died:
> Modification of a read-only value attempted at
> /usr/local/news/bin/filter/filter_innd.pl line 572.
> Sep 26 11:55:08 jupiter innd: SERVER perl filtering disabled
>
> So I go into the file and check out line 572 in filter_innd.pl:
> (line 571 included to for reference)
>
> # count the lines in the article
>         $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;
>
> I haven't touched the file aside from moving it into place as
> filter_innd.pl from the name of "cleanfeed" that it had before moving
it
> over.
>
> The file (and cleanfeed.conf) is readable by the user news which is
what
> the server is running as.
>
> Any clues?
>
> Cheers!
>
> Chris H.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.

Re: INN & cleanfeed
#48534
Author: Russ Allbery
Date: Tue, 26 Sep 2000 00:00
31 lines
1423 bytes
armedlemming <armedlemming@yahoo.com> writes:

> Sorry all, I found the fix in the archives of this group by none other
> than Russ himself (back in February 2000).

> I have to change the:

> $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;

> to be:

> $lines = $hdr{'__LINES__'} =~ tr/\n/\n/;

> instead.  I did it and it worked.

No, you want just:

    $lines = $hdr{'__LINES__'};

without the tr/// part.

> Cool.  Is this something that could be incorporated into the cleanfeed
> FAQ (which is 'bout 2 years old now, but useful nonetheless) or maybe as
> a note for INN 2.3....

Yeah, I should mention it in the INN 2.3 release notes.

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

Re: INN & cleanfeed
#48540
Author: armedlemming
Date: Tue, 26 Sep 2000 00:00
38 lines
1948 bytes
Thanks for the response!

(off topic - Bad day for ManU, but good one for Leeds eh?)


In article <87g0mm7pw5.fsf@erlenstar.demon.co.uk>,
  Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:
> >>>>> "armedlemming" == armedlemming  <armedlemming@yahoo.com> writes:
>
>  armedlemming> Hello all,
>  armedlemming> I've got my INNd server running now, but the cleanfeed
>  armedlemming> PERL filter is erroring out on me.  Here's the message
>  armedlemming> from the log:
>
>  armedlemming> Sep 26 11:55:08 jupiter innd: Perl function filter_art
>  armedlemming> died: Modification of a read-only value attempted at
>  armedlemming> /usr/local/news/bin/filter/filter_innd.pl line 572.
>
> Newer versions of INN changed the way that the article was passed
> to the Perl filter, avoiding a memory copy but resulting in the
> body being passed as a read-only value.
>
>  armedlemming> # count the lines in the article
>  armedlemming>         $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;
>
> change this to
>
>   $lines = $hdr{'__LINES__'};
>
> --
> Andrew.
>


Sent via Deja.com http://www.deja.com/
Before you buy.

Re: INN & cleanfeed
#48541
Author: Andrew Gierth
Date: Tue, 26 Sep 2000 00:00
26 lines
1663 bytes
>>>>> "armedlemming" == armedlemming  <armedlemming@yahoo.com> writes:

 armedlemming> Hello all,
 armedlemming> I've got my INNd server running now, but the cleanfeed
 armedlemming> PERL filter is erroring out on me.  Here's the message
 armedlemming> from the log:

 armedlemming> Sep 26 11:55:08 jupiter innd: Perl function filter_art
 armedlemming> died: Modification of a read-only value attempted at
 armedlemming> /usr/local/news/bin/filter/filter_innd.pl line 572.

Newer versions of INN changed the way that the article was passed
to the Perl filter, avoiding a memory copy but resulting in the
body being passed as a read-only value.

 armedlemming> # count the lines in the article
 armedlemming>         $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;

change this to

  $lines = $hdr{'__LINES__'};

-- 
Andrew.

Re: INN & cleanfeed
#48556
Author: bill davidsen
Date: Wed, 27 Sep 2000 00:00
21 lines
1614 bytes
In article <8qrm4i$7df$1@allhats.xcski.com>,
Paul Tomblin <ptomblin@xcski.com> wrote:
| In a previous article, Russ Allbery <rra@stanford.edu> said:
| >> $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;
| >No, you want just:
| >    $lines = $hdr{'__LINES__'};
| >
| >without the tr/// part.
| 
| Doesn't that mean that $lines won't be set if there is no "Lines:" header
| in the article, or does inn 2.3 always generate it even on in-coming
| articles that didn't come with one?

$hdr{'Lines'} is the "Lines:" header text
$hdr{'__LINES__'} is the number of newlines in the body.

-- 
  bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!

Re: INN & cleanfeed
#48561
Author: Jeremy
Date: Wed, 27 Sep 2000 01:17
27 lines
1304 bytes
 <armedlemming@yahoo.com> wrote:

> Sorry all, I found the fix in the archives of this group by none other
> than Russ himself (back in February 2000).
> 
> I have to change the:
> 
> $lines = $hdr{'__BODY__'} =~ tr/\n/\n/;
> 
> to be:
> 
> $lines = $hdr{'__LINES__'} =~ tr/\n/\n/;
> 
> instead.  I did it and it worked.

No, it almost certainly didn't.  Make the change from the other
responses, if you only need it to work on 2.3.  (That won't work
everywhere, but works on 2.3.) 

> Cool.  Is this something that could be incorporated into the cleanfeed
> FAQ

Done.

-- 
Jeremy  (  jeremy@exit109.com  |  bofh@netscum.dk  )
Re: INN & cleanfeed
#48563
Author: Andrew Gierth
Date: Wed, 27 Sep 2000 02:41
14 lines
1581 bytes
>>>>> "Paul" == Paul Tomblin <ptomblin@xcski.com> writes:

 >> $lines = $hdr{'__LINES__'};

 Paul> Doesn't that mean that $lines won't be set if there is no
 Paul> "Lines:" header in the article, or does inn 2.3 always generate
 Paul> it even on in-coming articles that didn't come with one?

I think you'll find that INN 2.3 puts the article linecount in the
$hdr{__LINES__} entry independently of the actual article headers.

-- 
Andrew.
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