[pulseaudio-discuss] [RFCv0 17/21] bluetooth: Implement org.ofono.HandsfreeAudioAgent.Release()
jprvita at gmail.com
jprvita at gmail.com
Tue Feb 4 14:04:02 PST 2014
From: João Paulo Rechi Vita <jprvita at openbossa.org>
---
src/modules/bluetooth/hfaudioagent-ofono.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/modules/bluetooth/hfaudioagent-ofono.c b/src/modules/bluetooth/hfaudioagent-ofono.c
index 6a26367..423e42a 100644
--- a/src/modules/bluetooth/hfaudioagent-ofono.c
+++ b/src/modules/bluetooth/hfaudioagent-ofono.c
@@ -487,7 +487,20 @@ 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)", hfdata->ofono_bus_id);
+
+ if (hfdata->hf_audio_cards) {
+ pa_hashmap_free(hfdata->hf_audio_cards);
+ hfdata->hf_audio_cards = NULL;
+ }
+
+ if(hfdata->ofono_bus_id) {
+ pa_xfree(hfdata->ofono_bus_id);
+ hfdata->ofono_bus_id = NULL;
+ }
+
+ pa_assert_se(r = dbus_message_new_method_return(m));
+
return r;
}
--
1.8.3.1
More information about the pulseaudio-discuss
mailing list