From db5b62a1c054667dc82929d90e195cd4a7060f4c Mon Sep 17 00:00:00 2001 From: Christoph Lipka Date: Wed, 17 Dec 2014 16:58:12 +0900 Subject: Workaround for duplicated log messages in offline trace file issue Signed-off-by: Christoph Lipka --- src/daemon/dlt_daemon_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/daemon/dlt_daemon_client.c') diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index b0a11c9..041a105 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -58,7 +58,7 @@ /** Global text output buffer, mainly used for creation of error/warning strings */ static char str[DLT_DAEMON_TEXTBUFSIZE]; -int dlt_daemon_client_send(int sock,DltDaemon *daemon,DltDaemonLocal *daemon_local,void* data1,int size1,void* data2,int size2,int verbose) +int dlt_daemon_client_send(int sock,DltDaemon *daemon,DltDaemonLocal *daemon_local,void* data1,int size1,void* data2,int size2,int verbose, int control) { int ret; int j; @@ -96,7 +96,7 @@ int dlt_daemon_client_send(int sock,DltDaemon *daemon,DltDaemonLocal *daemon_loc } /* write message to offline trace */ - if ((sock!=DLT_DAEMON_SEND_FORCE) && (daemon->state == DLT_DAEMON_STATE_SEND_DIRECT)) + if ((sock!=DLT_DAEMON_SEND_FORCE) && (daemon->state == DLT_DAEMON_STATE_SEND_DIRECT) && !control) { if(((daemon->mode == DLT_USER_MODE_INTERNAL) || (daemon->mode == DLT_USER_MODE_BOTH)) && daemon_local->flags.offlineTraceDirectory[0]) @@ -269,7 +269,7 @@ int dlt_daemon_client_send_control_message( int sock, DltDaemon *daemon, DltDaem msg->standardheader->len = DLT_HTOBE_16(((uint16_t)len)); if((ret=dlt_daemon_client_send(sock,daemon,daemon_local,msg->headerbuffer+sizeof(DltStorageHeader),msg->headersize-sizeof(DltStorageHeader), - msg->databuffer,msg->datasize,verbose))) + msg->databuffer,msg->datasize,verbose,1))) { dlt_log(LOG_DEBUG,"dlt_daemon_control_send_control_message: DLT message send to all failed!.\n"); return ret; @@ -1610,7 +1610,7 @@ void dlt_daemon_control_message_time(int sock, DltDaemon *daemon, DltDaemonLocal /* Send message */ if((ret = dlt_daemon_client_send(sock,daemon,daemon_local,msg.headerbuffer+sizeof(DltStorageHeader),msg.headersize-sizeof(DltStorageHeader), - msg.databuffer,msg.datasize,verbose))) + msg.databuffer,msg.datasize,verbose,1))) { } -- cgit v1.2.1