You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/10/11 15:05:07 UTC

svn commit: rev 54578 - spamassassin/branches/3.0/lib/Mail/SpamAssassin/BayesStore

Author: felicity
Date: Mon Oct 11 06:05:07 2004
New Revision: 54578

Modified:
   spamassassin/branches/3.0/lib/Mail/SpamAssassin/BayesStore/DBM.pm
Log:
bug 3872: when syncing the journal and getting seen updates, the code would call seen_{put,delete} which defer to the journal when learn_to_journal is set, resulting in the msgid never getting stored and being passed from one journal to the next in certain situations.

Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/BayesStore/DBM.pm
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/BayesStore/DBM.pm	(original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/BayesStore/DBM.pm	Mon Oct 11 06:05:07 2004
@@ -774,9 +774,13 @@
     $self->defer_update ("m $seen $msgid");
   }
   else {
-    $self->{db_seen}->{$msgid} = $seen;
+    $self->_seen_put_direct($msgid, $seen);
   }
 }
+sub _seen_put_direct {
+  my ($self, $msgid, $seen) = @_;
+  $self->{db_seen}->{$msgid} = $seen;
+}
 
 sub seen_delete {
   my ($self, $msgid) = @_;
@@ -785,9 +789,13 @@
     $self->defer_update ("m f $msgid");
   }
   else {
-    delete $self->{db_seen}->{$msgid};
+    $self->_seen_delete_direct($msgid);
   }
 }
+sub _seen_delete_direct {
+  my ($self, $msgid) = @_;
+  delete $self->{db_seen}->{$msgid};
+}
 
 ###########################################################################
 # db reading APIs
@@ -1191,10 +1199,10 @@
 	$count++;
       } elsif (/^m ([hsf]) (.+)$/) { # update msgid seen database
 	if ( $1 eq "f" ) {
-	  $self->seen_delete($2);
+	  $self->_seen_delete_direct($2);
 	}
 	else {
-	  $self->seen_put($2,$1);
+	  $self->_seen_put_direct($2,$1);
 	}
 	$count++;
       } else {