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;
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;
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';
/* 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;
/* 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;