Fix: Move offset endianness conversion to get_data_packet
[babeltrace.git] / formats / lttng-live / lttng-live-comm.c
index 5a7d067e4cd55127c539b91b5bc169cebd8d772e..e3cab91457fbf8ee2b6316a9bc4b31ad6143c7e6 100644 (file)
@@ -631,8 +631,7 @@ retry:
 
        memset(&rq, 0, sizeof(rq));
        rq.stream_id = htobe64(stream->id);
 
        memset(&rq, 0, sizeof(rq));
        rq.stream_id = htobe64(stream->id);
-       /* Already in big endian. */
-       rq.offset = offset;
+       rq.offset = htobe64(offset);
        rq.len = htobe32(len);
 
        ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd));
        rq.len = htobe32(len);
 
        ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd));
@@ -1110,7 +1109,7 @@ retry:
        printf_verbose("get_data_packet for stream %" PRIu64 "\n",
                        viewer_stream->id);
        ret = get_data_packet(session->ctx, pos, viewer_stream,
        printf_verbose("get_data_packet for stream %" PRIu64 "\n",
                        viewer_stream->id);
        ret = get_data_packet(session->ctx, pos, viewer_stream,
-                       be64toh(cur_index->offset),
+                       cur_index->offset,
                        cur_index->packet_size / CHAR_BIT);
        if (ret == -2) {
                goto retry;
                        cur_index->packet_size / CHAR_BIT);
        if (ret == -2) {
                goto retry;
This page took 0.02358 seconds and 4 git commands to generate.