diff options
-rw-r--r-- | src/device.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index 1cf260ec..3476ec06 100644 --- a/src/device.c +++ b/src/device.c @@ -787,13 +787,19 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) if (sdp_get_service_classes(rec, &svcclass) < 0) continue; - store_record(src, dst, rec); /* Extract the first element and skip the remainning */ uuid_str = bt_uuid2string(svcclass->data); if (!uuid_str) continue; + /* Check for duplicates */ + if (g_slist_find_custom(req->uuids_added, uuid_str, + (GCompareFunc) strcmp)) + continue; + + store_record(src, dst, rec); + /* Copy record */ if (sdp_gen_record_pdu(rec, &pdu) == 0) { sdp_record_t *record; |