+27Jan25======================================================================
+1. Make SURE that spot dupe checks do not add yet more dupe (dupe) records
+ to the dupe file.
+2. Fix the retention of dupe records (of whatever sort) long after they have
+ expired. Also move the dupe cleaning process to once a minute for all
+ dupe records. This has been a veeeeerrrrry long standing bug.
+
+ Thank you to those that pointed out both this and the previous item.
+
+ P.S. If you enjoy watching paint dry then you can see this in action by
+ entering 'set/debug dxdupe' on a console and running 'watchdbg dxdupe' in
+ another shell window.
+
+3. Set a new default dupe expiry time ($DXDupe::default = 3600+120). This may
+ change (back upwards). NOTE: this is a default for all dupe storage that
+ does not explicitly set one (thing like announces etc). Specifically:
+ Spots have their own default ($Spot::dupage).
+
+ NOTE: Spots have a hard limit that prevents exactly repeating spots being
+ emitted faster than one minute.
+
+4. Add an attempt to stop incoming CCCLuster connections from creating
+ protocol loops by ignoring any PC18s that they send.
+5. Try to fix watchdbg so that it works on the latest debian/ubuntu text
+ io routines.
+6. Check that a node channel is fully initialised (meaning that the full
+ node startup chitchat is completed) before allowing informational
+ sentences like (PC11, PC10, PC12, PC61, PC93 etc) to be transferred.
+
+ It turns out that it was possible to connect to a node with a node
+ callsign and send things like PC11 / PC61 without being "visible" in the
+ network as a whole. It would just be visible locally.
17Jun24======================================================================
1. Reduce the default spot dupe qrg granularity to 25Khz.
14Jun24======================================================================
use DXUtil;
use DXVars;
-use vars qw{$lasttime $dbm %d $default $fn};
+use vars qw{$dbm %d $default $fn};
$default = 2*24*60*60;
$lasttime = 0;
sub per_minute
{
my @del;
+ my $count = 0;
while (($k, $v) = each %d) {
- push @del, $k if $main::systime >= $v;
+ my $flag = '';
+ my $left = $v - $main::systime;
+ if ($left <= 0) {
+ push @del, $k;
+ $flag = " $k (deleted secs left: $left v: $v systime: $main::systime)";
+ } else {
+ $left = " $k time left: $left v: $v systime: $main::systime";
+ }
+ ++$count;
+ if (isdbg("dxdupeclean")) {
+ dbg("DXDupe::per_minute key:$flag$left") if isdbg('dxdupeclean');
+ }
}
- del($k) for @del;
+ for (@del) {
+ del($_);
+ }
+ dbg("DXDupe::per_minute number of records " . scalar keys %d) if isdbg('dxdupe');
$lasttime = $main::systime;
}
return;
}
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
+
# is it for me or one of mine?
my ($from, $to, $via, $call, $dxchan);
my $pc = shift;
my $recurse = shift || 0;
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
+
# route 'foreign' pc26s
if ($pcno == 26) {
if ($pc->[7] ne $main::mycall) {
my $origin = shift;
my $pc = shift;
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
+
# announce duplicate checking
$pc->[3] =~ s/^\s+//; # remove leading blanks
my $origin = shift;
my $pc = shift;
+ my $conn = $self->conn;
+ unless ($self->outbound) {
+ dbg("PC18 on startup an incoming connection from $self->{call} ignored as iappropriate");
+ return;
+ }
+
$self->state('init');
my $parent = Route::Node::get($self->{call});
my $origin = shift;
my $pc = shift;
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
+
my $call = $pc->[1];
my $sort = $pc->[2];
my $val = $pc->[3];
my $origin = shift;
my $pc = shift;
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
+
$self->process_rcmd($pc->[1], $pc->[2], $pc->[3], $pc->[4]);
}
my $origin = shift;
my $pc = shift;
-# $self->{do_pc9x} ||= 1;
+ # $self->{do_pc9x} ||= 1;
+
+ unless ($self->state eq 'normal') {
+ dbg("PC$pcno sent from $self->{call} ignored as this channel is not yet initialised (state: $self-{state})");
+ return;
+ }
my $pcall = $pc->[1]; # this is now checked earlier
itu => '0,ITU Zone',
parent => '0,Parent Calls,parray',
state => '0,State',
+ lastseen => '0,Last Seen,cldatetime',
);
$filterdef = bless ([
$maxdays = 100; # normal maximum no of days to go back
$dirprefix = "spots";
$duplth = 15; # the length of text to use in the deduping
-$dupage = 1*3600; # the length of time to hold spot dups
+$dupage = 10*60; # the length of time to hold spot dups
$maxcalllth = 12; # the max length of call to take into account for dupes
$filterdef = bless ([
# tag, sort, field, priv, special parser
# new feature: don't include the origin node in Spot dupes
# default = true
$node = '' if $no_node_in_dupe;
- $ldupkey = $oldstyle ? "X$call|$by|$freq|$node|$d|$text" : "X$call|$by|$qrg|$node|$nd|$text";
+ $ldupkey = $oldstyle ? "X$call|$by|$freq|$nd|$node|$text" : "X$call|$by|$qrg|$nd|$node|$text";
$t = DXDupe::find($ldupkey);
dbg("Spot::dup ldupkey $ldupkey t '$t'" . ($t?' DUPE':' NEW')) if isdbg('spotdup');
$otext = substr($otext, 0, $duplth) if length $otext > $duplth;
$otext =~ s/\s+$//;
if (length $otext && $otext ne $text) {
- $ldupkey = $oldstyle ? "X$call|$by|$freq|$otext" : "X$call|$by|$qrg|$otext";
+ $ldupkey = $oldstyle ? "X$call|$by|$freq|$otext" : "X$call|$by|$qrg|$nd|$otext";
$t = DXDupe::find($ldupkey);
dbg("Spot::dup (OTEXT) ldupkey $ldupkey t '$t'" . ($t?' DUPE':' NEW')) if isdbg('spotdup');
if (isdbg('spottext')) {
# seek to end of file
$fh->seek(0, 2);
for (;;) {
- $fh->seek(0, 1);
my $line = $fh->getline;
if ($line) {
if (@patt) {
$today = $now;
}
}
+ $fh->seek(0, 1);
}
sub printit