dyndns2: Delete obsolete(?) "wait" response handling

This commit is contained in:
Richard Hansen 2024-07-18 05:25:05 -04:00
parent adfd68d5e0
commit 26f57bf36a
2 changed files with 4 additions and 15 deletions

View file

@ -34,6 +34,10 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
* Deprecated built-in web IP discovery services are not listed in the output * Deprecated built-in web IP discovery services are not listed in the output
of `--list-web-services`. of `--list-web-services`.
[#682](https://github.com/ddclient/ddclient/pull/682) [#682](https://github.com/ddclient/ddclient/pull/682)
* `dyndns2`: Support for "wait" response lines has been removed. The Dyn
documentation does not mention such responses, and the code to handle them,
untouched since at least 2006, is believed to be obsolete.
[#709](https://github.com/ddclient/ddclient/pull/709)
### New features ### New features

View file

@ -4161,21 +4161,6 @@ sub nic_dyndns2_update {
if ($status ne 'good') { if ($status ne 'good') {
if (exists($errors{$status})) { if (exists($errors{$status})) {
failed("$hosts: $status: $errors{$status}"); failed("$hosts: $status: $errors{$status}");
} elsif ($status =~ qr/w(\d+)(.)/) {
# TODO: <https://help.dyn.com/remote-access-api/return-codes/> does not mention
# anything about wait statuses. Is this obsolete (this code has been here
# since at least 2006)? Or does a different DynDNS-like service emit wait
# lines?
my ($wait, $units) = ($1, lc $2);
my ($sec, $scale) = ($wait, 1);
($scale, $units) = (1, 'seconds') if $units eq 's';
($scale, $units) = (60, 'minutes') if $units eq 'm';
($scale, $units) = (60*60, 'hours') if $units eq 'h';
$sec = $wait * $scale;
for my $h (@hosts) {
$config{$h}{'wtime'} = $now + $sec;
}
warning("$hosts: wait $wait $units before further updates");
} else { } else {
failed("$hosts: unexpected status: $line"); failed("$hosts: unexpected status: $line");
} }