projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Limit depth of recursion for route finding
[spider.git]
/
perl
/
Route.pm
diff --git
a/perl/Route.pm
b/perl/Route.pm
index 868317a9646234b9093a2598048a3a795f71e8d3..769aefe8c01525e2d576540deb150432459bbbbd 100644
(file)
--- a/
perl/Route.pm
+++ b/
perl/Route.pm
@@
-295,8
+295,12
@@
sub findroutes
dbg("findroutes: $call level: $level calls: " . join(',', @_)) if isdbg('routec');
dbg("findroutes: $call level: $level calls: " . join(',', @_)) if isdbg('routec');
- # recursion detector
+ # recursion detector
(no point in recursing that deeply)
return () if $seen->{$call};
return () if $seen->{$call};
+ if ($level >= 20) {
+ dbg("Route::findroutes: recursion limit reached looking for $call");
+ return ();
+ }
# return immediately if we are directly connected
if (my $dxchan = DXChannel::get($call)) {
# return immediately if we are directly connected
if (my $dxchan = DXChannel::get($call)) {