[PATCH BlueZ v0 10/10] gap: Don't store Appearance if value is "unknown"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Core SPEC is not clear regarding the behaviour or the Appearance
characteristic. According to the SPEC, the Appearance characteristic
should be readable without authentication or authorization. This patch
will keep the Appearance characteristic value refresh (read) on every
re-connection if the value is 0x0000.
---
 profiles/gap/gap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/profiles/gap/gap.c b/profiles/gap/gap.c
index ff5715b..596d0b9 100644
--- a/profiles/gap/gap.c
+++ b/profiles/gap/gap.c
@@ -98,6 +98,9 @@ static void appearance_cb(guint8 status, const guint8 *pdu, guint16 plen,
 
 	device_set_appearance(gap->device, app);
 
+	if (app == 0x0000)
+		goto done;
+
 	adapter_get_address(device_get_adapter(gap->device), &src);
 	device_get_address(gap->device, &dst, &type);
 
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux