Clear field mask before retry.
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Jul 2011 00:13:13 +0000 (20:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Jul 2011 00:13:13 +0000 (20:13 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index bba15b684ffcc9bf3fa6abbeea56e9550cbb7897..2eba30bd46d3475cf9a2c74e679646bba7fef119 100644 (file)
@@ -1898,7 +1898,6 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                ret = -EPERM;
                                goto error;
                        } else {
-                               CTF_TRACE_SET_FIELD(trace, byte_order);
                                if (byte_order != trace->byte_order) {
                                        trace->byte_order = byte_order;
                                        /*
@@ -1909,6 +1908,7 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                                        return -EINTR;
                                }
                        }
+                       CTF_TRACE_SET_FIELD(trace, byte_order);
                } else if (!strcmp(left, "packet.header")) {
                        struct declaration *declaration;
 
@@ -2003,8 +2003,10 @@ error:
        free_declaration_scope(trace->declaration_scope);
        trace->declaration_scope = NULL;
        /* byte order changed while creating types, retry. */
-       if (ret == -EINTR)
+       if (ret == -EINTR) {
+               trace->field_mask = 0;
                goto restart;
+       }
        return ret;
 }
 
This page took 0.027989 seconds and 4 git commands to generate.