diff options
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r-- | src/daemon/dlt_daemon_common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index 2bf6647..49716c4 100644 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -145,7 +145,13 @@ int dlt_daemon_load_runtime_configuration(DltDaemon *daemon, const char *runtime { int append_length = 0; - if ((daemon == NULL) || (runtime_directory == NULL)) + if ( daemon == NULL ) + return DLT_RETURN_ERROR; + + // Default + daemon->mode = DLT_USER_MODE_EXTERNAL; + + if ( runtime_directory == NULL ) return DLT_RETURN_ERROR; /* prepare filenames for configuration */ @@ -225,8 +231,6 @@ int dlt_daemon_init(DltDaemon *daemon, daemon->runtime_context_cfg_loaded = 0; - daemon->mode = DLT_USER_MODE_EXTERNAL; - daemon->connectionState = 0; /* no logger connected */ daemon->state = DLT_DAEMON_STATE_INIT; /* initial logging state */ |