From bf7fe79ff0134fdcc2ae58427d4cce7190d5dbc1 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 29 Jul 2019 12:25:42 -0400 Subject: [PATCH] src.ctf.lttng-live: live_..._list_sessions(): remove handshake 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 Change-Id: I640b9397c21ca37ad5c841415b5ed0c12193825a Reviewed-on: https://review.lttng.org/c/babeltrace/+/1798 --- src/plugins/ctf/lttng-live/viewer-connection.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c index c7347020..1ffba1cf 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -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"); -- 2.34.1