summaryrefslogtreecommitdiffstats
path: root/etc/inc/dyndns.class
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-05 23:28:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-05 23:28:31 +0000
commit44318b562757b5a0207eeee612b14456ca29c340 (patch)
tree237b1246839fe4eaeb14299db7d883cdb15808e8 /etc/inc/dyndns.class
parent458d80d7e1712544701fc78b87077e4cd62ff761 (diff)
downloadpfsense-44318b562757b5a0207eeee612b14456ca29c340.zip
pfsense-44318b562757b5a0207eeee612b14456ca29c340.tar.gz
MFC 7397
Added curl_error output to logs if there is an error created by curl
Diffstat (limited to 'etc/inc/dyndns.class')
-rw-r--r--etc/inc/dyndns.class11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 7be0c9c..e05a4ed 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -127,7 +127,8 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, 'https://members.dyndns.org/nic/update?hostname='.$this->_dnsHost.'&myip='.$this->_dnsIP.'&wildcard='.$this->_dnsWildcard.'&mx='.$this->_dnsMX.'&backmx=NO');
$data = curl_exec($ch);
-\ curl_close($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
+ curl_close($ch);
$this->_checkStatus($data);
break;
case 'dyndns-static':
@@ -136,6 +137,7 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, 'https://members.dyndns.org/nic/update?system=statdns&hostname='.$this->_dnsHost.'&myip='.$this->_dnsIP.'&wildcard='.$this->_dnsWildcard.'&mx='.$this->_dnsMX.'&backmx=NO');
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -145,6 +147,7 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, 'https://members.dyndns.org/nic/update?system=custom&hostname='.$this->_dnsHost.'&myip='.$this->_dnsIP.'&wildcard='.$this->_dnsWildcard.'&mx='.$this->_dnsMX.'&backmx=NO');
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -169,6 +172,7 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -177,6 +181,7 @@
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, 'http://dynupdate.no-ip.com/dns?username='.$this->_dnsUser.'&password='.$this->_dnsPass.'&hostname='.$this->_dnsHost.'&ip='.$this->_dnsIP);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -186,6 +191,7 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, 'http://members.easydns.com/dyn/dyndns.php?hostname='.$this->_dnsHost.'&myip='.$this->_dnsIP.'&wildcard='.$this->_dnsWildcard.'&mx='.$this->_dnsMX.'&backmx='.$this->_dnsBackMX);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -195,6 +201,7 @@
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, 'http://dup.hn.org/vanity/update?ver=1&IP='.$this->_dnsIP);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -203,6 +210,7 @@
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, 'https://dynamic.zoneedit.com/auth/dynamic.html?host='.$this->_dnsHost.'&dnsto='.$this->_dnsIP);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -210,6 +218,7 @@
$needsIP = FALSE;
curl_setopt($ch, CURLOPT_URL, 'http://www.dyns.cx/postscript011.php?username='.$this->_dnsUser.'&password='.$this->_dnsPass.'&host='.$this->_dnsHost);
$data = curl_exec($ch);
+ if (@curl_error($ch)) log_error($error = curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
OpenPOWER on IntegriCloud