History log of /external/dbus/dbus/dbus-server-unix.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dd31130a971593b5e20a1c4cb04f93c2aae90c84 25-May-2010 Lennart Poettering <lennart@poettering.net> systemd: add systemd-style socket-activation

This is a pretty straightforward implementation of systemd-style socket
activation using the reference implementation of the
$LISTEN_FDS/$LISTEN_PID env var parsing as supplied by systemd upstream.
/external/dbus/dbus/dbus-server-unix.c
dbecdeabb20e0ce11121819c63373f0afba57c58 19-Mar-2010 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Consistently include <config.h> in all C source files and never in header files.
/external/dbus/dbus/dbus-server-unix.c
5e2a99c12c7e3531d908ed4fca82caca9cb02825 21-Oct-2009 Frank Osterfeld <frank@kdab.net> The current state of the nonce-tcp implementation

Merged and cleaned up patch from my [Frank Osterfeld's] local work
branch.

Cherry-picked from commit e2801eca57b2d9e09afd662ed5ef6fc83be73afc and
edited by tml@iki.fi to make it apply, and fixing whitespace issues.
/external/dbus/dbus/dbus-server-unix.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
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-server-unix.c
89318bbeb4076d8d9de9831d69621fc1411760d3 06-May-2009 Lennart Poettering <lennart@poettering.net> cloexec: set all sockets that are created with SOCK_CLOEXEC

Since all socket users enable FD_CLOEXEC anyway we can just do that in
_dbus_open_socket() and be done with it for all cases. By side effect
this allows us to use SOCK_CLOEXEC and hence close the CLOEXEC race.
/external/dbus/dbus/dbus-server-unix.c
ee71e1ff6033ad1eb2385f11d4f3678259b8397b 25-Jul-2007 Daniel P. Berrange <dan@berrange.com> Switch over to using getaddrinfo for TCP clients & servers to enable IPv6
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.c
fe4715b656237b89767b5dc0cba4c107541b6e0d 16-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-transport.c (_dbus_transport_open): modify to delegate
to _dbus_transport_open_platform_specific,
_dbus_transport_open_socket,
and _dbus_transport_open_debug_pipe

* dbus/dbus-transport-protected.h: add _dbus_transport_open_platform_specific
/external/dbus/dbus/dbus-server-unix.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-server-unix.c
08079a5bdedd6ec91cda413983e4bd3b6ee0252d 16-Sep-2006 Havoc Pennington <hp@redhat.com> 2006-09-16 Havoc Pennington <hp@redhat.com>

* dbus/dbus-sysdeps-unix.h: small change to Peter's patch to make
dbus-sysdeps-unix-util.c build, add unix-specific sysdeps header.

* dbus/dbus-sysdeps.h, dbus-sysdeps-unix.c: patch from Peter
Kümmel bug #8249 to make the sysdeps.h read/write/open/close
functions specifically for sockets only, and move generic
read/write/open/close into unix-specific code.
/external/dbus/dbus/dbus-server-unix.c
d3ae8527461b48a00a153d511c57952a8197c921 07-Sep-2006 John (J5) Palmieri <johnp@redhat.com> * Clean up close calls to use _dbus_close (Patch from
Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>)
/external/dbus/dbus/dbus-server-unix.c
52c7e25e50028684dc4577f2c54d176ca91f18b4 25-Oct-2005 Ross Burton <ross@openedhand.com> Add const keywords
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.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-server-unix.c
aa4f823781185fb18187714798795d7e4b0c9b65 11-Feb-2005 Havoc Pennington <hp@redhat.com> 2005-02-10 Havoc Pennington <hp@redhat.com>

* test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
(call dbus_g_proxy_add_signal)

* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
escape the hostname
(_dbus_server_new_for_domain_socket): escape the path

* dbus/dbus-address.c (dbus_address_escape_value): new
(dbus_address_unescape_value): new
(dbus_parse_address): unescape values

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

* doc/dbus-specification.xml: explain how to escape values in
addresses
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.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-server-unix.c
6971a06b04b3fdd48b61202b2276e8140f4b7be0 22-Apr-2004 Kristian Høgsberg <krh@redhat.com> 2004-04-21 Kristian Høgsberg <krh@redhat.com>

* dbus/dbus-server-unix.c (unix_finalize): Don't unref
unix_server->watch here, it is unreffed in disconnect.
(_dbus_server_new_for_tcp_socket): convert NULL host to
"localhost" here so we don't append NULL to address.

* dbus/dbus-server.c (_dbus_server_test): Add test case for
various addresses, including tcp with no explicit host.
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.c
a70b042f0dcebb10689975c65a2c45b52b7a4437 04-Jun-2003 Havoc Pennington <hp@redhat.com> 2003-06-04 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
using unix:abstract=/foo, and when listening in a tmpdir
i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.

* dbus/dbus-transport.c (_dbus_transport_open): support
unix:abstract=/foo

* dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
support abstract sockets

* dbus/dbus-transport-unix.c
(_dbus_transport_new_for_domain_socket): support abstract sockets

* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
toggle as an argument, implement abstract namespace support
(_dbus_listen_unix_socket): ditto

* configure.in: add --enable-abstract-sockets and implement
a configure check for autodetection of the right value.
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.c
6d54407dbb089dd0b0d8d79189b029c4d82bae81 06-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-06 Havoc Pennington <hp@pobox.com>

* dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
save the domain socket name, and unlink it when we disconnect the
server. Means that at least when we exit normally, we won't leave
a bunch of junk in /tmp

* dbus/dbus-transport-unix.c
(_dbus_transport_new_for_domain_socket): code cleanup (nicer
memory management). (I was making a real change here but then
didn't)
/external/dbus/dbus/dbus-server-unix.c
44ed933284589134603913b05f55ca55e8c5a566 01-Apr-2003 Havoc Pennington <hp@redhat.com> 2003-04-01 Havoc Pennington <hp@pobox.com>

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

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

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

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

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

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

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

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

* dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
(_dbus_change_identity): new function
/external/dbus/dbus/dbus-server-unix.c
fa05de9230d62e7c427b5313796fc6ccd4d0ff60 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@redhat.com>

Fix some annoying DBusString API and fix all affected code.

* dbus/dbus-string.c (_dbus_string_init): get rid of annoying
max_length argument
(_dbus_string_get_data): change to return string instead of using
an out param
(_dbus_string_get_const_data): ditto
(_dbus_string_get_data_len): ditto
(_dbus_string_get_const_data_len): ditto
/external/dbus/dbus/dbus-server-unix.c
29c71168cd17b11eed65023c97aff401d5305b01 31-Mar-2003 Havoc Pennington <hp@redhat.com> 2003-03-31 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
(_dbus_transport_new_for_tcp_socket): these didn't need the "server"
argument since they are always client side

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

* bus/main.c (main): take the configuration file as an argument.

* test/data/valid-config-files/debug-allow-all.conf: new file to
use with dispatch.c tests for example

* bus/test-main.c (main): require test data dir

* bus/bus.c (bus_context_new): change this to take a
configuration file name as argument

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

* bus/system.conf, bus/session.conf: new files

* dbus/dbus-bus.c (dbus_bus_get): look for system bus on
well-known socket if none set

* configure.in: create system.conf and session.conf
/external/dbus/dbus/dbus-server-unix.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-server-unix.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-server-unix.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-server-unix.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-server-unix.c
6180d6954c41a2412c166e5a9e8a2851cf39c6d1 19-Feb-2003 Mikael Hallendal <micke@codefactory.se> 2003-02-19 Mikael Hallendal <micke@codefactory.se>

* dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.

* dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
Added to create a transport connecting using a tcp/ip socket.

* dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
to a tcp socket at given host and port.
(_dbus_listen_tcp_socket): added to listen on tcp socket for given
hostname and port.

* dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.

* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
Added to create a server listening on a TCP/IP socket.
/external/dbus/dbus/dbus-server-unix.c
f116b1282f8482dff6dc797f64270d95f79b53a3 16-Feb-2003 Anders Carlsson <andersca@codefactory.se> 2003-02-16 Anders Carlsson <andersca@codefactory.se>

* bus/activation.c: (load_directory), (bus_activation_init),
(bus_activation_activate_service):
* bus/activation.h:
* bus/driver.c:
(bus_driver_handle_activate_service), (bus_driver_handle_message):
More work on the activation handling.

* dbus/dbus-errors.h:
Add some error messages

* dbus/dbus-message.c: (dbus_message_new_error_reply):
* dbus/dbus-message.h:
New function that creates an error message.

* dbus/dbus-protocol.h:
Add ACTIVATE_SERVER message.

* dbus/dbus-server-unix.c: (unix_handle_watch),
(_dbus_server_new_for_domain_socket):
Call _dbus_fd_set_close_on_exec.

* dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
(_dbus_spawn_async), (_dbus_disable_sigpipe),
(_dbus_fd_set_close_on_exec):
* dbus/dbus-sysdeps.h:
Add _dbus_fd_set_close_on exec function. Also add function that checks
that all open fds are set to close-on-exec and warns otherwise.

* dbus/dbus-transport-unix.c:
(_dbus_transport_new_for_domain_socket):
Call _dbus_fd_set_close_on_exec.
/external/dbus/dbus/dbus-server-unix.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-server-unix.c
01af5ff4101e540a6456bca01d56272e701bea78 04-Jan-2003 Havoc Pennington <hp@redhat.com> 2003-01-04 Havoc Pennington <hp@pobox.com>

* test/watch.c (error_handler): make it safe if the error handler
is called multiple times (if we s/error handler/disconnect
handler/ we should just guarantee it's called only once)

* dbus/dbus-transport.c (_dbus_transport_disconnect): call the
error handler on disconnect (it's quite possible we should
just change the error handler to a "disconnect handler," I'm
not sure we have any other meaningful errors)

* configure.in: check for getpwnam_r

* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
mechanism as in SASL spec, using socket credentials

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

* dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
dbus_accept()
(_dbus_write): only check errno if <0 returned
(_dbus_write_two): ditto
/external/dbus/dbus/dbus-server-unix.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-server-unix.c
271fa7fc335f332bb2be3beeef735334546c4957 13-Dec-2002 Havoc Pennington <hp@redhat.com> 2002-12-12 Havoc Pennington <hp@pobox.com>

* dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
below new interfaces and include fewer system headers.

* dbus/dbus-sysdeps.c (_dbus_read): new function
(_dbus_write): new function
(_dbus_write_two): new function
(_dbus_connect_unix_socket): new function
(_dbus_listen_unix_socket): new function

* dbus/dbus-message-internal.h: change interfaces to use
DBusString
/external/dbus/dbus/dbus-server-unix.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-server-unix.c