+
+ /*
+ * If the packet is empty (contains only headers or is of size 0), the
+ * caller has to know that we can't read the current event and we need
+ * to do a bt_iter_next.
+ */
+ if (file_stream->pos.data_offset == file_stream->pos.content_size
+ || file_stream->pos.content_size == 0) {
+ /* More events may come. */
+ ret = NULL;
+ if (flags)
+ *flags |= BT_ITER_FLAG_RETRY;
+ goto end;
+ }
+