1. 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
  2. 17 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-16 Havoc Pennington <hp@pobox.com> · dac0a1f8
      Havoc Pennington authored
      	* doc/dbus-specification.sgml: make spec say serials are unsigned
      
      	* dbus/dbus-message.h: change message serials to unsigned
      
      	* dbus/dbus-connection.c: adapt to message serials being unsigned
      dac0a1f8
  3. 16 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-16 Havoc Pennington <hp@redhat.com> · 4b45f179
      Havoc Pennington authored
      	* dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
      	list of size counters
      	(_dbus_message_loader_putback_message_link): put back a popped link
      
      	* dbus/dbus-connection.c
      	(dbus_connection_set_max_live_messages_size): rename
      	max_received_size
      	(dbus_connection_get_outgoing_size): get size of outgoing
      	queue
      	(_dbus_connection_set_connection_counter): remove this cruft
      4b45f179
  4. 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
  5. 10 Apr, 2003 3 commits
    • Alexander Larsson's avatar
      2003-04-10 Alexander Larsson <alexl@redhat.com> · e11e4ca8
      Alexander Larsson authored
      	* bus/.cvsignore:
      	* glib/.cvsignore:
      	* test/.cvsignore:
      	Added files to cvsignore
      
      	* dbus/dbus-message.h:
      	* dbus/dbus-message.c: (dbus_message_iter_get_named):
      	Make get_named() take two out argument and return a boolean.
      	(dbus_message_iter_get_args_valist):
      	Update usage of get_named().
      	(dbus_message_iter_append_byte):
      	Fix typo
      	(dbus_message_iter_append_named)
      	Fix typo
      	(message_iter_test), (check_message_handling_type), (_dbus_message_test):
      	More tests.
      e11e4ca8
    • Alexander Larsson's avatar
      2003-04-10 Alexander Larsson <alexl@redhat.com> · e84c3a03
      Alexander Larsson authored
      	* dbus/dbus-marshal.[ch]:
      	Add array_type_pos argument to _dbus_marshal_validate_arg.
      	Let you pass a NULL end_pos to _dbus_marshal_validate_type.
      
      	* dbus/dbus-message.[ch]:
      	Multi-dimensional arrays have full type specification in the
      	outermost array. Iter code re-arranged to handle this.
      	Added some more iter tests.
      
      	* doc/dbus-specification.sgml:
      	Add me to authors.
      	Remove old FIXME.
      	Update new array encoding description.
      	Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
      
      	* test/data/invalid-messages/array-with-mixed-types.message:
      	* test/data/valid-messages/array-of-array-of-uint32.message:
      	Change to the new array format.
      
      	* test/data/invalid-messages/too-short-dict.message:
      	Fix bug in test.
      
      	* test/data/valid-messages/recursive-types.message:
      	Fix up and extend test.
      e84c3a03
    • 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
  6. 08 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-08 Havoc Pennington <hp@redhat.com> · 6c241c10
      Havoc Pennington authored
      	* bus/driver.c (bus_driver_handle_acquire_service): init
      	retval/reply before checking name
      
      	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
      	recursion depth argument
      
      	* dbus/dbus-message.h (struct DBusMessageIter): put some padding
      	in the public struct for future extension
      
      	* dbus/dbus-message-builder.c (_dbus_message_data_load): fix
      	typo
      
      	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
      	message
      
      	* doc/dbus-specification.sgml: fix typo
      6c241c10
    • Alexander Larsson's avatar
      2003-04-08 Alexander Larsson <alexl@redhat.com> · c5020ac8
      Alexander Larsson authored
      	Implemented recursive types, named types and new-style iters
      
      	* bus/driver.c:
      	* glib/test-thread-client.c: (thread_func):
      	* glib/test-thread-server.c: (handle_test_message):
      	* test/test-service.c: (handle_echo):
      	Update to new api
      
      	* dbus/Makefile.am:
      	* dbus/dbus-dict.c:
      	* dbus/dbus-dict.h:
      	* dbus/dbus.h
      	Remove DBusDict
      
      	* dbus/dbus-internals.c: (_dbus_type_to_string):
      	Update for new types.
      
      	* dbus/dbus-marshal.[ch]:
      	Implement recursive types and the new marshalling format.
      	Remove hardcoded dict marshalling.
      	Marshal named types.
      
      	* dbus/dbus-message-builder.c:
      	Add BYTE_ARRAY.
      	Remove references to old types
      
      	* dbus/dbus-message.[ch]:
      	New non-refcounted iter API that supports recursive iters.
      	Use iters for appending, including support for recursive
      	iters.
      	Add byte and named type support.
      	Update everything to new marshalling formats.
      	Add tests for new API.
      
      	* dbus/dbus-protocol.h:
      	Remove old array types.
      	Add types: BYTE, ARRAY, DICT, NAMED
      
      	* dbus/dbus-string.c:
      	* dbus/dbus-sysdeps.c:
      	Make parse_double locale safe.
      
      	* dbus/dbus-test-main.c:
      	Call setlocale.
      
      	* dbus/dbus-test.c:
      	Kill dict test
      
      	* doc/dbus-specification.sgml:
      	Update spec
      
      	* test/data/incomplete-messages/missing-body.message:
      	* test/data/invalid-messages/bad-boolean.message:
      	* test/data/invalid-messages/bad-boolean-array.message:
      	* test/data/invalid-messages/boolean-array-length-too-long.message-raw:
      	* test/data/invalid-messages/boolean-has-no-value.message-raw:
      	* test/data/invalid-messages/too-short-dict.message:
      	* test/data/valid-messages/dict-simple.message:
      	* test/data/valid-messages/dict.message:
      	* test/data/valid-messages/emptiness.message:
      	* test/data/valid-messages/lots-of-arguments.message:
      	* test/data/valid-messages/no-padding.message:
      	* test/data/valid-messages/recursive-types.message:
      	Add missing NAME fields
      	Fix up dicts & arrays
      
      	* test/data/invalid-messages/dict-with-nil-value.message:
      	Removed, this is not invalid anymore.
      
      	* test/data/valid-messages/recursive-types.message:
      	Add new test for deeply recursive types.
      c5020ac8
  7. 03 Apr, 2003 1 commit
    • 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
  8. 31 Mar, 2003 1 commit
    • 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
  9. 25 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-24 Havoc Pennington <hp@redhat.com> · ce4fd314
      Havoc Pennington authored
      	* 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
      ce4fd314
  10. 20 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-20 Havoc Pennington <hp@pobox.com> · 056d76d8
      Havoc Pennington authored
      	* bus/connection.c (bus_connection_send_oom_error): assert that
      	message has a sender
      	(connection_execute_transaction): ditto
      	(bus_connection_preallocate_oom_error): fix to set the sender, and
      	set recipient to the destination service, not the bus driver
      
      	* bus/policy.c: hacking
      
      	* dbus/dbus-message.c (dbus_message_service_is): new function
      	(dbus_message_sender_is): new
      056d76d8
  11. 17 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-17 Havoc Pennington <hp@redhat.com> · 615fa679
      Havoc Pennington authored
      	* dbus/dbus-internals.h: add gcc attributes so that
      	our printf-style functions warn on bad arguments to
      	format
      
      	* dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
      	format bug
      
      	* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
      	printf format bug
      615fa679
  12. 16 Mar, 2003 4 commits
    • 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
    • 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
    • Anders Carlsson's avatar
      2003-03-16 Anders Carlsson <andersca@codefactory.se> · e537e421
      Anders Carlsson authored
      	* dbus/dbus-connection.c:
      	(dbus_connection_send_with_reply_and_block):
      	Decrease connection->n_incoming when removing an entry
      	from the list.
      	* dbus/dbus-dict.c: (dbus_dict_entry_free),
      	(dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
      	(dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
      	(dbus_dict_set_byte_array), (dbus_dict_set_string_array),
      	(dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
      	(dbus_dict_get_byte_array):
      	Handle NULL arrays and strings. Also add support for byte arrays.
      
      	* dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
      	(_dbus_marshal_dict), (_dbus_demarshal_byte_array),
      	(_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
      	(_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
      	(_dbus_demarshal_dict), (demarshal_and_validate_len),
      	(_dbus_marshal_validate_arg), (_dbus_marshal_test):
      	* dbus/dbus-marshal.h:
      	Add support for marshalling and demarshalling empty arrays and strings.
      
      	* dbus/dbus-message.c: (dbus_message_append_args_valist),
      	(dbus_message_append_string_array),
      	(dbus_message_iter_get_boolean),
      	(dbus_message_iter_get_boolean_array),
      	(dbus_message_iter_get_int32_array),
      	(dbus_message_iter_get_uint32_array),
      	(dbus_message_iter_get_double_array),
      	(dbus_message_iter_get_byte_array),
      	(dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
      	(check_message_handling):
      	Add support for getting empty arrays and dicts.
      
      	* dbus/dbus-string.c: (_dbus_string_validate_utf8):
      	Don't do any validation at all for now, that's better than just checking
      	for ASCII.
      
      	* test/data/valid-messages/emptiness.message:
      	New test message with lots of empty arrays.
      e537e421
    • Havoc Pennington's avatar
      2003-03-16 Havoc Pennington <hp@pobox.com> · 5c53fb2a
      Havoc Pennington authored
      	* dbus/dbus-connection.c
      	(_dbus_connection_queue_received_message_link): new function that
      	can't fail due to OOM
      
      	* dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
      	new function pops a message together with a list link
      	containing it.
      
      	* dbus/dbus-transport-unix.c (queue_messages): use new link-based
      	message queuing functions to avoid needing to alloc memory
      5c53fb2a
  13. 15 Mar, 2003 2 commits
    • 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
    • Havoc Pennington's avatar
      2003-03-14 Havoc Pennington <hp@redhat.com> · 4c95a978
      Havoc Pennington authored
      	* dbus/dbus-memory.c: add a "detect buffer overwrites on free"
      	cheesy hack
      
      	* dbus/dbus-transport-debug.c: rework this a good bit to be
      	less complicated. hopefully still works.
      
      	* dbus/dbus-server-debug.c (handle_new_client): remove timeout
      	manually
      
      	* glib/dbus-gmain.c (timeout_handler): don't remove timeout
      	after running it
      
      	* dbus/dbus-message.c (dbus_message_copy): rename from
      	dbus_message_new_from_message, fix it up to copy
      	all the message fields, add test case
      
      	* bus/dispatch.c (bus_dispatch_test): add some more test code,
      	not quite passing yet
      4c95a978
  14. 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
  15. 10 Mar, 2003 1 commit
    • Anders Carlsson's avatar
      2003-03-10 Anders Carlsson <andersca@codefactory.se> · 799a3ff4
      Anders Carlsson authored
      	* dbus/dbus-marshal.c:
      	(_dbus_marshal_set_string):
      	Take a length argument so we can marshal the correct string
      	length.
      
      	(_dbus_marshal_dict), (_dbus_demarshal_dict),
      	(_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
      	(_dbus_marshal_test):
      	* dbus/dbus-marshal.h:
      	Add support for marshalling and demarshalling dicts.
      
      	* dbus/dbus-message-builder.c: (_dbus_message_data_load):
      	Add support for TYPE DICT.
      
      	* dbus/dbus-message.c: (set_string_field):
      	Adjust header padding.
      
      	(dbus_message_append_args_valist), (dbus_message_append_dict),
      	(dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
      	(dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
      	(check_message_handling), (check_have_valid_message):
      	* dbus/dbus-message.h:
      	Add functions for setting and getting dicts.
      
      	* dbus/dbus-protocol.h:
      	Add DBUS_TYPE_DICT.
      
      	* dbus/dbus.h:
      	Add dbus-dict.h
      
      	* doc/dbus-specification.sgml:
      	Add information about how dicts are marshalled.
      
      	* test/data/invalid-messages/dict-with-nil-value.message:
      	* test/data/invalid-messages/too-short-dict.message:
      	* test/data/valid-messages/dict-simple.message:
      	* test/data/valid-messages/dict.message:
      	Add sample messages containing dicts.
      799a3ff4
  16. 05 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-04 Havoc Pennington <hp@pobox.com> · 7e050c88
      Havoc Pennington authored
      	* test/data/auth/*: adapt to changes
      
      	* dbus/dbus-auth-script.c (_dbus_auth_script_run): add
      	USERID_BASE64 and change USERNAME_BASE64 to put in username not
      	userid
      
      	* dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
      	more stuff from being in a context name, to make the protocol
      	simpler to deal with
      
      	* dbus/dbus-errors.c (dbus_error_has_name): new function
      	(dbus_error_is_set): new function
      
      	* dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
      	with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
      
      	* dbus/dbus-connection.c (dbus_connection_flush): also read
      	messages during a flush operation
      
      	* dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
      7e050c88
  17. 04 Mar, 2003 1 commit
  18. 02 Mar, 2003 1 commit
  19. 27 Feb, 2003 1 commit
    • Havoc Pennington's avatar
      2003-02-27 Havoc Pennington <hp@pobox.com> · ff190005
      Havoc Pennington authored
      	* dbus/dbus-connection.c
      	(dbus_connection_send_message_with_reply_and_block): fix doh!
      	doh! doh! bug that resulted in never removing a reply from the
      	queue, no wonder we called get_reply_serial so much ;-)
      
      	* dbus/dbus-message.c (struct DBusMessage): cache reply serial
      	and client serial instead of demarshaling them every time
      ff190005
  20. 26 Feb, 2003 2 commits
    • Alexander Larsson's avatar
      2003-02-26 Alexander Larsson <alexl@redhat.com> · 89e6dfd2
      Alexander Larsson authored
      	* configure.in:
      	Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
      
      	* dbus/dbus-connection.c:
      	* dbus/dbus-connection.h:
      	Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
      	Add dbus_connection_set_wakeup_main_function and use it when queueing
      	incoming and outgoing messages.
      
      
      	* dbus/dbus-dataslot.c:
      	Threadsafe usage of DBusDataSlotAllocator
      
      	* dbus/dbus-message.c: (dbus_message_get_args_iter):
      	dbus_new can fail.
      
      	* dbus/dbus-server-unix.c:
      	Add todo comment
      
      	* glib/dbus-gmain.c:
      	Implement the new wakeup functions for glib.
      
      	* glib/Makefile.am:
      	* glib/test-thread-client.c:
      	* glib/test-thread-server.c:
      	* glib/test-thread.h:
      	Initial cut at some thread test code. Not really done yet.
      89e6dfd2
    • Havoc Pennington's avatar
      2003-02-26 Havoc Pennington <hp@pobox.com> · 72654234
      Havoc Pennington authored
      	* dbus/dbus-connection.c
      	(dbus_connection_send_message_with_reply_and_block): fix crash
      	where we ref'd the outgoing message instead of the returned reply
      
      	* dbus/dbus-transport-unix.c (do_authentication): check read watch
      	at the end of this function, so if we didn't need to read for
      	authentication, we reinstall it for receiving messages
      
      	* dbus/dbus-message.c (dbus_message_new_reply): allow replies to
      	a NULL sender for peer-to-peer case
      
      	* dbus/dbus-transport-unix.c (check_read_watch): handle
      	!authenticated case correctly
      
      	* glib/dbus-gmain.c: add support for DBusServer
      
      	* dbus/dbus-server.c: add data slot support
      
      	* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
      	return values and handle errors
      
      	* dbus/dbus-dataslot.c: factor out the data slot stuff from
      	DBusConnection
      
      	* Doxyfile.in (INPUT): add glib subdir
      
      	* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
      	setup_with_g_main instead of hookup_with_g_main; write docs
      72654234
  21. 24 Feb, 2003 2 commits
    • Anders Carlsson's avatar
      2003-02-24 Anders Carlsson <andersca@codefactory.se> · 3781f063
      Anders Carlsson authored
      	* dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
      	* dbus/dbus-message-builder.c: (_dbus_message_data_load):
      	* dbus/dbus-message.c: (dbus_message_append_boolean),
      	(dbus_message_append_boolean_array),
      	(dbus_message_get_args_valist), (_dbus_message_test):
      	* dbus/dbus-message.h:
      	* doc/dbus-specification.sgml:
      	Various fixes as pointed out by Havoc.
      
      	* test/data/invalid-messages/bad-boolean-array.message:
      	* test/data/invalid-messages/bad-boolean.message:
      	Add invalid boolean value test cases.
      3781f063
    • Anders Carlsson's avatar
      2003-02-24 Anders Carlsson <andersca@codefactory.se> · c8769e0b
      Anders Carlsson authored
      	* dbus/dbus-internals.c: (_dbus_type_to_string):
      	* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
      	(_dbus_marshal_validate_arg):
      	* dbus/dbus-message-builder.c: (_dbus_message_data_load):
      	* dbus/dbus-message.c: (dbus_message_append_args_valist),
      	(dbus_message_append_boolean), (dbus_message_append_boolean_array),
      	(dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
      	(dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
      	(dbus_message_iter_get_double),
      	(dbus_message_iter_get_boolean_array), (message_iter_test):
      	* dbus/dbus-message.h:
      	* dbus/dbus-protocol.h:
      	* doc/dbus-specification.sgml:
      	* test/data/valid-messages/lots-of-arguments.message:
      	Add support for boolean and boolean array types.
      c8769e0b
  22. 22 Feb, 2003 1 commit
    • Havoc Pennington's avatar
      2003-02-22 Havoc Pennington <hp@pobox.com> · 6c07098c
      Havoc Pennington authored
      	* dbus/dbus-message.c (dbus_message_iter_get_string_array):
      	(dbus_message_iter_get_byte_array): Fix up doxygen warnings
      
      	* dbus/dbus-sha.c: add implementation of SHA-1 algorithm
      
      	* dbus/test/data/sha-1: add US government test suite for SHA-1
      6c07098c
  23. 21 Feb, 2003 3 commits
    • Anders Carlsson's avatar
      2003-02-21 Anders Carlsson <andersca@codefactory.se> · 92f7d50b
      Anders Carlsson authored
      	* dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
      	Make string arrays NULL-terminated.
      
      	* dbus/dbus-memory.c: (dbus_free_string_array):
      	* dbus/dbus-memory.h:
      	New function for freeing NULL-terminated string arrays.
      
      	* dbus/dbus-message-builder.c: (append_quoted_string),
      	(_dbus_message_data_load):
      	Add support for array types.
      
      	* dbus/dbus-message.c: (check_message_handling):
      	Add more types as test cases.
      
      	* dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
      	(_dbus_string_parse_double):
      	Add the start offset to the end offset.
      
      	* test/data/valid-messages/lots-of-arguments.message:
      	New test message with lots of arguments.
      92f7d50b
    • Anders Carlsson's avatar
      2003-02-21 Anders Carlsson <andersca@codefactory.se> · fdb3ecc3
      Anders Carlsson authored
      	* dbus/dbus-message.c: (dbus_message_append_nil),
      	(dbus_message_append_int32), (dbus_message_append_uint32),
      	(dbus_message_append_double), (dbus_message_append_string),
      	(dbus_message_append_int32_array),
      	(dbus_message_append_uint32_array),
      	(dbus_message_append_double_array),
      	(dbus_message_append_byte_array),
      	(dbus_message_append_string_array):
      	Fix all out-of-memory handling in these functions.
      fdb3ecc3
    • Anders Carlsson's avatar
      2003-02-21 Anders Carlsson <andersca@codefactory.se> · babdabd4
      Anders Carlsson authored
      	* dbus/dbus-message.c: (dbus_message_append_args_valist),
      	(dbus_message_append_nil), (dbus_message_append_int32_array),
      	(dbus_message_append_uint32_array),
      	(dbus_message_append_double_array),
      	(dbus_message_append_byte_array),
      	(dbus_message_append_string_array), (dbus_message_get_args_valist),
      	(dbus_message_iter_get_int32_array),
      	(dbus_message_iter_get_uint32_array),
      	(dbus_message_iter_get_double_array),
      	(dbus_message_iter_get_byte_array),
      	(dbus_message_iter_get_string_array):
      	* dbus/dbus-message.h:
      	Add functions for appending and getting arrays.
      babdabd4
  24. 19 Feb, 2003 1 commit
    • Havoc Pennington's avatar
      2003-02-19 Havoc Pennington <hp@pobox.com> · c21511c0
      Havoc Pennington authored
      	Throughout: mop up all the Doxygen warnings and undocumented
      	stuff.
      
      	* dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
      	to search any paths.
      
      	* dbus/dbus-threads.c: move global mutex initializers to
      	dbus-internals.h, multiple prototypes was confusing doxygen
      	besides being kind of ugly
      
      	* Doxyfile (PREDEFINED): have Doxygen define
      	DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
      	docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
      	(do not abuse the feature! it's for stuff like the autogenerated
      	macros in dbus-md5.c, not just for things you don't feel like
      	documenting...)
      c21511c0
  25. 18 Feb, 2003 1 commit
  26. 16 Feb, 2003 4 commits
    • Anders Carlsson's avatar
      2003-02-17 Anders Carlsson <andersca@codefactory.se> · 8b9b1c52
      Anders Carlsson authored
      	* dbus/dbus-message.c: (decode_header_data),
      	(_dbus_message_loader_return_buffer):
      	Set the header padding amount when loading a message.
      8b9b1c52
    • Havoc Pennington's avatar
      add more verbose debug spew · 034e35b3
      Havoc Pennington authored
      034e35b3
    • 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> · 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