From: minima Date: Wed, 13 Jun 2001 11:24:40 +0000 (+0000) Subject: fix init and rinit stuff X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d4486dbbd2c0d758629b28a1a6e3b2f16c4bfb5;p=spider.git fix init and rinit stuff --- diff --git a/Changes b/Changes index 0282bb59..d359471a 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +13Jun01======================================================================= +1. fix init cnd rinit cmds 10Jun01======================================================================= 1. fix set/here and unset/here 2. fix indirect routing to users two hops away diff --git a/cmd/init.pl b/cmd/init.pl index 2d0a38fc..7f5896f4 100644 --- a/cmd/init.pl +++ b/cmd/init.pl @@ -18,11 +18,10 @@ foreach $call (@calls) { my $dxchan = DXChannel->get($call); if ($dxchan) { if ($dxchan->is_node) { - # first clear out any nodes on this dxchannel - my $node = Route::Node::get($self->{call}); - my @rout = $node->del_nodes if $node; - DXProt::route_pc21($self, @rout); + my $parent = Route::Node::get($call); + my @rout = $parent->del_nodes; + $dxchan->route_pc21($self, @rout) if @rout; $dxchan->send(DXProt::pc18()); $dxchan->state('init'); push @out, $self->msg('init1', $call); diff --git a/cmd/rinit.pl b/cmd/rinit.pl index b49b2dbe..953a30a9 100644 --- a/cmd/rinit.pl +++ b/cmd/rinit.pl @@ -18,13 +18,10 @@ foreach $call (@calls) { my $dxchan = DXChannel->get($call); if ($dxchan) { if ($dxchan->is_node) { - - # first clear out any nodes on this dxchannel - my $node = Route::Node::get($self->{call}); - my @rout = $node->del_nodes if $node; - DXProt::route_pc21($self, @rout); - $dxchan->send(DXProt::pc20()); + my $parent = Route::Node::get($call); $dxchan->state('init'); + $dxchan->send_local_config; + $dxchan->send(DXProt::pc20()); push @out, $self->msg('init1', $call); } } else { diff --git a/perl/DXProt.pm b/perl/DXProt.pm index dfb571b2..fc08f542 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -610,11 +610,7 @@ sub normal # first clear out any nodes on this dxchannel my $parent = Route::Node::get($self->{call}); - my @rout; - for ($parent->nodes) { - my $r = Route::Node::get($_); - push @rout, $r->del_node if $r; - } + my @rout = $parent->del_nodes; $self->route_pc21(@rout, $parent); $self->send_local_config(); $self->send(pc20());