Fix: handling bad channel when sending to consumer
authorDavid Goulet <dgoulet@efficios.com>
Thu, 23 Feb 2012 22:30:41 +0000 (17:30 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 23 Feb 2012 22:30:41 +0000 (17:30 -0500)
If the channel object is NULL it means that it's not created on the
tracer.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/ust-consumer.c

index 26ebfac496c30ed9aa33d53028f36f8cd0495a92..d758c8821cdb295ac4fa31cebad3aef13993ac3a 100644 (file)
@@ -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();
This page took 0.033833 seconds and 4 git commands to generate.