aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2011-10-04 19:55:07 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-10-10 10:05:34 +0300
commitc53daddb35355bde16f7b090987e483cb0632aa1 (patch)
tree14e9681289571732d675ede8d6bce18a4f1bf24a
parent9b42767bec2d176bbd908f29854af957eb6afb3a (diff)
downloadbluez-hcidump-c53daddb35355bde16f7b090987e483cb0632aa1.tar.gz
bluez-hcidump-c53daddb35355bde16f7b090987e483cb0632aa1.tar.xz
bluez-hcidump-c53daddb35355bde16f7b090987e483cb0632aa1.zip
Fix EIR parsing in evt_le_advertising_report_dump
Only the first EIR data structure from the LE advertising report event is dumped. This patch fix this, so all EIR data structure present in that event is dumped.
-rw-r--r--parser/hci.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/parser/hci.c b/parser/hci.c
index 610177b..698a301 100644
--- a/parser/hci.c
+++ b/parser/hci.c
@@ -3534,6 +3534,7 @@ static inline void evt_le_advertising_report_dump(int level, struct frame *frm)
while (num_reports--) {
char addr[18];
le_advertising_info *info = frm->ptr;
+ int offset = 0;
p_ba2str(&info->bdaddr, addr);
@@ -3544,9 +3545,12 @@ static inline void evt_le_advertising_report_dump(int level, struct frame *frm)
printf("bdaddr %s (%s)\n", addr,
bdaddrtype2str(info->bdaddr_type));
- if (info->length > 0) {
- ext_inquiry_data_dump(level, frm,
- ((uint8_t *) &info->length) + 1);
+ while (offset < info->length) {
+ int eir_data_len = info->data[offset];
+
+ ext_inquiry_data_dump(level, frm, &info->data[offset]);
+
+ offset += eir_data_len + 1;
}
frm->ptr += LE_ADVERTISING_INFO_SIZE + info->length;