Thread (14 messages) 14 messages, 5 authors, 2012-01-23

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

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2011-12-14 12:09:35

Hi Vinicius,

On Wed, Dec 14, 2011 at 1:57 AM, Vinicius Costa Gomes
[off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help