- if (bt_ctf_field_is_set(uuid_field)) {
- /* Value already set. Not an error, skip. */
- BT_LOGV("Packet header's `uuid` field is already set: skipping: "
- "stream-addr=%p, stream-name=\"%s\"",
- stream, bt_ctf_stream_get_name(stream));
- goto end;
- }
-
- uuid_field_type = bt_ctf_field_get_type(uuid_field);
- assert(uuid_field_type);
- if (bt_ctf_field_type_get_type_id(uuid_field_type) !=
- BT_CTF_FIELD_TYPE_ID_ARRAY) {
- /* UUID field is not an array. Not an error, skip. */
- BT_LOGV("Packet header's `uuid` field's type is not an array field type: skipping: "
- "stream-addr=%p, stream-name=\"%s\", field-addr=%p, ft-addr=%p, ft-id=%s",
- stream, bt_ctf_stream_get_name(stream), uuid_field,
- uuid_field_type,
- bt_ctf_field_type_id_string(uuid_field_type->id));
- goto end;
- }
-
- if (bt_ctf_field_type_array_get_length(uuid_field_type) != 16) {
- /*
- * UUID field is not of the expected size.
- * Not an error, skip.
- */
- BT_LOGV("Packet header's `uuid` array field's type's length is not 16: skipping: "
- "stream-addr=%p, stream-name=\"%s\", field-addr=%p, ft-addr=%p, ft-length=%u",
- stream, bt_ctf_stream_get_name(stream), uuid_field,
- uuid_field_type,
- (unsigned int) bt_ctf_field_type_array_get_length(uuid_field_type));
- goto end;
- }
-
- element_field_type = bt_ctf_field_type_array_get_element_type(
- uuid_field_type);
- assert(element_field_type);
- if (bt_ctf_field_type_get_type_id(element_field_type) !=
- BT_CTF_FIELD_TYPE_ID_INTEGER) {
- /* UUID array elements are not integers. Not an error, skip */
- BT_LOGV("Packet header's `uuid` array field's type's element field type is not an integer field type: skipping: "
- "stream-addr=%p, stream-name=\"%s\", uuid-field-addr=%p, "
- "element-ft-addr=%p, element-ft-id=%s",
- stream, bt_ctf_stream_get_name(stream), uuid_field,
- element_field_type,
- bt_ctf_field_type_id_string(element_field_type->id));
- goto end;
- }
-