version 1.849, 2007/03/17 04:11:51
|
version 1.850, 2007/03/27 19:38:39
|
Line 144 sub logperm {
|
Line 144 sub logperm {
|
return 1; |
return 1; |
} |
} |
|
|
|
sub create_connection { |
|
my ($server) = @_; |
|
my $client=IO::Socket::UNIX->new(Peer =>"/home/httpd/sockets/common", |
|
Type => SOCK_STREAM, |
|
Timeout => 10); |
|
return 0 if (!$client); |
|
print $client ("$server\n"); |
|
my $result = <$client>; |
|
chomp($result); |
|
return 1 if ($result eq 'done'); |
|
return 0; |
|
} |
|
|
|
|
# -------------------------------------------------- Non-critical communication |
# -------------------------------------------------- Non-critical communication |
sub subreply { |
sub subreply { |
my ($cmd,$server)=@_; |
my ($cmd,$server)=@_; |
Line 170 sub subreply {
|
Line 184 sub subreply {
|
Timeout => 10); |
Timeout => 10); |
if($client) { |
if($client) { |
last; # Connected! |
last; # Connected! |
|
} else { |
|
&create_connection(&hostname($server)); |
} |
} |
sleep(1); # Try again later if failed connection. |
sleep(1); # Try again later if failed connection. |
} |
} |
my $answer; |
my $answer; |
if ($client) { |
if ($client) { |