Merge branch 'hank-freedns-fix' into github
Fixed the last part of pull request #31 from @hank. Cleaned up the code on FreeDNS.
This commit is contained in:
commit
bec4521ecd
1 changed files with 17 additions and 17 deletions
34
ddclient
34
ddclient
|
@ -3746,23 +3746,23 @@ sub nic_freedns_update {
|
|||
last;
|
||||
}
|
||||
|
||||
if ($reply =~ /Updated.*$h.*to.*$ip/) {
|
||||
$config{$h}{'ip'} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
success("updating %s: good: IP address set to %s", $h, $ip);
|
||||
} elsif ($reply =~ /Address (\d+\.\d+\.\d+\.\d+) has not changed/) {
|
||||
$ip = $1;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
$config{$h}{'ip'} = $ip;
|
||||
success("updating %s: good: IP address %s has not changed", $h, $ip);
|
||||
} else {
|
||||
$config{$h}{'status'} = 'failed';
|
||||
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
||||
warning("REPLIED: %s", $reply);
|
||||
failed("updating %s: Invalid reply.", $h);
|
||||
}
|
||||
if ($reply =~ /Updated.*$h.*to.*$ip/) {
|
||||
$config{$h}{'ip'} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
success("updating %s: good: IP address set to %s", $h, $ip);
|
||||
} elsif ($reply =~ /Address (\d+\.\d+\.\d+\.\d+) has not changed/) {
|
||||
$ip = $1;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
$config{$h}{'ip'} = $ip;
|
||||
success("updating %s: good: IP address %s has not changed", $h, $ip);
|
||||
} else {
|
||||
$config{$h}{'status'} = 'failed';
|
||||
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
||||
warning("REPLIED: %s", $reply);
|
||||
failed("updating %s: Invalid reply.", $h);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue