You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jq...@apache.org on 2015/08/27 16:22:57 UTC

svn commit: r1698165 - /spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm

Author: jquinn
Date: Thu Aug 27 14:22:57 2015
New Revision: 1698165

URL: http://svn.apache.org/r1698165
Log:
Ugly fix for TxRep data being updated incorrectly

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm?rev=1698165&r1=1698164&r2=1698165&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/SQLBasedAddrList.pm Thu Aug 27 14:22:57 2015
@@ -220,6 +220,7 @@ sub get_addr_entry {
     }
     push(@args, @signedby);
   }
+  $sql .= " ORDER BY last_hit";
   my $sth = $self->{dbh}->prepare($sql);
   my $rc = $sth->execute($self->{_username}, @args);
 
@@ -236,8 +237,8 @@ sub get_addr_entry {
     # an author domain and by a remailer)?  for now just take an average
     while ( defined($aryref = $sth->fetchrow_arrayref()) ) {
       if (defined $entry->{count} && defined $aryref->[1]) {
-        $entry->{count} += $aryref->[0];
-        $entry->{totscore} += $aryref->[1];
+        $entry->{count} = $aryref->[0];
+        $entry->{totscore} = $aryref->[1];
       }
       $entry->{exists_p} = 1;
       $cnt++;