From: Jonathan Rajotte Date: Tue, 11 Sep 2018 00:09:13 +0000 (-0400) Subject: Fix: skip uid registry when metadata key is 0 X-Git-Tag: v2.9.11~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=35a7d6862a46621646383b14795f461a8b62cf13;p=lttng-tools.git Fix: skip uid registry when metadata key is 0 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 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 54c22df76..ee78327ef 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -5862,6 +5862,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);