diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-09-08 18:50:16 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-09-08 18:50:16 +0200 |
commit | a83ccff765033e99113ac29d3b0b7f7e0064fb28 (patch) | |
tree | 085e8fcf478c8e7edae2f5e6375f8f43e0ffabfe /src/device.c | |
parent | 8a74ae3846bc1fb887c80a355265e701f1546df6 (diff) | |
parent | 19ce4933f3dadf3b04a2a9bd84d66d750cc010c3 (diff) |
Merge branch 'for-upstream' of git://gitorious.org/bluez/aloks-clone
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/device.c b/src/device.c index a4b26d52..63c6a5b7 100644 --- a/src/device.c +++ b/src/device.c @@ -633,7 +633,6 @@ void device_probe_drivers(struct btd_device *device, GSList *uuids, sdp_list_t * void device_remove_drivers(struct btd_device *device, GSList *uuids, sdp_list_t *recs) { struct btd_adapter *adapter = device_get_adapter(device); - const gchar *dst = device_get_address(device); GSList *list; char src_addr[18]; bdaddr_t src; @@ -665,7 +664,7 @@ void device_remove_drivers(struct btd_device *device, GSList *uuids, sdp_list_t if (!rec) continue; - delete_record(src_addr, dst, rec->handle); + delete_record(src_addr, device->address, rec->handle); } } @@ -795,7 +794,6 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) { struct btd_device *device = req->device; struct btd_adapter *adapter = device_get_adapter(device); - const gchar *dst = device_get_address(device); sdp_list_t *seq; char src_addr[18]; bdaddr_t src; @@ -825,7 +823,7 @@ static void update_services(struct browse_req *req, sdp_list_t *recs) if (sdp_list_find(req->records, rec, rec_cmp)) continue; - store_record(src_addr, dst, rec); + store_record(src_addr, device->address, rec); /* Copy record */ if (sdp_gen_record_pdu(rec, &pdu) == 0) { @@ -1015,12 +1013,9 @@ struct btd_adapter *device_get_adapter(struct btd_device *device) return device->adapter; } -const gchar *device_get_address(struct btd_device *device) +void device_get_address(struct btd_device *device, bdaddr_t *bdaddr) { - if (!device) - return NULL; - - return device->address; + str2ba(device->address, bdaddr); } const gchar *device_get_path(struct btd_device *device) |