diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2014-05-22 21:06:17 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-05-26 10:28:12 +0200 |
commit | 84bbaa3971f057c84447d0f2a222d749add57fed (patch) | |
tree | f1d0ad886df3028888561a4bee294512855ee8fb /attrib/gatt.c | |
parent | d4026bb36e15d8403a9c5761f7447481d53eac4e (diff) | |
download | bluez-84bbaa3971f057c84447d0f2a222d749add57fed.tar.gz |
attrib: Add wrapper to send signed write command
Diffstat (limited to 'attrib/gatt.c')
-rw-r--r-- | attrib/gatt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/attrib/gatt.c b/attrib/gatt.c index 73eaf7a86..ce0800361 100644 --- a/attrib/gatt.c +++ b/attrib/gatt.c @@ -1065,6 +1065,22 @@ guint gatt_write_cmd(GAttrib *attrib, uint16_t handle, const uint8_t *value, return g_attrib_send(attrib, 0, buf, plen, NULL, user_data, notify); } +guint gatt_signed_write_cmd(GAttrib *attrib, uint16_t handle, + const uint8_t *value, int vlen, + const uint8_t signature[12], + GDestroyNotify notify, + gpointer user_data) +{ + uint8_t *buf; + size_t buflen; + guint16 plen; + + buf = g_attrib_get_buffer(attrib, &buflen); + plen = enc_signed_write_cmd(handle, value, vlen, signature, buf, + buflen); + return g_attrib_send(attrib, 0, buf, plen, NULL, user_data, notify); +} + static sdp_data_t *proto_seq_find(sdp_list_t *proto_list) { sdp_list_t *list; |