Hi Howard, On 14. Feb 2020, at 5.45, Howard Chung <howardchung@xxxxxxxxxx> wrote: > @@ -6141,6 +6141,22 @@ int device_confirm_passkey(struct btd_device *device, uint8_t type, > struct authentication_req *auth; > int err; > > + /* Just-Works repairing policy */ > + if (confirm_hint && (device_is_paired(device, BDADDR_BREDR) || > + device_is_paired(device, BDADDR_LE_PUBLIC))) { Wouldn’t a single call to device_is_paired() using “type” (the address type that’s part of the mgmt event) be the right thing to do here? Johan