From 5ab7344e564fad002de7efc879ffbed5bd23d5ef Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Wed, 3 Oct 2012 19:40:28 -0400 Subject: [PATCH] Fix: output number of bytes written by relayd The print of the number of bytes written in the tracefile by the relayd was after the call to write the padding, so the debug output was confusing: DEBUG3: Receiving data of size 2097133 for stream id 567 seqnum 0 [in relay_process_data() at main.c:1394] DEBUG2: Relay wrote 19 bytes to tracefile for stream id 567 [in relay_process_data() at main.c:1416 Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- src/bin/lttng-relayd/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index dc6d2564a..f3d83451f 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1407,14 +1407,14 @@ int relay_process_data(struct relay_command *cmd, struct lttng_ht *streams_ht) goto end_unlock; } + DBG2("Relay wrote %d bytes to tracefile for stream id %" PRIu64, + ret, stream->stream_handle); + ret = write_padding_to_file(stream->fd, be32toh(data_hdr.padding_size)); if (ret < 0) { goto end_unlock; } - DBG2("Relay wrote %d bytes to tracefile for stream id %" PRIu64, - ret, stream->stream_handle); - stream->prev_seq = net_seq_num; /* Check if we need to close the FD */ -- 2.34.1