summaryrefslogtreecommitdiff
path: root/attrib/client.c
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2012-10-02 08:50:20 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-10-02 16:45:07 +0300
commitfa14609c8969bd4e0e6723187bb5e25327894fe0 (patch)
tree01e8732d51cc7ade529ae0a6fe5e0aa6f4302d82 /attrib/client.c
parent27316edbd39de96a5596ad5412478aad77135b84 (diff)
downloadbluez-fa14609c8969bd4e0e6723187bb5e25327894fe0.tar.gz
attrib: Get address type using gatt_get_address()
This avoids a separate call to device_get_addr_type().
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c5
1 files changed, 1 insertions, 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);