Add the relayd create session command
[lttng-tools.git] / src / common / consumer.c
index f57cfffff57262cbb04ef048fb761e75019eb805..f4cfa82ce8dcc1179843a806a4d969f432b5391e 100644 (file)
@@ -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 */
This page took 0.022855 seconds and 4 git commands to generate.