From 9b4912ecf815b0483d539073b1ec2eaddc5a7613 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 29 Aug 2016 12:17:15 +0300 Subject: [PATCH] shared/gatt-client: Fix not checking the return of bt_gatt_client_read_value If the bt_gatt_client_read_value fails the whole discovery would stall as ext_prop_read_cb would not be called. --- src/shared/gatt-client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 8fd8a4500..4386692f9 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -631,9 +631,11 @@ static bool read_ext_prop_desc(struct discovery_op *op) return false; handle = gatt_db_attribute_get_handle(attr); - bt_gatt_client_read_value(client, handle, ext_prop_read_cb, + + if (!bt_gatt_client_read_value(client, handle, ext_prop_read_cb, discovery_op_ref(op), - discovery_op_unref); + discovery_op_unref)) + return false; return true; } -- 2.11.0