summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-02-14 21:07:47 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-02-14 21:07:47 +0000
commit575495ab453739d6b237d98d3c6ac86f047135ea (patch)
tree66ac58149a226e193d6c46254b7f0a108b8d6422
parent042cbdb0ffbd503738c294ce43c3f1691980633e (diff)
Check for RFCOMM connection state in SCO connect callback (so we don't incorrectly go to CONNECTED state)
-rw-r--r--audio/headset.c5
1 files changed, 4 insertions, 1 deletions
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;
}