Hi Theo.

> -----Original Message-----
> From: Theo Van Dinter [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2003 2:02 PM
> To: Gary Funck
> Cc: Spamassassin List
> Subject: Re: [SAtalk] non-numeric atime in Bayes db? (SA 2.61)
> 
> 
> On Wed, Dec 10, 2003 at 01:44:17PM -0800, Gary Funck wrote:
> > Follow-up, adding a check to see if $oldmagic is "" made the complaints
> > go away:
> > 
> >    1248     my $oldmagic =
> > $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN};
> >    1249     $oldmagic = 0 if (defined($oldmagic) && $oldmagic eq "");
> >    1250     if (!defined ($oldmagic) || $atime < $oldmagic) {
> >    1251       $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN} 
> = $atime;
> >    1252     }
> > 
> > this can be recoded more succinctly, I'm sure.
> 
> FYI: you changed the logic of the code there.  if there is no oldest
> token atime (ie: this is the first token to be learned), it should set
> the value to the atime.  you've now forced oldest to be 0 until the
> first expire occurs and fixes it.
> 
> the !defined bit is supposed to catch when there is no oldest token, but
> apparently instead of undef, it sometimes comes back as "" (boo DB_File!)
> 

Are you saying it should've looked like this?

    if ((!defined($oldmagic) || $oldmagic eq "") || $atime < $oldmagic) {
      $self->{db_toks}->{$OLDEST_TOKEN_AGE_MAGIC_TOKEN} = $atime;
    }

> can you open a ticket in bugzilla about this?

Sure will be glad to.




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to