Catch spot dupes if they come in very quickly
authorDirk Koopman <djk@tobit.co.uk>
Wed, 27 Mar 2024 15:14:08 +0000 (15:14 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 27 Mar 2024 15:14:08 +0000 (15:14 +0000)
Basically (apparently) there was a hole in the PC[16]1 handling where
it would accept a duplicate spot if it (physically) came in the same
second.

I'm not completely convinced that this is root of the problem but I can't
see a reason to have the code that was there in DXProt::handle_11.

Changes
perl/Filter.pm
perl/Spot.pm

diff --git a/Changes b/Changes
index e2f183d1576b8800609c48064384e7d0c5fde230..9d46dc9450b2181f7a1056ffebf4796965183480 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+27Mar24======================================================================
+1. Fix dupe PC[16]1 (spot) coming in "too fast" for dupe filter to work. 
+
+   Probably. 
 25Mar24======================================================================
 1. Make talk work. Note: this now works as the mojo branch originally
    expected - which means that it may (and likely will) flood route talks 
index 4be0b630fbdbbb8072ed6f1a7d370fe54c516e0e..f4089fcf9eeda8eefdb1a76838494274de721c4c 100644 (file)
@@ -348,9 +348,7 @@ sub install
                if ($remove) {
                        $dxchan->{$n} = undef;
                }
-               unless ($dxchan->{$n}) {
-                       Filter::load_dxchan($dxchan, $sort, $in);
-               }
+               Filter::load_dxchan($dxchan, $sort, $in);
        }
 }
 
index c492d918ab98a5a6941d3fb5a3c6451327a73223..64db9a722498109f10edcda7a5470ba2f05577b8 100644 (file)
@@ -514,10 +514,9 @@ sub dup
        $text = substr($text, 0, $duplth) if length $text > $duplth; 
        my $ldupkey = $oldstyle ? "X|$call|$by|$node|$freq|$d|$text" : "X|$call|$by|$node|$qrg|$nd|$text";
 
-       dbg("Spot::dup ldupkey $ldupkey") if isdbg('spotdup');
-       
        my $t = DXDupe::find($ldupkey);
-       return 1 if $t && $t - $main::systime > 0;
+       dbg("Spot::dup ldupkey $ldupkey t '$t'") if isdbg('spotdup');
+       return 1 if $t > 0;
        
        DXDupe::add($ldupkey, $main::systime+$dupage) unless $just_find;
        $otext = substr($otext, 0, $duplth) if length $otext > $duplth; 
@@ -525,7 +524,8 @@ sub dup
        if (length $otext && $otext ne $text) {
                $ldupkey = $oldstyle ? "X|$freq|$call|$by|$otext" : "X|$qrg|$call|$by|$otext";
                $t = DXDupe::find($ldupkey);
-               return 1 if $t && $t - $main::systime > 0;
+               dbg("Spot::dup ldupkey $ldupkey t '$t'") if isdbg('spotdup');
+               return 1 if $t > 0;
                DXDupe::add($ldupkey, $main::systime+$dupage) unless $just_find;
        }
        return undef;