X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lttng-context-vtid.c;h=c428911ef98aff76bdb822dc72e494febcf41b64;hb=8b440ce8ee43c559fa1bab4f9a0f92fc0cd3e651;hp=522d2bd6112b8bb74c9be53ea172324f7d1363f4;hpb=74a747024b7d44431e22a6ce3c628ad72d2700a5;p=lttng-modules.git diff --git a/lttng-context-vtid.c b/lttng-context-vtid.c index 522d2bd6..c428911e 100644 --- a/lttng-context-vtid.c +++ b/lttng-context-vtid.c @@ -44,6 +44,10 @@ int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx) field = lttng_append_context(ctx); if (!field) return -ENOMEM; + if (lttng_find_context(*ctx, "vtid")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } field->event_field.name = "vtid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;