From 575495ab453739d6b237d98d3c6ac86f047135ea Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 14 Feb 2008 21:07:47 +0000 Subject: Check for RFCOMM connection state in SCO connect callback (so we don't incorrectly go to CONNECTED state) --- audio/headset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/audio/headset.c b/audio/headset.c index c6d8436b..8747b744 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -574,7 +574,10 @@ failed: g_slist_foreach(hs->pending, (GFunc) pending_connect_failed, device); g_slist_free(hs->pending); hs->pending = NULL; - headset_set_state(device, HEADSET_STATE_CONNECTED); + if (hs->rfcomm) + headset_set_state(device, HEADSET_STATE_CONNECTED); + else + headset_set_state(device, HEADSET_STATE_DISCONNECTED); return FALSE; } -- cgit