Project

General

Profile

« Previous | Next » 

Revision dceff62e

Added by Ermal LUÇI about 14 years ago

Put some debug info during dyndns update under debug conditionals.

View differences:

etc/inc/dyndns.class
854 854
		 *      | work with other systems. pfSense base is FreeBSD.
855 855
		 */
856 856
		function _detectChange() {
857
			
858
			log_error("DynDns: _detectChange() starting.");
857
			global $debug;
858

  
859
			if ($debug)
860
				log_error("DynDns: _detectChange() starting.");
859 861
		
860 862
			$currentTime = time();
861 863

  
......
865 867
				return false;
866 868
			}
867 869
			$this->_dnsIP = $wan_ip;
868
			log_error("DynDns: Current WAN IP: {$wan_ip}");
870
			$log_error = "DynDns: Current WAN IP: {$wan_ip} ";
869 871

  
870 872
			if (file_exists($this->_cacheFile)) {
871 873
				$contents = file_get_contents($this->_cacheFile);
872 874
				list($cacheIP,$cacheTime) = split(':', $contents);
873 875
				$this->_debug($cacheIP.'/'.$cacheTime);
874 876
				$initial = false;
875
				log_error("DynDns: Cached IP: {$cacheIP}");
877
				$log_error .= "Cached IP: {$cacheIP} ";
876 878
			} else {
877 879
				conf_mount_rw();
878 880
				$cacheIP = '0.0.0.0';
......
880 882
				conf_mount_ro();
881 883
				$cacheTime = $currentTime;
882 884
				$initial = true;
883
				log_error("DynDns: No Cached IP found.");
885
				$log_error .= "No Cached IP found.";
884 886
			}
887
			log_error($log_error);
885 888

  
886 889
			/*   use 2419200 for dyndns, dhs, easydns, noip, hn
887 890
			 *   zoneedit, dyns, ods
......
931 934
			conf_mount_ro();
932 935
		}
933 936
		function _checkIP() {
937
			global $debug;
934 938

  
935
			log_error("DynDns: _checkIP() starting.");
939
			if ($debug)
940
				log_error("DynDns: _checkIP() starting.");
936 941

  
937 942
			$ip_address = find_interface_ip($this->_if);
938 943
			if (!is_ipaddr($ip_address))
etc/inc/services.inc
606 606
	/* load up the dyndns.class */
607 607
	require_once("dyndns.class");
608 608

  
609
	log_error("DynDns: Running updatedns()");
610

  
611 609
	$dns = new updatedns($dnsService = $conf['type'],
612 610
		$dnsHost = $conf['host'],
613 611
		$dnsUser = $conf['username'],

Also available in: Unified diff