+24Jun06=======================================================================
+1. Fix the routing algorithms to allow route selection in the face of
+incomplete trees of nodes (trees as produced by sh/newc).
+2. Fix the obscout issues which mean that many nodes get timed out after 3hrs.
23Jun06=======================================================================
1. fix basic deduping algorithm
2. rearrange node startup protocol to avoid issuing unnecessary PC92 and also
# reparent to external node (note that we must have received a 'C' or 'A' record
# from the true parent node for this external before we get one for the this node
unless ($parent = Route::Node::get($call)) {
- dbg("PCPROT: no previous C or A for this external node received, ignored") if isdbg('chanerr');
- return;
+ if ($is_extnode && $oparent) {
+ @radd = _add_thingy($oparent, $ent[0]);
+ $parent = $radd[0];
+ } else {
+ dbg("PCPROT: no previous C or A for this external node received, ignored") if isdbg('chanerr');
+ return;
+ }
}
$parent = check_pc9x_t($call, $t, 92) || return;
$parent->via_pc92(1);
# we only reset obscounts on config records
$oparent->reset_obs;
+ $oparent->PC92C_dxchan($self->{call}) unless $self->{call} eq $oparent->call;
dbg("ROUTE: reset obscount on $pcall now " . $oparent->obscount) if isdbg('obscount');
if ($oparent != $parent) {
$parent->reset_obs;
+ $parent->PC92C_dxchan($self->{call}) unless $self->{call} eq $parent->call;
dbg("ROUTE: reset obscount on $parent->{call} now " . $parent->obscount) if isdbg('obscount');
}
$pcall .= ":" . $self->obscount if isdbg('obscount');
- $line = ' ' x ($level*2) . "$pcall";
+ $line = ' ' x ($level*2) . $pcall;
$pcall = ' ' x length $pcall;
# recursion detector
}
}
- return $level == 0 ? map {$_->[1]} sort {$a->[0] <=> $b->[0]} @out : @out;
+ if ($level == 0) {
+ my @nout = map {$_->[1]} sort {$a->[0] <=> $b->[0]} @out;
+ my $last;
+ if ($nref->isa('Route::Node')) {
+ my $ncall = $nref->PC92C_dxchan;
+ $last = DXChannel::get($ncall) if $ncall;
+ } else {
+ my $pcall = $nref->{parent}->[0];
+ my ($ref, $ncall);
+ $ref = Route::Node::get($pcall) if $pcall;
+ $ncall = $ref->PC92C_dxchan if $ref;
+ $last = DXChannel::get($ncall) if $ncall;
+ }
+
+ if (isdbg('findroutes')) {
+ if (@out) {
+ foreach (sort {$a->[0] <=> $b->[0]} @out) {
+ dbg("ROUTE: findroute $call -> $_->[0] " . $_->[1]->call);
+ }
+ } else {
+ dbg("ROUTE: findroute $call -> PC92C_dxchan " . $last->call) if $last;
+ }
+ }
+ push @nout, $last if @out == 0 && $last;
+ return @nout;
+ } else {
+ return @out;
+ }
}
# find all the possible dxchannels which this object might be on
via_pc92 => '0,Came in via pc92,yesno',
obscount => '0,Obscount',
last_PC92C => '9,Last PC92C',
+ PC92C_dxchan => '9,Channel of PC92C',
);
$filterdef = $Route::filterdef;
$version = '1.54';
$subversion = '0';
-$build = '84';
+$build = '85';
1;