I'm actually pulling from CVS. I just re-retrieved it a few minutes
ago, and it still doesn't have the change. It claims to be working
revision 1.120, if that helps. To quote the same block of code you did,
from the ld_open socket to the cancel alarm, I have this:
my $sock = &ld_open_socket($$r{server}, $port, $$v{protocol});
if ($sock) {
close($sock);
}
&ld_debug(3, "Connected to $1 (port $port)");
alarm 0; # Cancel the alarm
Did your version come from a distribution? Often times distro packages
patch things without publicizing that fact. I kinda like your code,
though. It looks a little better. I hope you don't mind if I use it.
Thanks,
Lloyd
Graham David Purcocks M.A.(Oxon.) wrote:
What version of ldirectord are you using. My version 1.77.2.11 already
has the correct code in check_connect.
my $result = &ld_open_socket($$r{server}, $port,
$$v{protocol});
if ($result == 0) {
# Failure to open the socket
alarm(0);
die("Couldn't open socket to
$$r{server}:$port");
} else {
&ld_debug(3, "Connected to $1 (port $port)");
}
alarm 0; # Cancel the alarm
Graham
|