summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 2003-04-05 Havoc Pennington <hp@pobox.com>dbus-0.7Havoc Pennington2003-04-051-1/+1
| | | | | | | | * test/Makefile.am (dist-hook): also dist *.in files * NEWS: update * configure.in: 0.7
* 2003-04-05 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-04-051-37/+97
| | | | | | * test/decode-gcov.c (main): print per-directory stats in the report * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
* 2003-04-05 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-04-052-1/+1944
| | | | | | | | | | * Makefile.am (coverage-report.txt): add target "coverage-report.txt" * test/decode-gcov.c: hack up a little program to suck data out of gcov files. Yes this is sort of silly. * configure.in: define something in config.h and do an AM_CONDITIONAL when gcov is enabled
* 2003-04-04 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-055-2/+46
| | | | | | | | | | | | * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to return a "babysitter" object that is used to monitor the status of the spawned process and reap it when required. * test/test-segfault.c, test/test-exit.c, test/test-sleep-forever.c: binaries that do various lame things, used in the test suite. * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
* 2003-04-03 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-032-4/+85
| | | | | | | | | | * 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
* commit adds/removes here before builddir contents confuse mattersHavoc Pennington2003-04-032-0/+4
|
* 2003-04-03 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-04-032-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | * bus/config-parser.c (bus_config_parser_unref): free list of mechanisms, bug discovered by test suite enhancements (putting system.conf and session.conf into suite) * test/Makefile.am, test/test-service.c: add placeholder for a test service that we'll activate as part of test suite. Doesn't do anything yet. * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by setting NULL value, and use system malloc not dbus_malloc() when we have unavoidable memleakage. * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0 didn't work, and support DBUS_BUS_ACTIVATION. * bus/activation.c (child_setup): pass our well-known bus type to the child * bus/config-parser.c: support <type> to specify well-known type * doc/dbus-specification.sgml: document the env variables to locate well-known buses and find service activator
* 2003-04-02 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-034-75/+59
| | | | | | | * test/Makefile.am (all-local): add a rule to copy tests to builddir, so we can have generated tests. Use this to remove the silly hack for testing system.conf and session.conf. Will use this shortly to generate .service files pointing to test binaries.
* 2003-04-02 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-021-0/+13
| | | | | | | | | | | | | | * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames in error messages (_dbus_string_get_dirname): new (_dbus_sysdeps_test): new (_dbus_directory_open): include dirnames in error messages * bus/config-parser.c: interpret <include> and <includedir> and <servicedir> relative to config file location if the given filename is not absolute. * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
* 2003-04-01 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-021-0/+2
| | | | | | | | * bus/config-parser.c, bus/bus.c: implement <servicedir> and <includedir> (at least mostly) * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID first, then the user ID
* 2003-03-31 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-312-17/+14
| | | | | | | | | | | | Fix some annoying DBusString API and fix all affected code. * dbus/dbus-string.c (_dbus_string_init): get rid of annoying max_length argument (_dbus_string_get_data): change to return string instead of using an out param (_dbus_string_get_const_data): ditto (_dbus_string_get_data_len): ditto (_dbus_string_get_const_data_len): ditto
* 2003-03-31 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-315-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket) (_dbus_transport_new_for_tcp_socket): these didn't need the "server" argument since they are always client side * dbus/dbus-server.c (dbus_server_get_address): new function * bus/main.c (main): take the configuration file as an argument. * test/data/valid-config-files/debug-allow-all.conf: new file to use with dispatch.c tests for example * bus/test-main.c (main): require test data dir * bus/bus.c (bus_context_new): change this to take a configuration file name as argument * doc/config-file.txt (Elements): add <servicedir> * bus/system.conf, bus/session.conf: new files * dbus/dbus-bus.c (dbus_bus_get): look for system bus on well-known socket if none set * configure.in: create system.conf and session.conf
* 2003-03-30 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-311-0/+4
| | | | | | | | | | | | | | | | | | | | * 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>
* 2003-03-26 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-261-0/+7
| | | | | | | | | | | | | | | * bus/test-main.c, dbus/dbus-test.c (main): check memleaks after every test so it's quick and easy to see which leaked, and so we test multiple dbus_shutdown() calls * configure.in: change configure.in XML stuff to also support expat * config-loader-libxml.c: some hacking * config-loader-expat.c: some hacking * config-parser.c: some hacking, plus tests
* 2003-03-24 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-253-12/+16
| | | | | | | | | | | | | | | | * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this file * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow NULL argument for "message" if the error is a well-known one, fill in a generic message in this case. * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in favor of DBusError * bus/test.c (bus_test_flush_bus): add * bus/policy.c (bus_policy_test): test code stub
* 2003-03-16 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-03-161-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-connection.c: (dbus_connection_send_with_reply_and_block): Decrease connection->n_incoming when removing an entry from the list. * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array), (dbus_dict_set_uint32_array), (dbus_dict_set_double_array), (dbus_dict_set_byte_array), (dbus_dict_set_string_array), (dbus_dict_get_boolean_array), (dbus_dict_get_double_array), (dbus_dict_get_byte_array): Handle NULL arrays and strings. Also add support for byte arrays. * dbus/dbus-marshal.c: (_dbus_marshal_byte_array), (_dbus_marshal_dict), (_dbus_demarshal_byte_array), (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array), (_dbus_demarshal_double_array), (_dbus_demarshal_string_array), (_dbus_demarshal_dict), (demarshal_and_validate_len), (_dbus_marshal_validate_arg), (_dbus_marshal_test): * dbus/dbus-marshal.h: Add support for marshalling and demarshalling empty arrays and strings. * dbus/dbus-message.c: (dbus_message_append_args_valist), (dbus_message_append_string_array), (dbus_message_iter_get_boolean), (dbus_message_iter_get_boolean_array), (dbus_message_iter_get_int32_array), (dbus_message_iter_get_uint32_array), (dbus_message_iter_get_double_array), (dbus_message_iter_get_byte_array), (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict), (check_message_handling): Add support for getting empty arrays and dicts. * dbus/dbus-string.c: (_dbus_string_validate_utf8): Don't do any validation at all for now, that's better than just checking for ASCII. * test/data/valid-messages/emptiness.message: New test message with lots of empty arrays.
* 2003-03-16 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 2003-03-15 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-151-44/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it pass the Hello handling test including all OOM codepaths. Now to do other messages... * bus/services.c (bus_service_remove_owner): fix crash when removing owner from an empty list of owners (bus_registry_ensure): don't leave service in the list of a connection's owned services if we fail to put the service in the hash table. * bus/connection.c (bus_connection_preallocate_oom_error): set error flag on the OOM error. * dbus/dbus-connection.c (_dbus_connection_new_for_transport): handle _dbus_transport_set_connection failure * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify to create watches up front and simply enable/disable them as needed. (unix_connection_set): this can now fail on OOM * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept of enabling/disabling a watch or timeout. * bus/loop.c (bus_loop_iterate): don't touch disabled watches/timeouts * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
* 2003-03-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-141-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle out of memory * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out of memory * dbus/dbus-connection.h: Make AddWatchFunction and AddTimeoutFunction return a bool so they can fail on out-of-memory * bus/bus.c (bus_context_new): set up timeout handlers * bus/connection.c (bus_connections_setup_connection): set up timeout handlers * glib/dbus-gmain.c: adapt to the fact that set_functions stuff can fail * bus/bus.c (bus_context_new): adapt to changes * bus/connection.c: adapt to changes * test/watch.c: adapt to DBusWatch changes * bus/dispatch.c (bus_dispatch_test): started adding this but didn't finish
* 2003-03-12 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-131-9/+8
| | | | | | | | | | | Throughout: purge global variables, introduce BusActivation, BusConnections, BusRegistry, etc. objects instead. * bus/bus.h, bus/bus.c: introduce BusContext as a global message bus object * test/Makefile.am (TEST_BINARIES): disable bus-test for now, going to redo this a bit differently I think
* 2003-03-12 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-1310-33/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 2003-03-10 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-03-104-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2003-03-04 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-057-15/+16
| | | | | | | | | | | | | | | | | | | | | | | * test/data/auth/*: adapt to changes * dbus/dbus-auth-script.c (_dbus_auth_script_run): add USERID_BASE64 and change USERNAME_BASE64 to put in username not userid * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent more stuff from being in a context name, to make the protocol simpler to deal with * dbus/dbus-errors.c (dbus_error_has_name): new function (dbus_error_is_set): new function * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1 * dbus/dbus-connection.c (dbus_connection_flush): also read messages during a flush operation * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
* 2003-03-02 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-024-1/+101
| | | | | | | | | | | | | | | | * test/break-loader.c (randomly_set_extreme_ints): add test that sets really huge and small integers * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check that length of boolean array fits in the string, and that string has room for boolean value in single-bool case. * dbus/dbus-message-builder.c (_dbus_message_data_load): add optional value to "ALIGN" command which is what to fill the alignment with. * test/data/valid-messages/no-padding.message: add regression test for the message padding problem
* 2003-02-24 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-242-0/+24
| | | | | | | | | | | | | | | * 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.
* 2003-02-24 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-241-0/+2
| | | | | | | | | | | | | | | | | | * 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.
* 2003-02-22 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-221-2/+2
| | | | * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
* 2003-02-22 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-225-0/+7968
| | | | | | | | | * dbus/dbus-message.c (dbus_message_iter_get_string_array): (dbus_message_iter_get_byte_array): Fix up doxygen warnings * dbus/dbus-sha.c: add implementation of SHA-1 algorithm * dbus/test/data/sha-1: add US government test suite for SHA-1
* 2003-02-21 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2003-02-19 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-191-0/+1
| | | | | | | | | | | | | | | * configure.in: Add check for nonposix getpwnam_r * dbus/dbus-mempool.c: (_dbus_mem_pool_new): Align the pool element size to a sizeof (void *) boundary. * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket), (_dbus_listen_unix_socket), (_dbus_credentials_from_username): General Solaris fixes. * test/data/valid-messages/simplest-manual.message: Explicitly state that we want little-endian packing.
* 2003-02-18 Joe Shaw <joe@assbarn.com>Joe Shaw2003-02-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get credentials from our currently running process. (get_word): Fix a buglet where we were copying the entire length instead of relative to our position. * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the keys on the stack... it's 640k of data. * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always read the credentials byte off the socket, even if we don't have SO_PEERCRED. (_dbus_poll): Implement poll() using select() for systems which don't have it. * glib/test-dbus-glib.c (main): Print out an error if no parameters are given. * test/data/auth/fallback.auth-script: Added. Tests that a client can fallback to a secondary auth mechanism if the first fails.
* 2003-02-17 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | * bus/activation.c: (bus_activation_init), (child_setup), (bus_activation_activate_service): * bus/activation.h: * bus/main.c: (main): Set DBUS_ADDRESS environment variable. * dbus/dbus-errors.c: (dbus_set_error): Don't use va_copy since that's a C99 feature. * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec), (_dbus_spawn_async): * dbus/dbus-sysdeps.h: Add child_setup_func to _dbus_spawn_async. * doc/dbus-specification.sgml: Update specification. * test/spawn-test.c: (setup_func), (main): Fix test.
* 2003-02-17 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-161-1/+1
| | | | | | | | | | * doc/.cvsignore: * doc/Makefile.am: * doc/dbus-test-plan.sgml: Add test plan document. * test/Makefile.am: Fix distcheck.
* add test for header padding not set to all bits 0Havoc Pennington2003-02-161-0/+14
|
* test cases with wrong header paddingHavoc Pennington2003-02-163-0/+40
|
* 2003-02-16 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-164-119/+298
| | | | | | | | | | | | | | | | | | | | * 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.
* add another testHavoc Pennington2003-02-161-0/+8
|
* 2003-02-16 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-163-0/+53
| | | | | | | * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe): allow people to avoid setting SIGPIPE to SIG_IGN (_dbus_connection_new_for_transport): disable SIGPIPE unless we've been asked not to
* 2003-02-15 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-152-1/+39
| | | | | | | | | | | | | | | * dbus/dbus-errors.c: (dbus_set_error): * dbus/dbus-errors.h: Add a few errors and make dbus_set_error void. * dbus/dbus-sysdeps.c: (_dbus_errno_to_string), (close_and_invalidate), (make_pipe), (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async): * dbus/dbus-sysdeps.h: Add _dbus_spawn_async. * test/spawn-test.c: (main): Test for _dbus_spawn_async.
* 2003-02-15 Alexander Larsson <alexl@redhat.com>Alexander Larsson2003-02-155-31/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-threads.c: * dbus/dbus-threads.h: Add condvars. Remove static mutext from API. Implement static mutexes by initializing them from threads_init. * glib/dbus-gthread.c: * qt/dbus-qthread.cpp: Update with the thread api changes. * dbus/dbus-list.c: * dbus/dbus-list.h: Turn StaticMutex into normal mutex + init function. Export new functions _dbus_list_alloc_link, _dbus_list_free_link, _dbus_list_append_link, _dbus_list_prepend_link * dbus/dbus-sysdeps.c: * dbus/dbus-sysdeps.h: New type dbus_atomic_t, and new functions _dbus_atomic_inc, _dbus_atomic_dec. Only slow fallback implementation at the moment. * dbus/dbus-protocol.h: Add DBUS_MESSAGE_LOCAL_DISCONNECT define * dbus/dbus-message.c: Make ref/unref atomic. Fix some docs. * dbus/dbus-connection-internal.h: * dbus/dbus-connection.c: * dbus/dbus-connection.h: Make threadsafe. Change _peek to _borrow,_return & _steal_borrowed. Change disconnect callback to event. Make dbus_connection_dispatch_messages reentrant. * dbus/dbus-transport.c: Don't ref the connection on calls to the transport implementation. * dbus/dbus-message-handler.c: Make threadsafe. * glib/dbus-gmain.c: Don't use peek_message anymore * test/Makefile.am: * test/debug-thread.c: * test/debug-thread.h: Simple thread implementation that asserts() on deadlocks in single-threaded code. * test/bus-test.c: (main) Call debug_threads_init. * test/watch.c: Use disconnect message instead of disconnect callback. * bus/connection.c: * bus/connection.h: Don't call dbus_connection_set_disconnect_function. Instead export bus_connection_disconnect. * bus/dispatch.c: Call bus_connection_disconnect when we get a disconnected message.
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-131-1/+1
| | | | | | | | | | * bus/driver.c: (bus_driver_handle_hello): * bus/driver.h: * bus/services.c: (bus_service_lookup): Reorder message sending so we get a more sane order. * test/bus-test.c: (message_handler): Fix tyop.
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-131-1/+6
| | | | | | | * dbus/dbus-message-builder.c: (_dbus_message_data_load): * dbus/dbus-message.c: (process_test_subdir): * test/break-loader.c: (find_breaks_based_on): Plug some memory leaks.
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-134-0/+58
| | | | | | | | * test/data/valid-messages/standard-acquire-service.message: * test/data/valid-messages/standard-hello.message: * test/data/valid-messages/standard-list-services.message: * test/data/valid-messages/standard-service-exists.message: Add some standard messages.
* 2003-02-13 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-136-9/+54
| | | | | | | | | | | | | | | | | | | | * dbus/dbus-auth.c (handle_server_data_external_mech): args to dbus_credentials_match were backward * dbus/dbus-auth-script.c (_dbus_auth_script_run): support NO_CREDENTIALS and ROOT_CREDENTIALS * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine into here. Never process more commands after we've reached an end state; store further data as unused bytes. * test/data/auth/*: add more auth tests * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT command to match exact string and EXPECT_UNUSED to match unused bytes * test/Makefile.am (dist-hook): fix to dist all the test stuff
* 2003-02-12 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-132-0/+15
| | | | | | | | | | | * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip \r off of popped lines * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth scripts * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a SEND, append \r\n
* Minimal semantic fixes.Zack Rusin2003-02-101-9/+9
|
* 2003-02-06 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-052-1/+600
| | | | | | | | * dbus/Makefile.am: * dbus/dbus-break-loader.c: * test/Makefile.am: * test/break-loader.c: Move dbus-break-loader to test/ and rename it to break-loader.
* SsshAnders Carlsson2003-02-051-0/+2
|
* 2003-02-02 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-022-1/+192
| | | | | | | | * test/Makefile.am: * test/bus-test.c: (get_time), (add_timeout), (remove_timeout), (message_handler), (new_connection_callback), (loop_quit), (loop_run), (main): Add bus test.