From 23bebd4158e9b66ba5c72c786e76309f6e2b5757 Mon Sep 17 00:00:00 2001 From: minima Date: Sun, 29 Oct 2000 12:37:11 +0000 Subject: [PATCH] unrolled the checking in decode_input a bit --- perl/DXChannel.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); } -- 2.43.0