Fix: unprivilieged sessiond agent port clashes with root sessiond
[lttng-tools.git] / src / bin / lttng-relayd / main.c
index e3c070f8ba0330c2c297983456b385be19ad0513..f5f1ad3b488ac91c5cd3eecddfd3c3799bbebaef 100644 (file)
@@ -751,6 +751,7 @@ static struct lttcomm_sock *relay_socket_create(struct lttng_uri *uri)
 
        ret = sock->ops->bind(sock);
        if (ret < 0) {
+               PERROR("Failed to bind socket");
                goto error;
        }
 
@@ -1588,6 +1589,7 @@ static
 int rotate_truncate_stream(struct relay_stream *stream)
 {
        int ret, new_fd;
+       off_t lseek_ret;
        uint64_t diff, pos = 0;
        char buf[FILE_COPY_BUFFER_SIZE];
 
@@ -1614,10 +1616,11 @@ int rotate_truncate_stream(struct relay_stream *stream)
         * Rewind the current tracefile to the position at which the rotation
         * should have occured.
         */
-       ret = lseek(stream->stream_fd->fd,
+       lseek_ret = lseek(stream->stream_fd->fd,
                        stream->pos_after_last_complete_data_index, SEEK_SET);
-       if (ret < 0) {
+       if (lseek_ret < 0) {
                PERROR("seek truncate stream");
+               ret = -1;
                goto end;
        }
 
This page took 0.024921 seconds and 5 git commands to generate.