1. 09 Nov, 2004 1 commit
    • Colin Walters's avatar
      2004-11-09 Colin Walters <walters@verbum.org> · 935a41a0
      Colin Walters authored
      	* dbus/dbus-string.c (_dbus_string_get_length): New
      	function, writes DBusString to C buffer.
      
      	* dbus/dbus-string.h: Prototype it.
      
      	* dbus/dbus-message.c (dbus_message_type_to_string): New
      	function, converts message type into C string.
      
      	* dbus/dbus-message.h: Prototype it.
      
      	* bus/selinux.c (bus_selinux_check): Take source pid,
      	target pid, and audit data.  Pass audit data to
      	avc_has_perm.
      	(log_audit_callback): New function, appends extra
      	audit information.
      	(bus_selinux_allows_acquire_service): Also take
      	service name, add it to audit data.
      	(bus_selinux_allows_send): Also take message
      	type, interface, method member, error name,
      	and destination, and add them to audit data.
      	(log_cb): Initialize func_audit.
      
      	* bus/selinux.h (bus_selinux_allows_acquire_service)
      	(bus_selinux_allows_send): Update prototypes
      
      	* bus/services.c (bus_registry_acquire_service): Pass
      	service name to bus_selinux_allows_acquire_service.
      
      	* bus/bus.c (bus_context_check_security_policy): Pass
      	additional audit data.  Move assignment of dest
      	to its own line.
      935a41a0
  2. 09 Sep, 2004 1 commit
  3. 10 Aug, 2004 1 commit
  4. 29 Mar, 2004 1 commit
    • Michael Meeks's avatar
      2004-03-29 Michael Meeks <michael@ximian.com> · 004b37ec
      Michael Meeks authored
      	* dbus/dbus-message.c
      	(dbus_message_new_error_printf): impl.
      
      	* dbus/dbus-connection.c
      	(dbus_connection_unregister_object_path): fix warning.
      
      	* configure.in: fix no-mono-installed situation.
      004b37ec
  5. 23 Mar, 2004 1 commit
  6. 21 Mar, 2004 1 commit
    • Olivier Andrieu's avatar
      * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty · eacb2afd
      Olivier Andrieu authored
      arrays
      
      * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
      (dbus_message_iter_init_array_iterator)
      (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
      indicate whether the iterator is empty
      
      * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
      warnings
      eacb2afd
  7. 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
  8. 02 Dec, 2003 1 commit
  9. 27 Nov, 2003 1 commit
  10. 21 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-20 Havoc Pennington <hp@redhat.com> · 75742242
      Havoc Pennington authored
              hmm, make check is currently not passing.
      
      	* doc/dbus-specification.xml: add requirement that custom type
      	names follow the same rules as interface names.
      
      	* dbus/dbus-protocol.h: change some of the byte codes, to avoid
      	duplication and allow 'c' to be 'custom'; dict is now 'm' for
      	'map'
      
      	* doc/dbus-specification.xml: update type codes to match
      	dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
      	CUSTOM. Add type OBJECT_PATH to the spec.
      
      2003-10-17  Havoc Pennington  <hp@redhat.com>
      
      	* bus/driver.c (create_unique_client_name): use "." as separator
      	in base service names instead of '-'
      
      	* dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
      	byte at the end of the string
      
      	* dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
      	optimization macros since string validation seems to be a slow
      	point.
      
      	* doc/dbus-specification.xml: restrict valid
      	service/interface/member/error names. Add test suite code for the
      	name validation.
      
      	* dbus/dbus-string.c: limit service/interface/member/error names
      	to [0-9][A-Z][a-z]_
      
      	* dbus/dbus-connection.c (dbus_connection_dispatch): add missing
      	format arg to verbose spew
      
      	* glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
      	memory, return instead of g_error
      
      	* test/test-service.c (path_message_func): support emitting a
      	signal on request
      
      	* dbus/dbus-bus.c (init_connections_unlocked): only fill in
      	activation bus type if DBUS_BUS_ACTIVATION was set; default to
      	assuming the activation bus was the session bus so that services
      	started manually will still register.
      	(init_connections_unlocked): fix so that in OOM situation we get
      	the same semantics when retrying the function
      
      	* test/test-service.c (main): change to use path registration, to
      	test those codepaths; register with DBUS_BUS_ACTIVATION rather
      	than DBUS_BUS_SESSION
      75742242
  11. 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
  12. 12 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-11 Havoc Pennington <hp@pobox.com> · 56cc4ae1
      Havoc Pennington authored
      	* test/decode-gcov.c (function_solve_graph): make broken block
      	graph a nonfatal error since it seems to be broken. Need to debug
      	this.
      
      	* dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
      	can't just check type > INVALID < LAST anymore
      
      	* dbus/dbus-message.c (dbus_message_get_signature): new function
      	(dbus_message_has_signature): new function
      	(struct DBusMessage): add signature field (right now it isn't sent
      	over the wire, just generated on the fly)
      	(dbus_message_copy): copy the signature, and init strings to
      	proper length to avoid some reallocs
      	(dbus_message_iter_init_array_iterator): return void, since it
      	can't fail
      	(dbus_message_iter_init_dict_iterator): return void since it can't fail
      	(_dbus_message_loader_queue_messages): add silly temporary hack to
      	fill in message->signature on load
      
      	* dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
      	characters, so they are relatively human-readable.
      56cc4ae1
  13. 10 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-09 Havoc Pennington <hp@redhat.com> · 6a65f480
      Havoc Pennington authored
              Make matching rules theoretically work (add parser).
      
      	* bus/bus.c (bus_context_check_security_policy): fix up to handle
      	the case where destination is explicitly specified as bus driver
      	and someone else is eavesdropping.
      
      	* bus/policy.c (bus_client_policy_check_can_receive): fix up
      	definition of eavesdropping and assertion
      
      	* tools/dbus-send.c (main): use dbus_message_type_from_string
      
      	* bus/signals.c (bus_match_rule_parse): implement
      
      	* dbus/dbus-message.c (dbus_message_type_from_string): new
      
      	* dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
      6a65f480
  14. 07 Sep, 2003 1 commit
  15. 31 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-30 Havoc Pennington <hp@pobox.com> · 5fd1e389
      Havoc Pennington authored
      	* test/data/valid-config-files/system.d/test.conf: change to
      	root for the user so warnings don't get printed
      
      	* dbus/dbus-message.c: add dbus_message_get_path,
      	dbus_message_set_path
      
      	* dbus/dbus-object-tree.c (do_test_dispatch): add test of
      	dispatching to a path
      
      	* dbus/dbus-string.c (_dbus_string_validate_path): add
      
      	* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
      	(_dbus_marshal_object_path): implement
      
      	* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
      	to contain the path to the target object
      	(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
      	DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
      5fd1e389
  16. 18 Aug, 2003 2 commits
    • Havoc Pennington's avatar
      2003-08-18 Havoc Pennington <hp@redhat.com> · 68a3c593
      Havoc Pennington authored
      	* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
      
      	* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
      	dumb bug created earlier (wrong order of args to
      	decode_header_data())
      
      	* tools/dbus-send.c: port
      
      	* tools/dbus-print-message.c (print_message): port
      
              * test/data/*messages: port all messages over
      
              * dbus/dbus-message-builder.c: support including
      	message type
      
              * bus/driver.c: port over
      
      	* bus/dispatch.c: port over to new stuff
      
      	* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
      	rename disconnect signal to "Disconnected"
      68a3c593
    • Havoc Pennington's avatar
      2003-08-17 Havoc Pennington <hp@pobox.com> · 95717a93
      Havoc Pennington authored
      	This doesn't compile yet, but syncing up so I can hack on it from
      	work. What are branches for if not broken code? ;-)
      
      	* dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
      	DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
      	DBUS_HEADER_FIELD_ERROR_NAME
      
      	* dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
      	for the interface+member pairs
      	(string_hash): change to use g_str_hash algorithm
      	(find_direct_function, find_string_function): refactor these to
      	share most code.
      
      	* dbus/dbus-message.c: port all of this over to support
      	interface/member fields instead of name field
      
      	* dbus/dbus-object-registry.c: port over
      
      	* dbus/dbus-string.c (_dbus_string_validate_interface): rename
      	from _dbus_string_validate_name
      
      	* bus/dbus-daemon-1.1: change file format for the
      	<deny>/<allow> stuff to match new message naming scheme
      
      	* bus/policy.c: port over
      
      	* bus/config-parser.c: parse new format
      95717a93
  17. 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
  18. 02 Aug, 2003 2 commits
    • Havoc Pennington's avatar
      2003-08-02 Havoc Pennington <hp@pobox.com> · ff8908f1
      Havoc Pennington authored
      	* dbus/dbus-message.c (dbus_message_get_no_reply)
      	(dbus_message_set_no_reply): add these and remove
      	set_is_error/get_is_error
      
      	* dbus/dbus-protocol.h, doc/dbus-specification.sgml:
      	remove the ERROR flag, since there's now an ERROR type
      ff8908f1
    • Havoc Pennington's avatar
      2003-08-01 Havoc Pennington <hp@pobox.com> · 9c5d01f0
      Havoc Pennington authored
      	* dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
      	implement
      
      	* dbus/dbus-message.c (dbus_message_get_type): new function
      
      	* doc/dbus-specification.sgml: add "type" byte to messages
      9c5d01f0
  19. 09 Jul, 2003 1 commit
    • Havoc Pennington's avatar
      2003-07-08 Havoc Pennington <hp@pobox.com> · 824d4a5e
      Havoc Pennington authored
      	* dbus/dbus-object.c: implement some of this
      
      	* dbus/dbus-object-registry.c
      	(_dbus_object_registry_add_and_unlock): fill in the object_id out
      	param
      	(_dbus_object_registry_new): handle OOM
      824d4a5e
  20. 22 Jun, 2003 1 commit
    • Havoc Pennington's avatar
      2003-06-22 Havoc Pennington <hp@pobox.com> · 95880541
      Havoc Pennington authored
      	* mono/Message.cs: implement Message.Wrap() that ensures we only
      	have a single C# wrapper per DBusMessage, assuming it works which
      	it probably doesn't.
      
      	* dbus/dbus-message.c (dbus_message_allocate_data_slot): new
      	(dbus_message_free_data_slot): new
      	(dbus_message_set_data): new
      	(dbus_message_get_data): new
      95880541
  21. 24 Apr, 2003 1 commit
  22. 23 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-22 Havoc Pennington <hp@redhat.com> · b29d0c53
      Havoc Pennington authored
      	* dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
      	support, and do some code cleanups to share more code and
      	speed up array marshal/demarshal.
      
      	* dbus-1.0.pc.in (Cflags): put libdir include file in cflags
      
      	* configure.in: generate dbus-arch-deps.h
      
      	* dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
      	64-bit typecodes
      b29d0c53
  23. 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
  24. 10 Apr, 2003 2 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
  25. 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
  26. 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
  27. 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
  28. 15 Mar, 2003 1 commit
    • 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
  29. 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
  30. 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
  31. 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
  32. 21 Feb, 2003 1 commit
    • 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
  33. 16 Feb, 2003 2 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> · 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
  34. 13 Feb, 2003 1 commit
    • 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