X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtHandle.pm;h=3e4d3134d40ba532bec9138fab4503679ffe2f30;hb=d7a3d8da34eeb5ddb1457e90ea16c0ac9d93967a;hp=0d046f50f5ea41ff8b4bf27c5c5d005e87cb1205;hpb=bf54094816fc2169e93adbddcba219e241de4e7f;p=spider.git diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 0d046f50..3e4d3134 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -273,12 +273,13 @@ sub handle_11 } # local processing - my $r; - eval { - $r = Local::spot($self, @spot); - }; - # dbg("Local::spot1 error $@") if isdbg('local') if $@; - return if $r; + if (defined *Local::spot) { + my $r; + eval { + $r = Local::spot($self, @spot); + }; + return if $r; + } # DON'T be silly and send on PC26s! return if $pcno == 26; @@ -357,6 +358,15 @@ sub handle_12 } else { $self->route($_[2], $line); } + + # local processing + if (defined *Local::ann) { + my $r; + eval { + $r = Local::ann($self, $line, @_[1..6]); + }; + return if $r; + } } sub handle_15 @@ -937,12 +947,13 @@ sub handle_23 # note this only takes the first one it gets Geomag::update($d, $_[2], $sfi, $k, $i, @_[6..8], $r); - my $rep; - eval { - $rep = Local::wwv($self, $_[1], $_[2], $sfi, $k, $i, @_[6..8], $r); - }; - # dbg("Local::wwv2 error $@") if isdbg('local') if $@; - return if $rep; + if (defined *Local::wwv) { + my $rep; + eval { + $rep = Local::wwv($self, $_[1], $_[2], $sfi, $k, $i, @_[6..8], $r); + }; + return if $rep; + } # DON'T be silly and send on PC27s! return if $pcno == 27; @@ -1307,12 +1318,13 @@ sub handle_73 my $wcy = WCY::update($d, @_[2..12]); - my $rep; - eval { - $rep = Local::wcy($self, @_[1..12]); - }; - # dbg("Local::wcy error $@") if isdbg('local') if $@; - return if $rep; + if (defined *Local::wcy) { + my $rep; + eval { + $rep = Local::wcy($self, @_[1..12]); + }; + return if $rep; + } # broadcast to the eager world send_wcy_spot($self, $line, $d, @_[2..12]); @@ -1517,7 +1529,7 @@ sub check_pc9x_t # and old dupes with $t = 234, $lastid = 256 (which give answers 249 and # 86378 respectively in the calculation below). # - if (($t-$lastid)%86400 > $pc9x_past_age) { + if ($t+86400-$lastid > $pc9x_past_age) { dbg("PCPROT: dup id on $t <= lastid $lastid, ignored") if isdbg('chanerr') || isdbg('pc92dedupe'); return undef; }