From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ] AVCTP: Fix sending wrong response format
Date: Tue, 4 Mar 2014 15:08:17 +0200 [thread overview]
Message-ID: <1393938497-4522-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Reject and Not Implemented responses of PASS THROUGH commands shall
contain the data of the previous frame accourding to AVC Panel Subunit
specification page 87.
---
android/avctp.c | 4 ++--
profiles/audio/avctp.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/android/avctp.c b/android/avctp.c
index abf9449..9232cfa 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -322,7 +322,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
*code = AVC_CTYPE_REJECTED;
- return 0;
+ return operand_count;
}
if (operand_count == 0)
@@ -394,7 +394,7 @@ static ssize_t handle_panel_passthrough(struct avctp *session,
DBG("AV/C: unknown button 0x%02X %s",
operands[0] & 0x7F, status);
*code = AVC_CTYPE_NOT_IMPLEMENTED;
- return 0;
+ return operand_count;
}
done:
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 28c7685..f88e634 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -342,7 +342,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
if (*code != AVC_CTYPE_CONTROL || *subunit != AVC_SUBUNIT_PANEL) {
*code = AVC_CTYPE_REJECTED;
- return 0;
+ return operand_count;
}
if (operand_count == 0)
@@ -408,7 +408,7 @@ static size_t handle_panel_passthrough(struct avctp *session,
DBG("AV/C: unknown button 0x%02X %s",
operands[0] & 0x7F, status);
*code = AVC_CTYPE_NOT_IMPLEMENTED;
- return 0;
+ return operand_count;
}
done:
--
1.8.5.3
next reply other threads:[~2014-03-04 13:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 13:08 Luiz Augusto von Dentz [this message]
2014-03-04 16:05 ` [PATCH BlueZ] AVCTP: Fix sending wrong response format Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393938497-4522-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox