[PATCH] Fixed wrong AVCTP response to unregistered PID

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

 



From: Chen Ganir <chen.ganir@xxxxxx>

AVCTP response to unregistered PID should consist only
from the first 3 octets of the AVCTP header, without
any additional frame data (Fix for PTS certification
issue)
---
 audio/control.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/audio/control.c b/audio/control.c
index ceb3d88..7c92d10 100755
--- a/audio/control.c
+++ b/audio/control.c
@@ -580,9 +580,10 @@ static gboolean control_cb(GIOChannel *chan, GIOCondition cond,
 		avctp->cr = AVCTP_RESPONSE;
 		avrcp->code = CTYPE_NOT_IMPLEMENTED;
 	} else if (avctp->pid != htons(AV_REMOTE_SVCLASS_ID)) {
+		DBG("AVCTP invalid pid (%d) specified. Rejecting request",avctp->pid);
 		avctp->ipid = 1;
 		avctp->cr = AVCTP_RESPONSE;
-		avrcp->code = CTYPE_REJECTED;
+		packet_size = sizeof(struct avctp_header);
 	} else if (avctp->cr == AVCTP_COMMAND &&
 			avrcp->code == CTYPE_CONTROL &&
 			avrcp->subunit_type == SUBUNIT_PANEL &&
-- 
1.7.1

--
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