1. 14 May, 2015 1 commit
  2. 15 Sep, 2014 2 commits
  3. 23 Aug, 2013 2 commits
  4. 28 Jun, 2013 1 commit
  5. 17 Jun, 2013 1 commit
  6. 21 Feb, 2012 2 commits
    • Simon McVittie's avatar
      Imported Upstream version 1.5.10 · e9e3de91
      Simon McVittie authored
      e9e3de91
    • Simon McVittie's avatar
      Distinguish between two flavours of mutex · 8a58250a
      Simon McVittie authored
      dbus-threads.h warns that recursive pthreads mutexes are not compatible
      with our expectations for condition variables. However, the only two
      condition variables we actually use only have their corresponding
      mutexes locked briefly (and we don't call out to user code from there),
      so the mutexes don't need to be recursive anyway. That's just as well,
      because it turns out our implementation of recursive mutexes on
      pthreads is broken!
      
      The goal here is to be able to distinguish between "cmutexes" (mutexes
      compatible with a condition variable) and "rmutexes" (mutexes which
      are recursive if possible, to avoid deadlocking if we hold them while
      calling user code).
      
      This is complicated by the fact that callers are not guaranteed to have
      provided us with both versions of mutexes, so we might have to implement
      one by using the other (in particular, DBusRMutex *aims to be*
      recursive, it is not *guaranteed to be* recursive).
      
      Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43744Signed-off-by: 's avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      Reviewed-by: 's avatarThiago Macieira <thiago@kde.org>
      8a58250a
  7. 13 Feb, 2012 1 commit
  8. 29 Jul, 2011 2 commits
  9. 14 Jul, 2011 1 commit
  10. 31 Jan, 2011 2 commits
  11. 14 Dec, 2010 1 commit
  12. 27 Sep, 2010 1 commit
  13. 19 Mar, 2010 1 commit
  14. 14 Jul, 2009 1 commit
  15. 10 Jul, 2009 1 commit
  16. 11 Oct, 2007 1 commit
  17. 14 Jul, 2007 1 commit
  18. 18 Jun, 2007 1 commit
    • Havoc Pennington's avatar
      2007-06-18 Havoc Pennington <hp@redhat.com> · 54b94343
      Havoc Pennington authored
      	* 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
      54b94343
  19. 24 May, 2007 1 commit
  20. 19 May, 2007 1 commit
  21. 21 Oct, 2006 2 commits
  22. 20 Oct, 2006 1 commit
  23. 17 Oct, 2006 1 commit
  24. 01 Oct, 2006 2 commits
    • Havoc Pennington's avatar
      2006-10-01 Havoc Pennington <hp@redhat.com> · a2129f7c
      Havoc Pennington authored
      	* 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
      a2129f7c
    • Havoc Pennington's avatar
      2006-09-30 Havoc Pennington <hp@redhat.com> · d8155bf5
      Havoc Pennington authored
      	* 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
      d8155bf5
  25. 16 Sep, 2006 2 commits
    • Havoc Pennington's avatar
      2006-09-16 Havoc Pennington <hp@redhat.com> · fe4715b6
      Havoc Pennington authored
      	* 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
      fe4715b6
    • Havoc Pennington's avatar
      voc Pennington <hp@redhat.com> · 8027efc9
      Havoc Pennington authored
      	* 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
      8027efc9
  26. 14 Sep, 2006 1 commit
  27. 11 Sep, 2006 1 commit
  28. 06 Sep, 2006 1 commit
  29. 16 Aug, 2006 1 commit
    • John (J5) Palmieri's avatar
      * dbus/dbus-threads.c: Add static DBusList *uninitialized_mutex_list and · 14cc7d28
      John (J5) Palmieri authored
              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
      14cc7d28
  30. 09 Apr, 2005 1 commit
    • Havoc Pennington's avatar
      2005-04-09 Havoc Pennington <hp@redhat.com> · 8475b3a8
      Havoc Pennington authored
      	* 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
      8475b3a8
  31. 26 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-26 Havoc Pennington <hp@redhat.com> · ee27481d
      Havoc Pennington authored
      	* 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
      ee27481d
  32. 25 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-25 Havoc Pennington <hp@redhat.com> · 7ce7502e
      Havoc Pennington authored
      	* doc/dbus-specification.xml: document the GUID thing
      
      	* dbus/dbus-server.c (_dbus_server_init_base): initialize a
      	globally unique ID for the server, and put a "guid=hexencoded"
      	field in the address
      
      	* dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
      
      	* dbus/dbus-message.c: ditto
      
      	* dbus/dbus-dataslot.c: ditto
      
      	* dbus/dbus-list.c: ditto
      
      	* dbus/dbus-internals.h: wait, just include
      	dbus-threads-internal.h here
      
      	* dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
      	use in main library
      
      	* dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
      7ce7502e