- # If is a new PC11, store it, releasing the one that is there (if any),
- # if a PC61 comes along then dump the stored PC11
- # If there is a different PC11 stored, release that one and store this PC11 instead,
- my $key = join '|', @spot[0..2,4,7];
- if (0) {
-
- if ($pc->[0] eq 'PC11') {
- my $r = [$main::systime, $key, \@spot, $line, $origin, $pc];
- if (!$last) {
- $last = [$main::systime, $key, \@spot, $line, $origin, $pc];
- dbg("PC11: $origin -> $key stored") if isdbg('pc11');
- return;
- } elsif ($key eq $last->[1]) { # same as last one
- dbg("PC11: $origin -> $key dupe dropped") if isdbg('pc11');
- return;
- } else {
- # it's a different PC11, kick the stored one onward and store this one instead,
- dbg("PC11: PC11 new $origin -> $key stored, $last->[4] -> $last->[1] passed onward") if isdbg('pc11');
- @spot = @{$last->[2]};
- $line = $last->[3];
- $origin = $last->[4];
- $pc = $last->[5];
- $last = $r;
- }
- } elsif ($pc->[0] eq 'PC61') {
- if ($last) {
- if ($last->[1] eq $key) {
- # dump $last and proceed with the PC61
- dbg("PC11: $origin -> $key dropped in favour of PC61") if isdbg('pc11');
- undef $last;
- } else {
- # it's a different spot send out stored pc11
- dbg("PC11: last $last->[4] -> $last->[1] different PC61 $origin -> $key, send PC11 first ") if isdbg('pc11');
- $last->[1] = 'new pc61';
- handle_11($self, 11, $last->[3], $last->[4], $last->[5]);
- undef $last;
- dbg("PC11: now process PC61 $origin -> $key") if isdbg('pc11');
- }
- }
- } else {
- dbg("PC11: Unexpected line '$line' in bagging area (expecting PC61, PC11), ignored");
- return;
- }
-
-}
-