diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-02-20 12:35:10 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-02-24 15:28:08 +0200 |
commit | 965dc299f018465447510100627f8c6f5b92eb9f (patch) | |
tree | fab88b356577dc897d9da0b9bae1e09dd2c0d266 /src | |
parent | 051a525c4a4437f80d68539bcacece21b586a2d6 (diff) | |
download | bluez-965dc299f018465447510100627f8c6f5b92eb9f.tar.gz |
shared/gatt-client: Add support for signed write
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/gatt-client.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index ac2692fdd..a966dd08f 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -2129,10 +2129,6 @@ unsigned int bt_gatt_client_write_without_response( if (!client) return 0; - /* TODO: Support this once bt_att_send supports signed writes. */ - if (signed_write) - return 0; - req = request_create(client); if (!req) return 0; @@ -2140,9 +2136,10 @@ unsigned int bt_gatt_client_write_without_response( put_le16(value_handle, pdu); memcpy(pdu + 2, value, length); - req->att_id = bt_att_send(client->att, BT_ATT_OP_WRITE_CMD, - pdu, sizeof(pdu), - NULL, NULL, NULL); + req->att_id = bt_att_send(client->att, + signed_write ? BT_ATT_OP_SIGNED_WRITE_CMD : + BT_ATT_OP_WRITE_CMD, pdu, sizeof(pdu), + NULL, NULL, NULL); if (!req->att_id) { request_unref(req); return 0; |