1. 15 Jan, 2005 1 commit
    • Havoc Pennington's avatar
      2005-01-15 Havoc Pennington <hp@redhat.com> · 9c3d566e
      Havoc Pennington authored
      	* 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
      9c3d566e
  2. 10 Aug, 2004 1 commit
  3. 30 Jul, 2004 1 commit
    • Havoc Pennington's avatar
      2004-07-24 Havoc Pennington <hp@redhat.com> · 1e9b185b
      Havoc Pennington authored
      	SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
      
      	* bus/selinux.c, bus/selinux.h: new file encapsulating selinux
      	functionality
      
      	* configure.in: add --enable-selinux
      
      	* bus/policy.c (bus_policy_merge): add FIXME to a comment
      
      	* bus/main.c (main): initialize and shut down selinux
      
      	* bus/connection.c: store SELinux ID on each connection, to avoid
      	repeated getting of the string context and converting it into
      	an ID
      
      	* bus/bus.c (bus_context_get_policy): new accessor, though it
      	isn't used
      	(bus_context_check_security_policy): check whether the security
      	context of sender connection can send to the security context of
      	recipient connection
      
      	* bus/config-parser.c: add parsing for <selinux> and <associate>
      
      	* dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
      	implement dbus_connection_get_unix_fd()
      
      	* dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
      	function, used by the selinux stuff
      1e9b185b
  4. 20 May, 2004 1 commit
    • Kristian Høgsberg's avatar
      * doc/TODO: Remove resolved items. · df23f08f
      Kristian Høgsberg authored
      	* bus/expirelist.h (struct BusExpireList): remove unused n_items
      	field.
      
      	* bus/connection.c (bus_connections_expect_reply): Enforce the
      	per-connection limit on pending replies.
      df23f08f
  5. 02 Dec, 2003 1 commit
  6. 27 Nov, 2003 1 commit
  7. 28 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-28 Havoc Pennington <hp@redhat.com> · bebc830f
      Havoc Pennington authored
      	* bus/expirelist.c (do_expiration_with_current_time): detect
      	failure of the expire_func due to OOM
      
      	* bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
      
      	* bus/dispatch.c (check_send_exit_to_service): fix to handle the
      	NoReply error that's now created by the bus when the service exits
      bebc830f
  8. 22 Oct, 2003 1 commit
  9. 16 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-16 Havoc Pennington <hp@redhat.com> · d6e1b2ad
      Havoc Pennington authored
      	* bus/connection.c (bus_pending_reply_expired): either cancel or
      	execute, not both
      	(bus_connections_check_reply): use unlink, not remove_link, as we
      	don't want to free the link; fixes double free mess
      
      	* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
      	where no reply was received
      
      	* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
      	fix a refcount leak
      
      	* bus/signals.c (match_rule_matches): add special cases for the
      	bus driver, so you can match on sender/destination for it.
      
      	* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
      	DBUS_PRINT_BACKTRACE is set
      
      	* dbus/dbus-internals.c: add pid to assertion failure messages
      
      	* dbus/dbus-connection.c: add message type code to the debug spew
      
      	* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
      	sender=foo not service=foo
      
      	* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
      	session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
      	DBUS_ACTIVATION_ADDRESS instead
      
      	* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
      	DBUS_SYSTEM_BUS_ADDRESS if appropriate
      
      	* bus/bus.c (bus_context_new): handle OOM copying bus type into
      	context struct
      
      	* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
      	(dbus_message_iter_get_object_path_array): new function (half
      	finished, disabled for the moment)
      
      	* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
      	DBUS_MESSAGE_TYPE_ERROR
      
      	* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
      	avoid redirecting stderr to /dev/null
      	(babysit): close stdin if not doing the "exit_with_session" thing
      
      	* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
      	debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
      	stdout/stdin, so things don't get confused
      
      	* bus/system.conf.in: fix to allow replies, I modified .conf
      	instead of .conf.in again.
      d6e1b2ad
  10. 14 Oct, 2003 2 commits
    • Havoc Pennington's avatar
      2003-10-14 Havoc Pennington <hp@redhat.com> · 3251264a
      Havoc Pennington authored
      	* bus/bus.c (bus_context_check_security_policy): revamp this to
      	work more sanely with new policy-based requested reply setup
      
      	* bus/connection.c (bus_transaction_send_from_driver): set bus
      	driver messages as no reply
      
      	* bus/policy.c (bus_client_policy_check_can_receive): handle a
      	requested_reply attribute on allow/deny rules
      
      	* bus/system.conf: add <allow requested_reply="true"/>
      
      	* bus/driver.c (bus_driver_handle_message): fix check for replies
      	sent to the bus driver, which was backward. How did this ever work
      	at all though? I think I'm missing something.
      
      	* dbus/dbus-message.c (decode_header_data): require error and
      	method return messages to have a reply serial field to be valid
      	(_dbus_message_loader_queue_messages): break up this function;
      	validate that reply serial and plain serial are nonzero;
      	clean up the OOM/error handling.
      	(get_uint_field): don't return -1 from this
      	(dbus_message_create_header): fix signed/unsigned bug
      
      	* bus/connection.c (bus_connections_expect_reply): save serial of
      	the incoming message, not reply serial
      3251264a
    • Havoc Pennington's avatar
      2003-10-14 Havoc Pennington <hp@redhat.com> · 64f5ae1a
      Havoc Pennington authored
      	* bus/connection.c: implement pending reply tracking using
      	BusExpireList
      
      	* bus/bus.c (bus_context_check_security_policy): verify that a
      	reply is pending in order to allow a reply to be sent. Deny
      	messages of unknown type.
      
      	* bus/dbus-daemon-1.1.in: update to mention new resource limits
      
      	* bus/bus.c (bus_context_get_max_replies_per_connection): new
      	(bus_context_get_reply_timeout): new
      64f5ae1a
  11. 12 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-12 Havoc Pennington <hp@pobox.com> · 4097e94a
      Havoc Pennington authored
              Added test code that 1) starts an actual bus daemon and 2) uses
      	DBusGProxy; fixed bugs that were revealed by the test. Lots
      	more testing possible, but this is the basic framework.
      
      	* glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
      	empty proxy lists from the proxy list hash
      
      	* dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
      	couple of return_if_fail checks
      
      	* dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
      	to allocate, so everything is cleared to NULL as it should be.
      
      	* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
      	source as data to dbus_connection_set_timeout_functions() as the
      	timeout functions expected
      
      	* test/glib/run-test.sh: add a little script to start up a message
      	bus and run tests using it
      
      	* tools/dbus-launch.1: updates
      
      	* tools/dbus-launch.c (main): add --config-file option
      
      	* tools/dbus-launch.c (main): remove confusing else if (runprog)
      	that could never be reached.
      
      	* dbus/dbus-message.c (dbus_message_new_method_return)
      	(dbus_message_new_error, dbus_message_new_signal): set the
      	no-reply-expected flag on all these. Redundant, but may
      	as well be consistent.
      4097e94a
  12. 11 Oct, 2003 1 commit
    • Havoc Pennington's avatar
      2003-10-11 Havoc Pennington <hp@pobox.com> · 40751c84
      Havoc Pennington authored
      	* dbus/dbus-message.c (_dbus_message_test): add more test
      	coverage, but #if 0 for now since they uncover a bug
      	not fixed yet; I think in re_align_field_recurse()
      	(re_align_field_recurse): add FIXME about broken assertion
      
      	* dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
      
      	* bus/connection.c: share a couple code bits with expirelist.c
      
      	* bus/expirelist.h, bus/expirelist.c: implement a generic
      	expire-items-after-N-seconds facility, was going to share between
      	expiring connections and replies, decided not to use for expiring
      	connections for now.
      
      	* bus/connection.c: add tracking of expected replies
      
      	* COPYING: include AFL 2.0 (still need to change all the file headers)
      40751c84
  13. 21 Sep, 2003 1 commit
    • Havoc Pennington's avatar
      2003-09-21 Havoc Pennington <hp@pobox.com> · a683a80c
      Havoc Pennington authored
      	Get matching rules mostly working in the bus; only actually
      	parsing the rule text remains. However, the client side of
      	"signal connections" hasn't been started, this patch is only the
      	bus side.
      
      	* dbus/dispatch.c: fix for the matching rules changes
      
      	* bus/driver.c (bus_driver_handle_remove_match)
      	(bus_driver_handle_add_match): send an ack reply from these
      	method calls
      
      	* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
      	arguments, reported by Seth Nickell
      
      	* bus/config-parser.c (append_rule_from_element): support
      	eavesdrop=true|false attribute on policies so match rules
      	can be prevented from snooping on the system bus.
      
      	* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
      	and "destination" in attribute names; fix some docs bugs;
      	add eavesdrop=true|false attribute
      
      	* bus/driver.c (bus_driver_handle_add_match)
      	(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
      	messages
      
      	* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
      	rid of broadcast service concept, signals are just always broadcast
      
      	* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
      	mostly implement matching rules stuff (currently only exposed as signal
      	connections)
      a683a80c
  14. 18 Aug, 2003 2 commits
    • Havoc Pennington's avatar
      2003-08-18 Havoc Pennington <hp@redhat.com> · 68a3c593
      Havoc Pennington authored
      	* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
      
      	* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
      	dumb bug created earlier (wrong order of args to
      	decode_header_data())
      
      	* tools/dbus-send.c: port
      
      	* tools/dbus-print-message.c (print_message): port
      
              * test/data/*messages: port all messages over
      
              * dbus/dbus-message-builder.c: support including
      	message type
      
              * bus/driver.c: port over
      
      	* bus/dispatch.c: port over to new stuff
      
      	* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
      	rename disconnect signal to "Disconnected"
      68a3c593
    • Havoc Pennington's avatar
      2003-08-17 Havoc Pennington <hp@pobox.com> · 95717a93
      Havoc Pennington authored
      	This doesn't compile yet, but syncing up so I can hack on it from
      	work. What are branches for if not broken code? ;-)
      
      	* dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
      	DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
      	DBUS_HEADER_FIELD_ERROR_NAME
      
      	* dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
      	for the interface+member pairs
      	(string_hash): change to use g_str_hash algorithm
      	(find_direct_function, find_string_function): refactor these to
      	share most code.
      
      	* dbus/dbus-message.c: port all of this over to support
      	interface/member fields instead of name field
      
      	* dbus/dbus-object-registry.c: port over
      
      	* dbus/dbus-string.c (_dbus_string_validate_interface): rename
      	from _dbus_string_validate_name
      
      	* bus/dbus-daemon-1.1: change file format for the
      	<deny>/<allow> stuff to match new message naming scheme
      
      	* bus/policy.c: port over
      
      	* bus/config-parser.c: parse new format
      95717a93
  15. 11 Aug, 2003 1 commit
    • Havoc Pennington's avatar
      2003-08-10 Havoc Pennington <hp@pobox.com> · b29ea911
      Havoc Pennington authored
      	* tools/dbus-send.c (main): add --type argument, for now
      	supporting only method_call and signal types.
      
      	* tools/dbus-print-message.c: print message type
      
      	* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
      	init connection->objects
      
      	* doc/dbus-specification.sgml: fix sgml
      
      	* bus/*.c: port over to object-instance API changes
      
      	* test/test-service.c: ditto
      
      	* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
      	name, we will have to fix up the rest of the code to also handle
      	this
      	(dbus_message_new): generic message-creation call
      	(set_string_field): allow appending name field
      b29ea911
  16. 22 Jun, 2003 1 commit
    • Havoc Pennington's avatar
      2003-06-22 Havoc Pennington <hp@pobox.com> · 6843ad31
      Havoc Pennington authored
      	* dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
      	(_dbus_data_slot_allocator_alloc): rework these to keep a
      	reference count on each slot and automatically manage a global
      	slot ID variable passed in by address
      
      	* bus/bus.c: convert to new dataslot API
      
      	* dbus/dbus-bus.c: convert to new dataslot API
      
      	* dbus/dbus-connection.c: convert to new dataslot API
      
      	* dbus/dbus-server.c: convert to new dataslot API
      
      	* glib/dbus-gmain.c: ditto
      
      	* bus/test.c: ditto
      
      	* bus/connection.c: ditto
      6843ad31
  17. 12 May, 2003 1 commit
    • Havoc Pennington's avatar
      2003-05-11 Havoc Pennington <hp@pobox.com> · d4e80132
      Havoc Pennington authored
      	* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
      	calling _dbus_marshal_validate_arg() for every byte in a byte
      	array, etc.
      
      	* dbus/dbus-message-handler.c: use atomic reference counting to
      	reduce number of locks slightly; the global lock in here sucks
      
      	* dbus/dbus-connection.c
      	(_dbus_connection_update_dispatch_status_and_unlock): variant of
      	update_dispatch_status that can be called with lock held; then use
      	in a couple places to reduce locking/unlocking
      	(dbus_connection_send): hold the lock over the whole function
      	instead of acquiring it twice.
      
      	* dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
      
      	* bus/connection.c (bus_connections_setup_connection): fix access
      	to already-freed memory.
      
      	* dbus/dbus-connection.c: keep a little cache of linked list
      	nodes, to avoid using the global linked list alloc lock in the
      	normal send-message case. Instead we just use the connection lock
      	that we already have to take.
      
      	* dbus/dbus-list.c (_dbus_list_find_last): new function
      
      	* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
      	change to use a struct for the atomic type; fix docs,
      	they return value before increment, not after increment.
      
      	* dbus/dbus-string.c (_dbus_string_append_4_aligned)
      	(_dbus_string_append_8_aligned): new functions to try to
      	microoptimize this operation.
      	(reallocate_for_length): break this out of set_length(), to
      	improve profile info, and also so we can consider inlining the
      	set_length() part.
      
      	* dbus/dbus-message.c (dbus_message_new_empty_header): init data
      	strings with some preallocation, cuts down on our calls to realloc
      	a fair bit. Though if we can get the "move entire string to empty
      	string" optimization below to kick in here, it would be better.
      
      	* dbus/dbus-string.c (_dbus_string_move): just call
      	_dbus_string_move_len
      	(_dbus_string_move_len): add a special case for moving
      	an entire string into an empty string; we can just
      	swap the string data instead of doing any reallocs.
      	(_dbus_string_init_preallocated): new function
      d4e80132
  18. 11 May, 2003 1 commit
    • Havoc Pennington's avatar
      2003-05-11 Havoc Pennington <hp@pobox.com> · ab10ae90
      Havoc Pennington authored
      	Write a "test-profile" that does echo client-server with threads;
      	profile reveals lock contention, memcpy/realloc of buffers, and
      	UTF-8 validation as hot spots. 20% of lock contention eliminated
      	with dbus_atomic_inc/dec implementation on x86.  Much remaining
      	contention is global mempool locks for GList and DBusList.
      
      	* dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
      	x86 implementation
      
      	* dbus/dbus-connection.c (struct DBusConnection): use
      	dbus_atomic_t for the reference count
      
      	* dbus/dbus-message.c (struct DBusMessage): declare
      	dbus_atomic_t values as volatile
      
      	* configure.in: code to detect ability to use atomic integer
      	operations in assembly, from GLib patch
      
      	* dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
      	time, tired of it being wrong in threads and forked processes
      
      	* glib/test-profile.c: a little program to bounce messages back
      	and forth between threads and eat CPU
      
      	* dbus/dbus-connection.c: add debug spew macros for debugging
      	thread locks; include config.h at top; fix deadlock in
      	dbus_connection_flush()
      ab10ae90
  19. 27 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-27 Havoc Pennington <hp@pobox.com> · e8d396ef
      Havoc Pennington authored
      	Unbreak my code...
      
      	* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
      	report correct status if we finish processing authentication
      	inside this function.
      
      	* bus/activation.c (try_send_activation_failure): use
      	bus_transaction_send_error_reply
      
      	* bus/connection.c (bus_connection_get_groups): return an error
      	explaining the problem
      
      	* bus/bus.c (bus_context_check_security_policy): implement
      	restriction here that inactive connections can only send the
      	hello message. Also, allow bus driver to send anything to
      	any recipient.
      
      	* bus/connection.c (bus_connection_complete): create the
      	BusClientPolicy here instead of on-demand.
      	(bus_connection_get_policy): don't return an error
      
      	* dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
      	sender field in message being replied to
      
      	* bus/bus.c (bus_context_check_security_policy): fix silly typo
      	causing it to return FALSE always
      
      	* bus/policy.c (bus_client_policy_check_can_send): fix bug where
      	we checked sender rather than destination
      e8d396ef
  20. 25 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-25 Havoc Pennington <hp@redhat.com> · b3bd48ed
      Havoc Pennington authored
              test suite is slightly hosed at the moment, will fix soon
      
      	* bus/connection.c (bus_connections_expire_incomplete): fix to
      	properly disable the timeout when required
      	(bus_connection_set_name): check whether we can remove incomplete
      	connections timeout after we complete each connection.
      
      	* dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
      	probably still broken.
      
      	* bus/services.c (bus_registry_acquire_service): implement max
      	number of services owned, and honor allow/deny rules on which
      	services a connection can own.
      
      	* bus/connection.c (bus_connection_get_policy): report errors here
      
      	* bus/activation.c: implement limit on number of pending
      	activations
      b3bd48ed
  21. 24 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-24 Havoc Pennington <hp@redhat.com> · 1820f3bd
      Havoc Pennington authored
      	* bus/dispatch.c: somehow missed some name_is
      
      	* dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
      	(_dbus_timeout_set_interval): new
      
      	* bus/connection.c (bus_connections_setup_connection): record time
      	when each connection is first set up, and expire them after the
      	auth timeout passes.
      1820f3bd
    • Havoc Pennington's avatar
      2003-04-24 Havoc Pennington <hp@redhat.com> · c9cd648f
      Havoc Pennington authored
      	* configure.in: add --enable-checks
      
      	* dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
      
      	* dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
      	to use thread locks.
      	(_dbus_connection_handler_destroyed_locked): move some private
      	functions into proper docs group
      
      	* dbus/dbus-internals.h: add _dbus_return_if_fail,
      	_dbus_return_val_if_fail
      
      	Throughout: use dbus_return_if_fail
      c9cd648f
  22. 19 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-19 Havoc Pennington <hp@pobox.com> · 983200f9
      Havoc Pennington authored
      	* bus/driver.c (bus_driver_handle_hello): check limits and
      	return an error if they are exceeded.
      
      	* bus/connection.c: maintain separate lists of active and inactive
      	connections, and a count of each. Maintain count of completed
      	connections per user. Implement code to check connection limits.
      
      	* dbus/dbus-list.c (_dbus_list_unlink): export
      
      	* bus/bus.c (bus_context_check_security_policy): enforce a maximum
      	number of bytes in the message queue for a connection
      983200f9
  23. 18 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-18 Havoc Pennington <hp@pobox.com> · 3df260c0
      Havoc Pennington authored
      	* glib/dbus-gmain.c: adapt to watch changes
      
      	* bus/bus.c, bus/activation.c, etc.: adjust to watch changes
      
      	* dbus/dbus-server.h: remove dbus_server_handle_watch
      
      	* dbus/dbus-connection.h: remove dbus_connection_handle_watch
      
      	* dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
      	like DBusTimeout, so we don't need dbus_connection_handle_watch
      	etc.
      3df260c0
  24. 17 Apr, 2003 2 commits
    • Havoc Pennington's avatar
      2003-04-16 Havoc Pennington <hp@pobox.com> · dac0a1f8
      Havoc Pennington authored
      	* doc/dbus-specification.sgml: make spec say serials are unsigned
      
      	* dbus/dbus-message.h: change message serials to unsigned
      
      	* dbus/dbus-connection.c: adapt to message serials being unsigned
      dac0a1f8
    • Havoc Pennington's avatar
      2003-04-15 Havoc Pennington <hp@pobox.com> · 7c022a80
      Havoc Pennington authored
      	* bus/bus.c: create and keep around a shared DBusUserDatabase
      	object.
      
      	* bus/connection.c (bus_connection_get_groups): don't cache
      	groups for user in the connection object, since user database
      	object now does that.
      7c022a80
  25. 14 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-13 Havoc Pennington <hp@pobox.com> · 777707ed
      Havoc Pennington authored
      	* dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
      	callbacks
      
      	* test/data/valid-config-files/debug-allow-all.conf.in: allow all
      	users
      
      	* dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
      	fix to only recover unused bytes if we're already authenticated
      	(_dbus_transport_get_is_authenticated): fix to still mark us
      	authenticated if there are unused bytes.
      
      	* bus/dispatch.c: implement security policy checking
      
      	* bus/connection.c (bus_transaction_send_from_driver): new
      
      	* bus/bus.c (bus_context_check_security_policy): new
      
      	* bus/dispatch.c (send_service_nonexistent_error): delete this,
      	now we just set the DBusError and it gets converted to an error
      	reply.
      
      	* bus/connection.c (allow_user_function): enable code using actual
      	data from the config file
      
      	* bus/policy.c (list_allows_user): handle wildcard rules for
      	user/group connection perms
      777707ed
  26. 12 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-12 Havoc Pennington <hp@pobox.com> · bc983ecf
      Havoc Pennington authored
      	* bus/policy.h: change BusPolicy to be the thing from the config
      	file, and rename old BusPolicy to BusClientPolicy
      
      	* bus/bus.c, bus/connection.c, bus/config-parser.c: change to
      	match change in how policy works
      
      	* dbus/dbus-internals.h: mark assert_not_reached as
      	__attribute((noreturn))__
      bc983ecf
  27. 11 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@redhat.com> · 6be547d3
      Havoc Pennington authored
      	* dbus/dbus-connection.c (dbus_connection_flush): don't spin on
      	the connection if it's disconnected
      
      	* bus/activation.c (bus_activation_service_created): use new
      	transaction features to roll back removal of pending activation if
      	we don't successfully create the service after all. Don't remove
      	pending activation if the function fails.
      
      	* dbus/dbus-list.c (_dbus_list_insert_before_link)
      	(_dbus_list_insert_after_link): new code to facilitate
      	services.c fixes
      
      	* dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
      	new functionality, so we can preallocate the ability to insert
      	into a hash table.
      
      	* bus/connection.c (bus_transaction_add_cancel_hook): new function
      	allowing us to put custom hooks in a transaction to be used for
      	cancelling said transaction
      
      	* doc/dbus-specification.sgml: add some discussion of secondary
      	service owners, and disallow zero-length service names
      
      	* bus/services.c (bus_registry_acquire_service): new function,
      	splits out part of bus_driver_handle_acquire_service() and fixes
      	a bug where we didn't remove the service doing the acquiring
      	from the secondary queue if we failed to remove the current owner
      	from the front of the queue.
      6be547d3
  28. 10 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-10 Havoc Pennington <hp@pobox.com> · 51781f54
      Havoc Pennington authored
      	* bus/dispatch.c: lots of fixes
      
      	* dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
      	(_dbus_loop_iterate): remove old "quit if no callbacks" code,
      	that was crack, broke the test service.
      
      	* dbus/dbus-transport.c (_dbus_transport_open): fix error
      	handling to avoid piling up errors if we get a failure on the
      	first address.
      
      	* dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
      	pid in assertion failures.
      
      	* dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
      	to some fixed size of file descriptor array. Don't return TRUE
      	anytime a timeout exists, that led to lots of busy loop silliness
      	in the tests.
      51781f54
  29. 09 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-09 Havoc Pennington <hp@redhat.com> · 7caf646f
      Havoc Pennington authored
      	* test/test-utils.c: use dispatch status function to fix this up
      
      	* bus/connection.c (connection_watch_callback): don't dispatch
      	from here
      	(connection_timeout_callback): don't dispatch from here
      	(bus_connections_setup_connection): set the dispatch status function
      	(bus_connection_disconnected): unset it
      
      	* dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
      	used to add a connection to be dispatched
      	(_dbus_loop_iterate): do the dispatching at the end of each
      	iteration
      
      	* dbus/dbus-connection.c
      	(dbus_connection_set_dispatch_status_function): new function
      	allowing us to fix up main loop usage
      	(_dbus_connection_last_unref): free all the various function
      	user data
      	(dbus_connection_dispatch): call the DispatchStatusFunction
      	whenever this function returns
      	(dbus_connection_handle_watch): call DispatchStatusFunction
      	(dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
      	(reply_handler_timeout): call DispatchStatusFunction
      	(dbus_connection_flush): call DispatchStatusFunction
      7caf646f
  30. 06 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-06 Havoc Pennington <hp@pobox.com> · df008ef9
      Havoc Pennington authored
      	* dbus/Makefile.am: split lists of sources into stuff that goes in
      	the library, util functions that go in the lib and are also used
      	elsewhere, and util functions that are used in tests/daemon but
      	don't go in the lib.
      
      	* dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
      	here so it can be used in test binaries also
      df008ef9
  31. 04 Apr, 2003 1 commit
  32. 02 Apr, 2003 1 commit
    • Havoc Pennington's avatar
      2003-04-02 Havoc Pennington <hp@redhat.com> · e55fd2c6
      Havoc Pennington authored
      	* bus/connection.c (bus_transaction_send_error_reply): set sender
      	service for the error, and unref the reply on success
      
      	* bus/activation.c: convert to use BusTransaction so OOM can be
      	handled correctly
      	(bus_activation_service_created): set sender of the message
      e55fd2c6
  33. 31 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-31 Havoc Pennington <hp@redhat.com> · fa05de92
      Havoc Pennington authored
              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
      fa05de92
  34. 26 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-25 Havoc Pennington <hp@redhat.com> · 90ed1d84
      Havoc Pennington authored
              * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
      
      	* configure.in: add --with-xml option to specify XML library,
      	right now only libxml is supported.
      
      	* bus/config-loader-libxml.c, config-parser.c: sync some minor
      	nonworking code between home and work, still just stubs
      90ed1d84
  35. 24 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-24 Havoc Pennington <hp@pobox.com> · 44fff656
      Havoc Pennington authored
      	* bus/connection.c (bus_connections_setup_connection): set up
      	the "can this user connect" function, but it always returns
      	TRUE until we have a config file parser so we can have a config
      	file that allows connections.
      44fff656
  36. 23 Mar, 2003 1 commit
    • Havoc Pennington's avatar
      2003-03-23 Havoc Pennington <hp@pobox.com> · a26607ab
      Havoc Pennington authored
      	* bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
      	policies code
      
      	* dbus/dbus-hash.h: add ULONG hash keys
      
      	* dbus/dbus-sysdeps.c (_dbus_get_groups): new
      	(_dbus_get_group_id): new function
      a26607ab