godaddy: Don't bother setting status on error
It's initialized to a non-'good' value before the function is called, and ddclient doesn't distinguish between different non-good values, so it is sufficient to leave it alone.
This commit is contained in:
parent
e01ed55a58
commit
56f4a2afe2
1 changed files with 1 additions and 4 deletions
|
@ -5746,7 +5746,6 @@ sub nic_godaddy_update {
|
|||
next if (!$ip);
|
||||
my $ipversion = ($ip eq ($ipv6 // '')) ? '6' : '4';
|
||||
info("$host: Setting IPv$ipversion address to $ip");
|
||||
my $status = \$config{$host}{"status-ipv$ipversion"};
|
||||
my $rrset_type = ($ipversion eq '6') ? 'AAAA' : 'A';
|
||||
my $data = encode_json([{
|
||||
data => $ip,
|
||||
|
@ -5776,7 +5775,6 @@ sub nic_godaddy_update {
|
|||
$reply =~ s/^.*?\n\n//s;
|
||||
my $response = eval {decode_json($reply)};
|
||||
if (!defined($response)) {
|
||||
$$status = "bad";
|
||||
failed("$host: Unexpected or empty service response, cannot parse data");
|
||||
next;
|
||||
} elsif (defined($response->{code})) {
|
||||
|
@ -5785,7 +5783,7 @@ sub nic_godaddy_update {
|
|||
if ($ok) {
|
||||
$config{$host}{"ipv$ipversion"} = $ip;
|
||||
$config{$host}{'mtime'} = $now;
|
||||
$$status = 'good';
|
||||
$config{$host}{"status-ipv$ipversion"} = 'good';
|
||||
success("$host: Updated successfully to $ip (status: $code)");
|
||||
next;
|
||||
} elsif ($code == "400") {
|
||||
|
@ -5810,7 +5808,6 @@ sub nic_godaddy_update {
|
|||
} else {
|
||||
$msg = 'Unexpected service response.';
|
||||
}
|
||||
$$status = 'bad';
|
||||
failed("$host: $msg");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue