Fix babeltrace-log (output) handling in ctf.c
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Jun 2011 18:46:41 +0000 (14:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Jun 2011 18:46:41 +0000 (14:46 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c

index dc7baf5a891621f726df12a37cc472926208b8aa..a20e6a7599053495f484a51480f9312093764451 100644 (file)
@@ -427,12 +427,12 @@ void ctf_move_pos_slow(struct ctf_stream_pos *pos, size_t offset, int whence)
        }
 
        /* update trace_packet_header and stream_packet_context */
-       if (file_stream->stream.trace_packet_header) {
+       if (pos->prot != PROT_WRITE && file_stream->stream.trace_packet_header) {
                /* Read packet header */
                ret = generic_rw(&pos->parent, &file_stream->stream.trace_packet_header->p);
                assert(!ret);
        }
-       if (file_stream->stream.stream_packet_context) {
+       if (pos->prot != PROT_WRITE && file_stream->stream.stream_packet_context) {
                /* Read packet context */
                ret = generic_rw(&pos->parent, &file_stream->stream.stream_packet_context->p);
                assert(!ret);
This page took 0.025404 seconds and 4 git commands to generate.