Disinfection speed bogosity

Julian Field MailScanner at ecs.soton.ac.uk
Mon Jul 24 21:11:06 UTC 2006


On Mon24 Jul 06, at 21:43, Jeff A. Earickson wrote:

> Julian,
>
> I just noticed totally bogus disinfection speeds in my syslog for
> 4.55.8 (and 4.55.7), stuff like:
>
> Disinfection completed at 1080796982 bytes per second
> Disinfection completed at -1554448642 bytes per second
> Disinfection completed at -1 bytes per second
>
> Looking at around line 162 of MessageBatch.pm, I would guess that
> this routine never got the Time::HiRes retrofit since the minimum
> time there seems to be one second.  Is this a bug?

Around like 158 make the code look like this: (note the 1 extra line  
in the middle)

   $totaltime = 1 unless $totaltime > 0; # Minimum of 1 second
   # speed = bytes / totaltime
   $speed = ($this->{totalbytes}*1.0) / ($totaltime*1.0) if  
$totaltime > 0;
   $speed = 1_000_000 if $speed > 1_000_000 or $speed < 0; # THIS IS NEW
   # bytespersecond = speed
   $command = '$this->{' . $varprefix . '_bytespersecond} = $speed;';
   eval $command;


>
> Jeff Earickson
> Colby College
> -- 
> MailScanner-Beta mailing list
> mailscanner-beta at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner-beta
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!

--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store !
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.




More information about the MailScanner-Beta mailing list