diff mbox series

[BlueZ] shared/asha: Only update device set after start succeeds

Message ID 20250425140447.615075-1-arun@asymptotic.io
State New
Headers show
Series [BlueZ] shared/asha: Only update device set after start succeeds | expand

Commit Message

Arun Raghavan April 25, 2025, 2:04 p.m. UTC
This ensures that one side's connected status is only exposed to the
other after the connection is actually complete.
---
 src/shared/asha.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/asha.c b/src/shared/asha.c
index e623e7156..33bec40da 100644
--- a/src/shared/asha.c
+++ b/src/shared/asha.c
@@ -421,8 +421,6 @@  static void read_rops(bool success,
 			asha->right_side, asha->binaural, asha->csis_supported,
 			asha->render_delay, asha->codec_ids);
 
-	update_asha_set(asha, true);
-
 	check_probe_done(asha);
 }
 
@@ -447,6 +445,7 @@  static void audio_status_notify(uint16_t value_handle, const uint8_t *value,
 		if (status == 0) {
 			asha->state = ASHA_STARTED;
 			DBG("ASHA start complete");
+			update_asha_set(asha, true);
 			asha_set_send_status(asha, true);
 		} else {
 			bt_asha_state_reset(asha);