Skip to content
Snippets Groups Projects
Commit ff8631d1 authored by Steve Dutcher's avatar Steve Dutcher
Browse files

FIX: merging was broken for corrupt packet groups

corrupt session groups can have packet files with multiple APIDs
we handel this by filtering these out and skipping to the next stamp
parent d17abcde
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,11 @@ def read_packet_index(stream):
LOG.info('dropped %d leading packets', count)
while True:
if not packet.stamp:
# corrupt packet groups can cause apid mismatch
# so skip until we get to the next group
packet = stream.next()
continue
ptr = _Ptr(
stream.file,
stamp=packet.stamp,
......@@ -75,6 +80,10 @@ def read_packet_index(stream):
# collect all packets for this stamp/group
packet = stream.next()
while not packet.stamp:
# Bail if we're collecting group packets and apids don't match
# This means group is corrupt
if ptr.apid != packet.apid:
break
ptr.size += packet.size
ptr.count += 1
packet = stream.next()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment