+sub pc92_handle_first_slot
+{
+ my $self = shift;
+ my $slot = shift;
+ my $parent = shift;
+ my $t = shift;
+ my $oparent = $parent;
+
+ my @radd;
+
+ my ($call, $is_node, $is_extnode, $here, $version, $build) = @$slot;
+ if ($call && $is_node) {
+ if ($call eq $main::mycall) {
+ dbg("PCPROT: $call looped back onto $main::mycall, ignored") if isdbg('chanerr');
+ return;
+ }
+ # this is only accepted from my "self".
+ # this also kills configs from PC92 nodes with external PC19 nodes that are also
+ # locally connected. Local nodes always take precedence. But we remember the lastid
+ # to try to reduce the number of dupe PC92s for this external node.
+ if (DXChannel::get($call) && $call ne $self->{call}) {
+ $parent = check_pc9x_t($call, $t, 92); # this will update the lastid time
+ dbg("PCPROT: locally connected node $call from other another node $self->{call}, 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)) {
+ if ($is_extnode && $oparent) {
+ @radd = _add_thingy($oparent, $slot);
+ $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->PC92C_dxchan($self->{call});
+ }
+ } else {
+ dbg("PCPROT: must be \$mycall or external node as first entry, ignored") if isdbg('chanerr');
+ return;
+ }
+ $parent->here(Route::here($here));
+ $parent->version($version || $pc19_version) if $version;
+ $parent->build($build) if $build && $build > $parent->build;
+ $parent->PC92C_dxchan($self->{call}) unless $self->{call} eq $parent->call;
+ return ($parent, @radd);
+}
+