X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng-context-vppid.c;h=4abf784613afebf844f9be3ed92946519dbff31f;hb=44252f0fd51fd4bf28926dcef525355bceb08c5f;hp=d55e12db6b2541afd1d7da7274fdb6385f326088;hpb=96ba7208aa8009345a525148e32f78cd8d4693ab;p=deliverable%2Flttng-modules.git diff --git a/lttng-context-vppid.c b/lttng-context-vppid.c index d55e12db..4abf7846 100644 --- a/lttng-context-vppid.c +++ b/lttng-context-vppid.c @@ -47,6 +47,10 @@ int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx) field = lttng_append_context(ctx); if (!field) return -ENOMEM; + if (lttng_find_context(*ctx, "vppid")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } field->event_field.name = "vppid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;