SDP records are no more stored, so they can only be retrieved from remote device (tmp_records during bonding). --- src/device.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/device.c b/src/device.c index 6cec4a0..a7f85d1 100644 --- a/src/device.c +++ b/src/device.c @@ -4220,24 +4220,20 @@ void btd_device_add_uuid(struct btd_device *device, const char *uuid) const sdp_record_t *btd_device_get_record(struct btd_device *device, const char *uuid) { - if (device->tmp_records) { - const sdp_record_t *record; + const sdp_record_t *record; - record = find_record_in_list(device->tmp_records, uuid); - if (record != NULL) - return record; - - sdp_list_free(device->tmp_records, - (sdp_free_func_t) sdp_record_free); - device->tmp_records = NULL; - } - - device->tmp_records = read_records(adapter_get_address(device->adapter), - &device->bdaddr); if (!device->tmp_records) return NULL; - return find_record_in_list(device->tmp_records, uuid); + record = find_record_in_list(device->tmp_records, uuid); + if (record != NULL) + return record; + + sdp_list_free(device->tmp_records, + (sdp_free_func_t) sdp_record_free); + device->tmp_records = NULL; + + return NULL; } struct btd_device *btd_device_ref(struct btd_device *device) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html