diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-02-14 21:07:47 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-02-14 21:07:47 +0000 |
commit | 575495ab453739d6b237d98d3c6ac86f047135ea (patch) | |
tree | 66ac58149a226e193d6c46254b7f0a108b8d6422 /audio/headset.c | |
parent | 042cbdb0ffbd503738c294ce43c3f1691980633e (diff) |
Check for RFCOMM connection state in SCO connect callback (so we don't incorrectly go to CONNECTED state)
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 5 |
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; } |