From d85acdd6ee5825a761d8832d7a305b527ff15912 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 15 Feb 2016 13:14:57 +0200 Subject: [PATCH] shared/gatt-client: Add debug log if characteristic cannot be added If gatt_db_service_insert_characteristic fails print an error for the handle. --- src/shared/gatt-client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 20c195ada..8486b0931 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -588,8 +588,12 @@ static bool discover_descs(struct discovery_op *op, bool *discovering) chrc_data->properties, NULL, NULL, NULL); - if (!attr) + if (!attr) { + util_debug(client->debug_callback, client->debug_data, + "Failed to insert characteristic at 0x%04x", + chrc_data->value_handle); goto failed; + } if (gatt_db_attribute_get_handle(attr) != chrc_data->value_handle) -- 2.47.3