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
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");
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
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
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);