X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=lib%2Fiterator.c;fp=lib%2Fiterator.c;h=fd58dec99ce45dc4e8a682220d20ebf3a6edb3dc;hp=48c67a4031fb07167d61233a17b66b11f58df964;hb=992e8cc0c6bf7403301ceeddee347fade28449f2;hpb=dae407df004b28e360bd9fb52590063652b29811 diff --git a/lib/iterator.c b/lib/iterator.c index 48c67a40..fd58dec9 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -135,10 +135,10 @@ static int seek_file_stream_by_timestamp(struct ctf_file_stream *cfs, int i, ret; stream_pos = &cfs->pos; - for (i = 0; i < stream_pos->packet_real_index->len; i++) { - index = &g_array_index(stream_pos->packet_real_index, + for (i = 0; i < stream_pos->packet_index->len; i++) { + index = &g_array_index(stream_pos->packet_index, struct packet_index, i); - if (index->timestamp_end < timestamp) + if (index->ts_real.timestamp_end < timestamp) continue; stream_pos->packet_seek(&stream_pos->parent, i, SEEK_SET); @@ -229,7 +229,7 @@ static int find_max_timestamp_ctf_file_stream(struct ctf_file_stream *cfs, * either find at least one event, or we reach the first packet * (some packets can be empty). */ - for (i = stream_pos->packet_real_index->len - 1; i >= 0; i--) { + for (i = stream_pos->packet_index->len - 1; i >= 0; i--) { stream_pos->packet_seek(&stream_pos->parent, i, SEEK_SET); count = 0; /* read each event until we reach the end of the stream */