stream->ust_metadata_pushed);
ret = write_len;
+ /*
+ * Switch packet (but don't open the next one) on every commit of
+ * a metadata packet. Since the subbuffer is fully filled (with padding,
+ * if needed), the stream is "quiescent" after this commit.
+ */
+ ustctl_flush_buffer(stream->ustream, 1);
+ stream->quiescent = true;
end:
pthread_mutex_unlock(&stream->chan->metadata_cache->lock);
return ret;
retry = 1;
}
- ustctl_flush_buffer(metadata->ustream, 1);
ret = ustctl_snapshot(metadata->ustream);
if (ret < 0) {
if (errno != EAGAIN) {
if (ret <= 0) {
goto end;
}
- ustctl_flush_buffer(stream->ustream, 1);
goto retry;
}