summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vag-bap.h2
-rw-r--r--src/bap-rx.c4
-rw-r--r--tools/vag-bap-sniffer.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/include/vag-bap.h b/include/vag-bap.h
index 8e96623..b2fbde2 100644
--- a/include/vag-bap.h
+++ b/include/vag-bap.h
@@ -64,7 +64,7 @@ struct BAP_TXer {
/* Temporary storage for frames not yet fully sent */
struct BAP_Frame *slot[4];
- /* How many bytes have we already sent on each channel? */
+ /* How many bytes have we already sent on each open slot? */
BAP_FrameLen slot_done[4];
};
diff --git a/src/bap-rx.c b/src/bap-rx.c
index d82f03d..2a75704 100644
--- a/src/bap-rx.c
+++ b/src/bap-rx.c
@@ -30,8 +30,9 @@ struct BAP_Frame* vag_bap_handle_can_frame(struct BAP_RXer *bap, struct can_fram
unsigned short header;
unsigned this_len;
+ /* Sanity checks */
if (frame->can_dlc < 4) {
- VAG_DEBUG("Error: Frame too short\n");
+ VAG_DEBUG("bap_handle_can_frame: Frame too short\n");
}
if (bap->mfchannel[mfchannel]) {
@@ -39,6 +40,7 @@ struct BAP_Frame* vag_bap_handle_can_frame(struct BAP_RXer *bap, struct can_fram
}
bap->mfchannel[mfchannel] = NULL;
+ /* Frame looks okay, start parsing */
bap_frame = vag_bap_frame_alloc();
if (!bap_frame) {
VAG_DEBUG("bap_handle_can_frame: Failed to allocate new frame\n");
diff --git a/tools/vag-bap-sniffer.c b/tools/vag-bap-sniffer.c
index 1c17a25..65580f9 100644
--- a/tools/vag-bap-sniffer.c
+++ b/tools/vag-bap-sniffer.c
@@ -6,6 +6,7 @@
* by the Free Software Foundation.
*/
+#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>