🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21809

purge-binaries, crosspost, and inn 1.5.1 (was Re: misplaced binaries report (1997Sep21)

#21809
From: Doug S
Date: Tue, 23 Sep 1997 00:00
84 lines
3476 bytes
Brian Edmonds (bedmonds@cs.ubc.ca) wrote:
: This posting summarizes the volume of binaries posted to non-binary
: groups over the week ending 1997Sep21, as observed from our site.  The
: statistics were collected with a custom perl script[1] from the logs
: created by the purge-binaries script[2].

<bobbitt>
: [1] <URL:http://www.cs.ubc.ca/spider/edmonds/usenet/binsummary.pl>
: [2] <URL:http://www.tju.edu/~theall1/tools/purge-binaries>

A couple of observations about purge-binaries:

(1) When I went to INN 1.5.1 I found out that cancels often came in
before the buffer got sent to purge-binaries. That caused it to die
with the 'die' error message on line 145.  When I changed that to a
'warn' I got division by zero in line 167.

The patch below fixes that. I'm forwarding thse fix to the author as
well.

(2) I'm running crosspost, and if purge-binaries nukes a post before
crosspost can process it, crosspost complains.

To fix this, I commented out lines 171-173 in crosspost.c - I probably 
should do so more selectively - ie only on "file not found" error - but
I didn't feel like it at the time.


*** purge-binaries.pl.orig	Tue Jan 14 15:45:53 1997
--- purge-binaries.pl	Tue Sep 23 13:22:46 1997
***************
*** 142,148 ****
  
  
          # Scan through the article for questionable signs
!         open(ARTICLE, "$file") || die "*** unable to open $file: $! ***";
          while (<ARTICLE>) {
                  ++$lines;
  
--- 142,148 ----
  
  
          # Scan through the article for questionable signs
!         open(ARTICLE, "$file") || warn "*** unable to open $file: $! ***";
          while (<ARTICLE>) {
                  ++$lines;
  
***************
*** 164,175 ****
          }
          close(ARTICLE);
          $DEBUG && warn "   $lines lines; $uulines uuencoded; $mimelines mime encoded\n";
!         if (100*$uulines/$lines > $encodedpct) {
!                 $reason = "uuencoded ($uulines/$lines)";
!         }
!         elsif (100*$mimelines/$lines > $encodedpct) {
!                 $reason = "mime encoded ($mimelines/$lines)";
!         }
          return $reason;
  }
  
--- 164,177 ----
          }
          close(ARTICLE);
          $DEBUG && warn "   $lines lines; $uulines uuencoded; $mimelines mime encoded\n";
! 	if ($lines > 0) {
!             if (100*$uulines/$lines > $encodedpct) {
!                     $reason = "uuencoded ($uulines/$lines)";
!             }
!             elsif (100*$mimelines/$lines > $encodedpct) {
!                     $reason = "mime encoded ($mimelines/$lines)";
!             }
! 	}
          return $reason;
  }
  
-- 
Doug S. (doug@cc.ysu.edu) (http://cc.ysu.edu/~doug/)

If you get hung up on what you did wrong, you're never gonna get anywhere.
        -- Kenneth Copeland

Technical Details
Message-ID: <608vb8$a3g@unix1.cc.ysu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <37bu1m5ao5.fsf@salvator.cs.ubc.ca>

Show Full Headers
Complete Article Headers
Message-ID: <608vb8$a3g@unix1.cc.ysu.edu>
Subject: purge-binaries, crosspost, and inn 1.5.1 (was Re: misplaced binaries report (1997Sep21)
Date: Tue, 23 Sep 1997 00:00:00 +0000
From: doug@cc.ysu.edu (Doug S)
References: <37bu1m5ao5.fsf@salvator.cs.ubc.ca>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 274911445
Organization: Youngstown State University
Newsgroups: news.admin.misc,news.software.nntp