--- src/adapter.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index dacb1dd..f1d9148 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3052,16 +3052,16 @@ void adapter_update_found_devices(struct btd_adapter *adapter, bdaddr_t *bdaddr, return; } - /* the inquiry result can be triggered by NON D-Bus client */ - if (main_opts.name_resolv && adapter_has_discov_sessions(adapter)) - name_status = NAME_REQUIRED; - else - name_status = NAME_NOT_REQUIRED; - name = read_stored_data(&adapter->bdaddr, bdaddr, "names"); legacy = pairing_is_legacy(&adapter->bdaddr, bdaddr, data, name); + if (!name && main_opts.name_resolv && + adapter_has_discov_sessions(adapter)) + name_status = NAME_REQUIRED; + else + name_status = NAME_NOT_REQUIRED; + /* Complete EIR names are always used. Shortened EIR names are only * used if there is no name already in storage. */ dev_name = name; -- 1.7.5.rc3 -- 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