Diff between f9dc0c076258754c0b25314308640eb535db2d4a and a68d1fe4a409288aa1e52a19c8b3cd7ac54e7bb1

Changed Files

File Additions Deletions Status
src/attrib-server.c +3 -2 modified

Full Patch

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 74a1c8d..9543da6 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -167,11 +167,12 @@ static uint8_t att_check_reqs(struct gatt_channel *channel, uint8_t opcode,
 {
 	/* FIXME: currently, it is assumed an encrypted link is enough for
 	 * authentication. This will allow to enable the SMP negotiation once
-	 * it is on upstream kernel. */
+	 * it is on upstream kernel. High security level should be mapped
+	 * to authentication and medium to encryption permission. */
 	if (!channel->encrypted)
 		channel->encrypted = g_attrib_is_encrypted(channel->attrib);
 	if (reqs == ATT_AUTHENTICATION && !channel->encrypted)
-		return ATT_ECODE_INSUFF_ENC;
+		return ATT_ECODE_INSUFF_AUTHEN;
 
 	switch (opcode) {
 	case ATT_OP_READ_BY_GROUP_REQ: