X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-provider.c;h=50f73c6253cf340d90485540ce154dfdafd24d72;hb=fb31eb73d8a4a6d9784ed5c335b7fa3b9684108c;hp=6c067e2fecae06548a3d4495ef9477b2495a6a5b;hpb=797b05f6cf195a6699b6aff0a76b8e1274d5b51f;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index 6c067e2f..50f73c62 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -20,8 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE +#include +#include #include #include + #include #include "lttng-tracer-core.h" #include "jhash.h" @@ -67,10 +71,12 @@ int lttng_ust_context_provider_register(struct lttng_ust_context_provider *provi uint32_t hash; int ret = 0; + lttng_ust_fixup_tls(); + /* Provider name starts with "$app.". */ - if (strncmp("$app.", provider->name, strlen("$app.") != 0)) + if (strncmp("$app.", provider->name, strlen("$app.")) != 0) return -EINVAL; - /* Provider name cannot contain a column character. */ + /* Provider name cannot contain a colon character. */ if (strchr(provider->name, ':')) return -EINVAL; if (ust_lock()) { @@ -94,6 +100,8 @@ end: void lttng_ust_context_provider_unregister(struct lttng_ust_context_provider *provider) { + lttng_ust_fixup_tls(); + if (ust_lock()) goto end; lttng_ust_context_set_session_provider(provider->name,