From ed63d7e5a9f6caff820745de657bea6faad8e6ee Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 7 Sep 2017 16:44:35 +0300 Subject: [PATCH] gatt: Fix not calling gatt_db_attribute_write_result In case an error happens in send_write it should call gatt_db_attribute_write_result not gatt_db_attribute_read_result as it is a read operation. --- src/gatt-database.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gatt-database.c b/src/gatt-database.c index 4af9b81a8..61eed71d6 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -2026,8 +2026,7 @@ static void desc_write_cb(struct gatt_db_attribute *attrib, return; fail: - gatt_db_attribute_read_result(attrib, id, BT_ATT_ERROR_UNLIKELY, - NULL, 0); + gatt_db_attribute_write_result(attrib, id, BT_ATT_ERROR_UNLIKELY); } static bool database_add_desc(struct external_service *service, @@ -2113,8 +2112,7 @@ static void chrc_write_cb(struct gatt_db_attribute *attrib, return; fail: - gatt_db_attribute_read_result(attrib, id, BT_ATT_ERROR_UNLIKELY, - NULL, 0); + gatt_db_attribute_write_result(attrib, id, BT_ATT_ERROR_UNLIKELY); } static bool database_add_chrc(struct external_service *service, -- 2.47.3