/*
- * Copyright 2019 - Francis Deslauriers <francis.deslauriers@efficios.com>
- * Copyright 2016 - Philippe Proulx <pproulx@efficios.com>
- * Copyright 2010-2011 - EfficiOS Inc. and Linux Foundation
+ * SPDX-License-Identifier: MIT
*
- * Some functions are based on older functions written by Mathieu Desnoyers.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
+ * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
*/
#define BT_COMP_LOG_SELF_COMP self_comp
bt_self_component *self_comp = trace->self_comp;
enum lttng_live_get_one_metadata_status metadata_status;
- BT_COMP_LOGD("Updating metadata for trace: trace-id=%"PRIu64, trace->id);
+ BT_COMP_LOGD("Updating metadata for trace: session-id=%" PRIu64
+ ", trace-id=%" PRIu64, session->id, trace->id);
/* No metadata stream yet. */
if (!metadata) {
/* The metadata was updated succesfully. */
trace->metadata_stream_state = LTTNG_LIVE_METADATA_STREAM_STATE_NOT_NEEDED;
- break;
- case CTF_METADATA_DECODER_STATUS_INCOMPLETE:
- status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
break;
default:
goto error;
"Failed to create CTF metadata decoder");
goto error;
}
- trace = lttng_live_borrow_trace(session, ctf_trace_id);
+ trace = lttng_live_session_borrow_or_create_trace_by_id(session,
+ ctf_trace_id);
if (!trace) {
BT_COMP_LOGE_APPEND_CAUSE(self_comp,
"Failed to borrow trace");