summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_common.c
diff options
context:
space:
mode:
authorBui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>2019-03-13 15:41:44 +0700
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2019-06-18 17:22:09 +0900
commit341831da4da448392d62e48f1a4f419a18e3dca5 (patch)
tree2a16432a684e3cc2dc0dba1113ca6ea54cbc98ed /src/daemon/dlt_daemon_common.c
parentcc9e192a990e2f573fbe680cf97368d73ab24f69 (diff)
downloadDLT-daemon-341831da4da448392d62e48f1a4f419a18e3dca5.tar.gz
daemon: Don't remove unregistered context
If a context is defined and loaded from runtime context config file, that context won't be deleted/removed from dlt-daemon database until its parent application is unregistered. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r--src/daemon/dlt_daemon_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index 8508dfe..38b94fe 100644
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -912,6 +912,14 @@ DltDaemonContext *dlt_daemon_context_add(DltDaemon *daemon,
context->log_level_pos = log_level_pos;
context->user_handle = user_handle;
+ /* In case a context is loaded from runtime config file,
+ * the user_handle is 0 and we mark that context as predefined.
+ */
+ if (context->user_handle == 0)
+ context->predefined = true;
+ else
+ context->predefined = false;
+
/* Sort */
if (new_context) {
qsort(user_list->contexts,