* [PATCH BlueZ] attrib: Get address type using gatt_get_address()
@ 2012-10-02 12:50 Anderson Lizardo
2012-10-02 13:45 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2012-10-02 12:50 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
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 ece16bf..d49804c 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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] attrib: Get address type using gatt_get_address()
2012-10-02 12:50 [PATCH BlueZ] attrib: Get address type using gatt_get_address() Anderson Lizardo
@ 2012-10-02 13:45 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-10-02 13:45 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
Hi Lizardo,
On Tue, Oct 02, 2012, Anderson Lizardo wrote:
> This avoids a separate call to device_get_addr_type().
> ---
> attrib/client.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-02 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 12:50 [PATCH BlueZ] attrib: Get address type using gatt_get_address() Anderson Lizardo
2012-10-02 13:45 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).