[PATCH] Fix add disconnect watch in connecting state

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

 



From f705532320bdfb47a06df72c6d031ca096834a3a Mon Sep 17 00:00:00 2001
From: Daniel Orstadius <daniel.orstadius@xxxxxxxxx>
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


[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