made the reaping code a tad more sophisticated (probably in the correct
[spider.git] / perl / DXChannel.pm
index 9d52d67c3a204481a220e2feac51a833efd4357b..6b0bb554abebcbf877ad51558df696c4cd3e8f0b 100644 (file)
@@ -28,6 +28,7 @@ package DXChannel;
 use Msg;
 use DXM;
 use DXUtil;
+use DXVars;
 use DXDebug;
 use Filter;
 
@@ -74,11 +75,11 @@ use vars qw(%channels %valid);
                  annfilter => '5,Announce Filter',
                  wwvfilter => '5,WWV Filter',
                  wcyfilter => '5,WCY Filter',
-                 spotfilter => '5,Spot Filter',
+                 spotsfilter => '5,Spot Filter',
                  inannfilter => '5,Input Ann Filter',
                  inwwvfilter => '5,Input WWV Filter',
                  inwcyfilter => '5,Input WCY Filter',
-                 inspotfilter => '5,Input Spot Filter',
+                 inspotsfilter => '5,Input Spot Filter',
                  passwd => '9,Passwd List,parray',
                  pingint => '5,Ping Interval ',
                  nopings => '5,Ping Obs Count',
@@ -102,10 +103,10 @@ sub DESTROY
        undef $self->{delayed};
        undef $self->{annfilter};
        undef $self->{wwvfilter};
-       undef $self->{spotfilter};
+       undef $self->{spotsfilter};
        undef $self->{inannfilter};
        undef $self->{inwwvfilter};
-       undef $self->{inspotfilter};
+       undef $self->{inspotsfilter};
        undef $self->{passwd};
        undef $self->{node};
 }
@@ -440,12 +441,16 @@ sub decode_input
        my $chcall = (ref $dxchan) ? $dxchan->call : "UN.KNOWN";
        
        # the above regexp must work
-       if (!defined $sort || !defined $call || !defined  $line ||
-                  (ref $dxchan && $call ne $chcall)) {
+       unless (defined $sort && defined $call && defined $line) {
                $data =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
-               dbg('chan', "DUFF Line from $chcall: $data");
+               dbg('err', "DUFF Line on $chcall: $data");
                return ();
        }
+
+       if(ref($dxchan) && $call ne $chcall) {
+               dbg('err', "DUFF Line come in for $call on wrong channel $chcall" );
+               return();
+       }
        
        return ($sort, $call, $line);
 }