From: minima Date: Thu, 14 Jun 2001 23:01:24 +0000 (+0000) Subject: improve instability X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=d16eece598396e77e2ddc5a55dd9e44eef5b3fee;p=spider.git improve instability --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3767145c..f4074ade 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -651,8 +651,10 @@ sub normal if ($r) { my $ar; if ($call ne $parent->call) { - $ar = $parent->add($r); - push @rout, $ar if $ar; + if ($self->in_filter_route($r)) { + $ar = $parent->add($r); + push @rout, $ar if $ar; + } } if ($r->version ne $ver || $r->flags != $flags) { $r->version($ver); @@ -662,12 +664,10 @@ sub normal } else { next if $call eq $main::mycall || $call eq $self->{call}; - my $new = $parent->new($call, $ver, Route::here($here)|Route::conf($conf)); + my $new = Route->new($call); # throw away if ($self->in_filter_route($new)) { - $parent->add($new); - push @rout, $new; - } else { - $new->del($parent); + my $r = $parent->add($call, $ver, $flags); + push @rout, $r; } } @@ -1792,7 +1792,7 @@ sub broadcast_route foreach $dxchan (@dxchan) { next if $dxchan == $self; next if $dxchan == $me; - if ($self->{routefilter} || !$self->{isolate}) { + if ($dxchan->{routefilter} || !$self->{isolate}) { $dxchan->send_route($generate, @_) } else { dbg('DXPROT: isolated') if isdbg('chanerr'); diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index 4bb4c9ca..51ecedea 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -56,24 +56,14 @@ sub max sub add { my $parent = shift; - my $call = shift; - my $self; - - if (ref $call) { - $self = $call; - $call = $self->{call}; - } else { - $self = get($call); - } - - confess "Trying to add NULL Node call to routing tables" unless $call; - + my $call = uc shift; + confess "Route::add trying to add $call to myself" if $call eq $parent->{call}; + my $self = get($call); if ($self) { $self->_addparent($parent->{call}); $parent->_addnode($call); return undef; } - confess "Route::Node::add trying to add $call to myself" if $call eq $parent->{call}; $parent->_addnode($call); $self = $parent->new($call, @_); return $self;