From c2f5a1935a61c11f1b4a43e88417a3baaa1e6dad Mon Sep 17 00:00:00 2001 From: "LUONG HONG DUY KHANH(RBVH/ENG42)" Date: Thu, 23 Apr 2020 11:07:45 +0700 Subject: relocation dlt_check_envvar() and update dlt_init() functions Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) --- src/lib/dlt_user.c | 12 ++++++------ 1 file 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; -- cgit v1.2.1