summaryrefslogtreecommitdiff
path: root/src/gatt-database.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2019-09-06 14:09:37 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-03-02 14:42:34 -0800
commitb8b59af4e88069cb2f67b0168113aa489f6e1fe9 (patch)
tree3f0581851af702d68633ce2e0e32df97788f5049 /src/gatt-database.c
parent923d9b47be6255ddd7eed8ce6d7a81312fcf5b53 (diff)
downloadbluez-b8b59af4e88069cb2f67b0168113aa489f6e1fe9.tar.gz
gatt: Add support for Notify Multiple
This adds support for Notify Multiple procedure marking its bit as supported in the Client Features.
Diffstat (limited to 'src/gatt-database.c')
-rw-r--r--src/gatt-database.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gatt-database.c b/src/gatt-database.c
index afacae7d2..245d33af6 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -1011,7 +1011,7 @@ static void gatt_ccc_write_cb(struct gatt_db_attribute *attrib,
if (ccc_cb->callback) {
struct pending_op *op;
- op = pending_ccc_new(att, attrib, get_le16(value),
+ op = pending_ccc_new(att, attrib, val,
bt_att_get_link_type(att));
if (!op) {
ecode = BT_ATT_ERROR_UNLIKELY;
@@ -1098,7 +1098,8 @@ static void cli_feat_write_cb(struct gatt_db_attribute *attrib,
struct btd_gatt_database *database = user_data;
struct device_state *state;
uint8_t bits[] = { BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING,
- BT_GATT_CHRC_CLI_FEAT_EATT };
+ BT_GATT_CHRC_CLI_FEAT_EATT,
+ BT_GATT_CHRC_CLI_FEAT_NFY_MULTI };
uint8_t ecode = 0;
unsigned int i;
@@ -1330,7 +1331,8 @@ static void send_notification_to_device(void *data, void *user_data)
DBG("GATT server sending notification");
bt_gatt_server_send_notification(server,
notify->handle, notify->value,
- notify->len);
+ notify->len, device_state->cli_feat[0] &
+ BT_GATT_CHRC_CLI_FEAT_NFY_MULTI);
return;
}