mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
try to stop Route::findroutes recursing too much
This commit is contained in:
parent
0bf3741541
commit
a2b44b1c0d
@ -305,9 +305,11 @@ sub findroutes
|
||||
# deal with more nodes
|
||||
my $nref = Route::get($call);
|
||||
foreach my $ncall (@{$nref->{parent}}) {
|
||||
dbg("recursing from $call -> $ncall") if isdbg('routec');
|
||||
my @rout = findroutes($ncall, $level+1, $seen);
|
||||
push @out, @rout;
|
||||
unless ($seen->{$ncall}) {
|
||||
dbg("recursing from $call -> $ncall") if isdbg('routec');
|
||||
my @rout = findroutes($ncall, $level+1, $seen);
|
||||
push @out, @rout;
|
||||
}
|
||||
}
|
||||
|
||||
return $level == 0 ? map {$_->[1]} sort {$a->[0] <=> $b->[0]} @out : @out;
|
||||
|
@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
|
||||
|
||||
$version = '1.54';
|
||||
$subversion = '0';
|
||||
$build = '73';
|
||||
$build = '74';
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user