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:
parent
9140a8ac46
commit
102dcca6a4
4 changed files with 38 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue