In live streaming with LTTng, if we do a stop and then a destroy, we
receive a packet that contains only a header. With this patch, we will
ask for a new packet when we see this case.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
/* Stream is inactive for now (live reading). */
return EAGAIN;
}
+ /* Packet only contains headers */
+ if (pos->offset == pos->content_size)
+ return EAGAIN;
+
assert(pos->offset < pos->content_size);
/* Read event header */