From 4b1914903cb105acf843b84833e81d5470133879 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 29 Oct 2008 21:10:48 +0200 Subject: Convert Bluetooth UUID-128 to 32 or 16 bit if possible before searching When doing SDP queries try to convert Bluetooth UUID-128 to 32 or 16 bit form. --- src/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/device.c b/src/device.c index 031b5f4d..27e0ef25 100644 --- a/src/device.c +++ b/src/device.c @@ -402,6 +402,8 @@ static DBusMessage *discover_services(DBusConnection *conn, if (bt_string2uuid(&uuid, pattern) < 0) return invalid_args(msg); + sdp_uuid128_to_uuid(&uuid); + err = device_browse(device, conn, msg, &uuid, FALSE); if (err < 0) goto fail; @@ -1087,6 +1089,7 @@ static void browse_cb(sdp_list_t *recs, int err, gpointer user_data) bt_string2uuid(&uuid, uuid_str); req->uuids = g_slist_remove(req->uuids, uuid_str); g_free(uuid_str); + sdp_uuid128_to_uuid(&uuid); bt_search_service(&src, &device->bdaddr, &uuid, browse_cb, user_data, NULL); return; -- cgit