1. 08 Aug, 2006 2 commits
    • John Palmieri's avatar
      * dbus/dbus-sysdeps.h: · d3874114
      John Palmieri authored
      * dbus/dbus-sysdeps.c:
      * dbus/dbus-string.c:
        s/_dbus_printf_length/_dbus_printf_string_upper_bound to comform with
        GLib's function which does the same thing
      * configure.in:
      * bus/Makefile.am:
      * bus/dir-watch-default.c:
      * bus/dir-watch-dnotify.c:
      * bus/dir-watch-kqueue.c:
        Add kqueue directory watching for freebsd and split the directory
        watching code into seperate files per method/arch
        (patches from Timothy Redaelli <drizzt at gufi dotorg>)
    • John Palmieri's avatar
      * dbus/dbus-sysdeps.h: · 7bb2361e
      John Palmieri authored
      * dbus/dbus-sysdeps.c:
        add _dbus_printf_length (patch from Peter Kümmel
        <syntheticpp at gmx dot net>)
  2. 03 Aug, 2006 1 commit
  3. 16 Feb, 2006 1 commit
    • Robert McQueen's avatar
      2006-02-16 Robert McQueen <robot101@debian.org> · 0d0642b3
      Robert McQueen authored
      	* dbus/dbus-message.c (dbus_message_iter_get_fixed_array):
      	Patch from Rob Taylor <rob.taylor@collabora.co.uk> to correct a bogus
      	assertion that the next element to read from the iter is fixed in
      	size. This is not the case when you are at the end of the iter,
      	because the next element type is INVALID.
      	* dbus/dbus-string.c (_dbus_string_init_const_len): Correct a
      	a bogus assert which means that you may not initialise a 0-length
      	string unless you provide a non-NULL pointer. This prevented
      	you from marshalling messages containing zero-length arrays in
      	some cases.
      	* glib/dbus-gvalue.c (demarshal_collection_array): Another patch
      	from Rob to correct bogus asserts when trying to demarshal an
      	array and get_fixed_array got you 0 elements. Append nothing to
      	the GArray in this case.
      	* test/glib/test-dbus-glib.c: Add a test case for round-tripping
      	an empty array via the glib bindings. Without all of the above
      	patches, this new test fails.
  4. 10 Apr, 2005 1 commit
  5. 25 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-25 Havoc Pennington <hp@redhat.com> · 7ce7502e
      Havoc Pennington authored
      	* doc/dbus-specification.xml: document the GUID thing
      	* dbus/dbus-server.c (_dbus_server_init_base): initialize a
      	globally unique ID for the server, and put a "guid=hexencoded"
      	field in the address
      	* dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
      	* dbus/dbus-message.c: ditto
      	* dbus/dbus-dataslot.c: ditto
      	* dbus/dbus-list.c: ditto
      	* dbus/dbus-internals.h: wait, just include
      	dbus-threads-internal.h here
      	* dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
      	use in main library
      	* dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
  6. 11 Feb, 2005 1 commit
    • Havoc Pennington's avatar
      2005-02-10 Havoc Pennington <hp@redhat.com> · aa4f8237
      Havoc Pennington authored
      	* test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
      	(call dbus_g_proxy_add_signal)
      	* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
      	escape the hostname
      	(_dbus_server_new_for_domain_socket): escape the path
      	* dbus/dbus-address.c (dbus_address_escape_value): new
      	(dbus_address_unescape_value): new
      	(dbus_parse_address): unescape values
      	* dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
      	* doc/dbus-specification.xml: explain how to escape values in
  7. 28 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-27 Havoc Pennington <hp@redhat.com> · 3ed9db54
      Havoc Pennington authored
      	* dbus/dbus-arch-deps.h.in: add 16/32-bit types
      	* configure.in: find the right type for 16 and 32 bit ints as well
      	as 64
      	* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
      	the 16-bit types so people don't have to stuff them in 32-bit or
      	byte arrays.
  8. 17 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-16 Havoc Pennington <hp@redhat.com> · 7bf62e31
      Havoc Pennington authored
              This is about it on what can be disabled/deleted from libdbus
      	easily, back below 150K anyhow. Deeper cuts are more work than
      	just turning the code off as I've done here.
      	* dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
      	signed int convenience funcs
      	* dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
      	verbose mode
      	* dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
      	things out of libdbus
      	* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
      	* dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
      	tests-enabled-only, though it should probably be deleted)
      	* dbus/dbus-message-util.c: same stuff
      	* dbus/dbus-auth-util.c: same stuff
  9. 16 Jan, 2005 2 commits
    • Havoc Pennington's avatar
      2005-01-16 Havoc Pennington <hp@redhat.com> · 31988af4
      Havoc Pennington authored
              * Add and fix docs according to Doxygen warnings throughout
      	* dbus/dbus-marshal-recursive.c
      	(_dbus_type_reader_array_is_empty): change this to just call
      	array_reader_get_array_len() and make it static
      	* dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
      	from get_array_type
      	(dbus_message_iter_init_append): rename from append_iter_init
      	* dbus/dbus-marshal-recursive.c
      	(_dbus_type_reader_get_element_type): rename from
    • Havoc Pennington's avatar
      2005-01-15 Havoc Pennington <hp@redhat.com> · b3416423
      Havoc Pennington authored
      	* test/glib/test-profile.c (with_bus_server_filter): fix crash
      	* dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
      	(_dbus_marshal_set_basic): be sure we align for the string length
      	* dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
      	this look faster
      	* dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
      	inline macro version
      	(_dbus_string_set_byte): provide inline macro version
  10. 15 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-15 Havoc Pennington <hp@redhat.com> · 9c3d566e
      Havoc Pennington authored
      	* Land the new message args API and type system.
      	This patch is huge, but the public API change is not
      	really large. The set of D-BUS types has changed somewhat,
      	and the arg "getters" are more geared toward language bindings;
      	they don't make a copy, etc.
      	There are also some known issues. See these emails for details
      	on this huge patch:
      	* dbus/dbus-marshal-*: all the new stuff
      	* dbus/dbus-message.c: basically rewritten
      	* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
      	freed blocks to be all non-nul bytes so using freed memory is less
      	likely to work right
      	* dbus/dbus-internals.c (_dbus_test_oom_handling): add
      	DBUS_FAIL_MALLOC=N environment variable, so you can do
      	DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
      	DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
      	* qt/message.cpp: port to the new message args API
      	(operator<<): use str.utf8() rather than str.unicode()
      	(pretty sure this is right from the Qt docs?)
      	* glib/dbus-gvalue.c: port to the new message args API
      	* bus/dispatch.c, bus/driver.c: port to the new message args API
      	* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
      	"locked" flag to TRUE and align_offset to 0; I guess we never
      	looked at these anyhow, but seems cleaner.
      	* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
      	move allocation padding macro to this header; use it to implement
      	(_DBUS_STRING_STATIC): ability to declare a static string.
      	* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
      	change to return TRUE if the interface is not set.
      	* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
      	to dbus-marshal-validate.[hc]
      	* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
      	* dbus/Makefile.am: cut over from dbus-marshal.[hc]
      	to dbus-marshal-*.[hc]
      	* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
      	function here from dbus-marshal.c
  11. 03 Jan, 2005 1 commit
  12. 01 Jan, 2005 1 commit
  13. 31 Dec, 2004 1 commit
  14. 19 Dec, 2004 2 commits
    • Havoc Pennington's avatar
      2004-12-19 Havoc Pennington <hp@redhat.com> · 617e73f7
      Havoc Pennington authored
      	* dbus/dbus-string.c (_dbus_string_insert_4_aligned)
      	(_dbus_string_insert_8_aligned): new functions
      	* dbus/dbus-string.c (_dbus_string_alloc_space): new function
    • Havoc Pennington's avatar
      2004-12-18 Havoc Pennington <hp@redhat.com> · f3228b47
      Havoc Pennington authored
      	* dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
      	* dbus/dbus-message.c: fix a comment, and add a still-unused
      	not-implemented function
      	* dbus/dbus-marshal.h: fix comment
      	* dbus/dbus-internals.h (_DBUS_ISASCII): new macro
  15. 27 Nov, 2004 1 commit
    • Havoc Pennington's avatar
      2004-11-27 Havoc Pennington <hp@redhat.com> · b60c835d
      Havoc Pennington authored
      	* dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
      	are disabled
      	(_dbus_string_get_const_data): inline when asserts are disabled
      	* dbus/dbus-message.c: record the _dbus_current_generation of
      	creation so we can complain if dbus_shutdown() is used improperly.
      	Do this only if checks are enabled.
      	* dbus/dbus-connection.c: ditto
  16. 26 Nov, 2004 1 commit
    • Havoc Pennington's avatar
      2004-11-25 Havoc Pennington <hp@redhat.com> · dbdea921
      Havoc Pennington authored
              The primary change here is to always write() once before adding
      	the write watch, which gives us about a 10% performance increase.
      	* dbus/dbus-transport-unix.c: a number of modifications to cope
      	with removing messages_pending
      	(check_write_watch): properly handle
      	DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
      	messages_pending stuff
      	(check_read_watch): properly handle WAITING_FOR_MEMORY and
      	AUTHENTICATED cases
      	(unix_handle_watch): after writing, see if the write watch can be
      	(unix_do_iteration): assert that write_watch/read_watch are
      	non-NULL rather than testing that they aren't, since they
      	aren't allowed to be NULL. check_write_watch() at the end so
      	we add the watch if we did not finish writing (e.g. got EAGAIN)
      	* dbus/dbus-transport-protected.h: remove messages_pending call,
      	since it resulted in too much inefficient watch adding/removing;
      	instead we now require that the transport user does an iteration
      	after queueing outgoing messages, and after trying the first
      	write() we add a write watch if we got EAGAIN or exceeded our
      	max bytes to write per iteration setting
      	* dbus/dbus-string.c (_dbus_string_validate_signature): add this
      	* dbus/dbus-server-unix.c (unix_finalize): the socket name was
      	freed and then accessed, valgrind flagged this bug, fix it
      	* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
      	as the last valid field plus 1, where really it is equal to the
      	last valid field. Corrects some message corruption issues.
      	* dbus/dbus-mainloop.c: verbosity changes
      	* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
      	instead of aborting in one of the test codepaths
      	* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
      	caused not printing the pid ever again if a verbose was missing
      	the newline at the end
      	(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
      	* dbus/dbus-connection.c: verbosity changes;
      	(dbus_connection_has_messages_to_send): new function
      	(_dbus_connection_message_sent): no longer call transport->messages_pending
      	(_dbus_connection_send_preallocated_unlocked): do one iteration to
      	try to write() immediately, so we can avoid the write watch. This
      	is the core purpose of this patchset
      	(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
      	dump the outgoing message queue, so nobody will get confused
      	trying to send them or thinking stuff is pending to be sent
      	* bus/test.c: verbosity changes
      	* bus/driver.c: verbosity/assertion changes
      	* bus/dispatch.c: a bunch of little tweaks to get it working again
      	because this patchset changes when/where you need to block.
  17. 22 Nov, 2004 1 commit
    • Havoc Pennington's avatar
      2004-11-22 Havoc Pennington <hp@redhat.com> · 25c1f310
      Havoc Pennington authored
      	* test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
      	threads for more time, so sysprof can get a grip on it.
      	* dbus/dbus-string.c (_dbus_string_validate_utf8): remove
      	pointless variable
  18. 13 Nov, 2004 1 commit
    • Havoc Pennington's avatar
      2004-11-13 Havoc Pennington <hp@redhat.com> · 1b1dfafc
      Havoc Pennington authored
      	* test/glib/test-profile.c: fix this thing up a bit
      	* dbus/dbus-message.c (dbus_message_new_empty_header): increase
      	preallocation sizes by a fair bit; not sure if this will be an
      	overall performance win or not, but it does reduce reallocs.
      	* dbus/dbus-string.c (set_length, reallocate_for_length): ignore
      	the test hack that forced constant realloc if asserts are
      	disabled, so we can profile sanely. Sprinkle in some
      	_DBUS_UNLIKELY() which are probably pointless, but before I
      	noticed the real performance problem I put them in.
      	(_dbus_string_validate_utf8): micro-optimize this thing a little
      	bit, though callgrind says it didn't help; then special-case
      	ascii, which did help a lot; then be sure we detect nul bytes as
      	invalid, which is a bugfix.
      	(align_length_then_lengthen): add some more _DBUS_UNLIKELY
      	superstition; use memset to nul the padding instead of a manual
      	(_dbus_string_get_length): inline this as a
      	macro; it showed up in the profile because it's used for loop
      	tests and so forth
  19. 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
      	(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.
  20. 10 Aug, 2004 1 commit
  21. 02 Jun, 2004 1 commit
    • Kristian Høgsberg's avatar
      2004-06-02 Kristian Høgsberg <krh@redhat.com> · 54dcec2a
      Kristian Høgsberg authored
      	* glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
      	dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
      	quiet doxygen.
      	* Doxyfile.in: remove deprecated options.
      	* dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
      	glib/test-thread.h, glib/test-thread-client.c,
      	glib/test-thread-server.c, glib/test-profile.c,
      	glib/test-dbus-glib.c: remove these unused files.
  22. 28 May, 2004 1 commit
    • Michael Meeks's avatar
      2004-05-28 Michael Meeks <michael@ximian.com> · 0123e6a9
      Michael Meeks authored
      	* glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
      	fix no int64 case.
      	* dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
      	* dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
      	(_dbus_message_iter_get_basic_type_array): impl.
      	drastically simplify ~all relevant _get methods to use these.
      	(dbus_message_iter_append_basic): impl
      	drastically simplify ~all relevant _append methods to use these.
      	* dbus/dbus-message-builder.c (parse_basic_type)
      	(parse_basic_array, lookup_basic_type): impl.
      	(_dbus_message_data_load): prune scads of duplicate /
      	cut & paste coding.
      	* dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
      	(_dbus_demarshal_basic_type): implement,
      	(demarshal_and_validate_len/arg): beef up debug.
      	(_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
  23. 17 May, 2004 1 commit
    • Kristian Høgsberg's avatar
      2004-05-17 Kristian Høgsberg <krh@redhat.com> · d86fc407
      Kristian Høgsberg authored
      	Remove base64 encoding, replace with hex encoding. Original patch
      	from trow@ximian.com, added error handling.
      	* dbus/dbus-string.c (_dbus_string_base64_encode)
      	(_dbus_string_base64_decode): Remove.
      	(_dbus_string_hex_decode): Add end_return argument so we can
      	distinguish between OOM and invalid hex encoding.
      	(_dbus_string_test): Remove base64 tests and add test case for
      	invalid hex.
      	* dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
      	Replace base64 with hex.
      	* test/data/auth/invalid-hex-encoding.auth-script: New test case
      	for invalid hex encoded data in auth protocol.
  24. 05 Mar, 2004 1 commit
    • David Zeuthen's avatar
      2004-03-01 David Zeuthen <david@fubar.dk> · 868dd4b4
      David Zeuthen authored
      	* dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
      	bug where args were used twice. This bug resulted in a segfault
      	on a Debian/PPC system when starting the messagebus daemon. Include
      	dbus-sysdeps.h for DBUS_VA_COPY
      	* dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
      	* configure.in: Check for va_copy; define DBUS_VA_COPY to the
      	appropriate va_copy implementation. From GLib
  25. 02 Dec, 2003 1 commit
  26. 28 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-28 Havoc Pennington <hp@redhat.com> · e11ae724
      Havoc Pennington authored
      	* dbus/dbus-message.c (_dbus_message_test): enable and fix the
      	tests for set_path, set_interface, set_member, etc.
      	* dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
      	* dbus/dbus-message.c (set_string_field): always just delete and
      	re-append the field; accept NULL for deletion
      	(re_align_fields_recurse): reimplement
  27. 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
      	* 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
      	* 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
  28. 25 Sep, 2003 1 commit
    • Mark McLoughlin's avatar
      2003-09-25 Mark McLoughlin <mark@skynet.ie> · 46c072e1
      Mark McLoughlin authored
      	* doc/dbus-specification.sgml: don't require header fields
      	to be 4-byte aligned and specify that fields should be
      	distinguished from padding by the fact that zero is not
      	a valid field name.
      	* doc/TODO: remove re-alignment item and add item to doc
      	the OBJECT_PATH type.
      	* dbus/dbus-message.c:
      	(HeaderField): rename the original member to value_offset
      	and introduce a name_offset member to keep track of where
      	the field actually begins.
      	(adjust_field_offsets): remove.
      	(append_int_field), (append_uint_field),
      	(append_string_field): don't align the start of the header
      	field to a 4-byte boundary.
      	(get_next_field): impl finding the next marhsalled field
      	after a given field.
      	(re_align_field_recurse): impl re-aligning a number of
      	already marshalled fields.
      	(delete_field): impl deleting a field of any type and
      	re-aligning any following fields.
      	(delete_int_or_uint_field), (delete_string_field): remove.
      	(set_int_field), (set_uint_field): no need to re-check
      	that we have the correct type for the field.
      	(set_string_field): ditto and impl re-aligning any
      	following fields.
      	(decode_header_data): update to take into account that
      	the fields aren't 4-byte aligned any more and the new
      	way to distinguish padding from header fields. Also,
      	don't exit when there is too much header padding.
      	(process_test_subdir): print the directory.
      	(_dbus_message_test): add test to make sure a following
      	field is re-aligned correctly after field deletion.
      	* dbus/dbus-string.[ch]:
      	(_dbus_string_insert_bytes): rename from insert_byte and
      	allow the insert of multiple bytes.
      	(_dbus_string_test): test inserting multiple bytes.
      	* dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
      	warning note to docs about having to re-align any
      	marshalled values following the string.
      	* dbus/dbus-message-builder.c:
      	(append_string_field), (_dbus_message_data_load):
      	don't align the header field.
      	* dbus/dbus-auth.c: (process_test_subdir): print the
      	* test/break-loader.c: (randomly_add_one_byte): upd. for
      	insert_byte change.
      	* test/data/invalid-messages/bad-header-field-alignment.message:
      	new test case.
      	* test/data/valid-messages/unknown-header-field.message: shove
      	a dict in the unknown field.
  29. 07 Sep, 2003 1 commit
  30. 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/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 to explicitly say it's the sender service
  31. 25 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-25 Havoc Pennington <hp@pobox.com> · 24f411a6
      Havoc Pennington authored
              Just noticed that dbus_message_test is hosed, I wonder when I
      	broke that. I thought make check was passing earlier...
      	* dbus/dbus-object-tree.c: add new "object tree" to match DCOP
      	container tree, will replace most of dbus-object-registry
      	* dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
  32. 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
      	* 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"
    • 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/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
  33. 12 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-12 Havoc Pennington <hp@pobox.com> · 1d1b0f20
      Havoc Pennington authored
      	* bus/dispatch.c (bus_dispatch): make this return proper
      	DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
      	* dbus/dbus-errors.c (dbus_set_error): use
      	* dbus/dbus-string.c (_dbus_string_append_printf_valist)
      	(_dbus_string_append_printf): new
      	* dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
      	* dbus/dbus-connection.c (dbus_connection_dispatch): handle
      	DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
      	message is unhandled.
  34. 02 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-01 Havoc Pennington <hp@pobox.com> · fe195a91
      Havoc Pennington authored
      	* dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
      	a message type enum to distinguish kinds of message
      	(DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
      	that need not be replied to
      2003-08-01  Havoc Pennington  <hp@pobox.com>
      	* dbus/dbus-marshal.c: adapt to DBusObjectID changes
      	(unpack_8_octets): fix no-64-bit-int bug
      	* dbus/dbus-object-registry.c (validate_id): validate the
      	connection ID bits, not just the instance ID.
      	* dbus/dbus-connection.c (_dbus_connection_init_id): initialize
      	the connection-global 33 bits of the object ID
      	* dbus/dbus-object-registry.c (info_from_entry): fill in
      	object ID in the new way
      	* dbus/dbus-objectid.h: rather than high/low bits, specifically
      	define server/client/instance bits.
  35. 12 May, 2003 1 commit
    • Havoc Pennington's avatar
      2003-05-11 Havoc Pennington <hp@pobox.com> · d4e80132
      Havoc Pennington authored
      	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
      	calling _dbus_marshal_validate_arg() for every byte in a byte
      	array, etc.
      	* dbus/dbus-message-handler.c: use atomic reference counting to
      	reduce number of locks slightly; the global lock in here sucks
      	* dbus/dbus-connection.c
      	(_dbus_connection_update_dispatch_status_and_unlock): variant of
      	update_dispatch_status that can be called with lock held; then use
      	in a couple places to reduce locking/unlocking
      	(dbus_connection_send): hold the lock over the whole function
      	instead of acquiring it twice.
      	* dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
      	* bus/connection.c (bus_connections_setup_connection): fix access
      	to already-freed memory.
      	* dbus/dbus-connection.c: keep a little cache of linked list
      	nodes, to avoid using the global linked list alloc lock in the
      	normal send-message case. Instead we just use the connection lock
      	that we already have to take.
      	* dbus/dbus-list.c (_dbus_list_find_last): new function
      	* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
      	change to use a struct for the atomic type; fix docs,
      	they return value before increment, not after increment.
      	* dbus/dbus-string.c (_dbus_string_append_4_aligned)
      	(_dbus_string_append_8_aligned): new functions to try to
      	microoptimize this operation.
      	(reallocate_for_length): break this out of set_length(), to
      	improve profile info, and also so we can consider inlining the
      	set_length() part.
      	* dbus/dbus-message.c (dbus_message_new_empty_header): init data
      	strings with some preallocation, cuts down on our calls to realloc
      	a fair bit. Though if we can get the "move entire string to empty
      	string" optimization below to kick in here, it would be better.
      	* dbus/dbus-string.c (_dbus_string_move): just call
      	(_dbus_string_move_len): add a special case for moving
      	an entire string into an empty string; we can just
      	swap the string data instead of doing any reallocs.
      	(_dbus_string_init_preallocated): new function
  36. 05 May, 2003 1 commit
    • Havoc Pennington's avatar
      2003-05-04 Havoc Pennington <hp@pobox.com> · d1c7eefb
      Havoc Pennington authored
      	* dbus/dbus-message-handler.c (_dbus_message_handler_test): add
      	unit test
      	* dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
      	function, which assumed length was in # of strings, not bytes
      	* dbus/dbus-message.c (_dbus_message_test): add tests for some
      	missing coverage
      	* dbus/dbus-connection.c
      	(_dbus_connection_queue_received_message): disable function for
      	now, we are only using it in test mode
      	* dbus/dbus-message.c (_dbus_message_loader_queue_messages):
      	remove a mistaken FIXME