summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrederic Berat <fberat@de.adit-jv.com>2016-06-01 16:17:43 +0200
committerChristoph Lipka <clipka@jp.adit-jv.com>2016-10-24 13:39:55 +0900
commitf1a32faa95358d7257acd267ca0e7568d3c5f7b0 (patch)
tree61077ae2d2a7cc852230871f83f9b12ec0b07955 /include
parent657dbee1201e2e72952f978aad705f6358838f75 (diff)
downloadDLT-daemon-f1a32faa95358d7257acd267ca0e7568d3c5f7b0.tar.gz
process user message: Fix bound handling
On context and application registration, the data needs to be read in 2 parts. If the first part was at the end of the receiver buffer, it was wrongly removed whereas the complete data is not full received and therefore interpretable. This has to be fixed by not removing the data before everything is checked. Thus, while readjusting the buffer to the first found header, the offset was not properly updated. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Process User Messages: Fix buffer handling In case application and context registration the buffer need to be read two times. But before removing the data, the data need to be readjusted to its origin. This was missing in a previous fix. Furthermore, in case of corrupted description field, applications and contexts will be registered anyway with the dummy description "Unknown". Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/dlt_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index b6a83a8..ba2324e 100644
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -321,6 +321,11 @@ enum {
#define DLT_HEADER_SHOW_NOARG 0x0200
#define DLT_HEADER_SHOW_ALL 0xFFFF
+/* dlt_receiver_check_and_get flags */
+#define DLT_RCV_NONE 0
+#define DLT_RCV_SKIP_HEADER (1 << 0)
+#define DLT_RCV_REMOVE (1 << 1)
+
/**
* Maximal length of mounted path
*/