easydns: Invert condition to improve readability
This commit is contained in:
parent
da26fe76e0
commit
435357ac50
1 changed files with 10 additions and 8 deletions
18
ddclient.in
18
ddclient.in
|
@ -4823,15 +4823,17 @@ sub nic_easydns_update {
|
|||
};
|
||||
my ($status) = $body =~ qr/^(\S*)\b/;
|
||||
$config{$h}{"status-ipv$ipv"} = $status;
|
||||
if ($status eq 'NOERROR') {
|
||||
$config{$h}{"ipv$ipv"} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
success("$h: IPv$ipv address set to $ip");
|
||||
} elsif (exists $errors{$status}) {
|
||||
failed("$h: $status: $errors{$status}");
|
||||
} else {
|
||||
failed("$h: unexpected result: $body");
|
||||
if ($status ne 'NOERROR') {
|
||||
if (exists $errors{$status}) {
|
||||
failed("$h: $status: $errors{$status}");
|
||||
} else {
|
||||
failed("$h: unexpected result: $body");
|
||||
}
|
||||
next;
|
||||
}
|
||||
$config{$h}{"ipv$ipv"} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
success("$h: IPv$ipv address set to $ip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue