Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix add disconnect watch in connecting state
@ 2010-11-04 13:20 Daniel Örstadius
  2010-11-04 18:16 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Örstadius @ 2010-11-04 13:20 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-Fix-add-disconnect-watch-in-connecting-state.patch --]
[-- Type: text/x-patch, Size: 948 bytes --]

From f705532320bdfb47a06df72c6d031ca096834a3a Mon Sep 17 00:00:00 2001
From: Daniel Orstadius <daniel.orstadius@nokia.com>
Date: Wed, 3 Nov 2010 14:12:29 +0200
Subject: [PATCH] Fix add disconnect watch in connecting state

If disconnect_cb is added only in the connected state, the callback
will not be triggered if Device.Disconnected is called during a
connection setup and the RFCOMM channel of HFP will not be cleanly
disconnected.
---
 audio/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/device.c b/audio/device.c
index 9554c7b..2e75538 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -231,7 +231,7 @@ static void device_set_state(struct audio_device *dev, audio_state_t new_state)
 							priv->dc_id);
 			priv->dc_id = 0;
 		}
-	} else if (new_state == AUDIO_STATE_CONNECTED)
+	} else
 		priv->dc_id = device_add_disconnect_watch(dev->btd_dev,
 						disconnect_cb, dev, NULL);
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-05  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 13:20 [PATCH] Fix add disconnect watch in connecting state Daniel Örstadius
2010-11-04 18:16 ` Johan Hedberg
2010-11-05  8:59   ` Daniel Örstadius
2010-11-05  9:18     ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox