http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4901
Summary: fix 'dns: sendto() failed:' error
Product: Spamassassin
Version: 3.1.1
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Subject: Re: SA 99,9% CPU and freeze
From: Mark Martinec <Mark.Martinec+sa.ijs.si>
Date: Tue, 16 May 2006 18:55:25 +0200
To: users.spamassassin.apache.org
> > [1353] warn: dns: sendto() failed: at
> > /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/DnsResolver.pm line 340.
The error report in sub bgsend does not show the failure reason
because it mistakenly reports $@ instead of $!, as far as I can tell.
Also, send() returns undef on error according to docs,
a false return does not necessarily indicate an error.
Looks like the code should be changed to:
--- DnsResolver.pm~ Fri Mar 10 20:29:55 2006
+++ DnsResolver.pm Tue May 16 18:41:12 2006
@@ -337,6 +337,6 @@
my $data = $pkt->data;
$self->connect_sock_if_reqd();
- if (!$self->{sock}->send ($pkt->data, 0)) {
- warn "dns: sendto() failed: $@";
+ if (!defined($self->{sock}->send ($pkt->data, 0))) {
+ warn "dns: sendto() failed: $!";
return;
}
Btw, perhaps calling dbg() instead of warn would less likely
go by unnoticed?
Mark
--------EOM
patch against 3.1.0 to follow.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.