drivers/nble: Fix not being able to register CEP attributes

Registering CEP attributes was not possible because
bt_gatt_attr_read_cep was not implemented causing the following error:

bt: bt_gatt_register: Failed to read attr: -71

Change-Id: Ib0860cf657d6a6001c1fd4dd2712ac7361edee1c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2016-02-04 14:32:06 +02:00 committed by Anas Nashif
commit a1bac54378

View file

@ -328,7 +328,11 @@ int bt_gatt_attr_read_cep(struct bt_conn *conn,
const struct bt_gatt_attr *attr, void *buf,
uint16_t len, uint16_t offset)
{
return -ENOSYS;
struct bt_gatt_cep *value = attr->user_data;
uint16_t props = sys_cpu_to_le16(value->properties);
return bt_gatt_attr_read(conn, attr, buf, len, offset, &props,
sizeof(props));
}
int bt_gatt_attr_read_cud(struct bt_conn *conn,