summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-errors.h
Commit message (Collapse)AuthorAgeFilesLines
* 2003-04-05 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-04-051-0/+1
| | | | | | | | | | | | | | | | * bus/loop.c (bus_loop_iterate): fix the timeout code, using magic from GLib * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid to -1 once we've reaped the babysitter (_dbus_babysitter_handle_watch): do as much work as we can, not just one go of it * bus/activation.c: add code using DBusBabysitter so that we handle it when a service fails to start up properly. (bus_activation_service_created): don't remove the activation entries as we go, just let them get removed when we free the pending activation. Unref reply messages after sending them.
* 2003-04-04 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-051-0/+3
| | | | | | | | | | | | * 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-03-24 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-251-29/+0
| | | | | | | | | | | | | | | | * 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-12 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-03-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-051-10/+14
| | | | | | | | | | | | | | | | | | | | | | | * 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-02-19 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in Doxyfile.in, not Doxyfile * dbus/dbus-keyring.c: do some hacking on this * dbus/dbus-sysdeps.c (_dbus_delete_file): new * dbus/dbus-errors.c (dbus_set_error_const): do not call dbus_error_init (dbus_set_error): remove dbus_error_init, check for message == NULL *before* we sprintf into it, and add @todo about including system headers in this file * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add * dbus/dbus-sysdeps.c (get_user_info): break this function out to get various bits of user information based on either username or user ID (_dbus_homedir_from_username): new function
* 2003-02-16 Alexander Larsson <alexl@redhat.com>Alexander Larsson2003-02-161-0/+1
| | | | | | | | | | * dbus/dbus-connection.c: Implement sent_message_with_reply. (with_reply_and block is still busted). Made dispatch_message not lose message if OOM. * dbus/dbus-errors.h: Add NoReply error (for reply timeouts).
* 2003-02-16 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-161-0/+1
| | | | | | | * bus/dispatch.c: (bus_dispatch_message_handler): * dbus/dbus-errors.h: Return an error if someone tries to send a message to a service that doesn't exist.
* 2003-02-16 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/activation.c: (load_directory), (bus_activation_init), (bus_activation_activate_service): * bus/activation.h: * bus/driver.c: (bus_driver_handle_activate_service), (bus_driver_handle_message): More work on the activation handling. * dbus/dbus-errors.h: Add some error messages * dbus/dbus-message.c: (dbus_message_new_error_reply): * dbus/dbus-message.h: New function that creates an error message. * dbus/dbus-protocol.h: Add ACTIVATE_SERVER message. * dbus/dbus-server-unix.c: (unix_handle_watch), (_dbus_server_new_for_domain_socket): Call _dbus_fd_set_close_on_exec. * dbus/dbus-sysdeps.c: (make_pipe), (do_exec), (_dbus_spawn_async), (_dbus_disable_sigpipe), (_dbus_fd_set_close_on_exec): * dbus/dbus-sysdeps.h: Add _dbus_fd_set_close_on exec function. Also add function that checks that all open fds are set to close-on-exec and warns otherwise. * dbus/dbus-transport-unix.c: (_dbus_transport_new_for_domain_socket): Call _dbus_fd_set_close_on_exec.
* 2003-02-15 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-151-1/+5
| | | | | | | | | | | | | | | * 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-14 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-02-141-0/+5
| | | | | * dbus/dbus-errors.h (struct DBusError): add a word of padding to DBusError
* add @todoHavoc Pennington2003-02-141-3/+1
|
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 Richard Hult <rhult@codefactory.se>Richard Hult2003-02-131-0/+1
| | | | | | | * bus/main.c: Fix build. * dbus/dbus-errors.h: * dbus/dbus-errors.c: Fix copyright for Anders.
* 2003-02-13 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-02-131-1/+24
| | | | | | | * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init), (dbus_error_free), (dbus_set_error_const), (dbus_set_error): * dbus/dbus-errors.h: Add DBusError structure.
* 2003-01-26 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-261-0/+1
| | | | | | | | | | * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function * dbus/dbus-errors.c (dbus_result_to_string): add file errors * dbus/dbus-message-builder.c: new file, will contain code to load up messages from files. Not implemented yet.
* 2003-01-21 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-connection.c: (dbus_connection_send_message): Add a new client_serial parameter. (dbus_connection_send_message_with_reply): Remove a @todo since we've implemented the blocking function. (dbus_connection_send_message_with_reply_and_block): New function that sends a message and waits for a reply and then returns the reply. * dbus/dbus-connection.h: Add new functions. * dbus/dbus-errors.c: (dbus_result_to_string): * dbus/dbus-errors.h: Add new DBUS_RESULT. * dbus/dbus-message-internal.h: * dbus/dbus-message.c: (_dbus_message_get_reply_serial), (_dbus_message_set_sender), (dbus_message_write_header), (dbus_message_new_reply), (decode_header_data), (_dbus_message_loader_return_buffer), (_dbus_message_test): * dbus/dbus-message.h: Add new functions that set the reply serial and sender. Also marshal and demarshal them correctly and add test. * dbus/dbus-protocol.h: Add new DBUS_MESSAGE_TYPE_SENDER. * glib/dbus-glib.h: * glib/dbus-gmain.c: (watch_callback), (free_callback_data), (add_watch), (remove_watch), (add_timeout), (remove_timeout), (dbus_connection_hookup_with_g_main): * glib/test-dbus-glib.c: (main): Rewrite to use GIOChannel and remove the GSource crack. * test/echo-client.c: (main): * test/watch.c: (check_messages): Update for changed APIs
* 2003-01-14 Anders Carlsson <andersca@codefactory.se>Anders Carlsson2003-01-141-1/+2
| | | | | | | | | | | | | | | | * bus/connection.c: (connection_error_handler), (bus_connection_setup): * bus/main.c: (main): Make sure that the DBusConnectionData struct is NULLed out to prevent a segfault. * dbus/dbus-errors.c: (dbus_result_to_string): * dbus/dbus-errors.h: * dbus/dbus-message.c: (dbus_message_get_fields), (dbus_message_get_fields_valist), (_dbus_message_test): * dbus/dbus-message.h: Make dbus_message_get_fields return a result code so we can track invalid fields as well as oom.
* 2002-11-24 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-251-0/+62
* test/echo-client.c, test/echo-server.c: cheesy test clients. * configure.in (AC_CHECK_FUNCS): check for writev * dbus/dbus-message.c (_dbus_message_get_network_data): new function * dbus/dbus-list.c (_dbus_list_foreach): new function * dbus/dbus-internals.c (_dbus_verbose): new function * dbus/dbus-server.c, dbus/dbus-server.h: public object representing a server that listens for connections. * dbus/.cvsignore: create * dbus/dbus-errors.h, dbus/dbus-errors.c: public API for reporting errors * dbus/dbus-connection.h, dbus/dbus-connection.c: public object representing a connection that sends/receives messages. (Same object used for both client and server.) * dbus/dbus-transport.h, dbus/dbus-transport.c: Basic abstraction for different kinds of stream that we might read/write messages from.