X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=d0ebbe8e16f36d6cc4776e0297c7242ed8bdd5fc;hb=77b4df8a7ed96c2385ae2b73f273dd3baf69a1ee;hp=fdfff04f110abb24807561310a44543b76e96f24;hpb=4caf0d3cacae4ecb4995e7cedd725b953516792e;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index fdfff04f..d0ebbe8e 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -67,7 +67,7 @@ package main; @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) -$version = "1.31"; # the version no of the software +$version = "1.33"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name @@ -233,13 +233,15 @@ sub process_inqueue my $data = $self->{data}; my $dxchan = $self->{dxchan}; my ($sort, $call, $line) = $data =~ /^(\w)([A-Z0-9\-]+)\|(.*)$/; - + my $error; + # the above regexp must work return unless ($sort && $call && $line); # translate any crappy characters into hex characters if ($line =~ /[\x00-\x06\x08\x0a-\x1f\x7f-\xff]/o) { $line =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg; + ++$error; # dbg('chan', "<- $sort $call **CRAP**: $line"); # return; } @@ -253,10 +255,13 @@ sub process_inqueue $dxchan->start($line, $sort); } elsif ($sort eq 'I') { die "\$user not defined for $call" if !defined $user; - - # normal input - $dxchan->normal($line); - + + if ($error) { + dbg('chan', "DROPPED with $error duff characters"); + } else { + # normal input + $dxchan->normal($line); + } disconnect($dxchan) if ($dxchan->{state} eq 'bye'); } elsif ($sort eq 'Z') { disconnect($dxchan);