X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Finit.pl;h=2d0a38fc867185f9be2e65267ecdf99e835a3e0f;hb=b058e19bd142b9ee39fab9e790852959d6244b77;hp=0107f91645aa7d1ec3054e14d03b694c04c0fcfa;hpb=7c1e8be08db2526caaa1c1bb7905548841b696e2;p=spider.git diff --git a/cmd/init.pl b/cmd/init.pl index 0107f916..2d0a38fc 100644 --- a/cmd/init.pl +++ b/cmd/init.pl @@ -1,5 +1,5 @@ # -# reinit a cluster connection +# init a cluster connection # # Copyright (c) 1999 Dirk Koopman G1TLH # @@ -17,17 +17,12 @@ foreach $call (@calls) { next if $call eq $main::mycall; my $dxchan = DXChannel->get($call); if ($dxchan) { - if ($dxchan->is_ak1a) { + if ($dxchan->is_node) { # first clear out any nodes on this dxchannel - my @gonenodes = grep { $_->dxchan == $dxchan } DXNode::get_all(); - foreach my $node (@gonenodes) { - next if $node->dxchan == $DXProt::me; - next unless $node->dxchan == $dxchan; - DXProt::broadcast_ak1a(DXProt::pc21($node->call, 'Gone, re-init') , $dxchan) unless $dxchan->{isolate}; - $node->del(); - } - $dxchan->send(DXProt::pc38()); + my $node = Route::Node::get($self->{call}); + my @rout = $node->del_nodes if $node; + DXProt::route_pc21($self, @rout); $dxchan->send(DXProt::pc18()); $dxchan->state('init'); push @out, $self->msg('init1', $call);