History log of /external/dbus/dbus/dbus-internals.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7de15def0c10145a1368a5ca52fe5920aecf4c63 18-Jun-2009 Nick Pelly <npelly@google.com> Redirect libdbus logging to android logcat.

Turn off verbose logs (they are very spammy). Saves another 20 kB.

We can now see the DBUS warnings just before DBUS spits the dummy.

Change-Id: I1714959289898dc933f43377a5645c00361627bf
/external/dbus/dbus/dbus-internals.c
45d53565bc13678d6aa5edec1d4efb5bf8a64e0b 03-Sep-2010 Colin Walters <walters@verbum.org> Make dbus-uuidgen atomic

A Red Hat QA engineer hit in practice a race condition in dbus-uuidgen
where it could leave an empty file.

dbus-uuidgen (_dbus_create_uuid_file_exclusively) formerly created an
empty file in the path to the uuid, then filled it in. At some point,
the internal libdbus _dbus_string_save_to_file became atomic on Unix
at least (doing the save to temp file, fsync(), rename() dance).

So _dbus_create_uuid_file_exclusively doesn't need to create the file
beforehand anymore. However, it *does* need the file to be
world-readable, unlike all other consumers of
_dbus_string_save_to_file. So add a "world_readable" argument.
/external/dbus/dbus/dbus-internals.c
2313832d3880ae17edc0629f981d4ec0980e4def 11-Jun-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Wrap OutputDebugString for Windows CE builds, and add cast for MSVC.
/external/dbus/dbus/dbus-internals.c
a44d08711c64e7ae807d2b4f181cefa848e2aa32 17-Jun-2010 Will Thompson <will.thompson@collabora.co.uk> Revert "Bug 28460 - Refactored dbus configuration access."

This reverts commit 6f9077ee870ad02119facf83d1293301b4535c3b, which
broke the build on Unix (see previous patch) and introduced a bunch of
warnings.
/external/dbus/dbus/dbus-internals.c
6f9077ee870ad02119facf83d1293301b4535c3b 14-Jun-2010 Ralf Habacker <ralf.habacker@freenet.de> Bug 28460 - Refactored dbus configuration access.

Libdbus uses several config variables. On unix these settings are read from
environment variables by using _dbus_getenv.

On other platforms like wince there are no environment variables available and
_dbus_getenv needs an emulation for those plattforms (see
dbus/dbus-sysdeps-wince-glue.c)

To cleanup this emulation the appended patch adds a config api by adding
_dbus_config_... functions.

Also having all client config related functions listed in one header file
provides a good overview about which config attributes are available.

The default implementation retrieves the config values from environment
variables. For other os this could be easily extended or replaced by.
/external/dbus/dbus/dbus-internals.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-internals.c
127bd1f0c3bd8181815b1bec62be8b4e9af3e850 09-Feb-2010 Romain Pokrzywka <romain@kdab.com> small fixes for DBUS_USE_OUTPUT_DEBUG_STRING code
/external/dbus/dbus/dbus-internals.c
7f3e29ffdfdbe4cd7c6c76ef066a516e675dee26 19-Dec-2009 Ralf Habacker <ralf@s15291359.onlinehome-server.info> let dbus_verbose print file name, line number and function name if available; this eases debugging.
/external/dbus/dbus/dbus-internals.c
459c19b9dd157cd360c3082d015a4c5ae4689cf8 22-Oct-2009 Tor Lillqvist <tml@iki.fi> Avoid warnings on Windows

Remove unused functions, or put in #if 0 if potentially useful. Make
internal functions used just in one file static. Use -Werror after all
also on Windows. Construct the installation root from the location of
the dbus DLL, not from the location of the program .exe of the
process.
/external/dbus/dbus/dbus-internals.c
8a7f49a51edcc9b6bb5c104bbff832b7ed84dd36 22-Apr-2009 Tor Lillqvist <tml@iki.fi> dbus/dbus-internals.c: "#define inline" is only needed on MSVC, not mingw (cherry picked from commit 314e91e3ee2566477918a51dbddd9eb141b33a23)
/external/dbus/dbus/dbus-internals.c
807fd7e7318a28d9d9677e07727652db1322b6d0 06-Jan-2009 Ralf Habacker <Ralf.Habacker@freenet.de> _dbus_verbose_real: (optionally) use OutputDebugString() (cherry picked from commit fd6d354c47b4b8dc24ce32e31171568a8704e7d1)
/external/dbus/dbus/dbus-internals.c
230caac4758028d0524a96a0947bd1b14ded803f 22-Apr-2009 Tor Lillqvist <tml@iki.fi> dbus/dbus-internals.h: 2x const char foo[] -> const char foo * (cherry picked from commit 62eaf8c91160abdeab6a46bb7bff737e13a390cf)
/external/dbus/dbus/dbus-internals.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-internals.c
c18415e2c6e151b773a90e66188714124ee8b867 15-Jan-2008 John (J5) Palmieri <johnp@redhat.com> add OOM handling

2008-01-15 John (J5) Palmieri <johnp@redhat.com>

* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>

* dbus/dbus-internals.c (_dbus_read_uuid_file_without_creating,
_dbus_create_uuid_file_exclusively): add OOM handling (FDO Bug #12952)
/external/dbus/dbus/dbus-internals.c
f55897af74ac072d3447e5cf513d0f4718b142c7 10-Oct-2007 Simon McVittie <simon.mcvittie@collabora.co.uk> Use DBUS_ERROR_INIT instead of dbus_error_init wherever it's clearly equivalent
/external/dbus/dbus/dbus-internals.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-internals.c
23832672266bb4ff23b66247c0cfa1a2ed0cc97b 09-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* bus/dispatch.c (check_get_connection_unix_process_id): adapt
since sysdeps-unix.h stuff isn't included anymore

* bus/bus.c (bus_context_new): use more abstract functions to
change user, so they can be no-ops on Windows

* dbus/dbus-credentials.c, dbus/dbus-credentials.h,
dbus/dbus-credentials-util.c: new files containing a fully opaque
DBusCredentials data type to replace the old not opaque one.

* configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on
windows

* dbus/dbus-userdb.h: prohibit on Windows, next step is to clean
up the uses of it in bus/*.c and factor out the parts of
cookie auth that depend on it
/external/dbus/dbus/dbus-internals.c
6b83766121ce27db759d5fa56dbcfc74ffa86987 20-May-2007 Ralf Habacker <ralf.habacker@freenet.de> * dbus/dbus-internal.c: fix inline problem on win32.
/external/dbus/dbus/dbus-internals.c
dbc061b8123799e9352ab069b4dc1b5ea394587d 15-Nov-2006 Havoc Pennington <hp@redhat.com> 2006-11-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-internals.c (_dbus_generate_uuid): The spec said the
UUID had the timestamp last, but the implementation had it first;
move it to last since I think it's a tiny bit nicer (easier to
compare at a glance, faster to sort, less code), and will not
cause any practical compatibility problems. Also, always convert
the timestamp to big endian.

* doc/dbus-specification.xml: Clean up the docs on the UUID.

* tools/dbus-uuidgen.1: more prominently say it is not suitable
as a replacement for regular uuidgen/RFC4122.
/external/dbus/dbus/dbus-internals.c
9bb44a470ffd4eace9307b47be37f9ccab276eec 24-Oct-2006 Thiago Macieira <thiago@kde.org> * dbus/dbus-sysdeps.h:
* dbus/dbus-sysdeps-unix.c: Add function
_dbus_make_file_world_readable that chmods a file to 0644.

* dbus/dbus-sysdeps-unix.c (_dbus_get_autolaunch_address):
Avoid writing to the static "argv" array, thereby avoiding a
COW on the child process.

* dbus/dbus-internals.c (_dbus_create_uuid_file_exclusively):
call _dbus_make_file_world_readable on the created file.
/external/dbus/dbus/dbus-internals.c
19e0efd2063f837f160de7c131b7d7f7a35f2cd6 20-Oct-2006 Havoc Pennington <hp@redhat.com> remove untrue comment
/external/dbus/dbus/dbus-internals.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-internals.c
f1ca9b89e92de4d876dc5e7e85710c4d2dc87638 17-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-17 Havoc Pennington <hp@redhat.com>

* dbus/dbus-internals.c (_dbus_warn_check_failed): new function to
be used for return_if_fail type warnings; prefixes the pid, and
fatal by default.
/external/dbus/dbus/dbus-internals.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/dbus/dbus-internals.c
d8155bf51bf6484a94e734601526bf211053a5e1 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-09-30 Havoc Pennington <hp@redhat.com>

* configure.in (LT_CURRENT, LT_AGE): increment current and age to
reflect addition of interfaces.

* doc/dbus-specification.xml: describe a new
org.freedesktop.DBus.Peer.GetMachineId method

* dbus/dbus-string.c (_dbus_string_skip_white_reverse): new function
(_dbus_string_skip_white, _dbus_string_skip_blank): use new
DBUS_IS_ASCII_BLANK, DBUS_IS_ASCII_WHITE macros and fix assertion
at end of skip_white
(_dbus_string_chop_white): new function

* bus/connection.c (bus_connections_setup_connection): call
dbus_connection_set_route_peer_messages.

* dbus/dbus-connection.c
(_dbus_connection_peer_filter_unlocked_no_update): modify to
support a GetMachineId method.

Also, support a new flag to let the bus pass peer methods through
to apps on the bus, which can be set with
dbus_connection_set_route_peer_messages.

Finally, handle and return an error for anything unknown on the
Peer interface, which will allow us to extend the Peer interface
in the future without fear that we're now intercepting something
apps were wanting to see.

* tools/dbus-uuidgen.c: a thin wrapper around the functions in
dbus/dbus-uuidgen.c

* dbus/dbus-uuidgen.c: implement the bulk of the dbus-uuidgen
binary here, since most of the code is already in libdbus

* dbus/dbus-sysdeps.c (_dbus_read_local_machine_uuid): read the
uuid from the system config file

* dbus/dbus-internals.c (_dbus_generate_uuid, _dbus_uuid_encode)
(_dbus_read_uuid_file_without_creating)
(_dbus_create_uuid_file_exclusively, _dbus_read_uuid_file): new
uuid-related functions, partly factored out from dbus-server.c

* dbus/dbus-sysdeps.c (_dbus_error_from_errno): convert EEXIST to
DBUS_ERROR_FILE_EXISTS instead of EEXIST

* dbus/dbus-protocol.h (DBUS_ERROR_FILE_EXISTS): add file exists error

* tools/dbus-cleanup-sockets.1: explain what the point of this
thing is a bit more

* autogen.sh (run_configure): add --config-cache to default
configure args

* dbus/dbus-internals.h (_DBUS_ASSERT_ERROR_IS_SET): disable the
error set/clear assertions when DBUS_DISABLE_CHECKS is defined

* tools/dbus-launch.c (main): if xdisplay hasn't been opened,
don't try to save address, fixes crash in make check
/external/dbus/dbus/dbus-internals.c
8027efc97b4bec85f674570f878919cb72456745 16-Sep-2006 Havoc Pennington <hp@redhat.com> voc Pennington <hp@redhat.com>

* dbus/dbus-server.c (dbus_server_listen): change how this works
to be able to delegate to a set of handlers that can succeed,
fail, or choose not to handle. Allows us to have
dbus_server_listen_platform_specific.

* dbus/dbus-server-socket.c (_dbus_server_new_for_tcp_socket):
factor out the tcp socket stuff to be used on windows, leaving
unix domain socket only in dbus-socket-unix.c

* dbus/dbus-transport-socket.c
(_dbus_transport_new_for_tcp_socket): factor out the tcp socket
stuff to be used on windows, leaving unix domain socket only
in dbus-transport-unix.c

* dbus/dbus-connection.c (dbus_connection_get_unix_user): insert
temporary hack to be sure this fails on windows
(dbus_connection_get_unix_process_id): ditto
/external/dbus/dbus/dbus-internals.c
05d90f4f20c1fbbb6c532b5f62531c97ced7d63e 11-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-internal.c: Add dbus_is_verbose so we can have more
complex debugging code

* dbus/dbus-marshal-basic.c (_dbus_marshal_read_fixed_multi): Move
between the test suite ifdefs
(_dbus_verbose_bytes): return if verbosity is not enabled
/external/dbus/dbus/dbus-internals.c
759fa115c95051eb32f6ed41b3cda1b219fc1aed 08-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-internals.c: unistd.h is not used
(_dbus_verbose_real): only enable verbose printing
if DBUS_VERBOSE environment var is set to '1'
(patch from Peter Kümmel <syntheticpp at gmx dot net>
/external/dbus/dbus/dbus-internals.c
7652304bff969afb3969603149bb385efe861fe8 03-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * s/D-BUS/D-Bus/g
/external/dbus/dbus/dbus-internals.c
be672187a56300d5aa15b1e5b3bfa5dc0fe48818 13-Feb-2005 Havoc Pennington <hp@redhat.com> oops, committed some debug junk
/external/dbus/dbus/dbus-internals.c
7f2973c8d1e124f4744af0bee73679607511f3a4 13-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_return_message)
(dbus_connection_borrow_message): hold dispatch lock while message
is outstanding
(_dbus_connection_block_for_reply): hold dispatch lock while we
block for the reply, so nobody steals our reply
(dbus_connection_pop_message): hold the dispatch lock while we
pluck the message
/external/dbus/dbus/dbus-internals.c
3ed9db546e1143bc9aa2d83a6f423fdd81227352 28-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-arch-deps.h.in: add 16/32-bit types

* configure.in: find the right type for 16 and 32 bit ints as well
as 64

* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
the 16-bit types so people don't have to stuff them in 32-bit or
byte arrays.
/external/dbus/dbus/dbus-internals.c
7bf62e31a3c820852271768fafc04ba95c31a19f 17-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

This is about it on what can be disabled/deleted from libdbus
easily, back below 150K anyhow. Deeper cuts are more work than
just turning the code off as I've done here.

* dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
signed int convenience funcs

* dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
verbose mode

* dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
things out of libdbus

* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same

* dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
tests-enabled-only, though it should probably be deleted)

* dbus/dbus-message-util.c: same stuff

* dbus/dbus-auth-util.c: same stuff
/external/dbus/dbus/dbus-internals.c
aad6fa897f85486386b030847151cb09943c97c0 17-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-internals.c (_dbus_real_assert): print the function
name the assertion failed in

* dbus/dbus-internals.h (_dbus_return_if_fail)
(_dbus_return_val_if_fail): assert that the name of the function
containing the check doesn't start with '_', since we only want to
use checks on public functions

* dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
checks to assertions

* dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
change checks to asserts for private function

* dbus/dbus-message.c (_dbus_message_set_serial): checks
to asserts for private function

* dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
broken assertion that was breaking make check
(_dbus_type_reader_array_is_empty): remove this rather than fix
it, was only used in assertions
/external/dbus/dbus/dbus-internals.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-internals.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-internals.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-internals.c
c24e6e11a6f9cabfd0311242f8388c8d82e840dc 22-Apr-2004 John (J5) Palmieri <johnp@redhat.com> * rename HEADER_FIELD_SERVICE -> HEADER_FIELD_DESTINATION
and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
for both dbus-protocol.h and in the spec
/external/dbus/dbus/dbus-internals.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-internals.c
75742242000e782719bc1656f0a7da72b059e88e 21-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-20 Havoc Pennington <hp@redhat.com>

hmm, make check is currently not passing.

* doc/dbus-specification.xml: add requirement that custom type
names follow the same rules as interface names.

* dbus/dbus-protocol.h: change some of the byte codes, to avoid
duplication and allow 'c' to be 'custom'; dict is now 'm' for
'map'

* doc/dbus-specification.xml: update type codes to match
dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
CUSTOM. Add type OBJECT_PATH to the spec.

2003-10-17 Havoc Pennington <hp@redhat.com>

* bus/driver.c (create_unique_client_name): use "." as separator
in base service names instead of '-'

* dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
byte at the end of the string

* dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
optimization macros since string validation seems to be a slow
point.

* doc/dbus-specification.xml: restrict valid
service/interface/member/error names. Add test suite code for the
name validation.

* dbus/dbus-string.c: limit service/interface/member/error names
to [0-9][A-Z][a-z]_

* dbus/dbus-connection.c (dbus_connection_dispatch): add missing
format arg to verbose spew

* glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
memory, return instead of g_error

* test/test-service.c (path_message_func): support emitting a
signal on request

* dbus/dbus-bus.c (init_connections_unlocked): only fill in
activation bus type if DBUS_BUS_ACTIVATION was set; default to
assuming the activation bus was the session bus so that services
started manually will still register.
(init_connections_unlocked): fix so that in OOM situation we get
the same semantics when retrying the function

* test/test-service.c (main): change to use path registration, to
test those codepaths; register with DBUS_BUS_ACTIVATION rather
than DBUS_BUS_SESSION
/external/dbus/dbus/dbus-internals.c
d6e1b2adb3d8e51ce1bb47295cef12d9fe1a15a8 16-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-16 Havoc Pennington <hp@redhat.com>

* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess

* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received

* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak

* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.

* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set

* dbus/dbus-internals.c: add pid to assertion failure messages

* dbus/dbus-connection.c: add message type code to the debug spew

* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo

* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead

* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate

* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct

* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)

* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR

* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing

* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused

* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
/external/dbus/dbus/dbus-internals.c
3251264ac483680b4a5fe808729f7e3b34f41fd4 15-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-14 Havoc Pennington <hp@redhat.com>

* bus/bus.c (bus_context_check_security_policy): revamp this to
work more sanely with new policy-based requested reply setup

* bus/connection.c (bus_transaction_send_from_driver): set bus
driver messages as no reply

* bus/policy.c (bus_client_policy_check_can_receive): handle a
requested_reply attribute on allow/deny rules

* bus/system.conf: add <allow requested_reply="true"/>

* bus/driver.c (bus_driver_handle_message): fix check for replies
sent to the bus driver, which was backward. How did this ever work
at all though? I think I'm missing something.

* dbus/dbus-message.c (decode_header_data): require error and
method return messages to have a reply serial field to be valid
(_dbus_message_loader_queue_messages): break up this function;
validate that reply serial and plain serial are nonzero;
clean up the OOM/error handling.
(get_uint_field): don't return -1 from this
(dbus_message_create_header): fix signed/unsigned bug

* bus/connection.c (bus_connections_expect_reply): save serial of
the incoming message, not reply serial
/external/dbus/dbus/dbus-internals.c
daf8d6579e1ae0ea748810b63180bd5eea2ab9c4 21-Sep-2003 Mark McLoughlin <mark@skynet.ie> 2003-09-21 Mark McLoughlin <mark@skynet.ie>

* doc/dbus-specification.sgml: Change the header field name
to be an enum and update the rest of the spec to reference
the fields using the conventinal name.

* dbus/dbus-protocol.h: update to reflect the spec.

* doc/TODO: add item to remove the 4 byte alignment requirement.

* dbus/dbus-message.c: Remove the code to generalise the
header/body length and serial number header fields as named
header fields so we can reference field names using the
protocol values.
(append_int_field), (append_uint_field), (append_string_field):
Append the field name as a byte rather than four chars.
(delete_int_or_uint_field), (delete_string_field): reflect the
fact that the field name and typecode now occupy 4 bytes instead
of 8.
(decode_string_field), (decode_header_data): update to reflect
protocol changes and move the field specific encoding from
decode_string_field() back into decode_header_data().

* dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
Add utility to aid debugging.

* dbus/dbus-message-builder.c:
(append_string_field), (_dbus_message_data_load): Update to
reflect protocol changes; Change the FIELD_NAME directive
to HEADER_FIELD and allow it to take the field's conventional
name rather than the actual value.

* test/data/*/*.message: Update to use HEADER_FIELD instead
of FIELD_NAME; Always align the header on an 8 byte boundary
*before* updating the header length.
/external/dbus/dbus/dbus-internals.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-internals.c
fdb114e5cce2790fd3c68cfa13113c7b59b83e4e 31-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-31 Havoc Pennington <hp@pobox.com>

* fix build with --disable-tests
/external/dbus/dbus/dbus-internals.c
cefb84edc5f84011c5a171e5d052e37c56c55d27 07-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c: implement signal connection
and dispatch

* dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new

* dbus/dbus-internals.c (_dbus_memdup): new function
/external/dbus/dbus/dbus-internals.c
6a109938f7a4fc726997985b6de66cf573961986 10-Jun-2003 Havoc Pennington <hp@redhat.com> 2003-06-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
SUN_LEN, it breaks abstract socket usage

* dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
starts of lines.
/external/dbus/dbus/dbus-internals.c
ab10ae902d8aa7c2b98fd080a7458127b1b8e648 11-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-11 Havoc Pennington <hp@pobox.com>

Write a "test-profile" that does echo client-server with threads;
profile reveals lock contention, memcpy/realloc of buffers, and
UTF-8 validation as hot spots. 20% of lock contention eliminated
with dbus_atomic_inc/dec implementation on x86. Much remaining
contention is global mempool locks for GList and DBusList.

* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
x86 implementation

* dbus/dbus-connection.c (struct DBusConnection): use
dbus_atomic_t for the reference count

* dbus/dbus-message.c (struct DBusMessage): declare
dbus_atomic_t values as volatile

* configure.in: code to detect ability to use atomic integer
operations in assembly, from GLib patch

* dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
time, tired of it being wrong in threads and forked processes

* glib/test-profile.c: a little program to bounce messages back
and forth between threads and eat CPU

* dbus/dbus-connection.c: add debug spew macros for debugging
thread locks; include config.h at top; fix deadlock in
dbus_connection_flush()
/external/dbus/dbus/dbus-internals.c
c9cd648f115759176d35508e9007dc5520a0dd3f 24-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-24 Havoc Pennington <hp@redhat.com>

* configure.in: add --enable-checks

* dbus/dbus-message.c (dbus_message_new): reverse name/service arguments

* dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
to use thread locks.
(_dbus_connection_handler_destroyed_locked): move some private
functions into proper docs group

* dbus/dbus-internals.h: add _dbus_return_if_fail,
_dbus_return_val_if_fail

Throughout: use dbus_return_if_fail
/external/dbus/dbus/dbus-internals.c
eb63ba5039c8afe61210cf2b217ec75b4a86356e 11-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@pobox.com>

* dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
the possible parent failures before we fork, so that we don't
fail to create a babysitter after creating the child.

* bus/activation.c (bus_activation_activate_service): kill child
if we don't successfully complete the activation.
/external/dbus/dbus/dbus-internals.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-internals.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/dbus/dbus-internals.c
c5020ac870c5990a36c3576453cc23431213e8bf 08-Apr-2003 Alexander Larsson <alexl@redhat.com> 2003-04-08 Alexander Larsson <alexl@redhat.com>

Implemented recursive types, named types and new-style iters

* bus/driver.c:
* glib/test-thread-client.c: (thread_func):
* glib/test-thread-server.c: (handle_test_message):
* test/test-service.c: (handle_echo):
Update to new api

* dbus/Makefile.am:
* dbus/dbus-dict.c:
* dbus/dbus-dict.h:
* dbus/dbus.h
Remove DBusDict

* dbus/dbus-internals.c: (_dbus_type_to_string):
Update for new types.

* dbus/dbus-marshal.[ch]:
Implement recursive types and the new marshalling format.
Remove hardcoded dict marshalling.
Marshal named types.

* dbus/dbus-message-builder.c:
Add BYTE_ARRAY.
Remove references to old types

* dbus/dbus-message.[ch]:
New non-refcounted iter API that supports recursive iters.
Use iters for appending, including support for recursive
iters.
Add byte and named type support.
Update everything to new marshalling formats.
Add tests for new API.

* dbus/dbus-protocol.h:
Remove old array types.
Add types: BYTE, ARRAY, DICT, NAMED

* dbus/dbus-string.c:
* dbus/dbus-sysdeps.c:
Make parse_double locale safe.

* dbus/dbus-test-main.c:
Call setlocale.

* dbus/dbus-test.c:
Kill dict test

* doc/dbus-specification.sgml:
Update spec

* test/data/incomplete-messages/missing-body.message:
* test/data/invalid-messages/bad-boolean.message:
* test/data/invalid-messages/bad-boolean-array.message:
* test/data/invalid-messages/boolean-array-length-too-long.message-raw:
* test/data/invalid-messages/boolean-has-no-value.message-raw:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
* test/data/valid-messages/emptiness.message:
* test/data/valid-messages/lots-of-arguments.message:
* test/data/valid-messages/no-padding.message:
* test/data/valid-messages/recursive-types.message:
Add missing NAME fields
Fix up dicts & arrays

* test/data/invalid-messages/dict-with-nil-value.message:
Removed, this is not invalid anymore.

* test/data/valid-messages/recursive-types.message:
Add new test for deeply recursive types.
/external/dbus/dbus/dbus-internals.c
2f3fbd451d2bed1737052c672974e3dc31ad015f 05-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-05 Havoc Pennington <hp@pobox.com>

* doc/config-file.txt (Elements): fix docs of <auth> to reflect
reality; in fact multiple mechanisms are allowed.

* dbus/dbus-internals.c (_dbus_real_assert)
(_dbus_real_assert_not_reached): move guts of _dbus_assert() and
_dbus_assert_not_reached() into functions, so that they don't show
up in basic block counts for test coverage, and don't use up as
much disk space. Does mean slower execution speed though, so
assumes --disable-asserts is the normal production case.
/external/dbus/dbus/dbus-internals.c
44ed933284589134603913b05f55ca55e8c5a566 01-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
function

* dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new

* dbus/dbus-internals.c (_dbus_dup_string_array): new function

* dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
socket 0777, and unlink any existing socket.

* bus/bus.c (bus_context_new): change our UID/GID and fork if
the configuration file so specifies; set up auth mechanism
restrictions

* bus/config-parser.c (bus_config_parser_content): add support
for <fork> option and fill in code for <auth>

* bus/system.conf.in: add <fork/> to default configuration,
and limit auth mechanisms to EXTERNAL

* doc/config-file.txt (Elements): add <fork>

* dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
(_dbus_change_identity): new function
/external/dbus/dbus/dbus-internals.c
18c470cd2c7245f33f5d924d23972e95e3d347a0 01-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@redhat.com>

* bus/Makefile.am (install-data-hook): create /var/run/dbus

* bus/messagebus.in: add init script for Red Hat /etc/init.d

* configure.in: add support for specifying a style of init script
to install
/external/dbus/dbus/dbus-internals.c
bc86794f23fa538a405813fb61b531c2eacc9ae1 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-30 Havoc Pennington <hp@pobox.com>

* bus/config-parser.c: hacking

* dbus/dbus-memory.c: don't use DBusList for the list of stuff
to shut down, since it could cause weirdness with the DBusList
lock

* dbus/dbus-list.c (_dbus_list_test): add tests for the
link-oriented stack routines
(alloc_link): free the mempool if the first alloc from it fails

* dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue

* dbus/dbus-string.c (UNICODE_VALID): sync new version of this
from GLib
(_dbus_string_skip_white): new

* doc/config-file.txt (Elements): add <includedir>
/external/dbus/dbus/dbus-internals.c
bf99381351b802fb3348a24037898222aae631e2 28-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-28 Havoc Pennington <hp@pobox.com>

* bus/test.c (bus_test_flush_bus): remove the sleep from here,
I think it may have just been superstition. Not sure.

* dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
failures that were not being handled.

* dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling

* dbus/dbus-memory.c: add ability to set number of mallocs in a
row that will fail on out-of-memory.

* dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
function for testing out-of-memory handling.

* bus/config-loader-expat.c (memsuite): don't wrap the dbus
allocation functions, they do map exactly to the expat ones.
/external/dbus/dbus/dbus-internals.c
ce4fd314c6be9bfee16a172d5ca34e5097d309fc 25-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-24 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
file

* dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
NULL argument for "message" if the error is a well-known one,
fill in a generic message in this case.

* dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
favor of DBusError

* bus/test.c (bus_test_flush_bus): add

* bus/policy.c (bus_policy_test): test code stub
/external/dbus/dbus/dbus-internals.c
c3af5ccdbc22e8990d04ec2f89ad1f2e053655e9 24-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-23 Havoc Pennington <hp@pobox.com>

* dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
DBUS_BUILD_TESTS, actually alloc/free a block of memory for
the mutex, so we can check for proper memory management
and OOM handling.

* dbus/dbus-dataslot.c: remove the mutex from
DBusDataSlotAllocator and lock it manually when using it,
to simplify fitting it into the global slots framework.

* dbus/dbus-threads.c (init_static_locks): rework how we're
handling global locks so they are easily shut down.

* bus/policy.c (bus_policy_append_rule): fix

* bus/test-main.c (main): check for memleaks

* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
test suite check for memleaks

* dbus/dbus-memory.c: add support in test mode for tracking
number of outstanding blocks
/external/dbus/dbus/dbus-internals.c
ce173b29fc1e9432cb5956952afdbe775da12415 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

Oops - test code was only testing failure of around 30 of the
mallocs in the test path, but it turns out there are 500+
mallocs. I believe this was due to misguided linking setup such
that there was one copy of dbus_malloc etc. in the daemon and one
in the shared lib, and only daemon mallocs were tested. In any
case, the test case now tests all 500+ mallocs, and doesn't pass
yet, though there are lots of fixes in this patch.

* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
this so that it doesn't need to allocate memory, since it
has no way of indicating failure due to OOM (and would be
annoying if it did).

* dbus/dbus-list.c (_dbus_list_pop_first_link): new function

* bus/Makefile.am: rearrange to create two self-contained
libraries, to avoid having libraries with overlapping symbols.
that was resulting in weirdness, e.g. I'm pretty sure there
were two copies of global static variables.

* dbus/dbus-internals.c: move the malloc debug stuff to
dbus-memory.c

* dbus/dbus-list.c (free_link): free list mempool if it becomes
empty.

* dbus/dbus-memory.c (_dbus_disable_mem_pools): new function

* dbus/dbus-address.c (dbus_parse_address): free list nodes
on failure.

* bus/dispatch.c (bus_dispatch_add_connection): free
message_handler_slot when no longer using it, so
memory leak checkers are happy for the test suite.

* dbus/dbus-server-debug-pipe.c (debug_finalize): free server name

* bus/bus.c (new_connection_callback): disconnect in here if
bus_connections_setup_connection fails.

* bus/connection.c (bus_connections_unref): fix to free the
connections
(bus_connections_setup_connection): if this fails, don't
disconnect the connection, just be sure there are no side
effects.

* dbus/dbus-string.c (undo_alignment): unbreak this

* dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
leaking
(_dbus_auth_new): fix the order in which we free strings
on OOM failure

* bus/connection.c (bus_connection_disconnected): fix to
not send ServiceDeleted multiple times in case of memory
allocation failure

* dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
get the base service name
(dbus_bus_register_client): don't return base service name,
instead store it on the DBusConnection and have an accessor
function for it.
(dbus_bus_register_client): rename dbus_bus_register()

* bus/dispatch.c (check_hello_message): verify that other
connections on the bus also got the correct results, not
just the one sending hello
/external/dbus/dbus/dbus-internals.c
29560adcc79a259a0be3511c056ee7453aa26c04 13-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-12 Havoc Pennington <hp@redhat.com>

Mega-patch that gets the message bus daemon initially handling
out-of-memory. Work still needed. Also lots of random
moving stuff to DBusError instead of ResultCode.

* dbus/dbus-list.c (_dbus_list_length_is_one): new function

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): use DBusError

* dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
DBusResultCode

* dbus/dbus-connection.c (dbus_connection_send): drop the result
code here, as the only failure possible is OOM.

* bus/connection.c (bus_connection_disconnect):
rename bus_connection_disconnected as it's a notification only

* bus/driver.c (bus_driver_handle_acquire_service): don't free
"name" on get_args failure, should be done by get_args;
don't disconnect client for bad args, just return an error.
(bus_driver_handle_service_exists): ditto

* bus/services.c (bus_services_list): NULL-terminate returned array

* bus/driver.c (bus_driver_send_service_lost)
(bus_driver_send_service_acquired): send messages from driver to a
specific client to the client's unique name, not to the broadcast
service.

* dbus/dbus-message.c (decode_header_data): reject messages that
contain no name field
(_dbus_message_get_client_serial): rename to
dbus_message_get_serial and make public
(_dbus_message_set_serial): rename from set_client_serial
(_dbus_message_set_reply_serial): make public
(_dbus_message_get_reply_serial): make public

* bus/connection.c (bus_connection_foreach): allow stopping
iteration by returning FALSE from foreach function.

* dbus/dbus-connection.c (dbus_connection_send_preallocated)
(dbus_connection_free_preallocated_send)
(dbus_connection_preallocate_send): new API for sending a message
without possibility of malloc failure.
(dbus_connection_send_message): rename to just
dbus_connection_send (and same for whole function family)

* dbus/dbus-errors.c (dbus_error_free): make this reinit the error

* dbus/dbus-sysdeps.c (_dbus_exit): new function

* bus/activation.c: handle/return errors

* dbus/dbus-errors.h: add more DBUS_ERROR #define

* dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
(_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
(_dbus_result_from_errno): move to this file
/external/dbus/dbus/dbus-internals.c
c8769e0b1dde3f1c4ad40cd10dd89c284ecc672b 24-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-24 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-internals.c: (_dbus_type_to_string):
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_boolean), (dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
(dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
(dbus_message_iter_get_double),
(dbus_message_iter_get_boolean_array), (message_iter_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* doc/dbus-specification.sgml:
* test/data/valid-messages/lots-of-arguments.message:
Add support for boolean and boolean array types.
/external/dbus/dbus/dbus-internals.c
2f38c959212d98e2194139daa9120fda37415b4f 24-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-23 Havoc Pennington <hp@pobox.com>

* dbus/dbus-keyring.c: finish most of this implementation and
simple unit test

* dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
these barf if the error isn't cleared to NULL

* dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
(_dbus_create_directory): new function

* dbus/dbus-errors.c (dbus_set_error): fix warning

* dbus/dbus-string.c (_dbus_string_hex_encode): new function
(_dbus_string_hex_decode): new function
(test_hex_roundtrip): test code

* dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode

* dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode

* dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
the save-to-temp/rename trick to atomically write the new file
(_dbus_string_parse_uint): new function
/external/dbus/dbus/dbus-internals.c
07a795f1db3b09beeec647643a4f263f617bc371 14-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-14 Havoc Pennington <hp@pobox.com>

* dbus/dbus-mempool.c: fail if the debug functions so indicate

* dbus/dbus-memory.c: fail if the debug functions indicate we
should

* dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
(_dbus_decrement_fail_alloc_counter): debug functions to
simulate memory allocation failures
/external/dbus/dbus/dbus-internals.c
8ab042b9571dda44a5afcfe50e0d29dc9b58ecae 31-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-31 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-address.c: (dbus_address_entry_free):
Free key and value lists.

* dbus/dbus-internals.c: (_dbus_type_to_string):
Add the types we didn't have.

* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
Add NIL types.

* dbus/dbus-message.c: (dbus_message_set_sender):
Remove todo about being able to set sender to NULL.

(dbus_message_set_is_error_reply),
(dbus_message_get_is_error_reply):
* dbus/dbus-message.h:
New functions.

* dbus/dbus-protocol.h:
Add error reply flag.

* test/data/valid-messages/opposite-endian.message:
Add NIL type to test.
/external/dbus/dbus/dbus-internals.c
9a0b07f225be10c545a8b1de8555bca2dc3a9cab 26-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function

* dbus/dbus-errors.c (dbus_result_to_string): add
file errors

* dbus/dbus-message-builder.c: new file, will contain code to load
up messages from files. Not implemented yet.
/external/dbus/dbus/dbus-internals.c
6ac750b03fb32591769d0a6ece8840932622fead 18-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

Building --disable-verbose-mode --disable-asserts --disable-tests
cuts the library from 112K to 45K or so

* configure.in: check for varargs macro support,
add --enable-verbose-mode, --enable-asserts.

* dbus/dbus-internals.h (_dbus_assert): support
DBUS_DISABLE_ASSERT
(_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
/external/dbus/dbus/dbus-internals.c
993be1059afcb0e9a5b67f5287fb1122d6c48ce6 09-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_align_length): new function

* dbus/dbus-test-main.c: move main() for test app here
* dbus/dbus-test.c
(dbus_internal_symbol_do_not_use_run_tests): we have to export a
symbol to run tests, because dbus-test isn't in the main
library

Code review nitpicks.

* dbus/dbus-message.c (dbus_message_write_header): add newlines
for people with narrow emacs ;-). Assert client_serial was filled
in. Assert message->name != NULL.
(dbus_message_append_fields): have "first_field_type" arg separate
from va list, needed for C++ binding that also uses varargs IIRC
and helps with type safety
(dbus_message_new): add @todo about using DBusString to store
service/name internally
(dbus_message_new): don't leak ->service and ->name on OOM later
in the function
(dbus_message_unref): free the service name
(dbus_message_get_fields): same change to varargs
i.e. first_field_type
(_dbus_message_loader_return_buffer): assert that the message data
is aligned (if not it's a bug in our code). Put in verbose griping
about why we set corrupted = TRUE.
(decode_header_data): add FIXME that char* is evil. Was going to
add FIXME about evil locale-specific string.h strncmp, but just
switched to wacky string-as-uint32 optimization. Move check for
"no room for field name" above get_const_data_len() to avoid
assertion failure in get_const_data_len if we have trailing 2
bytes or the like. Check for service and name fields being
provided twice. Don't leak service/name on error. Require field
names to be aligned to 4 bytes.

* dbus/dbus-marshal.c: move byte swap stuff to header
(_dbus_pack_int32): uscore-prefix
(_dbus_unpack_int32): uscore-prefix
(_dbus_unpack_uint32): export
(_dbus_demarshal_string): add @todo complaining about use of
memcpy()
(_dbus_marshal_get_field_end_pos): add @todo about bad error
handling allowing corrupt data to go unchecked
/external/dbus/dbus/dbus-internals.c
000d29a283b06517f0cfb599516a390e3afbf25c 08-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-08 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-internals.c: (_dbus_type_to_string):
New function that returns a string describing a type.

* dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
* dbus/dbus-marshal.h:
* dbus/dbus-message.c: (dbus_message_get_fields_valist),
(dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
(dbus_message_iter_get_byte_array):
* dbus/dbus-message.h:
Add new convenience functions for appending and getting message fields.
Also add demarshalling routines for byte arrays.
/external/dbus/dbus/dbus-internals.c
1f23ea99b37bfc8197f1c6a376f9afe08037f0f6 07-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-08 Anders Carlsson <andersca@codefactory.se>

reviewed by: <delete if not using a buddy>

* dbus/dbus-internals.c: (_dbus_type_to_string):
New function that returns a string describing a type.

* dbus/dbus-internals.h:
* dbus/dbus-message.c: (dbus_message_append_fields),
(dbus_message_append_fields_valist), (dbus_message_get_fields),
(dbus_message_get_fields_valist), (_dbus_message_test):
* dbus/dbus-message.h:
Add new convenience functions for appending and getting message fields.
Also add a test for those.
/external/dbus/dbus/dbus-internals.c
d4b870e7f91b7018524f7b85dc00b90cc64453bf 12-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-11 Havoc Pennington <hp@pobox.com>

* dbus/dbus-types.h: add dbus_unichar

* dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv

* dbus/dbus-connection.c (dbus_connection_send_message): return
TRUE on success

* dbus/dbus-transport.c: include dbus-watch.h

* dbus/dbus-connection.c: include dbus-message-internal.h

* HACKING: add file with coding guidelines stuff.

* dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
handling here, for security purposes (as in vsftpd). Not actually
using this class yet.

* dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
system/libc usage here, as in vsftpd, for ease of auditing (and
should also simplify portability). Haven't actually moved all the
system/libc usage into here yet.
/external/dbus/dbus/dbus-internals.c
4a74f8fcaba1b9d7ff962fd3c5655e57c2c32c81 25-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-25 Havoc Pennington <hp@pobox.com>

* dbus/dbus-internals.c (_dbus_verbose): fix to not
always print the first verbose message.
/external/dbus/dbus/dbus-internals.c
041b0767b284034aee09e9a0de2a3844b8cc546a 25-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-24 Havoc Pennington <hp@pobox.com>

* test/echo-client.c, test/echo-server.c: cheesy test
clients.

* configure.in (AC_CHECK_FUNCS): check for writev

* dbus/dbus-message.c (_dbus_message_get_network_data): new
function

* dbus/dbus-list.c (_dbus_list_foreach): new function

* dbus/dbus-internals.c (_dbus_verbose): new function

* dbus/dbus-server.c, dbus/dbus-server.h: public object
representing a server that listens for connections.

* dbus/.cvsignore: create

* dbus/dbus-errors.h, dbus/dbus-errors.c:
public API for reporting errors

* dbus/dbus-connection.h, dbus/dbus-connection.c:
public object representing a connection that
sends/receives messages. (Same object used for
both client and server.)

* dbus/dbus-transport.h, dbus/dbus-transport.c:
Basic abstraction for different kinds of stream
that we might read/write messages from.
/external/dbus/dbus/dbus-internals.c
576cdb6e0b1274e9fa5276e01337aef330dd4e8c 23-Nov-2002 Havoc Pennington <hp@redhat.com> 2002-11-23 Havoc Pennington <hp@pobox.com>

* dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
_DBUS_INT_MAX

* dbus/dbus-test.c (main): add list test, and include
dbus-test.h as intended

* dbus/dbus-hash.c (_dbus_hash_table_remove_string)
(_dbus_hash_table_remove_int): return value indicates
whether the entry existed to remove

* dbus/dbus-list.c: add linked list utility class,
with docs and tests

* dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
array sometimes.
/external/dbus/dbus/dbus-internals.c
954c4c7550879bd80315811b8548adfcb415766e 23-Nov-2002 Havoc Pennington <hp@redhat.com> commit missing files
/external/dbus/dbus/dbus-internals.c