1. 05 Apr, 2003 1 commit
  2. 31 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-30 Havoc Pennington <hp@pobox.com> · bc86794f
      Havoc Pennington authored
      	* bus/config-parser.c: hacking
      
      	* dbus/dbus-memory.c: don't use DBusList for the list of stuff
      	to shut down, since it could cause weirdness with the DBusList
      	lock
      
      	* dbus/dbus-list.c (_dbus_list_test): add tests for the
      	link-oriented stack routines
      	(alloc_link): free the mempool if the first alloc from it fails
      
      	* dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
      
      	* dbus/dbus-string.c (UNICODE_VALID): sync new version of this
      	from GLib
      	(_dbus_string_skip_white): new
      
      	* doc/config-file.txt (Elements): add <includedir>
      bc86794f
  3. 28 Mar, 2003 2 commits
    • Anders Carlsson's avatar
      2003-03-28 Anders Carlsson <andersca@codefactory.se> · d361874e
      Anders Carlsson authored
      	* dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
      	* dbus/dbus-bus.h:
      	Add dbus_bus_get.
      
      	* dbus/dbus-memory.c:
      	Fix a doc comment.
      d361874e
    • Havoc Pennington's avatar
      2003-03-28 Havoc Pennington <hp@pobox.com> · bf993813
      Havoc Pennington authored
      	* bus/test.c (bus_test_flush_bus): remove the sleep from here,
      	I think it may have just been superstition. Not sure.
      
      	* dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
      	failures that were not being handled.
      
      	* dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
      
      	* dbus/dbus-memory.c: add ability to set number of mallocs in a
      	row that will fail on out-of-memory.
      
      	* dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
      	function for testing out-of-memory handling.
      
      	* bus/config-loader-expat.c (memsuite): don't wrap the dbus
      	allocation functions, they do map exactly to the expat ones.
      bf993813
  4. 24 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-23 Havoc Pennington <hp@pobox.com> · c3af5ccd
      Havoc Pennington authored
      	* dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
      	DBUS_BUILD_TESTS, actually alloc/free a block of memory for
      	the mutex, so we can check for proper memory management
      	and OOM handling.
      
      	* dbus/dbus-dataslot.c: remove the mutex from
      	DBusDataSlotAllocator and lock it manually when using it,
      	to simplify fitting it into the global slots framework.
      
      	* dbus/dbus-threads.c (init_static_locks): rework how we're
      	handling global locks so they are easily shut down.
      
      	* bus/policy.c (bus_policy_append_rule): fix
      
      	* bus/test-main.c (main): check for memleaks
      
      	* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
      	test suite check for memleaks
      
      	* dbus/dbus-memory.c: add support in test mode for tracking
      	number of outstanding blocks
      c3af5ccd
  5. 16 Mar, 2003 3 commits
    • Havoc Pennington's avatar
      2003-03-16 Havoc Pennington <hp@pobox.com> · d1f65c6c
      Havoc Pennington authored
      	* dbus/dbus-bus.c (ensure_bus_data): handle failure to set
      	connection data
      
      	* dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
      	DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
      d1f65c6c
    • 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
    • Havoc Pennington's avatar
      2003-03-16 Havoc Pennington <hp@pobox.com> · ce173b29
      Havoc Pennington authored
      	Oops - test code was only testing failure of around 30 of the
      	mallocs in the test path, but it turns out there are 500+
      	mallocs. I believe this was due to misguided linking setup such
      	that there was one copy of dbus_malloc etc. in the daemon and one
      	in the shared lib, and only daemon mallocs were tested. In any
      	case, the test case now tests all 500+ mallocs, and doesn't pass
      	yet, though there are lots of fixes in this patch.
      
      	* dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
      	this so that it doesn't need to allocate memory, since it
      	has no way of indicating failure due to OOM (and would be
      	annoying if it did).
      
      	* dbus/dbus-list.c (_dbus_list_pop_first_link): new function
      
      	* bus/Makefile.am: rearrange to create two self-contained
      	libraries, to avoid having libraries with overlapping symbols.
      	that was resulting in weirdness, e.g. I'm pretty sure there
      	were two copies of global static variables.
      
      	* dbus/dbus-internals.c: move the malloc debug stuff to
      	dbus-memory.c
      
      	* dbus/dbus-list.c (free_link): free list mempool if it becomes
      	empty.
      
      	* dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
      
      	* dbus/dbus-address.c (dbus_parse_address): free list nodes
      	on failure.
      
      	* bus/dispatch.c (bus_dispatch_add_connection): free
      	message_handler_slot when no longer using it, so
      	memory leak checkers are happy for the test suite.
      
      	* dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
      
      	* bus/bus.c (new_connection_callback): disconnect in here if
      	bus_connections_setup_connection fails.
      
      	* bus/connection.c (bus_connections_unref): fix to free the
      	connections
      	(bus_connections_setup_connection): if this fails, don't
      	disconnect the connection, just be sure there are no side
      	effects.
      
      	* dbus/dbus-string.c (undo_alignment): unbreak this
      
      	* dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
      	leaking
      	(_dbus_auth_new): fix the order in which we free strings
      	on OOM failure
      
      	* bus/connection.c (bus_connection_disconnected): fix to
      	not send ServiceDeleted multiple times in case of memory
      	allocation failure
      
      	* dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
      	get the base service name
      	(dbus_bus_register_client): don't return base service name,
      	instead store it on the DBusConnection and have an accessor
      	function for it.
      	(dbus_bus_register_client): rename dbus_bus_register()
      
      	* bus/dispatch.c (check_hello_message): verify that other
      	connections on the bus also got the correct results, not
      	just the one sending hello
      ce173b29
  6. 15 Mar, 2003 3 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@pobox.com> · 169238e9
      Havoc Pennington authored
      	* bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
      	transport, tests more of the real codepath. Set up clients
      	with bus_setup_debug_client.
      
      	* bus/test.c (bus_setup_debug_client): function to set up debug
      	"clients" on the main loop
      
      	* dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
      	support
      
      	* dbus/dbus-server.c (dbus_server_listen): add debug-pipe
      	server type
      
      	* dbus/dbus-server-debug.c: support a debug server based on pipes
      
      	* dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
      	(_dbus_close): new function
      
      	* configure.in: check for socketpair
      169238e9
    • 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
  7. 21 Feb, 2003 1 commit
    • 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
  8. 15 Feb, 2003 2 commits
  9. 14 Feb, 2003 1 commit
    • Havoc Pennington's avatar
      2003-02-14 Havoc Pennington <hp@pobox.com> · 07a795f1
      Havoc Pennington authored
      	* dbus/dbus-mempool.c: fail if the debug functions so indicate
      
      	* dbus/dbus-memory.c: fail if the debug functions indicate we
      	should
      
      	* dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
      	(_dbus_decrement_fail_alloc_counter): debug functions to
      	simulate memory allocation failures
      07a795f1
  10. 23 Nov, 2002 1 commit
    • Havoc Pennington's avatar
      2002-11-23 Havoc Pennington <hp@pobox.com> · 1428c65e
      Havoc Pennington authored
      	* configure.in: pile on more warning flags if using gcc
      
      	* Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
      	to document static functions
      
      	* configure.in: add summary to end of configure so it
      	looks nice and attractive
      
      	* dbus/dbus-hash.c: finish implementation and write unit
      	tests and docs
      
      	* configure.in: add --enable-tests to enable unit tests
      
      	* dbus/dbus-test.c: test program to run unit tests
      	for all files in dbus/*, initially runs a test for
      	dbus-hash.c
      
      	* dbus/dbus-internals.h: file to hold some internal utility stuff
      1428c65e
  11. 22 Nov, 2002 2 commits