-
- /*
- * Don't send relayd socket if URI is NOT remote or if the relayd
- * socket for the session was already sent.
- */
- if (uris[i].dtype == LTTNG_DST_PATH ||
- (uris[i].stype == LTTNG_STREAM_CONTROL &&
- consumer->dst.net.control_sock_sent) ||
- (uris[i].stype == LTTNG_STREAM_DATA &&
- consumer->dst.net.data_sock_sent)) {
- continue;
- }
-
- /* Try to send relayd URI to the consumer if exist. */
- rcu_read_lock();
- cds_lfht_for_each_entry(consumer->socks->ht, &iter.iter,
- socket, node.node) {
-
- /* A socket in the HT should never have a negative fd */
- assert(socket->fd >= 0);
-
- pthread_mutex_lock(socket->lock);
- ret = send_consumer_relayd_socket(domain, session, &uris[i],
- consumer, socket);
- pthread_mutex_unlock(socket->lock);
- if (ret != LTTNG_OK) {
- rcu_read_unlock();
- goto error;
- }
- }
- rcu_read_unlock();