static
void destroy_pretty_data(struct pretty_component *pretty)
{
- bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
-
if (!pretty) {
goto end;
}
+ bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
+
if (pretty->string) {
(void) g_string_free(pretty->string, TRUE);
}
bt_component_class_message_iterator_next_method_status ret =
BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
- BT_ASSERT(pretty);
+ BT_ASSERT_DBG(pretty);
switch (bt_message_get_type(message)) {
case BT_MESSAGE_TYPE_EVENT:
goto end;
}
- BT_ASSERT(next_status == BT_MESSAGE_ITERATOR_NEXT_STATUS_OK);
+ BT_ASSERT_DBG(next_status == BT_MESSAGE_ITERATOR_NEXT_STATUS_OK);
for (i = 0; i < count; i++) {
ret = (int) handle_message(pretty, msgs[i]);
static const char *color_choices[] = { "never", "auto", "always", NULL };
static const char *show_hide_choices[] = { "show", "hide", NULL };
+static
struct bt_param_validation_map_value_entry_descr pretty_params[] = {
{ "color", BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_OPTIONAL, { BT_VALUE_TYPE_STRING, .string = {
.choices = color_choices,
pretty->options.print_scope_field_names = false;
break;
default:
- abort();
+ bt_common_abort();
}
apply_one_bool_if_specified("name-payload", params,
pretty->options.print_callsite_field = false;
break;
default:
- abort();
+ bt_common_abort();
}
apply_one_bool_if_specified("field-trace", params,
apply_one_bool_if_specified("field-callsite", params,
&pretty->options.print_callsite_field);
+ pretty_print_init();
status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
end: