Bluetooth: Do nothing if required no encryption

Until full security level tracking is added just ignore BT_CONN_SEC_LOW
security level.

Change-Id: I38ccf7dca261dc0a2a3d6e58b7398946d8f17771
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2015-06-26 19:04:25 +02:00 committed by Anas Nashif
commit a6a0e54ec9

View file

@ -396,6 +396,11 @@ int bt_conn_security(struct bt_conn *conn, bt_conn_security_t sec)
return -ENOTCONN;
}
/* nothing to do */
if (sec == BT_CONN_SEC_LOW) {
return 0;
}
/* for now we only support JustWorks */
if (sec > BT_CONN_SEC_MEDIUM) {
return -EINVAL;