diff options
author | ManikandanC <Manikandan.Chockalingam@in.bosch.com> | 2017-05-22 10:57:21 +0530 |
---|---|---|
committer | Christoph Lipka <clipka@users.noreply.github.com> | 2018-12-10 15:40:58 +0100 |
commit | b2ce65d9947849160e04e751075c7fe4b5dcd158 (patch) | |
tree | 17bd0227f0d26d3557deecb83b026284975019a1 /src/lib/dlt_client.c | |
parent | ea836f6de185f32c14404950f5cfb2ebf084e1ca (diff) | |
download | DLT-daemon-b2ce65d9947849160e04e751075c7fe4b5dcd158.tar.gz |
Dynamic allocation of msg buffer
It is possible to change the default buffer size for log message creation via
environment variable:
export DLT_LOG_MSG_BUF_LEN=<value>
Instead of using a static buffer with size of 1390 bytes, the buffer is
allocated dynamically with the specified value.The max size is restricted to approx 65k.
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Diffstat (limited to 'src/lib/dlt_client.c')
-rw-r--r-- | src/lib/dlt_client.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/dlt_client.c b/src/lib/dlt_client.c index efac848..0b22890 100644 --- a/src/lib/dlt_client.c +++ b/src/lib/dlt_client.c @@ -340,16 +340,8 @@ DltReturnValue dlt_client_main_loop(DltClient *client, void *data, int verbose) while (1) { - if (client->mode==0) - { - /* wait for data from socket */ - ret = dlt_receiver_receive_socket(&(client->receiver)); - } - else - { - /* wait for data from serial connection */ - ret = dlt_receiver_receive_fd(&(client->receiver)); - } + /* wait for data from socket or serial connection */ + ret = dlt_receiver_receive(&(client->receiver), client->mode); if (ret<=0) { |