From 2c82f89c547f8faf6bc212437f0abdc14a580815 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/svn@89 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 69aa908..d83fb84 100755 --- a/ddclient +++ b/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,