X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fchannel.c;h=7ea43b8f39c5b6f0ba5253f018d40dc6fa72f821;hb=00a620843422e5c972aee0ada2181b811fc81b92;hp=fc343f5910a8babab0737a90955284209438061f;hpb=ad7a91070f0b04bf69868efcbc572602449ac9bf;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/channel.c b/src/bin/lttng-sessiond/channel.c index fc343f591..7ea43b8f3 100644 --- a/src/bin/lttng-sessiond/channel.c +++ b/src/bin/lttng-sessiond/channel.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -369,6 +370,14 @@ int channel_ust_create(struct ltt_ust_session *usess, if (strncmp(uchan->name, DEFAULT_METADATA_NAME, sizeof(uchan->name))) { lttng_ht_add_unique_str(usess->domain_global.channels, &uchan->node); + } else { + /* + * Copy channel attribute to session if this is metadata so if NO + * application exists we can access that data in the shadow copy during + * the global update of newly registered application. + */ + memcpy(&usess->metadata_attr, &uchan->attr, + sizeof(usess->metadata_attr)); } rcu_read_unlock();