projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
125670d
)
fix indirect routing to users 2 or more hops away
author
minima
<minima>
Sun, 10 Jun 2001 12:26:35 +0000
(12:26 +0000)
committer
minima
<minima>
Sun, 10 Jun 2001 12:26:35 +0000
(12:26 +0000)
Changes
patch
|
blob
|
history
perl/Route.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 9b102bba06debe228e248b97df659efb3f70c4c3..0282bb591b3a7b64ade690b4921eca491ff51d67 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,6
@@
10Jun01=======================================================================
1. fix set/here and unset/here
10Jun01=======================================================================
1. fix set/here and unset/here
+2. fix indirect routing to users two hops away
09Jun01=======================================================================
1. more fixes
2. add set/debug filter so that you can see why your filters aren't working
09Jun01=======================================================================
1. more fixes
2. add set/debug filter so that you can see why your filters aren't working
diff --git
a/perl/Route.pm
b/perl/Route.pm
index 521068b023cba2c2e1358140f549d667d8b1d0c9..d76cad19436e944e6ba815092d37f86a6069000f 100644
(file)
--- a/
perl/Route.pm
+++ b/
perl/Route.pm
@@
-217,7
+217,7
@@
sub config
if ($nref) {
my $c = $nref->user_call;
if ($nref) {
my $c = $nref->user_call;
-
dbg('routec', "recursing from $call -> $c");
+
#
dbg('routec', "recursing from $call -> $c");
push @out, $nref->config($nodes_only, $level+1, $seen, @_);
} else {
push @out, ' ' x (($level+1)*2) . "$ncall?" if @_ == 0 || (@_ && grep $ncall =~ m|$_|, @_);
push @out, $nref->config($nodes_only, $level+1, $seen, @_);
} else {
push @out, ' ' x (($level+1)*2) . "$ncall?" if @_ == 0 || (@_ && grep $ncall =~ m|$_|, @_);
@@
-253,35
+253,40
@@
sub alldxchan
{
my $self = shift;
my @dxchan;
{
my $self = shift;
my @dxchan;
+# dbg('routech', "Trying node $self->{call}");
my $dxchan = DXChannel->get($self->{call});
push @dxchan, $dxchan if $dxchan;
# it isn't, build up a list of dxchannels and possible ping times
# for all the candidates.
my $dxchan = DXChannel->get($self->{call});
push @dxchan, $dxchan if $dxchan;
# it isn't, build up a list of dxchannels and possible ping times
# for all the candidates.
- foreach my $p (@{$self->{parent}}) {
- my $dxchan = DXChannel->get($p);
- if ($dxchan) {
- push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan;
- } else {
+ unless (@dxchan) {
+ foreach my $p (@{$self->{parent}}) {
+# dbg('routech', "Trying parent $p");
next if $p eq $main::mycall; # the root
next if $p eq $main::mycall; # the root
- my $ref = $self->get($p);
- push @dxchan, $ref->alldxchan if $ref;
+ my $dxchan = DXChannel->get($p);
+ if ($dxchan) {
+ push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan;
+ } else {
+ next if grep $p eq $_, @_;
+ my $ref = Route::Node::get($p);
+# dbg('routech', "Next node $p " . ($ref ? 'Found' : 'NOT Found') );
+ push @dxchan, $ref->alldxchan($self->{call}, @_) if $ref;
+ }
}
}
}
}
+# dbg('routech', "Got dxchan: " . join(',', (map{ $_->call } @dxchan)) );
return @dxchan;
}
sub dxchan
{
my $self = shift;
return @dxchan;
}
sub dxchan
{
my $self = shift;
- my $dxchan = DXChannel->get($self->{call});
- return $dxchan if $dxchan;
-
my @dxchan = $self->alldxchan;
return undef unless @dxchan;
# determine the minimum ping channel
my $minping = 99999999;
my @dxchan = $self->alldxchan;
return undef unless @dxchan;
# determine the minimum ping channel
my $minping = 99999999;
+ my $dxchan;
foreach my $dxc (@dxchan) {
my $p = $dxc->pingave;
if (defined $p && $p < $minping) {
foreach my $dxc (@dxchan) {
my $p = $dxc->pingave;
if (defined $p && $p < $minping) {