X-Git-Url: http://git.efficios.com/?p=deliverable%2Flttng-ust.git;a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-client.h;fp=liblttng-ust%2Flttng-ring-buffer-client.h;h=ab472352f96898625db0662b9399e5762088d897;hp=0fae88787c8b263a93f29b865153f22aff7ca3cf;hb=db95cf8bf1be068238f12e248f13ed103d86d1e5;hpb=db56acaff475812dfd774a52b3d54eae5c115315 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; }