[PATCH] Fix AVCTP reply for message with invalid PID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reply for control message with invalid (not registered for reception
of messages) PID should not have message information field present.

This was affecting AVCTP 1.3 qualification test case TP/NFR/BI-01-C.
---
 audio/control.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index 9ede0f2..3db7d8e 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -566,7 +566,7 @@ static gboolean control_cb(GIOChannel *chan, GIOCondition cond,
 	} else if (avctp->pid != htons(AV_REMOTE_SVCLASS_ID)) {
 		avctp->ipid = 1;
 		avctp->cr = AVCTP_RESPONSE;
-		avrcp->code = CTYPE_REJECTED;
+		packet_size = sizeof(*avctp);
 	} else if (avctp->cr == AVCTP_COMMAND &&
 			avrcp->code == CTYPE_CONTROL &&
 			avrcp->subunit_type == SUBUNIT_PANEL &&
-- 
on behalf of ST-Ericsson

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux