This patch adds the Release method of the external Profile handler.
Release method gets called when BlueZ unregisters the HFP profile.
---
 plugins/hfp_hf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/plugins/hfp_hf.c b/plugins/hfp_hf.c
index 819c8cd..c536691 100644
--- a/plugins/hfp_hf.c
+++ b/plugins/hfp_hf.c
@@ -395,6 +395,12 @@ static DBusMessage *profile_release(DBusConnection *conn,
                                        DBusMessage *msg, void *data)
 {
        DBG("Profile handler Release");
+
+       g_dbus_unregister_interface(connection, HFP_EXT_PROFILE_PATH,
+                                               BLUEZ_PROFILE_INTERFACE);
+
+       g_hash_table_foreach_remove(modem_hash, hfp_remove_modem, NULL);
+
        return dbus_message_new_method_return(msg);
 }
 
-- 
1.7.11.7

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to