History log of /external/dbus/dbus/dbus-mainloop.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/dbus/dbus-mainloop.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/dbus/dbus-mainloop.c
5baf2f856a9c6625993234855b07680da1c8916f 11-Jul-2009 Tobias Mueller <fdo-bugs@cryptobitch.de> Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-mainloop.c
d012387afef0ba02185ebe27bc6bb15551912e92 14-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-13 Havoc Pennington <hp@redhat.com>

* Add indent-tabs-mode: nil to all file headers.
/external/dbus/dbus/dbus-mainloop.c
98f19852078cf03f8b50a93d49d83b85c0dd400b 18-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-watch.c (dbus_watch_get_socket)
(dbus_watch_get_unix_fd): new API to match DBusConnection
(dbus_watch_get_fd): deprecate this

Throughout: just s/dbus_watch_get_fd/dbus_watch_get_socket/g for
now since all the transports use sockets anyway
/external/dbus/dbus/dbus-mainloop.c
15ef0ef6fbba7827453b7973e62b6c1853576601 20-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-19 Havoc Pennington <hp@redhat.com>

* Fix a pile of Doxygen warnings and missing docs
/external/dbus/dbus/dbus-mainloop.c
9c3d566e95c9080f6040c64531b0ccae22bd5d74 15-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-15 Havoc Pennington <hp@redhat.com>

* Land the new message args API and type system.

This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.

There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html

* dbus/dbus-marshal-*: all the new stuff

* dbus/dbus-message.c: basically rewritten

* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right

* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.

* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)

* glib/dbus-gvalue.c: port to the new message args API

* bus/dispatch.c, bus/driver.c: port to the new message args API

* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.

* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.

* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.

* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]

* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c

* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]

* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
/external/dbus/dbus/dbus-mainloop.c
dbdea921b5967ed25b24a9e5af5d6a3db54c5ec7 26-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-25 Havoc Pennington <hp@redhat.com>

The primary change here is to always write() once before adding
the write watch, which gives us about a 10% performance increase.

* dbus/dbus-transport-unix.c: a number of modifications to cope
with removing messages_pending
(check_write_watch): properly handle
DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
messages_pending stuff
(check_read_watch): properly handle WAITING_FOR_MEMORY and
AUTHENTICATED cases
(unix_handle_watch): after writing, see if the write watch can be
removed
(unix_do_iteration): assert that write_watch/read_watch are
non-NULL rather than testing that they aren't, since they
aren't allowed to be NULL. check_write_watch() at the end so
we add the watch if we did not finish writing (e.g. got EAGAIN)

* dbus/dbus-transport-protected.h: remove messages_pending call,
since it resulted in too much inefficient watch adding/removing;
instead we now require that the transport user does an iteration
after queueing outgoing messages, and after trying the first
write() we add a write watch if we got EAGAIN or exceeded our
max bytes to write per iteration setting

* dbus/dbus-string.c (_dbus_string_validate_signature): add this
function

* dbus/dbus-server-unix.c (unix_finalize): the socket name was
freed and then accessed, valgrind flagged this bug, fix it

* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
as the last valid field plus 1, where really it is equal to the
last valid field. Corrects some message corruption issues.

* dbus/dbus-mainloop.c: verbosity changes

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
instead of aborting in one of the test codepaths

* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
caused not printing the pid ever again if a verbose was missing
the newline at the end
(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE

* dbus/dbus-connection.c: verbosity changes;
(dbus_connection_has_messages_to_send): new function
(_dbus_connection_message_sent): no longer call transport->messages_pending
(_dbus_connection_send_preallocated_unlocked): do one iteration to
try to write() immediately, so we can avoid the write watch. This
is the core purpose of this patchset
(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
dump the outgoing message queue, so nobody will get confused
trying to send them or thinking stuff is pending to be sent

* bus/test.c: verbosity changes

* bus/driver.c: verbosity/assertion changes

* bus/dispatch.c: a bunch of little tweaks to get it working again
because this patchset changes when/where you need to block.
/external/dbus/dbus/dbus-mainloop.c
43605a6f4e78a8c28afb4b1e924dff0301e0e95c 10-Aug-2004 Havoc Pennington <hp@redhat.com> 2004-08-09 Havoc Pennington <hp@redhat.com>

* COPYING: switch to Academic Free License version 2.1 instead of
2.0, to resolve complaints about patent termination clause.
/external/dbus/dbus/dbus-mainloop.c
a1df3040f29223eddaa3ace0fe018fcb28cddcd9 02-Dec-2003 Richard Hult <richard@imendio.com> 2003-12-02 Richard Hult <richard@imendio.com>

* Update AFL version to 2.0 throughout the source files to reflect
the update that was done a while ago.
/external/dbus/dbus/dbus-mainloop.c
9f1a60dbba69844c0a04b3dd86280352736187ce 27-Nov-2003 Mikael Hallendal <micke@imendio.com> 2003-11-26 Mikael Hallendal <micke@imendio.com>

* bus/*.[ch]:
* dbus/*.[ch]:
* glib/*.[ch]: Made ref functions return the pointer
/external/dbus/dbus/dbus-mainloop.c
a683a80c409cc4f2e57ba6a3e60d52f91b8657d0 21-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-21 Havoc Pennington <hp@pobox.com>

Get matching rules mostly working in the bus; only actually
parsing the rule text remains. However, the client side of
"signal connections" hasn't been started, this patch is only the
bus side.

* dbus/dispatch.c: fix for the matching rules changes

* bus/driver.c (bus_driver_handle_remove_match)
(bus_driver_handle_add_match): send an ack reply from these
method calls

* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
arguments, reported by Seth Nickell

* bus/config-parser.c (append_rule_from_element): support
eavesdrop=true|false attribute on policies so match rules
can be prevented from snooping on the system bus.

* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
and "destination" in attribute names; fix some docs bugs;
add eavesdrop=true|false attribute

* bus/driver.c (bus_driver_handle_add_match)
(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
messages

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
rid of broadcast service concept, signals are just always broadcast

* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
mostly implement matching rules stuff (currently only exposed as signal
connections)
/external/dbus/dbus/dbus-mainloop.c
85ab0327d82e4945ad16630e583d8cc68df25a90 08-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-07 Havoc Pennington <hp@pobox.com>

* Make Doxygen contented.
/external/dbus/dbus/dbus-mainloop.c
9e15a4f969e53a0fc3775fefeba7ac5ed7b5d0e6 29-Jun-2003 Miloslav Trmac <mitr@volny.cz> 2003-06-29 Miloslav Trmac <mitr@volny.cz>

* dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
(_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p

* configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
/external/dbus/dbus/dbus-mainloop.c
2a708128adc5e825471a3a63d6bc7a53005ae237 29-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-29 Havoc Pennington <hp@redhat.com>

* dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
to use this library" to be sure people have the right
expectations.
/external/dbus/dbus/dbus-mainloop.c
e8d396efef695b9868b0112c4a6266c97678fa8a 27-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-27 Havoc Pennington <hp@pobox.com>

Unbreak my code...

* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
report correct status if we finish processing authentication
inside this function.

* bus/activation.c (try_send_activation_failure): use
bus_transaction_send_error_reply

* bus/connection.c (bus_connection_get_groups): return an error
explaining the problem

* bus/bus.c (bus_context_check_security_policy): implement
restriction here that inactive connections can only send the
hello message. Also, allow bus driver to send anything to
any recipient.

* bus/connection.c (bus_connection_complete): create the
BusClientPolicy here instead of on-demand.
(bus_connection_get_policy): don't return an error

* dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
sender field in message being replied to

* bus/bus.c (bus_context_check_security_policy): fix silly typo
causing it to return FALSE always

* bus/policy.c (bus_client_policy_check_can_send): fix bug where
we checked sender rather than destination
/external/dbus/dbus/dbus-mainloop.c
b3bd48edfc1aab0a9dc64bfa4c380d845d218e73 26-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-25 Havoc Pennington <hp@redhat.com>

test suite is slightly hosed at the moment, will fix soon

* bus/connection.c (bus_connections_expire_incomplete): fix to
properly disable the timeout when required
(bus_connection_set_name): check whether we can remove incomplete
connections timeout after we complete each connection.

* dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
probably still broken.

* bus/services.c (bus_registry_acquire_service): implement max
number of services owned, and honor allow/deny rules on which
services a connection can own.

* bus/connection.c (bus_connection_get_policy): report errors here

* bus/activation.c: implement limit on number of pending
activations
/external/dbus/dbus/dbus-mainloop.c
e0b284c7e38f0c002b2173d85ab89dc18700867c 18-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
debug spew

* dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
handling problem

* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
about DBUS_TEST_HOMEDIR once

* bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
the environment

* bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
config file so we test the right thing

Throughout: assorted docs improvements
/external/dbus/dbus/dbus-mainloop.c
4219b08bfa318443419c7a3acde28f0b237b05fe 17-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-17 Havoc Pennington <hp@redhat.com>

* dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
there was an OOM watch we skipped, we always return TRUE so we
iterate again to have a look at it again. Fixes test suite hang.
Code rearrangement also lets us lose some memset and only iterate
over callbacks once.

* bus/driver.c (bus_driver_handle_message): sense of test for
reply was backward
/external/dbus/dbus/dbus-mainloop.c
777707ed8dff6958972a93894a87ec1945c65c14 14-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
callbacks

* test/data/valid-config-files/debug-allow-all.conf.in: allow all
users

* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
fix to only recover unused bytes if we're already authenticated
(_dbus_transport_get_is_authenticated): fix to still mark us
authenticated if there are unused bytes.

* bus/dispatch.c: implement security policy checking

* bus/connection.c (bus_transaction_send_from_driver): new

* bus/bus.c (bus_context_check_security_policy): new

* bus/dispatch.c (send_service_nonexistent_error): delete this,
now we just set the DBusError and it gets converted to an error
reply.

* bus/connection.c (allow_user_function): enable code using actual
data from the config file

* bus/policy.c (list_allows_user): handle wildcard rules for
user/group connection perms
/external/dbus/dbus/dbus-mainloop.c
51781f541094a4936d47119cd62682e0431c41e9 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c: lots of fixes

* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
(_dbus_loop_iterate): remove old "quit if no callbacks" code,
that was crack, broke the test service.

* dbus/dbus-transport.c (_dbus_transport_open): fix error
handling to avoid piling up errors if we get a failure on the
first address.

* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
pid in assertion failures.

* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
to some fixed size of file descriptor array. Don't return TRUE
anytime a timeout exists, that led to lots of busy loop silliness
in the tests.
/external/dbus/dbus/dbus-mainloop.c
49f6e320d790e168ccec040ad47b787c32107bde 10-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
I'd checked this in earlier but hadn't.
/external/dbus/dbus/dbus-mainloop.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/dbus/dbus-mainloop.c
a162febe6746269f51b3a16db5f6fb240001f828 08-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-07 Havoc Pennington <hp@pobox.com>

* bus/driver.c (bus_driver_handle_acquire_service): return an
error if you try to acquire a service that starts with ':'
/external/dbus/dbus/dbus-mainloop.c
4067152efca3d7ae7cd477f4c70d32b8531fecb4 07-Apr-2003 Havoc Pennington <hp@redhat.com> commit missing files
/external/dbus/dbus/dbus-mainloop.c