From e7ad0e8e6e9ecb5bbf4ef1a7669f741483fdad58 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 20 Jul 2024 02:13:13 -0400 Subject: [PATCH] easydns: Whitespace fixes --- ddclient.in | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ddclient.in b/ddclient.in index 82a324c..45fa257 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4797,12 +4797,9 @@ sub nic_easydns_update { for my $h (@_) { my $ipv4 = delete $config{$h}{'wantipv4'}; my $ipv6 = delete $config{$h}{'wantipv6'}; - info("setting IP address to %s %s for %s", $ipv4, $ipv6, $h); verbose("UPDATE:", "updating %s", $h); - #'https://api.cp.easydns.com/dyn/generic.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' - my $url; $url = "https://$config{$h}{'server'}$config{$h}{'script'}?"; $url .= "hostname=$h"; @@ -4813,12 +4810,10 @@ sub nic_easydns_update { $url .= $ipv6a } $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; - if ($config{$h}{'mx'}) { $url .= "&mx=$config{$h}{'mx'}"; $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); } - my $reply = geturl( proxy => opt('proxy'), url => $url, @@ -4830,21 +4825,16 @@ sub nic_easydns_update { next; } next if !header_ok($h, $reply); - my @reply = split /\n/, $reply; my $state = 'header'; for my $line (@reply) { if ($state eq 'header') { $state = 'body'; - } elsif ($state eq 'body') { $state = 'results' if $line eq ''; - } elsif ($state =~ /^results/) { $state = 'results2'; - my ($status) = $line =~ /^(\S*)\b.*/; - $config{$h}{'status-ipv4'} = $status if $ipv4; $config{$h}{'status-ipv6'} = $status if $ipv6; if ($status eq 'NOERROR') { @@ -4852,21 +4842,17 @@ sub nic_easydns_update { $config{$h}{'ipv6'} = $ipv6; $config{$h}{'mtime'} = $now; success("updating %s: %s: IP address set to %s %s", $h, $status, $ipv4, $ipv6); - } elsif ($status =~ /TOOSOON/) { ## make sure we wait at least a little my ($wait, $units) = (5, 'm'); 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'; $config{$h}{'wtime'} = $now + $sec; warning("updating %s: %s: wait %d %s before further updates", $h, $status, $wait, $units); - } elsif (exists $errors{$status}) { failed("updating %s: %s: %s", $h, $line, $errors{$status}); - } else { failed("updating %s: unexpected status (%s)", $h, $line); }