From 836c502d8adf137c586ffe6a5733d61ba2f57482 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 27 Jan 2009 21:58:00 +0200 Subject: Don't auto-disconnect explicitly created A2DP connections This patch makes sure that explicitly created connections (remotely initiated or using AudioSink.Connect()) stay up until explictly disconnected. The control for this needs to be in the stream timer and not the disconnect timer since our AVDTP state machine always tries to keep one stream in configured state (i.e. it should be ok to always disconnect if we stay too long in IDLE state). --- audio/sink.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/sink.c') diff --git a/audio/sink.c b/audio/sink.c index a966d2bc..347e3f69 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -425,6 +425,8 @@ static DBusMessage *sink_connect(DBusConnection *conn, ".AlreadyConnected", "Device Already Connected"); + avdtp_set_auto_disconnect(sink->session, FALSE); + pending = g_new0(struct pending_request, 1); pending->conn = dbus_connection_ref(conn); pending->msg = dbus_message_ref(msg); -- cgit