X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fmain.c;h=60908bfedc5aad85ed309b6be98d3560e831b18e;hb=536322299f7fc9ef136a0d7e50ba8e1b5d7a754b;hp=dc6d2564a043abb44bb567d85a2a215d3317363f;hpb=7f51dcba1efdc03c85412a75ab71894a1b5af798;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index dc6d2564a..60908bfed 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1046,6 +1046,7 @@ int relay_close_stream(struct lttcomm_relayd_hdr *recv_hdr, goto end_unlock; } + stream->last_net_seq_num = be64toh(stream_info.last_net_seq_num); stream->close_flag = 1; if (close_stream_check(stream)) { @@ -1407,14 +1408,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 */