From 134b237344818392df96192d9dbd1fde9a8f4858 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Thu, 28 Feb 2013 13:01:08 -0300 Subject: [PATCH] hfp_hf_bluez5: Remove Card if SLC is disconnected This patch removes previous registered Audio Card when the remote Bluetooth device triggers the service level disconnection. --- plugins/hfp_hf_bluez5.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 98cef7c..5db7bb8 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -129,6 +129,9 @@ static void hfp_disconnected_cb(gpointer user_data) ofono_modem_set_powered(modem, FALSE); + ofono_handsfree_card_remove(hfp->card); + hfp->card = NULL; + g_at_chat_unref(info->chat); info->chat = NULL; } -- 2.7.4