X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=32d5e3b381933292e90cd502f7dc569773e86c59;hb=6f9f47b53d1b6c2a52722b525695fa1c03ab1ed7;hp=97a0b0d2bd0de2be0291e16e4909be3e9536cd5e;hpb=54ab4e12f2a2127855dc70936f4cdeb57fc4576c;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 97a0b0d2..32d5e3b3 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,24 @@ 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); + } 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; @@ -913,7 +918,7 @@ sub send_announce ($filter, $hops) = Filter::it($dxchan->{annfilter}, @_, $self->{call} ); 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;