You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/06/18 18:30:31 UTC

svn commit: r548401 - /spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm

Author: jm
Date: Mon Jun 18 09:30:30 2007
New Revision: 548401

URL: http://svn.apache.org/viewvc?view=rev&rev=548401
Log:
bug 5509: improve URIBL timeout debugging messages,
thanks to Mark Martinec

Modified:
    spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm

Modified: spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm?view=diff&rev=548401&r1=548400&r2=548401
==============================================================================
--- spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm (original)
+++ spamassassin/branches/3.2/lib/Mail/SpamAssassin/Dns.pm Mon Jun 18 09:30:30 2007
@@ -411,15 +411,12 @@
 
   # timeouts
   @left = $self->{async}->get_pending_lookups();
+  $now = time;
   for my $query (@left) {
-    my $string = '';
-    if (defined @{$query->{sets}}) {
-      $string = join(",", grep defined, @{$query->{sets}});
-    }
-    elsif (defined @{$query->{rules}}) {
-      $string = join(",", grep defined, @{$query->{rules}});
-    }
-    my $delay = time - $self->{async}->get_last_start_lookup_time();
+    my $string = join(", ", grep { defined }
+                      map { ref $query->{$_} ? @{$query->{$_}} : $query->{$_} }
+                      qw(sets rules rulename type key) );
+    my $delay = $now - $self->{async}->get_last_start_lookup_time();
     dbg("dns: timeout for $string after $delay seconds");
   }