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
This commit is contained in:
wimpunk 2008-06-05 19:10:53 +00:00
parent e4856a0add
commit 2c82f89c54

View file

@ -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,