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/;
|
my ($status) = $body =~ qr/^(\S*)\b/;
|
||||||
$config{$h}{"status-ipv$ipv"} = $status;
|
$config{$h}{"status-ipv$ipv"} = $status;
|
||||||
if ($status eq 'NOERROR') {
|
if ($status ne 'NOERROR') {
|
||||||
$config{$h}{"ipv$ipv"} = $ip;
|
if (exists $errors{$status}) {
|
||||||
$config{$h}{'mtime'} = $now;
|
failed("$h: $status: $errors{$status}");
|
||||||
success("$h: IPv$ipv address set to $ip");
|
} else {
|
||||||
} elsif (exists $errors{$status}) {
|
failed("$h: unexpected result: $body");
|
||||||
failed("$h: $status: $errors{$status}");
|
}
|
||||||
} else {
|
next;
|
||||||
failed("$h: unexpected result: $body");
|
|
||||||
}
|
}
|
||||||
|
$config{$h}{"ipv$ipv"} = $ip;
|
||||||
|
$config{$h}{'mtime'} = $now;
|
||||||
|
success("$h: IPv$ipv address set to $ip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue