diff options
author | Yusuke Sato <yusuke-sato@apn.alpine.co.jp> | 2016-03-01 09:21:47 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2016-09-23 15:37:25 +0200 |
commit | 12ced8236628c8a5bd317c5605f970d4cde73bd1 (patch) | |
tree | 43ff6e26ea5ef1bdcfaee971f5261a71174a3695 | |
parent | 7450ba81004d0f073175d12762f37ad845a16177 (diff) | |
download | DLT-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
-rw-r--r-- | src/daemon/dlt-daemon.c | 4 |
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 ); |