From: minima Date: Sun, 27 Jan 2002 18:20:50 +0000 (+0000) Subject: fix long callsign checking X-Git-Tag: R_1_50~70 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ccd8bcf26e31695caa0c6015e0756eebb2428cb1;p=spider.git fix long callsign checking --- diff --git a/Changes b/Changes index 486ba2c8..aeddc4f9 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ 2. try to get the C client to handle closes on its standard input better 3. put some validation in cluster.pl to check that people have set it up handled. +4. fix the long callsign checking 22Jan02======================================================================= 1. limit spot dupe checking to first 12 characters 13Jan02======================================================================= diff --git a/perl/DXProt.pm b/perl/DXProt.pm index d26795c4..2027239b 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -441,6 +441,12 @@ sub normal return; } } + + if (Spot::dup($field[1], $field[2], $d, $field[5])) { + dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr'); + return; + } + my @spot = Spot::prepare($field[1], $field[2], $d, $field[5], $field[6], $field[7]); # global spot filtering on INPUT @@ -451,11 +457,6 @@ sub normal return; } } - - if (Spot::dup($field[1], $field[2], $d, $field[5])) { - dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr'); - return; - } # add it Spot::add(@spot); diff --git a/perl/Spot.pm b/perl/Spot.pm index b5d56011..8e8f7fd0 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -299,7 +299,7 @@ sub dup return 2 if $d < $main::systime - $dupage; $freq = sprintf "%.1f", $freq; # normalise frequency - $call = substr($call, 12) if length $call > 12; + $call = substr($call, 0, 12) if length $call > 12; chomp $text; $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth;