{
my $parent = shift;
my $s = shift;
- my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($s);
+ my ($call, $is_node, $is_extnode, $here, $version, $build) = @$s;
my @rout;
if ($call) {
{
my $parent = shift;
my $s = shift;
- my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($s);
+ my ($call, $is_node, $is_extnode, $here, $version, $build) = @$s;
my @rout;
if ($call) {
if ($is_node) {
my $t = $_[2];
my $sort = $_[3];
- my @ent = grep {$_ && /^[0-7]/} @_[4 .. $#_];
+ my @ent = map {[ _decode_pc92_call($_) ]} grep {$_ && /^[0-7]/} @_[4 .. $#_];
if ($pcall eq $main::mycall) {
dbg("PCPROT: looped back, ignored") if isdbg('chanerr');
# 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]);
+ my ($call, $is_node, $is_extnode, $here, $version, $build) = @{$ent[0]};
if ($call && $is_node) {
if ($call eq $main::mycall) {
dbg("PCPROT: looped back on node entry, ignored") if isdbg('chanerr');
shift @ent;
}
+ # do a pass through removing any references to either locally connected nodes or mycall
+ my @nent;
+ for (@ent) {
+ next unless $_;
+ if ($_->[0] eq $main::mycall || DXChannel::get($_->[0])) {
+ dbg("PCPROT: $_->[0] refers to locally connected node, ignored") if isdbg('chanerr');
+ next;
+ }
+ push @nent, $_;
+ }
+
my (@radd, @rdel);
if ($sort eq 'A') {
- for (@ent) {
+ for (@nent) {
push @radd, _add_thingy($parent, $_);
}
} elsif ($sort eq 'D') {
- for (@ent) {
+ for (@nent) {
push @rdel, _del_thingy($parent, $_);
}
} elsif ($sort eq 'C') {
my (@nodes, @users);
- for (@ent) {
- my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($_);
- if ($call) {
- if ($is_node) {
- push @nodes, $call;
+ foreach my $r (@nent) {
+# my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($_);
+ if ($r->[0]) {
+ if ($r->[1]) {
+ push @nodes, $r->[0];
} else {
- push @users, $call;
+ push @users, $r->[0];
}
} else {
dbg("DXPROT: pc92 call entry '$_' not decoded, ignored") if isdbg('chanerr');
my ($dnodes, $dusers, $nnodes, $nusers) = $parent->calc_config_changes(\@nodes, \@users);
- for (@ent) {
- my ($call, $is_node, $is_extnode, $here, $version, $build) = _decode_pc92_call($_);
+ foreach my $r (@nent) {
+ my $call = $r->[0];
if ($call) {
- push @radd,_add_thingy($parent, $_) if grep $call eq $_, (@$nnodes, @$nusers);
- push @rdel,_del_thingy($parent, $_) if grep $call eq $_, (@$dnodes, @$dusers);
+ push @radd,_add_thingy($parent, $r) if grep $call eq $_, (@$nnodes, @$nusers);
+ push @rdel,_del_thingy($parent, $r) if grep $call eq $_, (@$dnodes, @$dusers);
}
}
} else {