Commit bebe9ca9 authored by Adrian Szyndela's avatar Adrian Szyndela Committed by Simon McVittie

extend lock's range in live_messages_notify()

The other code paths that ref or unref a transport are protected by
the DBusConnection's lock. This function already used that lock,
but for a narrower scope than the refcount manipulation.

live_messages_notify() could be triggered by unreffing messages
that originated from the same connection in a different thread.

[smcv: added commit message]
Bug: default avatarSimon McVittie <>
parent 08e2b810
......@@ -63,6 +63,7 @@ live_messages_notify (DBusCounter *counter,
DBusTransport *transport = user_data;
_dbus_connection_lock (transport->connection);
_dbus_transport_ref (transport);
#if 0
......@@ -77,12 +78,11 @@ live_messages_notify (DBusCounter *counter,
if (transport->vtable->live_messages_changed)
_dbus_connection_lock (transport->connection);
(* transport->vtable->live_messages_changed) (transport);
_dbus_connection_unlock (transport->connection);
_dbus_transport_unref (transport);
_dbus_connection_unlock (transport->connection);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment