From 1ee6c6ea09fcf1e2c538b65fb4fb55fcc4dd0415 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Thu, 28 Feb 2013 13:01:07 -0300 Subject: [PATCH] hfp_hf_bluez5: Remove Card when SLC fails This patch removes the previously created Audio Card if the service level negotiation fails. --- 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 3960d7a..98cef7c 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -112,6 +112,9 @@ static void slc_failed(gpointer userdata) ofono_error("Service level connection failed"); 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