[PATCH 11/17] bluetooth: Implement org.ofono.HandsfreeAudioAgent.Release()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jo?o Paulo Rechi Vita <jprvita@xxxxxxxxxxxxx>

---
 src/modules/bluetooth/backend-ofono.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c
index a499711..1fd56a1 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -498,7 +498,15 @@ static DBusMessage *hf_audio_agent_release(DBusConnection *c, DBusMessage *m, vo
         return r;
     }
 
-    r = dbus_message_new_error(m, "org.ofono.Error.NotImplemented", "Operation is not implemented");
+    pa_log_debug("HF audio agent has been unregistered by oFono (%s)", backend->ofono_bus_id);
+
+    pa_hashmap_remove_all(backend->cards);
+
+    pa_xfree(backend->ofono_bus_id);
+    backend->ofono_bus_id = NULL;
+
+    pa_assert_se(r = dbus_message_new_method_return(m));
+
     return r;
 }
 
-- 
1.9.3



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux