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 | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/plugins/hfp_hf.c b/plugins/hfp_hf.c
index 644067c..dd09142 100644
--- a/plugins/hfp_hf.c
+++ b/plugins/hfp_hf.c
@@ -395,9 +395,13 @@ static DBusMessage *profile_release(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBG("Profile handler Release");
- return g_dbus_create_error(msg, BLUEZ_ERROR_INTERFACE
- ".NotImplemented",
- "Implementation not provided");
+
+ 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);
}
static DBusMessage *profile_cancel(DBusConnection *conn,
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono