Commit graph

1047 commits

Author SHA1 Message Date
Owen Fraser-Green
e55e38d8df Added UnregisterObject method. 2004-05-23 21:33:14 +00:00
Kristian Høgsberg
14d9ef5be9 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
* 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.
2004-05-23 18:09:46 +00:00
Olivier Andrieu
e431887e84 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-object-tree.c
	(_dbus_object_tree_list_registered_unlock, lookup_subtree): return
	children even if the requested path isn't registered.
	(object_tree_test_iteration): test object_tree_list_registered.

	* configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
	it to 0.
2004-05-21 09:05:20 +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
Kristian Høgsberg
1919d92d85 Patch from Jon Trowbridge <trow@ximian.com>:
* bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
 	up a watch that triggers a config reload when one end of the pipe
 	becomes readable.
 	(signal_handler): Instead of doing the config reload in our SIGHUP
 	handler, just write to the reload pipe and let the associated
 	watch handle the reload when control returns to the main loop.

 	* bus/driver.c (bus_driver_handle_reload_config): Added.
 	Implements a ReloadConfig method for requesting a configuration
 	file reload via the bus driver.
2004-05-20 18:45:16 +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
Owen Fraser-Green
484f5ee748 Updated release instructions. 2004-05-19 21:12:55 +00:00
Owen Fraser-Green
da36a58bb0 Shhh... 2004-05-18 13:51:19 +00:00
Kristian Høgsberg
c614e5b4b1 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
filter against auth->allowed_mechs; we only add allowed mechs in
	record_mechanisms().

 	* dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
	ALLOWED_MECHS to auth-script format so we can set the list of
	allowed mechanisms.

 	* data/auth/client-out-of-mechanisms.auth-script: New test to
	check client disconnects when it is out of mechanisms to try.

 	* dbus/dbus-auth.c (process_command): Remove check for lines
	longer that 1 MB; we only buffer up maximum 16 kB.

 	* dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
	dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
	Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
	assume there might be unused bytes.

 	* dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
	client-out-of-mechs, it is handled in process_reject(). Move check
	for max failures to send_rejected(), as it's a server-only thing.
2004-05-17 23:34:55 +00:00
Kristian Høgsberg
6527ee5134 2004-05-18 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-auth.c: Factor out protocol reply code into functions
	send_auth(), send_data(), send_rejected(), send_error(),
	send_ok(), send_begin() and send_cancel().
2004-05-17 23:09:37 +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
Olivier Andrieu
91605d6899 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
	leak.
2004-05-17 09:43:24 +00:00
Owen Fraser-Green
52907e3a8a Shhh... 2004-05-15 21:10:46 +00:00
Owen Fraser-Green
8bc62a2864 Various mono related changes to facilitate GAC support. 2004-05-15 19:31:12 +00:00
Owen Fraser-Green
a3942cbc6f Fixed another typo! Grrrr... 2004-05-15 13:24:00 +00:00
Owen Fraser-Green
5cc3edb30b Fixed typeo 2004-05-15 13:22:18 +00:00
Owen Fraser-Green
d1b264b031 Added mono documentation. 2004-05-15 11:44:44 +00:00
Owen Fraser-Green
375d665f74 Added documentation directory 2004-05-15 11:37:59 +00:00
Havoc Pennington
ac7429cde3 create a process for committing patches that doesn't bottleneck on Havoc 2004-05-11 22:33:57 +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
John (J5) Palmieri
c718526cbe * Fixed python bindings by defining all need parameter and variable types 2004-05-10 18:16:29 +00:00
Havoc Pennington
86a4edfec2 mention removing version number from daemon name 2004-05-07 22:45:15 +00:00
Zack Rusin
a36beaa279 Modified version of the patch by Jeff Snyder jeff at caffeinated.me.uk
Thanks
2004-05-04 05:35:48 +00:00
Harald Fernengel
f9f70da4df small compile fix 2004-05-03 17:08:00 +00:00
Owen Fraser-Green
c9528c10af Removed test-dbus-sharp.exe from all target. 2004-05-02 16:15:52 +00:00
Owen Fraser-Green
3c6ef3df27 Handle empty iterators properly! 2004-05-01 19:59:58 +00:00
Owen Fraser-Green
e16dafeb5f Handle empty iterators. 2004-05-01 19:56:27 +00:00
Owen Fraser-Green
c2920b8ff6 The Requires field didn't really work out. 2004-04-30 16:02:53 +00:00
Owen Fraser-Green
533ae2908f Modified dbus-sharp.pc to include Libs and Requires field 2004-04-30 13:44:32 +00:00
Zack Rusin
e8a46365c7 Committing Haralds stuff together with some of my backlog for connection. 2004-04-27 05:35:01 +00:00
Kristian Høgsberg
4e243ba4b4 2004-04-25 Kristian Høgsberg <krh@redhat.com>
* test/data/valid-messages/standard-*.message: Update message
	test scripts to new header field names.
2004-04-25 15:50:23 +00:00
John (J5) Palmieri
d839b3d0b4 * Fixed buffer overflow cause by not incrementing
the times_we_did_each_thing counter array to reflect
the number of random mutation functions we have.
2004-04-23 15:25:16 +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
Kristian Høgsberg
6971a06b04 2004-04-21 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-server-unix.c (unix_finalize): Don't unref
	unix_server->watch here, it is unreffed in disconnect.
	(_dbus_server_new_for_tcp_socket): convert NULL host to
	"localhost" here so we don't append NULL to address.

	* dbus/dbus-server.c (_dbus_server_test): Add test case for
	various addresses, including tcp with no explicit host.
2004-04-21 22:13:07 +00:00
Olivier Andrieu
dd8b1b1d65 * dbus/dbus-message.c (decode_header_data, decode_string_field):
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.
2004-04-21 21:29:07 +00:00
Kristian Høgsberg
e5bc30a52c 2004-04-19 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
	_dbus_poll() instead of select().
2004-04-19 22:09:55 +00:00
Jon Trowbridge
600e411f25 2004-04-15 Jon Trowbridge <trow@ximian.com>
* bus/main.c (signal_handler): Reload the configuration files
	    on SIGHUP.
	    (main): Set up our SIGHUP handler.

	    * bus/bus.c (struct BusContext): Store the config file, user and
	    fork flag in the BusContext.
	    (process_config_first_time_only): Added.  Contains the code
	    (previously in bus_context_new) for setting up the BusContext from
	    the BusConfigParser that should only be run the first time the
	    config files are read.
	    (process_config_every_time): Added.  Contains the code (previously
	    in bus_context_new) for setting up the BusContext from the
	    BusConfigParser that should be run every time the config files are
	    read.
	    (load_config): Added.  Builds a BusConfigParser from the config
	    files and passes the resulting structure off to
	    process_config_first_time_only (assuming this is the first time)
	    and process_config_every_time.
	    (bus_context_new): All of the config-related code has been moved
	    to process_config_first_time_only and process_config_every_time.
	    Now this function just does the non-config-related initializations
	    and calls load_config.
	    (bus_context_reload_config): Added.
2004-04-16 15:01:25 +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
Olivier Andrieu
61b294f1a9 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
* test/glib/test-dbus-glib.c (timed_exit): fail the test after
	a few seconds.
2004-04-13 22:29:50 +00:00
Michael Meeks
fefa7ed4d5 2004-04-13 Michael Meeks <michael@ximian.com>
* glib/dbus-gobject.c (handle_introspect): split out
	(introspect_properties): this.
	(handle_introspect): implement this.
2004-04-13 11:47:17 +00:00
Michael Meeks
83d3819577 2004-04-13 Michael Meeks <michael@ximian.com>
* test/glib/Makefile.am: use the absolute path so the bus
	daemon's chdir ("/") doesn't kill us dead.

	* configure.in: subst ABSOLUTE_TOP_BUILDDIR
2004-04-13 11:39:41 +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
Jon Trowbridge
e039be5838 2004-04-09 Jon Trowbridge <trow@ximian.com>
* bus/config-parser.c (bus_config_parser_new): Added a 'parent'
	    argument.  If non-null, the newly-constructed BusConfigParser will
	    be initialized with the parent's BusLimits instead of the default
	    values.
	    (include_file): When including a config file, pass in
	    the current parser as the parent and then copy the BusLimits
	    from the included BusConfigParser pack to the current parser.
	    (process_test_valid_subdir): Renamed from process_test_subdir.
	    (process_test_equiv_subdir): Added.  Walks through a directory,
	    descending into each subdirectory and loading the config files
	    it finds there.  If any subdirectory contains two config files
	    that don't produce identical BusConfigParser structs, fail.
	    For now, the BusConfigParser's BusPolicies are not compared.
	    (bus_config_parser_test): Call both process_test_valid_subdir and
	    process_test_equiv_subdir.

	    * bus/config-loader-libxml.c (bus_config_load): Take a parent
	    argument and pass it along to the call to bus_config_parser_new.
	    Also made a few small changes to allow this code to compile.

	    * bus/config-loader-expat.c (bus_config_load): Take a parent
	    argument and pass it along to the call to bus_config_parser_new.

	    * bus/bus.c (bus_context_new): Load the config file
	    with a NULL parent argument.
2004-04-09 19:50:29 +00:00
Owen Fraser-Green
8056390e00 Made proxy DLL names unique 2004-04-03 22:00:40 +00:00
Michael Meeks
25f384cad9 hush 2004-03-29 20:03:23 +00:00
Michael Meeks
b498dbcc1a 2004-03-29 Michael Meeks <michael@ximian.com>
* glib/dbus-gobject.c (set_object_property): split out /
	re-work, use the property type, and not the message type(!)
	(get_object_property): ditto.

        * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
	(dbus_gvalue_marshal): make this code re-usable, needed
	for signals too, also on both proxy and server side.
	Re-write for more efficiency / readability.
2004-03-29 13:24:50 +00:00
Michael Meeks
004b37eca4 2004-03-29 Michael Meeks <michael@ximian.com>
* dbus/dbus-message.c
	(dbus_message_new_error_printf): impl.

	* dbus/dbus-connection.c
	(dbus_connection_unregister_object_path): fix warning.

	* configure.in: fix no-mono-installed situation.
2004-03-29 13:11:05 +00:00
Michael Meeks
d7a044a138 hush. 2004-03-29 12:50:45 +00:00
Havoc Pennington
a221eefadf 2004-03-27 Havoc Pennington <hp@redhat.com>
Patch from Timo Teräs:

	* tools/dbus-send.c (main): if --print-reply, assume type is
	method call; support boolean type args

	* dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
	bunch of memleak and logic bugs
2004-03-27 05:29:31 +00:00
Owen Fraser-Green
45277e93d8 Added signal support. 2004-03-26 15:25:59 +00:00