From 295808a563e971b5f67be3e3d6850da8841d09d0 Mon Sep 17 00:00:00 2001 From: dms Date: Thu, 23 Nov 2000 14:22:24 +0000 Subject: [PATCH] debug messages removed git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@165 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Misc.pl | 6 ++---- src/Net.pl | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Misc.pl b/src/Misc.pl index b75fd7e..43d4cf2 100644 --- a/src/Misc.pl +++ b/src/Misc.pl @@ -406,12 +406,10 @@ sub IsHostMatch { sub isStale { my ($file, $age) = @_; - &DEBUG("isStale: $file does not exist") unless ( -f $file); return 1 unless ( -f $file); return 1 if (time() - (stat($file))[9] > $age*60*60*24); my $delta = time() - (stat($file))[9]; my $hage = $age*60*60*24; - &DEBUG("isStale: not stale! $delta < $hage"); return 0; } @@ -601,8 +599,8 @@ sub Forker { if (&IsParam("forking") and $$ == $bot_pid) { return $noreply unless (&addForked($label)); $SIG{CHLD} = 'IGNORE'; - $pid = eval { fork() }; # catch non-forking OSes and other errors - return $noreply if $pid; # parent does nothing + $pid = eval { fork() }; + return $noreply if $pid; # parent does nothing &status("fork starting for '$label', PID == $$."); } diff --git a/src/Net.pl b/src/Net.pl index 5a4f0a5..fb1959c 100644 --- a/src/Net.pl +++ b/src/Net.pl @@ -50,7 +50,7 @@ sub ftpGet { if ($size = $ftp->size($file)) { &status("FTP: file size is $size") if ($verbose_ftp); my $thisfile = $file || $lfile; - &DEBUG("lfile => '$lfile'."); + if ( -f $thisfile) { $lsize = -s $thisfile; if ($_ != $lsize) { @@ -76,7 +76,7 @@ sub ftpGet { &status("FTP: getting $file.") if ($verbose_ftp); $ftp->get($file); } - &DEBUG("FTP: remsize => '$size'."); + if (defined $lsize) { &DEBUG("FTP: locsize => '$lsize'."); if ($size != $lsize) { -- 2.39.2