From 3635684fc550352562094f2aaa5623f58a11e4da Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 30 May 2005 15:42:25 +0000 Subject: [PATCH] hcidump: Fix number of completed packets decoding --- tools/parser/hci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/parser/hci.c b/tools/parser/hci.c index ef64a82f5..8f7f3a74a 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -1920,15 +1920,16 @@ static inline void role_change_dump(int level, struct frame *frm) static inline void num_comp_pkts_dump(int level, struct frame *frm) { uint8_t num = get_u8(frm); + uint16_t handle, packets; int i; - p_indent(level, frm); - printf("handle%s", num > 1 ? "s" : ""); for (i = 0; i < num; i++) { - uint16_t handle = btohs(htons(get_u16(frm))); - printf(" %d", handle); + handle = btohs(htons(get_u16(frm))); + packets = btohs(htons(get_u16(frm))); + + p_indent(level, frm); + printf("handle %d packets %d\n", handle, packets); } - printf("\n"); } static inline void mode_change_dump(int level, struct frame *frm) -- 2.47.3