summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/daemon/dlt-daemon.c16
-rw-r--r--src/lib/dlt_user.c4
2 files changed, 12 insertions, 8 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index db932d0..774573e 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -2612,13 +2612,17 @@ int dlt_daemon_process_user_message_register_context(DltDaemon *daemon,
if (context->user_handle >= DLT_FD_MINIMUM)
{
- /* This call also replaces the default values with the values defined for default */
- if (dlt_daemon_user_send_log_level(daemon, context, verbose)==-1)
+ if ((userctxt.log_level == DLT_LOG_DEFAULT) || (userctxt.trace_status == DLT_TRACE_STATUS_DEFAULT))
{
- dlt_vlog(LOG_WARNING, "Can't send current log level as response to %s for (%.4s;%.4s)\n",
- __func__,
- context->apid,
- context->ctid);
+ /* This call also replaces the default values with the values defined for default */
+ if (dlt_daemon_user_send_log_level(daemon, context, verbose)==-1)
+ {
+ dlt_vlog(LOG_WARNING, "Can't send current log level as response to %s for (%.4s;%.4s)\n",
+ __func__,
+ context->apid,
+ context->ctid);
+ return -1;
+ }
}
}
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index f40efd7..34a5a3f 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -3356,7 +3356,7 @@ DltReturnValue dlt_log_string_int(DltContext *handle, DltLogLevelType loglevel,
{
dlt_user_log_write_string(&log, text);
dlt_user_log_write_int(&log, data);
-
+
if (dlt_user_log_write_finish(&log) < DLT_RETURN_OK)
{
return DLT_RETURN_ERROR;
@@ -3411,7 +3411,7 @@ DltReturnValue dlt_log_int(DltContext *handle, DltLogLevelType loglevel, int dat
if (dlt_user_log_write_start(handle, &log, loglevel) == DLT_RETURN_TRUE)
{
dlt_user_log_write_int(&log, data);
-
+
if (dlt_user_log_write_finish(&log) < DLT_RETURN_OK)
{
return DLT_RETURN_ERROR;