Simplify code

This commit is contained in:
Sandro 2020-05-27 03:01:42 +02:00 committed by GitHub
parent 473c47a935
commit dc2dda9599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5315,14 +5315,10 @@ sub nic_mydns_update {
verbose("UPDATE:","updating %s", $h); verbose("UPDATE:","updating %s", $h);
## update the DNS record ## update the DNS record
my $url; my $url = "https://$config{$h}{'server'}/directip.html";
my $header; my $header = 'Content-Type: application/x-www-form-urlencoded';
my $data; my $data = "MID=" . $config{$h}{'login'} . "&PWD=" . $config{$h}{'password'} . "&IPV4ADDR=" . $ip;
my $reply; my $reply = geturl(opt('proxy'), $url, undef, undef, $header, 'POST', $data);
$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);
## no response, declare as failed ## no response, declare as failed
if (!defined($reply) || !$reply) { if (!defined($reply) || !$reply) {