From: Dirk Koopman Date: Sun, 11 Nov 2007 12:45:35 +0000 (+0000) Subject: add better debugging to pc92 deduping check X-Git-Tag: 1.55~40 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fc769825208defe992b60c1374a236f2cdba925;p=spider.git add better debugging to pc92 deduping check --- 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; } diff --git a/perl/Version.pm b/perl/Version.pm index 780570fe..e10f759d 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '177'; +$build = '180'; 1;