summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2002-03-23 07:47:08 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-23 20:42:30 +0000
commit60b8437d8d9e12207c224aaf44898f800c31446c (patch)
treeefd881631bd44c68107fb20ba8793c52d329dfa0 /ext
parent56b9c9515cd02d944073a40912b99b5ed69f9766 (diff)
downloadperl-60b8437d8d9e12207c224aaf44898f800c31446c.tar.gz
Re: Copious warnings from Sys::Syslog
Message-ID: <m31yebvns3.fsf@anima.de> p4raw-id: //depot/perl@15448
Diffstat (limited to 'ext')
-rw-r--r--ext/Sys/Syslog/Syslog.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index 6fe349d172..edd813ad8a 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -7,7 +7,7 @@ use Carp;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(openlog closelog setlogmask syslog);
@EXPORT_OK = qw(setlogsock);
-$VERSION = '0.02';
+$VERSION = '0.03';
# it would be nice to try stream/unix first, since that will be
# most efficient. However streams are dodgy - see _syslog_send_stream
@@ -316,7 +316,7 @@ sub syslog {
disconnect();
}
&connect unless $connected;
- $failed = undef if ($current_proto eq $failed);
+ $failed = undef if ($current_proto && $failed && $current_proto eq $failed);
if ($syslog_send) {
if (&{$syslog_send}($buf)) {
$transmit_ok++;
@@ -400,7 +400,7 @@ sub connect {
$transmit_ok = 0;
if ($connected) {
- $current_proto = $proto;
+ $current_proto = $proto;
local($old) = select(SYSLOG); $| = 1; select($old);
} else {
@fallbackMethods = ();
@@ -442,7 +442,7 @@ sub connect_tcp {
}
setsockopt(SYSLOG, SOL_SOCKET, SO_KEEPALIVE, 1);
setsockopt(SYSLOG, IPPROTO_TCP, TCP_NODELAY, 1);
- if (!connect(SYSLOG,$that)) {
+ if (!CORE::connect(SYSLOG,$that)) {
push(@{$errs}, "tcp connect: $!");
return 0;
}
@@ -477,7 +477,7 @@ sub connect_udp {
push(@{$errs}, "udp socket: $!");
return 0;
}
- if (!connect(SYSLOG,$that)) {
+ if (!CORE::connect(SYSLOG,$that)) {
push(@{$errs}, "udp connect: $!");
return 0;
}
@@ -526,12 +526,12 @@ sub connect_unix {
push(@{$errs}, "unix stream socket: $!");
return 0;
}
- if (!connect(SYSLOG,$that)) {
+ if (!CORE::connect(SYSLOG,$that)) {
if (!socket(SYSLOG,AF_UNIX,SOCK_DGRAM,0)) {
push(@{$errs}, "unix dgram socket: $!");
return 0;
}
- if (!connect(SYSLOG,$that)) {
+ if (!CORE::connect(SYSLOG,$that)) {
push(@{$errs}, "unix dgram connect: $!");
return 0;
}