Diff between 469a75ae182a483ecbf71284205dde2508826f84 and 2aade568ce77a0f60715ce59fcbc223161be175f

Changed Files

File Additions Deletions Status
profiles/audio/source.c +1 -2 modified

Full Patch

diff --git a/profiles/audio/source.c b/profiles/audio/source.c
index db777e8..885e218 100644
--- a/profiles/audio/source.c
+++ b/profiles/audio/source.c
@@ -107,6 +107,7 @@ static void avdtp_state_callback(struct btd_device *dev, struct avdtp *session,
 	switch (new_state) {
 	case AVDTP_SESSION_STATE_DISCONNECTED:
 		source_set_state(source, SOURCE_STATE_DISCONNECTED);
+		btd_service_disconnecting_complete(source->service, 0);
 		break;
 	case AVDTP_SESSION_STATE_CONNECTING:
 		source_set_state(source, SOURCE_STATE_CONNECTING);
@@ -132,8 +133,6 @@ static void stream_state_changed(struct avdtp_stream *stream,
 
 	switch (new_state) {
 	case AVDTP_STATE_IDLE:
-		btd_service_disconnecting_complete(source->service, 0);
-
 		if (source->connect_id > 0) {
 			a2dp_cancel(source->connect_id);
 			source->connect_id = 0;