🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Doug S Tue, 23 Sep 1997 00:00
purge-binaries, crosspost, and inn 1.5.1 (was Re: misplaced binaries report (1997Sep21)
#21809
Author: 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

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