- my $parent = Route::Node::get($pcall);
- if ($parent) {
- my $lastid = $parent->lastid->{92} || 0;
- if ($lastid > $t) {
- dbg("PCPROT: dup / old id <= $lastid, ignored") if isdbg('chanerr');
+ my $parent = check_pc9x_t($pcall, $t, 92, 1) || return;
+
+ $parent->lastid->{92} = $t;
+ $parent->do_pc92(1);
+
+ if (@ent) {
+
+ # look at the first one which will always be a node of some sort
+ # and update any information that needs to be done.
+ my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($ent[0]);
+ if ($call && $is_node) {
+ if ($call eq $main::mycall) {
+ dbg("PCPROT: looped back on node entry, ignored") if isdbg('chanerr');
+ return;
+ }
+ if ($is_extnode) {
+ # 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;
+ }
+ my $parent = check_pc9x_t($call, $t, 92) || return;
+ }
+ } else {
+ dbg("PCPROT: must be mycall or external node as first entry, ignored") if isdbg('chanerr');