Bluetooth: GATT: Make CCC cfg_changed optional
If cfg_changed has not been set consider that the application don't care and just skip it. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
469bd39b82
commit
871859a07e
1 changed files with 3 additions and 1 deletions
|
@ -548,8 +548,10 @@ static void gatt_ccc_changed(const struct bt_gatt_attr *attr,
|
|||
|
||||
if (value != ccc->value) {
|
||||
ccc->value = value;
|
||||
if (ccc->cfg_changed) {
|
||||
ccc->cfg_changed(attr, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ssize_t bt_gatt_attr_write_ccc(struct bt_conn *conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue