From: minima Date: Fri, 8 Jun 2001 20:19:33 +0000 (+0000) Subject: some fixed X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3517495c96b980bf3b9364ae2b218505b2b40582;p=spider.git some fixed --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index f4c932a8..e33488cc 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -642,6 +642,8 @@ sub normal $node->flags(Route::here($here)|Route::conf($conf)); push @rout, $node; } elsif ($node->call ne $call) { + next if $call eq $main::mycall || $call eq $self->{call}; + my $r = $node->add($call, $ver, Route::here($here)|Route::conf($conf)); push @rout, $r if $r; } @@ -1691,7 +1693,7 @@ sub send_route $routeit = adjust_hops($self, $line); # adjust its hop count by node name next unless $routeit; } - $self->send($routeit) unless $self->{isolate} || $self->{isolate}; + $self->send($routeit); } } } diff --git a/perl/Route.pm b/perl/Route.pm index 3f940426..0150d5bf 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -232,18 +232,21 @@ sub get sub alldxchan { my $self = shift; - + my @dxchan; my $dxchan = DXChannel->get($self->{call}); - if ($dxchan) { - return (grep $dxchan == $_, @_) ? () : ($dxchan); - } + push @dxchan, $dxchan if $dxchan; # it isn't, build up a list of dxchannels and possible ping times # for all the candidates. - my @dxchan = @_; foreach my $p (@{$self->{parent}}) { - my $ref = $self->get($p); - push @dxchan, $ref->alldxchan(@dxchan) if $ref; + my $dxchan = DXChannel->get($p); + if ($dxchan) { + push @dxchan, $dxchan if grep $dxchan ne $_, @dxchan; + } else { + next if $p eq $main::mycall; # the root + my $ref = $self->get($p); + push @dxchan, $ref->alldxchan if $ref; + } } return @dxchan; } @@ -251,7 +254,9 @@ sub alldxchan sub dxchan { my $self = shift; - my $dxchan; + my $dxchan = DXChannel->get($self->{call}); + return $dxchan = $dxchan; + my @dxchan = $self->alldxchan; return undef unless @dxchan;