Fix: skip uid registry when metadata key is 0
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 11 Sep 2018 00:09:13 +0000 (20:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Sep 2018 01:33:24 +0000 (21:33 -0400)
A value of zero for the metadata key indicate that metadata was never
created/pushed to the consumer.

This can occur in scenario were a tracker is present since metadata
might never be created/pushed.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index a76095eb5524a31814cd0231d791ddafcd4af05a..266022e7163460588f3009bb2047f49f882e151f 100644 (file)
@@ -5932,6 +5932,11 @@ int ust_app_snapshot_record(struct ltt_ust_session *usess,
                        struct buffer_reg_channel *reg_chan;
                        struct consumer_socket *socket;
 
+                       if (!reg->registry->reg.ust->metadata_key) {
+                               /* Skip since no metadata is present */
+                               continue;
+                       }
+
                        /* Get consumer socket to use to push the metadata.*/
                        socket = consumer_find_socket_by_bitness(reg->bits_per_long,
                                        usess->consumer);
This page took 0.028846 seconds and 4 git commands to generate.