`ctf` plugin: infer packet's total size from packet's content size
[babeltrace.git] / plugins / ctf / common / metadata / ctf-meta-validate.c
index 322718e08a442feaa58ed6e37fb5a364ace72e27..a84efa15d1c9b2504e2c7baf8c39cc5b1db1ae50 100644 (file)
@@ -31,8 +31,6 @@ int validate_stream_class(struct ctf_stream_class *sc)
        int ret = 0;
        struct ctf_field_class_int *int_fc;
        struct ctf_field_class *fc;
-       bool has_total_size = false;
-       bool has_content_size = false;
 
        if (sc->is_translated) {
                goto end;
@@ -131,8 +129,6 @@ int validate_stream_class(struct ctf_stream_class *sc)
                                "`packet_size` member is signed.");
                        goto invalid;
                }
-
-               has_total_size = true;
        }
 
        fc = ctf_field_class_struct_borrow_member_field_class_by_name(
@@ -152,15 +148,6 @@ int validate_stream_class(struct ctf_stream_class *sc)
                                "`content_size` member is signed.");
                        goto invalid;
                }
-
-               has_content_size = true;
-       }
-
-       if (has_content_size && !has_total_size) {
-                       BT_LOGE_STR("Invalid packet context field class: "
-                               "`content_size` member exists without "
-                               "`packet_size` member.");
-                       goto invalid;
        }
 
        fc = ctf_field_class_struct_borrow_member_field_class_by_name(
This page took 0.042399 seconds and 4 git commands to generate.