porkbun: Don't bother setting status
on failure
It's already initialized to a non-success value.
This commit is contained in:
parent
bafd5a8715
commit
c65d5c1254
1 changed files with 0 additions and 5 deletions
|
@ -6801,24 +6801,20 @@ sub nic_porkbun_update {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
if (!defined($reply) || !$reply) {
|
if (!defined($reply) || !$reply) {
|
||||||
$config{$h}{"status-ipv$ipv"} = "bad";
|
|
||||||
failed("updating %s: Could not connect to porkbun.com.", $h);
|
failed("updating %s: Could not connect to porkbun.com.", $h);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (!header_ok($h, $reply)) {
|
if (!header_ok($h, $reply)) {
|
||||||
$config{$h}{"status-ipv$ipv"} = "bad";
|
|
||||||
failed("updating %s: failed (%s)", $h, $reply);
|
failed("updating %s: failed (%s)", $h, $reply);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$reply =~ qr/{(?:[^{}]*|(?R))*}/mp;
|
$reply =~ qr/{(?:[^{}]*|(?R))*}/mp;
|
||||||
my $response = eval { decode_json(${^MATCH}) };
|
my $response = eval { decode_json(${^MATCH}) };
|
||||||
if (!defined($response)) {
|
if (!defined($response)) {
|
||||||
$config{$h}{"status-ipv$ipv"} = "bad";
|
|
||||||
failed("%s -- Unexpected service response.", $h);
|
failed("%s -- Unexpected service response.", $h);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($response->{status} ne 'SUCCESS') {
|
if ($response->{status} ne 'SUCCESS') {
|
||||||
$config{$h}{"status-ipv$ipv"} = "bad";
|
|
||||||
failed("%s -- Unexpected status. (status = %s)", $h, $response->{status});
|
failed("%s -- Unexpected status. (status = %s)", $h, $response->{status});
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
@ -6863,7 +6859,6 @@ sub nic_porkbun_update {
|
||||||
success("updating %s: good: ipv%s address set to %s", $ipv, $h, $ip);
|
success("updating %s: good: ipv%s address set to %s", $ipv, $h, $ip);
|
||||||
next;
|
next;
|
||||||
} else {
|
} else {
|
||||||
$config{$h}{"status-ipv$ipv"} = "bad";
|
|
||||||
failed("updating %s: No applicable existing records.", $h);
|
failed("updating %s: No applicable existing records.", $h);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue