bluez5: more cleanup on impl_clear

Remove dbus filters and close the dbus connection.  Closing the
connection lets BlueZ to clean up, so we don't call its unregistration
API.
This commit is contained in:
Pauli Virtanen 2021-04-10 18:10:37 +03:00
parent 1c550d850b
commit 87e06783d1
4 changed files with 37 additions and 2 deletions

View file

@ -745,6 +745,11 @@ static int backend_ofono_free(void *data)
{
struct impl *backend = data;
if (backend->filters_added) {
dbus_connection_remove_filter(backend->conn, ofono_filter_cb, backend);
backend->filters_added = false;
}
dbus_connection_unregister_object_path(backend->conn, OFONO_AUDIO_CLIENT);
free(backend);