tests: Debug log when in protocol update callback

This commit is contained in:
Richard Hansen 2024-08-29 13:01:02 -04:00
parent 7181152c78
commit 0a9ee106e4

View file

@ -49,12 +49,16 @@ local %ddclient::protocols = (
# `ipv6`, `status-ipv4`, and `status-ipv6`.) It always succeeds. # `ipv6`, `status-ipv4`, and `status-ipv6`.) It always succeeds.
legacy => { legacy => {
update => sub { update => sub {
ddclient::debug('in update');
for my $h (@_) { for my $h (@_) {
local $ddclient::_l = ddclient::pushlogctx($h);
ddclient::debug('updating host');
push(@updates, [@_]); push(@updates, [@_]);
$ddclient::config{$h}{status} = 'good'; $ddclient::config{$h}{status} = 'good';
$ddclient::config{$h}{ip} = delete($ddclient::config{$h}{wantip}); $ddclient::config{$h}{ip} = delete($ddclient::config{$h}{wantip});
$ddclient::config{$h}{mtime} = $ddclient::now; $ddclient::config{$h}{mtime} = $ddclient::now;
} }
ddclient::debug('returning from update');
}, },
variables => { variables => {
%{$ddclient::variables{'protocol-common-defaults'}}, %{$ddclient::variables{'protocol-common-defaults'}},