X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=inline;f=lttng-context-vtid.c;h=c428911ef98aff76bdb822dc72e494febcf41b64;hb=44252f0fd51fd4bf28926dcef525355bceb08c5f;hp=f81fff636acd35d914a2756c567e68d03d562c24;hpb=09fec6b43d11b3e0ece36f9e9e44b9627c1b565d;p=lttng-modules.git diff --git a/lttng-context-vtid.c b/lttng-context-vtid.c index f81fff63..c428911e 100644 --- a/lttng-context-vtid.c +++ b/lttng-context-vtid.c @@ -40,11 +40,14 @@ void vtid_record(struct lttng_ctx_field *field, int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx) { struct lttng_ctx_field *field; - int ret; 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;