Fix UST channel/stream output assignation
[lttng-tools.git] / src / common / consumer.c
index 5574c5f0e1d545691f6837d2d4100a10c2a59e48..0518f44ca902e8b55054d93a28a17314b89a740f 100644 (file)
@@ -769,6 +769,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
                enum lttng_event_output output,
                uint64_t tracefile_size,
                uint64_t tracefile_count,
+               uint64_t session_id_per_pid,
                unsigned int monitor)
 {
        struct lttng_consumer_channel *channel;
@@ -782,6 +783,7 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
        channel->key = key;
        channel->refcount = 0;
        channel->session_id = session_id;
+       channel->session_id_per_pid = session_id_per_pid;
        channel->uid = uid;
        channel->gid = gid;
        channel->relayd_id = relayd_id;
@@ -803,20 +805,6 @@ struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
                channel->refcount = 1;
        }
 
-       switch (output) {
-       case LTTNG_EVENT_SPLICE:
-               channel->output = CONSUMER_CHANNEL_SPLICE;
-               break;
-       case LTTNG_EVENT_MMAP:
-               channel->output = CONSUMER_CHANNEL_MMAP;
-               break;
-       default:
-               ERR("Allocate channel output unknown %d", output);
-               free(channel);
-               channel = NULL;
-               goto end;
-       }
-
        strncpy(channel->pathname, pathname, sizeof(channel->pathname));
        channel->pathname[sizeof(channel->pathname) - 1] = '\0';
 
This page took 0.024042 seconds and 4 git commands to generate.