diff options
author | Manikandan C <mchockalingam@de.adit-jv.com> | 2018-11-12 14:01:47 +0100 |
---|---|---|
committer | Christoph Lipka <clipka@users.noreply.github.com> | 2018-11-23 11:10:47 +0100 |
commit | 13803189600c724341148af34f33688497d71991 (patch) | |
tree | 2967d4bf0cf3b95a542fc40e29cd7e67a341fc03 /tests | |
parent | 775949cfaf16f1a07cf549a00a3e8e0cc99e1d6c (diff) | |
download | DLT-daemon-13803189600c724341148af34f33688497d71991.tar.gz |
dlt-client: logging: Extended the receiver buffer size
- dlt-control couldn't receive all the GET_LOG_INFO response message
when many applications and contexts are registered.
Therefore the receiver buffer size was extended to 65K.
Also the receive buffer size macros are reduced to one variable.
- Code cleanup and improvements
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dlt_test_receiver.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/dlt_test_receiver.c b/tests/dlt_test_receiver.c index 9b93728..86147ec 100644 --- a/tests/dlt_test_receiver.c +++ b/tests/dlt_test_receiver.c @@ -326,7 +326,7 @@ int main(int argc, char* argv[]) int dlt_receive_filetransfer_callback(DltMessage *message, void *data) { DltReceiveData *dltdata; - static char text[DLT_RECEIVE_TEXTBUFSIZE]; + static char text[DLT_RECEIVE_BUFSIZE]; char filename[255]; struct iovec iov[2]; int bytes_written; @@ -340,7 +340,7 @@ int dlt_receive_filetransfer_callback(DltMessage *message, void *data) if(dltdata->filetransfervalue) { - dlt_message_print_ascii(message, text, DLT_RECEIVE_TEXTBUFSIZE, dltdata->vflag); + dlt_message_print_ascii(message, text, DLT_RECEIVE_BUFSIZE, dltdata->vflag); // 1st find starting point of tranfering data packages if( strncmp(text, "FLST", 4) == 0) @@ -373,11 +373,11 @@ int dlt_receive_filetransfer_callback(DltMessage *message, void *data) { // truncate beginning of data stream ( FLDA, File identifier and package number) char *position = strchr(text, 32); // search for space - strncpy(text, position+1, DLT_RECEIVE_TEXTBUFSIZE); + strncpy(text, position+1, DLT_RECEIVE_BUFSIZE); position = strchr(text, 32); - strncpy(text, position+1, DLT_RECEIVE_TEXTBUFSIZE); + strncpy(text, position+1, DLT_RECEIVE_BUFSIZE); position = strchr(text, 32); - strncpy(text, position+1, DLT_RECEIVE_TEXTBUFSIZE); + strncpy(text, position+1, DLT_RECEIVE_BUFSIZE); // truncate ending of data stream ( FLDA ) int len = strlen(text); @@ -398,7 +398,7 @@ int dlt_receive_filetransfer_callback(DltMessage *message, void *data) if(dltdata->systemjournalvalue) { - dlt_message_print_ascii(message, text, DLT_RECEIVE_TEXTBUFSIZE, dltdata->vflag); + dlt_message_print_ascii(message, text, DLT_RECEIVE_BUFSIZE, dltdata->vflag); // 1st find the relevant packages char * tmp = message->extendedheader->ctid; tmp[4] = '\0'; @@ -415,7 +415,7 @@ int dlt_receive_filetransfer_callback(DltMessage *message, void *data) if(dltdata->systemloggervalue) { - dlt_message_print_ascii(message, text, DLT_RECEIVE_TEXTBUFSIZE, dltdata->vflag); + dlt_message_print_ascii(message, text, DLT_RECEIVE_BUFSIZE, dltdata->vflag); // 1st find the relevant packages char * tmp = message->extendedheader->ctid; tmp[4] = '\0'; |