- 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;
+ # remove any dxchannels that have gone away
+ while (my ($k, $v) = each %cand) {
+ if (my $dxc = DXChannel::get($k)) {
+ push @out, [$v, $dxc];