# $clref = Route::Node::get($hnode) if $hnode;
# }
if ($clref) {
- my $dxc = $clref->dxchan;
- if ($dxc) {
- if (!grep $dxc == $_, DXCommandmode::get_all()) {
+ $dxchan = $clref->dxchan;
+ if ($dxchan) {
+ if ($dxchan->is_node) {
next if $clref->call eq $main::mycall; # i.e. it lives here
- $dxchan = $dxc;
- $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ $ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal';
}
} else {
dbg('route', "Route: No dxchan for $ref->{to} " . ref($clref) );
my $ref = Route::Node::get($self->{call});
my @rnodes = $ref->nodes;
for my $n (@intcalls) {
- push @remotenodes, Route::Node::get($n) unless grep $n == $_, @rnodes;
+ push @remotenodes, Route::Node::get($n) unless grep $n eq $_, @rnodes;
}
unshift @localnodes, $main::routeroot;
}
foreach my $p (@{$self->{parent}}) {
my $dxchan = DXChannel->get($p);
if ($dxchan) {
- push @dxchan, $dxchan if grep $dxchan ne $_, @dxchan;
+ push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan;
} else {
next if $p eq $main::mycall; # the root
my $ref = $self->get($p);
{
my $self = shift;
my $dxchan = DXChannel->get($self->{call});
- return $dxchan = $dxchan;
+ return $dxchan if $dxchan;
my @dxchan = $self->alldxchan;
return undef unless @dxchan;