| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_iter_get_fixed_array):
Patch from Rob Taylor <rob.taylor@collabora.co.uk> to correct a bogus
assertion that the next element to read from the iter is fixed in
size. This is not the case when you are at the end of the iter,
because the next element type is INVALID.
* dbus/dbus-string.c (_dbus_string_init_const_len): Correct a
a bogus assert which means that you may not initialise a 0-length
string unless you provide a non-NULL pointer. This prevented
you from marshalling messages containing zero-length arrays in
some cases.
* glib/dbus-gvalue.c (demarshal_collection_array): Another patch
from Rob to correct bogus asserts when trying to demarshal an
array and get_fixed_array got you 0 elements. Append nothing to
the GArray in this case.
* test/glib/test-dbus-glib.c: Add a test case for round-tripping
an empty array via the glib bindings. Without all of the above
patches, this new test fails.
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_set_reply_serial): print
warning if the reply serial is set to 0
|
|
|
|
| |
* fix a bunch of Doxygen warnings and mistakes
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(dbus_message_has_path): New method
(dbus_message_has_interface): New method
(dbus_message_has_member): New method
* dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
New method
* dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
the keyring directory is private to the user
* doc/TODO:
- The convenience functions in dbus-bus.h should perhaps have
the signatures that they would have if they were autogenerated
stubs. e.g. the acquire service function. We should also evaluate
which of these functions to include, in light of the fact that
GLib/Qt native stubs will probably also exist.: Punted
- add dbus_message_has_path(), maybe has_member/interface:
fixed in this patch
- in dbus-keyring.c, enforce that the keyring dir is not
world readable/writable: Fixed in this patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for
out of memory errors when validating signitures
* dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
in places where we previously used DBUS_VALID and a FALSE return
value to indicate OOM
* dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
Use a stack to track the number of elements inside containers. The
stack values are then used to validate that dict entries have only two
elements within them.
(validate_body_helper): check the reason for failure when validating
varients
* dbus/dbus-message.c (load_message): use
DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
DBUS_VALID and a FALSE return value to indicate OOM
* doc/TODO: remove "- validate dict entry number of fields" as this
patch fixes it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-signature.c (dbus_signature_iter_get_signature):
New function, returns signature string for signature iter.
* dbus/dbus-signature.h: Prototype it.
* dbus/dbus-message.c (dbus_message_iter_get_signature):
New function, returns signature string for message iter.
(dbus_message_iter_get_array_len): New function, returns
length of array.
(dbus_message_iter_get_fixed_array): Fix assertion; this
function should be used when the iter is pointing to the
contents of an array
* dbus/dbus-message.h: Prototypes.
* dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
New function; returns length of an array.
* dbus/dbus-marshal-recursive.h: Prototype it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
reported by Tony Houghton
* test/test-service.c (main): test
dbus_connection_get_object_path_data()
* dbus/dbus-object-tree.c (find_handler): be sure we always init
the exact_match
(_dbus_object_tree_get_user_data_unlocked): new function used by
dbus_connection_get_object_path_data()
(do_register): add assertion test for get_user_data_unlocked
(object_tree_test_iteration): more tests
* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
new function from Dan Reed to let you get the user data from
dbus_connection_register_object_path()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
to this are generated for client-side wrappers. Invokes a
D-BUS method and returns reply values.
* glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
function; writes signature string for argument direction.
(write_args_for_direction): Change to pass input values directly
instead of via address, and fix indentation.
(generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
make generated wrappers inlineable.
* dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
note about using dbus_type_is_fixed.
* dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
dbus/dbus-signature.c as dbus_type_is_fixed.
All callers updated.
* dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
* dbus/dbus-signature.h: Prototype.
* glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
error printf code.
* test/glib/test-dbus-glib.c (main): Be sure to clear error as
appropriate instead of just freeing it.
(main): Free returned strings using g_free.
* test/glib/Makefile.am (test-service-glib-glue.h)
(test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
* glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
simply maps a simple D-BUS type to GType.
(dbus_dbus_type_to_gtype): Function which maps D-BUS type to
GType.
(dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
initialize the value with it.
(dbus_gvalue_binding_type_from_type): Unused, delete.
(dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
various types instead of unmarshalling to value data directly.
Remove can_convert boolean.
(dbus_gvalue_marshal): Remove duplicate initialization; switch to
returning directly instead of using can_convert boolean.
(dbus_gvalue_store): New function; not related to D-BUS per-se.
Stores a GValue in a pointer to a value of its corresponding C
type.
* glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
add dbus_gvalue_store.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/dbus-specification.xml: document the GUID thing
* dbus/dbus-server.c (_dbus_server_init_base): initialize a
globally unique ID for the server, and put a "guid=hexencoded"
field in the address
* dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
* dbus/dbus-message.c: ditto
* dbus/dbus-dataslot.c: ditto
* dbus/dbus-list.c: ditto
* dbus/dbus-internals.h: wait, just include
dbus-threads-internal.h here
* dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
use in main library
* dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-signature.c: New file; implements various functions
related to type signatures. Includes an interator for parsing,
validation functions.
(dbus_type_is_basic): Moved here from
dbus-marshal-basic.c:_dbus_type_is_basic.
(dbus_type_is_container): Moved here from
dbus-marshal-basic.c:_dbus_type_is_container.
All callers of _dbus_type_is_container and _dbus_type_is_basic
updated, and include dbus-signature.h.
* dbus/dbus-signature.h: New file; prototypes for the above.
* dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
dbus-signature.h.
* dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
function factored out of _dbus_first_type_in_signature.
(_dbus_first_type_in_signature_c_str): New function; returns first
type code for a type signature character.
* dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
handle function moves.
* dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
* dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
function; skips to next complete type in type signature.
Implemented using previous skip_one_complete_type. Now
skip_one_complete_type just delegates to
_dbus_type_signature_next.
* dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
to dbus-signature.c
(_dbus_type_is_container): Ditto.
* doc/dbus-specification.xml: Update introspection sample to
use real type signatures.
* dbus/dbus-test.h: Prototype signature test.
* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
signature tests.
* dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
Rename to DBUS_SERVICE_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
DBUS_INTERFACE_INTROSPECTABLE.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
DBUS_INTERFACE_PROPERTIES.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
DBUS_INTERFACE_PEER.
(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
DBUS_INTERFACE_LOCAL.
All other users of those constants have been changed.
* bus/driver.c (bus_driver_handle_introspect): Use constants.
* glib/dbus-gobject.c (handle_introspect): Use constants.
* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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()
|
|
|
|
|
|
|
|
|
|
| |
* 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().
|
|
|
|
|
|
|
| |
* dbus/dbus-message-factory.c: more testing of message validation
* dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
header
|
|
|
|
|
| |
* dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
get this all working, not many tests in the framework yet though
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
macro
* dbus/dbus-message.c: fix a comment, and add a still-unused
not-implemented function
* dbus/dbus-marshal.h: fix comment
* dbus/dbus-internals.h (_DBUS_ISASCII): new macro
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
are disabled
(_dbus_string_get_const_data): inline when asserts are disabled
* dbus/dbus-message.c: record the _dbus_current_generation of
creation so we can complain if dbus_shutdown() is used improperly.
Do this only if checks are enabled.
* dbus/dbus-connection.c: ditto
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
where I was trying to cache one too many messages
|
|
|
|
|
| |
* dbus/dbus-message.c: reimplement message cache as an array which
makes the cache about twice as fast and saves maybe 1.5% overall
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c (struct DBusMessage): put the locked bit and
the "char byte_order" next to each other to save 4 bytes
(dbus_message_new_empty_header): reduce preallocation, since the
message cache should achieve a similar effect
(dbus_message_cache_or_finalize, dbus_message_get_cached): add a
message cache that keeps a few DBusMessage around in a pool,
another 8% speedup or so.
* dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The primary change here is to always write() once before adding
the write watch, which gives us about a 10% performance increase.
* dbus/dbus-transport-unix.c: a number of modifications to cope
with removing messages_pending
(check_write_watch): properly handle
DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
messages_pending stuff
(check_read_watch): properly handle WAITING_FOR_MEMORY and
AUTHENTICATED cases
(unix_handle_watch): after writing, see if the write watch can be
removed
(unix_do_iteration): assert that write_watch/read_watch are
non-NULL rather than testing that they aren't, since they
aren't allowed to be NULL. check_write_watch() at the end so
we add the watch if we did not finish writing (e.g. got EAGAIN)
* dbus/dbus-transport-protected.h: remove messages_pending call,
since it resulted in too much inefficient watch adding/removing;
instead we now require that the transport user does an iteration
after queueing outgoing messages, and after trying the first
write() we add a write watch if we got EAGAIN or exceeded our
max bytes to write per iteration setting
* dbus/dbus-string.c (_dbus_string_validate_signature): add this
function
* dbus/dbus-server-unix.c (unix_finalize): the socket name was
freed and then accessed, valgrind flagged this bug, fix it
* dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
as the last valid field plus 1, where really it is equal to the
last valid field. Corrects some message corruption issues.
* dbus/dbus-mainloop.c: verbosity changes
* dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
instead of aborting in one of the test codepaths
* dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
caused not printing the pid ever again if a verbose was missing
the newline at the end
(_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
* dbus/dbus-connection.c: verbosity changes;
(dbus_connection_has_messages_to_send): new function
(_dbus_connection_message_sent): no longer call transport->messages_pending
(_dbus_connection_send_preallocated_unlocked): do one iteration to
try to write() immediately, so we can avoid the write watch. This
is the core purpose of this patchset
(_dbus_connection_get_dispatch_status_unlocked): if disconnected,
dump the outgoing message queue, so nobody will get confused
trying to send them or thinking stuff is pending to be sent
* bus/test.c: verbosity changes
* bus/driver.c: verbosity/assertion changes
* bus/dispatch.c: a bunch of little tweaks to get it working again
because this patchset changes when/where you need to block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/glib/test-profile.c: fix this thing up a bit
* dbus/dbus-message.c (dbus_message_new_empty_header): increase
preallocation sizes by a fair bit; not sure if this will be an
overall performance win or not, but it does reduce reallocs.
* dbus/dbus-string.c (set_length, reallocate_for_length): ignore
the test hack that forced constant realloc if asserts are
disabled, so we can profile sanely. Sprinkle in some
_DBUS_UNLIKELY() which are probably pointless, but before I
noticed the real performance problem I put them in.
(_dbus_string_validate_utf8): micro-optimize this thing a little
bit, though callgrind says it didn't help; then special-case
ascii, which did help a lot; then be sure we detect nul bytes as
invalid, which is a bugfix.
(align_length_then_lengthen): add some more _DBUS_UNLIKELY
superstition; use memset to nul the padding instead of a manual
loop.
(_dbus_string_get_length): inline this as a
macro; it showed up in the profile because it's used for loop
tests and so forth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-string.c (_dbus_string_get_length): New
function, writes DBusString to C buffer.
* dbus/dbus-string.h: Prototype it.
* dbus/dbus-message.c (dbus_message_type_to_string): New
function, converts message type into C string.
* dbus/dbus-message.h: Prototype it.
* bus/selinux.c (bus_selinux_check): Take source pid,
target pid, and audit data. Pass audit data to
avc_has_perm.
(log_audit_callback): New function, appends extra
audit information.
(bus_selinux_allows_acquire_service): Also take
service name, add it to audit data.
(bus_selinux_allows_send): Also take message
type, interface, method member, error name,
and destination, and add them to audit data.
(log_cb): Initialize func_audit.
* bus/selinux.h (bus_selinux_allows_acquire_service)
(bus_selinux_allows_send): Update prototypes
* bus/services.c (bus_registry_acquire_service): Pass
service name to bus_selinux_allows_acquire_service.
* bus/bus.c (bus_context_check_security_policy): Pass
additional audit data. Move assignment of dest
to its own line.
|
|
|
|
|
|
|
|
|
| |
DBusError that was causing a memoy leak (bug #989).
* dbus/dbus-keyring.c, dbus/dbus-message.c: fix compilation on
Solaris/Forte C (bug #974)
* bus/main.c (main): plug two minuscule memleaks.
|
|
|
|
|
| |
* COPYING: switch to Academic Free License version 2.1 instead of
2.0, to resolve complaints about patent termination clause.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
backend for config file loader. Doesn't work with full OOM test yet.
* configure.in: change error when selecting libxml into a warning.
* test/data/invalid-config-files: add two non-well-formed XML files.
* glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
* dbus/dbus-transport-unix.c (unix_handle_watch): do not disconnect in
case of DBUS_WATCH_HANGUP, several do_reading() may be necessary to
read all the buffer. (bug #894)
* bus/activation.c (bus_activation_activate_service): fix a potential
assertion failure (bug #896). Small optimization in the case of
auto-activation messages.
* dbus/dbus-message.c (verify_test_message, _dbus_message_test): add
test case for byte-through-vararg bug (#901). patch by Kimmo
Hämäläinen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
breaking build on Solaris, reported by Farhad Saberi on the ML.
* dbus/dbus-message.c (dbus_message_append_args_valist): fix the
va_arg invocation to account for integer promotion in the case of
DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
* bus/services.c (bus_service_remove_owner): fix bug #902, use
_dbus_list_get_first_link, not _dbus_list_get_first.
* dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
* dbus/dbus-object-tree.c (free_subtree_recurse): always null
handler functions so that the asserts in _dbus_object_subtree_unref
do not fail.
* dbus/dbus-transport-unix.c (do_reading):
_dbus_transport_queue_messages return value is of type
dbus_bool_t, not DBusDispatchStatus.
|
|
|
|
| |
<chipx86@gnupdate.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message-builder.c (_dbus_message_data_load): append
random signature when using REQUIRED_FIELDS (this hack won't work
in the long term)
* dbus/dbus-message.c: change the signature to be a header field,
instead of message->signature special-case string. Incremental
step forward. Then we can fix up code to send the signature in the
message, then fix up code to validate said signature, then fix up
code to not put the typecodes inline, etc.
(load_one_message): don't make up the signature after the fact
(decode_header_data): require signature field for the known
message types
* dbus/dbus-marshal.c (_dbus_marshal_string_len): new
* dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
quiet doxygen.
* Doxyfile.in: remove deprecated options.
* dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
glib/test-thread.h, glib/test-thread-client.c,
glib/test-thread-server.c, glib/test-profile.c,
glib/test-dbus-glib.c: remove these unused files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/glib/test-service-glib.c (main): remove unused variable
* glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
* dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
from the enum, no longer in use.
* dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
works right.
* dbus/dbus-message.c: add various _dbus_return_val_if_fail for
whether error_name passed in is a valid error name.
|
|
|
|
|
| |
- the varargs dbus_message_get_args() needs to support OBJECT_PATH
and OBJECT_PATH_ARRAY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
fix no int64 case.
* dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
* dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
(_dbus_message_iter_get_basic_type_array): impl.
drastically simplify ~all relevant _get methods to use these.
(_dbus_message_iter_append_basic_array),
(dbus_message_iter_append_basic): impl
drastically simplify ~all relevant _append methods to use these.
* dbus/dbus-message-builder.c (parse_basic_type)
(parse_basic_array, lookup_basic_type): impl.
(_dbus_message_data_load): prune scads of duplicate /
cut & paste coding.
* dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
(_dbus_demarshal_basic_type): implement,
(demarshal_and_validate_len/arg): beef up debug.
(_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
|
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
operands to && so we call dbus_message_iter_next () for the last
argument also.
|
|
|
|
|
| |
and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
for both dbus-protocol.h and in the spec
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix incorrect setting of .name_offset in the HeaderField (it was
off by two bytes, positioned right after the name and typecode)
* bus/bus.c (bus_context_new, bus_context_unref): test before
calling dbus_server_free_data_slot and _dbus_user_database_unref
in case of an error.
* tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
by libdbus-gtool.
|