X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtHandle.pm;h=f18089ffaa07db020cfde2bb724ef7e65220cb7f;hb=4fc769825208defe992b60c1374a236f2cdba925;hp=4c7ccf4b256d869e4b6f57910d11e24a1b2214a7;hpb=5e61d31d9f317fcef97a66e1ac1944cb17b42eec;p=spider.git diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 4c7ccf4b..f18089ff 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -1490,25 +1490,33 @@ sub check_pc9x_t if (defined $lastid) { if ($t < $lastid) { if ($t+86400-$lastid > $pc9x_past_age) { - dbg("PCPROT: dup id on $t <= lastid $lastid, ignored") if isdbg('chanerr'); - return; + dbg("PCPROT: dup id on $t <= lastid $lastid, ignored") if isdbg('chanerr') || isdbg('pc92dedupe'); + return undef; } } elsif ($t == $lastid) { - dbg("PCPROT: dup id on $t == lastid $lastid, ignored") if isdbg('chanerr'); - return; + dbg("PCPROT: dup id on $t == lastid $lastid, ignored") if isdbg('chanerr') || isdbg('pc92dedupe'); + return undef; } else { # $t > $lastid, check that the timestamp offered isn't too far away from 'now' if ($t-$lastid > $pc9x_future_age ) { - dbg("PCPROT: id $t too far in the future of lastid $lastid, ignored") if isdbg('chanerr'); - return; + dbg("PCPROT: id $t too far in the future of lastid $lastid, ignored") if isdbg('chanerr') || isdbg('pc92dedupe'); + return undef; } } } } } elsif ($create) { $parent = Route::Node->new($call); + } else { + return undef; + } + if ('pc92dedupe') { + my $exists = exists $parent->{lastid}; # naughty, naughty :-) + my $val = $parent->{lastid}; + my $s = $exists ? (defined $val ? $val : 'exists/undef') : 'undef'; + dbg("PCPROT: $call pc92 id lastid $s -> $t"); } - $parent->lastid($t) if $parent; + $parent->lastid($t); return $parent; }