1. 15 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-15 Havoc Pennington <hp@redhat.com> · 9c3d566e
      Havoc Pennington authored
      	* 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
      9c3d566e
  2. 10 Aug, 2004 1 commit
  3. 29 Jul, 2004 1 commit
    • Olivier Andrieu's avatar
      * bus/config-loader-libxml.c: complete the implementation of libxml · 4076d31c
      Olivier Andrieu authored
      backend for config file loader. Doesn't work with full OOM test yet.
      
      * configure.in: change error when selecting libxml into a warning.
      
      * test/data/invalid-config-files: add two non-well-formed XML files.
      
      * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
      
      * dbus/dbus-transport-unix.c (unix_handle_watch): do not disconnect in
      case of DBUS_WATCH_HANGUP, several do_reading() may be necessary to
      read all the buffer. (bug #894)
      
      * bus/activation.c (bus_activation_activate_service): fix a potential
      assertion failure (bug #896). Small optimization in the case of
      auto-activation messages.
      
      * dbus/dbus-message.c (verify_test_message, _dbus_message_test): add
      test case for byte-through-vararg bug (#901). patch by Kimmo
      Hämäläinen.
      4076d31c
  4. 16 Mar, 2004 1 commit
    • Richard Hult's avatar
      2004-03-16 Richard Hult <richard@imendio.com> · 93f433a1
      Richard Hult authored
      	* bus/activation.c: (bus_activation_service_created),
      	(bus_activation_send_pending_auto_activation_messages),
      	(bus_activation_activate_service):
      	* bus/activation.h:
      	* bus/dispatch.c: (bus_dispatch),
      	(check_nonexistent_service_auto_activation),
      	(check_service_auto_activated),
      	(check_segfault_service_auto_activation),
      	(check_existent_service_auto_activation), (bus_dispatch_test):
      	* bus/driver.c: (bus_driver_handle_activate_service):
      	* bus/services.c: (bus_registry_acquire_service):
      	* dbus/dbus-message.c: (dbus_message_set_auto_activation),
      	(dbus_message_get_auto_activation):
      	* dbus/dbus-message.h:
      	* dbus/dbus-protocol.h: Implement auto-activation.
      93f433a1
  5. 12 Mar, 2004 2 commits
    • Mikael Hallendal's avatar
      2004-03-12 Mikael Hallendal <micke@imendio.com> · 520bdf70
      Mikael Hallendal authored
      	* bus/activation.c:
      	(babysitter_watch_callback): notify all pending activations waiting for
      	  the same exec that the activation failed.
      	(bus_activation_activate_service): shortcut the activation if we
      	  already waiting for the same executable to start up.
      520bdf70
    • Mikael Hallendal's avatar
      2004-03-12 Mikael Hallendal <micke@imendio.com> · dd79fc73
      Mikael Hallendal authored
      	* bus/activation.c:
      	- Added service file reloading.
      	  Each service files directory is kept in an hash table in
      	  BusActivation and each BusActivationEntry knows what .service-file it
      	  was read from. So when you try to activate a service the bus will
      	  check if it's been updated, removed or if new .service-files has
      	  been installed.
      	- Test code at the bottom for the service file reloading.
      	* bus/test-main.c: (main):
      	* bus/test.h:
      	- added service reloading test.
      	* dbus/dbus-sysdeps.c:
      	* dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
      dd79fc73
  6. 02 Dec, 2003 1 commit
  7. 27 Nov, 2003 1 commit
  8. 16 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-16 Havoc Pennington <hp@redhat.com> · d6e1b2ad
      Havoc Pennington authored
      	* 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.
      d6e1b2ad
  9. 11 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-10 Havoc Pennington <hp@pobox.com> · b29ea911
      Havoc Pennington authored
      	* 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
      b29ea911
  10. 14 May, 2003 1 commit
    • James Willcox's avatar
      · e9cb382d
      James Willcox authored
      2003-05-13  James Willcox  <jwillcox@gnome.org>
      
      	* configure.in:
      	* bus/activation.c: (bus_activation_service_created),
      	(bus_activation_activate_service):
      	* bus/driver.c: (bus_driver_send_service_deleted),
      	(bus_driver_send_service_created), (bus_driver_send_service_lost),
      	(bus_driver_send_service_acquired),
      	(bus_driver_send_welcome_message),
      	(bus_driver_handle_list_services):
      	* bus/session.conf.in:
      	* dbus/dbus-bus.c: (dbus_bus_acquire_service),
      	(dbus_bus_service_exists), (dbus_bus_activate_service):
      	* dbus/dbus-bus.h:
      
      	Add some convenience API which lets you activate a service, and did a
      	bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
      	and dbus_message_get_args()
      e9cb382d
  11. 27 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-27 Havoc Pennington <hp@pobox.com> · e8d396ef
      Havoc Pennington authored
      	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
      e8d396ef
  12. 25 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-25 Havoc Pennington <hp@redhat.com> · b3bd48ed
      Havoc Pennington authored
              test suite is slightly hosed at the moment, will fix soon
      
      	* bus/connection.c (bus_connections_expire_incomplete): fix to
      	properly disable the timeout when required
      	(bus_connection_set_name): check whether we can remove incomplete
      	connections timeout after we complete each connection.
      
      	* dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
      	probably still broken.
      
      	* bus/services.c (bus_registry_acquire_service): implement max
      	number of services owned, and honor allow/deny rules on which
      	services a connection can own.
      
      	* bus/connection.c (bus_connection_get_policy): report errors here
      
      	* bus/activation.c: implement limit on number of pending
      	activations
      b3bd48ed
  13. 18 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-18 Havoc Pennington <hp@pobox.com> · 3df260c0
      Havoc Pennington authored
      	* 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.
      3df260c0
  14. 14 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-13 Havoc Pennington <hp@pobox.com> · 777707ed
      Havoc Pennington authored
      	* 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
      777707ed
  15. 11 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@pobox.com> · eb63ba50
      Havoc Pennington authored
      	* 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.
      eb63ba50
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@redhat.com> · 6be547d3
      Havoc Pennington authored
      	* 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.
      6be547d3
  16. 10 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@pobox.com> · 51781f54
      Havoc Pennington authored
      	* 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.
      51781f54
  17. 07 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-07 Havoc Pennington <hp@redhat.com> · fe22b219
      Havoc Pennington authored
      	* 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
      fe22b219
  18. 06 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-06 Havoc Pennington <hp@pobox.com> · df008ef9
      Havoc Pennington authored
      	* dbus/Makefile.am: split lists of sources into stuff that goes in
      	the library, util functions that go in the lib and are also used
      	elsewhere, and util functions that are used in tests/daemon but
      	don't go in the lib.
      
      	* dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
      	here so it can be used in test binaries also
      df008ef9
  19. 05 Apr, 2003 3 commits
    • Havoc Pennington's avatar
      2003-04-05 Havoc Pennington <hp@pobox.com> · 2250539a
      Havoc Pennington authored
      	* bus/loop.c (bus_loop_iterate): fix the timeout code, using
      	magic from GLib
      
      	* dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
      	to -1 once we've reaped the babysitter
      	(_dbus_babysitter_handle_watch): do as much work as we can, not
      	just one go of it
      
      	* bus/activation.c: add code using DBusBabysitter so that we
      	handle it when a service fails to start up properly.
      	(bus_activation_service_created): don't remove the activation
      	entries as we go, just let them get removed when we free the pending
      	activation. Unref reply messages after sending them.
      2250539a
    • Havoc Pennington's avatar
      2003-04-05 Havoc Pennington <hp@pobox.com> · 3a96e4ff
      Havoc Pennington authored
      	* Makefile.am (coverage-report.txt): add target "coverage-report.txt"
      
      	* test/decode-gcov.c: hack up a little program to suck data
      	out of gcov files. Yes this is sort of silly.
      
      	* configure.in: define something in config.h and do an
      	AM_CONDITIONAL when gcov is enabled
      3a96e4ff
    • Havoc Pennington's avatar
      2003-04-04 Havoc Pennington <hp@redhat.com> · 03b9ca6d
      Havoc Pennington authored
      	* 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()
      03b9ca6d
  20. 03 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-03 Havoc Pennington <hp@redhat.com> · f216e814
      Havoc Pennington authored
      	* bus/activation.c (load_directory): fix up memleaks
      	(bus_activation_entry_free): free the entry
      
      	* dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
      	we get one from the message bus; fix memleaks.
      
      	* dbus/dbus-message.c (dbus_set_error_from_message): new function
      f216e814
    • Havoc Pennington's avatar
      2003-04-03 Havoc Pennington <hp@pobox.com> · eeb88949
      Havoc Pennington authored
      	* bus/config-parser.c (bus_config_parser_unref): free
      	list of mechanisms, bug discovered by test suite enhancements
      	(putting system.conf and session.conf into suite)
      
      	* test/Makefile.am, test/test-service.c: add placeholder for a
      	test service that we'll activate as part of test suite. Doesn't
      	do anything yet.
      
      	* dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
      	setting NULL value, and use system malloc not dbus_malloc()
      	when we have unavoidable memleakage.
      
      	* dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
      	didn't work, and support DBUS_BUS_ACTIVATION.
      
      	* bus/activation.c (child_setup): pass our well-known bus type to
      	the child
      
      	* bus/config-parser.c: support <type> to specify well-known type
      
      	* doc/dbus-specification.sgml: document the env variables to
      	locate well-known buses and find service activator
      eeb88949
  21. 02 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-02 Havoc Pennington <hp@redhat.com> · e55fd2c6
      Havoc Pennington authored
      	* bus/connection.c (bus_transaction_send_error_reply): set sender
      	service for the error, and unref the reply on success
      
      	* bus/activation.c: convert to use BusTransaction so OOM can be
      	handled correctly
      	(bus_activation_service_created): set sender of the message
      e55fd2c6
    • Havoc Pennington's avatar
      2003-04-01 Havoc Pennington <hp@redhat.com> · cfa261b4
      Havoc Pennington authored
      	* bus/config-parser.c, bus/bus.c: implement <servicedir> and
      	<includedir> (at least mostly)
      
      	* dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
      	first, then the user ID
      cfa261b4
  22. 31 Mar, 2003 2 commits
    • Havoc Pennington's avatar
      2003-03-31 Havoc Pennington <hp@redhat.com> · fa05de92
      Havoc Pennington authored
              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
      fa05de92
    • Havoc Pennington's avatar
      2003-03-31 Havoc Pennington <hp@pobox.com> · 29c71168
      Havoc Pennington authored
      	* 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
      29c71168
  23. 26 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-25 Havoc Pennington <hp@redhat.com> · 90ed1d84
      Havoc Pennington authored
              * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
      
      	* configure.in: add --with-xml option to specify XML library,
      	right now only libxml is supported.
      
      	* bus/config-loader-libxml.c, config-parser.c: sync some minor
      	nonworking code between home and work, still just stubs
      90ed1d84
  24. 17 Mar, 2003 1 commit
  25. 16 Mar, 2003 1 commit
    • Anders Carlsson's avatar
      2003-03-16 Anders Carlsson <andersca@codefactory.se> · 3f4086f0
      Anders Carlsson authored
      	* 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.
      3f4086f0
  26. 13 Mar, 2003 2 commits
    • Havoc Pennington's avatar
      2003-03-12 Havoc Pennington <hp@pobox.com> · 6ecc14ff
      Havoc Pennington authored
      	Throughout: purge global variables, introduce BusActivation,
      	BusConnections, BusRegistry, etc. objects instead.
      
      	* bus/bus.h, bus/bus.c: introduce BusContext as a global
      	message bus object
      
      	* test/Makefile.am (TEST_BINARIES): disable bus-test for now,
      	going to redo this a bit differently I think
      6ecc14ff
    • Havoc Pennington's avatar
      2003-03-12 Havoc Pennington <hp@redhat.com> · 29560adc
      Havoc Pennington authored
              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
      29560adc
  27. 17 Feb, 2003 1 commit
    • Anders Carlsson's avatar
      2003-02-17 Anders Carlsson <andersca@codefactory.se> · 3c8db267
      Anders Carlsson authored
      	* bus/activation.c: (bus_activation_init), (child_setup),
      	(bus_activation_activate_service):
      	* bus/activation.h:
      	* bus/main.c: (main):
      	Set DBUS_ADDRESS environment variable.
      
      	* dbus/dbus-errors.c: (dbus_set_error):
      	Don't use va_copy since that's a C99 feature.
      
      	* dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
      	(_dbus_spawn_async):
      	* dbus/dbus-sysdeps.h:
      	Add child_setup_func to _dbus_spawn_async.
      
      	* doc/dbus-specification.sgml:
      	Update specification.
      
      	* test/spawn-test.c: (setup_func), (main):
      	Fix test.
      3c8db267
  28. 16 Feb, 2003 1 commit
    • Anders Carlsson's avatar
      2003-02-16 Anders Carlsson <andersca@codefactory.se> · f116b128
      Anders Carlsson authored
      	* 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.
      f116b128
  29. 15 Feb, 2003 1 commit
    • Anders Carlsson's avatar
      2003-02-15 Anders Carlsson <andersca@codefactory.se> · efd53eca
      Anders Carlsson authored
      	* bus/Makefile.am:
      	* bus/activation.c: (bus_activation_entry_free),
      	(add_desktop_file_entry), (load_directory), (bus_activation_init):
      	* bus/activation.h:
      	* bus/main.c: (main):
      	Add simple activation support, doesn't work yet though.
      efd53eca