Commit 871859a0 authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz Committed by Johan Hedberg
Browse files

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: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 469bd39b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -548,9 +548,11 @@ 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,
			       const struct bt_gatt_attr *attr, const void *buf,