int ret;
struct lttcomm_sock *sock = NULL;
+ /* Don't resend the sockets to the consumer. */
+ if (consumer->dst.net.relayd_socks_sent) {
+ ret = LTTNG_OK;
+ goto error;
+ }
+
/* Set the network sequence index if not set. */
if (consumer->net_seq_index == -1) {
/*
lttcomm_destroy_sock(sock);
}
+error:
return ret;
}
nb_chan = session->kernel_session->channel_count;
}
DBG3("Number of kernel channels %zd", nb_chan);
+ if (nb_chan <= 0) {
+ ret = LTTNG_ERR_KERN_CHAN_NOT_FOUND;
+ }
break;
case LTTNG_DOMAIN_UST:
if (session->ust_session != NULL) {
session->ust_session->domain_global.channels);
}
DBG3("Number of UST global channels %zd", nb_chan);
+ if (nb_chan <= 0) {
+ ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
+ }
break;
default:
*channels = NULL;
list_lttng_channels(domain, session, *channels);
} else {
*channels = NULL;
+ /* Ret value was set in the domain switch case */
+ goto error;
}
return nb_chan;