X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=8bfd6c3e43d4525d01fbe7109577db14c11ae2d1;hb=19980464653659320e9b143f3da34b38bb908cb9;hp=99c2ef82a674362f5c1aa34df27d165553c34efa;hpb=289b7a867f2065d9821102c2e48dba5ff374f7c5;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 99c2ef82..8bfd6c3e 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -275,10 +275,8 @@ sub normal # print join(',', @field), "\n"; - # ignore any lines that don't start with PC - return if !$field[0] =~ /^PC/; - # process PC frames + # process PC frames, this will fail unless the frame starts PCnn my ($pcno) = $field[0] =~ /^PC(\d\d)/; # just get the number return unless $pcno; return if $pcno < 10 || $pcno > 99; @@ -654,6 +652,8 @@ sub normal if ($self->in_filter_route($r)) { $ar = $parent->add($call, $ver, $flags); push @rout, $ar if $ar; + } else { + next; } } if ($r->version ne $ver || $r->flags != $flags) { @@ -668,6 +668,8 @@ sub normal if ($self->in_filter_route($new)) { my $r = $parent->add($call, $ver, $flags); push @rout, $r; + } else { + next; } } @@ -781,15 +783,21 @@ sub normal if ($pcno == 24) { # set here status my $call = uc $field[1]; - my $ref = Route::Node::get($call); - $ref->here($field[2]) if $ref; - $ref = Route::User::get($call); - $ref->here($field[2]) if $ref; + my ($nref, $uref); + $nref = Route::Node::get($call) && $nref->here($field[2]); + $uref = Route::User::get($call) && $uref->here($field[2]); + return unless $nref || $uref; # if we don't know where they are, it's pointless sending it on - # input filter if required - return unless $self->in_filter_route($ref); - - $self->route_pc24($ref, $field[3]) if $ref && !eph_dup($line); + unless (eph_dup($line)) { + if ($nref) { + return unless $self->in_filter_route($nref); + $self->route_pc24($nref, $field[3]) + } + if ($uref) { + return unless $self->in_filter_route($uref); + $self->route_pc24($uref, $field[3]); + } + } return; } @@ -927,7 +935,7 @@ sub normal } $user->lastoper($main::systime); # to cut down on excessive for/opers being generated $user->put; - my $ref = Route::get($call); + my $ref = Route::get($call) || Route->new($call); # input filter if required return unless $self->in_filter_route($ref); @@ -1444,7 +1452,7 @@ sub send_local_config # and are not themselves isolated, this to make sure that isolated nodes # don't appear outside of this node my @dxchan = grep { $_->call ne $main::mycall && $_->call ne $self->{call} } DXChannel::get_all_nodes(); - @localnodes = map { Route::Node::get($_->{call}) or die "connot find node $_->{call}" } @dxchan if @dxchan; + @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan; my @intcalls = map { $_->nodes } @localnodes if @localnodes; my $ref = Route::Node::get($self->{call}); my @rnodes = $ref->nodes; @@ -1483,7 +1491,7 @@ sub route # always send it down the local interface if available my $dxchan = DXChannel->get($call); unless ($dxchan) { - my $cl = Route::Node::get($call); + my $cl = Route::get($call); $dxchan = $cl->dxchan if $cl; if (ref $dxchan) { if (ref $self && $dxchan eq $self) {