summaryrefslogtreecommitdiffstats
path: root/etc/inc/dyndns.class
diff options
context:
space:
mode:
authorErik Kristensen <ekristen@pfsense.org>2005-07-17 00:36:56 +0000
committerErik Kristensen <ekristen@pfsense.org>2005-07-17 00:36:56 +0000
commit5d719ffa0192715163a6e0a1ac25c1b7c838e013 (patch)
tree2d479e4ba4a237da8d77bcfdcc58997fa6f388c3 /etc/inc/dyndns.class
parentafe4a7d36f5f3189203850d83a538b27837a467f (diff)
downloadpfsense-5d719ffa0192715163a6e0a1ac25c1b7c838e013.zip
pfsense-5d719ffa0192715163a6e0a1ac25c1b7c838e013.tar.gz
Fixed the problem with it trying to update everytime without checking whether the IP has changed for 28 days has expired.
Diffstat (limited to 'etc/inc/dyndns.class')
-rw-r--r--etc/inc/dyndns.class57
1 files changed, 25 insertions, 32 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index e194c01..34d0733 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -68,21 +68,25 @@
$this->_dnsHost = $dnsHost;
$this->_dnsIP = $dnsIP;
- $change = $this->_detectChange();
- if (!$change) $this->_error(10);
+ if ($this->_detectChange() == FALSE) $this->_error(10);
- if ($this->_dnsService == 'dyndns' ||
- $this->_dnsService == 'dhs' ||
- $this->_dnsService == 'noip' ||
- $this->_dnsService == 'easydns' ||
- $this->_dnsService == 'hn' ||
- $this->_dnsService == 'zoneedit' ||
- $this->_dnsService == 'dyns')
- {
- $this->_update();
+ if ($this->_detectChange() == TRUE) {
+ if ($this->_dnsService == 'dyndns' ||
+ $this->_dnsService == 'dhs' ||
+ $this->_dnsService == 'noip' ||
+ $this->_dnsService == 'easydns' ||
+ $this->_dnsService == 'hn' ||
+ $this->_dnsService == 'zoneedit' ||
+ $this->_dnsService == 'dyns')
+ {
+ $this->_update();
+ } else {
+ $this->_error(6);
+ }
} else {
- $this->_error(6);
+ $this->_error(10);
}
+
}
@@ -304,41 +308,30 @@
case 0:
break;
case 2:
- $this->lastError = 'phpDynDNS: (ERROR!) No Dynamic DNS Service provider was selected.';
- if ($this->_errorVerbosity)
- print "You did not select a Dynamic DNS service!";
+ $error = 'phpDynDNS: (ERROR!) No Dynamic DNS Service provider was selected.';
break;
case 3:
- $this->lastError = 'phpDynDNS: (ERROR!) No Username Provided.';
- if ($this->_errorVerbosity)
- print "Error! - No Username Was Provided!";
+ $error = 'phpDynDNS: (ERROR!) No Username Provided.';
break;
case 4:
- $this->lastError = 'phpDynDNS: (ERROR!) No Password Provided.';
- if ($this->_errorVerbosity)
- print "Error! - No Password Was Provided!";
+ $error = 'phpDynDNS: (ERROR!) No Password Provided.';
break;
case 5:
- $this->lastError = 'phpDynDNS: (ERROR!) No Hostname Provided.';
- if ($this->_errorVerbosity)
- print "Error - No Hostname Was Provided!";
+ $error = 'phpDynDNS: (ERROR!) No Hostname Provided.';
break;
case 6:
- $this->lastError = 'phpDynDNS: (ERROR!) The Dynamic DNS Service provided is not yet supported.';
- if ($this->_errorVerbosity)
- print 'Dynamic DNS Service selected is not supported!';
+ $error = 'phpDynDNS: (ERROR!) The Dynamic DNS Service provided is not yet supported.';
break;
case 10:
- $this->lastError = 'phpDynDNS: (ERROR!) No Change Was Made. Not Updating Dynamic DNS Entry.';
- if ($this->_errorVerbosity)
- print 'There was no change in the WAN IP address and default timelimit has not expired. Dynamic DNS entry was not updated.';
+ $error = 'phpDynDNS: No Change In My IP Address and/or 28 Days Has Not Past. Not Updating Dynamic DNS Entry.';
break;
default:
- $this->lastError = "phpDynDNS: (ERROR!) Unknown Response.";
+ $error = "phpDynDNS: (ERROR!) Unknown Response.";
$this->_debug($data);
break;
}
- log_error($this->lasterror);
+ $this->lastError = $error;
+ log_error($error);
}
OpenPOWER on IntegriCloud