summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_common.c
diff options
context:
space:
mode:
authorChristian Muck <christian.muck@bmw.de>2012-05-08 10:23:57 +0200
committerChristian Muck <christian.muck@bmw.de>2012-05-30 09:05:28 +0200
commit04c33ad7f26b44288043c22ef7d2a97224538f18 (patch)
treebd89d394914f52c5ef024af318d8460f7959f871 /src/daemon/dlt_daemon_common.c
parentd3245439f6939320f6df53cd1f6094171b0981b7 (diff)
downloadDLT-daemon-04c33ad7f26b44288043c22ef7d2a97224538f18.tar.gz
[GDLT-3] Fixed missing semaphore around dlt_buffer_push3
Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r--src/daemon/dlt_daemon_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index 9a2cbea..66e2b20 100644
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -2221,6 +2221,7 @@ void dlt_daemon_control_send_control_message( int sock, DltDaemon *daemon, DltMe
}
else
{
+ DLT_DAEMON_SEM_LOCK();
/* Store message in history buffer */
if (dlt_buffer_push3(&(daemon->client_ringbuffer),
msg->headerbuffer+sizeof(DltStorageHeader),msg->headersize-sizeof(DltStorageHeader),
@@ -2228,9 +2229,11 @@ void dlt_daemon_control_send_control_message( int sock, DltDaemon *daemon, DltMe
0, 0
)<0)
{
+ DLT_DAEMON_SEM_FREE();
dlt_log(LOG_ERR,"Storage of message in history buffer failed! Message discarded.\n");
return;
}
+ DLT_DAEMON_SEM_FREE();
}
}