mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 15:57:12 +00:00
allow users of next door nodes to override search
This commit is contained in:
parent
c1540ccd79
commit
c8e15fc700
@ -291,12 +291,11 @@ sub findroutes
|
|||||||
my $call = shift;
|
my $call = shift;
|
||||||
my @out;
|
my @out;
|
||||||
|
|
||||||
dbg("ROUTE: findroutes: $call") if isdbg('findroutes');
|
dbg("ROUTE: findroutes $call") if isdbg('findroutes');
|
||||||
|
|
||||||
# return immediately if we are directly connected
|
# return immediately if we are directly connected
|
||||||
if (my $dxchan = DXChannel::get($call)) {
|
my $dxchan = DXChannel::get($call);
|
||||||
return $dxchan;
|
return $dxchan if $dxchan;
|
||||||
}
|
|
||||||
|
|
||||||
my $nref = Route::get($call);
|
my $nref = Route::get($call);
|
||||||
return () unless $nref;
|
return () unless $nref;
|
||||||
@ -305,6 +304,10 @@ sub findroutes
|
|||||||
my @parent = $nref->isa('Route::User') ? @{$nref->{parent}} : $call;
|
my @parent = $nref->isa('Route::User') ? @{$nref->{parent}} : $call;
|
||||||
my %cand;
|
my %cand;
|
||||||
foreach my $p (@parent) {
|
foreach my $p (@parent) {
|
||||||
|
# return immediately if we are directly connected or a user's parent node is
|
||||||
|
$dxchan = DXChannel::get($p);
|
||||||
|
return $dxchan if $dxchan;
|
||||||
|
|
||||||
my $r = Route::Node::get($p);
|
my $r = Route::Node::get($p);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
my %r = $r->PC92C_dxchan;
|
my %r = $r->PC92C_dxchan;
|
||||||
@ -326,7 +329,7 @@ sub findroutes
|
|||||||
if (isdbg('findroutes')) {
|
if (isdbg('findroutes')) {
|
||||||
if (@out) {
|
if (@out) {
|
||||||
foreach (sort {$b->[0] <=> $a->[0]} @out) {
|
foreach (sort {$b->[0] <=> $a->[0]} @out) {
|
||||||
dbg("ROUTE: findroute $call -> $_->[0] " . $_->[1]->call);
|
dbg("ROUTE: findroutes $call -> $_->[0] " . $_->[1]->call);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
|
|||||||
|
|
||||||
$version = '1.55';
|
$version = '1.55';
|
||||||
$subversion = '0';
|
$subversion = '0';
|
||||||
$build = '14';
|
$build = '15';
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user