hfp_hf_bluez5: Remove Card if SLC is disconnected
authorClaudio Takahasi <claudio.takahasi@openbossa.org>
Thu, 28 Feb 2013 16:01:08 +0000 (13:01 -0300)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 28 Feb 2013 16:10:41 +0000 (10:10 -0600)
This patch removes previous registered Audio Card when the remote
Bluetooth device triggers the service level disconnection.

plugins/hfp_hf_bluez5.c

index 98cef7c..5db7bb8 100644 (file)
@@ -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;
 }