From 4edbb7a3e96fafe495aed5bf75169706b3af2c5c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 14 Sep 2010 11:19:47 +0000 Subject: [PATCH] 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 --- ddclient | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 3abf561..304d06d 100755 --- a/ddclient +++ b/ddclient @@ -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;