1. 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
  2. 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
  3. 16 Feb, 2003 4 commits
    • Anders Carlsson's avatar
      2003-02-16 Anders Carlsson <andersca@codefactory.se> · 6cf6f82f
      Anders Carlsson authored
      	* bus/dispatch.c: (send_one_message):
      	Only send broadcast messages to registered connections.
      
      	* dbus/dbus-message.c: (dbus_message_name_is):
      	* dbus/dbus-message.h:
      	New convenience function.
      
      	* dbus/dbus-transport-debug.c: (do_reading):
      	Only dispatch one message per run.
      
      	* test/Makefile.am:
      	* test/bus-test.c: (new_connection_callback), (die),
      	(test_hello_client1_handler), (test_hello_client2_handler),
      	(test_hello_replies), (main):
      
      	* test/bus-test-loop.[ch]:
      	Add these.
      6cf6f82f
    • Anders Carlsson's avatar
      2003-02-16 Anders Carlsson <andersca@codefactory.se> · 50137dae
      Anders Carlsson authored
      	* bus/dispatch.c: (bus_dispatch_message_handler):
      	* dbus/dbus-errors.h:
      	Return an error if someone tries to send a message to a service
      	that doesn't exist.
      50137dae
    • 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
    • Havoc Pennington's avatar
      2003-02-16 Havoc Pennington <hp@pobox.com> · 4a8a03ae
      Havoc Pennington authored
      	* dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
      	allow people to avoid setting SIGPIPE to SIG_IGN
      	(_dbus_connection_new_for_transport): disable SIGPIPE unless
      	we've been asked not to
      4a8a03ae
  4. 15 Feb, 2003 2 commits
    • 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
    • Alexander Larsson's avatar
      2003-02-15 Alexander Larsson <alexl@redhat.com> · fe401894
      Alexander Larsson authored
      	* dbus/dbus-threads.c:
      	* dbus/dbus-threads.h:
      	Add condvars. Remove static mutext from API.
      	Implement static mutexes by initializing them from threads_init.
      
      	* glib/dbus-gthread.c:
      	* qt/dbus-qthread.cpp:
      	Update with the thread api changes.
      
      
      	* dbus/dbus-list.c:
      	* dbus/dbus-list.h:
      	Turn StaticMutex into normal mutex + init function.
      	Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
      	_dbus_list_append_link, _dbus_list_prepend_link
      
      
      	* dbus/dbus-sysdeps.c:
      	* dbus/dbus-sysdeps.h:
      	New type dbus_atomic_t, and new functions _dbus_atomic_inc,
      	_dbus_atomic_dec. Only slow fallback implementation at the moment.
      
      	* dbus/dbus-protocol.h:
      	Add DBUS_MESSAGE_LOCAL_DISCONNECT define
      
      	* dbus/dbus-message.c:
      	Make ref/unref atomic.
      	Fix some docs.
      
      	* dbus/dbus-connection-internal.h:
      	* dbus/dbus-connection.c:
      	* dbus/dbus-connection.h:
      	Make threadsafe.
      	Change _peek to _borrow,_return & _steal_borrowed.
      	Change disconnect callback to event.
      	Make dbus_connection_dispatch_messages reentrant.
      
      	* dbus/dbus-transport.c:
      	Don't ref the connection on calls to the transport
      	implementation.
      
      	* dbus/dbus-message-handler.c:
      	Make threadsafe.
      
      	* glib/dbus-gmain.c:
      	Don't use peek_message anymore
      
      	* test/Makefile.am:
      	* test/debug-thread.c:
      	* test/debug-thread.h:
      	Simple thread implementation that asserts() on deadlocks in
      	single-threaded code.
      
      	* test/bus-test.c:
      	(main) Call debug_threads_init.
      
      	* test/watch.c:
      	Use disconnect message instead of disconnect callback.
      
      	* bus/connection.c:
      	* bus/connection.h:
      	Don't call dbus_connection_set_disconnect_function. Instead export
      	bus_connection_disconnect.
      
      	* bus/dispatch.c:
      	Call bus_connection_disconnect when we get a disconnected message.
      fe401894
  5. 13 Feb, 2003 6 commits
    • Anders Carlsson's avatar
      2003-02-13 Anders Carlsson <andersca@codefactory.se> · 97ee8d18
      Anders Carlsson authored
      	* bus/driver.c: (bus_driver_handle_hello):
      	* bus/driver.h:
      	* bus/services.c: (bus_service_lookup):
      	Reorder message sending so we get a more sane order.
      
      	* test/bus-test.c: (message_handler):
      	Fix tyop.
      97ee8d18
    • Anders Carlsson's avatar
      2003-02-13 Anders Carlsson <andersca@codefactory.se> · aa4b4ef5
      Anders Carlsson authored
      	* 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):
      	* dbus/dbus-bus.c: (dbus_bus_register_client),
      	(dbus_bus_acquire_service), (dbus_bus_service_exists):
      	* dbus/dbus-errors.c: (dbus_result_to_string):
      	* dbus/dbus-errors.h:
      	* dbus/dbus-message.c: (dbus_message_append_args),
      	(dbus_message_append_args_valist), (dbus_message_get_args),
      	(dbus_message_get_args_valist), (dbus_message_get_args_iter),
      	(dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
      	(dbus_message_iter_get_byte_array),
      	(dbus_message_iter_get_string_array), (message_iter_test),
      	(check_message_handling), (_dbus_message_test):
      	* dbus/dbus-message.h:
      	* test/bus-test.c: (main):
      	Change fields to arguments in messages, so that they won't be
      	confused with header fields.
      
      	* glib/test-dbus-glib.c: (main):
      	Remove append_fields from hello message.
      aa4b4ef5
    • Richard Hult's avatar
      2003-02-13 Richard Hult <rhult@codefactory.se> · 2a751e51
      Richard Hult authored
      	* bus/main.c: Fix build.
      
      	* dbus/dbus-errors.h:
      	* dbus/dbus-errors.c: Fix copyright for Anders.
      2a751e51
    • 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
    • Anders Carlsson's avatar
      2003-02-13 Anders Carlsson <andersca@codefactory.se> · 34e6c6ff
      Anders Carlsson authored
      	* bus/driver.c: (bus_driver_send_welcome_message),
      	(bus_driver_handle_list_services),
      	(bus_driver_handle_acquire_service),
      	(bus_driver_handle_service_exists), (bus_driver_handle_message):
      	Update for API changes in libdbus.
      
      	* dbus/dbus-message.c: (dbus_message_new_reply):
      	* dbus/dbus-message.h:
      	Remove the name argument. The spec states that replies shouldn't
      	have a name.
      34e6c6ff
    • Anders Carlsson's avatar
      2003-02-13 Anders Carlsson <andersca@codefactory.se> · cf5f191b
      Anders Carlsson authored
      	* bus/desktop-file.c: (parse_section_start), (parse_key_value),
      	(report_error), (bus_desktop_file_load), (lookup_section),
      	(lookup_line), (bus_desktop_file_get_raw),
      	(bus_desktop_file_get_string):
      	* bus/desktop-file.h:
      	Some fixes, and new functions for getting a key value from a section.
      cf5f191b
  6. 12 Feb, 2003 1 commit
  7. 02 Feb, 2003 4 commits
  8. 01 Feb, 2003 2 commits
    • Anders Carlsson's avatar
      2003-02-01 Anders Carlsson <andersca@codefactory.se> · dbc4c0ca
      Anders Carlsson authored
      	* bus/driver.c: (create_unique_client_name),
      	(bus_driver_handle_hello):
      	Don't take a name, just use a numeric id to identify
      	each client.
      
      	* dbus/Makefile.am:
      	* dbus/dbus-bus.c: (dbus_bus_register_client),
      	(dbus_bus_acquire_service), (dbus_bus_service_exists):
      	* dbus/dbus-bus.h:
      	Add new convenience functions for communicating with the bus.
      
      	* dbus/dbus-message.h:
      
      	* dbus/dbus-protocol.h:
      	Fix a typo.
      dbc4c0ca
    • Havoc Pennington's avatar
      2003-01-31 Havoc Pennington <hp@pobox.com> · ca84a292
      Havoc Pennington authored
      	* doc/dbus-specification.sgml: work on the specification
      
      	* dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
      	the protocol version of the message.
      
      	* dbus/dbus-protocol.h: drop special _REPLY names, the spec
      	no longer specifies that.
      	(DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
      	1/2/3/4)
      
      	* dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
      	"break" for DBUS_TYPE_NIL, remove @todo
      ca84a292
  9. 27 Jan, 2003 1 commit
    • Anders Carlsson's avatar
      2003-01-27 Anders Carlsson <andersca@codefactory.se> · ee1133de
      Anders Carlsson authored
      	* bus/dispatch.c: (bus_dispatch_message_handler):
      	Dispatch messages sent to services.
      
      	* bus/driver.c: (bus_driver_send_service_deleted),
      	(bus_driver_send_service_created), (bus_driver_send_service_lost),
      	(bus_driver_send_service_acquired):
      	Add helper functions for sending service related messages.
      
      	(bus_driver_send_welcome_message):
      	Send HELLO_REPLY instead of WELCOME.
      
      	(bus_driver_handle_list_services):
      	Send LIST_SERVICES_REPLY instead of SERVICES.
      
      	(bus_driver_handle_own_service),
      	(bus_driver_handle_service_exists):
      	New message handlers.
      
      	(bus_driver_handle_message):
      	Invoke new message handlers.
      
      	(bus_driver_remove_connection):
      	Don't remove any services here since that's done automatically
      	by bus_service_remove_owner now.
      
      	* bus/driver.h:
      	New function signatures.
      
      	* bus/services.c: (bus_service_add_owner):
      	Send ServiceAcquired message if we're the only primary owner.
      
      	(bus_service_remove_owner):
      	Send ServiceAcquired/ServiceLost messages.
      
      	(bus_service_set_prohibit_replacement),
      	(bus_service_get_prohibit_replacement):
      	Functions for setting prohibit replacement.
      
      	(bus_service_has_owner):
      	New function that checks if a connection is in the owner queue of
      	a certain service.
      
      	* bus/services.h:
      	Add new function signatures.
      
      	* dbus/dbus-list.c: (_dbus_list_test):
      	Add tests for _dbus_list_remove_last and traversing the list backwards.
      
      	* dbus/dbus-list.h:
      	Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
      	go any further, so return NULL then.
      
      	* dbus/dbus-protocol.h:
      	Add new messages, service flags and service replies.
      ee1133de
  10. 26 Jan, 2003 2 commits
    • Havoc Pennington's avatar
      2003-01-26 Havoc Pennington <hp@pobox.com> · 50c25505
      Havoc Pennington authored
              The unit tests pass, but otherwise untested.  If it breaks, the
      	tests should have been better. ;-)
      
      	* bus/driver.c (bus_driver_handle_hello): return if we disconnect
      	the connection.
      
      	* dbus/dbus-message.c: redo everything so we maintain
      	message->header as the only copy of the various fields.
      	This avoids the possibility of out-of-memory in some cases,
      	for example dbus_message_lock() can't run out of memory anymore,
      	and avoids extra copying. Figured I may as well go ahead and do
      	this since it was busted for dbus_message_lock to not return
      	failure on OOM, and dbus_message_write_header was totally
      	unchecked for OOM. Also fixed some random other bugs.
      
      	* dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
      	that strings are nul-terminated. Also, end_pos can be equal
      	to string length just not greater than, I think.
      	(_dbus_marshal_set_int32): new function
      	(_dbus_marshal_set_uint32): new function
      	(_dbus_marshal_set_string): new function
      
      	* dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
      	a warning, init timeout_list to NULL
      	(dbus_connection_send_message): don't use uninitialized variable
      	"serial"
      
      	* dbus/dbus-string.c (_dbus_string_replace_len): new function
      50c25505
    • Anders Carlsson's avatar
      2003-01-26 Anders Carlsson <andersca@codefactory.se> · d5ad082f
      Anders Carlsson authored
      	* bus/driver.c: (bus_driver_handle_hello),
      	(bus_driver_send_welcome_message):
      	Plug leaks
      d5ad082f
  11. 25 Jan, 2003 2 commits
    • Anders Carlsson's avatar
      2003-01-25 Anders Carlsson <andersca@codefactory.se> · 39dd1fce
      Anders Carlsson authored
      	* bus/Makefile.am:
      	* bus/connection.c: (connection_disconnect_handler),
      	(connection_watch_callback), (bus_connection_setup):
      	* bus/dispatch.c: (send_one_message),
      	(bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
      	(bus_dispatch_add_connection), (bus_dispatch_remove_connection):
      	* bus/dispatch.h:
      	* bus/driver.c: (bus_driver_send_service_deleted),
      	(bus_driver_send_service_created), (bus_driver_handle_hello),
      	(bus_driver_send_welcome_message),
      	(bus_driver_handle_list_services), (bus_driver_remove_connection),
      	(bus_driver_handle_message):
      	* bus/driver.h:
      	Refactor code, put the message dispatching in its own file. Use
      	_DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
      	is disconnected.
      39dd1fce
    • Havoc Pennington's avatar
      2003-01-24 Havoc Pennington <hp@pobox.com> · a1a53c32
      Havoc Pennington authored
      	* dbus/dbus-list.c (alloc_link): put a thread lock on the global
      	list_pool
      
      	* bus/driver.c (bus_driver_handle_list_services): fix a leak
      	on OOM
      a1a53c32
  12. 24 Jan, 2003 1 commit
    • Anders Carlsson's avatar
      2003-01-25 Anders Carlsson <andersca@codefactory.se> · a16e83f4
      Anders Carlsson authored
      	* bus/connection.c: (bus_connection_foreach):
      	* bus/connection.h:
      	Add new bus_connection_foreach function.
      
      	* bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
      	Add function that broadcasts a message to all clients.
      
      	(bus_driver_send_service_created), (bus_driver_handle_hello),
      	(bus_driver_send_welcome_message),
      	(bus_driver_handle_list_services), (bus_driver_message_handler):
      	Implement functions that take care of listing services, and notifying
      	clients when new services are created.
      
      	* bus/services.c: (bus_services_list):
      	* bus/services.h:
      	Add new function that returns an array of strings with the currently
      	registered services.
      
      	* glib/dbus-glib.h:
      	* glib/dbus-gmain.c:
      	Update copyright year.
      a16e83f4
  13. 22 Jan, 2003 2 commits
    • Havoc Pennington's avatar
      2003-01-22 Havoc Pennington <hp@pobox.com> · c414488f
      Havoc Pennington authored
      	* dbus/dbus-connection.c
      	(dbus_connection_send_message_with_reply_and_block): add some @todo
      
      	* bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
      c414488f
    • Havoc Pennington's avatar
      2003-01-21 Havoc Pennington <hp@pobox.com> · d6d50a29
      Havoc Pennington authored
              (patch untested because can't compile)
      
      	* bus/driver.c (create_unique_client_name): make this function
      	never recycle client names. Also, caller should initialize
      	the DBusString.
      
      	* dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
      d6d50a29
  14. 21 Jan, 2003 1 commit
    • Anders Carlsson's avatar
      2003-01-21 Anders Carlsson <andersca@codefactory.se> · aff24a72
      Anders Carlsson authored
      	* bus/Makefile.am:
      	Add driver.[ch]
      
      	* bus/connection.c: (connection_disconnect_handler):
      	Remove the connection from the bus driver's list.
      
      	(connection_watch_callback): Dispatch messages.
      
      	(free_connection_data): Free connection name.
      
      	(bus_connection_setup): Add connection to the bus driver's list.
      	(bus_connection_remove_owned_service):
      	(bus_connection_set_name), (bus_connection_get_name):
      	Add functions for setting and getting the connection's name.
      
      	* bus/connection.h:
      	Add function headers.
      
      	* bus/driver.c: (create_unique_client_name),
      	(bus_driver_handle_hello_message),
      	(bus_driver_send_welcome_message), (bus_driver_message_handler),
      	(bus_driver_add_connection), (bus_driver_remove_connection):
      	* bus/driver.h:
      	* bus/main.c:
      	* bus/services.c: (bus_service_free):
      	* bus/services.h:
      	New file that handles communication and registreation with the bus
      	itself.
      aff24a72
  15. 18 Jan, 2003 1 commit
    • Havoc Pennington's avatar
      2003-01-18 Havoc Pennington <hp@pobox.com> · 0363701c
      Havoc Pennington authored
      	* dbus/dbus-connection.c (dbus_connection_unref): disconnect the
      	connection if it hasn't been already.
      
      	* dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
      	replace with DisconnectFunction.
      0363701c
  16. 14 Jan, 2003 1 commit
    • Anders Carlsson's avatar
      2003-01-14 Anders Carlsson <andersca@codefactory.se> · 1b9a4589
      Anders Carlsson authored
      	* bus/connection.c: (connection_error_handler),
      	(bus_connection_setup):
      	* bus/main.c: (main):
      	Make sure that the DBusConnectionData struct is NULLed
      	out to prevent a segfault.
      
      	* dbus/dbus-errors.c: (dbus_result_to_string):
      	* dbus/dbus-errors.h:
      	* dbus/dbus-message.c: (dbus_message_get_fields),
      	(dbus_message_get_fields_valist), (_dbus_message_test):
      	* dbus/dbus-message.h:
      	Make dbus_message_get_fields return a result code so we can
      	track invalid fields as well as oom.
      1b9a4589
  17. 06 Jan, 2003 1 commit
    • Havoc Pennington's avatar
      2003-01-05 Havoc Pennington <hp@pobox.com> · 96a9f803
      Havoc Pennington authored
      	* bus/connection.c: implement routines for handling connections,
      	first thing is keeping a list of owned services on each connection
      	and setting up watches etc.
      
      	* bus/services.c: implement a mapping from service names to lists
      	of connections
      
      	* dbus/dbus-hash.c: add DBUS_HASH_POINTER
      
      	* dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
      	to use static mutexes for global data
      
      	* dbus/dbus-connection.c (dbus_connection_set_data): add new
      	collection of functions to set/get application-specific data
      	on the DBusConnection.
      96a9f803
  18. 04 Jan, 2003 1 commit
    • Havoc Pennington's avatar
      2003-01-04 Havoc Pennington <hp@pobox.com> · c92339de
      Havoc Pennington authored
      	* dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
      	(_dbus_poll): new function
      
      	* dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
      	copied from GLib
      
      	* bus/loop.c: initial code for the daemon main loop
      c92339de
  19. 25 Nov, 2002 1 commit
    • Havoc Pennington's avatar
      2002-11-24 Havoc Pennington <hp@pobox.com> · 041b0767
      Havoc Pennington authored
              * 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.
      041b0767
  20. 22 Nov, 2002 1 commit