summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-29 21:10:48 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-29 21:10:48 +0200
commit4b1914903cb105acf843b84833e81d5470133879 (patch)
treeddce4417eab5542d5646211f169f99117d5d5703 /src
parente0baf6af60783937e774229730b56846cfe27673 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/device.c3
1 files changed, 3 insertions, 0 deletions
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;