diff options
author | kundatipradeep <35292742+kundatipradeep@users.noreply.github.com> | 2021-09-14 14:35:02 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 18:05:02 +0900 |
commit | aa51bf547d85352a5f384cf7a35f499792a757af (patch) | |
tree | 2286846d726b48c72071ef3538a35f7de8d2de1a /src/daemon | |
parent | 8a1ec98b479b808f9801b98fa83d8de124490d64 (diff) | |
download | DLT-daemon-aa51bf547d85352a5f384cf7a35f499792a757af.tar.gz |
daemon: Call dlt_daemon_configuration_load() properly (#330)
As init_p2 does the offline trace initialization, load configuration should be called prior, as LoggingMode is set through run-timeconfiguration file. With original logic it results in offline trace write failed, it is not valid trace directory errors.
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/dlt-daemon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index ff959c4..350e594 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -970,6 +970,12 @@ int main(int argc, char *argv[]) dlt_log(LOG_ERR, "Could not load runtime config\n"); return -1; } + + /* + * Load dlt-runtime.cfg if available. + * This must be loaded before offline setup + */ + dlt_daemon_configuration_load(&daemon, daemon.runtime_configuration, daemon_local.flags.vflag); /* --- Daemon init phase 2 begin --- */ if (dlt_daemon_local_init_p2(&daemon, &daemon_local, daemon_local.flags.vflag) == -1) { @@ -979,12 +985,6 @@ int main(int argc, char *argv[]) /* --- Daemon init phase 2 end --- */ - /* - * Load dlt-runtime.cfg if available. - * This must be loaded before offline setup - */ - dlt_daemon_configuration_load(&daemon, daemon.runtime_configuration, daemon_local.flags.vflag); - if (daemon_local.flags.offlineLogstorageDirPath[0]) if (dlt_daemon_logstorage_setup_internal_storage( &daemon, |