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:
wimpunk 2010-09-14 11:19:47 +00:00
parent a7d8c50e06
commit 4edbb7a3e9

View file

@ -2440,6 +2440,8 @@ sub nic_dyndns2_update {
my @reply = split /\n/, $reply;
my $state = 'header';
my $returnedip = $ip;
foreach my $line (@reply) {
if ($state eq 'header') {
$state = 'body';
@ -2450,7 +2452,10 @@ sub nic_dyndns2_update {
} elsif ($state =~ /^results/) {
$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;
$config{$h}{'status'} = $status;