gandi: Invert condition to improve readability
This commit is contained in:
parent
6f505e6538
commit
06c3dd5825
1 changed files with 6 additions and 7 deletions
13
ddclient.in
13
ddclient.in
|
@ -6950,13 +6950,7 @@ sub nic_gandi_update {
|
||||||
rrset_values => [$ip],
|
rrset_values => [$ip],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
my $ok = header_ok($h, $reply);
|
if (!header_ok($h, $reply)) {
|
||||||
if ($ok) {
|
|
||||||
$config{$h}{'ip'} = $ip;
|
|
||||||
$config{$h}{'mtime'} = $now;
|
|
||||||
$config{$h}{"status-$ipv"} = "good";
|
|
||||||
success("$h: updated successfully to $ip");
|
|
||||||
} else {
|
|
||||||
$config{$h}{"status-$ipv"} = "bad";
|
$config{$h}{"status-$ipv"} = "bad";
|
||||||
if (defined($response->{status}) && $response->{status} eq "error") {
|
if (defined($response->{status}) && $response->{status} eq "error") {
|
||||||
my @errors;
|
my @errors;
|
||||||
|
@ -6967,7 +6961,12 @@ sub nic_gandi_update {
|
||||||
} else {
|
} else {
|
||||||
failed("$h: unexpected service response");
|
failed("$h: unexpected service response");
|
||||||
}
|
}
|
||||||
|
next;
|
||||||
}
|
}
|
||||||
|
$config{$h}{'ip'} = $ip;
|
||||||
|
$config{$h}{'mtime'} = $now;
|
||||||
|
$config{$h}{"status-$ipv"} = "good";
|
||||||
|
success("$h: updated successfully to $ip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue