diff options
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r-- | src/daemon/dlt-daemon.c | 12 |
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); } |