Clean-up: ustctl: adapt comment to use new ABI name
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index 5fd54df82f62e03ad739dacf977177ac6fb01109..adf23af64a952cc9444776541c4ea07bfba5a900 100644 (file)
@@ -587,9 +587,10 @@ int ustctl_create_event_notifier(int sock, struct lttng_ust_abi_event_notifier *
                free(event_notifier_data);
                return ret;
        }
-       /* Send struct lttng_ust_event_notifier */
+       /* Send struct lttng_ust_abi_event_notifier */
        len = ustcomm_send_unix_sock(sock, event_notifier, sizeof(*event_notifier));
        if (len != sizeof(*event_notifier)) {
+               free(event_notifier_data);
                if (len < 0)
                        return len;
                else
@@ -1279,7 +1280,7 @@ struct ustctl_consumer_channel *
        if (!chan)
                return NULL;
 
-       chan->chan = transport->ops.channel_create(transport_name, NULL,
+       chan->chan = transport->ops.priv->channel_create(transport_name, NULL,
                        attr->subbuf_size, attr->num_subbuf,
                        attr->switch_timer_interval,
                        attr->read_timer_interval,
@@ -1304,7 +1305,7 @@ void ustctl_destroy_channel(struct ustctl_consumer_channel *chan)
 {
        (void) ustctl_channel_close_wait_fd(chan);
        (void) ustctl_channel_close_wakeup_fd(chan);
-       chan->chan->ops->channel_destroy(chan->chan);
+       chan->chan->ops->priv->channel_destroy(chan->chan);
        free(chan);
 }
 
@@ -1350,7 +1351,7 @@ int ustctl_write_metadata_to_channel(
 
        for (pos = 0; pos < len; pos += reserve_len) {
                reserve_len = min_t(size_t,
-                               chan->ops->packet_avail_size(chan->chan, chan->handle),
+                               chan->ops->priv->packet_avail_size(chan->chan, chan->handle),
                                len - pos);
                lib_ring_buffer_ctx_init(&ctx, chan->chan, NULL, reserve_len,
                                         sizeof(char), -1, chan->handle);
@@ -1397,7 +1398,7 @@ ssize_t ustctl_write_one_packet_to_channel(
        int ret;
 
        reserve_len = min_t(ssize_t,
-                       chan->ops->packet_avail_size(chan->chan, chan->handle),
+                       chan->ops->priv->packet_avail_size(chan->chan, chan->handle),
                        len);
        lib_ring_buffer_ctx_init(&ctx, chan->chan, NULL, reserve_len,
                        sizeof(char), -1, chan->handle);
@@ -1417,7 +1418,7 @@ end:
 
 int ustctl_channel_close_wait_fd(struct ustctl_consumer_channel *consumer_chan)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        int ret;
 
        chan = consumer_chan->chan->chan;
@@ -1430,7 +1431,7 @@ int ustctl_channel_close_wait_fd(struct ustctl_consumer_channel *consumer_chan)
 
 int ustctl_channel_close_wakeup_fd(struct ustctl_consumer_channel *consumer_chan)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        int ret;
 
        chan = consumer_chan->chan->chan;
@@ -1443,7 +1444,7 @@ int ustctl_channel_close_wakeup_fd(struct ustctl_consumer_channel *consumer_chan
 
 int ustctl_stream_close_wait_fd(struct ustctl_consumer_stream *stream)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
 
        chan = stream->chan->chan->chan;
        return ring_buffer_stream_close_wait_fd(&chan->backend.config,
@@ -1452,7 +1453,7 @@ int ustctl_stream_close_wait_fd(struct ustctl_consumer_stream *stream)
 
 int ustctl_stream_close_wakeup_fd(struct ustctl_consumer_stream *stream)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
 
        chan = stream->chan->chan->chan;
        return ring_buffer_stream_close_wakeup_fd(&chan->backend.config,
@@ -1465,7 +1466,7 @@ struct ustctl_consumer_stream *
 {
        struct ustctl_consumer_stream *stream;
        struct lttng_ust_shm_handle *handle;
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        int shm_fd, wait_fd, wakeup_fd;
        uint64_t memory_map_size;
        struct lttng_ust_lib_ring_buffer *buf;
@@ -1578,7 +1579,7 @@ int ustctl_get_mmap_len(struct ustctl_consumer_stream *stream,
 {
        struct ustctl_consumer_channel *consumer_chan;
        unsigned long mmap_buf_len;
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
 
        if (!stream)
                return -EINVAL;
@@ -1600,7 +1601,7 @@ int ustctl_get_max_subbuf_size(struct ustctl_consumer_stream *stream,
                unsigned long *len)
 {
        struct ustctl_consumer_channel *consumer_chan;
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
 
        if (!stream)
                return -EINVAL;
@@ -1619,7 +1620,7 @@ int ustctl_get_max_subbuf_size(struct ustctl_consumer_stream *stream,
 int ustctl_get_mmap_read_offset(struct ustctl_consumer_stream *stream,
                unsigned long *off)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        unsigned long sb_bindex;
        struct lttng_ust_lib_ring_buffer *buf;
        struct ustctl_consumer_channel *consumer_chan;
@@ -1651,7 +1652,7 @@ int ustctl_get_subbuf_size(struct ustctl_consumer_stream *stream,
                unsigned long *len)
 {
        struct ustctl_consumer_channel *consumer_chan;
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        struct lttng_ust_lib_ring_buffer *buf;
 
        if (!stream)
@@ -1670,7 +1671,7 @@ int ustctl_get_padded_subbuf_size(struct ustctl_consumer_stream *stream,
                unsigned long *len)
 {
        struct ustctl_consumer_channel *consumer_chan;
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        struct lttng_ust_lib_ring_buffer *buf;
 
        if (!stream)
@@ -1835,7 +1836,7 @@ struct lttng_ust_client_lib_ring_buffer_client_cb *get_client_cb(
                struct lttng_ust_lib_ring_buffer *buf,
                struct lttng_ust_shm_handle *handle)
 {
-       struct channel *chan;
+       struct lttng_ust_lib_ring_buffer_channel *chan;
        const struct lttng_ust_lib_ring_buffer_config *config;
        struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb;
 
This page took 0.025972 seconds and 4 git commands to generate.