src.ctf.lttng-live: live_..._list_sessions(): remove handshake
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 29 Jul 2019 16:25:42 +0000 (12:25 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 31 Jul 2019 21:18:07 +0000 (17:18 -0400)
The only user of live_viewer_connection_list_sessions() is
lttng_live_query_list_sessions() which calls
live_viewer_connection_create() before. live_viewer_connection_create()
calls lttng_live_connect_viewer() which calls lttng_live_handshake().

There is no need to call lttng_live_handshake() twice. This makes the
relay daemon assign two viewer IDs to the CLI, as seen in Wireshark.

Babeltrace 1.5 does not send the "connect" command twice either.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I640b9397c21ca37ad5c841415b5ed0c12193825a
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1798

src/plugins/ctf/lttng-live/viewer-connection.c

index c7347020f30baf869583f36c7005c4e5e8504df3..1ffba1cfc976f7b46e31ec3411c165f9f49f81b5 100644 (file)
@@ -573,10 +573,6 @@ bt_component_class_query_method_status live_viewer_connection_list_sessions(
        uint32_t i, sessions_count;
        ssize_t ret_len;
 
-       if (lttng_live_handshake(viewer_connection)) {
-               goto error;
-       }
-
        result = bt_value_array_create();
        if (!result) {
                BT_COMP_LOGE("Error creating array");
This page took 0.025219 seconds and 4 git commands to generate.