From 1ec7d98bba8eaf18c7024123d7b9196f4bf7aefc Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 11 Jun 2007 12:16:51 +0000 Subject: Remove ring timer when a headset gets disconnected --- audio/headset.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'audio/headset.c') 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); -- cgit