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);
|
next if (!$ip);
|
||||||
my $ipversion = ($ip eq ($ipv6 // '')) ? '6' : '4';
|
my $ipversion = ($ip eq ($ipv6 // '')) ? '6' : '4';
|
||||||
info("$host: Setting IPv$ipversion address to $ip");
|
info("$host: Setting IPv$ipversion address to $ip");
|
||||||
my $status = \$config{$host}{"status-ipv$ipversion"};
|
|
||||||
my $rrset_type = ($ipversion eq '6') ? 'AAAA' : 'A';
|
my $rrset_type = ($ipversion eq '6') ? 'AAAA' : 'A';
|
||||||
my $data = encode_json([{
|
my $data = encode_json([{
|
||||||
data => $ip,
|
data => $ip,
|
||||||
|
@ -5776,7 +5775,6 @@ sub nic_godaddy_update {
|
||||||
$reply =~ s/^.*?\n\n//s;
|
$reply =~ s/^.*?\n\n//s;
|
||||||
my $response = eval {decode_json($reply)};
|
my $response = eval {decode_json($reply)};
|
||||||
if (!defined($response)) {
|
if (!defined($response)) {
|
||||||
$$status = "bad";
|
|
||||||
failed("$host: Unexpected or empty service response, cannot parse data");
|
failed("$host: Unexpected or empty service response, cannot parse data");
|
||||||
next;
|
next;
|
||||||
} elsif (defined($response->{code})) {
|
} elsif (defined($response->{code})) {
|
||||||
|
@ -5785,7 +5783,7 @@ sub nic_godaddy_update {
|
||||||
if ($ok) {
|
if ($ok) {
|
||||||
$config{$host}{"ipv$ipversion"} = $ip;
|
$config{$host}{"ipv$ipversion"} = $ip;
|
||||||
$config{$host}{'mtime'} = $now;
|
$config{$host}{'mtime'} = $now;
|
||||||
$$status = 'good';
|
$config{$host}{"status-ipv$ipversion"} = 'good';
|
||||||
success("$host: Updated successfully to $ip (status: $code)");
|
success("$host: Updated successfully to $ip (status: $code)");
|
||||||
next;
|
next;
|
||||||
} elsif ($code == "400") {
|
} elsif ($code == "400") {
|
||||||
|
@ -5810,7 +5808,6 @@ sub nic_godaddy_update {
|
||||||
} else {
|
} else {
|
||||||
$msg = 'Unexpected service response.';
|
$msg = 'Unexpected service response.';
|
||||||
}
|
}
|
||||||
$$status = 'bad';
|
|
||||||
failed("$host: $msg");
|
failed("$host: $msg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue