- switch (lum->cmd) {
- case LTTNG_UST_STREAM:
- /*
- * Special-case reply to send stream info.
- * Use lum.u output.
- */
- lur.u.stream.memory_map_size = lum->u.stream.memory_map_size;
- shm_fd = lum->u.stream.shm_fd;
- wait_fd = lum->u.stream.wait_fd;
- break;
- case LTTNG_UST_METADATA:
- case LTTNG_UST_CHANNEL:
- lur.u.channel.memory_map_size = lum->u.channel.memory_map_size;
- shm_fd = lum->u.channel.shm_fd;
- wait_fd = lum->u.channel.wait_fd;
- break;
- case LTTNG_UST_TRACER_VERSION:
- lur.u.version = lum->u.version;
- break;
- case LTTNG_UST_TRACEPOINT_LIST_GET:
- memcpy(lur.u.tracepoint_list_entry,
- lum->u.tracepoint_list_entry,
- LTTNG_UST_SYM_NAME_LEN);
- break;
+ if (ret >= 0) {
+ switch (lum->cmd) {
+ case LTTNG_UST_STREAM:
+ /*
+ * Special-case reply to send stream info.
+ * Use lum.u output.
+ */
+ lur.u.stream.memory_map_size = *args.stream.memory_map_size;
+ shm_fd = *args.stream.shm_fd;
+ shm_path = args.stream.shm_path;
+ wait_fd = *args.stream.wait_fd;
+ wait_pipe_path = args.stream.wait_pipe_path;
+ break;
+ case LTTNG_UST_METADATA:
+ case LTTNG_UST_CHANNEL:
+ lur.u.channel.memory_map_size = *args.channel.memory_map_size;
+ shm_fd = *args.channel.shm_fd;
+ shm_path = args.channel.shm_path;
+ wait_fd = *args.channel.wait_fd;
+ wait_pipe_path = args.channel.wait_pipe_path;
+ break;
+ case LTTNG_UST_TRACER_VERSION:
+ lur.u.version = lum->u.version;
+ break;
+ case LTTNG_UST_TRACEPOINT_LIST_GET:
+ memcpy(&lur.u.tracepoint, &lum->u.tracepoint, sizeof(lur.u.tracepoint));
+ break;
+ }