Diff between 61c4041e7e827ad7d8ba95ebf103596cc0274c85 and cb3edcf31f7136abf65d7f8edc919ef3b52cd136

Changed Files

File Additions Deletions Status
tools/parser/l2cap.c +3 -1 modified
tools/parser/parser.h +1 -0 modified
tools/parser/rfcomm.c +1 -0 modified

Full Patch

diff --git a/tools/parser/l2cap.c b/tools/parser/l2cap.c
index c3a0e95..7332967 100644
--- a/tools/parser/l2cap.c
+++ b/tools/parser/l2cap.c
@@ -851,7 +851,8 @@ void l2cap_dump(int level, struct frame *frm)
 			return;
 		}
 
-		if (fr->data) free(fr->data);
+		if (fr->data)
+			free(fr->data);
 
 		if (!(fr->data = malloc(dlen + L2CAP_HDR_SIZE))) {
 			perror("Can't allocate L2CAP reassembly buffer");
@@ -866,6 +867,7 @@ void l2cap_dump(int level, struct frame *frm)
 		fr->handle  = frm->handle;
 		fr->cid     = frm->cid;
 		fr->num     = frm->num;
+		fr->dlci    = frm->dlci;
 		fr->channel = frm->channel;
 	} else {
 		if (!(fr = get_frame(frm->handle))) {
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index 96feee5..15642db 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
@@ -41,6 +41,7 @@ struct frame {
 	int	handle;
 	int	cid;
 	int	num;
+	int	dlci;
 	int	channel;
 	long	flags;
 	struct	timeval ts;
diff --git a/tools/parser/rfcomm.c b/tools/parser/rfcomm.c
index 331ea65..c18ef8a 100644
--- a/tools/parser/rfcomm.c
+++ b/tools/parser/rfcomm.c
@@ -264,6 +264,7 @@ static inline void uih_frame(int level, struct frame *frm, long_frame_head *head
 			printf("\n");
 
 		frm->len--;
+		frm->dlci = GET_DLCI(head->addr);
 		frm->channel = head->addr.server_chn;
 
 		proto = get_proto(frm->handle, RFCOMM_PSM, frm->channel);