summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>2020-04-23 11:07:45 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commitc2f5a1935a61c11f1b4a43e88417a3baaa1e6dad (patch)
tree2ec4ff064b179591516c0737976db634e9c50fb6
parent156bb01a731661e0b90be90a58e56102352c33ad (diff)
downloadDLT-daemon-c2f5a1935a61c11f1b4a43e88417a3baaa1e6dad.tar.gz
relocation dlt_check_envvar() and update dlt_init() functions
Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
-rw-r--r--src/lib/dlt_user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index a879f95..7188c05 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -345,6 +345,12 @@ static DltReturnValue dlt_initialize_fifo_connection(void)
DltReturnValue dlt_init(void)
{
+ strncpy(dltFifoBaseDir, DLT_USER_IPC_PATH, DLT_PATH_MAX);
+ dltFifoBaseDir[DLT_PATH_MAX - 1] = 0;
+
+ /* check environment variables */
+ dlt_check_envvar();
+
/* process is exiting. Do not allocate new resources. */
if (dlt_user_freeing != 0) {
dlt_vlog(LOG_INFO, "%s logging disabled, process is exiting", __func__);
@@ -362,12 +368,6 @@ DltReturnValue dlt_init(void)
return DLT_RETURN_ERROR;
}
- strncpy(dltFifoBaseDir, DLT_USER_IPC_PATH, DLT_PATH_MAX);
- dltFifoBaseDir[DLT_PATH_MAX - 1] = 0;
-
- /* check environment variables */
- dlt_check_envvar();
-
dlt_user.dlt_is_file = 0;
dlt_user.overflow = 0;
dlt_user.overflow_counter = 0;