/*
* Sending a single channel to the consumer with command ADD_CHANNEL.
*/
-int kernel_consumer_add_channel(int sock, struct ltt_kernel_channel *channel)
+int kernel_consumer_add_channel(struct consumer_socket *sock,
+ struct ltt_kernel_channel *channel)
{
int ret;
struct lttcomm_consumer_msg lkm;
/*
* Sending metadata to the consumer with command ADD_CHANNEL and ADD_STREAM.
*/
-int kernel_consumer_add_metadata(int sock, struct ltt_kernel_session *session)
+int kernel_consumer_add_metadata(struct consumer_socket *sock,
+ struct ltt_kernel_session *session)
{
int ret;
char tmp_path[PATH_MAX];
/* Safety net */
assert(session);
assert(session->consumer);
+ assert(sock);
DBG("Sending metadata %d to kernel consumer", session->metadata_stream_fd);
/*
* Sending a single stream to the consumer with command ADD_STREAM.
*/
-int kernel_consumer_add_stream(int sock, struct ltt_kernel_channel *channel,
- struct ltt_kernel_stream *stream, struct ltt_kernel_session *session)
+int kernel_consumer_add_stream(struct consumer_socket *sock,
+ struct ltt_kernel_channel *channel, struct ltt_kernel_stream *stream,
+ struct ltt_kernel_session *session)
{
int ret;
char tmp_path[PATH_MAX];
assert(stream);
assert(session);
assert(session->consumer);
+ assert(sock);
DBG("Sending stream %d of channel %s to kernel consumer",
stream->fd, channel->channel->name);
/*
* Send all stream fds of kernel channel to the consumer.
*/
-int kernel_consumer_send_channel_stream(int sock,
+int kernel_consumer_send_channel_stream(struct consumer_socket *sock,
struct ltt_kernel_channel *channel, struct ltt_kernel_session *session)
{
int ret;
assert(channel);
assert(session);
assert(session->consumer);
+ assert(sock);
/* Bail out if consumer is disabled */
if (!session->consumer->enabled) {
/*
* Send all stream fds of the kernel session to the consumer.
*/
-int kernel_consumer_send_session(int sock, struct ltt_kernel_session *session)
+int kernel_consumer_send_session(struct consumer_socket *sock,
+ struct ltt_kernel_session *session)
{
int ret;
struct ltt_kernel_channel *chan;
/* Safety net */
assert(session);
assert(session->consumer);
+ assert(sock);
/* Bail out if consumer is disabled */
if (!session->consumer->enabled) {