From aeb968923d1245f4cb2be1eed2ab7b8b5eb45cf8 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 23 Feb 2012 17:30:41 -0500 Subject: [PATCH] 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 --- src/bin/lttng-sessiond/ust-consumer.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); -- 2.34.1