History log of /external/dbus/dbus/dbus-connection.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
34e4a715490c404a711ba1f0ccef0f88567b62fa 10-Jun-2011 Simon McVittie <simon.mcvittie@collabora.co.uk> Consistently use atomic operations for all access to DBusConnection refcount

Trying to mix atomic operations with locked non-atomic operations is
broken: the atomic ops aren't necessarily atomic with respect to the
locked non-atomic ops, and the non-atomic ops aren't protected by the
lock because the atomic ops can change the refcount behind their back.

In theory we could use the connection lock if atomic ops aren't supported
(making a per-connection lock cheaper than the global lock used to
implement atomic ops) *and* our mutexes are recursive (making it safe
against deadlocks)... but life's too short.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Tested-by: Will Manley <freedesktop williammanley net>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
/external/dbus/dbus/dbus-connection.c
0d2584b4a1bed3ccb3c83682abb453d3ff2b68a4 21-May-2010 Jing Yu <jingyu@google.com> Remove gcc-4.5 compilation errors:
external/dbus/dbus/dbus-transport.c: In function '_dbus_transport_open':
external/dbus/dbus/dbus-transport.c:356:7: error: the comparison will always evaluate as 'false' for the address of 'tmp_error' will never be NULL [-Werror=address]

The key problem is that the macro _DBUS_ASSERT_ERROR_IS_CLEAR
and _DBUS_ASSERT_ERROR_IS_SET try to first check if &tmp_error==NULL.
gcc-4.5 reports an error, if tmp_error is a local stack variable
since &tmp_error will never be NULL.
gcc-4.4 and earlier versions are not as strict as gcc-4.5. We start
to see this type of errors from gcc-4.5.

This patch simply remove the "&tmp_error==NULL" comparisons only if
tmp_error is a local stack variable without changing anything else.
There may be better changes. But this patch is very consertative.
It keeps original comparison orders without making any assumption.

Change-Id: Ib16a6482765247f25ac6458e06861b077ed88ed5
/external/dbus/dbus/dbus-connection.c
88a0ffe5cbbecbeed13867e353d8a032507e1712 17-Jun-2009 Nick Pelly <npelly@google.com> Do not compile unnecessary DBUS source.

Reduces libdbus.so size by 20 kB.
/external/dbus/dbus/dbus-connection.c
c0d922c53be1d27912fa782f48387c8d23a34b3a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589

Change-Id: I28d6daea783c62ef14105593ffc3a0ca6a584339
/external/dbus/dbus/dbus-connection.c
6ff1d079316cb730a54b4e0e95bd3e6e31f439de 22-Jun-2010 Thiago Macieira <thiago@kde.org> Fix the reentrancy issue reported on bug 17754.

Patch based on patch by Havoc Pennington, with the references that
this is temporary removed.

Patch based on one from Olivier Hochreutiner <olivier.hochreutiner
gmail.com>

* dbus/dbus-connection.c (protected_change_timeout): remove the
elaborate nonworking hack to try to drop locks and just keep the
locks; this isn't right either, but at least is correct, though
it puts restrictions on apps.

* dbus/dbus-connection.c (protected_change_watch): make the same
change as for timeouts

* dbus/dbus-connection.c (dbus_connection_set_timeout_functions):
don't drop the lock here; add documentation of the problem to API
docs
(dbus_connection_set_watch_functions): same

* dbus/dbus-connection.c (dbus_connection_get_data)
(dbus_connection_set_data): introduce a separate slot_mutex
protecting connection->slot_list so these two functions can be
called inside watch and timeout functions. Not sure this
is going to be a good idea.

* dbus/dbus-connection.c (dbus_connection_unref)
(dbus_connection_ref): avoid using connection lock in ref/unref
so these can also be used in watch and timeout functions
/external/dbus/dbus/dbus-connection.c
e40c45fb4635321f17f3d6e4f9a4566fb62b3623 22-Jun-2010 Thiago Macieira <thiago@kde.org> Revert "Bug 17754 - Fixed race condition in protected_change_timeout."

This reverts commit b82ff17d7dd9689ab664e4a6c2a86c6f3dbfba69 and
9280395330c833dd98d0811d31349c26a84b2f6a.

Conflicts:

dbus/dbus-connection.c
/external/dbus/dbus/dbus-connection.c
9280395330c833dd98d0811d31349c26a84b2f6a 12-Jun-2010 Ralf Habacker <ralf.habacker@freenet.de> Use dbus provided wait function.
/external/dbus/dbus/dbus-connection.c
b82ff17d7dd9689ab664e4a6c2a86c6f3dbfba69 11-Jun-2010 Plácido Revilla <unknown@unknown.domain> Bug 17754 - Fixed race condition in protected_change_timeout.
/external/dbus/dbus/dbus-connection.c
81656e679be3d1c51fee935d52fbc6e8748fdbef 09-Jun-2010 Johannes Carlsson <johannes.carlsson.x@sonyericsson.com> Corrected thread problem causing some calls to hang for 25s

Since the connection lock is released for a short while in
_dbus_connection_acquire_io_path there can already be a method return
received by another thread. The fix is to do an extra check after the
I/O path has been aquired both.

Approved-by: Thiago Macieira
/external/dbus/dbus/dbus-connection.c
d5217348517e6b00a04e500ca460daf6cc928cd9 26-Mar-2010 Ralf Habacker <ralf.habacker@freenet.de> Cleaned up _dbus_verbose calls: function names and code line numbers are printed by default.
/external/dbus/dbus/dbus-connection.c
df89cfeb3808acc213c9620db6988611a34207c5 22-Mar-2010 Colin Walters <walters@verbum.org> Merge branch 'dbus-1.2'

Conflicts:
bus/dispatch.c
configure.in
test/name-test/test-names.c
c93d3ec2ff13f31291c56f6d5d4f7a77ecdb5ea7 22-Mar-2010 Colin Walters <walters@lightbox.localdomain> Add DBUS_INT64_MODIFIER define, turn on -Wformat

https://bugs.freedesktop.org/show_bug.cgi?id=19195

We were previously using -Wno-format because we didn't have
a #define for DBUS_INT64_MODIFIER, which was really lame because
it easily hid problems.

For now, just define it if we're on glibc; this is obviously
not strictly correct but it's safe, because the formatting
is only used in DBUS_VERBOSE mode, and in tools/dbus-monitor.
Ideally we get the the glib code relicensed.
/external/dbus/dbus/dbus-connection.c
ebfa7c02fd67777684d39389e25346819836dcca 16-Mar-2010 Colin Walters <walters@verbum.org> Merge branch 'dbus-1.2'

Conflicts:
bus/bus.c
configure.in
ae95a0ff9651a774cd983436d7e656c62492659c 12-Mar-2010 Michael Meeks <michael.meeks@novell.com> [DBusConnection] When handling a watch, return if another thread is doing I/O

http://lists.freedesktop.org/archives/dbus/2010-March/012337.html

Previously, the watch handler would block until the I/O path was available.
However, if another non-main thread was doing a synchronous call, this would
cause the main thread to block on that thread, a highly undesirable
thing because it's important for the main thread to remain responsive
for user interfaces.

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Thiago Macieira <thiago@kde.org>
/external/dbus/dbus/dbus-connection.c
e2aee8bdebc0f95ff626680b9882e74442c05f98 01-Oct-2009 James Westby <jw+debian@jameswestby.net> Correct timeout handling

The timeout handling code subtracts the elapsed time from the timeout
each time a message is received, which drastically reduces the timeout
in circumstances such as service activation.

Correct so that the timeout is never modified, and the elapsed time
instead subtracted where necessary.

Signed-off-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
2ca591df215df3e25d0e5b1fecc88f460542af62 22-Apr-2009 Tor Lillqvist <tml@iki.fi> dbus/dbus-connection.c: use dbus_message_type_to_string instead of printing the naked message type (cherry picked from commit 33d858e83e3cb1f55ed257ffef930b8f49c3ffc7)
/external/dbus/dbus/dbus-connection.c
b40c43b8e20a86a743c3495a4d78a93d84085560 17-Apr-2009 Christian Ehrlicher <Ch.Ehrlicher@gmx.de> remove an assert for windows only - don't know why this was added... (cherry picked from commit a248de6b733f4a3a78f6646174d899ba2058395e)
/external/dbus/dbus/dbus-connection.c
03cc20707a3e7b2d8629e84d7a766f41edb8b444 01-Oct-2009 James Westby <jw+debian@jameswestby.net> Correct timeout handling

The timeout handling code subtracts the elapsed time from the timeout
each time a message is received, which drastically reduces the timeout
in circumstances such as service activation.

Correct so that the timeout is never modified, and the elapsed time
instead subtracted where necessary.

Signed-off-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
37019e9d271390fa8c62c1aae62d30bb9068adaa 16-Jul-2009 Thiago Macieira <thiago@kde.org> Merge branch 'fd-passing'

Conflicts:
dbus/dbus-connection.c
dbus/dbus-message-util.c
dbus/dbus-sysdeps-unix.c
93023eb6a447bdb640f3435002e65c81a75912d4 13-Jul-2009 Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> Bug 12484 - Ensure initialized variable in dbus_connection_remove_filter

Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
(cherry picked from commit ccfa8e51549f36e09f90a4f5822523a0f50201fc)
/external/dbus/dbus/dbus-connection.c
dc33f4f7749ed303374ebdf00e48ea8a471afd25 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>
(cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)
/external/dbus/dbus/dbus-connection.c
fc7b4fc9ecf26d60384ad3fd3551f3de53fc91e6 11-May-2009 Scott James Remnant <scott@ubuntu.com> Fix issue where timeouts can overflow.

* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Rework
the timeout math so instead of calculating an end time, which may
overflow, we instead calculate the elapsed time which is always
smaller than the boundaries.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 1faa92114f6489d286ad4cebe5e91b2145a4f7d1)
/external/dbus/dbus/dbus-connection.c
390aa034403cd28ab03d12ed75ff486872a9fbc9 11-May-2009 Scott James Remnant <scott@ubuntu.com> Update documentation now that INT_MAX means no timeout.

* dbus/dbus-connection.c (dbus_connection_send_with_reply): Fix
documentation now that INT_MAX will not be clamped.
(dbus_connection_send_with_reply_and_block): Update documentation too.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit ce0d932d9be5adec22943dd7b268bd4a165ada64)
/external/dbus/dbus/dbus-connection.c
1617081d91c82a1d8a8ae6620ba917996203c454 11-May-2009 Scott James Remnant <scott@ubuntu.com> Allow a pending call to block forever

* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Allow the
pending call to have no timeout, in which case we simply block until we
complete, have data or get disconnected.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit e5eb472d11aa36c67e320edce41d66eb18cdf5d0)
/external/dbus/dbus/dbus-connection.c
dd63302d72fdb7276fce5c1edbc480af49bdf246 11-May-2009 Scott James Remnant <scott@ubuntu.com> Make sure a pending call timeout isn't assumed.

* dbus/dbus-connection.c (_dbus_connection_attach_pending_call_unlocked):
Don't assume that the pending call has a timeout.
(connection_timeout_and_complete_all_pending_call_unlocked): check that
the timeout was actually added before removing it; this safeguards us
if the pending call doesn't have a timeout.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit ba22606c3b21c55c5c0af30d8f07edd71ded7213)
/external/dbus/dbus/dbus-connection.c
ccfa8e51549f36e09f90a4f5822523a0f50201fc 13-Jul-2009 Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> Bug 12484 - Ensure initialized variable in dbus_connection_remove_filter

Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
/external/dbus/dbus/dbus-connection.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-connection.c
1faa92114f6489d286ad4cebe5e91b2145a4f7d1 11-May-2009 Scott James Remnant <scott@ubuntu.com> Fix issue where timeouts can overflow.

* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Rework
the timeout math so instead of calculating an end time, which may
overflow, we instead calculate the elapsed time which is always
smaller than the boundaries.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
ce0d932d9be5adec22943dd7b268bd4a165ada64 11-May-2009 Scott James Remnant <scott@ubuntu.com> Update documentation now that INT_MAX means no timeout.

* dbus/dbus-connection.c (dbus_connection_send_with_reply): Fix
documentation now that INT_MAX will not be clamped.
(dbus_connection_send_with_reply_and_block): Update documentation too.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
e5eb472d11aa36c67e320edce41d66eb18cdf5d0 11-May-2009 Scott James Remnant <scott@ubuntu.com> Allow a pending call to block forever

* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Allow the
pending call to have no timeout, in which case we simply block until we
complete, have data or get disconnected.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
ba22606c3b21c55c5c0af30d8f07edd71ded7213 11-May-2009 Scott James Remnant <scott@ubuntu.com> Make sure a pending call timeout isn't assumed.

* dbus/dbus-connection.c (_dbus_connection_attach_pending_call_unlocked):
Don't assume that the pending call has a timeout.
(connection_timeout_and_complete_all_pending_call_unlocked): check that
the timeout was actually added before removing it; this safeguards us
if the pending call doesn't have a timeout.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
/external/dbus/dbus/dbus-connection.c
bfad32422f1f78bce4de1e88a4afb5cc295bb877 20-May-2009 Lennart Poettering <lennart@poettering.net> unix-fd: add logic to count unix fds the same way as allocated memory

This make all counters count both bytes of memory and unix fds.
/external/dbus/dbus/dbus-connection.c
2eb14dbcac1870dda1b36ce1e6fedfe7500572cb 22-Apr-2009 Lennart Poettering <lennart@poettering.net> unix-fd: when sending a message with unix fds verify that the connection can do it

Not all of the send function flavours allow returning proper error
codes. For the cases where this is not easily possible the client should
call dbus_connection_can_send_type() first.
/external/dbus/dbus/dbus-connection.c
08e49d9b53b675ee2292ac35173dfb4ab97e8d13 22-Apr-2009 Lennart Poettering <lennart@poettering.net> unix-fd: introduce dbus_connection_can_send_type()

This is just a wrapper around _dbus_transport_can_pass_unix_fd() however
it is more generic.

The reason for keeping this generic is to ease later addition of more
types without having to add a new API for that.
/external/dbus/dbus/dbus-connection.c
03d50fbd77481568bb2127d8b92e22d2cdc61ab8 22-Apr-2009 Lennart Poettering <lennart@poettering.net> sysdeps-unix: if MSG_NOSIGNAL is available don't touch SIGPIPE by default

If we can use MSG_NOSIGNAL we don't have to play games with SIGPIPE
/external/dbus/dbus/dbus-connection.c
0cf4583b5a4772b9c2a381ce78f6e3a3afcf705d 21-Apr-2009 William Lachance <wrlach@gmail.com> Bug 19567 - Make marshaling code usable without DBusConnection

Some projects want to reuse the DBus message format, without
actually going through a DBusConnection. This set of changes
makes a few functions from DBusMessage public, and adds a new
function to determine the number of bytes needed to demarshal
a message.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
eb3b99e7c610988823804f5e6c92aa13459605c7 21-Apr-2009 Kjartan Maraas <kmaraas@gnome.org> Bug 19502 - Sparse warning cleanups

This patch makes various things that should be static static,
corrects some "return FALSE" where it should be NULL, etc.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
5b4ee5fb40269afaa106b55dd4755125c2f9107a 17-Mar-2009 Johan Gyllenspetz <johangy@axis.com> Bug 20494 - Fix signed confusion for dbus_message_get_reply_serial return

We were incorrectly converting the serial to a signed integer
and comparing it to -1.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
16a947eedb7f7f2951fff4ebbf301af7776aa8df 21-Apr-2009 William Lachance <wrlach@gmail.com> Bug 19567 - Make marshaling code usable without DBusConnection

Some projects want to reuse the DBus message format, without
actually going through a DBusConnection. This set of changes
makes a few functions from DBusMessage public, and adds a new
function to determine the number of bytes needed to demarshal
a message.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
3c89788fa483ebda858ab66797e2834af94b798f 21-Apr-2009 Kjartan Maraas <kmaraas@gnome.org> Bug 19502 - Sparse warning cleanups

This patch makes various things that should be static static,
corrects some "return FALSE" where it should be NULL, etc.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
387ccafb4df116bdcc7f4a07cd0098a1f445b958 17-Mar-2009 Johan Gyllenspetz <johangy@axis.com> Bug 20494 - Fix signed confusion for dbus_message_get_reply_serial return

We were incorrectly converting the serial to a signed integer
and comparing it to -1.

Signed-off-by: Colin Walters <walters@verbum.org>
/external/dbus/dbus/dbus-connection.c
458c6ead8572f8cea248844b6860156a00f3f45b 07-Jun-2008 Thiago Macieira <thiago@kde.org> Merge branch 'dbus-1.2'
d7bb3cf8dfc162007caf5e28d9c304381de7b8c3 07-Jun-2008 Oswald Buddenhagen <ossi@kde.org> Fix inverted return value from dbus_connection_read_write()

* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
The double negation re no_progress_possible was obviously too
confusing: the path for dispatch = FALSE would return an inverted
status. So make it progress_possible and fix the logic.

Signed-off-by: Thiago Macieira <thiago@kde.org>
/external/dbus/dbus/dbus-connection.c
ab1eb1fd5a26affa2383b0eb7e292efd83ec2546 05-Jun-2008 Colin Walters <walters@verbum.org> Bug 15740: Solaris/ADT auditing support (simon zheng)

* bus/driver.c: Add GetAdtAuditSessionData method
which returns audit data for a connection.
* configure.in: Detect ADT auditing support
* dbus/dbus-auth.c: Read ADT auditing creds.
* dbus/dbus-connection.c: Implement
dbus_connection_get_adt_audit_session_data.
* dbus/dbus-connection.h: Export it.
* dbus/dbus-credentials.c: Add support for
gathering adt_audit_data and retrieving it
via _dbus_credentials_get_adt_audit_data.
* dbus/dbus-credentials.h: Add
DBUS_CREDENTIAL_ADT_AUDIT_DATA_ID.
* dbus/dbus-protocol.h: New error
DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN.
* dbus/dbus-sysdeps.c: Support for reading
audit credentials via ADT API.
* dbus/dbus-transport.c: New function
_dbus_transport_get_adt_audit_session_data
to retrieve credentials.
* dbus/dbus-transport.h: Export it.
/external/dbus/dbus/dbus-connection.c
ef41cd31100097636523088ec7f115e432366956 31-May-2008 Colin Walters <walters@verbum.org> Bug 15635: Hold a reference during read/write dispatch (Scott James Remnant)

* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
Reference the D-Bus connection during the function call since we
call other functions that may free the last reference and we
still expect to be able to check the connection after they return
to decide our own return value.
/external/dbus/dbus/dbus-connection.c
0e2a099b55a50b9b5a0f948e134b5a88e2924262 31-May-2008 Colin Walters <walters@verbum.org> Bug 15571: Clean up GUID-less connections correctly (Scott James Remnant)

* dbus/dbus-connection.c (connection_forget_shared_unlocked):
Remove shared connections which lack a GUID from the list that
caches those, otherwise references to them will remain after
they have been freed.
* test/name-test/test-privserver-client.c: Update test to
try GUID-less connections too.
/external/dbus/dbus/dbus-connection.c
cdca6dbce88fd1e1195e2a81eb6619c782df2fac 17-May-2008 Thiago Macieira <thiago@kde.org> Prevent a crash in some applications due to timers leaking after the
DVusPendingCall object was freed.

* dbus-connection.c: Remove the timer for the pending call's timeout in
case the reply has timed out in blocking code. This fixes bug 15684.
/external/dbus/dbus/dbus-connection.c
b5818e619f6258cc6d530ee62e99bd019b6d069b 03-Apr-2008 John (J5) Palmieri <johnp@redhat.com> modify dbus_connection_send documentation

* dbus/dbus-connection.c (dbus_connection_send): add documentation
to describe when to call dbus_connection_flush and
dbus_connection_unref after a call to dbus_connection_send is made
Initial wording by Stanislav Brabec <sbrabec at suse.cz>
(fd.o bug#13558)
/external/dbus/dbus/dbus-connection.c
381c8548b2deaf1bd827b69e144b652e00f8af1d 26-Feb-2008 John (J5) Palmieri <johnp@redhat.com> correctly unref connections without guids during shutdown

* dbus/dbus-connection.c (close_connection_on_shutdown): new method
split out from shared_connections_shutdown
(shared_connections_shutdown): shutdown all shared connections
without guids
(_dbus_connection_ref_unlocked): handle OOM when prepending no guid
connections to the shared_connections_no_guid list
* Patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
/external/dbus/dbus/dbus-connection.c
738743002dc72b69cf440d5a4be30e2fedf51892 15-Jan-2008 John (J5) Palmieri <johnp@redhat.com> don't check for < 0 on an unsigned variable (FDO Bug #12924)

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-connection.c (_dbus_connection_get_next_client_serial):
don't check for < 0 on an unsigned variable (FDO Bug #12924)
/external/dbus/dbus/dbus-connection.c
1b6460201732b21249be1c4fef9722809661a842 15-Jan-2008 John (J5) Palmieri <johnp@redhat.com> fix possible crash if pending_return is NULL (FDO Bug #12673)

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-connection.c (dbus_connection_send_with_reply):
fix possible crash if pending_return is NULL (FDO Bug #12673)
/external/dbus/dbus/dbus-connection.c
047ec880e9e228183237c661ec2e45a949785cb9 18-Dec-2007 Havoc Pennington <hp@pobox.com> fix some curly braces that were on the wrong line

2007-12-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (_dbus_connection_block_pending_call):
fix location of curly braces
/external/dbus/dbus/dbus-connection.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-connection.c
557da1740631818f96e40d0016a4cabdf34ed0f1 09-Oct-2007 Simon McVittie <simon.mcvittie@collabora.co.uk> Add dbus_connection_try_register_object_path and dbus_connection_try_register_fallback, to make object path registration less painful for bindings
/external/dbus/dbus/dbus-connection.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-connection.c
e339814224d54c9b048ead2d6965f89790ec318a 10-Jul-2007 Havoc Pennington <hp@redhat.com> 2007-07-10 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (struct DBusConnection): Fix from Olivier
Hochreutiner to avoid trying to protect individual bits in a word
with different locks (make dispatch_acquired and io_path_acquired
dbus_bool_t rather than bitfields)
/external/dbus/dbus/dbus-connection.c
54b943432c7c947db88066751dd36a372cc9a618 18-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-18 Havoc Pennington <hp@redhat.com>

* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()

* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()

* bus/bus.c (bus_context_new): generate a unique ID for each bus context

* dbus/dbus-connection.c (dbus_connection_get_server_id): new function

* dbus/dbus-bus.c (dbus_bus_get_id): new function

* dbus/dbus-server.c (dbus_server_get_id): new function
/external/dbus/dbus/dbus-connection.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-connection.c
94125e89b6be74cb20100d5321a98aa6529187a9 12-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-12 Havoc Pennington <hp@redhat.com>

* dbus/dbus-auth.c (sha1_handle_second_client_response)
(handle_server_data_anonymous_mech): add the process ID from
socket credentials, if available, even if not using EXTERNAL

* dbus/dbus-transport.c (auth_via_default_rules): support
allow_anonymous flag

* dbus/dbus-connection.c (dbus_connection_get_is_anonymous)
(dbus_connection_set_allow_anonymous): new API for controlling
anonymous access
/external/dbus/dbus/dbus-connection.c
7be5fd95cdccdca28937804f32ca8b1308887d09 10-Jun-2007 Havoc Pennington <hp@redhat.com> 2007-06-09 Havoc Pennington <hp@redhat.com>

* bus/policy.c (bus_policy_create_client_policy): gracefully
continue if the connection has no unix user - just don't apply
any unix user dependent rules.

* bus/config-parser.c: remove dbus-userdb.h usage

* bus/bus.c: remove dbus-userdb.h usage

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
support Windows user function; also, fix the logic for checking
auth as root in the default auth code (broken in the previous
commit)

* dbus/dbus-connection.c
(dbus_connection_set_windows_user_function): new function
(dbus_connection_get_windows_user): new function
/external/dbus/dbus/dbus-connection.c
d3204dc446d96876baab9859de132a5a4da675d4 15-Nov-2006 Havoc Pennington <hp@redhat.com> 2006-11-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-misc.c, dbus/dbus-misc.h: Move
dbus_get_local_machine_id() to its own file, no substantive
changes. There are a couple other things we might want to add that
are "misc" so moving out of dbus-connection.[hc] which is big
enough already.
/external/dbus/dbus/dbus-connection.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-connection.c
abfdfb2dfb2f2f0317856083dcf6ca71b271c9b9 28-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_open_private): document
how to choose shared vs. private connections
/external/dbus/dbus/dbus-connection.c
eaefe03a8891b84e3f9e1f99f9098d65567e3092 28-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-test.c: enclose more of the file in the
DBUS_BUILD_TESTS check.

* dbus/dbus-sysdeps-pthread.c (PTHREAD_CHECK): fix for
DBUS_DISABLE_ASSERT case.

* dbus/dbus-connection.c (dbus_connection_get_unix_user): document
that it only works on the server side

* dbus/dbus-bus.c: add a global lock covering the BusData we
attach to each connection
(internal_bus_get): lock our access to the BusData
(dbus_bus_register): lock the entire registration process
with _DBUS_LOCK(bus_datas). If we get the lock and
registration is already complete, silently return (vs. previous
behavior of aborting).
(dbus_bus_set_unique_name): lock the BusData
(dbus_bus_get_unique_name): lock the BusData
/external/dbus/dbus/dbus-connection.c
5886f5326da2dbe8f1a7c97736d544fa4cef169b 27-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-26 Havoc Pennington <hp@redhat.com>

* dbus/dbus-threads.[hc]: Documentation improvements. Clarify how
condition variables relate to recursive mutexes.

* dbus/dbus-sysdeps-pthread.c, dbus/dbus-sysdeps-win-thread.c,
dbus/dbus-threads.c: Split the platforms-specific thread
implementations into their own files.

* dbus/dbus-sysdeps-pthread.c
(_dbus_pthread_condvar_wait_timeout): invert the return value, it
was backward. Not that anything uses it.
/external/dbus/dbus/dbus-connection.c
f17c060c7234cec9df8ce90628db299d3dd9c4b9 26-Oct-2006 Thiago Macieira <thiago@kde.org> * dbus/dbus-connection.c (_dbus_connection_open_internal): Fix
bug 8780: the connection lock is only required while recording
the shared connection, so protect only that code
section. Don't require connection_lookup_shared to return a
locked connection.
/external/dbus/dbus/dbus-connection.c
bf172ce4c5856af21f5ee208960bf718a5058ad9 22-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-21 Havoc Pennington <hp@redhat.com>

* Documentation! Whee! Doxygen now 100% silent. If you make it
angry again, you will be punished.
/external/dbus/dbus/dbus-connection.c
58a0d2759aedc854ccac78d7252f117662734142 21-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-21 Havoc Pennington <hp@redhat.com>

* More documentation - all public API now documented according to
Doxygen
/external/dbus/dbus/dbus-connection.c
fed8880c6f718b9f06e589d1769494a47b395c0d 21-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-21 Havoc Pennington <hp@redhat.com>

* Document a bunch of undocumented stuff
/external/dbus/dbus/dbus-connection.c
afa4ffbd852686633086569cd34942917c5c49af 21-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-21 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.h: put #ifndef DBUS_DISABLE_DEPRECATED around
dbus_message_iter_get_array_len().

* throughout: documentation improvements.
/external/dbus/dbus/dbus-connection.c
65fcbd62876f435f08bbcb6ff4596545b8c87bbd 21-Oct-2006 Havoc Pennington <hp@redhat.com> fix typo
/external/dbus/dbus/dbus-connection.c
ebb239648b60872d0e840e6b4fd63af0eb7d0d5a 20-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-20 Havoc Pennington <hp@redhat.com>

* doc/TODO: remove the int64 thing from 1.0 since it doesn't
matter, and the message-loader-breaker thing since nobody is going
to do it. Add an item to 1.0 about supporting recursive locks
in dbus_threads_init_default() though, since it should be easy.

* dbus/dbus-connection.c (_dbus_connection_read_write_dispatch):
Fix this in the !dispatch case to avoid busy-looping after
disconnection

* More misc docs improvements
/external/dbus/dbus/dbus-connection.c
2a895edf6b1cad3915f5ca9e8b41f4bba780b2e0 20-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-19 Havoc Pennington <hp@redhat.com>

* more Doxygen-related fixes (lots of moving things from the
public to internal section in dbus-connection.c)
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
2f2a3334de3e7a3ca1d4faa725f37ff6823c6a3b 13-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): fix to handle closed
connections, from Tambet Ingo bug #8631
/external/dbus/dbus/dbus-connection.c
7020b573764bb86551d329e867c2e87172424c9b 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-01 Havoc Pennington <hp@redhat.com>

* test/test-service.c (path_message_func): remove broken extra
unref that was hidden by the bugs in dbus-connection.c/dbus-bus.c

* test/test-shell-service.c (path_message_func): same fix

* dbus/dbus-connection.c
(_dbus_connection_get_dispatch_status_unlocked): break up the
function a little for clarity and fix the notification of
dbus-bus.c to not require dispatch to be complete

* dbus/dbus-connection.c (dbus_connection_unref): improve the
warning when you try to finalize an open connection.
/external/dbus/dbus/dbus-connection.c
eb1e11babd60dc618753aaceec14821526c96a14 01-Oct-2006 Havoc Pennington <hp@redhat.com> 2006-10-01 Havoc Pennington <hp@redhat.com>

* dbus/dbus-bus.c
(internal_bus_get): only weak ref the connection; this means
_dbus_bus_notify_shared_connection_disconnected_unlocked can be
called safely in any context
(_dbus_bus_notify_shared_connection_disconnected_unlocked): don't
unref

* dbus/dbus-connection.c
(_dbus_connection_get_dispatch_status_unlocked): move
_dbus_bus_notify_shared_connection_disconnected_unlocked here
when queuing Disconnected instead of when the Disconnected message
arrives, so dbus_bus_get() won't return closed connections.
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
f6fa010403cb2badd88ce096ae91f664418508d1 30-Sep-2006 Thiago Macieira <thiago@kde.org> * configure.in: add DBUS_BINDIR as a #define to C source code.

* tools/dbus-launch.c
* tools/dbus-launch.h
* tools/dbus-launch-x11.c:
* tools/dbus-launch.1: Add the --autolaunch option to
dbus-launch, which makes it scan for an existing session
started with --autolaunch. With that option, it also creates
an X11 window and saves the bus address and PID to it.

* dbus/dbus-sysdeps.h:
* dbus/dbus-sysdeps-unix.c (_dbus_get_autolaunch_address): Add
a function that runs "dbus-launch --autolaunch" to retrieve
the running D-Bus session address (or start one if none was running)

* dbus/dbus-transport.c: Add the handler for the "autolaunch:"
address protocol, which tries to get the running session from
dbus-launch.

* dbus/dbus-bus.c:
* dbus/dbus-internals.h: Make "autolaunch:" be the default
D-Bus session bus address.

* dbus/dbus-connection.c: Fix horrible typo in error message.
/external/dbus/dbus/dbus-connection.c
e001455a0300cc1df17684a028049c8c33e4f575 16-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-16 Havoc Pennington <hp@redhat.com>

Attempt auditing public API to remove all cases where a Unix
function returns weird emulated goo to Windows. This probably
breaks the bus daemon on Windows, to fix it again we may
need to stop processing unix-specific config options on Windows,
and may need to add Windows-specific public API or config options.

* configure.in (LT_CURRENT, LT_AGE): increment current and age,
to reflect added interfaces; should not break soname.

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated): do
not invoke unix user function on Windows. Kind of a hacky fix, but
we don't want a "unix uid" leaking out on Windows.

* dbus/dbus-connection.c (dbus_connection_get_socket): add new API
to get the socket fd on Windows or UNIX
(dbus_connection_get_unix_fd): make this always fail on Windows
/external/dbus/dbus/dbus-connection.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-connection.c
15c60238853f2896738c23b53e574b5d9cae1635 11-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * remove a bunch of todo items from the 1.0 list
/external/dbus/dbus/dbus-connection.c
f61a63cefb4c931636b43ffa8f61ad3dd45d7b86 08-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * bus/test-main.c (main): Initialize threading during tests

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
Unlock connection on error
(generate_local_error_message): static method for generating
an error message when we don't have a message to reply to
(_dbus_connection_block_pending_call): Send a disconnect error
instead of just a timeout (NULL) when the bus gets disconnected
while blocking for a reply.
/external/dbus/dbus/dbus-connection.c
b4d571bba305f05810e77e7b1309524d3bf53f3f 08-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.c (dbus_connection_dispatch): Properly remove
filters (Patch from Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>)
/external/dbus/dbus/dbus-connection.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/dbus/dbus-connection.c
88f69757b93c7112447b97868c7dbde69dc00caa 06-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * doc/TODO, various source files: Audited todo's and FIXME's and
prepended the ones we should be looking at with 1.0. Those
prepended with 1.0? need clerification or might not be needed
for 1.0
/external/dbus/dbus/dbus-connection.c
14cc7d28a8308060428bbc9b3dd357eaea3a4749 17-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-threads.c: Add static DBusList *uninitialized_mutex_list and
static DBusList *uninitialized_condvar_list to support new late
initialization threading model. In this model threads can be initialized
even after the D-Bus API has been used but still needs to be initialized
before the second thread has been started. Mutexes and condvar addresses
are stored in the two static lists and are replaced with actuall locks
when threads are initalized.
(_dbus_mutex_new_at_location): New method for creating a mutex and placing
the location into the static list
(_dbus_mutex_free_at_location): New method for removing a mutex location
from the static list and freeing the mutex
(_dbus_condvar_new_at_location): New method for creating a conditional
variable and placing the location into the static list
(_dbus_condvar_free_at_location): New method for removing a conditional
variable location from the static list and freeing the conditional variable
(init_uninitialized_locks): Atomic method which goes through the static
lists of mutex and condvar location and updates them with actuall locks
(init_global_locks): changed to init_locks

* dbus/dbus-connection.c:
(_dbus_connection_test_get_locks): New method for tests to check connections
(_dbus_connection_new_for_transport): Use the new at_location mutex and
condvar API
(dbus_connection_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-dataslot.c:
(_dbus_data_slot_allocator_alloc): Use the address of the mutex
instead of the mutex itself

* dbus/dbus-message.c:
(dbus_message_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-pending-call.c:
(dbus_pending_call_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* dbus/dbus-server.c:
(_dbus_server_init_base): Use the new at_location mutex API
(dbus_server_allocate_data_slot): Pass in the global lock address
to _dbus_data_slot_allocator_alloc

* test/name-test/test-threads-init.c: New test case for late thread
initialization
/external/dbus/dbus/dbus-connection.c
222bd07e9df5e3b5a367d1282b43fd3a827a7552 04-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * configure.in: add -Wdeclaration-after-statement

* dbus/dbus-connection.c: change all the pending call stuff to
reflect the fact that pending call operations use the connection
lock

* dbus/dbus-pending-call.c: add locking here

* dbus/dbus-errors.c (struct DBusRealError): don't make the name
field const consistent with how message field is done
/external/dbus/dbus/dbus-connection.c
7652304bff969afb3969603149bb385efe861fe8 03-Aug-2006 John (J5) Palmieri <johnp@redhat.com> * s/D-BUS/D-Bus/g
/external/dbus/dbus/dbus-connection.c
da127218174e212476f9ca8c4a937fdbc24561cb 22-Jul-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.c:
(_dbus_connection_attach_pending_call_unlocked):
(connection_timeout_and_complete_all_pending_calls_unlocked):
Make sure we set timeout_added on pending calls to FALSE when
we remove the timeout from the connection
/external/dbus/dbus/dbus-connection.c
5efe8e7f1d97931710558495a951e0b35afbfb72 14-Jul-2006 John (J5) Palmieri <johnp@redhat.com> * dbus-connection.c (dbus_connection_send_with_reply): return TRUE
and set pending_reply out arg to NULL is connection is disconnected
(connection_timeout_and_complete_all_pending_calls_unlocked): New
static method for cleaning up pending calls on disconnect
(_dbus_connection_get_dispatch_status_unlocked): If we have pending
calls queued timeouts on disconnect

* dbus/dbus-pending-call.ci (_dbus_pending_call_set_connection):
Remove
/external/dbus/dbus/dbus-connection.c
e3dc6e281aae288e995f9d6a2675662ac3d0749f 12-Jul-2006 John (J5) Palmieri <johnp@redhat.com> - Make DBusPendingCall an opaque type even to D-Bus internals
/external/dbus/dbus/dbus-connection.c
7553adeaacd3984c22bb23e0764d5f4ec9a9ae69 07-Jul-2006 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.h: remove connection_disconnect and replace with
connection_close

* dbus/dbus-connection.c: include dbus-bus.h
(_dbus_connection_read_write_dispatch): make static
/external/dbus/dbus/dbus-connection.c
50f88a0322cee156a5d9737f0987e57b964606cc 07-Jul-2006 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
/external/dbus/dbus/dbus-connection.c
bed69341bb0e0e087bd7429413c32185916feef4 23-Apr-2006 Thiago Macieira <thiago@kde.org> * dbus/dbus-connection.c: Interfaces are optional in method
calls, so don't give up if the interface parameter is NULL.
Patch reviewed by Havoc Pennington.
/external/dbus/dbus/dbus-connection.c
fe9893510411baff9cb700bea3d37fd19312d02f 19-Apr-2006 John (J5) Palmieri <johnp@redhat.com> 2006-04-19 John (J5) Palmieri <johnp@redhat.com>

* dbus/dbus-connection.c: Fix asserts
Patch from Tim Moloney <t.moloney at verizon.net>
/external/dbus/dbus/dbus-connection.c
da4182fb2976608bea64d676677681fdf2cd910b 02-Mar-2006 John (J5) Palmieri <johnp@redhat.com> 2006-03-02 John (J5) Palmieri <johnp@redhat.com>

* dbus/dbus-connection.c:
(_dbus_connection_block_pending_call):
Check to see if our data has already been read off the connection
by another blocking pending call before we block in poll.
(check_for_reply_and_update_dispatch_unlocked):
Code taken from _dbus_connection_block_pending_call - checks for
an already read reply and updates the dispatch if there is one.

* test/name-test/test-pending-call-dispatch.c:
New test for making sure we don't get stuck polling a
dbus connection which has no data on the socket when
blocking out of order on two or more pending calls.
/external/dbus/dbus/dbus-connection.c
263d1dfdd40b87f62648c4c5c50e8a6472fd5322 30-Nov-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.c (dbus_connection_read_write): Add new
method for getting messages off the bus in the absence of a
mainloop. This method is much like
dbus_connection_read_write_dispatch except it does not dispatch
the messages to a registered filter function. Instead it
allows a developer to process messages by directly popping
them off the bus.
/external/dbus/dbus/dbus-connection.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/dbus/dbus-connection.c
8d2fe98783ca1747db920fa702de66a2910d3cd1 13-Oct-2005 John (J5) Palmieri <johnp@redhat.com> patches from Michael Krivoruchko <misha at sun.com>:

* dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
_dbus_connection_message_sent,
_dbus_connection_send_preallocated_unlocked_no_update,
_dbus_connection_pop_message_link_unlocked): handle the case when path
is NULL when calling _dbus_verbose

* configure.in: check for functions getpeerucred and getpeereid

* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides
support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+,
OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid).
Patch was only tested on Solaris 10 x86 so it might be issues
with other platforms (i.e. BSDs and MacOSX)
/external/dbus/dbus/dbus-connection.c
66e1cb9e68ba37980f7a90c396950be1587cdcd7 03-Oct-2005 John (J5) Palmieri <johnp@redhat.com> * bus/driver.c (bus_driver_handle_introspect): Add signals
to the introspect data. (patch from Daniel P. Berrange
<dan at berrange.com>)

* bus/dispatch.c (check_existent_ping): Add testcase for Ping

* dbus/dbus-connection.c (_dbus_connection_peer_filter,
_dbus_connection_run_builtin_filters): Changed these to
be unlock_no_update functions and call
_dbus_connection_send_unlocked_no_update instead of
dbus_connection_send to avoid locking errors.

* doc/TODO: Removed the make Ping test TODO
/external/dbus/dbus/dbus-connection.c
5e8110d79aa8c11ad76b3e77791e3e6daca0fa32 11-Sep-2005 Mark McLoughlin <mark@skynet.ie> 2005-09-11 Mark McLoughlin <mark@skynet.ie>

* test/data/auth/fallback.auth-script: we don't
retry the EXTERNAL method when we know its going
to fail anymore.

2005-09-11 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-connection-internal.h: rename
(add|remove|toggle)_(watch|timeout) to unlocked()

* dbus/dbus-connection.c: ditto.

* dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
Update some callers for the renaming.

2005-09-10 Mark McLoughlin <mark@skynet.ie>

* dbus/dbus-auth.c: (record_mechanisms): don't
retry the first auth mechanism because we know
we're just going to get rejected again.

* dbus/dbus-keyring.c: (_dbus_keyring_reload):
Fix thinko ... and what a nasty little bugger to
track down you were ...

* dbus/dbus-connection.c:
(_dbus_connection_add_watch),
(_dbus_connection_remove_watch): add note about
these needing the connection to be locked.
(_dbus_connection_get_dispatch_status_unlocked):
set status to DATA_REMAINS when we queue the
disconnected message.

* bus/dispatch.c:
(bus_dispatch): fix warning.
(check_existent_service_no_auto_start):
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.
/external/dbus/dbus/dbus-connection.c
56252321966244025e3fbbf0d82775acc5fd96de 26-Aug-2005 Harald Fernengel <harry@kdevelop.org> fixed two typos in API docs
/external/dbus/dbus/dbus-connection.c
6e4af28a9b1ea6797dcdb8679ac7d081c708861f 29-Jul-2005 Ross Burton <ross@openedhand.com> Remove unused condvar
/external/dbus/dbus/dbus-connection.c
6043a0be440c916d6e78463c7e850d9b172b8d6f 15-Jun-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
(_dbus_connection_run_builtin_filters): New method
(dbus_connection_dispatch): Run the builtin filters which in turn
runs the peer filter which handles Ping messages.

* doc/TODO:
- Ping isn't handled: This patch fixes it

- Add a test case for the Ping message: added TODO item
/external/dbus/dbus/dbus-connection.c
982de71850996f01c244429809ba23f715353ea3 06-Jun-2005 David Zeuthen <davidz@redhat.com> 2005-06-06 David Zeuthen <davidz@redhat.com>

* doc/TODO: Add item about need to remove deprecated functions.

* dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect

* dbus/dbus-connection.c (dbus_connection_disconnect): New function
to repair the ABI which was broken with the last commit.
/external/dbus/dbus/dbus-connection.c
11fd3b965f9c8dc062913d82d6a2cf73b6ba0bda 02-Jun-2005 John (J5) Palmieri <johnp@redhat.com> * dbus/dbus-connection.c, dbus/dbus-connection.h
(dbus_connection_disconnect): renamed to dbus_connection_close
for API symmetry with dbus_connection_open
(_dbus_connection_open_internal):
s/dbus_connection_disconnect/dbus_connection_close

* dbus/dbus-bus.c (dbus_bus_get):
s/dbus_connection_disconnect/dbus_connection_close

* bus/connection.c (bus_connections_unref,
bus_connections_setup_connection, bus_connections_expire_incomplete):
s/dbus_connection_disconnect/dbus_connection_close

* bus/dispatch.c (bus_dispatch, kill_client_connection,
kill_client_connection_unchecked, check_hello_connection):
s/dbus_connection_disconnect/dbus_connection_close

* bus/bus.c (new_connection_callback):
s/dbus_connection_disconnect/dbus_connection_close
/external/dbus/dbus/dbus-connection.c
64f3d8f67db09e0c84ed3ff009b86d0127fe82b4 24-Apr-2005 Havoc Pennington <hp@redhat.com> 2005-04-23 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
reported by Tony Houghton

* test/test-service.c (main): test
dbus_connection_get_object_path_data()

* dbus/dbus-object-tree.c (find_handler): be sure we always init
the exact_match
(_dbus_object_tree_get_user_data_unlocked): new function used by
dbus_connection_get_object_path_data()
(do_register): add assertion test for get_user_data_unlocked
(object_tree_test_iteration): more tests

* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
new function from Dan Reed to let you get the user data from
dbus_connection_register_object_path()
/external/dbus/dbus/dbus-connection.c
8475b3a8486f03935ec7afab9eab096577921b3e 10-Apr-2005 Havoc Pennington <hp@redhat.com> 2005-04-09 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning

* glib/dbus-glib-tool.c (main): fix warning

* glib/dbus-binding-tool-glib.c (generate_glue): fix warning

* dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
add a new function that can be used in simple applications that
don't have a main loop and are willing to block
/external/dbus/dbus/dbus-connection.c
3c1d2d65654f92f24d3e5c9c5b88d76a10f72822 11-Mar-2005 Joe Shaw <joeshaw@novell.com> 2005-03-11 Joe Shaw <joeshaw@novell.com>

* dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
this unref; it doesn't match up evenly in some codepaths.
(_dbus_connection_block_pending_call): Unref at every exitpoint;
this evenly matches with the ref near the top of this function.
/external/dbus/dbus/dbus-connection.c
d96c9e465abb291cb943a1b4ec3643de4b3f6423 08-Mar-2005 Joe Shaw <joeshaw@novell.com> 2005-03-08 Joe Shaw <joeshaw@novell.com>

* dbus/dbus-connection.c (dbus_connection_send_with_reply):
After we attach our pending call to the connection, unref
it. Fixes a leak.

* mono/Connection.cs (set_RawConnection): Disconnect our
filter and match callbacks from the old connection and
reconnect them to the new connection, if any.

* mono/DBusType/Array.cs: "Code" is a static member, so
don't use "this" to refer to it. Fix for stricter checking
in Mono 1.1.4.

* mono/DBusType/ObjectPath.cs (Append): Don't leak the
object path that we pass into unmanaged code.

* mono/DBusType/String.cs (Append): Don't leak the string
that we pass into unmanged code.
/external/dbus/dbus/dbus-connection.c
ee27481d7b7d6d9a4f41b7d641a2618dedf676dd 26-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-26 Havoc Pennington <hp@redhat.com>

* doc/TODO: remove the "guid" item

* test/glib/test-profile.c (no_bus_thread_func): use open_private
(with_bus_thread_func): use open_private

* dbus/dbus-connection.c (dbus_connection_open_private): new
function that works like the old dbus_connection_open()
(dbus_connection_open): now returns an existing connection if
possible

* dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
through the GUID to the transport

* dbus/dbus-server.c (_dbus_server_init_base): keep around the
GUID in hex-encoded form.

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
pass GUID argument in to the transport

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
guid argument

* dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument

* dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
/external/dbus/dbus/dbus-connection.c
cc73b3da32ff6d4bebe9013b812f2845ad282cf7 24-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-24 Havoc Pennington <hp@redhat.com>

* dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
you must disconnect before unref, since locking and other things
are screwed up otherwise. Fix assorted other locking stuff.

* dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
fix compilation

* dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
into a private header and don't export from the library

* throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
/external/dbus/dbus/dbus-connection.c
248895207dc15914ac7970a6d1431308075dca1d 17-Feb-2005 Colin Walters <walters@verbum.org> 2005-02-17 Colin Walters <walters@verbum.org>

* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
Rename to DBUS_SERVICE_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
DBUS_INTERFACE_INTROSPECTABLE.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
DBUS_INTERFACE_PROPERTIES.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
DBUS_INTERFACE_PEER.
(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
DBUS_INTERFACE_LOCAL.

All other users of those constants have been changed.

* bus/driver.c (bus_driver_handle_introspect): Use constants.

* glib/dbus-gobject.c (handle_introspect): Use constants.

* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
/external/dbus/dbus/dbus-connection.c
9e4450872a6861bd93a01dabe14d2d16f6c84d3f 16-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-15 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_dispatch): always
complete a pending call, don't run filters first.

* glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
dbus_pending_call_steal_reply

* dbus/dbus-pending-call.c (dbus_pending_call_block): just call
_dbus_connection_block_pending_call
(dbus_pending_call_get_reply): change to steal_reply and return a
ref

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): port to work in terms
of DBusPendingCall
(_dbus_connection_block_pending_call): replace block_for_reply
with this
/external/dbus/dbus/dbus-connection.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-connection.c
770dfe057125f2061772cbb810ff6849cbb3d93c 13-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
(_dbus_connection_release_dispatch)
(_dbus_connection_acquire_io_path)
(_dbus_connection_release_io_path): make the mutex and condvar
control access to the "acquired" flag. Drop the connection lock
while waiting on the condvar. Hopefully these are baby steps in
roughly the right direction.
/external/dbus/dbus/dbus-connection.c
46ee60868d98a01df7c2d879a5349673f72c1757 13-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c: use separate mutexes for the condition
variables; this is some kind of baseline for sanity, but the
condition variables still aren't used correctly afaict
/external/dbus/dbus/dbus-connection.c
f349e6b8c50ea6faa48c8261198cf1b07bf59a79 13-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
fix a double-unlock

* dbus/dbus-connection.c
(_dbus_connection_detach_pending_call_unlocked): add this

Initial semi-correct pass through to fix thread locking; there are
still some issues with the condition variable paths I'm pretty
sure

* dbus/dbus-server.c: add a mutex on DBusServer and appropriate
lock/unlock calls

* dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
rename to add _unlocked
(struct DBusConnection): move "dispatch_acquired" and
"io_path_acquired" to use only one bit each.
(CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
(dbus_connection_set_watch_functions): hacky fix to reentrancy
(_dbus_connection_add_watch, _dbus_connection_remove_watch)
(_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
(_dbus_connection_remove_timeout)
(_dbus_connection_toggle_timeout): drop lock when calling out to
user functions; done in a hacky/bad way.
(_dbus_connection_send_and_unlock): add a missing unlock
(_dbus_connection_block_for_reply): add a missing unlock

* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
drop lock in a hacky probably unsafe way to call out to user
function
/external/dbus/dbus/dbus-connection.c
df0c6408805341f1ac673430ce6e92f352a473e6 11-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-10 Havoc Pennington <hp@redhat.com>

* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
change to be _and_unlock instead of _unlocked

* dbus/dbus-connection.c
(_dbus_connection_send_preallocated_unlocked_no_update): rename to
have no_update so we can find this bug quickly in future
/external/dbus/dbus/dbus-connection.c
fd146b370dd2e014838c08ce0bfc8854ca93928b 11-Feb-2005 Joe Shaw <joeshaw@novell.com> 2005-02-10 Joe Shaw <joeshaw@novell.com>

* dbus/dbus-connection.c
(_dbus_connection_queue_received_message_link,
_dbus_connection_message_sent): Add the path to
the verbose output.
(_dbus_connection_send_preallocated_and_unlock): Added. Calls
_dbus_connection_send_preallocated_unlocked(), updated the
dispatch status, and unlocks. Fixes a bug where certain
situations (like a broken pipe) could cause a Disconnect message
to not be sent, tricking the bus into thinking a service was still
there when the process had quit.
(_dbus_connection_send_preallocated): Call
_dbus_connection_send_preallocated_and_unlock().
(_dbus_connection_send_and_unlock): Added. Calls
_dbus_connection_send_preallocated_and_unlock().
(dbus_connection_send): Call _dbus_connection_send_and_unlock().
(dbus_connection_send_with_reply): Update the dispatch status and
unlock.

* mono/Service.cs (~Service): Added. Removes the filter so that
we don't get unmanaged code calling back into a GCed delegate.
(RemoveFilter); Added.
/external/dbus/dbus/dbus-connection.c
98ad8a8ec6626f7f5c78915b6bdf2be688b4839f 30-Jan-2005 Havoc Pennington <hp@redhat.com> 2005-01-30 Havoc Pennington <hp@redhat.com>

* glib/dbus-gobject.c (introspect_properties): fix the XML
generated

* dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
which effectively detects the use of freed messages

* glib/dbus-gobject.c (handle_introspect): modify and return the
reply message instead of the incoming message

* dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
gee, maybe it should SEND THE XML instead of just making a string
and freeing it again ;-)

* tools/dbus-print-message.c (print_message): improve printing of
messages

* configure.in: add debug-glib.service to the output
/external/dbus/dbus/dbus-connection.c
737479031f51b00020b6020f8780137bb4a3de1b 24-Jan-2005 Joe Shaw <joeshaw@novell.com> 2005-01-24 Joe Shaw <joeshaw@novell.com>

* dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
signature for the method that can't be found.

* dbus/dbus-message.c (dbus_message_iter_init): To check to see if
the message has any arguments, we need to call
_dbus_type_reader_get_current_type(), not
_dbus_type_reader_has_next().
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
ac4d2cb4642cfb2f56b260b1892d092022efc257 11-Jan-2005 Joe Shaw <joeshaw@novell.com> 2005-01-11 Joe Shaw <joeshaw@novell.com>

Patch from Timo Teräs <ext-timo.teras@nokia.com>

* dbus/dbus-connection.c
(_dbus_connection_queue_received_message_link): Call
_dbus_connection_remove_timeout() instead of the _locked()
variant, since it's always called from
_dbus_connection_handle_watch(), which handles the locking.
Removed the _locked() variant since it's no longer used.
/external/dbus/dbus/dbus-connection.c
b60c835d346b7e214e627abd8e0cdf06932313a7 27-Nov-2004 Havoc Pennington <hp@redhat.com> 2004-11-27 Havoc Pennington <hp@redhat.com>

* dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
are disabled
(_dbus_string_get_const_data): inline when asserts are disabled

* dbus/dbus-message.c: record the _dbus_current_generation of
creation so we can complain if dbus_shutdown() is used improperly.
Do this only if checks are enabled.

* dbus/dbus-connection.c: ditto
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
1e9b185b0c274ef0d684b1e43418388225321e72 30-Jul-2004 Havoc Pennington <hp@redhat.com> 2004-07-24 Havoc Pennington <hp@redhat.com>

SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>

* bus/selinux.c, bus/selinux.h: new file encapsulating selinux
functionality

* configure.in: add --enable-selinux

* bus/policy.c (bus_policy_merge): add FIXME to a comment

* bus/main.c (main): initialize and shut down selinux

* bus/connection.c: store SELinux ID on each connection, to avoid
repeated getting of the string context and converting it into
an ID

* bus/bus.c (bus_context_get_policy): new accessor, though it
isn't used
(bus_context_check_security_policy): check whether the security
context of sender connection can send to the security context of
recipient connection

* bus/config-parser.c: add parsing for <selinux> and <associate>

* dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
implement dbus_connection_get_unix_fd()

* dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
function, used by the selinux stuff
/external/dbus/dbus/dbus-connection.c
c9c0adce43caa00345ad2aeb55822eabde523c2c 19-Jul-2004 David Zeuthen <davidz@redhat.com> 2004-07-19 David Zeuthen <david@fubar.dk>

* dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN

* bus/dispatch.c:
(check_get_connection_unix_user): Debug says GetProperty; but the
method is called GetConnectionUnixUser
(check_get_connection_unix_process_id): New function
(bus_dispatch_test): Actually call check_get_connection_unix_user();
also call check_get_connection_unix_process_id()

* bus/driver.c:
(bus_driver_handle_get_connection_unix_process_id): New function,
handles GetConnectionUnixProcessID on the org.freedesktop.DBus
interface

* dbus/dbus-auth.c:
(handle_server_data_external_mech): Set pid from the credentials
obtained from the socket

* dbus/dbus-connection.c:
(dbus_connection_get_unix_process_id): New function

* dbus/dbus-connection.h:
Add prototype for dbus_connection_get_unix_process_id

* dbus/dbus-transport.c:
(_dbus_transport_get_unix_process_id): New function

* dbus/dbus-transport.h:
Add prototype for _dbus_transport_get_unix_process_id
/external/dbus/dbus/dbus-connection.c
961e6ca41c1e9433055130569ce3492866e2126b 20-Jun-2004 Havoc Pennington <hp@redhat.com> 2004-06-20 Havoc Pennington <hp@redhat.com>

* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
codes from the dbus error names

* glib/dbus-glib.h: move to subdir dbus/ since it's included
as dbus/dbus-glib.h and that breakage is now visible due to
including dbus/dbus-glib.h in dbus-glib-lowlevel.h

* glib/dbus-glib.h: s/gproxy/g_proxy/

* dbus/dbus-shared.h: new header to hold stuff shared with
binding APIs

* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
than dbus-errors.h

* glib/dbus-glib.h (dbus_set_g_error): move to
dbus-glib-lowlevel.h

* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
of stuff to enable this

* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here

* a bunch of other changes with the same basic "separate glib
bindings from dbus.h" theme
/external/dbus/dbus/dbus-connection.c
96f6740f2fbc16c7ee220d3d5abdc94e22da78f3 05-Jun-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>

* dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
registration functions take the path argument as char* instead of
char**.

* dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
split off the path decompostion part of
_dbus_demarshal_object_path. Some misc. fixes to silence compiler
warnings.

* glib/dbus-gobject.c, test/test-service.c: update accordingly.
/external/dbus/dbus/dbus-connection.c
91605d6899e8f21a6adf7f2fc87cfe07d399875f 17-May-2004 Olivier Andrieu <oliv__a@users.sourceforge.net> 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>

* dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
leak.
/external/dbus/dbus/dbus-connection.c
004b37eca4ed9a33269d4850525a0e1c2f5deaff 29-Mar-2004 Michael Meeks <michael@ximian.com> 2004-03-29 Michael Meeks <michael@ximian.com>

* dbus/dbus-message.c
(dbus_message_new_error_printf): impl.

* dbus/dbus-connection.c
(dbus_connection_unregister_object_path): fix warning.

* configure.in: fix no-mono-installed situation.
/external/dbus/dbus/dbus-connection.c
a221eefadfb48488129dedca2f2dc062e1c718e7 27-Mar-2004 Havoc Pennington <hp@redhat.com> 2004-03-27 Havoc Pennington <hp@redhat.com>

Patch from Timo Teräs:

* tools/dbus-send.c (main): if --print-reply, assume type is
method call; support boolean type args

* dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
bunch of memleak and logic bugs
/external/dbus/dbus/dbus-connection.c
387510da641d1b91cd5369e292e6203e376da1a2 08-Mar-2004 Michael Meeks <michael@ximian.com> 2004-03-08 Michael Meeks <michael@ximian.com>

* dbus/dbus-connection.c (_dbus_connection_block_for_reply):
bail immediately if disconnected, to avoid busy loop.
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
a63411cb3d101cef3e3fa5061001733b26d58fe1 26-Oct-2003 Havoc Pennington <hp@redhat.com> 2003-10-26 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c: fix docs to properly describe the
disconnected message
(_dbus_connection_notify_disconnected): remove this function;
we can't synchronously add the disconnected message, we have to
do it after we've queued any remaining real messages
(_dbus_connection_get_dispatch_status_unlocked): queue the
disconnect message only if the transport has finished queueing all
its real messages and is disconnected.
(dbus_connection_disconnect): update the dispatch status here
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
25cb861980003f81eade8707bfa1a61c9ece1779 22-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-21 Havoc Pennington <hp@pobox.com>

* dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
by default for message bus connections.

* dbus/dbus-connection.c (dbus_connection_dispatch): exit if
exit_on_disconnect flag is set and we process the disconnected
signal.
(dbus_connection_set_exit_on_disconnect): new function
/external/dbus/dbus/dbus-connection.c
583994cb3b7f5562fb7b8c37b4cb0d5af78e4ce2 17-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-15 Havoc Pennington <hp@pobox.com>

* dbus/dbus-pending-call.c: add the get/set object data
boilerplate as for DBusConnection, etc. Use generic object data
for the notify callback.

* glib/dbus-gparser.c (parse_node): parse child nodes

* tools/dbus-viewer.c: more hacking on the dbus-viewer

* glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
contain functions shared between the convenience lib and the
installed lib

* glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
-export-symbols-regex to the GLib library

* dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
fix the locking in here, and add a default handler for
Introspect() that just returns sub-nodes.

2003-09-14 Havoc Pennington <hp@pobox.com>

* glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
rather than gfoo consistent

* glib/dbus-gproxy.h: delete for now, move contents to
dbus-glib.h, because the include files don't work right since we
aren't in the dbus/ subdir.

* glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
(dbus_gproxy_end_call): finish
(dbus_gproxy_begin_call): finish

* glib/dbus-gmain.c (dbus_set_g_error): new

* glib/dbus-gobject.c (handle_introspect): include information
about child nodes in the introspection

* dbus/dbus-connection.c (dbus_connection_list_registered): new
function to help in implementation of introspection

* dbus/dbus-object-tree.c
(_dbus_object_tree_list_registered_and_unlock): new function

2003-09-12 Havoc Pennington <hp@pobox.com>

* glib/dbus-gidl.h: add common base class for all the foo_info
types

* tools/dbus-viewer.c: add GTK-based introspection UI thingy
similar to kdcop

* test/Makefile.am: try test srcdir -ef . in addition to test
srcdir = ., one of them should work (yeah lame)

* glib/Makefile.am: build the "idl" parser stuff as a convenience
library

* glib/dbus-gparser.h: make description_load routines return
NodeInfo* not Parser*

* Makefile.am (SUBDIRS): build test dir after all library dirs

* configure.in: add GTK+ detection
/external/dbus/dbus/dbus-connection.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-connection.c
666fe95480c14d7cbf5143b1a4e1bf0558403d4d 06-Sep-2003 Havoc Pennington <hp@redhat.com> 2003-09-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_register_fallback): add this
(dbus_connection_register_object_path): make this not handle
messages to paths below the given path
/external/dbus/dbus/dbus-connection.c
1dd3f1788f1b4c9af2f4fa744abdb7892d0a14b9 31-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-30 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c: purge DBusMessageHandler

* dbus/dbus-message-handler.c: remove DBusMessageHandler, just
use callbacks everywhere
/external/dbus/dbus/dbus-connection.c
5fd1e389e1c1c12ad4a55c2af6abdc8e7a2f6d41 31-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-30 Havoc Pennington <hp@pobox.com>

* test/data/valid-config-files/system.d/test.conf: change to
root for the user so warnings don't get printed

* dbus/dbus-message.c: add dbus_message_get_path,
dbus_message_set_path

* dbus/dbus-object-tree.c (do_test_dispatch): add test of
dispatching to a path

* dbus/dbus-string.c (_dbus_string_validate_path): add

* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
(_dbus_marshal_object_path): implement

* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
to contain the path to the target object
(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
/external/dbus/dbus/dbus-connection.c
8d38a2e2c5dc95de992c4d856ec1b0c0948bca3e 29-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-28 Havoc Pennington <hp@pobox.com>

purge DBusObjectID

* dbus/dbus-connection.c: port to no ObjectID, create a
DBusObjectTree, rename ObjectTree to ObjectPath in public API

* dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
everything except UnregisterFunction and MessageFunction

* dbus/dbus-marshal.c: port away from DBusObjectID,
add DBUS_TYPE_OBJECT_PATH

* dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
dbus/dbus-objectid.[hc]: remove these, we are moving to
path-based object IDs
/external/dbus/dbus/dbus-connection.c
68a3c593b9e77b33614726363c7b6fd85d113021 19-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-18 Havoc Pennington <hp@redhat.com>

* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix

* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
dumb bug created earlier (wrong order of args to
decode_header_data())

* tools/dbus-send.c: port

* tools/dbus-print-message.c (print_message): port

* test/data/*messages: port all messages over

* dbus/dbus-message-builder.c: support including
message type

* bus/driver.c: port over

* bus/dispatch.c: port over to new stuff

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
rename disconnect signal to "Disconnected"
/external/dbus/dbus/dbus-connection.c
95717a938b237d12211935f6a7467ef610288fe5 18-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-17 Havoc Pennington <hp@pobox.com>

This doesn't compile yet, but syncing up so I can hack on it from
work. What are branches for if not broken code? ;-)

* dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
DBUS_HEADER_FIELD_ERROR_NAME

* dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
for the interface+member pairs
(string_hash): change to use g_str_hash algorithm
(find_direct_function, find_string_function): refactor these to
share most code.

* dbus/dbus-message.c: port all of this over to support
interface/member fields instead of name field

* dbus/dbus-object-registry.c: port over

* dbus/dbus-string.c (_dbus_string_validate_interface): rename
from _dbus_string_validate_name

* bus/dbus-daemon-1.1: change file format for the
<deny>/<allow> stuff to match new message naming scheme

* bus/policy.c: port over

* bus/config-parser.c: parse new format
/external/dbus/dbus/dbus-connection.c
a1b0bd33408f03894987ac32b4e6b46c6a15a594 16-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-15 Havoc Pennington <hp@redhat.com>

* dbus/dbus-pending-call.c (dbus_pending_call_block): implement

* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): factor out internals;
change to convert any error replies to DBusError instead of
returning them as a message
/external/dbus/dbus/dbus-connection.c
ef614207fc4f03e5cc02faeb109f739eb1ccdf31 15-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-15 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c,
dbus/dbus-pending-call.c: Finish the pending call stuff
/external/dbus/dbus/dbus-connection.c
1d1b0f20a467cf1cbdcaf81fbad3a111bcff6c48 12-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-12 Havoc Pennington <hp@pobox.com>

* bus/dispatch.c (bus_dispatch): make this return proper
DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD

* dbus/dbus-errors.c (dbus_set_error): use
_dbus_string_append_printf_valist

* dbus/dbus-string.c (_dbus_string_append_printf_valist)
(_dbus_string_append_printf): new

* dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
UNKNOWN_METHOD

* dbus/dbus-connection.c (dbus_connection_dispatch): handle
DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
message is unhandled.
/external/dbus/dbus/dbus-connection.c
5c1a8e44903bd1dedc8cbefad78b0c8b61daada5 12-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-11 Havoc Pennington <hp@pobox.com>

* bus/test.c (client_disconnect_handler): change to return
HANDLED (would have been REMOVE_MESSAGE)

* dbus/dbus-object.h (enum DBusHandlerResult): rename to
HANDLED/NOT_YET_HANDLED instead of
REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
should be used.
/external/dbus/dbus/dbus-connection.c
b29ea9115ea3277354b7ccbe442026279220f4ac 11-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-10 Havoc Pennington <hp@pobox.com>

* tools/dbus-send.c (main): add --type argument, for now
supporting only method_call and signal types.

* tools/dbus-print-message.c: print message type

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
init connection->objects

* doc/dbus-specification.sgml: fix sgml

* bus/*.c: port over to object-instance API changes

* test/test-service.c: ditto

* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
name, we will have to fix up the rest of the code to also handle
this
(dbus_message_new): generic message-creation call
(set_string_field): allow appending name field
/external/dbus/dbus/dbus-connection.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-connection.c
9c5d01f0fe1ba855c0f7518c4f27d75a609b8faa 02-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
implement

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

* doc/dbus-specification.sgml: add "type" byte to messages
/external/dbus/dbus/dbus-connection.c
fe195a911d86d0a71349988360de65cfac1b3f86 02-Aug-2003 Havoc Pennington <hp@redhat.com> 2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
a message type enum to distinguish kinds of message
(DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
that need not be replied to

2003-08-01 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.c: adapt to DBusObjectID changes
(unpack_8_octets): fix no-64-bit-int bug

* dbus/dbus-object-registry.c (validate_id): validate the
connection ID bits, not just the instance ID.

* dbus/dbus-connection.c (_dbus_connection_init_id): initialize
the connection-global 33 bits of the object ID

* dbus/dbus-object-registry.c (info_from_entry): fill in
object ID in the new way

* dbus/dbus-objectid.h: rather than high/low bits, specifically
define server/client/instance bits.
/external/dbus/dbus/dbus-connection.c
8b7fe6f99dd35f32443a4e23466c8a1e4cfaa32b 17-Jul-2003 Havoc Pennington <hp@redhat.com> 2003-07-13 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.h (struct DBusObjectVTable): add padding
fields to DBusObjectVTable and DBusObjectInfo
/external/dbus/dbus/dbus-connection.c
f1ee877d76000920e6dbec1b59be1ffab39d2c81 12-Jul-2003 Havoc Pennington <hp@redhat.com> 2003-07-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object-registry.c: implement unit test,
fix bugs discovered in process

* dbus/dbus-connection.c: remove handler_table and
register_handler(), add DBusObjectRegistry usage

* dbus/dbus-objectid.c (dbus_object_id_is_null)
(dbus_object_id_set_null): new functions
/external/dbus/dbus/dbus-connection.c
824d4a5edfe1fa7222ab5cb49928bf78a675b563 09-Jul-2003 Havoc Pennington <hp@redhat.com> 2003-07-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.c: implement some of this

* dbus/dbus-object-registry.c
(_dbus_object_registry_add_and_unlock): fill in the object_id out
param
(_dbus_object_registry_new): handle OOM
/external/dbus/dbus/dbus-connection.c
d8abf955f5bff3e83cabd267883039f7a42c98c3 08-Jul-2003 Havoc Pennington <hp@redhat.com> 2003-07-08 Havoc Pennington <hp@pobox.com>

* dbus/dbus-object.h: sketch out an API for registering objects
with a connection, that allows us to use as little as 24 bytes
per object and lets application code represent an object in
any conceivable way.

* dbus/dbus-object-registry.c: implement the hard bits of the
DBusConnection aspect of object API. Not yet wired up.
/external/dbus/dbus/dbus-connection.c
6843ad31769c088ca259020fd9ea8dfb3a51f68e 22-Jun-2003 Havoc Pennington <hp@redhat.com> 2003-06-22 Havoc Pennington <hp@pobox.com>

* dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
(_dbus_data_slot_allocator_alloc): rework these to keep a
reference count on each slot and automatically manage a global
slot ID variable passed in by address

* bus/bus.c: convert to new dataslot API

* dbus/dbus-bus.c: convert to new dataslot API

* dbus/dbus-connection.c: convert to new dataslot API

* dbus/dbus-server.c: convert to new dataslot API

* glib/dbus-gmain.c: ditto

* bus/test.c: ditto

* bus/connection.c: ditto
/external/dbus/dbus/dbus-connection.c
306eab3e3d998472ad111146a12b7697ea96c9b9 16-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c: disable verbose lock spew

* tools/dbus-send.c: add --print-reply command line option

* tools/dbus-print-message.h (print_message): new util function
shared by dbus-send and dbus-monitor

* tools/dbus-monitor.c (handler_func): exit on disconnect

* dbus/dbus-transport-unix.c (do_reading): if the transport is
disconnected, don't try to use the read_watch

* dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
so we can find this bug more easily
/external/dbus/dbus/dbus-connection.c
d4e80132af03363a2f861cfd611847ee8758aed9 12-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-11 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
calling _dbus_marshal_validate_arg() for every byte in a byte
array, etc.

* dbus/dbus-message-handler.c: use atomic reference counting to
reduce number of locks slightly; the global lock in here sucks

* dbus/dbus-connection.c
(_dbus_connection_update_dispatch_status_and_unlock): variant of
update_dispatch_status that can be called with lock held; then use
in a couple places to reduce locking/unlocking
(dbus_connection_send): hold the lock over the whole function
instead of acquiring it twice.

* dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM

* bus/connection.c (bus_connections_setup_connection): fix access
to already-freed memory.

* dbus/dbus-connection.c: keep a little cache of linked list
nodes, to avoid using the global linked list alloc lock in the
normal send-message case. Instead we just use the connection lock
that we already have to take.

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

* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
change to use a struct for the atomic type; fix docs,
they return value before increment, not after increment.

* dbus/dbus-string.c (_dbus_string_append_4_aligned)
(_dbus_string_append_8_aligned): new functions to try to
microoptimize this operation.
(reallocate_for_length): break this out of set_length(), to
improve profile info, and also so we can consider inlining the
set_length() part.

* dbus/dbus-message.c (dbus_message_new_empty_header): init data
strings with some preallocation, cuts down on our calls to realloc
a fair bit. Though if we can get the "move entire string to empty
string" optimization below to kick in here, it would be better.

* dbus/dbus-string.c (_dbus_string_move): just call
_dbus_string_move_len
(_dbus_string_move_len): add a special case for moving
an entire string into an empty string; we can just
swap the string data instead of doing any reallocs.
(_dbus_string_init_preallocated): new function
/external/dbus/dbus/dbus-connection.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-connection.c
d1c7eefb66483c3ea4d9e7fb6dca23dcfac8cad5 05-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-04 Havoc Pennington <hp@pobox.com>

* dbus/dbus-message-handler.c (_dbus_message_handler_test): add
unit test

* dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
function, which assumed length was in # of strings, not bytes

* dbus/dbus-message.c (_dbus_message_test): add tests for some
missing coverage

* dbus/dbus-connection.c
(_dbus_connection_queue_received_message): disable function for
now, we are only using it in test mode

* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
remove a mistaken FIXME
/external/dbus/dbus/dbus-connection.c
3d0dcbf536601e39d3d5125ed29f5afa217c9bf6 05-May-2003 Havoc Pennington <hp@redhat.com> 2003-05-04 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_preallocate_send):
unlock mutex on successful return, patch from Anders Gustafsson
/external/dbus/dbus/dbus-connection.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-connection.c
1820f3bd0a5a4b0ab14dbcc80ba1b68d2c48e01d 24-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-24 Havoc Pennington <hp@redhat.com>

* bus/dispatch.c: somehow missed some name_is

* dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
(_dbus_timeout_set_interval): new

* bus/connection.c (bus_connections_setup_connection): record time
when each connection is first set up, and expire them after the
auth timeout passes.
/external/dbus/dbus/dbus-connection.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-connection.c
b3a3969897930eeda308113acbbb3f98069ee1ab 22-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-22 Havoc Pennington <hp@redhat.com>

* test/data/valid-messages/opposite-endian.message: fix test
to use proper type for rply field

* test/data/invalid-messages: add tests for below validation

* dbus/dbus-message.c (decode_header_data): validate field types,
and validate that named fields are valid names
(decode_name_field): consider messages in the
org.freedesktop.Local. namespace to be invalid.

* dbus/dbus-string.c (_dbus_string_validate_name): new
/external/dbus/dbus/dbus-connection.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-connection.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/dbus/dbus-connection.c
dac0a1f8933889fd94fed7fecdcc4ec6fb3a3fb0 17-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-16 Havoc Pennington <hp@pobox.com>

* doc/dbus-specification.sgml: make spec say serials are unsigned

* dbus/dbus-message.h: change message serials to unsigned

* dbus/dbus-connection.c: adapt to message serials being unsigned
/external/dbus/dbus/dbus-connection.c
4b45f17965f3262eb9b3bb49c015af79781c6882 17-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
list of size counters
(_dbus_message_loader_putback_message_link): put back a popped link

* dbus/dbus-connection.c
(dbus_connection_set_max_live_messages_size): rename
max_received_size
(dbus_connection_get_outgoing_size): get size of outgoing
queue
(_dbus_connection_set_connection_counter): remove this cruft
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
6be547d32f018c23ba56426a0bccd08baa2cf440 11-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-10 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_flush): don't spin on
the connection if it's disconnected

* bus/activation.c (bus_activation_service_created): use new
transaction features to roll back removal of pending activation if
we don't successfully create the service after all. Don't remove
pending activation if the function fails.

* dbus/dbus-list.c (_dbus_list_insert_before_link)
(_dbus_list_insert_after_link): new code to facilitate
services.c fixes

* dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
new functionality, so we can preallocate the ability to insert
into a hash table.

* bus/connection.c (bus_transaction_add_cancel_hook): new function
allowing us to put custom hooks in a transaction to be used for
cancelling said transaction

* doc/dbus-specification.sgml: add some discussion of secondary
service owners, and disallow zero-length service names

* bus/services.c (bus_registry_acquire_service): new function,
splits out part of bus_driver_handle_acquire_service() and fixes
a bug where we didn't remove the service doing the acquiring
from the secondary queue if we failed to remove the current owner
from the front of the queue.
/external/dbus/dbus/dbus-connection.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-connection.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-connection.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-connection.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/dbus/dbus-connection.c
bc8b061eec0fd9de6552a9e6118c40283863b6dc 06-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-threads.c: Redo how the fake debug mutexes are done
so it detects deadlocks and also we actually init threads when
debugging.
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c
a26607ab68bf0878f23d2dbddec781b4b760d034 23-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-23 Havoc Pennington <hp@pobox.com>

* bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
policies code

* dbus/dbus-hash.h: add ULONG hash keys

* dbus/dbus-sysdeps.c (_dbus_get_groups): new
(_dbus_get_group_id): new function
/external/dbus/dbus/dbus-connection.c
b6ffea177fccb6cc4e65992da7d8b390054277f7 21-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-20 Havoc Pennington <hp@redhat.com>

* dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
new function
(dbus_connection_get_unix_user): new function
/external/dbus/dbus/dbus-connection.c
f7c24715b5489b28b47499eb252b941b735fa1bc 17-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-17 Havoc Pennington <hp@pobox.com>

All tests pass, no memleaks, no valgrind complaints.

* bus/test.c: refcount handler_slot

* bus/connection.c (bus_connections_new): refcount
connection_data_slot

* dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
bytes so that auth scripts pass.

* bus/dispatch.c: init message_handler_slot so it gets allocated
properly

* bus/dispatch.c (message_handler_slot_ref): fix memleak

* dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
dealloc server_pipe_hash when no longer used for benefit of
leak checking

* dbus/dbus-auth.c (process_command): memleak fix

* bus/dispatch.c (check_hello_message): memleak fix
/external/dbus/dbus/dbus-connection.c
15f02e1071ab14a7bc937cb61a4439a69c14f1a5 17-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
/external/dbus/dbus/dbus-connection.c
b4a1100f4f81534e2aac0141afda750f318223d4 17-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
the watch

* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
add some missing dbus_set_result

* bus/dispatch.c (bus_dispatch_add_connection): handle failure to
alloc the DBusMessageHandler

* dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
the transport here, since we call this from the finalizer; it
resulted in a double-finalize.

* dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
where we tried to use transport->connection that was NULL,
happened when transport was disconnected early on due to OOM

* bus/*.c: adapt to handle OOM for watches/timeouts

* dbus/dbus-transport-unix.c: port to handle OOM during
watch handling

* dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
reference to unused bytes instead of a copy

* dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
out of memory

* dbus/dbus-connection.c (dbus_connection_handle_watch): return
FALSE on OOM

* dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
of memory
/external/dbus/dbus/dbus-connection.c
3f4086f0fdd1cc7fc03585ec9f750897fb3c1d55 16-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-16 Anders Carlsson <andersca@codefactory.se>

* bus/activation.c: (bus_pending_activation_entry_free),
(bus_pending_activation_free), (bus_activation_new),
(bus_activation_unref), (bus_activation_service_created),
(bus_activation_activate_service):
* bus/activation.h:
* bus/bus.c: (bus_context_new):
* bus/desktop-file.c: (new_section):
* bus/driver.c: (bus_driver_send_service_deleted),
(bus_driver_handle_activate_service):
* bus/services.c: (bus_registry_new), (bus_registry_ensure):
* bus/services.h:
* dbus/dbus-connection.c:
(dbus_connection_send_with_reply_and_block):
* dbus/dbus-message.c: (dbus_message_append_args_valist):
* dbus/dbus-protocol.h:
Make activation work better. Now pending activations will be queued
and the daemon won't try to activate services that are already registered.
/external/dbus/dbus/dbus-connection.c
ebb57e719c32becd95a1efe3dd269c21e5a011b6 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
this. always run the test suite before commit...

* bus/*: adapt to DBusConnection API changes

* glib/dbus-gmain.c: adapt to DBusConnection API changes,
requires renaming stuff to avoid dbus_connection_dispatch name
conflict.

* dbus/dbus-transport.c (_dbus_transport_queue_messages): new
function

* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
separate from _dbus_message_loader_return_buffer()

* dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
this, because it's now always broken to use; the number of
messages in queue vs. the number still buffered by the message
loader is undefined/meaningless. Should use
dbus_connection_get_dispatch_state().
(dbus_connection_dispatch): rename from
dbus_connection_dispatch_message
/external/dbus/dbus/dbus-connection.c
e537e421ff4f092621fcd9f6b51526a017ad020c 16-Mar-2003 Anders Carlsson <andersca@codefactory.se> 2003-03-16 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c:
(dbus_connection_send_with_reply_and_block):
Decrease connection->n_incoming when removing an entry
from the list.
* dbus/dbus-dict.c: (dbus_dict_entry_free),
(dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
(dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
(dbus_dict_set_byte_array), (dbus_dict_set_string_array),
(dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
(dbus_dict_get_byte_array):
Handle NULL arrays and strings. Also add support for byte arrays.

* dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
(_dbus_marshal_dict), (_dbus_demarshal_byte_array),
(_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
(_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
(_dbus_demarshal_dict), (demarshal_and_validate_len),
(_dbus_marshal_validate_arg), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling empty arrays and strings.

* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_string_array),
(dbus_message_iter_get_boolean),
(dbus_message_iter_get_boolean_array),
(dbus_message_iter_get_int32_array),
(dbus_message_iter_get_uint32_array),
(dbus_message_iter_get_double_array),
(dbus_message_iter_get_byte_array),
(dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
(check_message_handling):
Add support for getting empty arrays and dicts.

* dbus/dbus-string.c: (_dbus_string_validate_utf8):
Don't do any validation at all for now, that's better than just checking
for ASCII.

* test/data/valid-messages/emptiness.message:
New test message with lots of empty arrays.
/external/dbus/dbus/dbus-connection.c
5c53fb2a36024c66b3aaa6d26e93a802393664b2 16-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c
(_dbus_connection_queue_received_message_link): new function that
can't fail due to OOM

* dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
new function pops a message together with a list link
containing it.

* dbus/dbus-transport-unix.c (queue_messages): use new link-based
message queuing functions to avoid needing to alloc memory
/external/dbus/dbus/dbus-connection.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-connection.c
f587ce7845edb0eb01451368d01b5bc86b5904cd 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-15 Havoc Pennington <hp@pobox.com>

Make it pass the Hello handling test including all OOM codepaths.
Now to do other messages...

* bus/services.c (bus_service_remove_owner): fix crash when
removing owner from an empty list of owners
(bus_registry_ensure): don't leave service in the list of
a connection's owned services if we fail to put the service
in the hash table.

* bus/connection.c (bus_connection_preallocate_oom_error): set
error flag on the OOM error.

* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
handle _dbus_transport_set_connection failure

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
to create watches up front and simply enable/disable them as
needed.
(unix_connection_set): this can now fail on OOM

* dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
of enabling/disabling a watch or timeout.

* bus/loop.c (bus_loop_iterate): don't touch disabled
watches/timeouts

* glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
/external/dbus/dbus/dbus-connection.c
4c95a9782c65f88e2904c44abeb734a1b00f6353 15-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-14 Havoc Pennington <hp@redhat.com>

* dbus/dbus-memory.c: add a "detect buffer overwrites on free"
cheesy hack

* dbus/dbus-transport-debug.c: rework this a good bit to be
less complicated. hopefully still works.

* dbus/dbus-server-debug.c (handle_new_client): remove timeout
manually

* glib/dbus-gmain.c (timeout_handler): don't remove timeout
after running it

* dbus/dbus-message.c (dbus_message_copy): rename from
dbus_message_new_from_message, fix it up to copy
all the message fields, add test case

* bus/dispatch.c (bus_dispatch_test): add some more test code,
not quite passing yet
/external/dbus/dbus/dbus-connection.c
f468907fb09e8198c4cce7e8f2ddeae8b5476b9e 14-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-14 Havoc Pennington <hp@pobox.com>

* bus/loop.c (bus_loop_iterate): add this so we can "run loop
until no work remains" in test code. (the large diff here
is just code movement, no actual changes)

* dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1, no point waiting around for test code.
(_dbus_server_debug_accept_transport): unref the timeout
after adding it (right?)

* dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
/external/dbus/dbus/dbus-connection.c
3bea935316ff048e68dea6a26c2e8e9fd314477f 14-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-13 Havoc Pennington <hp@redhat.com>

* dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
out of memory

* dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
of memory

* dbus/dbus-connection.h: Make AddWatchFunction and
AddTimeoutFunction return a bool so they can fail on out-of-memory

* bus/bus.c (bus_context_new): set up timeout handlers

* bus/connection.c (bus_connections_setup_connection): set up
timeout handlers

* glib/dbus-gmain.c: adapt to the fact that set_functions stuff
can fail

* bus/bus.c (bus_context_new): adapt to changes

* bus/connection.c: adapt to changes

* test/watch.c: adapt to DBusWatch changes

* bus/dispatch.c (bus_dispatch_test): started adding this but
didn't finish
/external/dbus/dbus/dbus-connection.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-connection.c
7e050c88719553d0c74e3dc68caf7bc50ae99590 05-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-04 Havoc Pennington <hp@pobox.com>

* test/data/auth/*: adapt to changes

* dbus/dbus-auth-script.c (_dbus_auth_script_run): add
USERID_BASE64 and change USERNAME_BASE64 to put in username not
userid

* dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
more stuff from being in a context name, to make the protocol
simpler to deal with

* dbus/dbus-errors.c (dbus_error_has_name): new function
(dbus_error_is_set): new function

* dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1

* dbus/dbus-connection.c (dbus_connection_flush): also read
messages during a flush operation

* dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
/external/dbus/dbus/dbus-connection.c
ff190005e5e518c1d78fd83b0da3642280ead84c 27-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-27 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply_and_block): fix doh!
doh! doh! bug that resulted in never removing a reply from the
queue, no wonder we called get_reply_serial so much ;-)

* dbus/dbus-message.c (struct DBusMessage): cache reply serial
and client serial instead of demarshaling them every time
/external/dbus/dbus/dbus-connection.c
89e6dfd29cfbdb92f15e8fb2bde76d94a4c5a7b3 26-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-26 Alexander Larsson <alexl@redhat.com>

* configure.in:
Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0

* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
Add dbus_connection_set_wakeup_main_function and use it when queueing
incoming and outgoing messages.


* dbus/dbus-dataslot.c:
Threadsafe usage of DBusDataSlotAllocator

* dbus/dbus-message.c: (dbus_message_get_args_iter):
dbus_new can fail.

* dbus/dbus-server-unix.c:
Add todo comment

* glib/dbus-gmain.c:
Implement the new wakeup functions for glib.

* glib/Makefile.am:
* glib/test-thread-client.c:
* glib/test-thread-server.c:
* glib/test-thread.h:
Initial cut at some thread test code. Not really done yet.
/external/dbus/dbus/dbus-connection.c
7265423411609c14ddb9e6643463b840afcaa09b 26-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply_and_block): fix crash
where we ref'd the outgoing message instead of the returned reply

* dbus/dbus-transport-unix.c (do_authentication): check read watch
at the end of this function, so if we didn't need to read for
authentication, we reinstall it for receiving messages

* dbus/dbus-message.c (dbus_message_new_reply): allow replies to
a NULL sender for peer-to-peer case

* dbus/dbus-transport-unix.c (check_read_watch): handle
!authenticated case correctly

* glib/dbus-gmain.c: add support for DBusServer

* dbus/dbus-server.c: add data slot support

* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
return values and handle errors

* dbus/dbus-dataslot.c: factor out the data slot stuff from
DBusConnection

* Doxyfile.in (INPUT): add glib subdir

* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
setup_with_g_main instead of hookup_with_g_main; write docs
/external/dbus/dbus/dbus-connection.c
5da911bce0310761514298444fde65d0a51ed85d 20-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-20 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-transport-unix.c (unix_do_iteration):
Unlock the connection mutex during a blocking select call.
Add todo about how we need a way to wake up the select.

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
Add _dbus_connection_lock and _dbus_connection_unlock.
/external/dbus/dbus/dbus-connection.c
c21511c01ab56d75f3aa4643761e9fd096a7f8be 19-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-19 Havoc Pennington <hp@pobox.com>

Throughout: mop up all the Doxygen warnings and undocumented
stuff.

* dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
to search any paths.

* dbus/dbus-threads.c: move global mutex initializers to
dbus-internals.h, multiple prototypes was confusing doxygen
besides being kind of ugly

* Doxyfile (PREDEFINED): have Doxygen define
DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
(do not abuse the feature! it's for stuff like the autogenerated
macros in dbus-md5.c, not just for things you don't feel like
documenting...)
/external/dbus/dbus/dbus-connection.c
8faf99b118daf0040a58981cdf24a344ff2578ca 17-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-17 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
Added todo.
/external/dbus/dbus/dbus-connection.c
b2fce4c69b9fd75c54bb370e043ea166b83083f6 16-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
backward conditional
/external/dbus/dbus/dbus-connection.c
0f323e6cad4d9b21988d431f90d9a1f051fb3144 16-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-16 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-connection.c:
Implement sent_message_with_reply. (with_reply_and block is still
busted).
Made dispatch_message not lose message if OOM.

* dbus/dbus-errors.h:
Add NoReply error (for reply timeouts).
/external/dbus/dbus/dbus-connection.c
4a8a03aeb7430a570618ffec08616c4c87c4ee73 16-Feb-2003 Havoc Pennington <hp@redhat.com> 2003-02-16 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
allow people to avoid setting SIGPIPE to SIG_IGN
(_dbus_connection_new_for_transport): disable SIGPIPE unless
we've been asked not to
/external/dbus/dbus/dbus-connection.c
fe4018941190f8bf020e4a8ed2999c212e0e113d 15-Feb-2003 Alexander Larsson <alexl@redhat.com> 2003-02-15 Alexander Larsson <alexl@redhat.com>

* dbus/dbus-threads.c:
* dbus/dbus-threads.h:
Add condvars. Remove static mutext from API.
Implement static mutexes by initializing them from threads_init.

* glib/dbus-gthread.c:
* qt/dbus-qthread.cpp:
Update with the thread api changes.


* dbus/dbus-list.c:
* dbus/dbus-list.h:
Turn StaticMutex into normal mutex + init function.
Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
_dbus_list_append_link, _dbus_list_prepend_link


* dbus/dbus-sysdeps.c:
* dbus/dbus-sysdeps.h:
New type dbus_atomic_t, and new functions _dbus_atomic_inc,
_dbus_atomic_dec. Only slow fallback implementation at the moment.

* dbus/dbus-protocol.h:
Add DBUS_MESSAGE_LOCAL_DISCONNECT define

* dbus/dbus-message.c:
Make ref/unref atomic.
Fix some docs.

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Make threadsafe.
Change _peek to _borrow,_return & _steal_borrowed.
Change disconnect callback to event.
Make dbus_connection_dispatch_messages reentrant.

* dbus/dbus-transport.c:
Don't ref the connection on calls to the transport
implementation.

* dbus/dbus-message-handler.c:
Make threadsafe.

* glib/dbus-gmain.c:
Don't use peek_message anymore

* test/Makefile.am:
* test/debug-thread.c:
* test/debug-thread.h:
Simple thread implementation that asserts() on deadlocks in
single-threaded code.

* test/bus-test.c:
(main) Call debug_threads_init.

* test/watch.c:
Use disconnect message instead of disconnect callback.

* bus/connection.c:
* bus/connection.h:
Don't call dbus_connection_set_disconnect_function. Instead export
bus_connection_disconnect.

* bus/dispatch.c:
Call bus_connection_disconnect when we get a disconnected message.
/external/dbus/dbus/dbus-connection.c
5ebb5748c2a7587c734eeed9c66f2a1fc0635d09 30-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-30 Anders Carlsson <andersca@codefactory.se>

* dbus/Makefile.am:
Add dbus-address.[ch]

* dbus/dbus-address.c: (dbus_address_entry_free),
(dbus_address_entries_free), (create_entry),
(dbus_address_entry_get_method), (dbus_address_entry_get_value),
(dbus_parse_address), (_dbus_address_test):
* dbus/dbus-address.h:
New files for dealing with address parsing.

* dbus/dbus-connection.c:
Document timeout functions.

* dbus/dbus-message.c:
Document dbus_message_new_from_message.

* dbus/dbus-server-debug.c:
Document.

* dbus/dbus-server.c: (dbus_server_listen):
Parse address and use correct server implementation.

* dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
* dbus/dbus-string.h:
New function with test.

* dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
* dbus/dbus-test.h:
Add address tests.

* dbus/dbus-transport-debug.c:
Document.

* dbus/dbus-transport.c: (_dbus_transport_open):
Parse address and use correct transport implementation.
/external/dbus/dbus/dbus-connection.c
dec1fa3bd5f106ba5b2c749372231e3dd4bf9e7b 28-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-28 Anders Carlsson <set EMAIL_ADDRESS environment variable>

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_add_timeout),
(_dbus_connection_remove_timeout):
Add functions for adding and removing timeouts.

* dbus/dbus-message.c: (dbus_message_new_from_message):
Add new function that takes a message and creates an exact
copy of it, but with the refcount set to 1.
(check_message_handling):
Fix build error.

* dbus/dbus-server-protected.h:
* dbus/dbus-server.c: (_dbus_server_init_base),
(_dbus_server_finalize_base), (_dbus_server_add_timeout),
(dbus_server_set_timeout_functions):
(_dbus_server_remove_timeout):
New functions so that a server can add and remove timeouts.

(dbus_server_listen):
Add commented out call to dbus_server_debug_new.

* dbus/dbus-timeout.c: (_dbus_timeout_new):
Actually set the handler, doh.

* dbus/dbus-transport.c: (_dbus_transport_open):
Add commented out call to dbus_transport_debug_client_new.

* dbus/Makefile.am:
Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
/external/dbus/dbus/dbus-connection.c
50c25505f62786756519ef1e194883360eda82e0 26-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-26 Havoc Pennington <hp@pobox.com>

The unit tests pass, but otherwise untested. If it breaks, the
tests should have been better. ;-)

* bus/driver.c (bus_driver_handle_hello): return if we disconnect
the connection.

* dbus/dbus-message.c: redo everything so we maintain
message->header as the only copy of the various fields.
This avoids the possibility of out-of-memory in some cases,
for example dbus_message_lock() can't run out of memory anymore,
and avoids extra copying. Figured I may as well go ahead and do
this since it was busted for dbus_message_lock to not return
failure on OOM, and dbus_message_write_header was totally
unchecked for OOM. Also fixed some random other bugs.

* dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
that strings are nul-terminated. Also, end_pos can be equal
to string length just not greater than, I think.
(_dbus_marshal_set_int32): new function
(_dbus_marshal_set_uint32): new function
(_dbus_marshal_set_string): new function

* dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
a warning, init timeout_list to NULL
(dbus_connection_send_message): don't use uninitialized variable
"serial"

* dbus/dbus-string.c (_dbus_string_replace_len): new function
/external/dbus/dbus/dbus-connection.c
42788678e83ec1d82f048f86aff04017b58f072e 26-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-26 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(dbus_connection_unref):
* dbus/dbus-marshal.c: (_dbus_marshal_test):
* dbus/dbus-message.c: (dbus_message_unref),
Plug memory leaks.

(dbus_message_get_fields):
Remove debugging printout.

(_dbus_message_loader_return_buffer):
Don't store the header string.

(_dbus_message_test):
Plug leaks.
/external/dbus/dbus/dbus-connection.c
a2a681582929ada667de5d05d5168f8a1f313800 25-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-25 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c: (dbus_connection_send_message):
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_client_serial),
(dbus_message_write_header):
Remove _dbus_messag_unlock and don't set the client serial on a
message if one already exists.
/external/dbus/dbus/dbus-connection.c
dc6a61a15b2d9cdc6504753fa9eb0a718f99d6d8 25-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-25 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c: (dbus_connection_send_message):
Unlock the message in case it was sent earlier.

(dbus_connection_send_message_with_reply_and_block):
Remove the reply message from the list.

* dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
Set array_len and new_pos correctly.

(_dbus_marshal_test):
Remove debug output.

* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_reply_serial):
New function that returns the reply serial.

(_dbus_message_unlock):
New function that unlocks a message and resets its header.

(dbus_message_append_string_array),
(dbus_message_get_fields_valist),
(dbus_message_iter_get_field_type),
(dbus_message_iter_get_string_array),
(dbus_message_get_fields),
(dbus_message_append_fields_valist):
Handle string arrays.

(dbus_message_set_sender):
Make this function public since the bus daemon needs it.

(decode_header_data):
Set the reply serial to -1 initially.

* dbus/dbus-message.h:
Add dbus_message_set_sender.
/external/dbus/dbus/dbus-connection.c
c414488fe62605ebda5e875fc2db05c6b3dd199f 22-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-22 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply_and_block): add some @todo

* bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
/external/dbus/dbus/dbus-connection.c
4a85d321b4516c6a663e8bdd530ba59018c974df 21-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-21 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection.c: (dbus_connection_send_message):
Add a new client_serial parameter.

(dbus_connection_send_message_with_reply):
Remove a @todo since we've implemented the blocking function.

(dbus_connection_send_message_with_reply_and_block):
New function that sends a message and waits for a reply and
then returns the reply.

* dbus/dbus-connection.h:
Add new functions.

* dbus/dbus-errors.c: (dbus_result_to_string):
* dbus/dbus-errors.h:
Add new DBUS_RESULT.

* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_reply_serial),
(_dbus_message_set_sender), (dbus_message_write_header),
(dbus_message_new_reply), (decode_header_data),
(_dbus_message_loader_return_buffer), (_dbus_message_test):
* dbus/dbus-message.h:
Add new functions that set the reply serial and sender.
Also marshal and demarshal them correctly and add test.

* dbus/dbus-protocol.h:
Add new DBUS_MESSAGE_TYPE_SENDER.

* glib/dbus-glib.h:
* glib/dbus-gmain.c: (watch_callback), (free_callback_data),
(add_watch), (remove_watch), (add_timeout), (remove_timeout),
(dbus_connection_hookup_with_g_main):
* glib/test-dbus-glib.c: (main):
Rewrite to use GIOChannel and remove the GSource crack.

* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Update for changed APIs
/external/dbus/dbus/dbus-connection.c
f0dbc1bdd06e1cb4f32b7fe05ee1287ae5f9df85 19-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-19 Anders Carlsson <andersca@codefactory.se>

* dbus/Makefile.am: Add dbus-timeout.[cħ]

* dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
Create a DBusTimeoutList.
(dbus_connection_set_timeout_functions): Add new function to
set timeout callbacks

* dbus/dbus-connection.h: Add public DBusTimeout API.

* dbus/dbus-message.c: (dbus_message_get_service):
* dbus/dbus-message.h: New function.

* dbus/dbus-server.c: Fix small doc typo.

* dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
/external/dbus/dbus/dbus-connection.c
14cc2707a0318381b5cc68588efc36f61d617b78 19-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-19 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
new function

* dbus/dbus-server.c (dbus_server_set_max_connections)
(dbus_server_get_max_connections, dbus_server_get_n_connections):
keep track of current number of connections, and add API for
setting a max (but haven't implemented enforcing the max yet)
/external/dbus/dbus/dbus-connection.c
502fbda2201a4e7e50d687f42af29c82e66299bb 19-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (unix_do_iteration): only do the
reading/writing if read_watch != NULL or write_watch != NULL.

* dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
the message loader code to actually load message->header and
message->body into the newly-created message.

* dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
in OOM case

* dbus/dbus-connection.c (dbus_connection_set_max_message_size)
(dbus_connection_get_max_message_size)
(dbus_connection_set_max_live_messages_size)
(dbus_connection_get_max_live_messages_size): implement some
resource limitation functions

* dbus/dbus-resources.c: new file implementing some of the
resource limits stuff

* dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
missing docs, add @todo to handle OOM etc.

* dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
docs
/external/dbus/dbus/dbus-connection.c
0363701c341796278041fb9ea7de80eaaf41479a 18-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-18 Havoc Pennington <hp@pobox.com>

* dbus/dbus-connection.c (dbus_connection_unref): disconnect the
connection if it hasn't been already.

* dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
replace with DisconnectFunction.
/external/dbus/dbus/dbus-connection.c
1b53cbcce333381754b0568b740ece550a8f6ac9 07-Jan-2003 Anders Carlsson <andersca@codefactory.se> 2003-01-07 Anders Carlsson <andersca@codefactory.se>

* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(_dbus_connection_get_next_client_serial),
(dbus_connection_send_message):
* dbus/dbus-internals.h:
* dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
(dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
(_dbus_marshal_uint32), (_dbus_demarshal_double),
(_dbus_demarshal_int32), (_dbus_demarshal_uint32),
(_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
(_dbus_verbose_bytes), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_set_client_serial),
(dbus_message_write_header), (_dbus_message_lock),
(dbus_message_new), (dbus_message_ref), (dbus_message_unref),
(dbus_message_get_name), (dbus_message_append_int32),
(dbus_message_append_uint32), (dbus_message_append_double),
(dbus_message_append_string), (dbus_message_append_byte_array),
(dbus_message_get_fields_iter), (dbus_message_iter_ref),
(dbus_message_iter_unref), (dbus_message_iter_has_next),
(dbus_message_iter_next), (dbus_message_iter_get_field_type),
(dbus_message_iter_get_string), (dbus_message_iter_get_int32),
(dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
(decode_header_data), (_dbus_message_loader_return_buffer),
(message_iter_test), (_dbus_message_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* dbus/dbus-test.c: (main):
* dbus/dbus-test.h:
* glib/test-dbus-glib.c: (message_handler), (main):
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Make messages sendable and receivable for real.
/external/dbus/dbus/dbus-connection.c
96a9f80300b7794475a5451a60a07555ea3526be 06-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-05 Havoc Pennington <hp@pobox.com>

* bus/connection.c: implement routines for handling connections,
first thing is keeping a list of owned services on each connection
and setting up watches etc.

* bus/services.c: implement a mapping from service names to lists
of connections

* dbus/dbus-hash.c: add DBUS_HASH_POINTER

* dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
to use static mutexes for global data

* dbus/dbus-connection.c (dbus_connection_set_data): add new
collection of functions to set/get application-specific data
on the DBusConnection.
/external/dbus/dbus/dbus-connection.c
b7354d91569384ba884bd3e391210019037ada2c 28-Dec-2002 Harri Porten <porten@kde.org> very basic check for Qt integration. Another proof that Qt's build
system needs more work for people using it.
I didn't want to copy all of KDEs autoconf magic so this is far from
perfect, yet. Can we use pkg-config here ?
/external/dbus/dbus/dbus-connection.c
ff5283ab92c668453fd2f28c1715a1e0e9b949f5 27-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-26 Havoc Pennington <hp@pobox.com>

* dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
doh

* dbus/dbus-marshal.c: Add macros to do int swapping in-place and
avoid swap_bytes() overhead (ignoring possible assembly stuff for
now). Main point is because I wanted unpack_uint32 to implement
_dbus_verbose_bytes
(_dbus_verbose_bytes): new function

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

* dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
mechanism to handle a corrupt message stream
(_dbus_message_loader_new): fix preallocation to only prealloc,
not prelengthen

* dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
(_dbus_string_test): enhance tests for copy/move and fix the
functions

* dbus/dbus-transport-unix.c: Hold references in more places to
avoid reentrancy problems

* dbus/dbus-transport.c: ditto

* dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
leak reference count in no-message case

* test/watch.c (do_mainloop): handle adding/removing watches
during iteration over the watches. Also, ref the connection/server
stored on a watch, so we don't try to mangle a destroyed one.

* dbus/dbus-transport-unix.c (do_authentication): perform
authentication

* dbus/dbus-auth.c (get_state): add a state
AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
(_dbus_auth_get_unused_bytes): append the unused bytes
to the passed in string, rather than prepend

* dbus/dbus-transport.c (_dbus_transport_init_base): create
the auth conversation DBusAuth

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
(_dbus_transport_new_for_domain_socket): when creating a
transport, pass in whether it's a client-side or server-side
transport so we know which DBusAuth to create
/external/dbus/dbus/dbus-connection.c
17fbe2b702cdc880abd6cbe117e620b6432f42e0 24-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-24 Havoc Pennington <hp@pobox.com>

* glib/dbus-gthread.c: fix include

* glib/dbus-glib.h: rename DBusMessageHandler for now.
I think glib API needs to change, though, as you don't
want to use DBusMessageFunction, you want to use the
DBusMessageHandler object. Probably
dbus_connection_open_with_g_main_loop()
and dbus_connection_setup_g_main_loop() or something like that
(but think of better names...) that just create a connection
that has watch/timeout functions etc. already set up.

* dbus/dbus-connection.c
(dbus_connection_send_message_with_reply): new function just to
show how the message handler helps us deal with replies.

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

* dbus/dbus-string.c (_dbus_string_test): free a string that
wasn't

* dbus/dbus-hash.c: use memory pools for the hash entries
(rebuild_table): be more paranoid about overflow, and
shrink table when we can
(_dbus_hash_test): reduce number of sprintfs and write
valid C89. Add tests for case where we grow and then
shrink the hash table.

* dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools

* dbus/dbus-connection.c (dbus_connection_register_handler)
(dbus_connection_unregister_handler): new functions

* dbus/dbus-message.c (dbus_message_get_name): new

* dbus/dbus-list.c: fix docs typo

* dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
an object representing a handler for messages.
/external/dbus/dbus/dbus-connection.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-connection.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-connection.c