1. 02 Dec, 2003 1 commit
  2. 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
  3. 31 Mar, 2003 1 commit
    • 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
  4. 17 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-16 Havoc Pennington <hp@pobox.com> · b4a1100f
      Havoc Pennington authored
      	* 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
      b4a1100f
  5. 16 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-16 Havoc Pennington <hp@pobox.com> · ebb57e71
      Havoc Pennington authored
      	* dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
      	this. always run the test suite before commit...
      
      	* bus/*: adapt to DBusConnection API changes
      
      	* glib/dbus-gmain.c: adapt to DBusConnection API changes,
      	requires renaming stuff to avoid dbus_connection_dispatch name
      	conflict.
      
      	* dbus/dbus-transport.c (_dbus_transport_queue_messages): new
      	function
      
      	* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
      	separate from _dbus_message_loader_return_buffer()
      
      	* dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
      	this, because it's now always broken to use; the number of
      	messages in queue vs. the number still buffered by the message
      	loader is undefined/meaningless. Should use
      	dbus_connection_get_dispatch_state().
      	(dbus_connection_dispatch): rename from
      	dbus_connection_dispatch_message
      ebb57e71
  6. 15 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-15 Havoc Pennington <hp@pobox.com> · f05f87a8
      Havoc Pennington authored
      	* bus/dispatch.c (bus_dispatch_test): OK, now finally actually
      	write useful test code, after all that futzing around ;-)
      
      	Test does not yet pass because we can't handle OOM in
      	_dbus_transport_messages_pending (basically,
      	dbus_connection_preallocate_send() does not prealloc the write
      	watch). To fix this, I think we need to add new stuff to
      	set_watch_functions, namely a SetEnabled function so we can alloc
      	the watch earlier, then enable it later.
      
      	* dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
      	dbus-memory.c to the convenience lib
      
      	* bus/test.c: rename some static functions to keep them clearly
      	distinct from stuff in connection.c. Handle client disconnection.
      f05f87a8
  7. 13 Mar, 2003 1 commit
    • 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
  8. 13 Feb, 2003 1 commit
    • Anders Carlsson's avatar
      2003-02-13 Anders Carlsson <andersca@codefactory.se> · 02dfd4fb
      Anders Carlsson authored
      	* bus/Makefile.am:
      	Add utils.[ch]
      
      	* bus/connection.c: (bus_connection_foreach):
      	Fix a warning.
      
      	* bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
      	(unescape_string), (new_section), (parse_section_start),
      	(parse_key_value), (report_error), (bus_desktop_file_load),
      	(bus_desktop_file_get_string):
      	* bus/desktop-file.h:
      	Use DBusError for error reporting.
      
      	* bus/dispatch.c: (send_one_message),
      	(bus_dispatch_message_handler):
      	* 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_handle_hello),
      	(bus_driver_send_welcome_message),
      	(bus_driver_handle_list_services),
      	(bus_driver_handle_acquire_service),
      	(bus_driver_handle_service_exists):
      	* bus/loop.c: (bus_loop_run):
      	* bus/main.c:
      	Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
      
      	* bus/utils.c: (bus_wait_for_memory):
      	* bus/utils.h:
      	New files with general utility functions.
      
      	* dbus/dbus-internals.h:
      	Remove _DBUS_HANDLE_OOM.
      02dfd4fb
  9. 21 Nov, 2002 3 commits
    • Havoc Pennington's avatar
      2002-11-21 Havoc Pennington <hp@redhat.com> · 5a6adeee
      Havoc Pennington authored
      	* dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
      	so we can allow ourselves to include files directly,
      	instead of having to use dbus.h
      
      	* dbus/dbus.h: fill in
      
      	* dbus/dbus-message.h: sketch out a sample header file.
      	Include griping if you include it directly instead of
      	via dbus.h
      
      	* dbus/dbus-macros.h: new file with macros for extern "C",
      	TRUE/FALSE, NULL, etc.
      
      	* doc/file-boilerplate.c: put include guards in here
      5a6adeee
    • Havoc Pennington's avatar
      2002-11-21 Havoc Pennington <hp@redhat.com> · 89161753
      Havoc Pennington authored
      	* doc/file-boilerplate.c: include both AFL and GPL boilerplate.
      
      	* COPYING: include the GPL as well, and license code
      	under both AFL and GPL.
      89161753
    • Havoc Pennington's avatar
      add file-boilerplate.c · f6343e58
      Havoc Pennington authored
      f6343e58