easydns: Fix incorrect status value on success

This commit is contained in:
Richard Hansen 2024-07-19 20:24:38 -04:00
parent a7feb95091
commit 3c68abe551
2 changed files with 7 additions and 1 deletions

View file

@ -129,6 +129,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
[#713](https://github.com/ddclient/ddclient/pull/713) [#713](https://github.com/ddclient/ddclient/pull/713)
* `easydns`: Fixed parsing of result code from server response. * `easydns`: Fixed parsing of result code from server response.
[#713](https://github.com/ddclient/ddclient/pull/713) [#713](https://github.com/ddclient/ddclient/pull/713)
* `easydns`: Fixed successful updates treated as failed updates.
[#713](https://github.com/ddclient/ddclient/pull/713)
## 2023-11-23 v3.11.2 ## 2023-11-23 v3.11.2

View file

@ -4824,8 +4824,12 @@ sub nic_easydns_update {
}; };
my $resultcode_re = join('|', map({quotemeta} 'NOERROR', keys(%errors))); my $resultcode_re = join('|', map({quotemeta} 'NOERROR', keys(%errors)));
my ($status) = $body =~ qr/\b($resultcode_re)\b/; my ($status) = $body =~ qr/\b($resultcode_re)\b/;
# 'good' is the only status value that ddclient considers to be successful. All other
# values are considered to be failures and will result in frequent retries (every
# min-error-interval, which defaults to 5m).
$status = 'good' if ($status // '') =~ qr/^NOERROR|OK$/;
$config{$h}{"status-ipv$ipv"} = $status; $config{$h}{"status-ipv$ipv"} = $status;
if (($status // '') !~ qr/^NOERROR|OK$/) { if ($status ne 'good') {
if (exists $errors{$status}) { if (exists $errors{$status}) {
failed("$h: $status: $errors{$status}"); failed("$h: $status: $errors{$status}");
} else { } else {