This involves making sure that all the external nodes get fixed
up even though their parent node does not yet exist (because no
config record has come in. It is safe to create these, in
anticipation of the C record coming in somewhen.
In the process of this, obscount reseting now happens much more
frequently (which I hope means correctly).
Allow Route::findroutes to find routes to these disconnected
nodes that are in the routing table but have no parent that is
yet anchored to a dxchan. Simply remember the dxchan that that
C record came in on. It doesn't matter if it gets overwritten by
another node, if it came in that way, there must be a route.
In any case, chances are, the first dxchan to get the C record
is the best and the deduping will (mostly) prevent it being
overwritten. When the linking C record comes in, it is all
irrelevant anyway...
+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
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)) {
# 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);
}
$parent = check_pc9x_t($call, $t, 92) || return;
$parent->via_pc92(1);
# we only reset obscounts on config records
$oparent->reset_obs;
# 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;
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');
}
dbg("ROUTE: reset obscount on $parent->{call} now " . $parent->obscount) if isdbg('obscount');
}
$pcall .= ":" . $self->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
$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
}
# 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',
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;
);
$filterdef = $Route::filterdef;
$version = '1.54';
$subversion = '0';
$version = '1.54';
$subversion = '0';