X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fust-consumer.c;h=c02cbf96588c2c4701c7c9e9667c590582c1723e;hp=d6b80ff64f2cb134c051abe7b0c2bbd604147ddb;hb=bec399405a4667411ae06bbbcbed678e42e93a30;hpb=67cea2c94b841ee9b38ba80ab8a9eafff5f76408 diff --git a/lttng-sessiond/ust-consumer.c b/lttng-sessiond/ust-consumer.c index d6b80ff64..c02cbf965 100644 --- a/lttng-sessiond/ust-consumer.c +++ b/lttng-sessiond/ust-consumer.c @@ -23,11 +23,11 @@ #include #include +#include #include #include #include -#include "../common/hashtable.h" #include "ust-consumer.h" /* @@ -120,10 +120,9 @@ int ust_consumer_send_session(int consumer_fd, struct ust_app_session *usess) { int ret = 0; int sock = consumer_fd; - struct cds_lfht_iter iter; - struct cds_lfht_node *node; + struct lttng_ht_iter iter; struct lttcomm_consumer_msg lum; - struct ust_app_channel *uchan; + struct ust_app_channel *ua_chan; DBG("Sending metadata stream fd"); @@ -182,17 +181,13 @@ int ust_consumer_send_session(int consumer_fd, struct ust_app_session *usess) /* Send each channel fd streams of session */ rcu_read_lock(); - hashtable_get_first(usess->channels, &iter); - while ((node = hashtable_iter_get_node(&iter)) != NULL) { - uchan = caa_container_of(node, struct ust_app_channel, node); - - ret = send_channel_streams(sock, uchan, usess->uid, - usess->gid); + cds_lfht_for_each_entry(usess->channels->ht, &iter.iter, ua_chan, + node.node) { + ret = send_channel_streams(sock, ua_chan, usess->uid, usess->gid); if (ret < 0) { rcu_read_unlock(); goto error; } - hashtable_get_next(usess->channels, &iter); } rcu_read_unlock();