Bill,

> Mark, I had also applied the jumbo patch, as well.  However, I noticed
> that there were additional changes to AsyncLoop.pm in the jumbo patch
> found at http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5589, so
> I applied this patch and now when doing "spamassassin --lint" or when
> starting or stopping amavisd, I see:
>
> Subroutine log_lookups_timing redefined at
> /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/AsyncLoop.pm line 224.

The second patch is a SUBSTITUTE for the first one, so you must
not apply it ON TOP of the first one, but on a virgin SpamAssassin
(or just do a patch -R on the first one to undo it, before applying
the second).

Please try with the following replacement subroutine (after first applying
the patch), in module AsyncLoop.pm:

sub set_response_packet {
  my ($self, $id, $pkt, $key, $timestamp) = @_;
  $self->{finished}->{$id} = 1;  # only key existence matters, any value
  $timestamp = time  if !defined $timestamp;
  my $pending = $self->{pending_lookups};
  if (!defined $key) {  # backwards compatibility with 3.2.3 and older plugins
    # a third-party plugin did not provide $key in a call, search for it:
    for my $tkey (keys %$pending) {
      if ($id eq $pending->{$tkey}->{id}) { $key = $tkey; last }
    }
    dbg("async: searching for lookup with id $id, found $key");
  }
  if (!defined $key) {
    info("async: no key, response packet not remembered, id $id");
  } else {
    my $ent = $pending->{$key};
    if ($id ne $ent->{id}) {
      info("async: ignoring response, mismatched id $id, $ent->{id}");
    } else {
      $ent->{finish_time} = $timestamp;
      $ent->{response_packet} = $pkt;
    }
  }
  1;
}


This should provide backwards compatibility for third-party plugins
which were not adapted by my patch in 5589.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to