2003-01-15 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / ChangeLog
index 1e20857..2f8f766 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,231 @@
+2003-01-15  Havoc Pennington  <hp@redhat.com>
+
+       * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
+       fix build when --disable-tests
+
+       * Makefile.am (EXTRA_DIST): put HACKING in here
+
+       * HACKING: document procedure for making a tarball release.
+
+2003-01-14  Anders Carlsson  <andersca@codefactory.se>
+
+       * 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.
+       
+2003-01-11  Havoc Pennington  <hp@pobox.com>
+
+       * configure.in: change --enable-test/--enable-ansi action-if-given
+       to enable_foo=$enableval instead of enable_foo=yes
+
+2003-01-08  Havoc Pennington  <hp@pobox.com>
+
+       * dbus/dbus-string.c (_dbus_string_align_length): new function
+
+       * dbus/dbus-test-main.c: move main() for test app here
+       * dbus/dbus-test.c
+       (dbus_internal_symbol_do_not_use_run_tests): we have to export a
+       symbol to run tests, because dbus-test isn't in the main 
+       library
+
+        Code review nitpicks.
+       
+       * dbus/dbus-message.c (dbus_message_write_header): add newlines
+       for people with narrow emacs ;-). Assert client_serial was filled
+       in. Assert message->name != NULL.
+       (dbus_message_append_fields): have "first_field_type" arg separate
+       from va list, needed for C++ binding that also uses varargs IIRC
+       and helps with type safety
+       (dbus_message_new): add @todo about using DBusString to store
+       service/name internally
+       (dbus_message_new): don't leak ->service and ->name on OOM later
+       in the function
+       (dbus_message_unref): free the service name
+       (dbus_message_get_fields): same change to varargs
+       i.e. first_field_type
+       (_dbus_message_loader_return_buffer): assert that the message data
+       is aligned (if not it's a bug in our code). Put in verbose griping
+       about why we set corrupted = TRUE.
+       (decode_header_data): add FIXME that char* is evil.  Was going to
+       add FIXME about evil locale-specific string.h strncmp, but just
+       switched to wacky string-as-uint32 optimization. Move check for
+       "no room for field name" above get_const_data_len() to avoid
+       assertion failure in get_const_data_len if we have trailing 2
+       bytes or the like. Check for service and name fields being
+       provided twice. Don't leak service/name on error. Require field
+       names to be aligned to 4 bytes.
+
+       * dbus/dbus-marshal.c: move byte swap stuff to header
+       (_dbus_pack_int32): uscore-prefix
+       (_dbus_unpack_int32): uscore-prefix
+       (_dbus_unpack_uint32): export
+       (_dbus_demarshal_string): add @todo complaining about use of
+       memcpy()
+       (_dbus_marshal_get_field_end_pos): add @todo about bad error
+       handling allowing corrupt data to go unchecked
+
+2003-01-08  Havoc Pennington  <hp@redhat.com>
+
+       * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
+       to the select() as needed for authentication. (should be using
+       _dbus_poll() not select, but for another day)
+
+       * dbus/dbus.h: include dbus/dbus-protocol.h
+
+2003-01-08  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/Makefile.am (dbusinclude_HEADERS): Install
+       dbus-connection.h
+
+2003-01-08  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-internals.c: (_dbus_type_to_string):
+       New function that returns a string describing a type.
+       
+       * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
+       * dbus/dbus-marshal.h:
+       * dbus/dbus-message.c: (dbus_message_get_fields_valist),
+       (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
+       (dbus_message_iter_get_byte_array):
+       * dbus/dbus-message.h:
+       Add new convenience functions for appending and getting message fields.
+       Also add demarshalling routines for byte arrays.
+
+2003-01-07  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-connection-internal.h:
+       * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
+       (_dbus_connection_get_next_client_serial),
+       (dbus_connection_send_message):
+       * dbus/dbus-internals.h:
+       * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
+       (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
+       (_dbus_marshal_uint32), (_dbus_demarshal_double),
+       (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
+       (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
+       (_dbus_verbose_bytes), (_dbus_marshal_test):
+       * dbus/dbus-marshal.h:
+       * dbus/dbus-message-internal.h:
+       * dbus/dbus-message.c: (_dbus_message_set_client_serial),
+       (dbus_message_write_header), (_dbus_message_lock),
+       (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
+       (dbus_message_get_name), (dbus_message_append_int32),
+       (dbus_message_append_uint32), (dbus_message_append_double),
+       (dbus_message_append_string), (dbus_message_append_byte_array),
+       (dbus_message_get_fields_iter), (dbus_message_iter_ref),
+       (dbus_message_iter_unref), (dbus_message_iter_has_next),
+       (dbus_message_iter_next), (dbus_message_iter_get_field_type),
+       (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
+       (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
+       (decode_header_data), (_dbus_message_loader_return_buffer),
+       (message_iter_test), (_dbus_message_test):
+       * dbus/dbus-message.h:
+       * dbus/dbus-protocol.h:
+       * dbus/dbus-test.c: (main):
+       * dbus/dbus-test.h:
+       * glib/test-dbus-glib.c: (message_handler), (main):
+       * test/echo-client.c: (main):
+       * test/watch.c: (check_messages):
+       Make messages sendable and receivable for real.
+       
+2003-01-07  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-marshal.c: (_dbus_marshal_double),
+       (_dbus_marshal_string), (_dbus_marshal_byte_array):
+       * dbus/dbus-message.c: (dbus_message_append_int32),
+       (dbus_message_append_uint32), (dbus_message_append_double),
+       (dbus_message_append_string), (dbus_message_append_byte_array):
+       Handle OOM restoration.
+       
+2003-01-07  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-marshal.c: (_dbus_marshal_string),
+       (_dbus_demarshal_string), (_dbus_marshal_test):
+       * dbus/dbus-marshal.h:
+       * dbus/dbus-message.c: (dbus_message_get_name),
+       Document these functions.
+       
+       (dbus_message_append_int32), (dbus_message_append_uint32),
+       (dbus_message_append_double), (dbus_message_append_string),
+       (dbus_message_append_byte_array):
+       * dbus/dbus-message.h:
+       Add functions for adding message fields of different types.
+       
+       * dbus/dbus-protocol.h:
+       Add the different types.
+
+2003-01-05  Havoc Pennington  <hp@pobox.com>
+
+       * bus/connection.c: implement routines for handling connections,
+       first thing is keeping a list of owned services on each connection
+       and setting up watches etc.
+
+       * bus/services.c: implement a mapping from service names to lists
+       of connections
+
+       * dbus/dbus-hash.c: add DBUS_HASH_POINTER
+
+       * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
+       to use static mutexes for global data
+
+       * dbus/dbus-connection.c (dbus_connection_set_data): add new
+       collection of functions to set/get application-specific data
+       on the DBusConnection.
+
+2003-01-04  Havoc Pennington  <hp@pobox.com>
+
+       * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
+       (_dbus_poll): new function
+
+       * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
+       copied from GLib
+
+       * bus/loop.c: initial code for the daemon main loop
+
+2003-01-04  Havoc Pennington  <hp@pobox.com>
+
+       * test/watch.c (error_handler): make it safe if the error handler 
+       is called multiple times (if we s/error handler/disconnect
+       handler/ we should just guarantee it's called only once)
+
+       * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
+       error handler on disconnect (it's quite possible we should
+       just change the error handler to a "disconnect handler," I'm 
+       not sure we have any other meaningful errors)
+
+       * configure.in: check for getpwnam_r
+
+       * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
+       dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
+       mechanism as in SASL spec, using socket credentials
+
+       * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
+       (_dbus_send_credentials_unix_socket): new function
+
+       * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
+       dbus_accept()
+       (_dbus_write): only check errno if <0 returned
+       (_dbus_write_two): ditto
+
+2003-01-02  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
+       (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
+       (_dbus_marshal_test):
+       * dbus/dbus-marshal.h:
+       Add _dbus_marshal_byte_array and rename _dbus_marshal_string
+       to _dbus_marshal_utf8_string. Also fix some tests.
+       
 2002-12-28  Harri Porten  <porten@kde.org>
 
        * configure.in: added check for C++ compiler and a very cheesy