X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=0518f44ca902e8b55054d93a28a17314b89a740f;hb=95a1109b9ea25871941d9fff87cd8c2b2cba61d3;hp=0565f54dfad4da97503a6eb6575e4c51110edc32;hpb=07b86b528dc279d59cdf16e6cb946c144fe773f2;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index 0565f54df..0518f44ca 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -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'; @@ -3107,6 +3095,7 @@ int consumer_add_relayd_socket(int net_seq_idx, int sock_type, /* Assign new file descriptor */ relayd->control_sock.sock.fd = fd; + fd = -1; /* For error path */ /* Assign version values. */ relayd->control_sock.major = relayd_sock->major; relayd->control_sock.minor = relayd_sock->minor; @@ -3152,6 +3141,7 @@ int consumer_add_relayd_socket(int net_seq_idx, int sock_type, /* Assign new file descriptor */ relayd->data_sock.sock.fd = fd; + fd = -1; /* for eventual error paths */ /* Assign version values. */ relayd->data_sock.major = relayd_sock->major; relayd->data_sock.minor = relayd_sock->minor;