From dc2dda9599d53e2eae69796026506628e2974251 Mon Sep 17 00:00:00 2001 From: Sandro Date: Wed, 27 May 2020 03:01:42 +0200 Subject: [PATCH] Simplify code --- ddclient | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ddclient b/ddclient index e965667..6f36884 100755 --- a/ddclient +++ b/ddclient @@ -5315,14 +5315,10 @@ sub nic_mydns_update { verbose("UPDATE:","updating %s", $h); ## update the DNS record - my $url; - my $header; - my $data; - my $reply; - $url = "https://$config{$h}{'server'}/directip.html"; - $header = 'Content-Type: application/x-www-form-urlencoded'; - $data = "MID=" . $config{$h}{'login'} . "&PWD=" . $config{$h}{'password'} . "&IPV4ADDR=" . $ip; - $reply = geturl(opt('proxy'), $url, undef, undef, $header, 'POST', $data); + my $url = "https://$config{$h}{'server'}/directip.html"; + my $header = 'Content-Type: application/x-www-form-urlencoded'; + my $data = "MID=" . $config{$h}{'login'} . "&PWD=" . $config{$h}{'password'} . "&IPV4ADDR=" . $ip; + my $reply = geturl(opt('proxy'), $url, undef, undef, $header, 'POST', $data); ## no response, declare as failed if (!defined($reply) || !$reply) {