core/gatt-client: Fix WriteValue always failing after first request
Luiz Augusto von Dentz
maintainerPATCH 1/1 core/gatt-client: Fix WriteValue always failing after first request
From: Luiz Augusto von Dentz <[email protected]>
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(-)
src/gatt-client.c +3 -3
@@ -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:
Signature · 1 line
2.4.3
Hi,
Quoted 29 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
WriteValue may use write without response proceduce in case it is supported but since that don't have any response
write_idis left set after first request preventing blocking any new request.--- src/gatt-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)src/gatt-client.c +3
-4@@ -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: --
Quoted 1 line
2.4.3
Applied.
Signature · 1 line
Luiz Augusto von Dentz