Diff between 04b7d39504e13d25bf8f0a6e0e8e04e0b77074af and 507f3c8015c33f0337d4f7aaef6d9486edec79d4

Changed Files

File Additions Deletions Status
tools/parser/hci.c +4 -3 modified

Full Patch

diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index 84fabbf..ed72af3 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -474,7 +474,7 @@ static inline void ext_inquiry_response_dump(int level, struct frame *frm)
 		case 0x09:
 			str = malloc(length + 1);
 			if (str) {
-				snprintf(str, length + 1, "%s", frm->ptr);
+				snprintf(str, length + 1, "%s", (char *) frm->ptr);
 				for (i = 0; i < length; i++)
 				if (!isprint(str[i]))
 					str[i] = '.';
@@ -2518,13 +2518,14 @@ static inline void vendor_dump(int level, struct frame *frm)
 
 	if (frm->dev_id == HCI_DEV_NONE) {
 		uint16_t device = btohs(htons(get_u16(frm)));
+		uint16_t proto = btohs(htons(get_u16(frm)));
 		uint16_t type = btohs(htons(get_u16(frm)));
 		uint16_t plen = btohs(htons(get_u16(frm)));
 
 		p_indent(level, frm);
 
-		printf("System %s: device hci%d type 0x%2.2x plen %d\n",
-			frm->in ? "event" : "command", device, type, plen);
+		printf("System %s: device hci%d proto 0x%2.2x type 0x%2.2x plen %d\n",
+			frm->in ? "event" : "command", device, proto, type, plen);
 
 		raw_dump(level, frm);
 		return;