History log of /external/dbus/test/test-utils.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4299eb3c0907100fe95d2986984b48d40cc52841 08-Jul-2015 Daniel Erat <derat@google.com> Incorporate upstream changes to v1.6.8.

Squash upstream commits up to and including the v1.6.8
release (upstream commit 1cad15cc).

This repository's changes from upstream are now limited to:

- addition of Android.mk, CleanSpec.mk, config.h, and NOTICE
files
- addition of dbus/dbus-arch-deps.h and removal from
dbus/.gitignore (ebae2d21, f022f55d)
- WANT_PIDFILE #ifdefs added to bus/bus.c to disable writing
dbus-daemon's PID to a file (3100d06a)
- TRACE_LOCKS set to 0 in dbus/dbus-connection.c (88a0ffe5)
- DBUS_ANDROID_LOG added to dbus/dbus-internals.c to use
logcat (7de15def)
- ANDROID_MANAGED_SOCKET added to dbus/dbus-sysdeps-unix.c
to use an SELinux-managed socket rather than a
dbus-daemon-created Unix domain socket (3100d06a)

Bug: 22328216
Change-Id: I793ebdf963d9b0740f0da28f1de593d088f08406
/external/dbus/test/test-utils.c
dbecdeabb20e0ce11121819c63373f0afba57c58 19-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Consistently include <config.h> in all C source files and never in header files.
/external/dbus/test/test-utils.c
9d8989cfec02e6ca41f8ffa0ccda16c93ddcb23c 30-May-2008 Colin Walters <walters@verbum.org> Add test library functions for using DBusServer

* test/test-utils.h, test/test-utils.c: Add functions
which hook up a DBusServer to a DBusLoop, useful
for test cases.
/external/dbus/test/test-utils.c
a2129f7cccaf0265fffe0da79ca0510b6e01131b 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-01 Havoc Pennington <hp@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
/external/dbus/test/test-utils.c
1eae184450a585f10c8988613e0f7259e1d6066a 07-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * doc/TODO:
- Remove pending call locking todo item
- dbus_connection_open now holds hard ref. Remove todo item
- do proper locking on _dbus_bus_check_connection_and_unref
and handle DBUS_BUS_STARTER. Remove todo item
- Warn on closing of a shared connection. Remove todo item

* bus/bus.c, bus/connection.c, bus/dispatch.c, dbus/dbus-bus.c,
dbus/dbus-connection.c: Use the dbus_connection_close_internal
so we don't get the warning when closing shared connections

* test/test-service.c, test/test-shell-service.c: Applications
don't close shared connections themselves so we unref instead of
close

* test/test-utils.c (test_connection_shutdown): Close the connection

* dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): Changed to
_dbus_bus_check_connection_and_unref_unlocked since we only call this
method on a locked connection.
Make sure we call _dbus_connection_unref_unlocked instead of
dbus_connection_unref also.
Handle DBUS_BUS_STARTER correctly

* dbus/dbus-connection.c (connection_record_shared_unlocked):
Mark as shared and hard ref the connection
(connection_forget_shared_unlocked): Remove the hard ref from the
connection
(_dbus_connection_close_internal_and_unlock): New internal function
which takes a locked connection and unlocks it after closing it
(_dbus_connection_close_internal): New internal function which acts
like the origonal dbus_connection_close method by grabbing a connection
lock and calling _dbus_connection_close_internal_and_unlock
(dbus_connection_close): Public close method, warns when the app
trys to close a shared connection
/external/dbus/test/test-utils.c
0ca96ec548a6e4a1e39429f3c0480adfe7e2eab8 30-Nov-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
test/test-segfault.c, test/test-utils.c,
test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
Various cleanup of dead code and compiler warnings (patch from
Kjartan Maraas <kmaraas at gnome.org>)
/external/dbus/test/test-utils.c
3df260c07102745c5606c313af862558f105f83e 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-18 Havoc Pennington <hp@pobox.com>

* glib/dbus-gmain.c: adapt to watch changes

* bus/bus.c, bus/activation.c, etc.: adjust to watch changes

* dbus/dbus-server.h: remove dbus_server_handle_watch

* dbus/dbus-connection.h: remove dbus_connection_handle_watch

* dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
like DBusTimeout, so we don't need dbus_connection_handle_watch
etc.
/external/dbus/test/test-utils.c
7caf646fdf595946eb28202e2df3f847d28c7151 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-09 Havoc Pennington <hp@redhat.com>

* test/test-utils.c: use dispatch status function to fix this up

* bus/connection.c (connection_watch_callback): don't dispatch
from here
(connection_timeout_callback): don't dispatch from here
(bus_connections_setup_connection): set the dispatch status function
(bus_connection_disconnected): unset it

* dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
used to add a connection to be dispatched
(_dbus_loop_iterate): do the dispatching at the end of each
iteration

* dbus/dbus-connection.c
(dbus_connection_set_dispatch_status_function): new function
allowing us to fix up main loop usage
(_dbus_connection_last_unref): free all the various function
user data
(dbus_connection_dispatch): call the DispatchStatusFunction
whenever this function returns
(dbus_connection_handle_watch): call DispatchStatusFunction
(dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
(reply_handler_timeout): call DispatchStatusFunction
(dbus_connection_flush): call DispatchStatusFunction
/external/dbus/test/test-utils.c
1708094c0e00ab433bb0a51981f8b77d24aee256 09-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
a memory leak

* bus/dispatch.c (check_service_activated): fix bug in test

* dbus/dbus-mainloop.c (check_timeout): fix this up

* dbus/dbus-internals.c (_dbus_verbose_real): include PID in
verbose output so we can sort out output from different processes,
e.g. in the activation case.
/external/dbus/test/test-utils.c
fe22b2194d53061fefe64d48ff6a53e6a762279d 08-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-07 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.sgml: require that base service names
start with ':' and that the base service is created/deleted
as first and last things a connection does on the bus

* bus/dispatch.c (check_existent_service_activation): lots more
work on the activation test; it doesn't fully pass yet...

* test/test-service.c (main): fix so we don't memleak the
connection to the message bus
(filter_func): accept a message asking us to exit
/external/dbus/test/test-utils.c
1617fbe36c0bc2952093fc167b6edffdf32c445e 07-Apr-2003 Havoc Pennington <hp@redhat.com> having a bad cvs add day apparently
/external/dbus/test/test-utils.c