Re: [PATCH v3] Add support of secure pin code in mgmt code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Waldemar,

On Wed, Jun 1, 2011 at 11:32 AM, Waldemar Rymarkiewicz
<waldemar.rymarkiewicz@xxxxxxxxx> wrote:
> @@ -135,13 +135,13 @@ int btd_event_request_pin(bdaddr_t *sba, bdaddr_t *dba)
>
>        memset(pin, 0, sizeof(pin));
>        pinlen = read_pin_code(sba, dba, pin);
> -       if (pinlen > 0) {
> +       if (pinlen > 0 && (secure && pinlen == 16)) {

I think this does not make sense. Regardless of secure being TRUE or
FALSE, "pinlen > 0" will never influence the condition check, so this
is actually equivalent to "if (secure && pinlen == 16)". Maybe you
meant:

if (pinlen > 0 || (secure && pinlen == 16))

?

>                btd_adapter_pincode_reply(adapter, dba, pin, pinlen);
>                return 0;
>        }
>
>        return device_request_authentication(device, AUTH_TYPE_PINCODE, 0,
> -                                                               pincode_cb);
> +                                                       secure, pincode_cb);
>  }
>
>  static int confirm_reply(struct btd_adapter *adapter,

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux