Handle freedns response when IP address unchanged.
Handles 'ERROR' response returned by freedns when the IP address has not changed.
This commit is contained in:
parent
94dc35984f
commit
00b0e61302
1 changed files with 6 additions and 0 deletions
6
ddclient
6
ddclient
|
|
@ -3841,6 +3841,12 @@ sub nic_freedns_update {
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
$config{$h}{'status'} = 'good';
|
$config{$h}{'status'} = 'good';
|
||||||
success("updating %s: good: IP address set to %s", $h, $ip);
|
success("updating %s: good: IP address set to %s", $h, $ip);
|
||||||
|
} elsif ($reply =~ /ERROR: Address (.*) has not changed\./) {
|
||||||
|
$ip = $1;
|
||||||
|
$config{$h}{'ip'} = $ip;
|
||||||
|
$config{$h}{'mtime'} = $now;
|
||||||
|
$config{$h}{'status'} = 'good';
|
||||||
|
success("update not necessary %s: IP address already set to %s", $h, $ip);
|
||||||
} else {
|
} else {
|
||||||
$config{$h}{'status'} = 'failed';
|
$config{$h}{'status'} = 'failed';
|
||||||
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue