Fix multi-session UST handling combined with shm fd teardown
[lttng-tools.git] / liblttng-ustconsumer / lttng-ustconsumer.c
index 806ebd3c03977f340245ed41e98047a7255461fc..f938d3548d9e8ed4ef049333efe1fc1aa16d1a0c 100644 (file)
@@ -175,7 +175,6 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                                msg.u.channel.mmap_len,
                                msg.u.channel.max_sb_size);
                if (new_channel == NULL) {
-                       fprintf(stderr, "AAAAA\n");
                        lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
                        goto end_nosignal;
                }
@@ -210,7 +209,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                DBG("consumer_add_stream %s (%d,%d)", msg.u.stream.path_name,
                        fds[0], fds[1]);
                assert(msg.u.stream.output == LTTNG_EVENT_MMAP);
-               new_stream = consumer_allocate_stream(msg.u.stream.channel_key,
+               new_stream = consumer_allocate_stream(msg.u.channel.channel_key,
                                msg.u.stream.stream_key,
                                fds[0], fds[1],
                                msg.u.stream.state,
@@ -218,7 +217,6 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                                msg.u.stream.output,
                                msg.u.stream.path_name);
                if (new_stream == NULL) {
-                       fprintf(stderr, "BBBBBB\n");
                        lttng_consumer_send_error(ctx, CONSUMERD_OUTFD_ERROR);
                        goto end;
                }
@@ -236,6 +234,8 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
        }
        case LTTNG_CONSUMER_UPDATE_STREAM:
        {
+               return -ENOSYS;
+#if 0
                if (ctx->on_update_stream != NULL) {
                        ret = ctx->on_update_stream(msg.u.stream.stream_key, msg.u.stream.state);
                        if (ret == 0) {
@@ -247,6 +247,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                        consumer_change_stream_state(msg.u.stream.stream_key,
                                msg.u.stream.state);
                }
+#endif
                break;
        }
        default:
This page took 0.024317 seconds and 4 git commands to generate.