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,7 +548,9 @@ static void gatt_ccc_changed(const struct bt_gatt_attr *attr,
|
||||||
|
|
||||||
if (value != ccc->value) {
|
if (value != ccc->value) {
|
||||||
ccc->value = value;
|
ccc->value = value;
|
||||||
ccc->cfg_changed(attr, value);
|
if (ccc->cfg_changed) {
|
||||||
|
ccc->cfg_changed(attr, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue