}
do {
+ if (lttng_live_should_quit()) {
+ ret = -1;
+ goto error;
+ }
/*
* get_one_metadata_packet returns the number of bytes
* received, 0 when we have received everything, a
int ret;
/* update trace_packet_header and stream_packet_context */
- if (pos->prot != PROT_WRITE && file_stream->parent.trace_packet_header) {
+ if (!(pos->prot & PROT_WRITE) &&
+ file_stream->parent.trace_packet_header) {
/* Read packet header */
ret = generic_rw(&pos->parent,
&file_stream->parent.trace_packet_header->p);
goto end;
}
}
- if (pos->prot != PROT_WRITE && file_stream->parent.stream_packet_context) {
+ if (!(pos->prot & PROT_WRITE) &&
+ file_stream->parent.stream_packet_context) {
/* Read packet context */
ret = generic_rw(&pos->parent,
&file_stream->parent.stream_packet_context->p);