Mark Martinec writes: > > > [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?
hi Mark -- thanks for that fix; it's now in trunk, and as bug 4901 for b3_1_0. but I don't get that last point -- warn() should always be noiser than dbg(), hence less likely to go by unnoticed.... --j.