unsigned int nr_streams, exp_streams;
chan = lttng_chan->chan;
- nr_streams = channel_handle_get_nr_streams(lttng_chan->handle);
+ nr_streams = channel_handle_get_nr_streams(lttng_chan->chan->handle);
exp_streams = chan->nr_streams;
return nr_streams == exp_streams;
}
goto alloc_error;
}
+ if (lttng_ust_session_uuid_validate(session, lttng_chan_config->uuid)) {
+ ret = -EINVAL;
+ goto uuid_error;
+ }
+
/* Lookup transport name */
switch (type) {
case LTTNG_UST_ABI_CHAN_PER_CPU:
lttng_chan_buf->ops = &transport->ops;
lttng_chan_buf->chan = chan;
- lttng_chan_buf->handle = channel_handle;
memcpy(&chan->backend.config,
transport->client_config,
/* error path after channel was created */
objd_error:
notransport:
+uuid_error:
alloc_error:
channel_destroy(chan, channel_handle, 0);
lttng_ust_free_channel_common(lttng_chan_buf->parent);
struct lttng_ust_channel_buffer *lttng_chan_buf = objd_private(channel_objd);
int ret;
- ret = channel_handle_add_stream(lttng_chan_buf->handle,
+ ret = channel_handle_add_stream(lttng_chan_buf->chan->handle,
uargs->stream.shm_fd, uargs->stream.wakeup_fd,
info->stream_nr, info->len);
if (ret)
return lttng_channel_disable(lttng_chan_buf->parent);
case LTTNG_UST_ABI_FLUSH_BUFFER:
return lttng_chan_buf->ops->priv->flush_buffer(lttng_chan_buf->chan,
- lttng_chan_buf->handle);
+ lttng_chan_buf->chan->handle);
default:
return -EINVAL;
}