{
int ret;
struct ctf_packet_index index;
memset(&index, 0, sizeof(index));
{
int ret;
struct ctf_packet_index index;
memset(&index, 0, sizeof(index));
index.timestamp_end = htobe64(ts);
ret = consumer_stream_write_index(stream, &index);
if (ret < 0) {
index.timestamp_end = htobe64(ts);
ret = consumer_stream_write_index(stream, &index);
if (ret < 0) {