- DBG("Consumer mkdir %s in session %" PRIu64,
- msg.u.mkdir.path,
- msg.u.mkdir.session_id);
- ret = lttng_consumer_mkdir(msg.u.mkdir.path,
- msg.u.mkdir.uid,
- msg.u.mkdir.gid,
- msg.u.mkdir.relayd_id);
- if (ret < 0) {
- ERR("consumer mkdir failed");
- ret_code = LTTCOMM_CONSUMERD_MKDIR_FAILED;
+ enum lttng_trace_chunk_command_type close_command =
+ msg.u.close_trace_chunk.close_command.value;
+ const uint64_t relayd_id =
+ msg.u.close_trace_chunk.relayd_id.value;
+ struct lttcomm_consumer_close_trace_chunk_reply reply;
+ char path[LTTNG_PATH_MAX];
+
+ ret_code = lttng_consumer_close_trace_chunk(
+ msg.u.close_trace_chunk.relayd_id.is_set ?
+ &relayd_id :
+ NULL,
+ msg.u.close_trace_chunk.session_id,
+ msg.u.close_trace_chunk.chunk_id,
+ (time_t) msg.u.close_trace_chunk.close_timestamp,
+ msg.u.close_trace_chunk.close_command.is_set ?
+ &close_command :
+ NULL, path);
+ reply.ret_code = ret_code;
+ reply.path_length = strlen(path) + 1;
+ ret = lttcomm_send_unix_sock(sock, &reply, sizeof(reply));
+ if (ret != sizeof(reply)) {
+ goto error_fatal;