diff options
author | Havoc Pennington <hp@redhat.com> | 2006-10-01 16:11:24 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2006-10-01 16:11:24 +0000 |
commit | eb1e11babd60dc618753aaceec14821526c96a14 (patch) | |
tree | 467aab4ecb5e8afb7cc35b2941fc9734bdef8408 /dbus/dbus-bus.c | |
parent | a2129f7cccaf0265fffe0da79ca0510b6e01131b (diff) |
2006-10-01 Havoc Pennington <hp@redhat.com>
* dbus/dbus-bus.c
(internal_bus_get): only weak ref the connection; this means
_dbus_bus_notify_shared_connection_disconnected_unlocked can be
called safely in any context
(_dbus_bus_notify_shared_connection_disconnected_unlocked): don't
unref
* dbus/dbus-connection.c
(_dbus_connection_get_dispatch_status_unlocked): move
_dbus_bus_notify_shared_connection_disconnected_unlocked here
when queuing Disconnected instead of when the Disconnected message
arrives, so dbus_bus_get() won't return closed connections.
Diffstat (limited to 'dbus/dbus-bus.c')
-rw-r--r-- | dbus/dbus-bus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c index bc8c107f..f6918fd5 100644 --- a/dbus/dbus-bus.c +++ b/dbus/dbus-bus.c @@ -336,7 +336,6 @@ _dbus_bus_notify_shared_connection_disconnected_unlocked (DBusConnection *connec if (bus_connections[i] == connection) { bus_connections[i] = NULL; - _dbus_connection_unref_unlocked (connection); } } @@ -428,9 +427,8 @@ internal_bus_get (DBusBusType type, if (!private) { - /* get a hard ref to the connection */ + /* get a weak ref to the connection */ bus_connections[type] = connection; - dbus_connection_ref (bus_connections[type]); } bd = ensure_bus_data (connection); |