From 027c6819f1af77351ae339c41ccc0e7d2eb59fb4 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 30 Jun 2011 15:50:33 -0300 Subject: [PATCH] avrcp: Check that AVCTP packet is of type COMMAND --- audio/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/control.c b/audio/control.c index 3db7d8e08..57a4edc01 100644 --- a/audio/control.c +++ b/audio/control.c @@ -590,7 +590,8 @@ static gboolean control_cb(GIOChannel *chan, GIOCondition cond, operands[1] = SUBUNIT_PANEL << 3; DBG("reply to %s", avrcp->opcode == OP_UNITINFO ? "OP_UNITINFO" : "OP_SUBUNITINFO"); - } else if (avrcp->opcode == OP_VENDORDEP) { + } else if (avctp->cr == AVCTP_COMMAND && + avrcp->opcode == OP_VENDORDEP) { /* Reply with REJECT msg with error code 0x0 * (Invalid Command) as defined in AVRCP spec (6.15.1) */ struct avrcp_spec_avc_pdu *pdu = (void *) operands; -- 2.47.3