From 5fc7106be723c2c7de321099ecb95fb11a8ac90a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 19:10:53 +0000 Subject: [PATCH] Preventing error while reading cache when ip wasn't set correctly before git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@89 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 69aa908..d83fb84 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2026,8 +2026,10 @@ sub nic_updateable { ); $update = 1; - } elsif ($cache{$host}{'ip'} ne $ip) { - if (($cache{$host}{'status'} eq 'good') && !interval_expired($host, 'mtime', 'min-interval')) { + } elsif ((!exists($cache{$host}{'ip'})) || + ("$cache{$host}{'ip'}" ne "$ip")) { + if (($cache{$host}{'status'} eq 'good') && + !interval_expired($host, 'mtime', 'min-interval')) { warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", $host,