summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
diff options
context:
space:
mode:
authorSascha Philipp <sascha.philipp@continental-corporation.com>2014-10-06 13:07:48 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-03-25 17:12:14 +0100
commit3c89cdf9ca2aae9e0a602997ed0245692ddf976a (patch)
tree07fc261d9af3fce4bfc186369fd37e3e09bd3520 /src/daemon/dlt-daemon.c
parent5dd64263c2dc518aaf1d80f3521fa2cc452f6c8d (diff)
downloadDLT-daemon-3c89cdf9ca2aae9e0a602997ed0245692ddf976a.tar.gz
Change daemon state handling to have all traces in online trace even when offline trace is active
Change-Id: Ic212c4956582b18e05739d593bf5c792d60d9c00 Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r--src/daemon/dlt-daemon.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 5e56302..6c44da5 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -485,8 +485,10 @@ int main(int argc, char* argv[])
create_timer_fd(&daemon_local, 60, 60, &daemon_local.timer_sixty_s, "ECU version");
}
- if(daemon_local.flags.yvalue[0] ||
- ((daemon_local.flags.offlineTraceDirectory[0]) && ((daemon.mode == DLT_USER_MODE_INTERNAL) || (daemon.mode == DLT_USER_MODE_BOTH))))
+ // For offline tracing we still can use the same states
+ // as for socket sending. Using this trick we see the traces
+ // In the offline trace AND in the socket stream.
+ if(daemon_local.flags.yvalue[0])
dlt_daemon_change_state(&daemon,DLT_DAEMON_STATE_SEND_DIRECT);
else
dlt_daemon_change_state(&daemon,DLT_DAEMON_STATE_BUFFER);
@@ -2677,8 +2679,10 @@ int dlt_daemon_close_socket(int sock, DltDaemon *daemon, DltDaemonLocal *daemon_
daemon->connectionState = 0;
dlt_daemon_user_send_all_log_state(daemon,verbose);
- if((daemon_local->flags.yvalue[0] == 0) &&
- ((daemon_local->flags.offlineTraceDirectory[0] == 0) || (daemon->mode == DLT_USER_MODE_EXTERNAL)))
+ // For offline tracing we still can use the same states
+ // as for socket sending. Using this trick we see the traces
+ // In the offline trace AND in the socket stream.
+ if(daemon_local->flags.yvalue[0] == 0)
dlt_daemon_change_state(daemon,DLT_DAEMON_STATE_BUFFER);
}