Thread (2 messages) flat view 2 messages, 2 authors, 2011-06-28
STALE5563d

[PATCH] Fixed wrong AVCTP response to unregistered PID

From: <hidden>
Date: 2011-06-28 11:28:41
Subsystem: the rest · Maintainer: Linus Torvalds

From: Chen Ganir <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help