| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
|  | 
* Fix a pile of Doxygen warnings and missing docs
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* bus/services.c (bus_service_list_queued_owners):
        Add a pointer cast to fix compiler warning
        * dbus/dbus-dataslot.c (_dbus_data_slot_list_get):
        return a NULL instead of FALSE since the return type
        is not expecting a boolean
        * dbus/dbus-marshal-basic.c (_dbus_marshal_test):
        Remove unused variable
        * dbus/dbus-marshal-recursive-util.c (node_new):
        return a NULL instead of FALSE since the return type
        is not expecting a boolean
        * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
        Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
        because we are expecting a pointer not a boolean
        * dbus/dbus-sysdeps-util.c (_dbus_get_tmpdir):
        add void as the parameter so some compilers
        don't complain
        * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket,
          _dbus_transport_new_for_tcp_socket):
        Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
        because we are expecting a pointer not a boolean
        * test/shell-test.c (test_command_line):
        cast the second argument to _dbus_list_append to avoid compiler
        warnings
        * test/test-names.c (main): remove unused variable
        * test/test-service.c (check_hello_from_self_reply):
        Initialize echo_message and echo_reply to NULL
        * test/test-shell-service.c (handle_echo):
        Remove unused variable and cast the third parameter passed to
        dbus_connection_get_object_path_data to avoid compiler warrnings
        * test/name-test/test-names.c (clear_message_queue):
        Remove unused function
        * test/name-test/test-pending-call-dispatch.c:
        Fix format string in printf
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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>)
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
|  | 
* COPYING: switch to Academic Free License version 2.1 instead of
	2.0, to resolve complaints about patent termination clause.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
|  | 
* Update AFL version to 2.0 throughout the source files to reflect
	the update that was done a while ago.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* bus/bus.c (bus_context_new): fix wrong handling of
	server_data_slot_unref() in the error case.
	* dbus/dbus-internals.h (_dbus_assert): change so it passes
	"(condition) != 0" to _dbus_real_assert so that
	"_dbus_assert (pointer)" doesn't cause a warning
	* bus/main.c (main): accept --print-address option to print out
	the message bus address
	* dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
	* dbus/dbus-transport.c (_dbus_transport_open): special error for
	"tmpdir" option to unix: address on client side
	* dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
	to unix: address
	* configure.in (TEST_SOCKET_DIR): locate a temporary directory
	we can use to create sockets in the test suite.
	* bus/main.c (signal_handler): on SIGTERM, exit the daemon
	cleanly. To be used for testing.
	* dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
	* dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
	* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
	handle trying to call this when there's no servers active
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
	return a "babysitter" object that is used to monitor the status of
	the spawned process and reap it when required.
	* test/test-segfault.c, test/test-exit.c,
	test/test-sleep-forever.c: binaries that do various lame things,
	used in the test suite.
	* dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* Doxyfile.in:
	* dbus/dbus-address.c:
	* dbus/dbus-dict.c:
	* dbus/dbus-marshal.c:
	* dbus/dbus-server-debug-pipe.c:
	* dbus/dbus-transport-unix.c:
	Fix documentation warnings.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* 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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
|   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   | 
* bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
	transport, tests more of the real codepath. Set up clients
	with bus_setup_debug_client.
	* bus/test.c (bus_setup_debug_client): function to set up debug
	"clients" on the main loop
	* dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
	support
	* dbus/dbus-server.c (dbus_server_listen): add debug-pipe
	server type
	* dbus/dbus-server-debug.c: support a debug server based on pipes
	* dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
	(_dbus_close): new function
	* configure.in: check for socketpair
 |