summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_common.c
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-15 00:14:39 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-15 00:14:39 +0100
commitc870bcb94957fcbab7f56b6cd3ff5a0fc659f24c (patch)
tree93b273d227bb3921cb255217bf5b0325b44d3a34 /src/daemon/dlt_daemon_common.c
parentc74050b028d91c9bb8995dafba440babc7b621ff (diff)
downloadDLT-daemon-c870bcb94957fcbab7f56b6cd3ff5a0fc659f24c.tar.gz
Added dynamic increasable ringbuffers to user lib and daemon.
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rwxr-xr-xsrc/daemon/dlt_daemon_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index aaed7a2..1de6aea 100755
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -188,7 +188,7 @@ int dlt_daemon_init(DltDaemon *daemon,const char *runtime_directory, int verbose
dlt_set_id(daemon->ecuid,"");
/* initialize ring buffer for client connection */
- if (dlt_ringbuffer_init(&(daemon->client_ringbuffer), DLT_DAEMON_RINGBUFFER_SIZE)==-1)
+ if (dlt_buffer_init_dynamic(&(daemon->client_ringbuffer), DLT_DAEMON_RINGBUFFER_MIN_SIZE,DLT_DAEMON_RINGBUFFER_MAX_SIZE,DLT_DAEMON_RINGBUFFER_STEP_SIZE)==-1)
{
return -1;
}
@@ -217,6 +217,9 @@ int dlt_daemon_free(DltDaemon *daemon,int verbose)
return -1;
}
+ /* free ringbuffer */
+ dlt_buffer_free_dynamic(&(daemon->client_ringbuffer));
+
return 0;
}
@@ -2145,7 +2148,7 @@ void dlt_daemon_control_send_control_message( int sock, DltDaemon *daemon, DltMe
else
{
/* Store message in history buffer */
- if (dlt_ringbuffer_put3(&(daemon->client_ringbuffer),
+ if (dlt_buffer_push3(&(daemon->client_ringbuffer),
msg->headerbuffer+sizeof(DltStorageHeader),msg->headersize-sizeof(DltStorageHeader),
msg->databuffer,msg->datasize,
0, 0