X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=f4cfa82ce8dcc1179843a806a4d969f432b5391e;hp=f57cfffff57262cbb04ef048fb761e75019eb805;hb=c5b6f4f08fe8d1abff74c7f6ad3630b7dcf0669d;hpb=f50f23d9f80ed9fae7fe5c49aee65e813e0031c8 diff --git a/src/common/consumer.c b/src/common/consumer.c index f57cfffff..f4cfa82ce 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2743,6 +2743,17 @@ int consumer_add_relayd_socket(int net_seq_idx, int sock_type, /* Assign new file descriptor */ relayd->control_sock.fd = fd; + + /* + * Create a session on the relayd and store the returned id. No need to + * grab the socket lock since the relayd object is not yet visible. + */ + ret = relayd_create_session(&relayd->control_sock, + &relayd->session_id); + if (ret < 0) { + goto error; + } + break; case LTTNG_STREAM_DATA: /* Copy received lttcomm socket */