diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index e207345..0c60f06 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
{
struct media_transport *transport = data;
struct media_owner *owner = transport->owner;
- struct bap_transport *bap = transport->data;
const char *sender;
struct media_request *req;
guint id;
req = media_request_create(msg, id);
media_owner_add(owner, req);
- if (bt_bap_stream_get_type(bap->stream) ==
- BT_BAP_STREAM_TYPE_BCAST) {
- bap_disable_complete(bap->stream, 0x00, 0x00, owner);
- }
-
return NULL;
}
{
struct bap_transport *bap = transport->data;
bt_bap_stream_func_t func = NULL;
+ guint id;
if (!bap->stream)
return 0;
bap_update_links(transport);
- return bt_bap_stream_disable(bap->stream, bap->linked, func, owner);
+ id = bt_bap_stream_disable(bap->stream, bap->linked, func, owner);
+
+ if (bt_bap_stream_get_type(bap->stream) == BT_BAP_STREAM_TYPE_BCAST) {
+ bap_disable_complete(bap->stream, 0x00, 0x00, owner);
+ return 0;
+ }
+
+ return id;
}
static void cancel_bap(struct media_transport *transport, guint id)