aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2010-09-06 11:34:24 -0400
committerAnderson Lizardo <anderson.lizardo@openbossa.org>2010-09-14 09:55:35 -0400
commit0f587cb1b987c5bf447e6e59f2fd48145f06fd1a (patch)
treeb4c8ca9e7996a6b309612b4bf562bc0adcc4e0f4
parent49d2452e287ea890a6572da9ca52e108a1232f22 (diff)
downloadbluez-0f587cb1b987c5bf447e6e59f2fd48145f06fd1a.tar.gz
bluez-0f587cb1b987c5bf447e6e59f2fd48145f06fd1a.tar.xz
bluez-0f587cb1b987c5bf447e6e59f2fd48145f06fd1a.zip
Fix UUID 128-bit support on attribute client
For descriptors, a comment is added explaining why UUID 128-bit support is not necessary yet. For characteristic discovery, characteristics with 128-bit UUID types are now loaded.
-rw-r--r--attrib/client.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 19930b3b..432dfcd8 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -527,8 +527,13 @@ static void descriptor_cb(guint8 status, const guint8 *pdu, guint16 plen,
if (format == 0x01) {
sdp_uuid16_create(&uuid, att_get_u16((uint16_t *)
&info[2]));
- } else
+ } else {
+ /* Currently, only "user description" and "presentation
+ * format" descriptors are used, and both have 16-bit
+ * UUIDs. Therefore there is no need to support format
+ * 0x02 yet. */
continue;
+ }
attr_data = g_new0(struct desc_fmt_data, 1);
attr_data->desc_data = *current;
@@ -603,9 +608,8 @@ static void char_discovered_cb(guint8 status, const guint8 *pdu, guint16 plen,
if (list->len == 7) {
sdp_uuid16_create(&chr->type,
att_get_u16((uint16_t *) &decl[5]));
- } else {
- /* FIXME: UUID128 */
- }
+ } else
+ sdp_uuid128_create(&chr->type, &decl[5]);
if (previous_end) {
*previous_end = att_get_u16((uint16_t *) decl);