+2006-07-07 John (J5) Palmieri <johnp@redhat.com>
+
+ * dbus/dbus-connection.c (dbus_connection_close): removed deprecated
+ function
+ (dbus_connection_dispatch): On disconnect unref any shared connections
+
+ * dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): new function
+ for cleaning up shared connections on disconnect
+ (internal_bus_get): get a hard refrence to shared connections when
+ they are created
+
+ * doc/TODO: Remove items which are no longer relevent or have been fixed
+ Split 1.0 todo items with a 0.90 freeze todo list
+
2006-06-14 Ross Burton <ross@openedhand.com>
* glib/dbus-gobject.c:
return bd;
}
+/* internal function that checks to see if this
+ is a shared bus connection and if it is unref it */
+void
+_dbus_bus_check_connection_and_unref (DBusConnection *connection)
+{
+ if (bus_connections[DBUS_BUS_SYSTEM] == connection)
+ {
+ bus_connections[DBUS_BUS_SYSTEM] = NULL;
+ dbus_connection_unref (connection);
+ }
+ else if (bus_connections[DBUS_BUS_SESSION] == connection)
+ {
+ bus_connections[DBUS_BUS_SESSION] = NULL;
+ dbus_connection_unref (connection);
+ }
+}
+
static DBusConnection *
internal_bus_get (DBusBusType type,
DBusError *error, dbus_bool_t private)
}
if (!private)
- bus_connections[type] = connection;
+ {
+ /* get a hard ref to the connection */
+ bus_connections[type] = connection;
+ dbus_connection_ref (bus_connections[type]);
+ }
bd = ensure_bus_data (connection);
_dbus_assert (bd != NULL);
const char *rule,
DBusError *error);
+void _dbus_bus_check_connection_and_unref (DBusConnection *connection);
+
DBUS_END_DECLS
#endif /* DBUS_BUS_H */
_dbus_connection_update_dispatch_status_and_unlock (connection, status);
}
-/** Alias for dbus_connection_close(). This method is DEPRECATED and will be
- * removed for 1.0. Change your code to use dbus_connection_close() instead.
- *
- * @param connection the connection.
- * @deprecated
- */
-void
-dbus_connection_disconnect (DBusConnection *connection)
-{
- dbus_connection_close (connection);
-}
-
static dbus_bool_t
_dbus_connection_get_is_connected_unlocked (DBusConnection *connection)
{
{
_dbus_verbose (" ... done dispatching in %s\n", _DBUS_FUNCTION_NAME);
- if (connection->exit_on_disconnect &&
- dbus_message_is_signal (message,
+ if (dbus_message_is_signal (message,
DBUS_INTERFACE_LOCAL,
"Disconnected"))
{
- _dbus_verbose ("Exiting on Disconnected signal\n");
- CONNECTION_UNLOCK (connection);
- _dbus_exit (1);
- _dbus_assert_not_reached ("Call to exit() returned");
+ int i;
+
+
+ _dbus_bus_check_connection_and_unref (connection);
+ if (connection->exit_on_disconnect)
+ {
+ _dbus_verbose ("Exiting on Disconnected signal\n");
+ CONNECTION_UNLOCK (connection);
+ _dbus_exit (1);
+ _dbus_assert_not_reached ("Call to exit() returned");
+ }
}
_dbus_list_free_link (message_link);
DBusError *error);
DBusConnection* dbus_connection_ref (DBusConnection *connection);
void dbus_connection_unref (DBusConnection *connection);
-void dbus_connection_close (DBusConnection *connection);
void dbus_connection_disconnect (DBusConnection *connection);
dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection);
dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection);
+Important for 0.90 freeze
+===
+
+- Audit @todo and FIXME for security issues that require API/ABI changes
+
+- dbus-pending-call.c has some API and thread safety issues to review.
+ DBusPendingCall is used from multiple threads with no locks.
+ Either DBusConnection's lock has to protect all associated pending
+ call (means pending->connection can't ever be set to null) or
+ or DBusPendingCall needs its own lock
+ http://lists.freedesktop.org/archives/dbus/2006-June/004945.html
+
Important for 1.0
===
locks. Fixes the recursive deadlock. See the @todo for more
and this thread: http://lists.freedesktop.org/archives/dbus/2006-February/004128.html
- - Remove all deprecated functions
-
- Audit @todo and FIXME for security issues
- the "break loader" and valid/invalid message tests are all disabled;
- just before 1.0, try a HAVE_INT64=0 build and be sure it runs
- - dbus-pending-call.c has some API and thread safety issues to review.
- DBusPendingCall is used from multiple threads with no locks.
- Either DBusConnection's lock has to protect all associated pending
- call (means pending->connection can't ever be set to null) or
- or DBusPendingCall needs its own lock
- http://lists.freedesktop.org/archives/dbus/2006-June/004945.html
-
- - Add test harness for selinux allow/deny cf. this message
- http://lists.freedesktop.org/archives/dbus/2005-April/002506.html
-
- publish the introspection dtd at its URL
- - RequestName flags seem a bit strange; see the docs for dbus_bus_request_name()
- and think about use cases in better detail.
- Proposal on list:
- http://lists.freedesktop.org/archives/dbus/2005-August/003207.html
-
- Kind of a major API change, but seems high-value.
-
- - dbus_bus_get() should hold a strong reference associated with the "connected"
- state (i.e. libdbus drops its reference when the connection disconnects,
- and sets its internal connection variable to null).
- See http://lists.freedesktop.org/archives/dbus/2006-May/004806.html
-
Important for 1.0 GLib Bindings
===