]> dxcluster.org Git - spider.git/commitdiff
fixed geomag errors introduced last time
authordjk <djk>
Thu, 7 Jan 1999 18:56:45 +0000 (18:56 +0000)
committerdjk <djk>
Thu, 7 Jan 1999 18:56:45 +0000 (18:56 +0000)
added more range checking on WWV spots

Changes
cmd/show/wx.pl
perl/DXChannel.pm
perl/DXProt.pm
perl/Geomag.pm

diff --git a/Changes b/Changes
index bbfa287fe3d8879c4f390e7a3301a68a9b38f02d..2b3b13dfa4edd3497f3dfa3198a9f46efdea4e98 100644 (file)
--- 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!)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f32d62823e98b02659a1656dbc788fecd8241cf8 100644 (file)
@@ -0,0 +1,4 @@
+#
+# show wx data
+#
+return (1, "not implemented yet");
index e72be8020ae7c3c49740d90df4c48555702b23c5..b3929c1f2a2d5b45b53a09169294b29aa952952f 100644 (file)
@@ -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;
index b1ce88d6750634806eda9f336382cf221ec473be..10ce5fa193043475802ed715c051e8d5c1b1fceb 100644 (file)
@@ -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;
                        }
index d68e724d436214b64825b2052164122e22628397..d7cdc19c12a79b8faf185f74f6e44076b282343b 100644 (file)
@@ -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++;