summaryrefslogtreecommitdiffstats
path: root/plugins/hfp_hf_bluez5.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2013-02-28 13:01:08 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-02-28 10:10:41 -0600
commit134b237344818392df96192d9dbd1fde9a8f4858 (patch)
tree1974aabbf5f261762a39051ba8f390831885fba8 /plugins/hfp_hf_bluez5.c
parent1ee6c6ea09fcf1e2c538b65fb4fb55fcc4dd0415 (diff)
downloadofono-134b237344818392df96192d9dbd1fde9a8f4858.tar.bz2
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.
Diffstat (limited to 'plugins/hfp_hf_bluez5.c')
-rw-r--r--plugins/hfp_hf_bluez5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 98cef7cc..5db7bb89 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;
}