X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=c039659bd96dbfab15373c542cf92578f449e503;hb=1479f550842390ca770899e5cf1c6ce79087fe82;hp=c7e2abdbe44ef671be8ae3a80244338c7c045746;hpb=82de56e409a19a05761794c9588713160b51144e;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index c7e2abdb..c039659b 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -197,7 +197,10 @@ sub normal } # if this is a 'nodx' node then ignore it - last SWITCH if grep $field[7] =~ /^$_/, @DXProt::nodx_node; + if (grep $field[7] =~ /^$_/, @DXProt::nodx_node) { + dbg('chan', "Bad DXNode, dropped"); + return; + } # convert the date to a unix date my $d = cltounix($field[3], $field[4]); @@ -291,13 +294,11 @@ sub normal my $wwv = Geomag::update($main::systime, $hour, $sfi, $a, $k, "R=$r, Next K=$next$alarm", $decode_dk0wcy, $field[5], $r); } - return if $field[2] eq $main::mycall; # it's routed to me } else { route($field[2], $line); - return; # only on a routed one } - last SWITCH; + return; } if ($pcno == 13) { @@ -312,20 +313,26 @@ sub normal if ($pcno == 16) { # add a user my $node = DXCluster->get_exact($field[1]); + my $dxchan; + if (!$node && ($dxchan = DXChannel->get($field[1]))) { + # add it to the node table if it isn't present and it's + # connected locally + $node = DXNode->new($dxchan, $field[1], 0, 1, 5400); + broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate}; + + } return unless $node; # ignore if havn't seen a PC19 for this one yet return unless $node->isa('DXNode'); if ($node->dxchan != $self) { dbg('chan', "LOOP: $field[1] came in on wrong channel"); return; } - my $dxchan; if (($dxchan = DXChannel->get($field[1])) && $dxchan != $self) { dbg('chan', "LOOP: $field[1] connected locally"); return; } my $i; - - + for ($i = 2; $i < $#field; $i++) { my ($call, $confmode, $here) = $field[$i] =~ /^(\S+) (\S) (\d)/o; next if !$call || length $call < 3 || length $call > 8; @@ -353,13 +360,20 @@ sub normal if ($pcno == 17) { # remove a user my $node = DXCluster->get_exact($field[2]); + my $dxchan; + if (!$node && ($dxchan = DXChannel->get($field[2]))) { + # add it to the node table if it isn't present and it's + # connected locally + $node = DXNode->new($dxchan, $field[2], 0, 1, 5400); + broadcast_ak1a(pc19($dxchan, $node), $dxchan, $self) unless $dxchan->{isolate}; + return; + } return unless $node; return unless $node->isa('DXNode'); if ($node->dxchan != $self) { dbg('chan', "LOOP: $field[2] came in on wrong channel"); return; } - my $dxchan; if (($dxchan = DXChannel->get($field[2])) && $dxchan != $self) { dbg('chan', "LOOP: $field[2] connected locally"); return; @@ -911,9 +925,9 @@ sub send_announce if ($dxchan->{annfilter}) { ($filter, $hops) = Filter::it($dxchan->{annfilter}, @_, $self->{call} ); - return unless $filter; + next unless $filter; } - if ($dxchan->is_ak1a) { + if ($dxchan->is_ak1a && $_[1] ne $main::mycall) { # i.e not specifically routed to me next if $dxchan == $self; if ($hops) { $routeit = $line;