summaryrefslogtreecommitdiff
path: root/android/avctp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-04-11 10:31:58 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-04-15 11:13:38 +0300
commit87f8d3fd62d625d03301f9d3c56f966cc55ad118 (patch)
tree540ab2af7a36486852fd3c5ae081851c9f76964e /android/avctp.c
parent8679e400513e504c5b52cd9eac8c159ada64fd19 (diff)
downloadbluez-87f8d3fd62d625d03301f9d3c56f966cc55ad118.tar.gz
android/avctp: Make avctp_send_vendor to take struct iovec
This makes it possible to pass data without copying.
Diffstat (limited to 'android/avctp.c')
-rw-r--r--android/avctp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/android/avctp.c b/android/avctp.c
index 62c41fd57..2271d2c94 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -1352,19 +1352,15 @@ int avctp_send_passthrough(struct avctp *session, uint8_t op, uint8_t *params,
int avctp_send_vendor(struct avctp *session, uint8_t transaction,
uint8_t code, uint8_t subunit,
- uint8_t *operands, size_t operand_count)
+ const struct iovec *iov, int iov_cnt)
{
struct avctp_channel *control = session->control;
- struct iovec iov;
if (control == NULL)
return -ENOTCONN;
- iov.iov_base = operands;
- iov.iov_len = operand_count;
-
return avctp_send(control, transaction, AVCTP_RESPONSE, code, subunit,
- AVC_OP_VENDORDEP, &iov, 1);
+ AVC_OP_VENDORDEP, iov, iov_cnt);
}
int avctp_send_vendor_req(struct avctp *session, uint8_t code, uint8_t subunit,