summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
diff options
context:
space:
mode:
authorYusuke Sato <yusuke-sato@apn.alpine.co.jp>2016-03-01 09:21:47 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2016-09-23 15:37:25 +0200
commit12ced8236628c8a5bd317c5605f970d4cde73bd1 (patch)
tree43ff6e26ea5ef1bdcfaee971f5261a71174a3695 /src/daemon/dlt-daemon.c
parent7450ba81004d0f073175d12762f37ad845a16177 (diff)
downloadDLT-daemon-12ced8236628c8a5bd317c5605f970d4cde73bd1.tar.gz
Fix: dlt-daemon overwrites ECU ID even if user log message already has the ECU ID that is not default value
dlt-daemon overwrites ECU ID even if user log message already has the ECU ID that is not default value. This phenomenon happens when application uses dlt_forward_msg(). Therefore, dlt-daemon is modified not to overwrite ECU ID if log message has already has the ECU ID. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: Icbc6304e5571242bf75ff0d32cbe4b004f1d7f9d
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r--src/daemon/dlt-daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 28ed4aa..2444e4c 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -2568,7 +2568,7 @@ int dlt_daemon_process_user_message_log(DltDaemon *daemon,
}
/* set overwrite ecu id */
- if (daemon_local->flags.evalue!=0)
+ if ((daemon_local->flags.evalue[0]) && (strncmp(daemon_local->msg.headerextra.ecu,DLT_DAEMON_ECU_ID,4)==0))
{
/* Set header extra parameters */
dlt_set_id(daemon_local->msg.headerextra.ecu, daemon->ecuid );
@@ -2734,7 +2734,7 @@ int dlt_daemon_process_user_message_log_shm(DltDaemon *daemon,
}
/* set overwrite ecu id */
- if (daemon_local->flags.evalue[0])
+ if ((daemon_local->flags.evalue[0]) && (strncmp(daemon_local->msg.headerextra.ecu,DLT_DAEMON_ECU_ID,4)==0))
{
/* Set header extra parameters */
dlt_set_id(daemon_local->msg.headerextra.ecu, daemon->ecuid );