fix error on anonymous pc17
[spider.git] / perl / DXProt.pm
index 629d9cb7c5952757537bb8ed9e697473184a4207..8e8dfea73c49b817d56328031cbbdfbc5938efa7 100644 (file)
@@ -854,7 +854,7 @@ sub handle_17
        }
 
        $uref = Route->new($ucall) unless $uref; # throw away
-       $self->route_pc17($origin, $line, $parent, $uref) if (DXChannel::get($parent->call) || $parent->np);
+       $self->route_pc17($origin, $line, $parent, $uref) if (DXChannel::get($parent->call) || ($parent->isa('Route::Node') && $parent->np));
 }
                
 # link request
@@ -1033,7 +1033,7 @@ sub handle_19
        }
 
        # we only output information that we regard as reliable
-       @rout = grep {$_ && (DXChannel::get{$_->{call}} || $_->np) } @rout;
+       @rout = grep {$_ && (DXChannel::get($_->{call}) || $_->np) } @rout;
        $self->route_pc19($origin, $line, @rout) if @rout;
 }
                
@@ -1122,7 +1122,7 @@ sub handle_21
                return;
        }
 
-       @rout = grep {$_ && (DXChannel::get{$_->{call}} || $_->np) } @rout;
+       @rout = grep {$_ && (DXChannel::get($_->{call}) || $_->np) } @rout;
        $self->route_pc21($origin, $line, @rout) if @rout;
 }
                
@@ -1913,7 +1913,7 @@ sub send_local_config
                for $node (@intcalls) {
                        push @remotenodes, Route::Node::get($node) unless grep $node eq $_, @rnodes, @remotenodes;
                }
-               @remotenodes = grep {$_ && (DXChannel::get{$_->{call}} || $_->np) } @remotenodes;
+               @remotenodes = grep {$_ && (DXChannel::get($_->{call}) || $_->np) } @remotenodes;
                $self->send_route($main::mycall, \&pc19, scalar(@remotenodes), @remotenodes);
        }