On Thursday 29 August 2002 18:10, Craig Ward wrote:
> That's fixed it for me, but I don't know $tmp_id or $virtual_id actually
> is.
>
> If anyone could enlighten me that'd be great :o)
Not sure what that code does either, but my ldirectord CVS copy does something
slightly different at that point in the code:
----
# Check each virtual service for the real server and make
# changes as neccessary
foreach $v (@VIRTUAL){
# Use found rather than relying on tmp_id being
# set when we leave the foreach loop. There
# seems to some weirdness in Perl (5.6.0 on Redhat 7.2)
my $found = 0;
my $tmp_id;
my $virtual_id = get_virtual_id_str($v);
foreach $tmp_id (@$virtual) {
if($virtual_id eq $tmp_id) {
$found = 1;
last;
}
}
if ($found == 1) {
if ($state=~/up/i) {
$$r{status}=0;
_service_up($v, $r);
&ld_debug(2, "Enabled server=$$r{server}");
} elsif ($state=~/down/i) {
$$r{status}=1;
_service_down($v, $r);
&ld_debug(2, "Disabled server=$$r{server}");
}
}
}
----
Not sure if this can be dropped in, it might be dependent on the rest of the
ldirectord script. Maybe you can try the CVS version?
--
Martijn
|