summaryrefslogtreecommitdiffstats
path: root/etc/inc/dyndns.class
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-22 14:25:25 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-22 14:25:25 +0000
commiteb346556c022808886bec4ffacbe3409aacfac27 (patch)
tree84daa8261219ff8d67a8ea32a81336618a7b8933 /etc/inc/dyndns.class
parent8f1b45aae320985a1168b6e1fbf18fb434f3d5d4 (diff)
downloadpfsense-eb346556c022808886bec4ffacbe3409aacfac27.zip
pfsense-eb346556c022808886bec4ffacbe3409aacfac27.tar.gz
Try to be more consistent on boolean value checking.
Diffstat (limited to 'etc/inc/dyndns.class')
-rw-r--r--etc/inc/dyndns.class30
1 files changed, 14 insertions, 16 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 7b7bbbd..c21d7a5 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -125,7 +125,7 @@
$this->_debugID = rand(1000000, 9999999);
- if ($this->_detectChange() == FALSE) {
+ if ($this->_detectChange() == false) {
$this->_error(10);
} else {
switch ($this->_dnsService) {
@@ -848,31 +848,29 @@
$needs_updating = FALSE;
/* lets determine if the item needs updating */
if ($cacheIP != $wan_ip) {
- $needs_updating = TRUE;
- log_error("DynDns: cacheIP != wan_ip. Updating.");
+ $needs_updating = true;
+ $update_reason = "DynDns: cacheIP != wan_ip. Updating. ";
+ $update_reason .= "Cached IP: {$cacheIP} WAN IP: {$wan_ip} ";
}
- $update_reason = "Cached IP: {$cacheIP} WAN IP: {$wan_ip} ";
if (($currentTime - $cacheTime) > $time ) {
$needs_updating = TRUE;
- log_error("DynDns: More than 25 days. Updating.");
+ $update_reason = "DynDns: More than 25 days. Updating. ";
+ $update_reason .= "{$currentTime} - {$cacheTime} > {$time} ";
}
- $update_reason .= "{$currentTime} - {$cacheTime} > {$time} ";
- if ($initial == TRUE) {
- $needs_updating = TRUE;
+ if ($initial == true) {
+ $needs_updating = true;
$update_reason .= "Inital update. ";
- log_error("DynDns: Initial run. Updating.");
}
+
/* finally if we need updating then store the
* new cache value and return true
*/
- if($needs_updating == TRUE) {
- return TRUE;
- } else {
- return FALSE;
+ if ($needs_updating == true) {
+ log_error("DynDns debug information: {$update_reason}");
+ return true;
}
-
- log_error("DynDns debug information: {$update_reason}");
-
+
+ return false;
}
/*
OpenPOWER on IntegriCloud