dbus ChangeLog,1.1132,1.1133 configure.in,1.181,1.182
Havoc Pennington
hp at kemper.freedesktop.org
Sun Oct 1 08:36:20 PDT 2006
Update of /cvs/dbus/dbus
In directory kemper:/tmp/cvs-serv11502
Modified Files:
ChangeLog configure.in
Log Message:
2006-10-01 Havoc Pennington <hp at redhat.com>
* dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
Add a hack to make DBusNewConnectionFunction work right.
* dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
the hack here. Also, fix the todo about refcount leak.
* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
and use the hack here
* dbus/dbus-connection.c: Kill the "shared" flag vs. the
"shareable" flag; this was completely broken, since it meant
dbus_connection_open() returned a connection of unknown
shared-ness. Now, we always hold a ref on anything opened
as shareable.
Move the call to notify dbus-bus.c into
connection_forget_shared_unlocked, so libdbus consistently forgets
all its knowledge of a connection at once. This exposed numerous
places where things were totally broken if we dropped a ref inside
get_dispatch_status_unlocked where
connection_forget_shared_unlocked was previously, so move
connection_forget_shared_unlocked into
_dbus_connection_update_dispatch_status_and_unlock. Also move the
exit_on_disconnect here.
(shared_connections_shutdown): this assumed weak refs to the
shared connections; since we have strong refs now, the assertion
was failing and stuff was left in the hash. Fix it to close
still-open shared connections.
* bus/dispatch.c: fixup to use dbus_connection_open_private on the
debug pipe connections
* dbus/dbus-connection.c (dbus_connection_dispatch): only notify
dbus-bus.c if the closed connection is in fact shared
(_dbus_connection_close_possibly_shared): rename from
_dbus_connection_close_internal
(dbus_connection_close, dbus_connection_open,
dbus_connection_open_private): Improve docs to explain the deal
with when you should close or unref or both
* dbus/dbus-bus.c
(_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
from _dbus_bus_check_connection_and_unref_unlocked and modify to
loop over all connections
* test/test-utils.c (test_connection_shutdown): don't try to close
shared connections.
* test/name-test/test-threads-init.c (main): fix warnings in here
* dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
env variable to cause blocking waiting for gdb; drop
DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
unconditionally.
* configure.in: add -export-dynamic to libtool flags if assertions enabled
so _dbus_print_backtrace works.
* dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
instead of _dbus_verbose to print the backtrace, and diagnose lack
of -rdynamic/-export-dynamic
Index: ChangeLog
===================================================================
RCS file: /cvs/dbus/dbus/ChangeLog,v
retrieving revision 1.1132
retrieving revision 1.1133
diff -u -d -r1.1132 -r1.1133
--- ChangeLog 1 Oct 2006 03:34:21 -0000 1.1132
+++ ChangeLog 1 Oct 2006 15:36:17 -0000 1.1133
@@ -1,3 +1,68 @@
+2006-10-01 Havoc Pennington <hp at redhat.com>
+
+ * dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
+ Add a hack to make DBusNewConnectionFunction work right.
+
+ * dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
+ the hack here. Also, fix the todo about refcount leak.
+
+ * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
+ and use the hack here
+
+ * dbus/dbus-connection.c: Kill the "shared" flag vs. the
+ "shareable" flag; this was completely broken, since it meant
+ dbus_connection_open() returned a connection of unknown
+ shared-ness. Now, we always hold a ref on anything opened
+ as shareable.
+
+ Move the call to notify dbus-bus.c into
+ connection_forget_shared_unlocked, so libdbus consistently forgets
+ all its knowledge of a connection at once. This exposed numerous
+ places where things were totally broken if we dropped a ref inside
+ get_dispatch_status_unlocked where
+ connection_forget_shared_unlocked was previously, so move
+ connection_forget_shared_unlocked into
+ _dbus_connection_update_dispatch_status_and_unlock. Also move the
+ exit_on_disconnect here.
+
+ (shared_connections_shutdown): this assumed weak refs to the
+ shared connections; since we have strong refs now, the assertion
+ was failing and stuff was left in the hash. Fix it to close
+ still-open shared connections.
+
+ * bus/dispatch.c: fixup to use dbus_connection_open_private on the
+ debug pipe connections
+
+ * dbus/dbus-connection.c (dbus_connection_dispatch): only notify
+ dbus-bus.c if the closed connection is in fact shared
+ (_dbus_connection_close_possibly_shared): rename from
+ _dbus_connection_close_internal
+ (dbus_connection_close, dbus_connection_open,
+ dbus_connection_open_private): Improve docs to explain the deal
+ with when you should close or unref or both
+
+ * dbus/dbus-bus.c
+ (_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
+ from _dbus_bus_check_connection_and_unref_unlocked and modify to
+ loop over all connections
+
+ * test/test-utils.c (test_connection_shutdown): don't try to close
+ shared connections.
+
+ * test/name-test/test-threads-init.c (main): fix warnings in here
+
+ * dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
+ env variable to cause blocking waiting for gdb; drop
+ DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
+ unconditionally.
+
+ * configure.in: add -export-dynamic to libtool flags if assertions enabled
+ so _dbus_print_backtrace works.
+
+ * dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
+ instead of _dbus_verbose to print the backtrace, and diagnose lack
+ of -rdynamic/-export-dynamic
+
2006-09-30 Havoc Pennington <hp at redhat.com>
* dbus/dbus-bus.c (dbus_bus_get_private, dbus_bus_get)
Index: configure.in
===================================================================
RCS file: /cvs/dbus/dbus/configure.in,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- configure.in 1 Oct 2006 03:18:47 -0000 1.181
+++ configure.in 1 Oct 2006 15:36:18 -0000 1.182
@@ -82,10 +82,24 @@
if test x$enable_verbose_mode = xyes; then
AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
fi
+
if test x$enable_asserts = xno; then
AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])
+ R_DYNAMIC_LDFLAG=""
+else
+ # -rdynamic is needed for glibc's backtrace_symbols to work.
+ # No clue how much overhead this adds, but it's useful
+ # to do this on any assertion failure,
+ # so for now it's enabled anytime asserts are (currently not
+ # in production builds).
+
+ # To get -rdynamic you pass -export-dynamic to libtool.
+ AC_DEFINE(DBUS_BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool])
+ R_DYNAMIC_LDFLAG=-export-dynamic
fi
+AC_SUBST(R_DYNAMIC_LDFLAG)
+
if test x$enable_checks = xno; then
AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
More information about the dbus-commit
mailing list