X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Finit.pl;h=5329780370e7302a2ff15f492fc38c5407a6f30c;hb=eac4538f1f78b3d014539dc548fc6322e8337429;hp=fd3c045b26771e2c4b36155048bc51b49536c1df;hpb=f155969d600561b9ef151a7ce2494a0c89aed033;p=spider.git diff --git a/cmd/init.pl b/cmd/init.pl index fd3c045b..53297803 100644 --- a/cmd/init.pl +++ b/cmd/init.pl @@ -1,9 +1,9 @@ # -# reinit a cluster connection +# init a cluster connection # # Copyright (c) 1999 Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; my @calls = split /\s+/, $line; @@ -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_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 $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);