summaryrefslogtreecommitdiff
path: root/android/hidhost.c
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2014-02-11 14:32:26 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-02-12 11:26:56 +0200
commit9b00e93b11e5d0b7ce3a4a61426df2bd30f7ceae (patch)
tree2294c43b3c6cada8dcd220c73beb5146d73bacaa /android/hidhost.c
parent849cc4f912a1b5cc2fc5b3d6b695980d956274fc (diff)
downloadbluez-9b00e93b11e5d0b7ce3a4a61426df2bd30f7ceae.tar.gz
android: Use 16-bit UUID for SDP search
These UUIDs are assigned by BT-SIG and therefore there is no need to use full 128-bit UUIDs. This also avoids unnecessary conversion from string representation.
Diffstat (limited to 'android/hidhost.c')
-rw-r--r--android/hidhost.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/android/hidhost.c b/android/hidhost.c
index bee665eb4..c0e7e6049 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -37,7 +37,6 @@
#include "lib/bluetooth.h"
#include "lib/sdp.h"
#include "lib/sdp_lib.h"
-#include "lib/uuid.h"
#include "src/shared/mgmt.h"
#include "src/sdp-client.h"
#include "src/uuid-helper.h"
@@ -751,7 +750,7 @@ static void hid_sdp_did_search_cb(sdp_list_t *recs, int err, gpointer data)
dev->version = data->val.uint16;
}
- bt_string2uuid(&uuid, HID_UUID);
+ sdp_uuid16_create(&uuid, HID_SVCLASS_ID);
if (bt_search_service(&adapter_addr, &dev->dst, &uuid,
hid_sdp_search_cb, dev, NULL, 0) < 0) {
error("failed to search sdp details");
@@ -792,7 +791,7 @@ static void bt_hid_connect(const void *buf, uint16_t len)
ba2str(&dev->dst, addr);
DBG("connecting to %s", addr);
- bt_string2uuid(&uuid, PNP_UUID);
+ sdp_uuid16_create(&uuid, PNP_INFO_SVCLASS_ID);
if (bt_search_service(&adapter_addr, &dev->dst, &uuid,
hid_sdp_did_search_cb, dev, NULL, 0) < 0) {
error("Failed to search DeviceID SDP details");
@@ -1293,7 +1292,7 @@ static void connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
dev->ctrl_io = g_io_channel_ref(chan);
dev->uhid_fd = -1;
- bt_string2uuid(&uuid, PNP_UUID);
+ sdp_uuid16_create(&uuid, PNP_INFO_SVCLASS_ID);
if (bt_search_service(&src, &dev->dst, &uuid,
hid_sdp_did_search_cb, dev, NULL, 0) < 0) {
error("failed to search did sdp details");