public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] in headset_init(), it's possible that hs->hfp_handle is not set, so we should not check hs->hfp_handle in headset_connect_cb()
@ 2009-05-06  9:19 Forrest Zhao
  2009-05-06  9:30 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Forrest Zhao @ 2009-05-06  9:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: forrest.zhao, Forrest Zhao

We found this bug when developing the HFP plugin for telephonyd.

---
 audio/headset.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/audio/headset.c b/audio/headset.c
index 9f6b736..9b9be17 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1304,8 +1304,7 @@ void headset_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
 	else
 		hs->auto_dc = FALSE;
 
-	if (server_is_enabled(&dev->src, HANDSFREE_SVCLASS_ID) &&
-			hs->hfp_handle != 0)
+	if (server_is_enabled(&dev->src, HANDSFREE_SVCLASS_ID))
 		hs->hfp_active = TRUE;
 	else
 		hs->hfp_active = FALSE;
-- 
1.5.4.5


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

end of thread, other threads:[~2009-05-07  2:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06  9:19 [PATCH] in headset_init(), it's possible that hs->hfp_handle is not set, so we should not check hs->hfp_handle in headset_connect_cb() Forrest Zhao
2009-05-06  9:30 ` Johan Hedberg
2009-05-06 12:28   ` Zhao Forrest
2009-05-07  2:03     ` Zhao Forrest

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