From fa14609c8969bd4e0e6723187bb5e25327894fe0 Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Tue, 2 Oct 2012 08:50:20 -0400 Subject: [PATCH] attrib: Get address type using gatt_get_address() This avoids a separate call to device_get_addr_type(). --- attrib/client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/attrib/client.c b/attrib/client.c index ece16bf99..d49804c68 100644 --- a/attrib/client.c +++ b/attrib/client.c @@ -705,7 +705,6 @@ static GSList *load_characteristics(struct gatt_service *gatt, uint16_t start) static void store_attribute(struct gatt_service *gatt, uint16_t handle, uint16_t type, uint8_t *value, gsize len) { - struct btd_device *device = gatt->dev; bdaddr_t sba, dba; uint8_t bdaddr_type; bt_uuid_t uuid; @@ -722,9 +721,7 @@ static void store_attribute(struct gatt_service *gatt, uint16_t handle, for (i = 0, tmp = str + MAX_LEN_UUID_STR; i < len; i++, tmp += 2) sprintf(tmp, "%02X", value[i]); - gatt_get_address(gatt, &sba, &dba, NULL); - - bdaddr_type = device_get_addr_type(device); + gatt_get_address(gatt, &sba, &dba, &bdaddr_type); write_device_attribute(&sba, &dba, bdaddr_type, handle, str); -- 2.47.3