1. first cut with new routing code. Created NEW_ROUTE branch
[spider.git] / cmd / init.pl
index b88ed013352bcb4d0c396917332ad09a5a507b58..2d0a38fc867185f9be2e65267ecdf99e835a3e0f 100644 (file)
@@ -20,14 +20,9 @@ foreach $call (@calls) {
                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);