From: Gisle Aas Date: Tue, 10 Jan 2006 14:32:43 +0000 (+0000) Subject: If getservbyname fails tell what service the lookup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18fd236b74f8374016eb16e779d1122c897d2f4a;p=p5sagit%2Fp5-mst-13.2.git If getservbyname fails tell what service the lookup attempt tried to use. p4raw-id: //depot/perl@26768 --- diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index d47b1f7..edcea04 100644 --- a/ext/Sys/Syslog/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -821,7 +821,7 @@ sub connect_tcp { my $syslog = getservbyname('syslog','tcp'); $syslog = getservbyname('syslogng','tcp') unless (defined $syslog); if (!defined $syslog) { - push(@{$errs}, "getservbyname failed for tcp"); + push(@{$errs}, "getservbyname failed for syslog/tcp and syslogng/tcp"); return 0; } @@ -859,7 +859,7 @@ sub connect_udp { } my $syslog = getservbyname('syslog','udp'); if (!defined $syslog) { - push(@{$errs}, "getservbyname failed for udp"); + push(@{$errs}, "getservbyname failed for syslog/udp"); return 0; } my $this = sockaddr_in($syslog, INADDR_ANY);