Thread (18 messages) 18 messages, 2 authors, 2011-08-01

Re: [PATCH hcidump 01/13] Don't parse response AVRCP pdu if ctype is NOT_IMPLETED

From: Lucas De Marchi <hidden>
Date: 2011-08-01 14:11:39

On Mon, Aug 1, 2011 at 5:42 AM, Luiz Augusto von Dentz
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Luiz Augusto von Dentz <redacted>

---
 parser/avrcp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/parser/avrcp.c b/parser/avrcp.c
index ff6862d..a1768e3 100644
--- a/parser/avrcp.c
+++ b/parser/avrcp.c
@@ -347,6 +347,9 @@ static void avrcp_pdu_dump(int level, struct frame *frm, uint8_t ctype)
               return;
       }

+       if (ctype == AVC_CTYPE_NOT_IMPLEMENTED)
+               return;
+
From my reading of the spec, this check should be in avrcp_dump()
function -- like you did for skipping non-panel subunit packets. This
is because in the not-implemented case, only the avctp + avrcp headers
are sent, with no operands inside.

In AVRCP 1.3, section 4.3.4:

"All of the operands are optional and are defined based on the values
of ctype, subunit_type, and opcode."

In case ctype == NOT_IMPLEMENTED, there isn't any operand.



Lucas De Marchi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help