diff options
Diffstat (limited to 'src/daemon')
-rwxr-xr-x | src/daemon/dlt_daemon_common.c | 3 | ||||
-rwxr-xr-x | src/daemon/dlt_daemon_common.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index 4fbfd31..fb33fc3 100755 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -166,7 +166,8 @@ int dlt_daemon_init(DltDaemon *daemon,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_ringbuffer_init(&(daemon->client_ringbuffer), DLT_DAEMON_RINGBUFFER_SIZE,DLT_DAEMON_RINGBUFFER_INCREASE_SIZE,DLT_DAEMON_RINGBUFFER_MAXIMUM_SIZE)==-1) { return -1; } diff --git a/src/daemon/dlt_daemon_common.h b/src/daemon/dlt_daemon_common.h index fa0fe53..d861a9e 100755 --- a/src/daemon/dlt_daemon_common.h +++ b/src/daemon/dlt_daemon_common.h @@ -97,6 +97,10 @@ extern "C" { #define DLT_DAEMON_RINGBUFFER_SIZE 100000 /**< Ring buffer size for storing log messages while no client is connected */
+#define DLT_DAEMON_RINGBUFFER_INCREASE_SIZE DLT_DAEMON_RINGBUFFER_SIZE
+
+#define DLT_DAEMON_RINGBUFFER_MAXIMUM_SIZE 100*DLT_DAEMON_RINGBUFFER_INCREASE_SIZE
+
#define DLT_DAEMON_STORE_TO_BUFFER -2 /**< Constant value to identify the command "store to buffer" */
/* Use a semaphore or mutex from your OS to prevent concurrent access to the DLT buffer. */
|