X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=1af0388a3449ed82a9bfdeb7a370f4579505e3a8;hb=d9db74c1b2b9b57cb6d31e8c8c425f3636f62f87;hp=290838f40557838a3f772c19c7aaf029a9b2bb7b;hpb=d99e357e5203c7742b57c51b7c2dd103c1836c01;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 290838f4..1af0388a 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -67,7 +67,7 @@ package main; @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) -$version = "1.29"; # the version no of the software +$version = "1.30"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name @@ -174,8 +174,22 @@ sub cease Local::finish(); # end local processing }; dbg('local', "Local::finish error $@") if $@; - + + # disconnect users + foreach $dxchan (DXChannel->get_all()) { + next if $dxchan->is_ak1a; + disconnect($dxchan) unless $dxchan == $DXProt::me; + } + Msg->event_loop(1, 0.05); + Msg->event_loop(1, 0.05); + Msg->event_loop(1, 0.05); + Msg->event_loop(1, 0.05); + Msg->event_loop(1, 0.05); + Msg->event_loop(1, 0.05); + + # disconnect nodes foreach $dxchan (DXChannel->get_all()) { + next unless $dxchan->is_ak1a; disconnect($dxchan) unless $dxchan == $DXProt::me; } Msg->event_loop(1, 0.05); @@ -216,7 +230,7 @@ sub process_inqueue my $data = $self->{data}; my $dxchan = $self->{dxchan}; - my ($sort, $call, $line) = $data =~ /^(\w)(\S+)\|(.*)$/; + my ($sort, $call, $line) = $data =~ /^(\w)([A-Z0-9\-]+)\|(.*)$/; # the above regexp must work return unless ($sort && $call && $line); @@ -270,6 +284,7 @@ sub uptime $starttime = $systime = time; # open the debug file, set various FHs to be unbuffered +dbginit(); foreach (@debug) { dbgadd($_); } @@ -359,6 +374,7 @@ for (;;) { DXCommandmode::process(); # process ongoing command mode stuff DXProt::process(); # process ongoing ak1a pcxx stuff DXConnect::process(); + DXMsg::process(); eval { Local::process(); # do any localised processing };