- {
- lttng::urcu::read_lock_guard read_lock;
-
- cds_lfht_for_each_entry (
- session->snapshot.output_ht->ht, &iter.iter, output, node.node) {
- LTTNG_ASSERT(output->consumer);
- list[idx].id = output->id;
- list[idx].max_size = output->max_size;
- if (lttng_strncpy(list[idx].name, output->name, sizeof(list[idx].name))) {
+ for (auto *output : lttng::urcu::lfht_iteration_adapter<snapshot_output,
+ decltype(snapshot_output::node),
+ &snapshot_output::node>(
+ *session->snapshot.output_ht->ht)) {
+ LTTNG_ASSERT(output->consumer);
+ list[idx].id = output->id;
+ list[idx].max_size = output->max_size;
+ if (lttng_strncpy(list[idx].name, output->name, sizeof(list[idx].name))) {
+ ret = -LTTNG_ERR_INVALID;
+ goto error;
+ }
+
+ if (output->consumer->type == CONSUMER_DST_LOCAL) {
+ if (lttng_strncpy(list[idx].ctrl_url,
+ output->consumer->dst.session_root_path,
+ sizeof(list[idx].ctrl_url))) {