From: David Goulet Date: Fri, 27 Jan 2012 21:39:17 +0000 (-0500) Subject: Don't iterate on events when adding context to channel X-Git-Tag: v2.0-pre19~43 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=442359c07132c8db3baca816a1f984fd318c7c88 Don't iterate on events when adding context to channel Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/context.c b/src/bin/lttng-sessiond/context.c index b5345728a..19eaa7145 100644 --- a/src/bin/lttng-sessiond/context.c +++ b/src/bin/lttng-sessiond/context.c @@ -313,7 +313,7 @@ int context_ust_add(struct ltt_ust_session *usess, int domain, char *channel_name) { int ret = LTTCOMM_OK, have_event = 0; - struct lttng_ht_iter iter, uiter; + struct lttng_ht_iter iter; struct lttng_ht *chan_ht; struct ltt_ust_channel *uchan = NULL; struct ltt_ust_event *uevent = NULL; @@ -389,17 +389,6 @@ int context_ust_add(struct ltt_ust_session *usess, int domain, ERR("Context added to channel %s failed", uchan->name); continue; } - - /* For all events in channel */ - cds_lfht_for_each_entry(uchan->events->ht, &uiter.iter, uevent, - node.node) { - ret = add_uctx_to_event(usess, domain, uchan, uevent, ctx); - if (ret < 0) { - ERR("Context add to event %s in channel %s failed", - uevent->attr.name, uchan->name); - continue; - } - } } }