Commit 5b9d5d45 authored by Ad Schellevis's avatar Ad Schellevis

fix merge

parent 9921aeaf
......@@ -1217,7 +1217,6 @@
if($successful_update == true) {
/* Write WAN IP to cache file */
$wan_ip = $this->_checkIP();
conf_mount_rw();
if ($this->_useIPv6 == false && $wan_ip > 0) {
$currentTime = time();
notify_all_remote(sprintf(gettext("DynDNS updated IP Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip));
......@@ -1232,7 +1231,6 @@
@file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}");
} else
@unlink($this->_cacheFile_v6);
conf_mount_ro();
}
$this->status = $status;
log_error($status);
......@@ -1307,10 +1305,8 @@
$initial = false;
$log_error .= "Cached IPv6: {$cacheIP} ";
} else {
conf_mount_rw();
$cacheIP = '::';
@file_put_contents($this->_cacheFile, "::|{$currentTime}");
conf_mount_ro();
$cacheTime = $currentTime;
$initial = true;
$log_error .= "No Cached IPv6 found.";
......@@ -1323,10 +1319,8 @@
$initial = false;
$log_error .= "Cached IP: {$cacheIP} ";
} else {
conf_mount_rw();
$cacheIP = '0.0.0.0';
@file_put_contents($this->_cacheFile, "0.0.0.0:{$currentTime}");
conf_mount_ro();
$cacheTime = $currentTime;
$initial = true;
$log_error .= "No Cached IP found.";
......@@ -1376,11 +1370,9 @@
*/
function _debug($data) {
$string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data."\n";
conf_mount_rw();
$file = fopen($this->_debugFile, 'a');
fwrite($file, $string);
fclose($file);
conf_mount_ro();
}
function _checkIP() {
if ($this->_useIPv6 == true) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment