try to stop Route::findroutes recursing too much

This commit is contained in:
Dirk Koopman 2007-06-23 23:50:10 +01:00
parent 0bf3741541
commit a2b44b1c0d
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
$version = '1.54';
$subversion = '0';
$build = '73';
$build = '74';
1;