From bf94ea8e69faa317418c3b8ad2464a7e6d85edfb Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Wed, 7 Jan 2015 21:48:21 -0800 Subject: [PATCH] core/gatt: Issue long write for reliable-write If the characteristic has the "reliable-write" extended property, GattCharacteristic1.WriteValue will now start a reliable long-write procedure. --- src/gatt-client.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gatt-client.c b/src/gatt-client.c index 0eae5788b..fe519976d 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -874,6 +874,15 @@ static DBusMessage *characteristic_write_value(DBusConnection *conn, * - If value is larger than MTU - 3: long-write * * "write-without-response" property set -> write command. */ + if ((chrc->ext_props & BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE)) { + supported = true; + chrc->write_id = start_long_write(msg, chrc->value_handle, gatt, + true, value, value_len, + chrc, chrc_write_complete); + if (chrc->write_id) + return NULL; + } + if (chrc->props & BT_GATT_CHRC_PROP_WRITE) { uint16_t mtu; -- 2.47.3