some fixed
authorminima <minima>
Fri, 8 Jun 2001 20:19:33 +0000 (20:19 +0000)
committerminima <minima>
Fri, 8 Jun 2001 20:19:33 +0000 (20:19 +0000)
perl/DXProt.pm
perl/Route.pm

index f4c932a81cfe35847ab354fa79c0a4b4b4174de9..e33488ccaf9942c5cdca015e66e0ff74f936078a 100644 (file)
@@ -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);
                }
        }
 }
index 3f940426f4068ffb1e7242de41765eff645b5125..0150d5bfd3b92b7c7d3cf8c391ce30ca1f089756 100644 (file)
@@ -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;