diff --git a/src/attrib-server.c b/src/attrib-server.c
index a6262d0..d2a2520 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
return attrib1->handle - attrib2->handle;
}
-static struct attribute *find_primary_range(struct gatt_server *server,
- uint16_t start, uint16_t *end)
+static struct attribute *find_svc_range(struct gatt_server *server,
+ uint16_t start, uint16_t *end)
{
struct attribute *attrib;
guint h = start;
attrib = l->data;
- if (bt_uuid_cmp(&attrib->uuid, &prim_uuid) != 0)
+ if (bt_uuid_cmp(&attrib->uuid, &prim_uuid) != 0 &&
+ bt_uuid_cmp(&attrib->uuid, &snd_uuid) != 0)
return NULL;
*end = start;
uuid_t svc, gap_uuid;
bdaddr_t addr;
- a = find_primary_range(server, handle, &end);
+ a = find_svc_range(server, handle, &end);
if (a == NULL)
return 0;