X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Finit.pl;h=b508a04acaed2a76d853ac5f4e80c9b6fe3f7482;hb=a0c3717faf81e3b6bd62d9f4e8d4568f46067ed7;hp=36309e93ab6408d878c99c7bc58fde10adcc3e18;hpb=118cbdbcf7e06d022a3030670c0e70b05bd8c5b3;p=spider.git diff --git a/cmd/init.pl b/cmd/init.pl index 36309e93..b508a04a 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 # @@ -15,19 +15,13 @@ return (1, $self->msg('e5')) if $self->priv < 5; foreach $call (@calls) { $call = uc $call; next if $call eq $main::mycall; - my $dxchan = DXChannel->get($call); + 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 = map { $_->dxchan == $dxchan ? $_ : () } DXNode::get_all(); - foreach my $node (@gonenodes) { - next if $node->dxchan == $DXProt::me; - next if $node->dxchan == $dxchan; - DXProt::broadcast_ak1a(DXProt::pc21($node->call, 'Gone, re-init') , $dxchan) unless $dxchan->{isolate}; - $node->del(); - } - $dxchan->send(DXProt::pc38()); + my $parent = Route::Node::get($call); + my @rout = $parent->del_nodes; + $dxchan->route_pc21(undef, $self, @rout) if @rout; $dxchan->send(DXProt::pc18()); $dxchan->state('init'); push @out, $self->msg('init1', $call);