If ATT is disconnected and the state points to an invalid device it
must have been destroyed in the meantime and should not be recreated.
Change-Id: I60d5bafb0130188ce718b38a02e8008b151a5750
Signed-off-by: himanshu <h.himanshu@samsung.com>
state->disc_id = 0;
- device = btd_adapter_get_device(state->db->adapter, &state->bdaddr,
- state->bdaddr_type);
+ device = btd_adapter_find_device(state->db->adapter, &state->bdaddr,
+ state->bdaddr_type);
if (!device)
goto remove;