summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-07-07 11:15:02 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-07-07 11:15:02 +0300
commit32710599b21b8954e882d01489aeb44ce399e959 (patch)
tree0322fbb5d3a7aabd2623bba9ea5319354de87c75
parentecf2495781f735a7604df7d5d5b2d8ad5330c480 (diff)
downloadbluez-32710599b21b8954e882d01489aeb44ce399e959.tar.gz
core/gatt: Fix attribute permissions
-rw-r--r--src/gatt-database.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gatt-database.c b/src/gatt-database.c
index e287b987b..09fa1a90a 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -1168,7 +1168,7 @@ static bool parse_chrc_flags(DBusMessageIter *array, uint8_t *props,
} else if (!strcmp("secure-read", flag)) {
*props |= BT_GATT_CHRC_PROP_READ;
*ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_READ;
- *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_READ_SECURE;
+ *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_SECURE;
} else if (!strcmp("secure-write", flag)) {
*props |= BT_GATT_CHRC_PROP_WRITE;
*ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_WRITE;
@@ -1210,9 +1210,9 @@ static bool parse_desc_flags(DBusMessageIter *array, uint32_t *perm)
else if (!strcmp("encrypt-authenticated-write", flag))
*perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_AUTHEN;
else if (!strcmp("secure-read", flag))
- *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_AUTHEN;
+ *perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_SECURE;
else if (!strcmp("secure-write", flag))
- *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_AUTHEN;
+ *perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_SECURE;
else {
error("Invalid descriptor flag: %s", flag);
return false;