X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=2c94dcc1cb619571baef325fe4607071c453bb1c;hb=958cc95d51be017e52ec888f9b8629d2c61cbcc2;hp=50e860d29d57899df6289f50b4036e2f1b14f911;hpb=d7b9494c9717fe1f8309355c428966e951a187b5;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 50e860d2..2c94dcc1 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -83,7 +83,7 @@ $systime = 0; # the time now (in seconds) $version = "1.47"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name -@outstanding_connects = (); # list of outstanding connects +#@outstanding_connects = (); # list of outstanding connects @listeners = (); # list of listeners @@ -128,7 +128,7 @@ sub rec # is there one already connected to me - locally? my $user = DXUser->get($call); - if (DXChannel->get($call)) { + if ($sort ne 'O' && Msg->conns($call)) { my $mess = DXM::msg($lang, ($user && $user->is_node) ? 'concluster' : 'conother', $call, $main::mycall); already_conn($conn, $call, $mess); return; @@ -159,10 +159,13 @@ sub rec if ($user->lockout) { Log('DXCommand', "$call is locked out, disconnected"); $conn->send_now("Z$call|bye"); # this will cause 'client' to disconnect - $conn->disconect; + $conn->disconnect; return; } + # mark him up + $conn->conns($call) unless $sort eq 'O'; + # create the channel $dxchan = DXCommandmode->new($call, $conn, $user) if $user->is_user; $dxchan = DXProt->new($call, $conn, $user) if $user->is_node; @@ -244,7 +247,7 @@ sub reap my $cpid; while (($cpid = waitpid(-1, WNOHANG)) > 0) { dbg('reap', "cpid: $cpid"); - @outstanding_connects = grep {$_->{pid} != $cpid} @outstanding_connects; +# Msg->pid_gone($cpid); $zombies-- if $zombies > 0; } dbg('reap', "cpid: $cpid");