Diff between 3627eddea13042ffc0848ae37356f30335ce2e4b and bbeabca44a3da3e1efd8e57b0366bbb45aadbb5b
Changed Files
| File | Additions | Deletions | Status |
| profiles/gap/gas.c | +5 | -0 | modified |
Full Patch
diff --git a/profiles/gap/gas.c b/profiles/gap/gas.c
index ea3249b..400818d 100644
--- a/profiles/gap/gas.c
+++ b/profiles/gap/gas.c
@@ -142,6 +142,11 @@ static void read_appearance_cb(bool success, uint8_t att_ecode,
static void handle_appearance(struct gas *gas, uint16_t value_handle)
{
+ uint16_t value;
+
+ if (!device_get_appearance(gas->device, &value))
+ return;
+
if (!bt_gatt_client_read_value(gas->client, value_handle,
read_appearance_cb, gas, NULL))
DBG("Failed to send request to read appearance");