patch for #10: invalid value for keyword ip
git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@120 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
parent
a7d8c50e06
commit
4edbb7a3e9
1 changed files with 6 additions and 1 deletions
7
ddclient
7
ddclient
|
@ -2440,6 +2440,8 @@ sub nic_dyndns2_update {
|
||||||
|
|
||||||
my @reply = split /\n/, $reply;
|
my @reply = split /\n/, $reply;
|
||||||
my $state = 'header';
|
my $state = 'header';
|
||||||
|
my $returnedip = $ip;
|
||||||
|
|
||||||
foreach my $line (@reply) {
|
foreach my $line (@reply) {
|
||||||
if ($state eq 'header') {
|
if ($state eq 'header') {
|
||||||
$state = 'body';
|
$state = 'body';
|
||||||
|
@ -2450,7 +2452,10 @@ sub nic_dyndns2_update {
|
||||||
} elsif ($state =~ /^results/) {
|
} elsif ($state =~ /^results/) {
|
||||||
$state = 'results2';
|
$state = 'results2';
|
||||||
|
|
||||||
my ($status, $ip) = split / /, lc $line;
|
# bug #10: some dyndns providers does not return the IP so
|
||||||
|
# we can't use the returned IP
|
||||||
|
my ($status, $returnedip) = split / /, lc $line;
|
||||||
|
$ip = $returnedip if (not $ip);
|
||||||
my $h = shift @hosts;
|
my $h = shift @hosts;
|
||||||
|
|
||||||
$config{$h}{'status'} = $status;
|
$config{$h}{'status'} = $status;
|
||||||
|
|
Loading…
Reference in a new issue