From: djk Date: Thu, 7 Jan 1999 18:56:45 +0000 (+0000) Subject: fixed geomag errors introduced last time X-Git-Tag: R_1_21~2 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb554d0fdb1d30120dbfff15514c51f683dc17a8;p=spider.git fixed geomag errors introduced last time added more range checking on WWV spots --- diff --git a/Changes b/Changes index bbfa287f..2b3b13df 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +07Jan99======================================================================== +1. Fixed Geomag after emacs reformatted it wrong so sh/wwv works again. +2. Added more range checking in WWV spots (they really are a heap of ...) 06Jan99======================================================================== 1. Do some range checking for spots and WWV in the future (got a WWV for Oct 2034 whhich caused a bit of confusion!) diff --git a/cmd/show/wx.pl b/cmd/show/wx.pl index e69de29b..f32d6282 100644 --- a/cmd/show/wx.pl +++ b/cmd/show/wx.pl @@ -0,0 +1,4 @@ +# +# show wx data +# +return (1, "not implemented yet"); diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index e72be802..b3929c1f 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -81,14 +81,16 @@ sub alloc die "trying to create a duplicate channel for $call" if $channels{$call}; $self->{call} = $call; $self->{conn} = $conn if defined $conn; # if this isn't defined then it must be a list - $self->{user} = $user if defined $user; + if (defined $user) { + $self->{user} = $user; + $self->{lang} = $user->lang; + $user->new_group() if !$user->group; + $self->{group} = $user->group; + } $self->{startt} = $self->{t} = time; $self->{state} = 0; $self->{oldstate} = 0; - $self->{lang} = $user->{lang} if defined $user; $self->{lang} = $main::lang if !$self->{lang}; - $user->new_group() if !$user->group; - $self->{group} = $user->group; $self->{func} = ""; bless $self, $pkg; return $channels{$call} = $self; diff --git a/perl/DXProt.pm b/perl/DXProt.pm index b1ce88d6..10ce5fa1 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -385,7 +385,7 @@ sub normal dbg('chan', "Dup WWV Spot ignored\n"); return; } - if ($d > $main::systime + 900) { + if ($d > $main::systime + 900 || $field[2] < 0 || $field[2] > 23) { dbg('chan', "WWV Date ($field[1] $field[2]) out of range"); return; } diff --git a/perl/Geomag.pm b/perl/Geomag.pm index d68e724d..d7cdc19c 100644 --- a/perl/Geomag.pm +++ b/perl/Geomag.pm @@ -155,7 +155,7 @@ sub search $eval = qq( my \$c; my \$ref; - for (\$c = \$ #in; \$c >= 0; \$c--) { + for (\$c = \$#in; \$c >= 0; \$c--) { \$ref = \$in[\$c]; if ($search) { \$count++;