debug_info->destruction_listener_id);
if (remove_listener_status != BT_TRACE_REMOVE_LISTENER_STATUS_OK) {
BT_COMP_LOGE("Trace destruction listener removal failed.");
+ bt_current_thread_clear_error();
}
g_free(debug_info);
debug_info = g_hash_table_lookup(debug_it->debug_info_map, trace);
if (!debug_info) {
+ bt_trace_add_listener_status add_listener_status;
+
debug_info = debug_info_create(debug_it->debug_info_component,
trace, &debug_it->fd_cache);
g_hash_table_insert(debug_it->debug_info_map, (gpointer) trace,
debug_info);
- bt_trace_add_destruction_listener(trace,
- trace_debug_info_remove_func, debug_it,
+ add_listener_status = bt_trace_add_destruction_listener(
+ trace, trace_debug_info_remove_func,
+ debug_it,
&debug_info->destruction_listener_id);
+ BT_ASSERT(add_listener_status == BT_TRACE_ADD_LISTENER_STATUS_OK);
}
q_event_name = g_quark_try_string(event_name);
BT_COMP_LOGE("Cannot set path component of \"bin\" "
"curr_field field's value: str-fc-addr=%p",
curr_field);
+ bt_current_thread_clear_error();
}
append_status = bt_field_string_append(curr_field,
BT_COMP_LOGE("Cannot set bin location component of \"bin\" "
"curr_field field's value: str-fc-addr=%p",
curr_field);
+ bt_current_thread_clear_error();
}
} else {
set_status = bt_field_string_set_value(curr_field, "");
if (set_status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"bin\" curr_field field's value: "
"str-fc-addr=%p", curr_field);
+ bt_current_thread_clear_error();
}
}
}
if (status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"func\" curr_field field's value: "
"str-fc-addr=%p", curr_field);
+ bt_current_thread_clear_error();
}
}
BT_COMP_LOGE("Cannot set path component of \"src\" "
"curr_field field's value: str-fc-addr=%p",
curr_field);
+ bt_current_thread_clear_error();
}
append_status = bt_field_string_append(curr_field, ":");
BT_COMP_LOGE("Cannot set colon component of \"src\" "
"curr_field field's value: str-fc-addr=%p",
curr_field);
+ bt_current_thread_clear_error();
}
append_status = bt_field_string_append(curr_field,
BT_COMP_LOGE("Cannot set line number component of \"src\" "
"curr_field field's value: str-fc-addr=%p",
curr_field);
+ bt_current_thread_clear_error();
}
} else {
set_status = bt_field_string_set_value(curr_field, "");
if (set_status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"src\" curr_field field's value: "
"str-fc-addr=%p", curr_field);
+ bt_current_thread_clear_error();
}
}
}
if (status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"bin\" bin_field field's value: "
"str-fc-addr=%p", bin_field);
+ bt_current_thread_clear_error();
}
status = bt_field_string_set_value(func_field, "");
if (status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"func\" func_field field's value: "
"str-fc-addr=%p", func_field);
+ bt_current_thread_clear_error();
}
status = bt_field_string_set_value(src_field, "");
if (status != BT_FIELD_STRING_SET_VALUE_STATUS_OK) {
BT_COMP_LOGE("Cannot set \"src\" src_field field's value: "
"str-fc-addr=%p", src_field);
+ bt_current_thread_clear_error();
}
}
static
if (!out_message) {
BT_COMP_LOGE("Error creating output stream end message: out-s-addr=%p",
out_stream);
+ goto end;
}
/* Remove stream from trace mapping hashtable. */
trace_ir_mapping_remove_mapped_stream(debug_it->ir_maps, in_stream);
+end:
return out_message;
}
if (!out_message) {
BT_COMP_LOGE("Error creating output packet end message: "
"out-p-addr=%p", out_packet);
+ goto end;
}
/* Remove packet from data mapping hashtable. */
trace_ir_mapping_remove_mapped_packet(debug_it->ir_maps, in_packet);
+end:
return out_message;
}
if (status != BT_TRACE_SET_NAME_STATUS_OK) {
BT_COMP_LOGE("Cannot set trace's name: trace-addr=%p, name=\"%s\"",
out_trace, trace_name);
+ bt_current_thread_clear_error();
goto end;
}
}
BT_COMP_LOGE("Cannot set string field's value: "
"str-field-addr=%p, str=%s" PRId64,
out_field, str);
+ bt_current_thread_clear_error();
+
}
break;
}
BT_COMP_LOGE("Cannot set dynamic array field's "
"length field: field-addr=%p, "
"length=%" PRIu64, out_field, array_len);
+ bt_current_thread_clear_error();
}
}
BT_COMP_LOGE("Cannot select variant field's option field: "
"var-field-addr=%p, opt-index=%" PRId64,
out_field, in_selected_option_idx);
+ bt_current_thread_clear_error();
}
in_option_field = bt_field_variant_borrow_selected_option_field_const(in_field);
{
struct trace_ir_data_maps *d_maps =
g_new0(struct trace_ir_data_maps, 1);
+ bt_trace_add_listener_status add_listener_status;
+
if (!d_maps) {
BT_COMP_LOGE_STR("Error allocating trace_ir_maps");
goto error;
d_maps->packet_map = g_hash_table_new_full(g_direct_hash,
g_direct_equal, NULL,(GDestroyNotify) bt_packet_put_ref);
- bt_trace_add_destruction_listener(in_trace, trace_ir_data_maps_remove_func,
- ir_maps, &d_maps->destruction_listener_id);
+ add_listener_status = bt_trace_add_destruction_listener(
+ in_trace, trace_ir_data_maps_remove_func,
+ ir_maps, &d_maps->destruction_listener_id);
+ BT_ASSERT(add_listener_status == BT_TRACE_ADD_LISTENER_STATUS_OK);
+
error:
return d_maps;
}
{
struct trace_ir_metadata_maps *md_maps =
g_new0(struct trace_ir_metadata_maps, 1);
+ bt_trace_class_add_listener_status add_listener_status;
+
if (!md_maps) {
BT_COMP_LOGE_STR("Error allocating trace_ir_maps");
goto error;
md_maps->clock_class_map = g_hash_table_new_full(g_direct_hash,
g_direct_equal, NULL, (GDestroyNotify) bt_clock_class_put_ref);
- bt_trace_class_add_destruction_listener(in_trace_class,
+ add_listener_status = bt_trace_class_add_destruction_listener(
+ in_trace_class,
trace_ir_metadata_maps_remove_func,
ir_maps, &md_maps->destruction_listener_id);
+ BT_ASSERT(add_listener_status ==
+ BT_TRACE_CLASS_ADD_LISTENER_STATUS_OK);
+
error:
return md_maps;
}
BT_COMP_LOG_CUR_LVL(BT_LOG_DEBUG, maps->log_level,
maps->self_comp,
"Trace destruction listener removal failed.");
+ bt_current_thread_clear_error();
}
g_free(maps);
BT_COMP_LOG_CUR_LVL(BT_LOG_DEBUG, maps->log_level,
maps->self_comp,
"Trace destruction listener removal failed.");
+ bt_current_thread_clear_error();
}
g_free(maps);