summaryrefslogtreecommitdiff
path: root/android/avctp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-03-04 15:08:17 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-04 18:03:27 +0200
commitd17cf9905f436a1b38ff2248aa5279c1188b73fc (patch)
tree646d484e9b5201b1d2c3aa1cef683c3fc77f3f9e /android/avctp.c
parent31505cf155cb0c19a732b537a066b1c65c262a23 (diff)
downloadbluez-d17cf9905f436a1b38ff2248aa5279c1188b73fc.tar.gz
AVCTP: Fix sending wrong response format
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.
Diffstat (limited to 'android/avctp.c')
-rw-r--r--android/avctp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/avctp.c b/android/avctp.c
index abf94498d..9232cfaab 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: