[PATCH 1/2] Fix crash when disconnecting the a2dp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When we disconnect the a2dp Headset by immediate power off and soon if we
initiate a disconnection from our side, a crash is occurring. This is
happening because of the disconnect_timeout coming after freeing the session.
---
 audio/avdtp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/avdtp.c b/audio/avdtp.c
index 76526b6..d8d9d7e 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -690,7 +690,7 @@ static void set_disconnect_timer(struct avdtp *session)
 		remove_disconnect_timer(session);
 
 	if (session->device_disconnect) {
-		g_idle_add(disconnect_timeout, session);
+		session->dc_timer = g_idle_add(disconnect_timeout, session);
 		return;
 	}
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux