Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21bf2224 authored by Nick Pelly's avatar Nick Pelly
Browse files

Fix leak of DBus match rule.

We were registering a match for 'AudioSink', but unregistering 'audio.sink'.
This does not immediately cause an error, but stress testing of BT off/on found
that the leak causes a DBus Limits Error after ~300 iterations. It then becomes
impossible to turn BT on again until a reboot.
parent 264ce382
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ static void tearDownEventLoop(native_data_t *nat) {
        dbus_connection_unregister_object_path(nat->conn, agent_path);

        dbus_bus_remove_match(nat->conn,
                "type='signal',interface='org.bluez.audio.Sink'",
                "type='signal',interface='org.bluez.AudioSink'",
                &err);
        if (dbus_error_is_set(&err)) {
            LOG_AND_FREE_DBUS_ERROR(&err);