From: David Goulet Date: Thu, 23 Feb 2012 22:30:41 +0000 (-0500) Subject: Fix: handling bad channel when sending to consumer X-Git-Tag: v2.0.0-rc2~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aeb968923d1245f4cb2be1eed2ab7b8b5eb45cf8;p=lttng-tools.git Fix: handling bad channel when sending to consumer If the channel object is NULL it means that it's not created on the tracer. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/ust-consumer.c b/src/bin/lttng-sessiond/ust-consumer.c index 26ebfac49..d758c8821 100644 --- a/src/bin/lttng-sessiond/ust-consumer.c +++ b/src/bin/lttng-sessiond/ust-consumer.c @@ -182,6 +182,14 @@ int ust_consumer_send_session(int consumer_fd, struct ust_app_session *usess) rcu_read_lock(); cds_lfht_for_each_entry(usess->channels->ht, &iter.iter, ua_chan, node.node) { + /* + * Indicate that the channel was not created on the tracer side so skip + * sending unexisting streams. + */ + if (ua_chan->obj == NULL) { + continue; + } + ret = send_channel_streams(sock, ua_chan, usess->uid, usess->gid); if (ret < 0) { rcu_read_unlock();