static
struct stack *stack_new(struct bt_msg_iter *notit)
{
+ bt_self_component *self_comp = notit->self_comp;
struct stack *stack = NULL;
stack = g_new0(struct stack, 1);
if (!stack) {
- BT_COMP_LOGE_STR("Failed to allocate one stack.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Failed to allocate one stack.");
goto error;
}
stack->notit = notit;
stack->entries = g_array_new(FALSE, TRUE, sizeof(struct stack_entry));
if (!stack->entries) {
- BT_COMP_LOGE_STR("Failed to allocate a GArray.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Failed to allocate a GArray.");
goto error;
}
enum bt_msg_iter_status request_medium_bytes(
struct bt_msg_iter *notit)
{
+ bt_self_component *self_comp = notit->self_comp;
uint8_t *buffer_addr = NULL;
size_t buffer_sz = 0;
enum bt_msg_iter_medium_status m_status;
}
/* All other states are invalid */
- BT_COMP_LOGW("User function returned %s, but message iterator is in an unexpected state: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "User function returned %s, but message iterator is in an unexpected state: "
"state=%s, cur-packet-size=%" PRId64 ", cur=%zu, "
"packet-cur=%zu, last-eh-at=%zu",
bt_msg_iter_medium_status_string(m_status),
notit->buf.last_eh_at);
m_status = BT_MSG_ITER_MEDIUM_STATUS_ERROR;
} else if (m_status < 0) {
- BT_COMP_LOGW("User function failed: status=%s",
- bt_msg_iter_medium_status_string(m_status));
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp, "User function failed: "
+ "status=%s", bt_msg_iter_medium_status_string(m_status));
}
end:
bt_field *dscope_field)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_bfcr_status bfcr_status;
size_t consumed_bits;
notit->state = continue_state;
break;
default:
- BT_COMP_LOGW("BFCR failed to start: notit-addr=%p, bfcr-addr=%p, "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "BFCR failed to start: notit-addr=%p, bfcr-addr=%p, "
"status=%s", notit, notit->bfcr,
bt_bfcr_status_string(bfcr_status));
status = BT_MSG_ITER_STATUS_ERROR;
struct bt_msg_iter *notit, enum state done_state)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_bfcr_status bfcr_status;
size_t consumed_bits;
status = buf_ensure_available_bits(notit);
if (status != BT_MSG_ITER_STATUS_OK) {
if (status < 0) {
- BT_COMP_LOGW("Cannot ensure that buffer has at least one byte: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot ensure that buffer has at least one byte: "
"msg-addr=%p, status=%s",
notit, bt_msg_iter_status_string(status));
} else {
BT_COMP_LOGT_STR("BFCR needs more data to decode field completely.");
break;
default:
- BT_COMP_LOGW("BFCR failed to continue: notit-addr=%p, bfcr-addr=%p, "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "BFCR failed to continue: notit-addr=%p, bfcr-addr=%p, "
"status=%s", notit, notit->bfcr,
bt_bfcr_status_string(bfcr_status));
status = BT_MSG_ITER_STATUS_ERROR;
enum bt_msg_iter_status switch_packet_state(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
/*
* We don't put the stream class here because we need to make
/* Packets are assumed to start on a byte frontier. */
if (notit->buf.at % CHAR_BIT) {
- BT_COMP_LOGW("Cannot switch packet: current position is not a multiple of 8: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot switch packet: current position is not a multiple of 8: "
"notit-addr=%p, cur=%zu", notit, notit->buf.at);
status = BT_MSG_ITER_STATUS_ERROR;
goto end;
struct bt_msg_iter *notit)
{
struct ctf_field_class *packet_header_fc = NULL;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
/*
STATE_AFTER_TRACE_PACKET_HEADER,
STATE_DSCOPE_TRACE_PACKET_HEADER_CONTINUE, NULL);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode packet header field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode packet header field: "
"notit-addr=%p, trace-class-addr=%p, "
"fc-addr=%p",
notit, notit->meta.tc, packet_header_fc);
enum bt_msg_iter_status set_current_stream_class(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_stream_class *new_stream_class = NULL;
if (notit->cur_stream_class_id == -1) {
* stream class.
*/
if (notit->meta.tc->stream_classes->len != 1) {
- BT_COMP_LOGW("Need exactly one stream class since there's "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Need exactly one stream class since there's "
"no stream class ID field: "
"notit-addr=%p", notit);
status = BT_MSG_ITER_STATUS_ERROR;
new_stream_class = ctf_trace_class_borrow_stream_class_by_id(
notit->meta.tc, notit->cur_stream_class_id);
if (!new_stream_class) {
- BT_COMP_LOGW("No stream class with ID of stream class ID to use in trace class: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "No stream class with ID of stream class ID to use in trace class: "
"notit-addr=%p, stream-class-id=%" PRIu64 ", "
"trace-class-addr=%p",
notit, notit->cur_stream_class_id, notit->meta.tc);
if (notit->meta.sc) {
if (new_stream_class != notit->meta.sc) {
- BT_COMP_LOGW("Two packets refer to two different stream classes within the same packet sequence: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Two packets refer to two different stream classes within the same packet sequence: "
"notit-addr=%p, prev-stream-class-addr=%p, "
"prev-stream-class-id=%" PRId64 ", "
"next-stream-class-addr=%p, "
enum bt_msg_iter_status set_current_stream(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
bt_stream *stream = NULL;
BT_COMP_LOGD("Calling user function (get stream): notit-addr=%p, "
bt_stream_get_ref(stream);
BT_COMP_LOGD("User function returned: stream-addr=%p", stream);
if (!stream) {
- BT_COMP_LOGW_STR("User function failed to return a stream object "
- "for the given stream class.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "User function failed to return a stream object for the given stream class.");
status = BT_MSG_ITER_STATUS_ERROR;
goto end;
}
if (notit->stream && stream != notit->stream) {
- BT_COMP_LOGW("User function returned a different stream than the "
- "previous one for the same sequence of packets.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "User function returned a different stream than the previous one for the same sequence of packets.");
status = BT_MSG_ITER_STATUS_ERROR;
goto end;
}
enum bt_msg_iter_status set_current_packet(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
bt_packet *packet = NULL;
BT_COMP_LOGD("Creating packet from stream: "
BT_ASSERT(notit->stream);
packet = bt_packet_create(notit->stream);
if (!packet) {
- BT_COMP_LOGE("Cannot create packet from stream: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create packet from stream: "
"notit-addr=%p, stream-addr=%p, "
"stream-class-addr=%p, "
"stream-class-id=%" PRId64,
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *packet_context_fc;
BT_ASSERT(notit->meta.sc);
bt_packet_context_field_create(
notit->meta.sc->ir_sc);
if (!notit->packet_context_field) {
- BT_COMP_LOGE_STR("Cannot create packet context field wrapper from stream class.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create packet context field wrapper from stream class.");
status = BT_MSG_ITER_STATUS_ERROR;
goto end;
}
STATE_DSCOPE_STREAM_PACKET_CONTEXT_CONTINUE,
notit->dscopes.stream_packet_context);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode packet context field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode packet context field: "
"notit-addr=%p, stream-class-addr=%p, "
"stream-class-id=%" PRId64 ", fc-addr=%p",
notit, notit->meta.sc,
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
if (notit->cur_exp_packet_total_size == -1) {
if (notit->cur_exp_packet_content_size != -1) {
if (notit->cur_exp_packet_content_size >
notit->cur_exp_packet_total_size) {
- BT_COMP_LOGW("Invalid packet or content size: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Invalid packet or content size: "
"content size is greater than packet size: "
"notit-addr=%p, packet-context-field-addr=%p, "
"packet-size=%" PRId64 ", content-size=%" PRId64,
enum bt_msg_iter_status read_event_header_begin_state(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *event_header_fc = NULL;
/* Reset the position of the last event header */
STATE_AFTER_EVENT_HEADER,
STATE_DSCOPE_EVENT_HEADER_CONTINUE, NULL);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode event header field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode event header field: "
"notit-addr=%p, stream-class-addr=%p, "
"stream-class-id=%" PRId64 ", fc-addr=%p",
notit, notit->meta.sc,
enum bt_msg_iter_status set_current_event_class(struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_event_class *new_event_class = NULL;
* event class.
*/
if (notit->meta.sc->event_classes->len != 1) {
- BT_COMP_LOGW("Need exactly one event class since there's "
- "no event class ID field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Need exactly one event class since there's no event class ID field: "
"notit-addr=%p", notit);
status = BT_MSG_ITER_STATUS_ERROR;
goto end;
new_event_class = ctf_stream_class_borrow_event_class_by_id(
notit->meta.sc, notit->cur_event_class_id);
if (!new_event_class) {
- BT_COMP_LOGW("No event class with ID of event class ID to use in stream class: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "No event class with ID of event class ID to use in stream class: "
"notit-addr=%p, stream-class-id=%" PRIu64 ", "
"event-class-id=%" PRIu64 ", "
"trace-class-addr=%p",
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
bt_message *msg = NULL;
BT_ASSERT_DBG(notit->meta.ec);
}
if (!msg) {
- BT_COMP_LOGE("Cannot create event message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create event message: "
"notit-addr=%p, ec-addr=%p, ec-name=\"%s\", "
"packet-addr=%p",
notit, notit->meta.ec,
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *event_common_context_fc;
event_common_context_fc = notit->meta.sc->event_common_context_fc;
STATE_DSCOPE_EVENT_COMMON_CONTEXT_CONTINUE,
notit->dscopes.event_common_context);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode event common context field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode event common context field: "
"notit-addr=%p, stream-class-addr=%p, "
"stream-class-id=%" PRId64 ", fc-addr=%p",
notit, notit->meta.sc,
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *event_spec_context_fc;
event_spec_context_fc = notit->meta.ec->spec_context_fc;
STATE_DSCOPE_EVENT_SPEC_CONTEXT_CONTINUE,
notit->dscopes.event_spec_context);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode event specific context field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode event specific context field: "
"notit-addr=%p, event-class-addr=%p, "
"event-class-name=\"%s\", "
"event-class-id=%" PRId64 ", fc-addr=%p",
struct bt_msg_iter *notit)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *event_payload_fc;
event_payload_fc = notit->meta.ec->payload_fc;
STATE_DSCOPE_EVENT_PAYLOAD_CONTINUE,
notit->dscopes.event_payload);
if (status < 0) {
- BT_COMP_LOGW("Cannot decode event payload field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot decode event payload field: "
"notit-addr=%p, event-class-addr=%p, "
"event-class-name=\"%s\", "
"event-class-id=%" PRId64 ", fc-addr=%p",
struct ctf_field_class *fc, void *data)
{
struct bt_msg_iter *notit = data;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
+
bt_field *field = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
break;
case CTF_FIELD_CLASS_MEANING_MAGIC:
if (value != 0xc1fc1fc1) {
- BT_COMP_LOGW("Invalid CTF magic number: notit-addr=%p, "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Invalid CTF magic number: notit-addr=%p, "
"magic=%" PRIx64, notit, value);
status = BT_BFCR_STATUS_ERROR;
goto end;
{
int ret;
struct bt_msg_iter *notit = data;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
bt_field *string_field = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
str[0] = (char) value;
ret = bt_field_string_append_with_length(string_field, str, 1);
if (ret) {
- BT_COMP_LOGE("Cannot append character to string field's value: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot append character to string field's value: "
"notit-addr=%p, field-addr=%p, ret=%d",
notit, string_field, ret);
status = BT_BFCR_STATUS_ERROR;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
bt_field *field = NULL;
struct bt_msg_iter *notit = data;
+ bt_self_component *self_comp = notit->self_comp;
int ret;
BT_COMP_LOGT("String (substring) function called from BFCR: "
/* Append current substring */
ret = bt_field_string_append_with_length(field, value, len);
if (ret) {
- BT_COMP_LOGE("Cannot append substring to string field's value: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot append substring to string field's value: "
"notit-addr=%p, field-addr=%p, string-length=%zu, "
"ret=%d", notit, field, len, ret);
status = BT_BFCR_STATUS_ERROR;
{
bt_field *seq_field;
struct bt_msg_iter *notit = data;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class_sequence *seq_fc = (void *) fc;
- int64_t length = -1;
+ int64_t length;
int ret;
length = (uint64_t) g_array_index(notit->stored_values, uint64_t,
ret = bt_field_array_dynamic_set_length(seq_field,
(uint64_t) length);
if (ret) {
- BT_COMP_LOGE("Cannot set dynamic array field's length field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot set dynamic array field's length field: "
"notit-addr=%p, field-addr=%p, "
"length=%" PRIu64, notit, seq_field, length);
+ length = -1;
}
}
struct bt_msg_iter *notit = data;
struct ctf_field_class_variant *var_fc = (void *) fc;
struct ctf_named_field_class *selected_option = NULL;
+ bt_self_component *self_comp = notit->self_comp;
struct ctf_field_class *ret_fc = NULL;
union {
uint64_t u;
}
if (option_index < 0) {
- BT_COMP_LOGW("Cannot find variant field class's option: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot find variant field class's option: "
"notit-addr=%p, var-fc-addr=%p, u-tag=%" PRIu64 ", "
"i-tag=%" PRId64, notit, var_fc, tag.u, tag.i);
+ ret_fc = NULL;
goto end;
}
ret = bt_field_variant_select_option_field_by_index(
var_field, option_index);
if (ret) {
- BT_COMP_LOGW("Cannot select variant field's option field: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot select variant field's option field: "
"notit-addr=%p, var-field-addr=%p, "
"opt-index=%" PRId64, notit, var_field,
option_index);
+ ret_fc = NULL;
goto end;
}
}
static
bt_message *create_msg_stream_beginning(struct bt_msg_iter *notit)
{
+ bt_self_component *self_comp = notit->self_comp;
bt_message *msg;
BT_ASSERT(notit->stream);
msg = bt_message_stream_beginning_create(notit->msg_iter,
notit->stream);
if (!msg) {
- BT_COMP_LOGE("Cannot create stream beginning message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create stream beginning message: "
"notit-addr=%p, stream-addr=%p",
notit, notit->stream);
}
static
bt_message *create_msg_stream_end(struct bt_msg_iter *notit)
{
+ bt_self_component *self_comp = notit->self_comp;
bt_message *msg;
if (!notit->stream) {
- BT_COMP_LOGE("Cannot create stream for stream message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create stream end message because stream is NULL: "
"notit-addr=%p", notit);
msg = NULL;
goto end;
msg = bt_message_stream_end_create(notit->msg_iter,
notit->stream);
if (!msg) {
- BT_COMP_LOGE("Cannot create stream end message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create stream end message: "
"notit-addr=%p, stream-addr=%p",
notit, notit->stream);
}
bt_message *create_msg_packet_beginning(struct bt_msg_iter *notit,
bool use_default_cs)
{
+ bt_self_component *self_comp = notit->self_comp;
int ret;
bt_message *msg;
const bt_stream_class *sc = notit->meta.sc->ir_sc;
}
if (!msg) {
- BT_COMP_LOGE("Cannot create packet beginning message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create packet beginning message: "
"notit-addr=%p, packet-addr=%p",
notit, notit->packet);
goto end;
{
bt_message *msg;
bool update_default_cs = true;
+ bt_self_component *self_comp = notit->self_comp;
if (!notit->packet) {
msg = NULL;
}
if (!msg) {
- BT_COMP_LOGE("Cannot create packet end message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create packet end message: "
"notit-addr=%p, packet-addr=%p",
notit, notit->packet);
goto end;
bt_message *create_msg_discarded_events(struct bt_msg_iter *notit)
{
bt_message *msg;
+ bt_self_component *self_comp = notit->self_comp;
uint64_t beginning_raw_value = UINT64_C(-1);
uint64_t end_raw_value = UINT64_C(-1);
}
if (!msg) {
- BT_COMP_LOGE("Cannot create discarded events message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create discarded events message: "
"notit-addr=%p, stream-addr=%p",
notit, notit->stream);
goto end;
bt_message *create_msg_discarded_packets(struct bt_msg_iter *notit)
{
bt_message *msg;
+ bt_self_component *self_comp = notit->self_comp;
BT_ASSERT(notit->msg_iter);
BT_ASSERT(notit->stream);
}
if (!msg) {
- BT_COMP_LOGE("Cannot create discarded packets message: "
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot create discarded packets message: "
"notit-addr=%p, stream-addr=%p",
notit, notit->stream);
goto end;
g_array_set_size(notit->stored_values, tc->stored_value_count);
if (!notit->stack) {
- BT_COMP_LOGE_STR("Failed to create field stack.");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Failed to create field stack.");
goto error;
}
notit->bfcr = bt_bfcr_create(cbs, notit, log_level, NULL);
if (!notit->bfcr) {
- BT_COMP_LOGE_STR("Failed to create binary class reader (BFCR).");
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Failed to create binary class reader (BFCR).");
goto error;
}
bt_self_message_iterator *msg_iter, bt_message **message)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
BT_ASSERT_DBG(notit);
BT_ASSERT_DBG(message);
BT_COMP_LOGD_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN.");
goto end;
} else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) {
- BT_COMP_LOGW("Cannot handle state: notit-addr=%p, state=%s",
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot handle state: notit-addr=%p, state=%s",
notit, state_string(notit->state));
goto end;
}
enum state target_state_1, enum state target_state_2)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
BT_ASSERT_DBG(notit);
notit->set_stream = false;
BT_COMP_LOGD_STR("Medium returned BT_MSG_ITER_STATUS_AGAIN.");
goto end;
} else if (G_UNLIKELY(status != BT_MSG_ITER_STATUS_OK)) {
- BT_COMP_LOGW("Cannot handle state: notit-addr=%p, state=%s",
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot handle state: notit-addr=%p, state=%s",
notit, state_string(notit->state));
goto end;
}
off_t offset)
{
enum bt_msg_iter_status status = BT_MSG_ITER_STATUS_OK;
+ bt_self_component *self_comp = notit->self_comp;
enum bt_msg_iter_medium_status medium_status;
BT_ASSERT(notit);
if (offset < 0) {
- BT_COMP_LOGE("Cannot seek to negative offset: offset=%jd", (intmax_t) offset);
+ BT_COMP_LOGE_APPEND_CAUSE(self_comp,
+ "Cannot seek to negative offset: offset=%jd",
+ (intmax_t) offset);
status = BT_MSG_ITER_STATUS_INVAL;
goto end;
}