diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-06-11 12:16:51 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-06-11 12:16:51 +0000 |
commit | 1ec7d98bba8eaf18c7024123d7b9196f4bf7aefc (patch) | |
tree | 692db5b24185b36f6b7fe7c6fd6161a7173ef051 /audio | |
parent | 82a2b31aea724dd0a051e9cda3fb51e018e8b606 (diff) |
Remove ring timer when a headset gets disconnected
Diffstat (limited to 'audio')
-rw-r--r-- | audio/headset.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index 1e1f3271..ae7a32cc 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1019,6 +1019,11 @@ static DBusHandlerResult hs_disconnect(DBusConnection *conn, DBusMessage *msg, if (hs->state > HEADSET_STATE_CONNECTED) hs_stop(NULL, NULL, device); + if (hs->ring_timer) { + g_source_remove(hs->ring_timer); + hs->ring_timer = 0; + } + if (hs->rfcomm) { g_io_channel_close(hs->rfcomm); g_io_channel_unref(hs->rfcomm); |