/* Flag that the corresponding socket was sent. */
if (relayd_uri->stype == LTTNG_STREAM_CONTROL) {
- consumer->dst.net.control_sock_sent = 1;
+ consumer_sock->control_sock_sent = 1;
} else if (relayd_uri->stype == LTTNG_STREAM_DATA) {
- consumer->dst.net.data_sock_sent = 1;
+ consumer_sock->data_sock_sent = 1;
}
ret = LTTNG_OK;
assert(consumer);
/* Sending control relayd socket. */
- if (!consumer->dst.net.control_sock_sent) {
+ if (!sock->control_sock_sent) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.control, consumer, sock);
if (ret != LTTNG_OK) {
}
/* Sending data relayd socket. */
- if (!consumer->dst.net.data_sock_sent) {
+ if (!sock->data_sock_sent) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.data, consumer, sock);
if (ret != LTTNG_OK) {
goto error;
}
- /*
- * 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)) {
+ /* Don't send relayd socket if URI is NOT remote */
+ if (uris[i].dtype == LTTNG_DST_PATH) {
continue;
}
*/
unsigned int registered;
+ /*
+ * Flag if relayd network sockets were sent to the consumer through this
+ * socket.
+ */
+ unsigned int control_sock_sent;
+ unsigned int data_sock_sent;
+
struct lttng_ht_node_ulong node;
};
/* Data path for network streaming. */
struct lttng_uri data;
-
- /* Flag if network sockets were sent to the consumer. */
- unsigned int control_sock_sent;
- unsigned int data_sock_sent;
};
/*