Don't allow slashes and dots in overriden trace chunk names
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index 8f0767af373cf10c28dbdcdf078758c22c889941..85c4fe9b9aca282ca2d35af5bfa18c910c261b55 100644 (file)
@@ -1113,10 +1113,13 @@ static int relay_create_session(const struct lttcomm_relayd_hdr *recv_hdr,
                ret = cmd_create_session_2_4(payload, session_name,
                        hostname, &live_timer, &snapshot);
        } else {
+               bool has_current_chunk;
+
                /* From 2.11 to ... */
                ret = cmd_create_session_2_11(payload, session_name,
                                hostname, &live_timer, &snapshot,
                                &id_sessiond.value, sessiond_uuid,
+                               &has_current_chunk,
                                &current_chunk_id.value);
                if (lttng_uuid_is_nil(sessiond_uuid)) {
                        /* The nil UUID is reserved for pre-2.11 clients. */
@@ -1125,7 +1128,7 @@ static int relay_create_session(const struct lttcomm_relayd_hdr *recv_hdr,
                        goto send_reply;
                }
                id_sessiond.is_set = true;
-               current_chunk_id.is_set = true;
+               current_chunk_id.is_set = has_current_chunk;
        }
 
        if (ret < 0) {
@@ -1147,14 +1150,6 @@ static int relay_create_session(const struct lttcomm_relayd_hdr *recv_hdr,
 
        reply.session_id = htobe64(session->id);
 
-       session->current_trace_chunk =
-                       sessiond_trace_chunk_registry_get_anonymous_chunk(
-                               sessiond_trace_chunk_registry, sessiond_uuid,
-                               session->id);
-       if (!session->current_trace_chunk) {
-               ret = -1;
-       }
-
 send_reply:
        if (ret < 0) {
                reply.ret_code = htobe32(LTTNG_ERR_FATAL);
This page took 0.023526 seconds and 4 git commands to generate.