X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-client.h;h=ab472352f96898625db0662b9399e5762088d897;hb=ad73be87196c524ea03003a7cb5ba033b2b8a097;hp=0fae88787c8b263a93f29b865153f22aff7ca3cf;hpb=4dfde2bfb1a55a37d0c8a73fbc443f9a483ec605;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index 0fae8878..ab472352 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -580,12 +580,11 @@ static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf, struct lttng_ust_shm_handle *handle, uint64_t *stream_id) { - struct packet_header *header; + struct channel *chan = shmp(handle, buf->backend.chan); + struct lttng_channel *lttng_chan = channel_get_private(chan); + + *stream_id = lttng_chan->id; - header = client_packet_header(buf, handle); - if (!header) - return -1; - *stream_id = header->stream_id; return 0; } @@ -616,10 +615,8 @@ static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf, struct lttng_ust_shm_handle *handle, uint64_t *id) { - struct packet_header *header; + *id = buf->backend.cpu; - header = client_packet_header(buf, handle); - *id = header->stream_instance_id; return 0; }