X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCron.pm;h=8fb0f4664489609be8a6f3f56c584d6b6956d1fd;hb=575db552c5a635ce2eb431de07f568113374735f;hp=94c1cad0450573d6399a08fdc5ab3c4c9c57515b;hpb=a3fd9341b7ce57dcc058b82cfba3f40f15631241;p=spider.git diff --git a/perl/DXCron.pm b/perl/DXCron.pm index 94c1cad0..8fb0f466 100644 --- a/perl/DXCron.pm +++ b/perl/DXCron.pm @@ -12,8 +12,7 @@ use DXVars; use DXUtil; use DXM; use DXDebug; -use FileHandle; -use Carp; +use IO::File; use strict; @@ -58,7 +57,7 @@ sub init sub cread { my $fn = shift; - my $fh = new FileHandle; + my $fh = new IO::File; my $line = 0; dbg('cron', "cron: reading $fn\n"); @@ -234,6 +233,11 @@ sub start_connect my $call = uc shift; my $lccall = lc $call; + if (grep {$_->{call} eq $call} @main::outstanding_connects) { + dbg('cron', "Connect not started, outstanding connect to $call"); + return; + } + my $prog = "$main::root/local/client.pl"; $prog = "$main::root/perl/client.pl" if ! -e $prog; @@ -295,7 +299,7 @@ sub rcmd return if !$noderef || !$noderef->pcversion; # send it - DXProt::addrcmd($main::mycall, $call, $line); + DXProt::addrcmd($DXProt::me, $call, $line); } 1; __END__