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:
Luiz Augusto von Dentz 2018-08-21 16:36:37 +03:00 committed by Johan Hedberg
commit 871859a07e

View file

@ -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,