Bug #727
closedrelayd always replies VIEWER_GET_NEXT_INDEX with lttng_viewer_index.stream_id == 0
0%
Description
Using lttng-tools 2.4.0-rc3
I am sending lttng_viewer_cmd+VIEWER_GET_NEXT_INDEX to relayd with a valid stream id, for example 3. I get back a struct lttng_viewer_index with the stream_id set to 0 instead of 3 (the status is VIEWER_INDEX_OK). To make sure I didn't do something wrong on the receiving side, I added some debug output to relayd before it sends the reply:
---live.c:1322---
...
DBG);
send_reply:
...
Here is the output:
DEBUG1 [2562/2568]: Viewer get next index (in viewer_get_next_index() at live.c:1158)
DEBUG1 [2562/2568]: viewer_index.stream_id= 0 (in viewer_get_next_index() at live.c:1322)
DEBUG1 [2562/2568]: Index 0 for stream 3 sent, status 1 (in viewer_get_next_index() at live.c:1336)
Updated by Marc-Andre Laperle about 10 years ago
The title is be a bit misleading, it should be "replies to VIEWER_GET_NEXT_INDEX with"
Updated by Julien Desfossez about 10 years ago
Hi,
The stream_id in the get_next_index reply, is the stream_id as seen by the tracer (the stream_id that you can find in the CTF packet headers), so it is usually 0 when you have only one channel.
But the reply is for the "relay_stream_id" you requested in the get_next_index request.
If you don't need to internally handle the ctf stream_id, you can ignore this field.
Thanks,
Julien
Updated by Julien Desfossez about 10 years ago
- Status changed from New to Resolved