summaryrefslogtreecommitdiff
path: root/src/lib/dlt_user_cfg.h
diff options
context:
space:
mode:
authorAlexander Mohr <alexander.m.mohr@daimler.com>2020-12-16 17:27:58 +0100
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2021-01-06 09:11:21 +0900
commite7858cfa226f760b6f7ba9a43501ac071b2fd8a8 (patch)
treeb035695899bd750af075ac2fd3d1112134e1b5bf /src/lib/dlt_user_cfg.h
parent6fade05719508d563c083c13e4c9e17257090526 (diff)
downloadDLT-daemon-e7858cfa226f760b6f7ba9a43501ac071b2fd8a8.tar.gz
dlt_user: fix invalid poll timeout
The poll timeout was only set for fifo. TCP connections require this timeout as well. dlt_user_log_check_user_message also validated the file descriptor to be greater 0. Because 0 is a valid file descriptor this check has been changed to greater or equal 0. poll receives a timeout in milliseconds. The given paramter was in nanoseconds. An additional define takes adds the delay in miliseconds. Signed-off-by: Alexander Mohr <alexander.m.mohr@daimler.com>
Diffstat (limited to 'src/lib/dlt_user_cfg.h')
-rw-r--r--src/lib/dlt_user_cfg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h
index 8951b75..e8997f0 100644
--- a/src/lib/dlt_user_cfg.h
+++ b/src/lib/dlt_user_cfg.h
@@ -126,6 +126,9 @@
/* delay for housekeeper thread (nsec) while receiving messages*/
#define DLT_USER_RECEIVE_NDELAY (500 * 1000 * 1000)
+/* timeout for poll operations in milliseconds*/
+#define DLT_USER_RECEIVE_MDELAY (500)
+
/* Name of environment variable for local print mode */
#define DLT_USER_ENV_LOCAL_PRINT_MODE "DLT_LOCAL_PRINT_MODE"