libdlogutil: Increase the wait timeout for receiving fd from dlog_logger 76/240476/3
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 6 Aug 2020 12:49:46 +0000 (14:49 +0200)
committerMichal Bloch <m.bloch@partner.samsung.com>
Fri, 7 Aug 2020 10:22:54 +0000 (10:22 +0000)
Default timeout of 500ms is easily exceeded on low-end and/or overloaded
systems, causing dlogutil failures.  This commit bumps the limit to 5s.

Change-Id: Ia7083fef7fa2bd5bf790b9ab0758f9d2b1599823

src/libdlogutil/fdi_pipe.c

index e17b131..572fef7 100644 (file)
@@ -26,6 +26,8 @@
 #include "fdi_pipe.h"
 #include "fdi_pipe_internal.h"
 
+#define DEFAULT_WAIT_DLOGUTIL_PIPE_MS 5000;
+
 static int pipe_get_capacity(struct fd_info *fdi, unsigned int *capacity)
 {
        assert(fdi);
@@ -239,7 +241,7 @@ static int pipe_prepare_print(struct fd_info *fdi, int dump, bool monitor, dlogu
        if (r < 0)
                return r;
 
-       int pipe_fd = recv_pipe(ppd->sock_fd, DEFAULT_WAIT_PIPE_MS);
+       int pipe_fd = recv_pipe(ppd->sock_fd, DEFAULT_WAIT_DLOGUTIL_PIPE_MS);
        if (pipe_fd < 0)
                return pipe_fd;