Re: [PATCH BlueZ 1/5] Add support for getting the Encryption Key Size via btio

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

 



Hi Vinicius,

On Wed, Dec 14, 2011 at 1:57 AM, Vinicius Costa Gomes
<vinicius.gomes@xxxxxxxxxxxxx> wrote:
> +static gboolean get_key_size(int sock, BtIOType type, int *size,
> +                                                               GError **err)
> +{
> +       struct bt_security sec;
> +       socklen_t len;
> +
> +       memset(&sec, 0, sizeof(sec));
> +       len = sizeof(sec);
> +       if (getsockopt(sock, SOL_BLUETOOTH, BT_SECURITY, &sec, &len) == 0) {
> +               *size = sec.key_size;
> +               return TRUE;
> +       }
> +
> +       return FALSE;
> +}

It doesn't seems that the type is used for anything here, so you can
probably removed it.

-- 
Luiz Augusto von Dentz
--
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