Bluetooth: Audio: Add BT_WARN for missing stream callbacks

If any specific stream callback is attempted
to be called but is missing, a BT_WARN log statement
is added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-01-20 15:03:00 +01:00 committed by Johan Hedberg
commit 102dcca6a4
4 changed files with 38 additions and 0 deletions

View file

@ -100,6 +100,8 @@ static void broadcast_sink_iso_recv(struct bt_iso_chan *chan,
if (ops != NULL && ops->recv != NULL) {
ops->recv(ep->stream, buf);
} else {
BT_WARN("No callback for recv set");
}
}
@ -114,6 +116,8 @@ static void broadcast_sink_iso_connected(struct bt_iso_chan *chan)
if (ops != NULL && ops->connected != NULL) {
ops->connected(ep->stream);
} else {
BT_WARN("No callback for connected set");
}
}
@ -130,6 +134,8 @@ static void broadcast_sink_iso_disconnected(struct bt_iso_chan *chan,
if (ops != NULL && ops->disconnected != NULL) {
ops->disconnected(stream, reason);
} else {
BT_WARN("No callback for disconnected set");
}
}