@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
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++;
$transmit_ok = 0;
if ($connected) {
- $current_proto = $proto;
+ $current_proto = $proto;
local($old) = select(SYSLOG); $| = 1; select($old);
} else {
@fallbackMethods = ();
}
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;
}
push(@{$errs}, "udp socket: $!");
return 0;
}
- if (!connect(SYSLOG,$that)) {
+ if (!CORE::connect(SYSLOG,$that)) {
push(@{$errs}, "udp connect: $!");
return 0;
}
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;
}