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 97d2f07..359c8fd 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;
}
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono