summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-07 21:23:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-07 21:23:00 +0000
commit0c7b834e31d6160d434e806fcc468b2f0401b36d (patch)
tree225ff1fbf28ee74ab7a1a0c5d3236bfd3c30c168 /etc
parentea7b1502f376e80a23bb3a484fb6b6e31a98ce4a (diff)
downloadpfsense-0c7b834e31d6160d434e806fcc468b2f0401b36d.zip
pfsense-0c7b834e31d6160d434e806fcc468b2f0401b36d.tar.gz
Log CURL errors correctly
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/dyndns.class20
1 files changed, 10 insertions, 10 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 31b4836..1c881cc 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -126,7 +126,7 @@
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);
- if (@curl_error($ch)) log_error($error = curl_error($ch));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -136,7 +136,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -146,7 +146,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -171,7 +171,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -180,7 +180,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -190,7 +190,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -200,7 +200,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -209,7 +209,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -217,7 +217,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));
+ if (@curl_error($ch)) log_error("Curl errror occured: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
break;
@@ -562,4 +562,4 @@
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud