Created
March 13, 2024 20:43
-
-
Save Vudentz/ab241cd1a373f5d0f7182355f23227c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c | |
index 2b44273b24e7..c1636c7415a7 100644 | |
--- a/profiles/audio/bap.c | |
+++ b/profiles/audio/bap.c | |
@@ -1969,6 +1969,7 @@ static void setup_connect_io_broadcast(struct bap_data *data, | |
bdaddr_t dst_addr = {0}; | |
char addr[18]; | |
struct bt_iso_base base; | |
+ struct iovec *iov; | |
/* If IO already set and we are in the creation step, | |
* skip creating it again | |
@@ -1976,16 +1977,20 @@ static void setup_connect_io_broadcast(struct bap_data *data, | |
if (bt_bap_stream_get_io(stream)) | |
return; | |
+ iov = bt_bap_stream_get_base(stream); | |
+ | |
if (setup->io_id) { | |
g_source_remove(setup->io_id); | |
setup->io_id = 0; | |
} | |
- base.base_len = setup->base->iov_len; | |
+ base.base_len = iov->iov_len; | |
memset(base.base, 0, 248); | |
- memcpy(base.base, setup->base->iov_base, setup->base->iov_len); | |
+ memcpy(base.base, iov->iov_base, iov->iov_len); | |
ba2str(btd_adapter_get_address(adapter), addr); | |
+ util_iov_free(iov, 1); | |
+ | |
DBG("setup %p stream %p", setup, stream); | |
io = bt_io_connect(bap_connect_bcast_io_cb, setup, NULL, &err, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment