Diff between a5cd2da3aa09986c49290a0dc7c8b8dbb55c440b and 93fedbb9e07af3539ddc9e7ae999ce46ed19d943

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +9 -0 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index d0fc054..bfb9427 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -525,6 +525,9 @@ next:
 	if (!gatt_db_attribute_get_service_handles(attr, &start, &end))
 		goto failed;
 
+	if (start == end)
+		goto next;
+
 	if (bt_gatt_discover_included_services(client->att, start, end,
 							discover_incl_cb,
 							discovery_op_ref(op),
@@ -675,6 +678,9 @@ next:
 	if (!gatt_db_attribute_get_service_handles(attr, &start, &end))
 		goto failed;
 
+	if (start == end)
+		goto next;
+
 	/* Move on to the next service */
 	op->cur_svc = attr;
 	if (bt_gatt_discover_characteristics(client->att, start, end,
@@ -776,6 +782,9 @@ next:
 	if (!gatt_db_attribute_get_service_handles(attr, &start, &end))
 		goto failed;
 
+	if (start == end)
+		goto next;
+
 	/* Move on to the next service */
 	op->cur_svc = attr;
 	if (bt_gatt_discover_characteristics(client->att, start, end,