From e25fd4d869667fac09db80fe40daf1f46bb9d673 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 18 Sep 2015 11:50:14 +0300 Subject: [PATCH] core/gatt-client: Fix WriteValue always failing after first request WriteValue may use write without response proceduce in case it is supported but since that don't have any response write_id is left set after first request preventing blocking any new request. --- src/gatt-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gatt-client.c b/src/gatt-client.c index 399133a51..6c10a8257 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -946,11 +946,11 @@ static DBusMessage *characteristic_write_value(DBusConnection *conn, goto fail; supported = true; - chrc->write_id = bt_gatt_client_write_without_response(gatt, + + if (bt_gatt_client_write_without_response(gatt, chrc->value_handle, chrc->props & BT_GATT_CHRC_PROP_AUTH, - value, value_len); - if (chrc->write_id) + value, value_len)) return dbus_message_new_method_return(msg); fail: -- 2.47.3