Commit graph

210 commits

Author SHA1 Message Date
Havoc Pennington
cc63ef88a5 2005-01-17 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: partially update spec
2005-01-18 00:20:39 +00:00
Havoc Pennington
ad937e1695 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 22:03:19 +00:00
Havoc Pennington
9c3d566e95 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-15 07:15:38 +00:00
Havoc Pennington
e07789e511 voc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
	for a variety of reasons '==' doesn't do this.
2005-01-01 20:53:42 +00:00
Havoc Pennington
65090abbb9 2004-11-26 Havoc Pennington <hp@redhat.com>
* test/glib/test-profile.c: add with_bus mode to profile echoes
	that go through the bus.

	* test/glib/run-test.sh: add ability to run test-profile

	* bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
	config file reload.
2004-11-27 02:18:36 +00:00
Havoc Pennington
dbdea921b5 2004-11-25 Havoc Pennington <hp@redhat.com>
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.
2004-11-26 01:53:13 +00:00
Colin Walters
736fa825e1 2004-10-18 Colin Walters <walters@verbum.org>
* bus/selinux.h: Add bus_selinux_enabled.

	* bus/selinux.c (bus_selinux_enabled): Implement it.

	* bus/config-parser.c (struct include): Add
	if_selinux_enabled member.
	(start_busconfig_child): Parse if_selinux_enabled
	attribute for include.
	(bus_config_parser_content): Handle it.

	* bus/session.conf.in, bus/system.conf.in: Add
	inclusion of context mapping to default config files;
	conditional on SELinux being enabled.

	* doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.

	* test/data/invalid-config-files/badselinux-1.conf,
	test/data/invalid-config-files/badselinux-2.conf:
	Test files for bad syntax.
2004-10-18 04:04:12 +00:00
Olivier Andrieu
85f8f62da6 * doc/dbus-specification.xml: document ServiceOwnerChanged signal.
* bus/driver.c, bus/driver.h, bus/services.c: Use ServiceOwnerChanged
signal instead of ServiceCreated and ServiceDeleted.

* bus/dispatch.c: update testcase for the new signal.
2004-09-24 10:43:36 +00:00
Olivier Andrieu
1658c8afe5 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
* doc/busconfig.dtd: update the DTD for the at_console attribute.

* bus/driver.c (bus_driver_handle_hello): correctly handle Hello
messages after the first one (bug #1389).

* bus/dispatch.c (check_double_hello_message): add a test case for the
double hello message bug.  (check_existent_service_activation): fix
check of spawning error.
2004-09-17 09:14:49 +00:00
Olivier Andrieu
8a2c91b8a5 * bus/config-parser.c (set_limit):
* bus/dbus-daemon-1.1.in:
* test/data/valid-config-files/many-rules.conf: set the
max_match_rules_per_connection limt from the config file.

* doc/busconfig.dtd: update the DTD.

* bus/driver.c: remove some unused variables.
2004-08-25 08:03:12 +00:00
Havoc Pennington
cd33e8dd62 2004-08-10 Havoc Pennington <hp@redhat.com>
* doc/dbus-tutorial.xml: add some more info on GLib bindings
2004-08-10 04:18:31 +00:00
Havoc Pennington
43605a6f4e 2004-08-09 Havoc Pennington <hp@redhat.com>
* COPYING: switch to Academic Free License version 2.1 instead of
	2.0, to resolve complaints about patent termination clause.
2004-08-10 03:07:01 +00:00
Havoc Pennington
138e17cce0 add a couple of notes about libdbus vs. bindings 2004-08-10 02:18:37 +00:00
Olivier Andrieu
3abcc7d28d * bus/config-parser.c (bus_config_parser_new): fix an invalid _unref
in the SELinux support.

* doc/busconfig.dtd: update DTD for SELinux support.

* bus/config-loader-libxml.c: fix error handler and parser
initialisation/cleanup. OOM test now works with libxml2 HEAD.

* configure.in: remove the warning about libxml2

* dbus/dbus-bus.c: silence doxygen warning.
2004-07-31 18:28:10 +00:00
Colin Walters
3d0f1fb1b6 2004-07-06 Colin Walters <walters@redhat.com>
* doc/Makefile.am, qt/Makefile.am:
	mono/doc/Makefile.am: Allow 'make dist'
	without doc building of various sorts or
	QT support enabled.
2004-07-06 15:15:59 +00:00
Havoc Pennington
54752a6d94 separate out glib binding items 2004-07-03 11:20:05 +00:00
Olivier Andrieu
2779cbf976 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
* dbus/bus.c (dbus_bus_get_unix_user)
* doc/dbus-specification.xml: implement GetConnectionUnixUser
method of org.freedesktop.DBus interface.

* bus/dispatch.c: test case
2004-06-28 21:55:15 +00:00
Havoc Pennington
961e6ca41c 2004-06-20 Havoc Pennington <hp@redhat.com>
* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
	codes from the dbus error names

        * glib/dbus-glib.h: move to subdir dbus/ since it's included
	as dbus/dbus-glib.h and that breakage is now visible due to
	including dbus/dbus-glib.h in dbus-glib-lowlevel.h

	* glib/dbus-glib.h: s/gproxy/g_proxy/

	* dbus/dbus-shared.h: new header to hold stuff shared with
	binding APIs

	* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
	than dbus-errors.h

	* glib/dbus-glib.h (dbus_set_g_error): move to
	dbus-glib-lowlevel.h

	* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
	of stuff to enable this

	* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here

	* a bunch of other changes with the same basic "separate glib
	bindings from dbus.h" theme
2004-06-20 15:28:15 +00:00
Havoc Pennington
a8b1cf0774 2004-06-07 Havoc Pennington <hp@redhat.com>
* doc/TODO: remove auto-activation item since it's done; sort
	items by importance/milestone
2004-06-07 21:02:23 +00:00
Havoc Pennington
72528d58be add item about per-display activation 2004-06-07 20:48:33 +00:00
Havoc Pennington
a6d1c745ab some clarifications 2004-06-07 20:07:43 +00:00
Kristian Høgsberg
63de468129 2004-06-02 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
	machine approach.  A state is implemented as a function that
	handles incoming events as specified for that state.

	* doc/dbus-specification.xml: Update auth protocol state machine
	specification to match implementation.  Remove some leftover
	base64 examples.
2004-06-02 14:03:58 +00:00
Havoc Pennington
858cfd9e74 add a couple thoughts so I remember them 2004-06-01 13:58:57 +00:00
John (J5) Palmieri
1041b44d30 * fix for TODO item:
- the varargs dbus_message_get_args() needs to support OBJECT_PATH
   and OBJECT_PATH_ARRAY
2004-05-28 19:09:00 +00:00
Kristian Høgsberg
df23f08f9b * doc/TODO: Remove resolved items.
* 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.
2004-05-20 19:47:36 +00:00
Havoc Pennington
ce11c651a0 - Perhaps the auth protocol should be able to negotiate a protocol
version to the least-common-denominator between client and server?
   Though in practice ever using this feature would be pretty tough,
   since protocol probably modifies the API. But we could have it there
   as a safety net.
2004-05-20 02:30:10 +00:00
Kristian Høgsberg
d86fc4071c 2004-05-17 Kristian Høgsberg <krh@redhat.com>
Remove base64 encoding, replace with hex encoding. Original patch
	from trow@ximian.com, added error handling.

	* dbus/dbus-string.c (_dbus_string_base64_encode)
	(_dbus_string_base64_decode): Remove.
	(_dbus_string_hex_decode): Add end_return argument so we can
	distinguish between OOM and invalid hex encoding.
	(_dbus_string_test): Remove base64 tests and add test case for
	invalid hex.

	* dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
	Replace base64 with hex.

	* test/data/auth/invalid-hex-encoding.auth-script: New test case
	for invalid hex encoded data in auth protocol.
2004-05-17 22:19:04 +00:00
John (J5) Palmieri
11b491316f * updated the invalid test cases to include the
missing PATH header field which is required
* updated the spec documentation to indicate that
  INTERFACE, MEMBER, and PATH are all required fields
2004-05-11 18:31:34 +00:00
Havoc Pennington
86a4edfec2 mention removing version number from daemon name 2004-05-07 22:45:15 +00:00
John (J5) Palmieri
c24e6e11a6 * rename HEADER_FIELD_SERVICE -> HEADER_FIELD_DESTINATION
and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
for both dbus-protocol.h and in the spec
2004-04-22 19:14:46 +00:00
Olivier Andrieu
a470eaa078 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
* bus/driver.c (bus_driver_handle_get_service_owner):
	implement a GetServiceOwner method.
	* doc/dbus-specification.xml: document it.
	* dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.

	* glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
	implement, using the bus GetServiceOwner method.

	* test/glib/test-dbus-glib.c:
	use dbus_gproxy_new_for_service_owner so that we can receive the
	signal.
2004-04-15 22:08:05 +00:00
Jon Trowbridge
0da46fa5a4 2004-04-12 Jon Trowbridge <trow@ximian.com>
* bus/config-parser.c (struct BusConfigParser): Added
	    included_files field.
	    (seen_include): Added.  Checks whether or not a file has already
	    been included by any parent BusConfigParser.
	    (bus_config_parser_new): Copy the parent's included_files.
	    (include_file): Track which files have been included, and fail on
	    circular inclusions.
	    (process_test_valid_subdir): Changed printf to report if we are
	    testing valid or invalid conf files.
	    (all_are_equiv): Changed printf to be a bit clearer about
	    what we are actually doing.
	    (bus_config_parser_test): Test invalid configuration files.
2004-04-13 01:37:57 +00:00
Havoc Pennington
4fd4d52dd6 2004-03-19 Havoc Pennington <hp@redhat.com>
* NEWS: 0.21 updates

	* configure.in: 0.21

	* doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED

	* python/Makefile.am: change to avoid dist of dbus_bindings.c so
	you don't need pyrex to make dist

	* qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
	sources; run moc
2004-03-19 22:36:31 +00:00
Richard Hult
93f433a17a 2004-03-16 Richard Hult <richard@imendio.com>
* bus/activation.c: (bus_activation_service_created),
	(bus_activation_send_pending_auto_activation_messages),
	(bus_activation_activate_service):
	* bus/activation.h:
	* bus/dispatch.c: (bus_dispatch),
	(check_nonexistent_service_auto_activation),
	(check_service_auto_activated),
	(check_segfault_service_auto_activation),
	(check_existent_service_auto_activation), (bus_dispatch_test):
	* bus/driver.c: (bus_driver_handle_activate_service):
	* bus/services.c: (bus_registry_acquire_service):
	* dbus/dbus-message.c: (dbus_message_set_auto_activation),
	(dbus_message_get_auto_activation):
	* dbus/dbus-message.h:
	* dbus/dbus-protocol.h: Implement auto-activation.
2004-03-16 18:00:35 +00:00
Mikael Hallendal
db400fed47 2003-12-13 Mikael Hallendal <micke@imendio.com>
* doc/TODO: Added not about better error check of configuration files.
2003-12-13 14:30:37 +00:00
Richard Hult
a1df3040f2 2003-12-02 Richard Hult <richard@imendio.com>
* Update AFL version to 2.0 throughout the source files to reflect
	the update that was done a while ago.
2003-12-02 10:44:22 +00:00
Havoc Pennington
d8beff11cd 2003-11-01 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: add state machine docs on the auth
	protocol; just a first draft, I'm sure it's wrong.
2003-11-01 18:24:32 +00:00
Havoc Pennington
eb9aa9da95 2003-10-22 Havoc Pennington <hp@redhat.com>
* bus/bus.c (bus_context_check_security_policy): fix up assertion

	* bus/connection.c (bus_transaction_send_from_driver): set the
	destination to the connection's base service
2003-10-22 16:01:08 +00:00
Havoc Pennington
7574224200 2003-10-20 Havoc Pennington <hp@redhat.com>
hmm, make check is currently not passing.

	* doc/dbus-specification.xml: add requirement that custom type
	names follow the same rules as interface names.

	* dbus/dbus-protocol.h: change some of the byte codes, to avoid
	duplication and allow 'c' to be 'custom'; dict is now 'm' for
	'map'

	* doc/dbus-specification.xml: update type codes to match
	dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
	CUSTOM. Add type OBJECT_PATH to the spec.

2003-10-17  Havoc Pennington  <hp@redhat.com>

	* bus/driver.c (create_unique_client_name): use "." as separator
	in base service names instead of '-'

	* dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
	byte at the end of the string

	* dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
	optimization macros since string validation seems to be a slow
	point.

	* doc/dbus-specification.xml: restrict valid
	service/interface/member/error names. Add test suite code for the
	name validation.

	* dbus/dbus-string.c: limit service/interface/member/error names
	to [0-9][A-Z][a-z]_

	* dbus/dbus-connection.c (dbus_connection_dispatch): add missing
	format arg to verbose spew

	* glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
	memory, return instead of g_error

	* test/test-service.c (path_message_func): support emitting a
	signal on request

	* dbus/dbus-bus.c (init_connections_unlocked): only fill in
	activation bus type if DBUS_BUS_ACTIVATION was set; default to
	assuming the activation bus was the session bus so that services
	started manually will still register.
	(init_connections_unlocked): fix so that in OOM situation we get
	the same semantics when retrying the function

	* test/test-service.c (main): change to use path registration, to
	test those codepaths; register with DBUS_BUS_ACTIVATION rather
	than DBUS_BUS_SESSION
2003-10-21 05:46:52 +00:00
Havoc Pennington
d6e1b2adb3 2003-10-16 Havoc Pennington <hp@redhat.com>
* 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.
2003-10-16 06:34:51 +00:00
Havoc Pennington
3251264ac4 2003-10-14 Havoc Pennington <hp@redhat.com>
* 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
2003-10-14 22:16:03 +00:00
Havoc Pennington
b704a068a9 - the pending reply tracking isn't quite right. It currently simply
blocks any reply if one wasn't pending. Instead, it needs to
   allow any reply if one was pending, and block otherwise.
   Suggest changing the check_reply() call to just get a boolean
   was_pending_reply value, pass that in to the policy
   engine, and allow <allow>/<deny> elements to match based on
   whether it was a pending reply.
2003-10-14 05:22:22 +00:00
Havoc Pennington
64f5ae1a79 2003-10-14 Havoc Pennington <hp@redhat.com>
* 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
2003-10-14 05:16:56 +00:00
Havoc Pennington
4097e94af3 2003-10-12 Havoc Pennington <hp@pobox.com>
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.
2003-10-12 05:59:39 +00:00
Havoc Pennington
56cc4ae1a2 2003-10-11 Havoc Pennington <hp@pobox.com>
* test/decode-gcov.c (function_solve_graph): make broken block
	graph a nonfatal error since it seems to be broken. Need to debug
	this.

	* dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
	can't just check type > INVALID < LAST anymore

	* dbus/dbus-message.c (dbus_message_get_signature): new function
	(dbus_message_has_signature): new function
	(struct DBusMessage): add signature field (right now it isn't sent
	over the wire, just generated on the fly)
	(dbus_message_copy): copy the signature, and init strings to
	proper length to avoid some reallocs
	(dbus_message_iter_init_array_iterator): return void, since it
	can't fail
	(dbus_message_iter_init_dict_iterator): return void since it can't fail
	(_dbus_message_loader_queue_messages): add silly temporary hack to
	fill in message->signature on load

	* dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
	characters, so they are relatively human-readable.
2003-10-12 00:55:11 +00:00
Havoc Pennington
40751c847b 2003-10-11 Havoc Pennington <hp@pobox.com>
* 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)
2003-10-11 06:20:28 +00:00
Havoc Pennington
dbffb38790 tweak 2003-10-02 22:55:06 +00:00
Havoc Pennington
f44c036718 tutorial hacking 2003-10-02 22:49:11 +00:00
Havoc Pennington
05e7b44f44 2003-10-02 Havoc Pennington <hp@redhat.com>
* doc/dbus-tutorial.xml: write some stuff
2003-10-02 22:34:17 +00:00
Havoc Pennington
78b69c683e 2003-09-29 Havoc Pennington <hp@pobox.com>
* configure.in: split checks for Doxygen from XML docs, check for
	xmlto

	* doc/Makefile.am: XML-ify all the docs, and add a blank
	dbus-tutorial.xml
2003-09-30 03:34:00 +00:00