Diff between 46c0e376fe134aba1d0876a7a50e524dfdf7175d and f473d4404679cb8b40cad14cf792360931d630e3

Changed Files

File Additions Deletions Status
src/shared/bap.c +15 -0 modified

Full Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 38c353a..40ce16d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6531,6 +6531,20 @@ void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
 	struct bt_ltv_extract merge_data = {0};
 	struct bt_ltv_match match_data;
 
+	if (!l2_caps)
+		/* Codec_Specific_Configuration parameters shall
+		 * be present at Level 2.
+		 */
+		return;
+
+	if (!l3_caps) {
+		/* Codec_Specific_Configuration parameters may
+		 * be present at Level 3.
+		 */
+		merge_data.result = util_iov_dup(l2_caps, 1);
+		goto done;
+	}
+
 	merge_data.src = l3_caps;
 	merge_data.result = new0(struct iovec, 1);
 
@@ -6542,6 +6556,7 @@ void bt_bap_verify_bis(struct bt_bap *bap, uint8_t bis_index,
 			NULL,
 			bap_sink_check_level2_ltv, &merge_data);
 
+done:
 	/* Check each BIS Codec Specific Configuration LTVs against our Codec
 	 * Specific Capabilities and if the BIS matches create a PAC with it
 	 */