hfp_hf_bluez5: Remove Card when SLC fails

This patch removes the previously created Audio Card if the service
level negotiation fails.
This commit is contained in:
Claudio Takahasi 2013-02-28 13:01:07 -03:00 committed by Denis Kenzior
parent fb9b54bc2c
commit 1ee6c6ea09
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}