From c1e8ac812eb36d50c3a8a7127f26f9081a76e4db Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 25 Feb 2014 15:47:39 -0500 Subject: [PATCH 1/1] Fix: Move offset endianness conversion to get_data_packet MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/lttng-live/lttng-live-comm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c index 5a7d067e..e3cab914 100644 --- a/formats/lttng-live/lttng-live-comm.c +++ b/formats/lttng-live/lttng-live-comm.c @@ -631,8 +631,7 @@ retry: 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)); @@ -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, - be64toh(cur_index->offset), + cur_index->offset, cur_index->packet_size / CHAR_BIT); if (ret == -2) { goto retry; -- 2.34.1