diff options
-rw-r--r-- | ChangeLog | 757 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | configure.in | 63 | ||||
-rw-r--r-- | dbus/dbus-connection.c | 74 | ||||
-rw-r--r-- | mono/Service.cs | 24 |
5 files changed, 64 insertions, 862 deletions
@@ -1,51 +1,8 @@ -2005-02-10 Havoc Pennington <hp@redhat.com> +2005-02-11 Joe Shaw <joeshaw@novell.com> - * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail - (call dbus_g_proxy_add_signal) + * NEWS: Update for 0.23.1 - * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket): - escape the hostname - (_dbus_server_new_for_domain_socket): escape the path - - * dbus/dbus-address.c (dbus_address_escape_value): new - (dbus_address_unescape_value): new - (dbus_parse_address): unescape values - - * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function - - * doc/dbus-specification.xml: explain how to escape values in - addresses - -2005-02-10 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-factory.c (generate_special): modify test to - avoid using a non-basic dict key - - * dbus/dbus-marshal-validate-util.c: add test for the below - - * doc/dbus-specification.xml: require that dict keys are a basic - type - - * dbus/dbus-marshal-validate.c - (_dbus_validate_signature_with_reason): require that dict key is a - basic type - -2005-02-10 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock): - change to be _and_unlock instead of _unlocked - - * dbus/dbus-connection.c - (_dbus_connection_send_preallocated_unlocked_no_update): rename to - have no_update so we can find this bug quickly in future - -2005-02-10 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-util.c (verify_test_message): tests for string - array - - * dbus/dbus-message.c (dbus_message_append_args_valist): add - support for arrays of string/signature/path + * configure.in: Release 0.23.1 2005-02-10 Joe Shaw <joeshaw@novell.com> @@ -71,714 +28,6 @@ we don't get unmanaged code calling back into a GCed delegate. (RemoveFilter); Added. -2005-02-09 John (J5) Palmieri <johnp@redhat.com> - - * dbus/dbus-message.c (dbus_message_iter_open_container): - - Removed check for iterator type being an array because - get_arg_type does not work with writer iterators - - Pass NULL to _dbus_type_writer_recurse if signiture is NULL - -2005-02-07 Havoc Pennington <hp@redhat.com> - - * doc/dbus-specification.xml: some more language cleanups; add - stuff about how to deal with invalid protocol and extension - points; add _ to allowed chars in auth commands; add EXTENSION_ - auth command prefix - -2005-02-06 Havoc Pennington <hp@redhat.com> - - * s/expected/required/ in a couple places for clarity - -2005-02-07 Colin Walters <walters@verbum.org> - - * bus/selinux.c (bus_selinux_allows_send): Handle NULL for - sender or proposed_recipient. - -2005-02-06 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-factory.c (generate_special): more tests - - * dbus/dbus-marshal-validate.c (validate_body_helper): detect - array length that exceeds the maximum - -2005-02-05 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-factory.c (generate_special): more test cases, - increasing coverage - - * dbus/dbus-marshal-validate.c (validate_body_helper): return the - reason why a signature was invalid - - * dbus/dbus-marshal-header.c (load_and_validate_field): fix to - skip the length of the string before we look at it in validation - - * dbus/dbus-string-util.c (_dbus_string_test): add tests for - equal_substring - - * dbus/dbus-message.c (_dbus_message_loader_new): default - max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH - -2005-02-05 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash - if the signature of a variant was empty - (_dbus_validate_signature_with_reason): catch "(a)" (array inside - struct with no element type) - - * dbus/dbus-message-factory.c (generate_uint32_changed): add more - mangled messages to break things - -2005-02-04 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use - g_quark_try_string() so it actually can return 0 - (dbus_g_proxy_connect_signal): ditto - -2005-02-04 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a - bogus warning - (tristring_from_message): assert cleanly on null path/interface - (should not be possible though I decided later) - (dbus_g_proxy_dispose): move proxy manager unregistration here - (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of - g_return_if_fail() checks - -2005-02-04 Havoc Pennington <hp@redhat.com> - - * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile - - * doc/introspect.dtd: add introspect.dtd from David A. Wheeler - (with some minor changes) - - * doc/dbus-specification.xml: add deprecated attribute to - introspection format - -2005-01-31 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gproxy.c: rewrite how signals work again, this time I - think it's sort of right - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * tools/dbus-viewer.c: kind of half-ass hook up the option menu. - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * tools/dbus-names-model.c: dynamically watch NameOwnerChanged - - * autogen.sh: change to autotools 1.9 - - * glib/dbus-gproxy.c: completely change how signals work - (dbus_g_proxy_add_signal): new function to specify signature of a - signal - (dbus_g_proxy_emit_received): marshal the dbus message to GValues, - and g_warning if the incoming message has the wrong signature. - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * tools/dbus-names-model.c (have_names_notify): fix this - - * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean - up the string array handling a bit - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function - (dbus_g_pending_call_cancel): new function - - * dbus/dbus-glib.h: move GType decls for connection/message here; - * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in - here, just kind of rationalizing how we handle all that - - * tools/dbus-names-model.c: new file for a tree model listing the - services on a bus - - * tools/dbus-tree-view.c (model_new): use proper typing on the - model rows - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gmain.c: add a custom GSource back that just checks - whether the message queue has anything in it; otherwise, there are - cases where we won't see messages in the queue since there was no - IO visible to the glib main loop - - * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE): - increase default message timeout to 25 seconds - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * test/glib/test-profile.c (no_bus_stop_server): remove the - warning about the g_warning that I just fixed - - * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the - custom source, seems to be a lot easier to understand and work - better. - -2005-01-30 Havoc Pennington <hp@redhat.com> - - I think this main loop thing is conceptually broken, but here are - some band aids. I'll maybe rewrite it in a minute. - - * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the - custom GSource, so don't pass it in; confusing - (gsource_server_finalize, gsource_connection_finalize): add - finalize handlers that remove all the watches. - -2005-01-30 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gobject.c (introspect_properties): fix the XML - generated - - * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag - which effectively detects the use of freed messages - - * glib/dbus-gobject.c (handle_introspect): modify and return the - reply message instead of the incoming message - - * dbus/dbus-object-tree.c (handle_default_introspect_unlocked): - gee, maybe it should SEND THE XML instead of just making a string - and freeing it again ;-) - - * tools/dbus-print-message.c (print_message): improve printing of - messages - - * configure.in: add debug-glib.service to the output - -2005-01-30 Havoc Pennington <hp@redhat.com> - - dbus-viewer introspected and displayed the bus driver - - * dbus/dbus-object-tree.c - (object_tree_test_iteration): add tests for a handler registered on "/" - - * dbus/dbus-object-tree.c - (_dbus_decompose_path): fix to handle path "/" properly - (run_decompose_tests): add tests for path decomposition - - * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/" - properly - - * glib/dbus-gobject.c (handle_introspect): fix quotes - - * test/glib/run-test.sh: support launching the bus, then running - dbus-viewer - - * test/glib/test-service-glib.c (main): put in a trivial gobject - subclass and register it on the connection - - * bus/driver.c (bus_driver_handle_introspect): implement - introspection of the bus driver service - - * dbus/dbus-protocol.h: add #defines for the XML namespace, - identifiers, doctype decl - - * bus/driver.c (bus_driver_handle_get_service_owner): handle - attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by - returning the service unchanged. - (bus_driver_handle_message): remove old check for reply_serial in - method calls, now the message type deals with that - (bus_driver_handle_message): handle NULL interface - - * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function - - * glib/dbus-gloader-expat.c (description_load_from_string): allow - -1 for len - - * tools/dbus-viewer.c: add support for introspecting a service on - a bus - - * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add - (dbus_g_pending_call_unref): add - -2005-01-29 Havoc Pennington <hp@redhat.com> - - * tools/dbus-tree-view.c: add support for displaying properties. - (run dbus-viewer with an introspect xml file as arg, then resize - the window so the tree elements show up, not sure what that is) - - * glib/dbus-gobject.c (handle_introspect): return - org.freedesktop.Properties and org.freedesktop.Introspectable - interfaces when we are introspected. - - * doc/dbus-specification.xml: allow empty interface name when - Get/Set a property - -2005-01-29 Havoc Pennington <hp@redhat.com> - - * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool; - though it uses glib, it could be extended for any binding in - principle - - * glib/dbus-gobject.c (gobject_message_function): change to the - new way properties work - - * dbus/dbus-protocol.h: add the new interfaces - - * doc/dbus-specification.xml: document the introspection format, - Introspectable interface, and add an org.freedesktop.Properties - interface. - - * glib/dbus-gparser.c: add support for a <property> element - - * glib/dbus-gidl.c: add PropertyInfo - - * glib/dbus-gobject.c (handle_introspect): put the outermost - <node> outside the signal and property descriptions. - (introspect_properties): export properties as <property> rather - than as method calls - -2005-01-28 Havoc Pennington <hp@redhat.com> - - * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks - related to authentication protocol - -2005-01-28 John (J5) Palmieri <johnp@redhat.com> - - * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system - - BUS_ACTIVATION -> BUS_STARTER - - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER - - class MessageIter (__init__): Added recursion checking - so we throw a nice error instead of just disconnecting from the - bus. - (get): Added arg_type parameter for recursion. - Removed the nil type - Added signiture type placeholder (not implemented) - Added struct type placeholder (not implemented) - Added varient type placeholder (not implemented) - Commented out dict type for now - (get_element_type): renamed from get_array_type - (get_*): changed to use the dbus_message_iter_get_basic API - (get_*_array): removed in favor of recursive get_array method - (get_array): new recursive method which calls get to marshal - the elements of the array - (value_to_dbus_sig): New method returns the corrasponding - dbus signiture to a python value - (append): Comment out dict handling for now - Handle lists with the new recursive API - Comment out None handling for now - (append_nil): removed - (append_*): changed to use dbus_message_iter_append_basic API - (append_*_array): removed in favor of recursive append_array - method - (__str__): Make it easier to print out recursive iterators - for debugging - - class Message (__str__): moved type inspection to the - MessageIter class' __str__ method - (get_iter): Added an append parameter wich defaults to False - If True use the new API's to create an append iterator - - * python/dbus.py: Update to use new bindings API - - TYPE_ACTIVATION -> TYPE_STARTER - - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner - - class ActivationBus -> class StarterBus - - class RemoteObject (__call__): get an append iterator - - (_dispatch_dbus_method_call): get an append iterator - - class Object (emit_signal): get an append iterator - - * python/examples/: Fixed up the examples to work with the new API - -2005-01-28 Joe Shaw <joeshaw@novell.com> - - * configure.in: Bump version up to 0.30. - - * HACKING: Add a release item to bump the version number up after - a release. - -2005-01-28 Havoc Pennington <hp@redhat.com> - - * doc/dbus-specification.xml: update to describe 16-bit types and - dict entries - - * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken - assertion - - * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a - type - - * dbus/dbus-marshal-recursive.c: implement - -2005-01-27 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-arch-deps.h.in: add 16/32-bit types - - * configure.in: find the right type for 16 and 32 bit ints as well - as 64 - - * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add - the 16-bit types so people don't have to stuff them in 32-bit or - byte arrays. - -2005-01-27 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message.c: byteswap the message if you init an - iterator to read/write from it - - * dbus/dbus-marshal-byteswap.c: new file implementing - _dbus_marshal_byteswap() - - * dbus/dbus-marshal-basic.c: add _dbus_swap_array() - -2005-01-26 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-marshal-validate-util.c: break this out (and fix - build, apparently - nobody noticed?) - -2005-01-26 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-marshal-recursive.h: remove todo comment - -2005-01-25 Joe Shaw <joeshaw@novell.com> - - * Land the mono binding changes to conform to the new APIs. - - * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs, - DBusType/Dict.cs, and DBusType/Nil.cs from the build. - - * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus - type code as a string. - (InitAppending): Rename dbus_message_append_iter_init() to - dbus_message_iter_init_append(). - - * mono/BusDriver.cs: Rename ServiceEventHandler to - NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner. - Rename ServiceOwnerChanged to NameOwnerChanged. - - * mono/Connection.cs: Rename BaseService to UniqueName, and the - underlying C call. - - * mono/Custom.cs: Removed. The CUSTOM type has been removed. - - * mono/Service.cs: Rename Exists to HasOwner, internally rename - dbus_bus_acquire_service() to dbus_bus_request_name(). - - * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead - of Type.UnderlyingSystemType to get the correct element type for - the array. - (ctor): Update code for new APIs: use dbus_message_iter_recurse(), - dbus_message_get_{element|arg}_type() instead of - dbus_message_iter_init_array_iterator(). - (Append): Replace dbus_message_iter_append_array() with - dbus_message_iter_open_container() and - dbus_message_iter_close_container(). - - * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These - types have been removed. - - * mono/DBusType/*.cs: Replace calls of - dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(), - but specify the type in the DllImport extern declaration. Ditto - for dbus_message_iter_append_[type]() -> - dbus_message_iter_append_basic(). - - * mono/example/BusListener.cs: Update for ServiceEventHandler -> - NameOwnerChangedHandler. - -2005-01-25 John (J5) Palmieri <johnp@redhat.com> - - * python/dbus_bindings.pyx.in: Rename of methods and bindings - - get_base_service -> get_unique_name - - bus_get_base_service -> bus_get_unique_name - - dbus_bus_get_base_service -> dbus_bus_get_unique_name - - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS - - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING - - bus_activate_service -> bus_start_service_by_name - - dbus_bus_activate_service -> dbus_bus_start_service_by_name - - bus_acquire_service -> bus_request_name - - dbus_bus_acquire_service -> dbus_bus_request_name - - bus_service_exists -> bus_name_has_owner - - dbus_bus_service_exists -> dbus_bus_name_has_owner - - * python/dbus.py: Rename of methods - - activate_service -> start_service_by_name - - bus_acquire_service -> bus_request_name - - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS - - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING - - -2005-01-24 Joe Shaw <joeshaw@novell.com> - - * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the - signature for the method that can't be found. - - * dbus/dbus-message.c (dbus_message_iter_init): To check to see if - the message has any arguments, we need to call - _dbus_type_reader_get_current_type(), not - _dbus_type_reader_has_next(). - -2005-01-24 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-factory.c: more testing of message validation - - * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this - header - -2005-01-23 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: - get this all working, not many tests in the framework yet though - -2005-01-22 Havoc Pennington <hp@redhat.com> - - * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update - tutorial, based on work from David Wheeler. - -2005-01-21 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-bus.c: add more return_if_fail checks - - * dbus/dbus-message.c (load_message): have the "no validation" - mode (have to edit the code to toggle the mode for now though) - - * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that - skips all validation; I want to use this at least for benchmark - baseline, I'm not sure if it should be a publicly-available switch. - -2005-01-21 Havoc Pennington <hp@redhat.com> - - * glib/dbus-gmain.c: don't put the GLib bindings in the same - toplevel doxygen group as the low-level API stuff - - * dbus/dbus.h: note that libdbus is the low-level API - -2005-01-20 Havoc Pennington <hp@redhat.com> - - * update-dbus-docs.sh: script to update docs on the web site, only - works for me though. neener. - -2005-01-20 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile - code can reveal bugs in it - -2005-01-20 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the - select() version, patches from Tor Lillqvist - -2005-01-20 Havoc Pennington <hp@redhat.com> - - * doc/dbus-tutorial.xml: replace > with > - - * bus/services.c (bus_registry_acquire_service): validate the name - and return a better error if it's no good. - - * doc/dbus-specification.xml: note NO_AUTO_START change - - * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change - from AUTO_START, we're toggling the default - - * bus/dispatch.c: adapt the tests to change of auto-start default - -2005-01-18 Havoc Pennington <hp@redhat.com> - - * rename dbus-daemon-1 to dbus-daemon throughout - -2005-01-18 Havoc Pennington <hp@redhat.com> - - * Throughout, grand renaming to strip out the use of "service", - just say "name" instead (or "bus name" when ambiguous). Did not - change the internal code of the message bus itself, only the - programmer-facing API and messages. - - * doc/dbus-specification.xml: further update the message bus section - - * bus/config-parser.c (all_are_equiv): fix bug using freed string - in error case - -2005-01-17 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-types.h: remove 16-bit types since we don't use them - ever - - * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any - "invalid name character" not only non-ASCII - - * doc/dbus-specification.xml: further update spec, message bus - parts are still out-of-date but the marshaling etc. stuff is now - accurate-ish - -2005-01-17 Havoc Pennington <hp@redhat.com> - - * doc/dbus-specification.xml: partially update spec - -2005-01-17 Havoc Pennington <hp@redhat.com> - - * Throughout, align variant bodies according to the contained - type, rather than always to 8. Should save a fair bit of space in - message headers. - - * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason): - fix handling of case where p == end - - * doc/TODO: remove the dbus_bool_t item and variant alignment items - -2005-01-17 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits - - * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead - of an 8-bit type. Now dbus_bool_t is the type to use whenever you - are marshaling/unmarshaling a boolean. - -2005-01-16 Havoc Pennington <hp@redhat.com> - - This is about it on what can be disabled/deleted from libdbus - easily, back below 150K anyhow. Deeper cuts are more work than - just turning the code off as I've done here. - - * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the - signed int convenience funcs - - * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in - verbose mode - - * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking - things out of libdbus - - * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same - - * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it - tests-enabled-only, though it should probably be deleted) - - * dbus/dbus-message-util.c: same stuff - - * dbus/dbus-auth-util.c: same stuff - -2005-01-16 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c - - * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave - way for stripping down dbus-userdb.c stuff included in libdbus. - Rename _dbus_parse_uid for consistency. - -2005-01-16 Havoc Pennington <hp@redhat.com> - - * dbus/dbus-internals.c (_dbus_real_assert): print the function - name the assertion failed in - - * dbus/dbus-internals.h (_dbus_return_if_fail) - (_dbus_return_val_if_fail): assert that the name of the function - containing the check doesn't start with '_', since we only want to - use checks on public functions - - * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change - checks to assertions - - * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic): - change checks to asserts for private function - - * dbus/dbus-message.c (_dbus_message_set_serial): checks - to asserts for private function - - * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove - broken assertion that was breaking make check - (_dbus_type_reader_array_is_empty): remove this rather than fix - it, was only used in assertions - -2005-01-16 Havoc Pennington <hp@redhat.com> - - * test/unused-code-gc.py: hacky script to find code that's used - only by the bus (not libdbus) or used only by tests or not used at - all. It has some false alarms, but looks like we can clean up a - lot of size from libdbus. - - * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c, - dbus/Makefile.am: initially move 10K of binary size out of libdbus - -2005-01-16 Havoc Pennington <hp@redhat.com> - - * Add and fix docs according to Doxygen warnings throughout - source. - - * dbus/dbus-marshal-recursive.c - (_dbus_type_reader_array_is_empty): change this to just call - array_reader_get_array_len() and make it static - - * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename - from get_array_type - (dbus_message_iter_init_append): rename from append_iter_init - - * dbus/dbus-marshal-recursive.c - (_dbus_type_reader_get_element_type): rename from - _dbus_type_reader_get_array_type - -2005-01-15 Havoc Pennington <hp@redhat.com> - - * test/glib/test-profile.c (with_bus_server_filter): fix crash - - * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro - when DBUS_DISABLE_ASSERT - (_dbus_marshal_set_basic): be sure we align for the string length - - * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make - this look faster - - * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an - inline macro version - (_dbus_string_set_byte): provide inline macro version - -2005-01-15 Havoc Pennington <hp@redhat.com> - - * Land the new message args API and type system. - - This patch is huge, but the public API change is not - really large. The set of D-BUS types has changed somewhat, - and the arg "getters" are more geared toward language bindings; - they don't make a copy, etc. - - There are also some known issues. See these emails for details - on this huge patch: - http://lists.freedesktop.org/archives/dbus/2004-December/001836.html - http://lists.freedesktop.org/archives/dbus/2005-January/001922.html - - * dbus/dbus-marshal-*: all the new stuff - - * dbus/dbus-message.c: basically rewritten - - * dbus/dbus-memory.c (check_guards): with "guards" enabled, init - freed blocks to be all non-nul bytes so using freed memory is less - likely to work right - - * dbus/dbus-internals.c (_dbus_test_oom_handling): add - DBUS_FAIL_MALLOC=N environment variable, so you can do - DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or - DBUS_FAIL_MALLOC=10 to make it really, really, really slow and - thorough. - - * qt/message.cpp: port to the new message args API - (operator<<): use str.utf8() rather than str.unicode() - (pretty sure this is right from the Qt docs?) - - * glib/dbus-gvalue.c: port to the new message args API - - * bus/dispatch.c, bus/driver.c: port to the new message args API - - * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the - "locked" flag to TRUE and align_offset to 0; I guess we never - looked at these anyhow, but seems cleaner. - - * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING): - move allocation padding macro to this header; use it to implement - (_DBUS_STRING_STATIC): ability to declare a static string. - - * dbus/dbus-message.c (_dbus_message_has_type_interface_member): - change to return TRUE if the interface is not set. - - * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff - to dbus-marshal-validate.[hc] - - * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from - dbus-internals.c - - * dbus/Makefile.am: cut over from dbus-marshal.[hc] - to dbus-marshal-*.[hc] - - * dbus/dbus-object-tree.c (_dbus_decompose_path): move this - function here from dbus-marshal.c - 2005-01-12 Joe Shaw <joeshaw@novell.com> * NEWS: Update for 0.23. @@ -1,3 +1,11 @@ +D-BUS 0.23.1 (11 Feb 2005) +=== +- fix a bug in which the bus daemon wouldn't recognize that a service + owner quit +- fix a bug in the mono bindings that would cause unmanaged code to + call back into a delegate that had been garbage collected and + crashed. + D-BUS 0.23 (11 Jan 2005) === diff --git a/configure.in b/configure.in index 87f214b1..ad646062 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_PREREQ(2.52) AC_INIT(dbus/dbus.h) -AM_INIT_AUTOMAKE(dbus, 0.30) +AM_INIT_AUTOMAKE(dbus, 0.23.1) AM_CONFIG_HEADER(config.h) @@ -369,53 +369,6 @@ AC_SUBST(DBUS_INT64_CONSTANT) AC_SUBST(DBUS_UINT64_CONSTANT) AC_SUBST(DBUS_HAVE_INT64) -### see what 32-bit int is called -AC_MSG_CHECKING([32-bit integer type]) - -case 4 in -$ac_cv_sizeof_short) - dbusint32=int - ;; -$ac_cv_sizeof_int) - dbusint32=int - ;; -$ac_cv_sizeof_long) - dbusint32=long - ;; -esac - -if test -z "$dbusint32" ; then - DBUS_INT32_TYPE="no_int32_type_detected" - AC_MSG_ERROR([No 32-bit integer type found]) -else - DBUS_INT32_TYPE="$dbusint32" - AC_MSG_RESULT($DBUS_INT32_TYPE) -fi - -AC_SUBST(DBUS_INT32_TYPE) - -### see what 16-bit int is called -AC_MSG_CHECKING([16-bit integer type]) - -case 2 in -$ac_cv_sizeof_short) - dbusint16=short - ;; -$ac_cv_sizeof_int) - dbusint16=int - ;; -esac - -if test -z "$dbusint16" ; then - DBUS_INT16_TYPE="no_int16_type_detected" - AC_MSG_ERROR([No 16-bit integer type found]) -else - DBUS_INT16_TYPE="$dbusint16" - AC_MSG_RESULT($DBUS_INT16_TYPE) -fi - -AC_SUBST(DBUS_INT16_TYPE) - ## byte order AC_C_BIGENDIAN @@ -819,13 +772,6 @@ fi AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes) AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes) -if test x$have_glib = xyes; then - GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` -else - GLIB_GENMARSHAL=glib-not-enabled-so-there-is-no-genmarshal -fi -AC_SUBST(GLIB_GENMARSHAL) - dnl GLib flags AC_SUBST(DBUS_GLIB_CFLAGS) AC_SUBST(DBUS_GLIB_LIBS) @@ -1118,7 +1064,7 @@ AC_SUBST(TEST_$1) TEST_PATH(SERVICE_DIR, data/valid-service-files) TEST_PATH(SERVICE_BINARY, test-service) -TEST_PATH(GLIB_SERVICE_BINARY, glib/test-service-glib) +TEST_PATH(GLIB_SERVICE_BINARY, test-service-glib) TEST_PATH(EXIT_BINARY, test-exit) TEST_PATH(SEGFAULT_BINARY, test-segfault) TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever) @@ -1195,7 +1141,7 @@ bus/system.conf bus/session.conf bus/messagebus bus/rc.messagebus -bus/dbus-daemon.1 +bus/dbus-daemon-1.1 Makefile dbus/Makefile glib/Makefile @@ -1223,7 +1169,6 @@ test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf test/data/valid-service-files/debug-echo.service test/data/valid-service-files/debug-segfault.service -test/data/valid-service-files/debug-glib.service ]) ### FIXME it's bizarre that have_qt and have_glib are used @@ -1249,8 +1194,6 @@ echo " cppflags: ${CPPFLAGS} cxxflags: ${CXXFLAGS} 64-bit int: ${DBUS_INT64_TYPE} - 32-bit int: ${DBUS_INT32_TYPE} - 16-bit int: ${DBUS_INT16_TYPE} Doxygen: ${DOXYGEN} xmlto: ${XMLTO}" diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index dfc5d44b..80fdf1f6 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -38,6 +38,7 @@ #include "dbus-string.h" #include "dbus-pending-call.h" #include "dbus-object-tree.h" +#include "dbus-marshal.h" #if 0 #define CONNECTION_LOCK(connection) do { \ @@ -357,7 +358,7 @@ _dbus_connection_queue_received_message_link (DBusConnection *connection, _dbus_connection_wakeup_mainloop (connection); - _dbus_verbose ("Message %p (%d %s %s %s '%s' reply to %u) added to incoming queue %p, %d incoming\n", + _dbus_verbose ("Message %p (%d %s %s %s '%s') added to incoming queue %p, %d incoming\n", message, dbus_message_get_type (message), dbus_message_get_path (message), @@ -368,7 +369,6 @@ _dbus_connection_queue_received_message_link (DBusConnection *connection, dbus_message_get_member (message) : "no member", dbus_message_get_signature (message), - dbus_message_get_reply_serial (message), connection, connection->n_incoming); } @@ -1007,8 +1007,8 @@ _dbus_connection_new_for_transport (DBusTransport *transport) DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection) { - _dbus_assert (connection != NULL); - _dbus_assert (connection->generation == _dbus_current_generation); + _dbus_return_val_if_fail (connection != NULL, NULL); + _dbus_return_val_if_fail (connection->generation == _dbus_current_generation, NULL); #ifdef DBUS_HAVE_ATOMIC_INT _dbus_atomic_inc (&connection->refcount); @@ -1445,7 +1445,7 @@ _dbus_connection_preallocate_send_unlocked (DBusConnection *connection) { DBusPreallocatedSend *preallocated; - _dbus_assert (connection != NULL); + _dbus_return_val_if_fail (connection != NULL, NULL); preallocated = dbus_new (DBusPreallocatedSend, 1); if (preallocated == NULL) @@ -1540,12 +1540,11 @@ dbus_connection_free_preallocated_send (DBusConnection *connection, dbus_free (preallocated); } -/* Called with lock held, does not update dispatch status */ static void -_dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *connection, - DBusPreallocatedSend *preallocated, - DBusMessage *message, - dbus_uint32_t *client_serial) +_dbus_connection_send_preallocated_unlocked (DBusConnection *connection, + DBusPreallocatedSend *preallocated, + DBusMessage *message, + dbus_uint32_t *client_serial) { dbus_uint32_t serial; const char *sig; @@ -1565,8 +1564,17 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con connection->n_outgoing += 1; sig = dbus_message_get_signature (message); +#ifndef DBUS_DISABLE_ASSERT + { + DBusString foo; + _dbus_verbose (" validating signature '%s'\n", sig); + _dbus_string_init_const (&foo, sig); + _dbus_assert (_dbus_string_validate_signature (&foo, 0, + _dbus_string_get_length (&foo))); + } +#endif - _dbus_verbose ("Message %p (%d %s %s %s '%s') for %s added to outgoing queue %p, %d pending to send\n", + _dbus_verbose ("Message %p (%d %s %s %s '%s') added to outgoing queue %p, %d pending to send\n", message, dbus_message_get_type (message), dbus_message_get_path (message), @@ -1577,9 +1585,6 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con dbus_message_get_member (message) : "no member", sig, - dbus_message_get_destination (message) ? - dbus_message_get_destination (message) : - "null", connection, connection->n_outgoing); @@ -1595,9 +1600,6 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con if (client_serial) *client_serial = dbus_message_get_serial (message); } - - _dbus_verbose ("Message %p serial is %u\n", - message, dbus_message_get_serial (message)); _dbus_message_lock (message); @@ -1621,9 +1623,9 @@ _dbus_connection_send_preallocated_and_unlock (DBusConnection *connection, { DBusDispatchStatus status; - _dbus_connection_send_preallocated_unlocked_no_update (connection, - preallocated, - message, client_serial); + _dbus_connection_send_preallocated_unlocked (connection, + preallocated, + message, client_serial); status = _dbus_connection_get_dispatch_status_unlocked (connection); @@ -1667,9 +1669,9 @@ dbus_connection_send_preallocated (DBusConnection *connection, } static dbus_bool_t -_dbus_connection_send_unlocked_no_update (DBusConnection *connection, - DBusMessage *message, - dbus_uint32_t *client_serial) +_dbus_connection_send_unlocked (DBusConnection *connection, + DBusMessage *message, + dbus_uint32_t *client_serial) { DBusPreallocatedSend *preallocated; @@ -1680,14 +1682,15 @@ _dbus_connection_send_unlocked_no_update (DBusConnection *connection, if (preallocated == NULL) return FALSE; - _dbus_connection_send_preallocated_unlocked_no_update (connection, - preallocated, - message, - client_serial); + + _dbus_connection_send_preallocated_unlocked (connection, + preallocated, + message, + client_serial); return TRUE; } -dbus_bool_t +static dbus_bool_t _dbus_connection_send_and_unlock (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *client_serial) @@ -1867,7 +1870,7 @@ dbus_connection_send_with_reply (DBusConnection *connection, pending)) goto error; - if (!_dbus_connection_send_unlocked_no_update (connection, message, NULL)) + if (!_dbus_connection_send_unlocked (connection, message, NULL)) { _dbus_connection_detach_pending_call_and_unlock (connection, pending); @@ -1944,9 +1947,9 @@ _dbus_connection_block_for_reply (DBusConnection *connection, long tv_sec, tv_usec; DBusDispatchStatus status; - _dbus_assert (connection != NULL); - _dbus_assert (client_serial != 0); - _dbus_assert (timeout_milliseconds >= 0 || timeout_milliseconds == -1); + _dbus_return_val_if_fail (connection != NULL, NULL); + _dbus_return_val_if_fail (client_serial != 0, NULL); + _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, FALSE); if (timeout_milliseconds == -1) timeout_milliseconds = _DBUS_DEFAULT_TIMEOUT_VALUE; @@ -2788,9 +2791,8 @@ dbus_connection_dispatch (DBusConnection *connection) } if (!_dbus_string_append_printf (&str, - "Method \"%s\" with signature \"%s\" on interface \"%s\" doesn't exist\n", + "Method \"%s\" on interface \"%s\" doesn't exist\n", dbus_message_get_member (message), - dbus_message_get_signature (message), dbus_message_get_interface (message))) { _dbus_string_free (&str); @@ -2821,8 +2823,8 @@ dbus_connection_dispatch (DBusConnection *connection) goto out; } - _dbus_connection_send_preallocated_unlocked_no_update (connection, preallocated, - reply, NULL); + _dbus_connection_send_preallocated_unlocked (connection, preallocated, + reply, NULL); dbus_message_unref (reply); diff --git a/mono/Service.cs b/mono/Service.cs index b5547961..55091cd8 100644 --- a/mono/Service.cs +++ b/mono/Service.cs @@ -41,7 +41,7 @@ namespace DBus // This isn't used for now uint flags = 0; - if (dbus_bus_request_name (connection.RawConnection, name, flags, ref error) == -1) { + if (dbus_bus_acquire_service(connection.RawConnection, name, flags, ref error) == -1) { throw new DBusException(error); } @@ -56,12 +56,12 @@ namespace DBus RemoveFilter (); } - public static bool HasOwner(Connection connection, string name) + public static bool Exists(Connection connection, string name) { Error error = new Error(); error.Init(); - if (dbus_bus_name_has_owner(connection.RawConnection, + if (dbus_bus_service_exists(connection.RawConnection, name, ref error)) { return true; @@ -75,10 +75,10 @@ namespace DBus public static Service Get(Connection connection, string name) { - if (HasOwner(connection, name)) { + if (Exists(connection, name)) { return new Service(name, connection); } else { - throw new ApplicationException("Name '" + name + "' does not exist."); + throw new ApplicationException("Service '" + name + "' does not exist."); } } @@ -125,11 +125,11 @@ namespace DBus dbus_bus_add_match(connection.RawConnection, MatchRule, IntPtr.Zero); } - private void RemoveFilter() + private void RemoveFilter() { dbus_connection_remove_filter (Connection.RawConnection, - this.filterCalled, - IntPtr.Zero); + this.filterCalled, + IntPtr.Zero); this.filterCalled = null; dbus_bus_remove_match (connection.RawConnection, MatchRule, IntPtr.Zero); @@ -201,12 +201,12 @@ namespace DBus } [DllImport("dbus-1")] - private extern static int dbus_bus_request_name(IntPtr rawConnection, - string serviceName, - uint flags, ref Error error); + private extern static int dbus_bus_acquire_service(IntPtr rawConnection, + string serviceName, + uint flags, ref Error error); [DllImport("dbus-1")] - private extern static bool dbus_bus_name_has_owner(IntPtr rawConnection, + private extern static bool dbus_bus_service_exists(IntPtr rawConnection, string serviceName, ref Error error); |