X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-java-agent%2Fjni%2Fcommon%2Flttng_ust_context.c;h=52097896de82904de1bcb73f1f2eb8f3fa50d454;hb=daacdbfc04fe07ecff0a0d1878b4f48d38912c78;hp=3bed11ec8ff435768259a460d9dffbfb0636efc0;hpb=16adecf1f2e80025667ed53f4905e725894f076a;p=lttng-ust.git diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index 3bed11ec..52097896 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -1,20 +1,9 @@ /* - * Copyright (C) 2016 - EfficiOS Inc., Alexandre Montplaisir - * 2016 - EfficiOS Inc., Mathieu Desnoyers + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Copyright (C) 2016 EfficiOS Inc. + * Copyright (C) 2016 Alexandre Montplaisir + * Copyright (C) 2016 Mathieu Desnoyers */ #include "org_lttng_ust_agent_context_LttngContextApi.h" @@ -23,9 +12,9 @@ #include #include #include -#include +#include -#include "helper.h" +#include "ust-helper.h" #include "lttng_ust_context.h" enum lttng_ust_jni_type { @@ -84,7 +73,7 @@ static struct lttng_ust_jni_ctx_entry *lookup_ctx_by_name(const char *ctx_name) return NULL; } -static size_t get_size_cb(struct lttng_ctx_field *field, size_t offset) +static size_t get_size_cb(struct lttng_ust_ctx_field *field, size_t offset) { struct lttng_ust_jni_ctx_entry *jctx; size_t size = 0; @@ -146,7 +135,7 @@ static size_t get_size_cb(struct lttng_ctx_field *field, size_t offset) } -static void record_cb(struct lttng_ctx_field *field, +static void record_cb(struct lttng_ust_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, struct lttng_channel *chan) { @@ -267,8 +256,8 @@ static void record_cb(struct lttng_ctx_field *field, } } -static void get_value_cb(struct lttng_ctx_field *field, - struct lttng_ctx_value *value) +static void get_value_cb(struct lttng_ust_ctx_field *field, + struct lttng_ust_ctx_value *value) { struct lttng_ust_jni_ctx_entry *jctx; const char *ctx_name = field->event_field.name; @@ -365,6 +354,7 @@ JNIEXPORT jlong JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_registe if (!provider) { goto error_provider; } + provider->struct_size = sizeof(*provider); provider->name = provider_name_cstr; provider->get_size = get_size_cb; provider->record = record_cb;