diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-25 01:54:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-25 01:54:33 +0000 |
commit | a255e1f778d30fa0c7e6fc51478b7c5f99fe8886 (patch) | |
tree | fea91e0d5882c3216f41a15905ee2c63f4dc327e /etc/inc | |
parent | ea05a3ac6617849f2290631882b860c6c1091f64 (diff) | |
download | pfsense-a255e1f778d30fa0c7e6fc51478b7c5f99fe8886.zip pfsense-a255e1f778d30fa0c7e6fc51478b7c5f99fe8886.tar.gz |
Output debugging information to try and find DynDns errors
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/dyndns.class | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index fb48ea1..dbcf82c 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -108,7 +108,6 @@ } - /* * Private Function (added 12 July 05) [beta] * Send Update To Selected Service. @@ -152,20 +151,20 @@ break; case 'dhs': $needsIP = TRUE; - $post_data['hostscmd'] = 'edit'; - $post_data['hostscmdstage'] = '2'; - $post_data['type'] = '4'; - $post_data['updatetype'] = 'Online'; - $post_data['mx'] = $this->_dnsMX; - $post_data['mx2'] = ''; - $post_data['txt'] = ''; - $post_data['offline_url'] = ''; - $post_data['cloak'] = 'Y'; - $post_data['cloak_title'] = ''; - $post_data['ip'] = $this->_dnsIP; - $post_data['domain'] = 'dyn.dhs.org'; - $post_data['hostname'] = $this->_dnsHost; - $post_data['submit'] = 'Update'; + $post_data['hostscmd'] = 'edit'; + $post_data['hostscmdstage'] = '2'; + $post_data['type'] = '4'; + $post_data['updatetype'] = 'Online'; + $post_data['mx'] = $this->_dnsMX; + $post_data['mx2'] = ''; + $post_data['txt'] = ''; + $post_data['offline_url'] = ''; + $post_data['cloak'] = 'Y'; + $post_data['cloak_title'] = ''; + $post_data['ip'] = $this->_dnsIP; + $post_data['domain'] = 'dyn.dhs.org'; + $post_data['hostname'] = $this->_dnsHost; + $post_data['submit'] = 'Update'; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_URL, 'https://members.dhs.org/nic/hosts'); curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); @@ -250,7 +249,6 @@ } } - /* * Private Function (added 12 July 2005) [beta] * Retrieve Update Status @@ -418,7 +416,6 @@ log_error($status); } - /* * Private Function (added 12 July 05) [beta] * Return Error, Set Last Error, and Die. @@ -454,7 +451,6 @@ log_error($error); } - /* * Private Function (added 12 July 05) [beta] * - Detect whether or not IP needs to be updated. @@ -491,15 +487,21 @@ $needs_updating = FALSE; /* lets deterimine if the item needs updating */ - if ($cacheIP != $wan_ip) + if ($cacheIP != $wan_ip) { $needs_updating = TRUE; - if (($currentTime - $cacheTime) > $time ) + } + $update_reason = "Cached IP: {$cacheIP} WAN IP: {$wan_ip} "; + if (($currentTime - $cacheTime) > $time ) { $needs_updating = TRUE; - if ($initial == TRUE) + } + $update_reason .= "{$currentTime} - {$cacheTime} > {$time} "; + if ($initial == TRUE) { $needs_updating = TRUE; - - /* finally if we need updating then store the - new cache value and return true */ + $update_reason .= "Inital update. "; + } + /* finally if we need updating then store the + * new cache value and return true + */ if($needs_updating == TRUE) { /* Write WAN IP to cache file */ $file = fopen($this->_cacheFile, 'w'); @@ -509,10 +511,11 @@ } else { return FALSE; } - + + log_error("DynDns debug information: {$update_reason}"); + } - /* * Private Funcation (added 16 July 05) [beta] * - Writes debug information to a file. @@ -528,4 +531,4 @@ } -?> +?>
\ No newline at end of file |