From: minima Date: Sun, 29 Oct 2000 12:37:11 +0000 (+0000) Subject: unrolled the checking in decode_input a bit X-Git-Tag: R_1_45~71 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=23bebd4158e9b66ba5c72c786e76309f6e2b5757;p=spider.git unrolled the checking in decode_input a bit --- diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 9d52d67c..d566c177 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -440,12 +440,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); }