From: Dirk Koopman Date: Sat, 17 Nov 2007 13:35:14 +0000 (+0000) Subject: Add Local::ann() as requested by Felipe PY1NB. X-Git-Tag: 1.55~35 X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fremotes%2Forigin%2Fspider;p=spider.git Add Local::ann() as requested by Felipe PY1NB. Also check that the Local::xxx stubs are defined before trying to eval {} them. --- diff --git a/Changes b/Changes index 6a0731b6..ee7a52ae 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +17Nov07======================================================================= +1. Add Local::ann() as requested by Felipe PY1NB. 16Nov07======================================================================= 1. add CTY-1709 prefix changes 2. added extra checking for the time stamp on PC9x sentences. These must now diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index e0f327e7..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]); diff --git a/perl/Version.pm b/perl/Version.pm index b5d0b56b..d7a28831 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '184'; +$build = '185'; 1;