+06Jul07=======================================================================
+1. re-arrange id checking so that it is more logical and check that config
+records, that can be an hour coming, are not thoughtlessly ignored, thus
+causing nodes to time out.
+2. Make sure that the 'over midnight' distance calculation actually does what
+is required!
05Jul07=======================================================================
1. Try to make sure that the node config broadcasts are actually sent...
03Jul07=======================================================================
$eph_pc15_restime $pc9x_past_age $pc9x_future_age
);
-$pc9x_past_age = 15*60; # maximum age in the past of a px9x
+$pc9x_past_age = 62*60; # maximum age in the past of a px9x (a config record might be the only
+ # thing a node might send - once an hour)
$pc9x_future_age = 5*60; # maximum age in the future ditto
# incoming talk commands
if ($parent->call ne $main::mycall) {
my $lastid = $parent->lastid->{$pc} || 0;
if ($t < $lastid) {
- if ($lastid-86400+$t > $pc9x_past_age) {
- dbg("PCPROT: dup id on $t <= $lastid (midnight rollover), ignored") if isdbg('chanerr');
+ if ($t+86400-$lastid > $pc9x_past_age) {
+ dbg("PCPROT: dup id on $t <= $lastid, ignored") if isdbg('chanerr');
return;
}
- }
- if ($lastid >= $t) {
- dbg("PCPROT: dup id on $call $lastid >= $t, ignored") if isdbg('chanerr');
+ } elsif ($t == $lastid) {
+ dbg("PCPROT: dup id on $t == $lastid, ignored") if isdbg('chanerr');
return;
+ } else {
+ # $t > $lastid, check that the timestamp offered isn't too far away from 'now'
+ if ($t+$main::systime_daystart-$main::systime > $pc9x_future_age ) {
+ dbg("PCPROT: id $t too far in the future, ignored") if isdbg('chanerr');
+ return;
+ }
}
}
} elsif ($create) {