spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sid...@apache.org
Subject svn commit: r328495 - /spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm
Date Tue, 25 Oct 2005 22:36:06 GMT
Author: sidney
Date: Tue Oct 25 15:36:02 2005
New Revision: 328495

URL: http://svn.apache.org/viewcvs?rev=328495&view=rev
Log:
bug 4619 update to work with older versions of Net::DNS less than 0.50

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

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm?rev=328495&r1=328494&r2=328495&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/DnsResolver.pm Tue Oct 25 15:36:02 2005
@@ -109,7 +109,9 @@
   
   eval {
     require Net::DNS;
-    $self->{res} = Net::DNS::Resolver->new;
+    # force_v4 is set in new() to avoid error in older versions of Net::DNS that don't have
it
+    # other options are set by function calls so a typo or API change will cause an error
here
+    $self->{res} = Net::DNS::Resolver->new(force_v4 => $force_ipv4);
     if (defined $self->{res}) {
       $self->{no_resolver} = 0;
       $self->{force_ipv4} = $force_ipv4;
@@ -123,7 +125,6 @@
       $self->{res}->udp_timeout(3);     # timeout of 3 seconds only
       $self->{res}->persistent_tcp(0);  # bug 3997
       $self->{res}->persistent_udp(0);  # bug 3997
-      $self->{res}->force_v4($force_ipv4);
     }
     1;
   };   #  or warn "dns: eval failed: $@ $!\n";



Mime
View raw message