Byte order is only set when packet-based metadata is found.
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 25 Jul 2011 23:05:44 +0000 (19:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 25 Jul 2011 23:05:44 +0000 (19:05 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c

index d685b6cd70f4b9ef9362747bb7fa8862a430f086..fd05c0ab2301c293db6aa9728e4d69ea0e1d49f2 100644 (file)
@@ -458,12 +458,13 @@ int packet_metadata(struct ctf_trace *td, FILE *fp)
        if (magic == TSDL_MAGIC) {
                ret = 1;
                td->byte_order = BYTE_ORDER;
+               CTF_TRACE_SET_FIELD(td, byte_order);
        } else if (magic == GUINT32_SWAP_LE_BE(TSDL_MAGIC)) {
                ret = 1;
                td->byte_order = (BYTE_ORDER == BIG_ENDIAN) ?
                                        LITTLE_ENDIAN : BIG_ENDIAN;
+               CTF_TRACE_SET_FIELD(td, byte_order);
        }
-       CTF_TRACE_SET_FIELD(td, byte_order);
 end:
        rewind(fp);
        return ret;
This page took 0.025067 seconds and 4 git commands to generate.