Commit graph

944 commits

Author SHA1 Message Date
Colin Walters
0e2a099b55 Bug 15571: Clean up GUID-less connections correctly (Scott James Remnant)
* dbus/dbus-connection.c (connection_forget_shared_unlocked):
 	Remove shared connections which lack a GUID from the list that
 	caches those, otherwise references to them will remain after
 	they have been freed.
	* test/name-test/test-privserver-client.c: Update test to
	try GUID-less connections too.
2008-05-30 20:25:36 -04:00
Colin Walters
fd32a72b2f Bug 15570: Reset initialized state on dbus_shutdown (Scott James Remnant)
* dbus/dbus-bus.c (addresses_shutdown_func): Reset initialized back
 	to FALSE after cleaning up the address list so that it will be
 	reinitialized again if D-Bus is used after dbus_shutdown()
	* test/name-test/test-privserver-client.c: Uncomment part of
	test which should now pass.
2008-05-30 19:58:13 -04:00
Colin Walters
5e359834f2 Add "PrivServer" test which exercises DBusServer and dbus_shutdown
* test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in:
	New service file for PrivServer.
	* configure.in: Generate it.
	* test/name-test/Makefile.am: Build test-privserver and
	test-privserver-client.
	* test/name-test/test-privserver.c: Use DBusServer to
	serve a private connection.
	* test/name-test/test-privserver-client.c: Connect
	via session bus and get address of private server,
	exercise dbus_shutdown().
	* test/name-test/run-test.sh: Run it.
2008-05-30 17:11:15 -04:00
Colin Walters
a73a79a155 Add noinst convenience test library, add a test-shutdown
* test/Makefile.am: New convenience library
	libdbus_testutils_la.  Reorder build so that
	test/ gets built before test/name-test so
	name-test files can depend on it.
	* test/name-test/test-shutdown.c: New file,
	exercises dbus_shutdown () a bit.
	* test/name-test/run-test.sh Run test-shutdown.
	* test/test-utils.h: In some cases we already have
	DBUS_COMPILATION defined, avoid double definition
	warning.
2008-05-30 16:53:35 -04:00
Colin Walters
9d8989cfec Add test library functions for using DBusServer
* test/test-utils.h, test/test-utils.c: Add functions
	which hook up a DBusServer to a DBusLoop, useful
	for test cases.
2008-05-30 16:19:40 -04:00
John (J5) Palmieri
94bc113117 make shell script more portable (FDO Bug #11667)
2008-01-15  John (J5) Palmieri  <johnp@redhat.com>

	* tests/name-test/run-test.sh: make more portable (FDO Bug #11667)
2008-01-15 16:23:54 -05:00
Simon McVittie
9f22c3e1e8 Bring .gitignore files up to date; add *.o, *~ etc. to top-level .gitignore
CVS ignores these automatically, so they weren't in the .cvsignore when Ryan
converted the repository.
2007-10-10 17:38:00 +01:00
Ryan Lortie
d34905d811 migrate from cvs to git (cvs2svn -> git-svnimport).
2007-09-13  Ryan Lortie  <desrt@desrt.ca>

        migrate from cvs to git (cvs2svn -> git-svnimport).

        * HACKING: update release/branch/tag instructions
        * */.cvsignore: rename to .gitignore

        also, clean up tags and branch names to conform to HACKING
2007-09-13 11:13:40 -04:00
Havoc Pennington
bdbab12123 2007-07-26 Havoc Pennington <hp@redhat.com>
* bus/config-parser-trivial.c (check_return_values): disable a
	test that hardcoded the bus user's name

	* bus/dispatch.c (bus_dispatch_test_conf): remove the "if
	(!use_launcher)" around the tests, they were only failing because
	we didn't pass through all the expected errors from the helper.

	* bus/activation-exit-codes.h
	(BUS_SPAWN_EXIT_CODE_CHILD_SIGNALED): add a code for child segfaulting
	(BUS_SPAWN_EXIT_CODE_GENERIC_FAILURE): make "1" be a generic
	failure code, so if a third party launch helper were written it
	could just always return 1 on failure.
2007-07-26 23:01:14 +00:00
Havoc Pennington
ba38a9b12f fix whitespace 2007-07-26 22:32:09 +00:00
Richard Hughes
5cfa0506c2 2007-07-24 Richard Hughes <richard@hughsie.com>
* configure.in:
* test/Makefile.am:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoExec.service.in:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoService.service.in:
* test/data/invalid-service-files-system/org.freedesktop.DBus.TestS
uiteNoUser.service.in:
* test/data/valid-config-files-system/debug-allow-all-fail.conf.in:
* test/data/valid-config-files-system/debug-allow-all-pass.conf.in:
* test/data/valid-config-files/debug-allow-all-sha1.conf.in:
* test/data/valid-config-files/debug-allow-all.conf.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teEchoService.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teSegfaultService.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teShellEchoServiceFail.service.in:
* test/data/valid-service-files-system/org.freedesktop.DBus.TestSui
teShellEchoServiceSuccess.service.in:
* test/data/valid-service-files/debug-echo.service.in:
* test/data/valid-service-files/debug-segfault.service.in:
* test/data/valid-service-files/debug-shell-echo-fail.service.in:
* test/data/valid-service-files/debug-shell-echo-success.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoS
ervice.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfa
ultService.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShell
EchoServiceFail.service.in:
* test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShell
EchoServiceSuccess.service.in:
Add the data files needed by the system activation unit checks.
2007-07-24 12:48:45 +00:00
Havoc Pennington
d012387afe 2007-07-13 Havoc Pennington <hp@redhat.com>
* Add indent-tabs-mode: nil to all file headers.
2007-07-14 02:44:01 +00:00
Ralf Habacker
f1cb3ee0e7 * dbus/dbus-auth-script.c (_dbus_auth_script_run): added UNIX_ONLY and WIN_ONLY commands for auth scripts
* test/data/auth/external-root.auth-script: limit execution to unix
2007-06-23 07:45:17 +00:00
Havoc Pennington
54b943432c 2007-06-18 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: document org.freedesktop.DBus.GetId()

	* bus/driver.c (bus_driver_handle_get_id): implement org.freedesktop.DBus.GetId()

	* bus/bus.c (bus_context_new): generate a unique ID for each bus context

	* dbus/dbus-connection.c (dbus_connection_get_server_id): new function

	* dbus/dbus-bus.c (dbus_bus_get_id): new function

	* dbus/dbus-server.c (dbus_server_get_id): new function
2007-06-18 19:32:51 +00:00
Havoc Pennington
a789b7b38c 2007-06-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (_dbus_string_pop_line): fix this not to
	think an empty line is the end of the file.
	Also, fix some whitespace.

	* dbus/dbus-string-util.c: add more tests for
	_dbus_string_pop_line() revealing that it thinks an empty line is
	the end of the file, which broke dbus-auth-script.c so
	it didn't really run the scripts

	* dbus/dbus-auth.c: add ANONYMOUS mechanism

	* dbus/dbus-auth-script.c (_dbus_auth_script_run): fix to detect
	an empty/no-op auth script; add commands to check that we have or
	don't have the expected credentials
2007-06-10 04:54:45 +00:00
Havoc Pennington
2383267226 2007-06-09 Havoc Pennington <hp@redhat.com>
* bus/dispatch.c (check_get_connection_unix_process_id): adapt
	since sysdeps-unix.h stuff isn't included anymore

	* bus/bus.c (bus_context_new): use more abstract functions to
	change user, so they can be no-ops on Windows

	* dbus/dbus-credentials.c, dbus/dbus-credentials.h,
	dbus/dbus-credentials-util.c: new files containing a fully opaque
	DBusCredentials data type to replace the old not opaque one.

	* configure.in (DBUS_UNIX): define DBUS_UNIX to match DBUS_WIN on
	windows

	* dbus/dbus-userdb.h: prohibit on Windows, next step is to clean
	up the uses of it in bus/*.c and factor out the parts of
	cookie auth that depend on it
2007-06-09 21:53:20 +00:00
Simon McVittie
6b4bd7d2e9 tools/.cvsignore: Ignore all currently built files.
test/name-test/.cvsignore: New file, ditto.
2007-05-21 16:50:13 +00:00
Ralf Habacker
892780c35e * configure.in, cmake/ConfigureChecks.cmake: added check for setrlimit.
* test/test-segfault.c: only include setrlimit stuff only when available.
2007-03-08 08:17:25 +00:00
Ralf Habacker
42fe5c9341 * test/test-segfault.c: unix compile fix.
* dbus-win.patch: removed obsolate patch.
2007-03-07 19:09:57 +00:00
Ralf Habacker
de9038c984 * bus/activation.c: win32 compile fix.
* test/test-segfault.c: win32 compile fix, rlimit isn't available on win32.
* dbus-win.patch: removed some more patches, they are applied or obsolate
2007-03-07 18:34:01 +00:00
Ralf Habacker
329f99a197 * dbus/dbus-spawn.c,dbus/dbus-spawn.h (_dbus_spawn_async_with_babysitter):
added environment pointer as function parameter,used on win32.

* test/spawn-test.c: fixed call to above mentioned function.
2007-03-04 19:14:04 +00:00
Ralf Habacker
7f3af4748f * configure.in,test/test-sleep-forever.c,test/test-names.c:
added configure check for unistd.h.
2007-03-04 19:00:40 +00:00
Ralf Habacker
4d56811851 * test/Makefile.am: fixed test data copy problem in
out of source build, when sources came from svn or cvs.
2007-03-04 18:53:29 +00:00
John (J5) Palmieri
2d760baace * dbus/dbus-threads.h: fix DBUS_THREAD_FUNCTIONS_ALL_MASK to have
the correct value so we don't assert when initalizing recursive threads

* test/name-test/test-thread-init.c: call dbus_threads_init_default
  instead of _dbus_threads_init_debug since it is more of a real world
  test
2006-11-14 18:56:43 +00:00
John (J5) Palmieri
5640f7a57b * configure.in: expose DBUS_DATADIR
* bus/config-parser.c: add the standard_session_servicedirs element
  to the parser
  (bus_config_parser_content): process the standard_session_servicedirs
  element by getting the standard directories from sysdeps and merging
  them into the service directory list
  (test_default_session_servicedirs): make sure we get what we expect

* bus/session.conf.in: replace the servicedir tag with the
  standard_session_servicedirs tag

* dbus/dbus-list.h: remove the typedef of DBusList and place it in
  dbus-sysdeps.h to avoid circular header dependencies

* dbus/dbus-sysdeps.h: add the typedef of DBusList

* dbus/dbus-sysdeps-unix.c (split_paths_and_append): utility function
  which takes a string of directories delimited by colons, parses them
  out, appends a suffix and puts them in a list ignoring empty elements
  (_dbus_get_standard_session_servicedirs): returns the standard
  directories for a session bus to look for service activation files
  on Unix which includes the XDG_DATA_HOME, XDG_DATA_DIRS and
  DBUS_DATADIR directories

* test/data/valid-config-files/many-rules.conf: add the
  standard_session_servicedirs tag to the valid config file tests
2006-11-01 23:30:46 +00:00
John (J5) Palmieri
82c9cd05cd * configure.in, dbus-1.pc.in: Check to see if thread methods
are in glibc or libpthread and add -lpthread to the link stage
  if it is the latter
2006-10-26 18:06:07 +00:00
John (J5) Palmieri
2db06dbf18 * test/name-test/Makefile.am: don't link against both libdbus and
libdbus-convenience
2006-10-11 17:30:58 +00:00
Havoc Pennington
7020b57376 2006-10-01 Havoc Pennington <hp@redhat.com>
* test/test-service.c (path_message_func): remove broken extra
	unref that was hidden by the bugs in dbus-connection.c/dbus-bus.c

	* test/test-shell-service.c (path_message_func): same fix

	* dbus/dbus-connection.c
	(_dbus_connection_get_dispatch_status_unlocked): break up the
	function a little for clarity and fix the notification of
	dbus-bus.c to not require dispatch to be complete

	* dbus/dbus-connection.c (dbus_connection_unref): improve the
	warning when you try to finalize an open connection.
2006-10-01 17:21:03 +00:00
Havoc Pennington
a2129f7ccc 2006-10-01 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (_dbus_connection_close_if_only_one_ref):
	Add a hack to make DBusNewConnectionFunction work right.

	* dbus/dbus-server-socket.c (handle_new_client_fd_and_unlock): use
	the hack here. Also, fix the todo about refcount leak.

	* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
	and use the hack here

        * dbus/dbus-connection.c: Kill the "shared" flag vs. the
	"shareable" flag; this was completely broken, since it meant
	dbus_connection_open() returned a connection of unknown
	shared-ness. Now, we always hold a ref on anything opened
	as shareable.

	Move the call to notify dbus-bus.c into
	connection_forget_shared_unlocked, so libdbus consistently forgets
	all its knowledge of a connection at once. This exposed numerous
	places where things were totally broken if we dropped a ref inside
	get_dispatch_status_unlocked where
	connection_forget_shared_unlocked was previously, so move
	connection_forget_shared_unlocked into
	_dbus_connection_update_dispatch_status_and_unlock. Also move the
	exit_on_disconnect here.

	(shared_connections_shutdown): this assumed weak refs to the
	shared connections; since we have strong refs now, the assertion
	was failing and stuff was left in the hash. Fix it to close
	still-open shared connections.

	* bus/dispatch.c: fixup to use dbus_connection_open_private on the
	debug pipe connections

	* dbus/dbus-connection.c (dbus_connection_dispatch): only notify
	dbus-bus.c if the closed connection is in fact shared
	(_dbus_connection_close_possibly_shared): rename from
	_dbus_connection_close_internal
	(dbus_connection_close, dbus_connection_open,
	dbus_connection_open_private): Improve docs to explain the deal
	with when you should close or unref or both

	* dbus/dbus-bus.c
	(_dbus_bus_notify_shared_connection_disconnected_unlocked): rename
	from _dbus_bus_check_connection_and_unref_unlocked and modify to
	loop over all connections

	* test/test-utils.c (test_connection_shutdown): don't try to close
	shared connections.

	* test/name-test/test-threads-init.c (main): fix warnings in here

	* dbus/dbus-sysdeps.c (_dbus_abort): support DBUS_BLOCK_ON_ABORT
	env variable to cause blocking waiting for gdb; drop
	DBUS_PRINT_BACKTRACE and just call _dbus_print_backtrace()
	unconditionally.

	* configure.in: add -export-dynamic to libtool flags if assertions enabled
	so _dbus_print_backtrace works.

	* dbus/dbus-sysdeps-unix.c (_dbus_print_backtrace): use fprintf
	instead of _dbus_verbose to print the backtrace, and diagnose lack
	of -rdynamic/-export-dynamic
2006-10-01 15:36:19 +00:00
John (J5) Palmieri
1eae184450 * doc/TODO:
- Remove pending call locking todo item
- dbus_connection_open now holds hard ref.  Remove todo item
- do proper locking on _dbus_bus_check_connection_and_unref
  and handle DBUS_BUS_STARTER. Remove todo item
- Warn on closing of a shared connection.  Remove todo item

* bus/bus.c, bus/connection.c, bus/dispatch.c, dbus/dbus-bus.c,
  dbus/dbus-connection.c: Use the dbus_connection_close_internal
  so we don't get the warning when closing shared connections

* test/test-service.c, test/test-shell-service.c: Applications
  don't close shared connections themselves so we unref instead of
  close

* test/test-utils.c (test_connection_shutdown): Close the connection

* dbus/dbus-bus.c (_dbus_bus_check_connection_and_unref): Changed to
  _dbus_bus_check_connection_and_unref_unlocked since we only call this
  method on a locked connection.
  Make sure we call _dbus_connection_unref_unlocked instead of
  dbus_connection_unref also.
  Handle DBUS_BUS_STARTER correctly

* dbus/dbus-connection.c (connection_record_shared_unlocked):
  Mark as shared and hard ref the connection
  (connection_forget_shared_unlocked): Remove the hard ref from the
  connection
  (_dbus_connection_close_internal_and_unlock):  New internal function
  which takes a locked connection and unlocks it after closing it
  (_dbus_connection_close_internal): New internal function which acts
  like the origonal dbus_connection_close method by grabbing a connection
  lock and calling _dbus_connection_close_internal_and_unlock
  (dbus_connection_close): Public close method, warns when the app
  trys to close a shared connection
2006-09-06 22:00:07 +00:00
Havoc Pennington
afc2a6e56a 2006-08-29 Havoc Pennington <hp@redhat.com>
* test/test-service.c (path_message_func): fix lack of return value

	* dbus/dbus-sysdeps.c (_dbus_printf_string_upper_bound): fix
	formatting, remove #ifdef, and fix docs. #ifdef doesn't make
	any more sense than on anything else in this file.
	(_dbus_get_tmpdir): add const to return value, and keep the
	results of the various getenv around in a static variable.
2006-08-30 01:27:44 +00:00
John (J5) Palmieri
c904d4d501 * test/Makefile.am: change find to use syntax that works with non
gnu versions of find
2006-08-25 19:59:49 +00:00
John (J5) Palmieri
163f42a8b1 * configure.in, dbus/Makefile.am, test/name-test/run-test.sh,
test/name-test/Makefile.am: Fixed some issues with getting get dbus
  to build with builddir != srcdir (Taken from a patch by Bernard Leak
  <bernard at brenda-arkle dot demon dot co dot uk>)
2006-08-25 19:50:16 +00:00
John (J5) Palmieri
14cc7d28a8 * dbus/dbus-threads.c: Add static DBusList *uninitialized_mutex_list and
static DBusList *uninitialized_condvar_list to support new late
        initialization threading model.  In this model threads can be initialized
        even after the D-Bus API has been used but still needs to be initialized
        before the second thread has been started.  Mutexes and condvar addresses
        are stored in the two static lists and are replaced with actuall locks
        when threads are initalized.
        (_dbus_mutex_new_at_location): New method for creating a mutex and placing
        the location into the static list
        (_dbus_mutex_free_at_location): New method for removing a mutex location
        from the static list and freeing the mutex
        (_dbus_condvar_new_at_location): New method for creating a conditional
        variable and placing the location into the static list
        (_dbus_condvar_free_at_location): New method for removing a conditional
        variable location from the static list and freeing the conditional variable
        (init_uninitialized_locks): Atomic method which goes through the static
        lists of mutex and condvar location and updates them with actuall locks
        (init_global_locks): changed to init_locks

        * dbus/dbus-connection.c:
        (_dbus_connection_test_get_locks): New method for tests to check connections
        (_dbus_connection_new_for_transport): Use the new at_location mutex and
        condvar API
        (dbus_connection_allocate_data_slot): Pass in the global lock address
        to _dbus_data_slot_allocator_alloc

        * dbus/dbus-dataslot.c:
        (_dbus_data_slot_allocator_alloc): Use the address of the mutex
        instead of the mutex itself

        * dbus/dbus-message.c:
        (dbus_message_allocate_data_slot): Pass in the global lock address
        to _dbus_data_slot_allocator_alloc

        * dbus/dbus-pending-call.c:
        (dbus_pending_call_allocate_data_slot): Pass in the global lock address
        to _dbus_data_slot_allocator_alloc

        * dbus/dbus-server.c:
        (_dbus_server_init_base): Use the new at_location mutex API
        (dbus_server_allocate_data_slot): Pass in the global lock address
        to _dbus_data_slot_allocator_alloc

        * test/name-test/test-threads-init.c: New test case for late thread
        initialization
2006-08-16 22:30:15 +00:00
John (J5) Palmieri
c1091cbbd2 Patches by Kjartan Maraas <kmaraas at gnome dot org>
* bus/services.c (bus_service_list_queued_owners):
        Add a pointer cast to fix compiler warning

        * dbus/dbus-dataslot.c (_dbus_data_slot_list_get):
        return a NULL instead of FALSE since the return type
        is not expecting a boolean

        * dbus/dbus-marshal-basic.c (_dbus_marshal_test):
        Remove unused variable

        * dbus/dbus-marshal-recursive-util.c (node_new):
        return a NULL instead of FALSE since the return type
        is not expecting a boolean

        * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
        Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
        because we are expecting a pointer not a boolean

        * dbus/dbus-sysdeps-util.c (_dbus_get_tmpdir):
        add void as the parameter so some compilers
        don't complain

        * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket,
          _dbus_transport_new_for_tcp_socket):
        Send a NULL into _dbus_transport_new_for_fd instead of a FALSE
        because we are expecting a pointer not a boolean

        * test/shell-test.c (test_command_line):
        cast the second argument to _dbus_list_append to avoid compiler
        warnings

        * test/test-names.c (main): remove unused variable

        * test/test-service.c (check_hello_from_self_reply):
        Initialize echo_message and echo_reply to NULL

        * test/test-shell-service.c (handle_echo):
        Remove unused variable and cast the third parameter passed to
        dbus_connection_get_object_path_data to avoid compiler warrnings

        * test/name-test/test-names.c (clear_message_queue):
        Remove unused function

        * test/name-test/test-pending-call-dispatch.c:
        Fix format string in printf
2006-08-14 19:11:35 +00:00
John (J5) Palmieri
2592a2abb2 * dbus/dbus-bus.c:
* test/name-test/test-names.c:
        Remove test method dbus_bus_connection_get_unique_name because
        we already have public method dbus_bus_get_unique_name that
        does the exact same thing
2006-08-14 18:12:20 +00:00
John (J5) Palmieri
47ec532cf2 * tools/run-with-tmp-session-bus.sh:
* test/name-test/run-test.sh:
  Remove bashisms (patch from Julio M. Merino Vidal
  <jmmv at NetBSD dot org>)
2006-08-10 21:44:00 +00:00
John (J5) Palmieri
2974c82428 * dbus/dbus-sysdeps.c:
* dbus/dbus-address.c:
* bus/activation.c:
* test/shell-test.c:
  don't hardcode tmp directory (patch from Dave Meikle
  <dmk at davemeikle dot co dot uk>)
2006-08-10 20:09:43 +00:00
John (J5) Palmieri
a929c9a3b4 * Remove all bindings 2006-07-14 16:20:12 +00:00
Thiago Macieira
fd5ac15ebc * test/qt/*: Update the testcases, including testing the new
functionality of sending null QByteArray and QString over the
        bus. Add new headertest test and restore the old
        qdbusxmlparser test.
2006-06-11 12:18:23 +00:00
Thiago Macieira
3ed273a6ed * test/qt/tst_hal.cpp: Remove the waiting, since it's not
needed anymore. Requires Qt 4.1.3 to work properly. (r528148)
2006-04-10 10:51:56 +00:00
Thiago Macieira
d54ababd5f * test/qt/*: Sync with KDE Subversion revision 523647.
Update the testcases to the new API. Remove testcases for
        classes that are no longer public or have been removed.
2006-03-28 18:58:58 +00:00
Thiago Macieira
12dc0934ae 2006-03-06 Thiago Macieira <thiago.macieira@trolltech.com>
* test/qt/*: Update the self-tests.
2006-03-06 14:30:52 +00:00
John (J5) Palmieri
da4182fb29 2006-03-02 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-connection.c:
	(_dbus_connection_block_pending_call):
	Check to see if our data has already been read off the connection
	by another blocking pending call before we block in poll.
	(check_for_reply_and_update_dispatch_unlocked):
	Code taken from _dbus_connection_block_pending_call - checks for
	an already read reply and updates the dispatch if there is one.

	* test/name-test/test-pending-call-dispatch.c:
	New test for making sure we don't get stuck polling a
	dbus connection which has no data on the socket when
	blocking out of order on two or more pending calls.
2006-03-02 22:24:28 +00:00
Robert McQueen
0d0642b31b 2006-02-16 Robert McQueen <robot101@debian.org>
* 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.
2006-02-16 00:43:41 +00:00
Thiago Macieira
9076938fc0 Add new tests and update the existing one. 2006-02-15 17:06:41 +00:00
Robert McQueen
8e00b10d13 2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gtype-specialized.[ch], glib/dbus-gvalue-utils.c: Patch
	by me and Rob Taylor to add a simple_free function to D-Bus map
	and collection types, which allows those types which can be freed
	with a GDestroyNotify (such as GHashTables and GArrays, but not
	GPtrArrays) to be stored as the values in hashtables.

	* test/glib/test-dbus-glib.c, test/glib/test-service-glib.{c,xml}:
	Patch by Rob Taylor to add nested dicts to the glib tests to check
	the above code works, and appears not to leak when called repeatedly.
2006-01-27 15:40:36 +00:00
Harald Fernengel
e447b1f2be convert to QTestLib 4.1 2006-01-22 19:42:18 +00:00
John (J5) Palmieri
b99a1f3645 * test/qt/Makefile.am: build from srcdir
* qt/qtconnection.cpp (requestName): Changed PROHIBIT_REPLACE to ALLOW_REPLACE
  Note - this code is wrong and needs to be fixed by the Qt binding
  developers.  The flags should be treated as bitfields and not enums.

* qt/qtconnection.h: Change ProhibitReplace to AllowReplace

* dbus/dbus-list.c (link_after): remove #ifdef DBUS_BUILD_TESTS
2005-12-01 00:07:20 +00:00
John (J5) Palmieri
0ca96ec548 * dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
  glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
  test/test-segfault.c, test/test-utils.c,
  test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
  tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
  Various cleanup of dead code and compiler warnings (patch from
  Kjartan Maraas <kmaraas at gnome.org>)
2005-11-30 19:32:27 +00:00