summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorMohammed AL Dardoun <mohammed.aldardoun@partner.bmw.de>2011-08-09 17:04:17 +0200
committerMohammed AL Dardoun <mohammed.aldardoun@partner.bmw.de>2011-08-09 17:04:17 +0200
commit7554585a80ca2a8ebdcd5d1f1693ffe8e39b571d (patch)
tree5e479e49045e847c4ffe08d09a553763173bd836 /src/daemon
parent11702b620d2ec8896af210168db81ee58923d9da (diff)
downloadDLT-daemon-7554585a80ca2a8ebdcd5d1f1693ffe8e39b571d.tar.gz
[GSW-43] Flow Control for sending huge amount of data over DLT. partialy fixed
Diffstat (limited to 'src/daemon')
-rwxr-xr-xsrc/daemon/dlt_daemon_common.c3
-rwxr-xr-xsrc/daemon/dlt_daemon_common.h4
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. */