1 2004-06-07 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
4 random signature when using REQUIRED_FIELDS (this hack won't work
7 * dbus/dbus-message.c: change the signature to be a header field,
8 instead of message->signature special-case string. Incremental
9 step forward. Then we can fix up code to send the signature in the
10 message, then fix up code to validate said signature, then fix up
11 code to not put the typecodes inline, etc.
12 (load_one_message): don't make up the signature after the fact
13 (decode_header_data): require signature field for the known
16 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
18 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
20 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
22 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
24 * mono/Handler.cs: Updated to follow new path argument for
25 (un-)registering objects.
27 * mono/example/Makefile.am:
29 * configure.in: Bumped required version for mono and use new -pkg
32 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
34 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
35 registration functions take the path argument as char* instead of
38 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
39 split off the path decompostion part of
40 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
43 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
45 2004-06-02 Kristian Høgsberg <krh@redhat.com>
47 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
48 machine approach. A state is implemented as a function that
49 handles incoming events as specified for that state.
51 * doc/dbus-specification.xml: Update auth protocol state machine
52 specification to match implementation. Remove some leftover
55 2004-06-02 Kristian Høgsberg <krh@redhat.com>
57 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
58 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
61 * Doxyfile.in: remove deprecated options.
63 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
64 glib/test-thread.h, glib/test-thread-client.c,
65 glib/test-thread-server.c, glib/test-profile.c,
66 glib/test-dbus-glib.c: remove these unused files.
68 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
70 * dbus/dbus-object-tree.c
71 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
72 non-fallback handlers (bug #684).
73 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
74 (find_subtree_recurse): report wether the returned subtree is an
75 exact match or a "fallback" match higher up in the tree.
76 (object_tree_test_iteration): update test case.
78 2004-06-01 Seth Nickell <seth@gnome.org>
80 * python/dbus_bindings.pyx.in:
81 * python/tests/test-client.py:
83 Round off basic type support. Add dicts (yay!), and
84 remaining array types.
86 Make MessageIter more general so it works for dicts too.
88 Mark all loop variables as C integers.
90 2004-05-31 Havoc Pennington <hp@redhat.com>
92 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
95 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
97 * glib/dbus-glib-tool.c (main): set up to have a --self-test
98 option that runs the tests, and start filling in some code
99 including for starters just dumping the interfaces to stdout
101 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
103 * test/data/valid-introspection-files/lots-of-types.xml: test of
104 an example introspection file
106 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
109 2004-05-31 Seth Nickell <seth@gnome.org>
111 * python/dbus_bindings.pyx.in:
112 * python/tests/test-client.py:
117 Fix string array memory trashing bug... oops...
119 2004-05-30 Seth Nickell <seth@gnome.org>
123 Add a nicer-but-less-flexible alternate API for handling
124 calls to virtual objects in dbus.ObjectTree.
126 Screw up the argument order to the dbus.Object constructor
127 for consistency with dbus.ObjectTree (and to make dbus_methods
128 optional for future extension)
130 * python/examples/Makefile.am:
131 * python/examples/gconf-proxy-service.py:
132 * python/examples/gconf-proxy-service2.py:
134 Alternate implementation of gconf-proxy-service using the
135 nicer dbus.ObjectTree API.
137 * python/examples/example-service.py:
138 * python/tests/test-server.py
140 Reverse the argument order to deal with dbus.Object constructor
143 2004-05-30 Seth Nickell <seth@gnome.org>
145 * python/examples/example-client.py:
146 * python/examples/example-service.py:
148 Take it back. Lists seem to work but they're broken
149 in the test suite. Make the base examples use
152 2004-05-30 Seth Nickell <seth@gnome.org>
154 * python/dbus_bindings.pyx.in:
155 * python/tests/test-client.py:
157 Add some more tests and fix errors that crop up.
158 Unfortunately, currently it seems like marshalling
159 and unmarshalling of lists is completely broken :-(
161 2004-05-30 Seth Nickell <seth@gnome.org>
163 * python/dbus_bindings.pyx.in:
165 Add support for ObjectPath type.
169 Refactor message handling code to a common function.
171 * python/tests/test-client.py:
172 * python/tests/test-server.py:
174 Add tests that check to make sure values of all types
175 can be echoed from a service w/o mangling.
177 2004-05-29 Seth Nickell <seth@gnome.org>
181 Add ObjectTree class which allows implementation
182 of trees of "virtual" objects. Basically the python
183 wrapper for "register_fallback".
185 * python/examples/Makefile.am
186 * python/examples/gconf-proxy-client.py:
187 * python/examples/gconf-proxy-service.py:
189 Implement a simple GConf proxy service that supports
190 get/set on string and int GConf keys using the ObjectTree.
192 2004-05-29 Seth Nickell <seth@gnome.org>
195 * python/examples/example-client.py:
196 * python/examples/example-service.py:
197 * python/examples/list-system-services.py:
199 Add SessionBus, SystemBus and ActivationBus classes
200 so you don't need to know the special little BUS_TYPE
203 2004-05-29 Havoc Pennington <hp@redhat.com>
205 * bus/config-parser.c (process_test_valid_subdir): temporarily
206 stop testing config parser OOM handling, since expat has issues
207 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
209 * bus/dbus-daemon-1.1.in: change requested_reply to
210 send_requested_reply/receive_requested_reply so we can send the
211 replies, not just receive them.
213 * bus/config-parser.c: parse the new
214 send_requested_reply/receive_requested_reply
216 * bus/policy.c (bus_client_policy_check_can_send): add
217 requested_reply argument and use it
219 * bus/bus.c (bus_context_check_security_policy): pass through
220 requested_reply status to message send check
222 * bus/system.conf.in: adapt to requested_reply change
224 2004-05-28 Havoc Pennington <hp@redhat.com>
226 * test/glib/test-service-glib.c (main): remove unused variable
228 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
230 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
231 from the enum, no longer in use.
233 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
236 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
237 whether error_name passed in is a valid error name.
239 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
241 * dbus/dbus-message.c (dbus_message_get_args): Added support for
242 OBJECT_PATH and OBJECT_PATH_ARRAY
244 2004-05-28 Seth Nickell <seth@gnome.org>
246 * python/examples/Makefile.am:
248 Forget to add Makefile.am. Do not pass go.
250 2004-05-28 Michael Meeks <michael@ximian.com>
252 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
255 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
257 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
258 (_dbus_message_iter_get_basic_type_array): impl.
259 drastically simplify ~all relevant _get methods to use these.
260 (_dbus_message_iter_append_basic_array),
261 (dbus_message_iter_append_basic): impl
262 drastically simplify ~all relevant _append methods to use these.
264 * dbus/dbus-message-builder.c (parse_basic_type)
265 (parse_basic_array, lookup_basic_type): impl.
266 (_dbus_message_data_load): prune scads of duplicate /
269 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
270 (_dbus_demarshal_basic_type): implement,
271 (demarshal_and_validate_len/arg): beef up debug.
272 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
274 2004-05-27 Seth Nickell <seth@gnome.org>
277 * python/Makefile.am:
279 Include the example python apps in the tarball.
281 * python/examples/list-system-services.py
283 Add a python new example that fetches the list of services
286 2004-05-27 Seth Nickell <seth@gnome.org>
289 * python/dbus_bindings.pyx.in:
291 Fix failure to notify that a signal was not handled,
292 resulted in hung functions.
294 2004-05-25 Colin Walters <walters@redhat.com>
296 * tools/dbus-monitor.c (main): Monitor all types of messages.
298 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
300 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
301 which unregisters the object path and disposes the handler.
303 2004-05-23 Kristian Høgsberg <krh@redhat.com>
305 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
307 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
308 operands to && so we call dbus_message_iter_next () for the last
311 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
313 * dbus/dbus-object-tree.c
314 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
315 children even if the requested path isn't registered.
316 (object_tree_test_iteration): test object_tree_list_registered.
318 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
321 2004-05-20 Kristian Høgsberg <krh@redhat.com>
323 * doc/TODO: Remove resolved items.
325 * bus/expirelist.h (struct BusExpireList): remove unused n_items
328 * bus/connection.c (bus_connections_expect_reply): Enforce the
329 per-connection limit on pending replies.
331 Patch from Jon Trowbridge <trow@ximian.com>:
333 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
334 up a watch that triggers a config reload when one end of the pipe
336 (signal_handler): Instead of doing the config reload in our SIGHUP
337 handler, just write to the reload pipe and let the associated
338 watch handle the reload when control returns to the main loop.
340 * bus/driver.c (bus_driver_handle_reload_config): Added.
341 Implements a ReloadConfig method for requesting a configuration
342 file reload via the bus driver.
344 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
346 * HACKING: Updated release instructions concerning the wiki page.
348 2004-05-18 Kristian Høgsberg <krh@redhat.com>
350 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
351 filter against auth->allowed_mechs; we only add allowed mechs in
354 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
355 ALLOWED_MECHS to auth-script format so we can set the list of
358 * data/auth/client-out-of-mechanisms.auth-script: New test to
359 check client disconnects when it is out of mechanisms to try.
361 * dbus/dbus-auth.c (process_command): Remove check for lines
362 longer that 1 MB; we only buffer up maximum 16 kB.
364 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
365 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
366 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
367 assume there might be unused bytes.
369 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
370 client-out-of-mechs, it is handled in process_reject(). Move check
371 for max failures to send_rejected(), as it's a server-only thing.
373 * dbus/dbus-auth.c: Factor out protocol reply code into functions
374 send_auth(), send_data(), send_rejected(), send_error(),
375 send_ok(), send_begin() and send_cancel().
377 2004-05-17 Kristian Høgsberg <krh@redhat.com>
379 Remove base64 encoding, replace with hex encoding. Original patch
380 from trow@ximian.com, added error handling.
382 * dbus/dbus-string.c (_dbus_string_base64_encode)
383 (_dbus_string_base64_decode): Remove.
384 (_dbus_string_hex_decode): Add end_return argument so we can
385 distinguish between OOM and invalid hex encoding.
386 (_dbus_string_test): Remove base64 tests and add test case for
389 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
390 Replace base64 with hex.
392 * test/data/auth/invalid-hex-encoding.auth-script: New test case
393 for invalid hex encoded data in auth protocol.
395 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
397 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
400 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
402 * mono/dbus-sharp.dll.config.in: Added for GAC
403 * mono/dbus-sharp.snk: Added for GAC
404 * mono/Assembly.cs.in: Added for GAC
405 * mono/Makefile.am: Changes for GAC installation
406 * configure.in: Added refs for dbus-sharp.dll.config.in and
407 Assembly.cs.in. More fixes for mono testing
408 * mono/example/Makefile.am: Changed var to CSC
409 * Makefile.am: Changed flag name to DBUS_USE_CSC
411 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
413 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
414 * mono/doc/*: Added documentation framework
415 * configure.in: Added monodoc check
416 * README: Added description of mono configure flags
418 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
420 * doc/dbus-specification.xml: Added a "Required" column to the
421 header fields table and changed the "zero or more" verbage in
422 the above paragraph to read "The header must contain the required
423 named header fields and zero or more of the optional named header
425 * test/data/invalid-messages/*.message: Added the required PATH
426 named header field to the tests so that they don't fail on
429 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
431 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
432 the stack by implicitly defining variable and parameter types and
433 removing the hack of defining C pointers as python objects and later
436 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
438 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
440 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
442 * mono/DBusType/Dict.cs: Handle empty dicts
443 * mono/DBusType/Array.cs: Handle empty arrays
444 * mono/Arguments.cs: Handle empty arguments
447 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
449 * dbus-sharp.pc.in: Modified to include include Libs and Requires
452 2004-04-25 Kristian Høgsberg <krh@redhat.com>
454 * test/data/valid-messages/standard-*.message: Update message
455 test scripts to new header field names.
457 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
459 * test/break-loader.c (randomly_do_n_things): tracked down buffer
460 overflow to times_we_did_each_thing array which would chop off the
461 first character of the failure_dir string. Increased the size of
462 the array to 7 to reflect the number of random mutation functions
465 2004-04-21 Kristian Høgsberg <krh@redhat.com>
467 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
468 unix_server->watch here, it is unreffed in disconnect.
469 (_dbus_server_new_for_tcp_socket): convert NULL host to
470 "localhost" here so we don't append NULL to address.
472 * dbus/dbus-server.c (_dbus_server_test): Add test case for
473 various addresses, including tcp with no explicit host.
475 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
477 * dbus/dbus-message.c (decode_header_data, decode_string_field):
478 fix incorrect setting of .name_offset in the HeaderField (it was
479 off by two bytes, positioned right after the name and typecode)
481 * bus/bus.c (bus_context_new, bus_context_unref): test before
482 calling dbus_server_free_data_slot and _dbus_user_database_unref
485 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
488 2004-04-19 Kristian Høgsberg <krh@redhat.com>
490 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
491 _dbus_poll() instead of select().
493 2004-04-15 Jon Trowbridge <trow@ximian.com>
495 * bus/main.c (signal_handler): Reload the configuration files
497 (main): Set up our SIGHUP handler.
499 * bus/bus.c (struct BusContext): Store the config file, user and
500 fork flag in the BusContext.
501 (process_config_first_time_only): Added. Contains the code
502 (previously in bus_context_new) for setting up the BusContext from
503 the BusConfigParser that should only be run the first time the
504 config files are read.
505 (process_config_every_time): Added. Contains the code (previously
506 in bus_context_new) for setting up the BusContext from the
507 BusConfigParser that should be run every time the config files are
509 (load_config): Added. Builds a BusConfigParser from the config
510 files and passes the resulting structure off to
511 process_config_first_time_only (assuming this is the first time)
512 and process_config_every_time.
513 (bus_context_new): All of the config-related code has been moved
514 to process_config_first_time_only and process_config_every_time.
515 Now this function just does the non-config-related initializations
516 and calls load_config.
517 (bus_context_reload_config): Added.
519 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
521 * bus/driver.c (bus_driver_handle_get_service_owner):
522 implement a GetServiceOwner method.
523 * doc/dbus-specification.xml: document it.
524 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
526 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
527 implement, using the bus GetServiceOwner method.
529 * test/glib/test-dbus-glib.c:
530 use dbus_gproxy_new_for_service_owner so that we can receive the
533 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
535 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
536 dbus/dbus-message.c, dbus/dbus-protocol.h
537 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
539 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
540 dbus/dbus-message.c, dbus/dbus-protocol.h
541 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
543 * dbus/dbus-internals.c (_dbus_header_field_to_string):
544 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
545 DBUS_HEADER_FIELD_SENDER resolves to "sender"
547 * doc/dbus-specification.xml (Header Fields Table):
548 s/SERVICE/DESTINATION
549 s/SENDER_SERVICE/SENDER
552 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
554 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
557 2004-04-13 Michael Meeks <michael@ximian.com>
559 * glib/dbus-gobject.c (handle_introspect): split out
560 (introspect_properties): this.
561 (handle_introspect): implement this.
563 * test/glib/Makefile.am: use the absolute path so the bus
564 daemon's chdir ("/") doesn't kill us dead.
566 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
568 2004-04-12 Jon Trowbridge <trow@ximian.com>
570 * bus/config-parser.c (struct BusConfigParser): Added
571 included_files field.
572 (seen_include): Added. Checks whether or not a file has already
573 been included by any parent BusConfigParser.
574 (bus_config_parser_new): Copy the parent's included_files.
575 (include_file): Track which files have been included, and fail on
577 (process_test_valid_subdir): Changed printf to report if we are
578 testing valid or invalid conf files.
579 (all_are_equiv): Changed printf to be a bit clearer about
580 what we are actually doing.
581 (bus_config_parser_test): Test invalid configuration files.
583 2004-04-09 Jon Trowbridge <trow@ximian.com>
585 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
586 argument. If non-null, the newly-constructed BusConfigParser will
587 be initialized with the parent's BusLimits instead of the default
589 (include_file): When including a config file, pass in
590 the current parser as the parent and then copy the BusLimits
591 from the included BusConfigParser pack to the current parser.
592 (process_test_valid_subdir): Renamed from process_test_subdir.
593 (process_test_equiv_subdir): Added. Walks through a directory,
594 descending into each subdirectory and loading the config files
595 it finds there. If any subdirectory contains two config files
596 that don't produce identical BusConfigParser structs, fail.
597 For now, the BusConfigParser's BusPolicies are not compared.
598 (bus_config_parser_test): Call both process_test_valid_subdir and
599 process_test_equiv_subdir.
601 * bus/config-loader-libxml.c (bus_config_load): Take a parent
602 argument and pass it along to the call to bus_config_parser_new.
603 Also made a few small changes to allow this code to compile.
605 * bus/config-loader-expat.c (bus_config_load): Take a parent
606 argument and pass it along to the call to bus_config_parser_new.
608 * bus/bus.c (bus_context_new): Load the config file
609 with a NULL parent argument.
611 2004-03-29 Michael Meeks <michael@ximian.com>
613 * glib/dbus-gobject.c (introspect_properties): split
614 out, fix mangled 'while' flow control.
615 (introspect_signals): implement.
616 (handle_introspect): update.
618 2004-03-29 Michael Meeks <michael@ximian.com>
620 * glib/dbus-gobject.c (set_object_property): split out /
621 re-work, use the property type, and not the message type(!)
622 (get_object_property): ditto.
624 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
625 (dbus_gvalue_marshal): make this code re-usable, needed
626 for signals too, also on both proxy and server side.
627 Re-write for more efficiency / readability.
629 2004-03-29 Michael Meeks <michael@ximian.com>
631 * dbus/dbus-message.c
632 (dbus_message_new_error_printf): impl.
634 * dbus/dbus-connection.c
635 (dbus_connection_unregister_object_path): fix warning.
637 * configure.in: fix no-mono-installed situation.
639 2004-03-27 Havoc Pennington <hp@redhat.com>
641 Patch from Timo Teräs:
643 * tools/dbus-send.c (main): if --print-reply, assume type is
644 method call; support boolean type args
646 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
647 bunch of memleak and logic bugs
649 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
652 * mono/Introspector.cs:
654 * mono/InterfaceProxy.cs:
656 * mono/ProxyBuilder.cs:
658 Added InterfaceProxy class to avoid building proxies for every
662 * dbus-message.c (dbus_message_append_args_valist)
663 (dbus_message_iter_get_object_path)
664 (dbus_message_iter_get_object_path_array)
665 (dbus_message_iter_append_object_path)
666 (dbus_message_iter_append_object_path_array):
667 Added object_path iter functions to handle OBJECT_PATH arguments
669 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
671 First checkin of mono bindings.
674 Build stuff for the bindings
675 * dbus-sharp.pc.in: Added for pkgconfig
677 2004-03-21 Havoc Pennington <hp@redhat.com>
679 * test/test-service.c (main): remove debug spew
681 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
683 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
686 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
687 (dbus_message_iter_init_array_iterator)
688 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
689 indicate whether the iterator is empty
691 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
694 2004-03-19 Havoc Pennington <hp@redhat.com>
700 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
702 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
703 you don't need pyrex to make dist
705 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
708 2004-03-18 Richard Hult <richard@imendio.com>
710 * dbus/dbus-message.c (dbus_message_get_auto_activation)
711 (dbus_message_set_auto_activation): Add doxygen docs.
713 2004-03-16 Richard Hult <richard@imendio.com>
715 * bus/activation.c: (bus_activation_service_created),
716 (bus_activation_send_pending_auto_activation_messages),
717 (bus_activation_activate_service):
719 * bus/dispatch.c: (bus_dispatch),
720 (check_nonexistent_service_auto_activation),
721 (check_service_auto_activated),
722 (check_segfault_service_auto_activation),
723 (check_existent_service_auto_activation), (bus_dispatch_test):
724 * bus/driver.c: (bus_driver_handle_activate_service):
725 * bus/services.c: (bus_registry_acquire_service):
726 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
727 (dbus_message_get_auto_activation):
728 * dbus/dbus-message.h:
729 * dbus/dbus-protocol.h: Implement auto-activation.
731 * doc/dbus-specification.xml: Add auto-activation to the spec.
733 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
735 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
736 fix a bug with CUSTOM types.
738 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
739 a unit test for this bug (used to fail).
741 2004-03-12 Mikael Hallendal <micke@imendio.com>
744 (babysitter_watch_callback): notify all pending activations waiting for
745 the same exec that the activation failed.
746 (bus_activation_activate_service): shortcut the activation if we
747 already waiting for the same executable to start up.
749 2004-03-12 Mikael Hallendal <micke@imendio.com>
752 - Added service file reloading.
753 Each service files directory is kept in an hash table in
754 BusActivation and each BusActivationEntry knows what .service-file it
755 was read from. So when you try to activate a service the bus will
756 check if it's been updated, removed or if new .service-files has
758 - Test code at the bottom for the service file reloading.
759 * bus/test-main.c: (main):
761 - added service reloading test.
762 * dbus/dbus-sysdeps.c:
763 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
765 2004-03-08 Michael Meeks <michael@ximian.com>
767 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
768 bail immediately if disconnected, to avoid busy loop.
770 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
771 cleanup cut/paste/inefficiency.
773 2004-03-01 David Zeuthen <david@fubar.dk>
775 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
776 bug where args were used twice. This bug resulted in a segfault
777 on a Debian/PPC system when starting the messagebus daemon. Include
778 dbus-sysdeps.h for DBUS_VA_COPY
780 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
782 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
783 appropriate va_copy implementation. From GLib
785 2004-02-24 Joe Shaw <joe@ximian.com>
787 * bus/services.c (bus_registry_acquire_service): We need to pass
788 in the service name to dbus_set_error() to prevent a crash.
790 2003-12-26 Anders Carlsson <andersca@gnome.org>
792 * AUTHORS: Reveal my True identity.
794 2003-12-17 Mikael Hallendal <micke@imendio.com>
796 * dbus/dbus-message.c: (dbus_message_append_args_valist):
797 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
799 2003-12-13 Mikael Hallendal <micke@imendio.com>
801 * doc/TODO: Added not about better error check of configuration files.
803 2003-12-02 Richard Hult <richard@imendio.com>
805 * Update AFL version to 2.0 throughout the source files to reflect
806 the update that was done a while ago.
808 2003-12-02 Richard Hult <richard@imendio.com>
810 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
811 wrote_dict_key to FALSE on the iter that the dict is appended to,
812 just like when appending other types. Fixes a bug where a dict
813 couldn't be put inside a dict.
814 (dbus_message_iter_append_dict_key): Fix typo in warning message.
815 (message_iter_test, _dbus_message_test): Add test case for dict
818 2003-12-01 David Zeuthen <david@fubar.dk>
820 * python/dbus.py: Add the actual message when calling the reciever
821 of a signal such that parameters can be inspected. Add the method
822 remove_signal_receiver
824 2003-11-26 Mikael Hallendal <micke@imendio.com>
828 * glib/*.[ch]: Made ref functions return the pointer
830 2003-11-25 Zack Rusin <zack@kde.org>
832 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
834 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
837 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
838 the Integrator and to better fit with the server,
840 2003-11-24 Zack Rusin <zack@kde.org>
842 * qt/connection.h, qt/connection.cpp: removing initDbus method since
843 the integrator handles it now
845 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
846 since QTimer wasn't really meant to be used the way DBusTimeout is
848 2003-11-24 Zack Rusin <zack@kde.org>
850 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
851 Integrator class which integrates D-BUS with the Qt event loop,
853 * qt/connection.h, qt/connection.cpp: Move all the code which
854 was dealing with D-BUS integration to the Integrator class,
855 and start using Integrator,
857 2003-11-23 Zack Rusin <zack@kde.org>
859 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
862 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
863 switching namespaces to DBusQt, reworking the class,
865 * Makefile.cvs: switching dependencies so that it matches KDE
868 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
871 2003-11-19 Havoc Pennington <hp@redhat.com>
875 * configure.in: bump version to 0.20
877 * configure.in (have_qt): add yet another place to look for qt
878 (someone hand trolltech a .pc file...)
880 2003-11-01 Havoc Pennington <hp@redhat.com>
882 * doc/dbus-specification.xml: add state machine docs on the auth
883 protocol; just a first draft, I'm sure it's wrong.
885 2003-10-28 David Zeuthen <david@fubar.dk>
887 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
888 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
890 2003-10-28 Havoc Pennington <hp@redhat.com>
892 * dbus/dbus-message.c (get_next_field): delete unused function
894 2003-10-28 Havoc Pennington <hp@redhat.com>
896 * bus/expirelist.c (do_expiration_with_current_time): detect
897 failure of the expire_func due to OOM
899 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
901 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
902 NoReply error that's now created by the bus when the service exits
904 2003-10-28 Havoc Pennington <hp@redhat.com>
906 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
907 tests for set_path, set_interface, set_member, etc.
909 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
911 * dbus/dbus-message.c (set_string_field): always just delete and
912 re-append the field; accept NULL for deletion
913 (re_align_fields_recurse): reimplement
915 2003-10-26 Havoc Pennington <hp@redhat.com>
917 * dbus/dbus-connection.c: fix docs to properly describe the
919 (_dbus_connection_notify_disconnected): remove this function;
920 we can't synchronously add the disconnected message, we have to
921 do it after we've queued any remaining real messages
922 (_dbus_connection_get_dispatch_status_unlocked): queue the
923 disconnect message only if the transport has finished queueing all
924 its real messages and is disconnected.
925 (dbus_connection_disconnect): update the dispatch status here
927 2003-10-22 Havoc Pennington <hp@redhat.com>
929 * bus/bus.c (bus_context_check_security_policy): fix up assertion
931 * bus/connection.c (bus_transaction_send_from_driver): set the
932 destination to the connection's base service
934 2003-10-20 Havoc Pennington <hp@redhat.com>
936 hmm, make check is currently not passing.
938 * doc/dbus-specification.xml: add requirement that custom type
939 names follow the same rules as interface names.
941 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
942 duplication and allow 'c' to be 'custom'; dict is now 'm' for
945 * doc/dbus-specification.xml: update type codes to match
946 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
947 CUSTOM. Add type OBJECT_PATH to the spec.
949 2003-10-17 Havoc Pennington <hp@redhat.com>
951 * bus/driver.c (create_unique_client_name): use "." as separator
952 in base service names instead of '-'
954 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
955 byte at the end of the string
957 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
958 optimization macros since string validation seems to be a slow
961 * doc/dbus-specification.xml: restrict valid
962 service/interface/member/error names. Add test suite code for the
965 * dbus/dbus-string.c: limit service/interface/member/error names
968 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
969 format arg to verbose spew
971 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
972 memory, return instead of g_error
974 * test/test-service.c (path_message_func): support emitting a
977 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
978 activation bus type if DBUS_BUS_ACTIVATION was set; default to
979 assuming the activation bus was the session bus so that services
980 started manually will still register.
981 (init_connections_unlocked): fix so that in OOM situation we get
982 the same semantics when retrying the function
984 * test/test-service.c (main): change to use path registration, to
985 test those codepaths; register with DBUS_BUS_ACTIVATION rather
986 than DBUS_BUS_SESSION
988 2003-10-16 Havoc Pennington <hp@redhat.com>
990 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
992 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
993 coverage of the tests
994 (coverage-report.txt): don't move the .da and .bbg files around
996 2003-10-16 Havoc Pennington <hp@redhat.com>
998 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1001 2003-10-16 Havoc Pennington <hp@redhat.com>
1003 * bus/connection.c (bus_pending_reply_expired): either cancel or
1005 (bus_connections_check_reply): use unlink, not remove_link, as we
1006 don't want to free the link; fixes double free mess
1008 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1009 where no reply was received
1011 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1014 * bus/signals.c (match_rule_matches): add special cases for the
1015 bus driver, so you can match on sender/destination for it.
1017 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1018 DBUS_PRINT_BACKTRACE is set
1020 * dbus/dbus-internals.c: add pid to assertion failure messages
1022 * dbus/dbus-connection.c: add message type code to the debug spew
1024 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1025 sender=foo not service=foo
1027 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1028 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1029 DBUS_ACTIVATION_ADDRESS instead
1031 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1032 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1034 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1037 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1038 (dbus_message_iter_get_object_path_array): new function (half
1039 finished, disabled for the moment)
1041 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1042 DBUS_MESSAGE_TYPE_ERROR
1044 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1045 avoid redirecting stderr to /dev/null
1046 (babysit): close stdin if not doing the "exit_with_session" thing
1048 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1049 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1050 stdout/stdin, so things don't get confused
1052 * bus/system.conf.in: fix to allow replies, I modified .conf
1053 instead of .conf.in again.
1055 2003-10-14 David Zeuthen <david@fubar.dk>
1057 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1058 argtype to arg_type when raising unknown arg type exception.
1059 Changed type list to reflect the changes in dbus-protocol.h so
1060 the bindings actually work.
1062 2003-10-14 Havoc Pennington <hp@redhat.com>
1064 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1065 to have a bug keeping it from outputting the .da files sometimes
1066 (string_get_string): don't append garbage nul bytes to the string.
1068 2003-10-15 Seth Nickell <seth@gnome.org>
1070 * python/Makefile.am:
1072 Include dbus_h_wrapper.h in the dist tarball.
1074 2003-10-14 Havoc Pennington <hp@redhat.com>
1076 * bus/bus.c (bus_context_check_security_policy): revamp this to
1077 work more sanely with new policy-based requested reply setup
1079 * bus/connection.c (bus_transaction_send_from_driver): set bus
1080 driver messages as no reply
1082 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1083 requested_reply attribute on allow/deny rules
1085 * bus/system.conf: add <allow requested_reply="true"/>
1087 * bus/driver.c (bus_driver_handle_message): fix check for replies
1088 sent to the bus driver, which was backward. How did this ever work
1089 at all though? I think I'm missing something.
1091 * dbus/dbus-message.c (decode_header_data): require error and
1092 method return messages to have a reply serial field to be valid
1093 (_dbus_message_loader_queue_messages): break up this function;
1094 validate that reply serial and plain serial are nonzero;
1095 clean up the OOM/error handling.
1096 (get_uint_field): don't return -1 from this
1097 (dbus_message_create_header): fix signed/unsigned bug
1099 * bus/connection.c (bus_connections_expect_reply): save serial of
1100 the incoming message, not reply serial
1102 2003-10-14 Havoc Pennington <hp@redhat.com>
1104 * bus/connection.c: implement pending reply tracking using
1107 * bus/bus.c (bus_context_check_security_policy): verify that a
1108 reply is pending in order to allow a reply to be sent. Deny
1109 messages of unknown type.
1111 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1113 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1114 (bus_context_get_reply_timeout): new
1116 2003-10-13 Seth Nickell <seth@gnome.org>
1118 * python/Makefile.am:
1120 Pass "make distcheck": remove a couple files from DIST_FILES
1121 that weren't included in the final version.
1123 2003-10-12 Havoc Pennington <hp@pobox.com>
1125 Added test code that 1) starts an actual bus daemon and 2) uses
1126 DBusGProxy; fixed bugs that were revealed by the test. Lots
1127 more testing possible, but this is the basic framework.
1129 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1130 empty proxy lists from the proxy list hash
1132 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1133 couple of return_if_fail checks
1135 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1136 to allocate, so everything is cleared to NULL as it should be.
1138 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1139 source as data to dbus_connection_set_timeout_functions() as the
1140 timeout functions expected
1142 * test/glib/run-test.sh: add a little script to start up a message
1143 bus and run tests using it
1145 * tools/dbus-launch.1: updates
1147 * tools/dbus-launch.c (main): add --config-file option
1149 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1150 that could never be reached.
1152 * dbus/dbus-message.c (dbus_message_new_method_return)
1153 (dbus_message_new_error, dbus_message_new_signal): set the
1154 no-reply-expected flag on all these. Redundant, but may
1155 as well be consistent.
1157 2003-10-11 Havoc Pennington <hp@pobox.com>
1159 * test/decode-gcov.c (function_solve_graph): make broken block
1160 graph a nonfatal error since it seems to be broken. Need to debug
1163 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1164 can't just check type > INVALID < LAST anymore
1166 * dbus/dbus-message.c (dbus_message_get_signature): new function
1167 (dbus_message_has_signature): new function
1168 (struct DBusMessage): add signature field (right now it isn't sent
1169 over the wire, just generated on the fly)
1170 (dbus_message_copy): copy the signature, and init strings to
1171 proper length to avoid some reallocs
1172 (dbus_message_iter_init_array_iterator): return void, since it
1174 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1175 (_dbus_message_loader_queue_messages): add silly temporary hack to
1176 fill in message->signature on load
1178 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1179 characters, so they are relatively human-readable.
1181 2003-10-11 Havoc Pennington <hp@pobox.com>
1183 * dbus/dbus-message.c (_dbus_message_test): add more test
1184 coverage, but #if 0 for now since they uncover a bug
1185 not fixed yet; I think in re_align_field_recurse()
1186 (re_align_field_recurse): add FIXME about broken assertion
1188 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1190 * bus/connection.c: share a couple code bits with expirelist.c
1192 * bus/expirelist.h, bus/expirelist.c: implement a generic
1193 expire-items-after-N-seconds facility, was going to share between
1194 expiring connections and replies, decided not to use for expiring
1195 connections for now.
1197 * COPYING: include AFL 2.0 (still need to change all the file headers)
1199 2003-10-09 Havoc Pennington <hp@redhat.com>
1201 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1202 gcc 3.3. Not that we do anything about it yet.
1204 * bus/signals.c (bus_match_rule_parse): impose max length on the
1207 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1209 2003-10-09 Havoc Pennington <hp@redhat.com>
1211 Make matching rules theoretically work (add parser).
1213 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1214 the case where destination is explicitly specified as bus driver
1215 and someone else is eavesdropping.
1217 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1218 definition of eavesdropping and assertion
1220 * tools/dbus-send.c (main): use dbus_message_type_from_string
1222 * bus/signals.c (bus_match_rule_parse): implement
1224 * dbus/dbus-message.c (dbus_message_type_from_string): new
1226 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1228 2003-10-02 Havoc Pennington <hp@pobox.com>
1230 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1231 dbus_gproxy_oneway_call
1233 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1234 (dbus_server_setup_with_g_main): fix to allow calling them more
1235 than once on the same args
1236 (dbus_bus_get_with_g_main): new function
1238 2003-10-02 Havoc Pennington <hp@redhat.com>
1240 * doc/dbus-tutorial.xml: write some stuff
1242 2003-09-29 Havoc Pennington <hp@pobox.com>
1244 * configure.in: split checks for Doxygen from XML docs, check for
1247 * doc/Makefile.am: XML-ify all the docs, and add a blank
1250 2003-09-29 Havoc Pennington <hp@pobox.com>
1252 * Merge dbus-object-names branch. To see the entire patch
1253 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1254 it's huuuuge though.
1255 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1257 2003-09-28 Havoc Pennington <hp@pobox.com>
1259 * HACKING: update to reflect new server
1261 2003-09-26 Seth Nickell <seth@gnome.org>
1264 * python/examples/example-signals.py:
1266 Start implementing some notions of signals. The API
1267 is really terrible, but they sort of work (with the
1268 exception of being able to filter by service, and to
1269 transmit signals *as* a particular service). Need to
1270 figure out how to make messages come from the service
1273 * python/dbus_bindings.pyx.in:
1275 Removed duplicate message_handler callbacks.
1277 2003-09-25 Havoc Pennington <hp@redhat.com>
1279 * bus/session.conf.in: fix my mess
1281 2003-09-25 Havoc Pennington <hp@pobox.com>
1283 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1285 2003-09-25 Seth Nickell <seth@gnome.org>
1287 * python/examples/example-service.py:
1289 Johan notices complete wrong code in example-service, but
1290 completely wrong in a way that works exactly the same (!).
1291 Johan is confused, how could this possibly work? Example
1292 code fails to serve purpose of making things clear.
1295 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1297 * doc/dbus-specification.sgml: don't require header fields
1298 to be 4-byte aligned and specify that fields should be
1299 distinguished from padding by the fact that zero is not
1302 * doc/TODO: remove re-alignment item and add item to doc
1303 the OBJECT_PATH type.
1305 * dbus/dbus-message.c:
1306 (HeaderField): rename the original member to value_offset
1307 and introduce a name_offset member to keep track of where
1308 the field actually begins.
1309 (adjust_field_offsets): remove.
1310 (append_int_field), (append_uint_field),
1311 (append_string_field): don't align the start of the header
1312 field to a 4-byte boundary.
1313 (get_next_field): impl finding the next marhsalled field
1314 after a given field.
1315 (re_align_field_recurse): impl re-aligning a number of
1316 already marshalled fields.
1317 (delete_field): impl deleting a field of any type and
1318 re-aligning any following fields.
1319 (delete_int_or_uint_field), (delete_string_field): remove.
1320 (set_int_field), (set_uint_field): no need to re-check
1321 that we have the correct type for the field.
1322 (set_string_field): ditto and impl re-aligning any
1324 (decode_header_data): update to take into account that
1325 the fields aren't 4-byte aligned any more and the new
1326 way to distinguish padding from header fields. Also,
1327 don't exit when there is too much header padding.
1328 (process_test_subdir): print the directory.
1329 (_dbus_message_test): add test to make sure a following
1330 field is re-aligned correctly after field deletion.
1332 * dbus/dbus-string.[ch]:
1333 (_dbus_string_insert_bytes): rename from insert_byte and
1334 allow the insert of multiple bytes.
1335 (_dbus_string_test): test inserting multiple bytes.
1337 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1338 warning note to docs about having to re-align any
1339 marshalled values following the string.
1341 * dbus/dbus-message-builder.c:
1342 (append_string_field), (_dbus_message_data_load):
1343 don't align the header field.
1345 * dbus/dbus-auth.c: (process_test_subdir): print the
1348 * test/break-loader.c: (randomly_add_one_byte): upd. for
1351 * test/data/invalid-messages/bad-header-field-alignment.message:
1354 * test/data/valid-messages/unknown-header-field.message: shove
1355 a dict in the unknown field.
1357 2003-09-25 Seth Nickell <seth@gnome.org>
1360 * python/dbus_bindings.pyx.in:
1362 Handle return values.
1364 * python/examples/example-client.py:
1365 * python/examples/example-service.py:
1367 Pass back return values from the service to the client.
1369 2003-09-24 Seth Nickell <seth@gnome.org>
1373 Connect Object methods (when you are sharing an object) up... pass
1374 in a list of methods to be shared. Sharing all the methods just
1375 worked out too weird. You can now create nice Services over the
1378 * python/dbus_bindings.pyx.in:
1380 Keep references to user_data tuples passed into C functions so
1381 Python doesn't garbage collect on us.
1383 Implement MethodReturn and Error subclasses of Message for creating
1384 DBusMessage's of those types.
1386 * python/examples/example-client.py:
1387 * python/examples/example-service.py:
1389 Simple example code showing both how create DBus services and objects,
1390 and how to use them.
1392 2003-09-23 Havoc Pennington <hp@pobox.com>
1394 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1396 2003-09-23 Havoc Pennington <hp@redhat.com>
1398 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1399 (dbus_gproxy_disconnect_signal): implement
1400 (dbus_gproxy_manager_remove_signal_match): implement
1401 (dbus_gproxy_manager_add_signal_match): implement
1402 (dbus_gproxy_oneway_call): implement
1404 2003-09-23 Havoc Pennington <hp@pobox.com>
1406 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1407 subclass. This means dropping the transparent thread safety of the
1408 proxy; you now need a separate proxy per-thread, or your own
1409 locking on the proxy. Probably right anyway.
1410 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1412 2003-09-22 Havoc Pennington <hp@redhat.com>
1414 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1416 2003-09-21 Seth Nickell <seth@gnome.org>
1418 First checkin of the Python bindings.
1420 * python/.cvsignore:
1421 * python/Makefile.am:
1422 * python/dbus_bindings.pyx.in:
1423 * python/dbus_h_wrapper.h:
1425 Pieces for Pyrex to operate on, building a dbus_bindings.so
1426 python module for low-level access to the DBus APIs.
1430 High-level Python module for accessing DBus objects.
1435 Build stuff for the python bindings.
1439 Extra macro needed for finding the Python C header files.
1441 2003-09-21 Havoc Pennington <hp@pobox.com>
1443 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1444 implementing the proxy manager, didn't get very far.
1446 * dbus/dbus-bus.c (dbus_bus_add_match): new
1447 (dbus_bus_remove_match): new
1449 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1450 path_name argument; adjust the other not-yet-implemented
1451 gproxy constructors to be what I think they should be.
1453 2003-09-21 Havoc Pennington <hp@pobox.com>
1455 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1456 by default for message bus connections.
1458 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1459 exit_on_disconnect flag is set and we process the disconnected
1461 (dbus_connection_set_exit_on_disconnect): new function
1463 2003-09-21 Havoc Pennington <hp@pobox.com>
1465 Get matching rules mostly working in the bus; only actually
1466 parsing the rule text remains. However, the client side of
1467 "signal connections" hasn't been started, this patch is only the
1470 * dbus/dispatch.c: fix for the matching rules changes
1472 * bus/driver.c (bus_driver_handle_remove_match)
1473 (bus_driver_handle_add_match): send an ack reply from these
1476 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1477 arguments, reported by Seth Nickell
1479 * bus/config-parser.c (append_rule_from_element): support
1480 eavesdrop=true|false attribute on policies so match rules
1481 can be prevented from snooping on the system bus.
1483 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1484 and "destination" in attribute names; fix some docs bugs;
1485 add eavesdrop=true|false attribute
1487 * bus/driver.c (bus_driver_handle_add_match)
1488 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1491 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1492 rid of broadcast service concept, signals are just always broadcast
1494 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1495 mostly implement matching rules stuff (currently only exposed as signal
1498 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1500 * doc/dbus-specification.sgml: Change the header field name
1501 to be an enum and update the rest of the spec to reference
1502 the fields using the conventinal name.
1504 * dbus/dbus-protocol.h: update to reflect the spec.
1506 * doc/TODO: add item to remove the 4 byte alignment requirement.
1508 * dbus/dbus-message.c: Remove the code to generalise the
1509 header/body length and serial number header fields as named
1510 header fields so we can reference field names using the
1512 (append_int_field), (append_uint_field), (append_string_field):
1513 Append the field name as a byte rather than four chars.
1514 (delete_int_or_uint_field), (delete_string_field): reflect the
1515 fact that the field name and typecode now occupy 4 bytes instead
1517 (decode_string_field), (decode_header_data): update to reflect
1518 protocol changes and move the field specific encoding from
1519 decode_string_field() back into decode_header_data().
1521 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1522 Add utility to aid debugging.
1524 * dbus/dbus-message-builder.c:
1525 (append_string_field), (_dbus_message_data_load): Update to
1526 reflect protocol changes; Change the FIELD_NAME directive
1527 to HEADER_FIELD and allow it to take the field's conventional
1528 name rather than the actual value.
1530 * test/data/*/*.message: Update to use HEADER_FIELD instead
1531 of FIELD_NAME; Always align the header on an 8 byte boundary
1532 *before* updating the header length.
1534 2003-09-15 Havoc Pennington <hp@pobox.com>
1536 * dbus/dbus-pending-call.c: add the get/set object data
1537 boilerplate as for DBusConnection, etc. Use generic object data
1538 for the notify callback.
1540 * glib/dbus-gparser.c (parse_node): parse child nodes
1542 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1544 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1545 contain functions shared between the convenience lib and the
1548 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1549 -export-symbols-regex to the GLib library
1551 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1552 fix the locking in here, and add a default handler for
1553 Introspect() that just returns sub-nodes.
1555 2003-09-14 Havoc Pennington <hp@pobox.com>
1557 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1558 rather than gfoo consistent
1560 * glib/dbus-gproxy.h: delete for now, move contents to
1561 dbus-glib.h, because the include files don't work right since we
1562 aren't in the dbus/ subdir.
1564 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1565 (dbus_gproxy_end_call): finish
1566 (dbus_gproxy_begin_call): finish
1568 * glib/dbus-gmain.c (dbus_set_g_error): new
1570 * glib/dbus-gobject.c (handle_introspect): include information
1571 about child nodes in the introspection
1573 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1574 function to help in implementation of introspection
1576 * dbus/dbus-object-tree.c
1577 (_dbus_object_tree_list_registered_and_unlock): new function
1579 2003-09-12 Havoc Pennington <hp@pobox.com>
1581 * glib/dbus-gidl.h: add common base class for all the foo_info
1584 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1587 * test/Makefile.am: try test srcdir -ef . in addition to test
1588 srcdir = ., one of them should work (yeah lame)
1590 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1593 * glib/dbus-gparser.h: make description_load routines return
1594 NodeInfo* not Parser*
1596 * Makefile.am (SUBDIRS): build test dir after all library dirs
1598 * configure.in: add GTK+ detection
1600 2003-09-07 Havoc Pennington <hp@pobox.com>
1602 * Make Doxygen contented.
1604 2003-09-07 Havoc Pennington <hp@pobox.com>
1606 * doc/dbus-specification.sgml: more updates
1608 2003-09-06 Havoc Pennington <hp@pobox.com>
1610 * doc/dbus-specification.sgml: partial updates
1612 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1613 zillionth time; hopefully I edited the right file this time.
1615 * bus/config-parser.c (append_rule_from_element): support
1616 send_type, send_path, receive_type, receive_path
1618 * bus/policy.c: add message type and path to the list of things
1619 that can be "firewalled"
1621 2003-09-06 Havoc Pennington <hp@pobox.com>
1623 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1624 (dbus_connection_register_object_path): make this not handle
1625 messages to paths below the given path
1627 2003-09-03 Havoc Pennington <hp@pobox.com>
1629 * test/glib/Makefile.am: add this with random glib-linked test
1632 * glib/Makefile.am: remove the random test programs from here,
1633 leave only the unit tests
1635 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1636 uscore/javacaps conversion, and fix
1637 (get_object_property, set_object_property): change to .NET
1638 convention for mapping props to methods, set_FooBar/get_FooBar,
1639 since one language has such a convention we may as well copy it.
1640 Plus real methods in either getFooBar or get_foo_bar style won't
1641 collide with this convention.
1643 2003-09-01 Havoc Pennington <hp@pobox.com>
1645 * glib/dbus-gparser.c: implement
1647 * glib/dbus-gobject.c: start implementing skeletons support
1649 * configure.in: when disabling checks/assert, also define
1650 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1652 2003-09-01 Havoc Pennington <hp@pobox.com>
1654 * glib/Makefile.am: rearrange a bunch of files and get "make
1655 check" framework set up
1657 2003-08-31 Havoc Pennington <hp@pobox.com>
1659 * fix build with --disable-tests
1661 2003-08-30 Havoc Pennington <hp@pobox.com>
1663 * dbus/dbus-connection.c: purge DBusMessageHandler
1665 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1666 use callbacks everywhere
1668 2003-08-30 Havoc Pennington <hp@pobox.com>
1670 * test/data/valid-config-files/system.d/test.conf: change to
1671 root for the user so warnings don't get printed
1673 * dbus/dbus-message.c: add dbus_message_get_path,
1674 dbus_message_set_path
1676 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1677 dispatching to a path
1679 * dbus/dbus-string.c (_dbus_string_validate_path): add
1681 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1682 (_dbus_marshal_object_path): implement
1684 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1685 to contain the path to the target object
1686 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1687 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1689 2003-08-30 Havoc Pennington <hp@pobox.com>
1691 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1693 2003-08-29 Havoc Pennington <hp@pobox.com>
1695 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1697 (struct DBusObjectSubtree): shrink this
1698 a lot, since we may have a lot of them
1699 (_dbus_object_tree_free_all_unlocked): implement
1700 (_dbus_object_tree_dispatch_and_unlock): implement
1702 2003-08-29 Havoc Pennington <hp@pobox.com>
1704 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1706 2003-08-28 Havoc Pennington <hp@pobox.com>
1710 * dbus/dbus-connection.c: port to no ObjectID, create a
1711 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1713 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1714 everything except UnregisterFunction and MessageFunction
1716 * dbus/dbus-marshal.c: port away from DBusObjectID,
1717 add DBUS_TYPE_OBJECT_PATH
1719 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1720 dbus/dbus-objectid.[hc]: remove these, we are moving to
1721 path-based object IDs
1723 2003-08-25 Havoc Pennington <hp@pobox.com>
1725 Just noticed that dbus_message_test is hosed, I wonder when I
1726 broke that. I thought make check was passing earlier...
1728 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1729 container tree, will replace most of dbus-object-registry
1731 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1734 2003-08-19 Havoc Pennington <hp@pobox.com>
1736 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1737 (dbus_message_is_error): fix this function
1739 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1742 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1743 reflect clarified man page
1744 (bus_client_policy_check_can_send): ditto
1746 * bus/session.conf.in: fixup
1748 * bus/system.conf.in: fixup
1750 2003-08-18 Havoc Pennington <hp@redhat.com>
1752 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1754 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1755 dumb bug created earlier (wrong order of args to
1756 decode_header_data())
1758 * tools/dbus-send.c: port
1760 * tools/dbus-print-message.c (print_message): port
1762 * test/data/*messages: port all messages over
1764 * dbus/dbus-message-builder.c: support including
1767 * bus/driver.c: port over
1769 * bus/dispatch.c: port over to new stuff
1771 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1772 rename disconnect signal to "Disconnected"
1774 2003-08-17 Havoc Pennington <hp@pobox.com>
1776 This doesn't compile yet, but syncing up so I can hack on it from
1777 work. What are branches for if not broken code? ;-)
1779 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1780 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1781 DBUS_HEADER_FIELD_ERROR_NAME
1783 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1784 for the interface+member pairs
1785 (string_hash): change to use g_str_hash algorithm
1786 (find_direct_function, find_string_function): refactor these to
1789 * dbus/dbus-message.c: port all of this over to support
1790 interface/member fields instead of name field
1792 * dbus/dbus-object-registry.c: port over
1794 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1795 from _dbus_string_validate_name
1797 * bus/dbus-daemon-1.1: change file format for the
1798 <deny>/<allow> stuff to match new message naming scheme
1800 * bus/policy.c: port over
1802 * bus/config-parser.c: parse new format
1804 2003-08-16 Havoc Pennington <hp@pobox.com>
1806 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1809 * glib/dbus-gproxy.c: some hacking
1811 2003-08-15 Havoc Pennington <hp@redhat.com>
1813 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1815 * dbus/dbus-connection.c
1816 (dbus_connection_send_with_reply_and_block): factor out internals;
1817 change to convert any error replies to DBusError instead of
1818 returning them as a message
1820 2003-08-15 Havoc Pennington <hp@pobox.com>
1822 * dbus/dbus-connection.c,
1823 dbus/dbus-pending-call.c: Finish the pending call stuff
1825 2003-08-14 Havoc Pennington <hp@redhat.com>
1827 * dbus/dbus-pending-call.c: start on new object that will replace
1828 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1831 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1832 with remote interfaces
1834 * dbus/dbus-gidl.c: do the boring boilerplate in here
1836 2003-08-12 Havoc Pennington <hp@pobox.com>
1838 * bus/dispatch.c (bus_dispatch): make this return proper
1839 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1841 * dbus/dbus-errors.c (dbus_set_error): use
1842 _dbus_string_append_printf_valist
1844 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1845 (_dbus_string_append_printf): new
1847 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1850 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1851 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1852 message is unhandled.
1854 2003-08-11 Havoc Pennington <hp@pobox.com>
1856 * bus/test.c (client_disconnect_handler): change to return
1857 HANDLED (would have been REMOVE_MESSAGE)
1859 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1860 HANDLED/NOT_YET_HANDLED instead of
1861 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1864 2003-08-10 Havoc Pennington <hp@pobox.com>
1866 * tools/dbus-send.c (main): add --type argument, for now
1867 supporting only method_call and signal types.
1869 * tools/dbus-print-message.c: print message type
1871 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1872 init connection->objects
1874 * doc/dbus-specification.sgml: fix sgml
1876 * bus/*.c: port over to object-instance API changes
1878 * test/test-service.c: ditto
1880 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1881 name, we will have to fix up the rest of the code to also handle
1883 (dbus_message_new): generic message-creation call
1884 (set_string_field): allow appending name field
1886 2003-08-06 Havoc Pennington <hp@pobox.com>
1888 * dbus/dbus-object-registry.c: implement signal connection
1891 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1893 * dbus/dbus-internals.c (_dbus_memdup): new function
1895 2003-08-02 Havoc Pennington <hp@pobox.com>
1897 * dbus/dbus-message.c (dbus_message_get_no_reply)
1898 (dbus_message_set_no_reply): add these and remove
1899 set_is_error/get_is_error
1901 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1902 remove the ERROR flag, since there's now an ERROR type
1904 2003-08-01 Havoc Pennington <hp@pobox.com>
1906 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1909 * dbus/dbus-message.c (dbus_message_get_type): new function
1911 * doc/dbus-specification.sgml: add "type" byte to messages
1913 2003-08-01 Havoc Pennington <hp@pobox.com>
1915 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1916 a message type enum to distinguish kinds of message
1917 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1918 that need not be replied to
1920 2003-08-01 Havoc Pennington <hp@pobox.com>
1922 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1923 (unpack_8_octets): fix no-64-bit-int bug
1925 * dbus/dbus-object-registry.c (validate_id): validate the
1926 connection ID bits, not just the instance ID.
1928 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1929 the connection-global 33 bits of the object ID
1931 * dbus/dbus-object-registry.c (info_from_entry): fill in
1932 object ID in the new way
1934 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1935 define server/client/instance bits.
1937 2003-07-30 Havoc Pennington <hp@pobox.com>
1939 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1942 2003-07-13 Havoc Pennington <hp@pobox.com>
1944 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1945 fields to DBusObjectVTable and DBusObjectInfo
1947 2003-07-12 Havoc Pennington <hp@pobox.com>
1949 * dbus/dbus-object-registry.c: implement unit test,
1950 fix bugs discovered in process
1952 * dbus/dbus-connection.c: remove handler_table and
1953 register_handler(), add DBusObjectRegistry usage
1955 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1956 (dbus_object_id_set_null): new functions
1958 2003-07-08 Havoc Pennington <hp@pobox.com>
1960 * dbus/dbus-object.c: implement some of this
1962 * dbus/dbus-object-registry.c
1963 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1965 (_dbus_object_registry_new): handle OOM
1967 2003-07-08 Havoc Pennington <hp@pobox.com>
1969 * dbus/dbus-object.h: sketch out an API for registering objects
1970 with a connection, that allows us to use as little as 24 bytes
1971 per object and lets application code represent an object in
1972 any conceivable way.
1974 * dbus/dbus-object-registry.c: implement the hard bits of the
1975 DBusConnection aspect of object API. Not yet wired up.
1977 2003-07-06 Havoc Pennington <hp@pobox.com>
1979 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1980 (_dbus_marshal_object_id): new
1981 (_dbus_demarshal_object_id): new
1982 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1983 consolidate identical switch cases. Don't conditionalize handling
1984 of DBUS_TYPE_UINT64, need to handle the type always.
1985 (_dbus_marshal_validate_arg): consolidate identical cases, and
1986 handle DBUS_TYPE_OBJECT_ID
1988 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1990 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1992 2003-09-28 Havoc Pennington <hp@pobox.com>
1996 2003-09-28 Havoc Pennington <hp@pobox.com>
1998 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1999 to work with Debian db2html
2001 2003-09-28 Havoc Pennington <hp@pobox.com>
2003 * configure.in: 0.13
2005 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2006 stylesheet-images for benefit of Debian
2008 Change back to using filesystem-linked sockets for the system
2009 bus, so only root can create the default system bus address.
2011 * bus/system.conf.in: change to use
2012 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2014 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2017 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2018 here, and AC_DEFINE DBUS_SYSTEM_PATH
2020 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2023 * doc/busconfig.dtd:
2026 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2028 * doc/dbus-specification.sgml:
2029 Add activation reply values.
2031 2003-08-05 Havoc Pennington <hp@redhat.com>
2033 * configure.in: 0.12
2035 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2037 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2038 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2039 (add_watch), (remove_watch), (create_source):
2040 Refcount fds, fixes some reentrancy issues.
2042 2003-07-30 Havoc Pennington <hp@redhat.com>
2044 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2045 bus address to be abstract if we have abstract sockets
2049 2003-07-28 Havoc Pennington <hp@redhat.com>
2051 * bus/messagebus.in: fix to avoid processname/servicename
2052 confusion, from Michael Kearey
2053 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2055 2003-07-23 Havoc Pennington <hp@pobox.com>
2057 * dbus/dbus-message.c (dbus_message_iter_get_named):
2058 fix from Andy Hanton to remove broken "+1"
2060 2003-07-16 Havoc Pennington <hp@pobox.com>
2062 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2063 babysitter process, as suggested by Thomas Leonard, so
2064 an "eval `dbus-launch --exit-with-session`" will actually
2067 2003-07-16 Havoc Pennington <hp@pobox.com>
2069 * configure.in: print out EXPANDED_* variables in the summary at
2070 the end; clean up the code that computes EXPANDED_ variables and
2071 get the ones using exec_prefix right. Should make things work
2072 when you build without --prefix
2074 2003-06-29 Havoc Pennington <hp@pobox.com>
2076 * mono/Test.cs (class Test): fire up a main loop and run it
2078 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2079 done once, the app has to do it
2081 2003-06-26 Havoc Pennington <hp@pobox.com>
2083 * mono/Connection.cs: set up connection with the glib main loop
2085 2003-07-01 Havoc Pennington <hp@redhat.com>
2087 * doc/dbus-specification.sgml: clarify the format of a type code,
2088 change suggested by Jim Blandy
2090 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2093 * tools/Makefile.am: Don't assume srcdir == builddir.
2095 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2096 the allocated block.
2097 (_dbus_memory_test): New function.
2098 * dbus/dbus-test.h: Add _dbus_memory_test ().
2099 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2101 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2103 (dbus_message_new): Remove obsolete @todo.
2105 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2106 (_dbus_marshal_set_uint64): Fix comment.
2108 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2109 hardcode FIELD_REPLY_SERIAL.
2111 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2112 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2114 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2115 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2117 2003-06-24 Havoc Pennington <hp@pobox.com>
2119 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2121 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2127 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2128 * gcj/org/.cvsignore:
2129 * gcj/org/Makefile.am:
2130 * gcj/org/freedesktop/.cvsignore:
2131 * gcj/org/freedesktop/Makefile.am:
2132 * gcj/org/freedesktop/dbus/.cvsignore:
2133 * gcj/org/freedesktop/dbus/Makefile.am:
2134 * gcj/org/freedesktop/dbus/Message.java: (Message),
2136 * gcj/org/freedesktop/dbus/natMessage.cc:
2137 Fix the build system.
2139 2003-06-22 Havoc Pennington <hp@pobox.com>
2141 * mono/Connection.cs: add more bindings
2143 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2146 2003-06-22 Havoc Pennington <hp@pobox.com>
2148 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2149 Start wrapping more stuff.
2151 2003-06-22 Havoc Pennington <hp@pobox.com>
2153 * mono/Message.cs: implement Message.Wrap() that ensures we only
2154 have a single C# wrapper per DBusMessage, assuming it works which
2155 it probably doesn't.
2157 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2158 (dbus_message_free_data_slot): new
2159 (dbus_message_set_data): new
2160 (dbus_message_get_data): new
2162 2003-06-22 Havoc Pennington <hp@pobox.com>
2164 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2165 (_dbus_data_slot_allocator_alloc): rework these to keep a
2166 reference count on each slot and automatically manage a global
2167 slot ID variable passed in by address
2169 * bus/bus.c: convert to new dataslot API
2171 * dbus/dbus-bus.c: convert to new dataslot API
2173 * dbus/dbus-connection.c: convert to new dataslot API
2175 * dbus/dbus-server.c: convert to new dataslot API
2177 * glib/dbus-gmain.c: ditto
2181 * bus/connection.c: ditto
2183 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2185 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2186 after the gcj checks so that the correct configuration tags
2187 will be added to libtool.
2189 * dbus-glib-1.pc.in: No need to specify any includes since
2190 dbus-1.pc.in has those.
2192 2003-06-22 Havoc Pennington <hp@pobox.com>
2194 * mono/*, gcj/*, configure.in, Makefile.am:
2195 Check in makefiles and subdirs for mono and gcj bindings.
2196 Neither binding actually exists, just trying to get through
2197 all the build and other boring bits.
2199 2003-06-21 Philip Blundell <philb@gnu.org>
2201 * tools/dbus-monitor.1: Updated.
2203 * tools/dbus-send.1: Likewise.
2205 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2207 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2208 for hangup and error after checking read so we won't discard
2209 pending data if both hangup and read are set.
2211 2003-06-19 Philip Blundell <philb@gnu.org>
2213 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2215 * tools/dbus-send.c: Accept both --system and --session.
2217 * tools/dbus-monitor.c: Same here.
2219 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2221 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2222 from C++ (Patch by Miloslav Trmac).
2224 2003-06-15 Joe Shaw <joe@assbarn.com>
2226 * configure.in: Check for socklen_t.
2228 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2230 * test/test-segfault.c: Add #include <sys/time.h>
2232 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2233 dbus-launch needs it.
2235 2003-06-09 Havoc Pennington <hp@redhat.com>
2237 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2238 SUN_LEN, it breaks abstract socket usage
2240 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2243 2003-06-04 Havoc Pennington <hp@pobox.com>
2245 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2246 using unix:abstract=/foo, and when listening in a tmpdir
2247 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2249 * dbus/dbus-transport.c (_dbus_transport_open): support
2252 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2253 support abstract sockets
2255 * dbus/dbus-transport-unix.c
2256 (_dbus_transport_new_for_domain_socket): support abstract sockets
2258 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2259 toggle as an argument, implement abstract namespace support
2260 (_dbus_listen_unix_socket): ditto
2262 * configure.in: add --enable-abstract-sockets and implement
2263 a configure check for autodetection of the right value.
2265 2003-06-01 Havoc Pennington <hp@pobox.com>
2267 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2268 in /tmp (though on Linux this will end up being useless,
2269 when we add abstract namespace support)
2271 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2274 2003-05-28 Colin Walters <walters@verbum.org>
2276 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2278 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2280 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2282 2003-05-17 Colin Walters <walters@gnu.org>
2284 * tools/dbus-send.c: Don't exit with an error code if --help was
2285 passed. Default to using the session bus instead of the system
2288 * tools/dbus-launch.c: Ditto.
2290 * tools/dbus-monitor.c: Ditto.
2292 * tools/dbus-send.1: Update with new arguments.
2294 * tools/dbus-launch.c: Emit code to export variables. New
2295 arguments -s and -c to specify shell syntax, and a bit of code to
2296 autodetect syntax. Also, allow specifying a program to run.
2298 * tools/dbus-launch.1: Update with new arguments.
2300 * tools/dbus-send.1: Ditto.
2302 * tools/dbus-monitor.1: Ditto.
2304 2003-05-17 Havoc Pennington <hp@pobox.com>
2306 * bus/config-parser.c (merge_included): merge in policies from
2307 child configuration file.
2309 * bus/policy.c (bus_policy_merge): function to merge two policies
2312 2003-05-16 Havoc Pennington <hp@redhat.com>
2314 * dbus/dbus-connection.c: disable verbose lock spew
2316 * tools/dbus-send.c: add --print-reply command line option
2318 * tools/dbus-print-message.h (print_message): new util function
2319 shared by dbus-send and dbus-monitor
2321 * tools/dbus-monitor.c (handler_func): exit on disconnect
2323 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2324 disconnected, don't try to use the read_watch
2326 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2327 so we can find this bug more easily
2329 2003-05-16 Havoc Pennington <hp@redhat.com>
2331 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2332 NULL as DBusHashTable is annoyingly likely to do.
2334 2003-05-16 Colin Walters <walters@verbum.org>
2336 * tools/dbus-monitor.c: Add --session argument and usage()
2339 * tools/dbus-monitor.1: Update with new --session arg.
2341 * bus/Makefile.am (install-data-hook): Create
2342 $(libdir)/dbus-1.0/services so that the session bus is happy.
2344 2003-05-15 Havoc Pennington <hp@redhat.com>
2346 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2347 on non-x86. ifdef's are evil.
2349 2003-05-15 Havoc Pennington <hp@redhat.com>
2351 * configure.in: 0.11
2355 * bus/Makefile.am (initddir): apparently we are supposed to put
2356 init scripts in /etc/rc.d/init.d not /etc/init.d
2358 * bus/Makefile.am: remove the "you must --enable-tests to make
2359 check" as it broke distcheck
2361 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2363 2003-05-13 James Willcox <jwillcox@gnome.org>
2366 * bus/activation.c: (bus_activation_service_created),
2367 (bus_activation_activate_service):
2368 * bus/driver.c: (bus_driver_send_service_deleted),
2369 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2370 (bus_driver_send_service_acquired),
2371 (bus_driver_send_welcome_message),
2372 (bus_driver_handle_list_services):
2373 * bus/session.conf.in:
2374 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2375 (dbus_bus_service_exists), (dbus_bus_activate_service):
2378 Add some convenience API which lets you activate a service, and did a
2379 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2380 and dbus_message_get_args()
2382 2003-05-11 Havoc Pennington <hp@pobox.com>
2384 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2385 calling _dbus_marshal_validate_arg() for every byte in a byte
2388 * dbus/dbus-message-handler.c: use atomic reference counting to
2389 reduce number of locks slightly; the global lock in here sucks
2391 * dbus/dbus-connection.c
2392 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2393 update_dispatch_status that can be called with lock held; then use
2394 in a couple places to reduce locking/unlocking
2395 (dbus_connection_send): hold the lock over the whole function
2396 instead of acquiring it twice.
2398 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2400 * bus/connection.c (bus_connections_setup_connection): fix access
2401 to already-freed memory.
2403 * dbus/dbus-connection.c: keep a little cache of linked list
2404 nodes, to avoid using the global linked list alloc lock in the
2405 normal send-message case. Instead we just use the connection lock
2406 that we already have to take.
2408 * dbus/dbus-list.c (_dbus_list_find_last): new function
2410 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2411 change to use a struct for the atomic type; fix docs,
2412 they return value before increment, not after increment.
2414 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2415 (_dbus_string_append_8_aligned): new functions to try to
2416 microoptimize this operation.
2417 (reallocate_for_length): break this out of set_length(), to
2418 improve profile info, and also so we can consider inlining the
2421 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2422 strings with some preallocation, cuts down on our calls to realloc
2423 a fair bit. Though if we can get the "move entire string to empty
2424 string" optimization below to kick in here, it would be better.
2426 * dbus/dbus-string.c (_dbus_string_move): just call
2427 _dbus_string_move_len
2428 (_dbus_string_move_len): add a special case for moving
2429 an entire string into an empty string; we can just
2430 swap the string data instead of doing any reallocs.
2431 (_dbus_string_init_preallocated): new function
2433 2003-05-11 Havoc Pennington <hp@pobox.com>
2435 Write a "test-profile" that does echo client-server with threads;
2436 profile reveals lock contention, memcpy/realloc of buffers, and
2437 UTF-8 validation as hot spots. 20% of lock contention eliminated
2438 with dbus_atomic_inc/dec implementation on x86. Much remaining
2439 contention is global mempool locks for GList and DBusList.
2441 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2444 * dbus/dbus-connection.c (struct DBusConnection): use
2445 dbus_atomic_t for the reference count
2447 * dbus/dbus-message.c (struct DBusMessage): declare
2448 dbus_atomic_t values as volatile
2450 * configure.in: code to detect ability to use atomic integer
2451 operations in assembly, from GLib patch
2453 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2454 time, tired of it being wrong in threads and forked processes
2456 * glib/test-profile.c: a little program to bounce messages back
2457 and forth between threads and eat CPU
2459 * dbus/dbus-connection.c: add debug spew macros for debugging
2460 thread locks; include config.h at top; fix deadlock in
2461 dbus_connection_flush()
2463 2003-05-08 Havoc Pennington <hp@pobox.com>
2465 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2466 data from getting written, and there wasn't a good reason to
2469 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2470 dbus_verbose lines in test coverage
2471 (main): add list of functions sorted by # of untested blocks
2472 to the coverage report
2474 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2476 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2478 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2479 extend test coverage
2481 * test/data/auth/cancel.auth-script: test canceling an
2484 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2485 aren't used. in CVS history if we end up needing them.
2487 2003-05-04 Havoc Pennington <hp@pobox.com>
2489 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2492 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2493 function, which assumed length was in # of strings, not bytes
2495 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2498 * dbus/dbus-connection.c
2499 (_dbus_connection_queue_received_message): disable function for
2500 now, we are only using it in test mode
2502 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2503 remove a mistaken FIXME
2505 2003-05-04 Havoc Pennington <hp@pobox.com>
2507 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2508 unlock mutex on successful return, patch from Anders Gustafsson
2510 2003-05-04 Havoc Pennington <hp@pobox.com>
2512 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2515 2003-05-04 Havoc Pennington <hp@pobox.com>
2517 * tools/dbus-launch.c: implement
2519 * bus/main.c (main), bus/bus.c (bus_context_new):
2520 implement --print-pid and --fork
2522 2003-05-03 Havoc Pennington <hp@redhat.com>
2524 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2525 the address had no value, and add to test suite. Fix and
2526 regression test from Miloslav Trmac
2528 2003-05-03 Havoc Pennington <hp@pobox.com>
2530 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2531 watch is invalid when handled
2533 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2534 dbus-launch utility to launch the bus from a shell script. Didn't
2535 actually implement dbus-launch yet, it's just a placeholder still.
2537 2003-05-03 Havoc Pennington <hp@pobox.com>
2539 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2540 daemon; also documents daemon config file, so replaces
2541 doc/config-file.txt. Corrected some stuff from config-file.txt in
2542 the process of moving it.
2544 2003-05-03 Havoc Pennington <hp@pobox.com>
2546 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2549 2003-05-03 Colin Walters <walters@verbum.org>
2551 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2552 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2554 * Makefile.am: Update to use new .pc versioning scheme.
2556 2003-05-02 Havoc Pennington <hp@redhat.com>
2558 * bus/system.conf.in: allow send/receive to/from message bus
2561 2003-04-30 Havoc Pennington <hp@redhat.com>
2563 * configure.in: print a note when building with unit tests and
2566 2003-04-30 Havoc Pennington <hp@redhat.com>
2568 * Makefile.am: add a check-local that complains if you didn't
2569 configure with --enable-tests
2571 2003-04-29 Havoc Pennington <hp@redhat.com>
2573 * glib/dbus-gmain.c: docs cleanups
2575 * dbus/dbus-types.h: add docs on int64 types
2577 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2578 public API docs section
2580 2003-04-29 Havoc Pennington <hp@redhat.com>
2582 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2583 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2584 parallel install API version, not with the D-BUS package version.
2586 * HACKING: move some of README over here
2588 * README: updates, and document API/ABI policy
2590 * configure.in: reindentation
2592 2003-04-29 Havoc Pennington <hp@redhat.com>
2594 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2595 to use this library" to be sure people have the right
2598 2003-04-28 Havoc Pennington <hp@redhat.com>
2600 * configure.in: add --enable-docs which by default is auto yes if
2601 doxygen and db2html found, no otherwise; but can be forced on/off
2603 * doc/Makefile.am: conditionalize whether to build docs on
2606 2003-04-28 Havoc Pennington <hp@redhat.com>
2608 * configure.in: 0.10
2612 * bus/system.conf.in: add <includedir>system.d</includedir>
2614 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2615 username was provided but not uid
2617 * bus/config-parser.c (struct BusConfigParser): keep track of
2618 whether the parser is toplevel or was included; change some
2619 of the error handling if it's included.
2621 2003-04-27 Havoc Pennington <hp@pobox.com>
2625 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2626 report correct status if we finish processing authentication
2627 inside this function.
2629 * bus/activation.c (try_send_activation_failure): use
2630 bus_transaction_send_error_reply
2632 * bus/connection.c (bus_connection_get_groups): return an error
2633 explaining the problem
2635 * bus/bus.c (bus_context_check_security_policy): implement
2636 restriction here that inactive connections can only send the
2637 hello message. Also, allow bus driver to send anything to
2640 * bus/connection.c (bus_connection_complete): create the
2641 BusClientPolicy here instead of on-demand.
2642 (bus_connection_get_policy): don't return an error
2644 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2645 sender field in message being replied to
2647 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2648 causing it to return FALSE always
2650 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2651 we checked sender rather than destination
2653 2003-04-25 Havoc Pennington <hp@redhat.com>
2655 test suite is slightly hosed at the moment, will fix soon
2657 * bus/connection.c (bus_connections_expire_incomplete): fix to
2658 properly disable the timeout when required
2659 (bus_connection_set_name): check whether we can remove incomplete
2660 connections timeout after we complete each connection.
2662 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2663 probably still broken.
2665 * bus/services.c (bus_registry_acquire_service): implement max
2666 number of services owned, and honor allow/deny rules on which
2667 services a connection can own.
2669 * bus/connection.c (bus_connection_get_policy): report errors here
2671 * bus/activation.c: implement limit on number of pending
2674 2003-04-25 Havoc Pennington <hp@redhat.com>
2676 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2677 where we used >= 0 instead of != DBUS_UID_UNSET.
2679 2003-04-25 Havoc Pennington <hp@redhat.com>
2681 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2682 were toggled without add/remove, fix from Anders Gustafsson
2684 2003-04-24 Havoc Pennington <hp@redhat.com>
2686 * test/data/valid-config-files/basic.conf: add <limit> tags to
2689 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2690 <limit> tag in configuration file.
2692 2003-04-24 Havoc Pennington <hp@redhat.com>
2694 * bus/dispatch.c: somehow missed some name_is
2696 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2697 (_dbus_timeout_set_interval): new
2699 * bus/connection.c (bus_connections_setup_connection): record time
2700 when each connection is first set up, and expire them after the
2701 auth timeout passes.
2703 2003-04-24 Havoc Pennington <hp@redhat.com>
2705 * dbus/dbus-message.c (dbus_message_name_is): rename
2706 (dbus_message_service_is): rename
2707 (dbus_message_sender_is): rename
2708 (dbus_message_get_service): rename
2710 2003-04-24 Havoc Pennington <hp@redhat.com>
2712 * configure.in: add --enable-checks
2714 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2716 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2717 to use thread locks.
2718 (_dbus_connection_handler_destroyed_locked): move some private
2719 functions into proper docs group
2721 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2722 _dbus_return_val_if_fail
2724 Throughout: use dbus_return_if_fail
2726 2003-04-23 James Willcox <jwillcox@gnome.org>
2729 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2730 (dbus_connection_setup_with_g_main),
2731 (dbus_server_setup_with_g_main):
2732 * glib/test-dbus-glib.c: (main):
2733 * glib/test-thread-client.c: (main):
2734 * glib/test-thread-server.c: (new_connection_callback), (main):
2735 * tools/dbus-monitor.c: (main):
2737 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2738 and dbus_server_setup_with_g_main().
2740 2003-04-20 Havoc Pennington <hp@pobox.com>
2742 * doc/dbus-specification.sgml: document the restrictions on
2743 message and service names
2745 2003-04-22 Havoc Pennington <hp@redhat.com>
2747 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2748 support, and do some code cleanups to share more code and
2749 speed up array marshal/demarshal.
2751 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2753 * configure.in: generate dbus-arch-deps.h
2755 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2758 2003-04-22 Havoc Pennington <hp@redhat.com>
2760 * test/data/valid-messages/opposite-endian.message: fix test
2761 to use proper type for rply field
2763 * test/data/invalid-messages: add tests for below validation
2765 * dbus/dbus-message.c (decode_header_data): validate field types,
2766 and validate that named fields are valid names
2767 (decode_name_field): consider messages in the
2768 org.freedesktop.Local. namespace to be invalid.
2770 * dbus/dbus-string.c (_dbus_string_validate_name): new
2772 2003-04-19 Havoc Pennington <hp@pobox.com>
2774 * bus/driver.c (bus_driver_handle_hello): check limits and
2775 return an error if they are exceeded.
2777 * bus/connection.c: maintain separate lists of active and inactive
2778 connections, and a count of each. Maintain count of completed
2779 connections per user. Implement code to check connection limits.
2781 * dbus/dbus-list.c (_dbus_list_unlink): export
2783 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2784 number of bytes in the message queue for a connection
2786 2003-04-18 Havoc Pennington <hp@pobox.com>
2788 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2790 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2793 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2794 on realloc be sure to update the pointer in the keyring
2796 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2797 offset to avoid writing to unallocated memory
2799 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2800 try the next mechanism, so we properly handle OOM
2802 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2804 (_dbus_keyring_new): fix OOM bug
2805 (_dbus_keyring_new_homedir): always set error; impose a maximum
2806 number of keys we'll load from the file, mostly to speed up the
2807 test suite and make its OOM checks more useful, but also for
2810 * dbus/dbus-auth.c (process_error_server): reject authentication
2811 if we get an error from the client
2812 (process_cancel): on cancel, send REJECTED, per the spec
2813 (process_error_client): send CANCEL if we get an error from the
2816 2003-04-18 Havoc Pennington <hp@pobox.com>
2818 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2821 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2824 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2825 about DBUS_TEST_HOMEDIR once
2827 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2830 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2831 config file so we test the right thing
2833 Throughout: assorted docs improvements
2835 2003-04-18 Havoc Pennington <hp@pobox.com>
2837 * glib/dbus-gmain.c: adapt to watch changes
2839 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2841 * dbus/dbus-server.h: remove dbus_server_handle_watch
2843 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2845 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2846 like DBusTimeout, so we don't need dbus_connection_handle_watch
2849 2003-04-17 Havoc Pennington <hp@redhat.com>
2851 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2852 database usage so it all goes via the DBusUserDatabase cache.
2854 2003-04-17 Havoc Pennington <hp@redhat.com>
2856 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2857 there was an OOM watch we skipped, we always return TRUE so we
2858 iterate again to have a look at it again. Fixes test suite hang.
2859 Code rearrangement also lets us lose some memset and only iterate
2860 over callbacks once.
2862 * bus/driver.c (bus_driver_handle_message): sense of test for
2865 2003-04-16 Havoc Pennington <hp@pobox.com>
2867 * doc/dbus-specification.sgml: make spec say serials are unsigned
2869 * dbus/dbus-message.h: change message serials to unsigned
2871 * dbus/dbus-connection.c: adapt to message serials being unsigned
2873 2003-04-15 Havoc Pennington <hp@pobox.com>
2875 * bus/bus.c: create and keep around a shared DBusUserDatabase
2878 * bus/connection.c (bus_connection_get_groups): don't cache
2879 groups for user in the connection object, since user database
2880 object now does that.
2882 2003-04-16 Havoc Pennington <hp@redhat.com>
2884 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2885 list of size counters
2886 (_dbus_message_loader_putback_message_link): put back a popped link
2888 * dbus/dbus-connection.c
2889 (dbus_connection_set_max_live_messages_size): rename
2891 (dbus_connection_get_outgoing_size): get size of outgoing
2893 (_dbus_connection_set_connection_counter): remove this cruft
2895 2003-04-14 Havoc Pennington <hp@redhat.com>
2897 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2898 caching, but at some point we might want to be able to use a
2901 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2902 SHA1 conf file to test the sha1 auth mechanism, since the regular
2903 test always uses EXTERNAL when available.
2906 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2907 add conf file that requires use of sha1 auth
2909 2003-04-13 Havoc Pennington <hp@pobox.com>
2911 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2912 from Philip Blundell to send messages and monitor them.
2914 2003-04-13 Havoc Pennington <hp@pobox.com>
2916 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2919 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2922 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2923 fix to only recover unused bytes if we're already authenticated
2924 (_dbus_transport_get_is_authenticated): fix to still mark us
2925 authenticated if there are unused bytes.
2927 * bus/dispatch.c: implement security policy checking
2929 * bus/connection.c (bus_transaction_send_from_driver): new
2931 * bus/bus.c (bus_context_check_security_policy): new
2933 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2934 now we just set the DBusError and it gets converted to an error
2937 * bus/connection.c (allow_user_function): enable code using actual
2938 data from the config file
2940 * bus/policy.c (list_allows_user): handle wildcard rules for
2941 user/group connection perms
2943 2003-04-13 Havoc Pennington <hp@pobox.com>
2945 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2947 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2949 * bus/policy.c (bus_policy_append_mandatory_rule)
2950 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2951 (bus_policy_append_group_rule): new functions
2953 2003-04-12 Havoc Pennington <hp@pobox.com>
2955 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2957 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2958 the pid/gid/uid, just for paranoia.
2960 * test/break-loader.c (randomly_do_n_things): find a byte
2961 containing a type code, and randomly change it to a different
2964 2003-04-12 Havoc Pennington <hp@pobox.com>
2966 * bus/policy.h: change BusPolicy to be the thing from the config
2967 file, and rename old BusPolicy to BusClientPolicy
2969 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2970 match change in how policy works
2972 * dbus/dbus-internals.h: mark assert_not_reached as
2973 __attribute((noreturn))__
2975 2003-04-11 Havoc Pennington <hp@redhat.com>
2977 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2978 the broadcast service. Use boolean return for ServiceExists.
2980 2003-04-11 Havoc Pennington <hp@redhat.com>
2982 * configure.in: add another directory to look for qt in.
2984 2003-04-11 Havoc Pennington <hp@redhat.com>
2986 * AUTHORS: add Colin Walters
2988 2003-04-11 Havoc Pennington <hp@redhat.com>
2994 2003-04-11 Havoc Pennington <hp@redhat.com>
2996 * bus/messagebus.in: remove pid file when stopping the
2997 message bus, since the bus won't have privileges to remove it
3000 2003-04-11 Havoc Pennington <hp@redhat.com>
3002 * bus/bus.c (bus_context_new): move credentials change after
3005 2003-04-11 Havoc Pennington <hp@pobox.com>
3007 * test/decode-gcov.c: add "below average functions" to the
3008 coverage report, and change how some of the code works.
3010 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3011 not in the coverage stats.
3013 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3014 couple places so running the test suite doesn't result in megaspam.
3016 2003-04-11 Havoc Pennington <hp@pobox.com>
3018 * bus/dispatch.c (check_existent_service_activation): accept a no
3019 memory error in a place we didn't before
3021 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3022 in case the first one failed," since the test suite is less
3025 2003-04-10 Havoc Pennington <hp@pobox.com>
3027 * bus/dispatch.c (check_segfault_service_activation): add test
3028 for launching an executable that just crashes.
3030 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3031 don't leave a million cores. We'll see how portable this is.
3033 2003-04-10 Havoc Pennington <hp@pobox.com>
3035 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3036 the possible parent failures before we fork, so that we don't
3037 fail to create a babysitter after creating the child.
3039 * bus/activation.c (bus_activation_activate_service): kill child
3040 if we don't successfully complete the activation.
3042 2003-04-10 Havoc Pennington <hp@redhat.com>
3044 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3045 the connection if it's disconnected
3047 * bus/activation.c (bus_activation_service_created): use new
3048 transaction features to roll back removal of pending activation if
3049 we don't successfully create the service after all. Don't remove
3050 pending activation if the function fails.
3052 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3053 (_dbus_list_insert_after_link): new code to facilitate
3056 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3057 new functionality, so we can preallocate the ability to insert
3060 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3061 allowing us to put custom hooks in a transaction to be used for
3062 cancelling said transaction
3064 * doc/dbus-specification.sgml: add some discussion of secondary
3065 service owners, and disallow zero-length service names
3067 * bus/services.c (bus_registry_acquire_service): new function,
3068 splits out part of bus_driver_handle_acquire_service() and fixes
3069 a bug where we didn't remove the service doing the acquiring
3070 from the secondary queue if we failed to remove the current owner
3071 from the front of the queue.
3073 2003-04-10 Alexander Larsson <alexl@redhat.com>
3075 * doc/dbus-specification.sgml:
3076 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3078 2003-04-10 Alexander Larsson <alexl@redhat.com>
3083 Added files to cvsignore
3085 * dbus/dbus-message.h:
3086 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3087 Make get_named() take two out argument and return a boolean.
3088 (dbus_message_iter_get_args_valist):
3089 Update usage of get_named().
3090 (dbus_message_iter_append_byte):
3092 (dbus_message_iter_append_named)
3094 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3097 2003-04-10 Alexander Larsson <alexl@redhat.com>
3099 * dbus/dbus-marshal.[ch]:
3100 Add array_type_pos argument to _dbus_marshal_validate_arg.
3101 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3103 * dbus/dbus-message.[ch]:
3104 Multi-dimensional arrays have full type specification in the
3105 outermost array. Iter code re-arranged to handle this.
3106 Added some more iter tests.
3108 * doc/dbus-specification.sgml:
3111 Update new array encoding description.
3112 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3114 * test/data/invalid-messages/array-with-mixed-types.message:
3115 * test/data/valid-messages/array-of-array-of-uint32.message:
3116 Change to the new array format.
3118 * test/data/invalid-messages/too-short-dict.message:
3121 * test/data/valid-messages/recursive-types.message:
3122 Fix up and extend test.
3124 2003-04-10 Havoc Pennington <hp@pobox.com>
3126 * bus/dispatch.c: lots of fixes
3128 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3129 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3130 that was crack, broke the test service.
3132 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3133 handling to avoid piling up errors if we get a failure on the
3136 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3137 pid in assertion failures.
3139 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3140 to some fixed size of file descriptor array. Don't return TRUE
3141 anytime a timeout exists, that led to lots of busy loop silliness
3144 2003-04-09 Havoc Pennington <hp@redhat.com>
3146 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3147 I'd checked this in earlier but hadn't.
3149 2003-04-09 Havoc Pennington <hp@redhat.com>
3151 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3152 the activation test (man this is getting old!)
3154 2003-04-09 Havoc Pennington <hp@redhat.com>
3156 * test/test-utils.c: use dispatch status function to fix this up
3158 * bus/connection.c (connection_watch_callback): don't dispatch
3160 (connection_timeout_callback): don't dispatch from here
3161 (bus_connections_setup_connection): set the dispatch status function
3162 (bus_connection_disconnected): unset it
3164 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3165 used to add a connection to be dispatched
3166 (_dbus_loop_iterate): do the dispatching at the end of each
3169 * dbus/dbus-connection.c
3170 (dbus_connection_set_dispatch_status_function): new function
3171 allowing us to fix up main loop usage
3172 (_dbus_connection_last_unref): free all the various function
3174 (dbus_connection_dispatch): call the DispatchStatusFunction
3175 whenever this function returns
3176 (dbus_connection_handle_watch): call DispatchStatusFunction
3177 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3178 (reply_handler_timeout): call DispatchStatusFunction
3179 (dbus_connection_flush): call DispatchStatusFunction
3181 2003-04-09 Havoc Pennington <hp@redhat.com>
3183 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3186 * bus/dispatch.c (check_service_activated): fix bug in test
3188 * dbus/dbus-mainloop.c (check_timeout): fix this up
3190 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3191 verbose output so we can sort out output from different processes,
3192 e.g. in the activation case.
3194 2003-04-08 Colin Walters <walters@gnu.org>
3196 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3198 (bus_context_new): Set it.
3199 (bus_context_unref): Use it to delete the pid file.
3201 2003-04-08 Havoc Pennington <hp@redhat.com>
3203 * test/data/invalid-messages/array-with-mixed-types.message:
3204 regression test that fails for the moment
3206 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3207 tests for convenience
3209 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3210 array of nil, it broke things.
3212 * test/data/invalid-messages/array-of-nil.message: regression test
3214 * test/data/valid-messages/array-of-array-of-uint32.message:
3215 happened to write this so added it to suite
3217 2003-04-08 Havoc Pennington <hp@redhat.com>
3219 * bus/driver.c (bus_driver_handle_acquire_service): init
3220 retval/reply before checking name
3222 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3223 recursion depth argument
3225 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3226 in the public struct for future extension
3228 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3231 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3234 * doc/dbus-specification.sgml: fix typo
3236 2003-04-08 Alexander Larsson <alexl@redhat.com>
3238 Implemented recursive types, named types and new-style iters
3241 * glib/test-thread-client.c: (thread_func):
3242 * glib/test-thread-server.c: (handle_test_message):
3243 * test/test-service.c: (handle_echo):
3252 * dbus/dbus-internals.c: (_dbus_type_to_string):
3253 Update for new types.
3255 * dbus/dbus-marshal.[ch]:
3256 Implement recursive types and the new marshalling format.
3257 Remove hardcoded dict marshalling.
3258 Marshal named types.
3260 * dbus/dbus-message-builder.c:
3262 Remove references to old types
3264 * dbus/dbus-message.[ch]:
3265 New non-refcounted iter API that supports recursive iters.
3266 Use iters for appending, including support for recursive
3268 Add byte and named type support.
3269 Update everything to new marshalling formats.
3270 Add tests for new API.
3272 * dbus/dbus-protocol.h:
3273 Remove old array types.
3274 Add types: BYTE, ARRAY, DICT, NAMED
3276 * dbus/dbus-string.c:
3277 * dbus/dbus-sysdeps.c:
3278 Make parse_double locale safe.
3280 * dbus/dbus-test-main.c:
3286 * doc/dbus-specification.sgml:
3289 * test/data/incomplete-messages/missing-body.message:
3290 * test/data/invalid-messages/bad-boolean.message:
3291 * test/data/invalid-messages/bad-boolean-array.message:
3292 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3293 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3294 * test/data/invalid-messages/too-short-dict.message:
3295 * test/data/valid-messages/dict-simple.message:
3296 * test/data/valid-messages/dict.message:
3297 * test/data/valid-messages/emptiness.message:
3298 * test/data/valid-messages/lots-of-arguments.message:
3299 * test/data/valid-messages/no-padding.message:
3300 * test/data/valid-messages/recursive-types.message:
3301 Add missing NAME fields
3302 Fix up dicts & arrays
3304 * test/data/invalid-messages/dict-with-nil-value.message:
3305 Removed, this is not invalid anymore.
3307 * test/data/valid-messages/recursive-types.message:
3308 Add new test for deeply recursive types.
3310 2003-04-07 Havoc Pennington <hp@pobox.com>
3312 * bus/driver.c (bus_driver_handle_acquire_service): return an
3313 error if you try to acquire a service that starts with ':'
3315 2003-04-07 Havoc Pennington <hp@redhat.com>
3317 * doc/dbus-specification.sgml: require that base service names
3318 start with ':' and that the base service is created/deleted
3319 as first and last things a connection does on the bus
3321 * bus/dispatch.c (check_existent_service_activation): lots more
3322 work on the activation test; it doesn't fully pass yet...
3324 * test/test-service.c (main): fix so we don't memleak the
3325 connection to the message bus
3326 (filter_func): accept a message asking us to exit
3328 2003-04-06 Havoc Pennington <hp@pobox.com>
3330 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3333 * configure.in: fixes to Qt detection from Colin Walters
3335 * doc/Makefile.am: Only remove generated docbook dirs if they
3336 exist, from Colin Walters
3338 * dbus/dbus-bus.c: change how we set well-known connections to
3339 NULL, so that it works if a single connection is stored in
3340 two well-known array slots.
3342 * test/Makefile.am: remove a lot of stuff that isn't immediately
3343 useful, it's in CVS history if we want it.
3345 * test/test-service.c: use dbus-mainloop instead of that
3348 2003-04-06 Havoc Pennington <hp@pobox.com>
3350 * dbus/Makefile.am: split lists of sources into stuff that goes in
3351 the library, util functions that go in the lib and are also used
3352 elsewhere, and util functions that are used in tests/daemon but
3353 don't go in the lib.
3355 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3356 here so it can be used in test binaries also
3358 2003-04-06 Havoc Pennington <hp@pobox.com>
3360 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3361 here in the parent process, so we can return an error if it
3362 fails. Also, move some of the code into the child so the parent
3363 is less hosed if we fail midway through.
3365 * bus/bus.c (bus_context_new): move pidfile detection further up
3366 in the function, before we start overwriting sockets and such.
3368 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3370 * configure.in: add --with-system-pid-file and --with-system-socket
3372 2003-04-06 Colin Walters <walters@verbum.org>
3374 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3376 * bus/system.conf.in: Declare a pidfile.
3378 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3379 create one (if appropriate).
3381 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3382 (struct BusConfigParser) [pidfile]: New.
3383 (element_type_to_name, merge_included, start_busconfig_child)
3384 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3385 (bus_config_parser_unref): Free it.
3386 (bus_config_parser_get_pidfile): New function.
3388 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3390 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3392 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3394 * dbus/dbus-sysdeps.h: Prototype it.
3396 2003-04-06 Havoc Pennington <hp@pobox.com>
3398 * bus/bus.c (bus_context_new): print the address in here, rather
3399 than in main(), because we need to do it before forking the daemon
3401 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3402 on the service nonexistent error
3404 * bus/driver.c (bus_driver_handle_acquire_service): set the
3405 sender on the AcquireService reply
3407 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3408 server also listen on a UNIX socket so services can connect to it.
3410 2003-04-06 Havoc Pennington <hp@pobox.com>
3412 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3413 so it detects deadlocks and also we actually init threads when
3416 2003-04-06 Havoc Pennington <hp@pobox.com>
3418 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3419 save the domain socket name, and unlink it when we disconnect the
3420 server. Means that at least when we exit normally, we won't leave
3421 a bunch of junk in /tmp
3423 * dbus/dbus-transport-unix.c
3424 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3425 memory management). (I was making a real change here but then
3428 2003-04-06 Havoc Pennington <hp@pobox.com>
3430 * bus/bus.c (bus_context_new): fix wrong handling of
3431 server_data_slot_unref() in the error case.
3433 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3434 "(condition) != 0" to _dbus_real_assert so that
3435 "_dbus_assert (pointer)" doesn't cause a warning
3437 * bus/main.c (main): accept --print-address option to print out
3438 the message bus address
3440 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3442 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3443 "tmpdir" option to unix: address on client side
3445 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3448 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3449 we can use to create sockets in the test suite.
3451 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3452 cleanly. To be used for testing.
3454 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3456 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3458 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3459 handle trying to call this when there's no servers active
3461 2003-04-05 Havoc Pennington <hp@pobox.com>
3467 2003-04-05 Havoc Pennington <hp@pobox.com>
3469 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3470 crash on startup. Need to get "try starting the daemon"
3471 in the test suite I guess. ;-)
3473 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3474 tracked the number of open connections; it's better done in
3475 application-specific code as you want it to span all servers etc.
3477 2003-04-05 Havoc Pennington <hp@pobox.com>
3479 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3480 patch from Colin Walters
3482 2003-04-05 Havoc Pennington <hp@pobox.com>
3484 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3485 reality; in fact multiple mechanisms are allowed.
3487 * dbus/dbus-internals.c (_dbus_real_assert)
3488 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3489 _dbus_assert_not_reached() into functions, so that they don't show
3490 up in basic block counts for test coverage, and don't use up as
3491 much disk space. Does mean slower execution speed though, so
3492 assumes --disable-asserts is the normal production case.
3494 2003-04-05 Havoc Pennington <hp@pobox.com>
3496 * test/Makefile.am (dist-hook): also dist *.in files
3502 2003-04-05 Havoc Pennington <hp@pobox.com>
3504 * dbus/dbus-string.c: docs warning
3506 * dbus/dbus-spawn.c: missing docs
3508 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3510 2003-04-05 Havoc Pennington <hp@pobox.com>
3512 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3515 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3516 to -1 once we've reaped the babysitter
3517 (_dbus_babysitter_handle_watch): do as much work as we can, not
3520 * bus/activation.c: add code using DBusBabysitter so that we
3521 handle it when a service fails to start up properly.
3522 (bus_activation_service_created): don't remove the activation
3523 entries as we go, just let them get removed when we free the pending
3524 activation. Unref reply messages after sending them.
3526 2003-04-05 Havoc Pennington <hp@pobox.com>
3528 * test/decode-gcov.c (main): print per-directory stats in the report
3530 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3532 2003-04-05 Havoc Pennington <hp@pobox.com>
3534 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3536 * test/decode-gcov.c: hack up a little program to suck data
3537 out of gcov files. Yes this is sort of silly.
3539 * configure.in: define something in config.h and do an
3540 AM_CONDITIONAL when gcov is enabled
3542 2003-04-04 Havoc Pennington <hp@redhat.com>
3544 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3545 return a "babysitter" object that is used to monitor the status of
3546 the spawned process and reap it when required.
3548 * test/test-segfault.c, test/test-exit.c,
3549 test/test-sleep-forever.c: binaries that do various lame things,
3550 used in the test suite.
3552 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3554 2003-04-03 Havoc Pennington <hp@pobox.com>
3556 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3557 in preparation for modifying it, dbus-sysdeps is getting
3560 2003-04-03 Havoc Pennington <hp@redhat.com>
3562 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3565 * bus/*.[hc]: adapt to mainloop change
3567 2003-04-03 Havoc Pennington <hp@redhat.com>
3569 * bus/activation.c (load_directory): fix up memleaks
3570 (bus_activation_entry_free): free the entry
3572 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3573 we get one from the message bus; fix memleaks.
3575 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3577 2003-04-03 Havoc Pennington <hp@pobox.com>
3579 * bus/config-parser.c (bus_config_parser_unref): free
3580 list of mechanisms, bug discovered by test suite enhancements
3581 (putting system.conf and session.conf into suite)
3583 * test/Makefile.am, test/test-service.c: add placeholder for a
3584 test service that we'll activate as part of test suite. Doesn't
3587 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3588 setting NULL value, and use system malloc not dbus_malloc()
3589 when we have unavoidable memleakage.
3591 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3592 didn't work, and support DBUS_BUS_ACTIVATION.
3594 * bus/activation.c (child_setup): pass our well-known bus type to
3597 * bus/config-parser.c: support <type> to specify well-known type
3599 * doc/dbus-specification.sgml: document the env variables to
3600 locate well-known buses and find service activator
3602 2003-04-02 Havoc Pennington <hp@redhat.com>
3604 * test/Makefile.am (all-local): add a rule to copy tests to
3605 builddir, so we can have generated tests. Use this to remove the
3606 silly hack for testing system.conf and session.conf. Will use this
3607 shortly to generate .service files pointing to test binaries.
3609 2003-04-02 Havoc Pennington <hp@redhat.com>
3611 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3612 current alloc and needed new length, not max of the doubled
3613 allocation and needed new length. Also, when building tests,
3614 don't do the double-allocation stuff, just realloc every time.
3616 2003-04-02 Havoc Pennington <hp@redhat.com>
3618 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3620 (_dbus_string_get_dirname): new
3621 (_dbus_sysdeps_test): new
3622 (_dbus_directory_open): include dirnames in error messages
3624 * bus/config-parser.c: interpret <include> and <includedir> and
3625 <servicedir> relative to config file location if the given
3626 filename is not absolute.
3628 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3630 2003-04-02 Havoc Pennington <hp@redhat.com>
3632 * bus/connection.c (bus_transaction_send_error_reply): set sender
3633 service for the error, and unref the reply on success
3635 * bus/activation.c: convert to use BusTransaction so OOM can be
3637 (bus_activation_service_created): set sender of the message
3639 2003-04-01 Havoc Pennington <hp@redhat.com>
3641 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3642 <includedir> (at least mostly)
3644 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3645 first, then the user ID
3647 2003-04-01 Havoc Pennington <hp@pobox.com>
3649 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3652 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3654 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3656 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3657 socket 0777, and unlink any existing socket.
3659 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3660 the configuration file so specifies; set up auth mechanism
3663 * bus/config-parser.c (bus_config_parser_content): add support
3664 for <fork> option and fill in code for <auth>
3666 * bus/system.conf.in: add <fork/> to default configuration,
3667 and limit auth mechanisms to EXTERNAL
3669 * doc/config-file.txt (Elements): add <fork>
3671 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3672 (_dbus_change_identity): new function
3674 2003-03-31 Havoc Pennington <hp@redhat.com>
3676 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3677 (_dbus_listen_unix_socket): fix off-by-one error in null
3678 termination spotted by Nalin
3680 2003-03-31 Havoc Pennington <hp@redhat.com>
3682 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3683 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3684 having a real home directory available.
3686 2003-03-31 Havoc Pennington <hp@redhat.com>
3688 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3690 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3692 * configure.in: add support for specifying a style of init script
3695 2003-03-31 Havoc Pennington <hp@redhat.com>
3697 Fix some annoying DBusString API and fix all affected code.
3699 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3701 (_dbus_string_get_data): change to return string instead of using
3703 (_dbus_string_get_const_data): ditto
3704 (_dbus_string_get_data_len): ditto
3705 (_dbus_string_get_const_data_len): ditto
3707 2003-03-31 Havoc Pennington <hp@redhat.com>
3709 * bus/main.c (main): fix up the command line arguments to be nicer
3711 2003-03-31 Havoc Pennington <hp@redhat.com>
3713 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3714 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3715 final location that lands in the config file
3717 * bus/config-loader-expat.c (bus_config_load): fix type of
3720 * doc/TODO: remove TODO item for dbus_bus_get()
3722 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3724 2003-03-31 Havoc Pennington <hp@pobox.com>
3726 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3727 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3728 argument since they are always client side
3730 * dbus/dbus-server.c (dbus_server_get_address): new function
3732 * bus/main.c (main): take the configuration file as an argument.
3734 * test/data/valid-config-files/debug-allow-all.conf: new file to
3735 use with dispatch.c tests for example
3737 * bus/test-main.c (main): require test data dir
3739 * bus/bus.c (bus_context_new): change this to take a
3740 configuration file name as argument
3742 * doc/config-file.txt (Elements): add <servicedir>
3744 * bus/system.conf, bus/session.conf: new files
3746 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3747 well-known socket if none set
3749 * configure.in: create system.conf and session.conf
3751 2003-03-30 Havoc Pennington <hp@pobox.com>
3753 * bus/config-parser.c: hacking
3755 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3756 to shut down, since it could cause weirdness with the DBusList
3759 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3760 link-oriented stack routines
3761 (alloc_link): free the mempool if the first alloc from it fails
3763 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3765 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3767 (_dbus_string_skip_white): new
3769 * doc/config-file.txt (Elements): add <includedir>
3771 2003-03-28 Havoc Pennington <hp@pobox.com>
3773 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3774 (_dbus_string_copy_data): new functions
3776 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3778 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3782 * dbus/dbus-memory.c:
3785 2003-03-28 Havoc Pennington <hp@pobox.com>
3787 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3788 I think it may have just been superstition. Not sure.
3790 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3791 failures that were not being handled.
3793 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3795 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3796 row that will fail on out-of-memory.
3798 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3799 function for testing out-of-memory handling.
3801 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3802 allocation functions, they do map exactly to the expat ones.
3804 2003-03-27 Havoc Pennington <hp@redhat.com>
3806 * bus/config-loader-libxml.c (bus_config_load): add another error
3809 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3812 Add note about automatic service activation.
3814 * doc/dbus-specification.sgml:
3815 Rename the specification and clarify a few things.
3817 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3820 * dbus/dbus-address.c:
3822 * dbus/dbus-marshal.c:
3823 * dbus/dbus-server-debug-pipe.c:
3824 * dbus/dbus-transport-unix.c:
3825 Fix documentation warnings.
3827 2003-03-26 Havoc Pennington <hp@pobox.com>
3829 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3830 after every test so it's quick and easy to see which leaked, and
3831 so we test multiple dbus_shutdown() calls
3833 * configure.in: change configure.in XML stuff to also support
3836 * config-loader-libxml.c: some hacking
3838 * config-loader-expat.c: some hacking
3840 * config-parser.c: some hacking, plus tests
3842 2003-03-25 Havoc Pennington <hp@redhat.com>
3844 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3846 * configure.in: add --with-xml option to specify XML library,
3847 right now only libxml is supported.
3849 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3850 nonworking code between home and work, still just stubs
3852 2003-03-24 Havoc Pennington <hp@redhat.com>
3854 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3857 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3858 NULL argument for "message" if the error is a well-known one,
3859 fill in a generic message in this case.
3861 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3864 * bus/test.c (bus_test_flush_bus): add
3866 * bus/policy.c (bus_policy_test): test code stub
3868 2003-03-24 Havoc Pennington <hp@pobox.com>
3870 * bus/connection.c (bus_connections_setup_connection): set up
3871 the "can this user connect" function, but it always returns
3872 TRUE until we have a config file parser so we can have a config
3873 file that allows connections.
3875 2003-03-23 Havoc Pennington <hp@pobox.com>
3877 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3878 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3879 the mutex, so we can check for proper memory management
3882 * dbus/dbus-dataslot.c: remove the mutex from
3883 DBusDataSlotAllocator and lock it manually when using it,
3884 to simplify fitting it into the global slots framework.
3886 * dbus/dbus-threads.c (init_static_locks): rework how we're
3887 handling global locks so they are easily shut down.
3889 * bus/policy.c (bus_policy_append_rule): fix
3891 * bus/test-main.c (main): check for memleaks
3893 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3894 test suite check for memleaks
3896 * dbus/dbus-memory.c: add support in test mode for tracking
3897 number of outstanding blocks
3899 2003-03-23 Havoc Pennington <hp@pobox.com>
3901 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3904 * dbus/dbus-hash.h: add ULONG hash keys
3906 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3907 (_dbus_get_group_id): new function
3909 2003-03-20 Havoc Pennington <hp@redhat.com>
3911 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3913 (dbus_connection_get_unix_user): new function
3915 2003-03-20 Havoc Pennington <hp@pobox.com>
3917 * bus/connection.c (bus_connection_send_oom_error): assert that
3918 message has a sender
3919 (connection_execute_transaction): ditto
3920 (bus_connection_preallocate_oom_error): fix to set the sender, and
3921 set recipient to the destination service, not the bus driver
3923 * bus/policy.c: hacking
3925 * dbus/dbus-message.c (dbus_message_service_is): new function
3926 (dbus_message_sender_is): new
3928 2003-03-19 Havoc Pennington <hp@redhat.com>
3930 * bus/policy.c: start sketching code for policy restrictions on
3931 what connections can do.
3933 2003-03-18 Havoc Pennington <hp@redhat.com>
3935 * doc/TODO: some notes on high-level todo items. Little nitpick
3936 stuff is all in @todo, so no need to add it here.
3938 * doc/config-file.txt: some notes on how config file might look
3940 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3946 2003-03-17 Havoc Pennington <hp@redhat.com>
3948 * dbus/dbus-internals.h: add gcc attributes so that
3949 our printf-style functions warn on bad arguments to
3952 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3955 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3958 2003-03-17 Havoc Pennington <hp@redhat.com>
3960 * bus/test-main.c (main): make it print something as it runs
3961 so make check doesn't look stuck
3963 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3964 from CVS, now obsolete
3966 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3968 * bus/dispatch.c: (bus_dispatch):
3969 Refetch the service name since it may have been reallocated
3970 when dbus_message_set_sender was called.
3972 * dbus/dbus-sysdeps.c: (_dbus_accept):
3973 Add address and address length variables and use them to stop
3974 valgrind from complaining.
3976 2003-03-17 Havoc Pennington <hp@pobox.com>
3978 All tests pass, no memleaks, no valgrind complaints.
3980 * bus/test.c: refcount handler_slot
3982 * bus/connection.c (bus_connections_new): refcount
3983 connection_data_slot
3985 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3986 bytes so that auth scripts pass.
3988 * bus/dispatch.c: init message_handler_slot so it gets allocated
3991 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3993 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3994 dealloc server_pipe_hash when no longer used for benefit of
3997 * dbus/dbus-auth.c (process_command): memleak fix
3999 * bus/dispatch.c (check_hello_message): memleak fix
4001 2003-03-16 Havoc Pennington <hp@pobox.com>
4003 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4005 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4007 * bus/activation.c (bus_activation_activate_service): Append
4008 the pending activation entry to the list of pending activations.
4010 2003-03-16 Havoc Pennington <hp@pobox.com>
4012 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4015 * dbus/dbus-address.c (create_entry): fix OOM handling when
4016 failing to alloc entry->method
4018 2003-03-16 Havoc Pennington <hp@pobox.com>
4020 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4023 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4024 add some missing dbus_set_result
4026 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4027 alloc the DBusMessageHandler
4029 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4030 the transport here, since we call this from the finalizer; it
4031 resulted in a double-finalize.
4033 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4034 where we tried to use transport->connection that was NULL,
4035 happened when transport was disconnected early on due to OOM
4037 * bus/*.c: adapt to handle OOM for watches/timeouts
4039 * dbus/dbus-transport-unix.c: port to handle OOM during
4042 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4043 reference to unused bytes instead of a copy
4045 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4048 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4051 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4054 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4056 * doc/dbus-specification.sgml:
4057 Document reply message for ActivateService.
4059 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4061 * bus/activation.c: (bus_pending_activation_entry_free),
4062 (bus_pending_activation_free), (bus_activation_new),
4063 (bus_activation_unref), (bus_activation_service_created),
4064 (bus_activation_activate_service):
4066 * bus/bus.c: (bus_context_new):
4067 * bus/desktop-file.c: (new_section):
4068 * bus/driver.c: (bus_driver_send_service_deleted),
4069 (bus_driver_handle_activate_service):
4070 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4072 * dbus/dbus-connection.c:
4073 (dbus_connection_send_with_reply_and_block):
4074 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4075 * dbus/dbus-protocol.h:
4076 Make activation work better. Now pending activations will be queued
4077 and the daemon won't try to activate services that are already registered.
4079 2003-03-16 Havoc Pennington <hp@pobox.com>
4081 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4084 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4085 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4087 2003-03-16 Havoc Pennington <hp@pobox.com>
4089 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4090 this. always run the test suite before commit...
4092 * bus/*: adapt to DBusConnection API changes
4094 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4095 requires renaming stuff to avoid dbus_connection_dispatch name
4098 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4101 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4102 separate from _dbus_message_loader_return_buffer()
4104 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4105 this, because it's now always broken to use; the number of
4106 messages in queue vs. the number still buffered by the message
4107 loader is undefined/meaningless. Should use
4108 dbus_connection_get_dispatch_state().
4109 (dbus_connection_dispatch): rename from
4110 dbus_connection_dispatch_message
4112 2003-03-16 Havoc Pennington <hp@pobox.com>
4114 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4117 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4119 * dbus/dbus-connection.c:
4120 (dbus_connection_send_with_reply_and_block):
4121 Decrease connection->n_incoming when removing an entry
4123 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4124 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4125 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4126 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4127 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4128 (dbus_dict_get_byte_array):
4129 Handle NULL arrays and strings. Also add support for byte arrays.
4131 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4132 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4133 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4134 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4135 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4136 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4137 * dbus/dbus-marshal.h:
4138 Add support for marshalling and demarshalling empty arrays and strings.
4140 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4141 (dbus_message_append_string_array),
4142 (dbus_message_iter_get_boolean),
4143 (dbus_message_iter_get_boolean_array),
4144 (dbus_message_iter_get_int32_array),
4145 (dbus_message_iter_get_uint32_array),
4146 (dbus_message_iter_get_double_array),
4147 (dbus_message_iter_get_byte_array),
4148 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4149 (check_message_handling):
4150 Add support for getting empty arrays and dicts.
4152 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4153 Don't do any validation at all for now, that's better than just checking
4156 * test/data/valid-messages/emptiness.message:
4157 New test message with lots of empty arrays.
4159 2003-03-16 Havoc Pennington <hp@pobox.com>
4161 * dbus/dbus-connection.c
4162 (_dbus_connection_queue_received_message_link): new function that
4163 can't fail due to OOM
4165 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4166 new function pops a message together with a list link
4169 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4170 message queuing functions to avoid needing to alloc memory
4172 2003-03-16 Havoc Pennington <hp@pobox.com>
4174 Oops - test code was only testing failure of around 30 of the
4175 mallocs in the test path, but it turns out there are 500+
4176 mallocs. I believe this was due to misguided linking setup such
4177 that there was one copy of dbus_malloc etc. in the daemon and one
4178 in the shared lib, and only daemon mallocs were tested. In any
4179 case, the test case now tests all 500+ mallocs, and doesn't pass
4180 yet, though there are lots of fixes in this patch.
4182 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4183 this so that it doesn't need to allocate memory, since it
4184 has no way of indicating failure due to OOM (and would be
4185 annoying if it did).
4187 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4189 * bus/Makefile.am: rearrange to create two self-contained
4190 libraries, to avoid having libraries with overlapping symbols.
4191 that was resulting in weirdness, e.g. I'm pretty sure there
4192 were two copies of global static variables.
4194 * dbus/dbus-internals.c: move the malloc debug stuff to
4197 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4200 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4202 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4205 * bus/dispatch.c (bus_dispatch_add_connection): free
4206 message_handler_slot when no longer using it, so
4207 memory leak checkers are happy for the test suite.
4209 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4211 * bus/bus.c (new_connection_callback): disconnect in here if
4212 bus_connections_setup_connection fails.
4214 * bus/connection.c (bus_connections_unref): fix to free the
4216 (bus_connections_setup_connection): if this fails, don't
4217 disconnect the connection, just be sure there are no side
4220 * dbus/dbus-string.c (undo_alignment): unbreak this
4222 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4224 (_dbus_auth_new): fix the order in which we free strings
4227 * bus/connection.c (bus_connection_disconnected): fix to
4228 not send ServiceDeleted multiple times in case of memory
4231 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4232 get the base service name
4233 (dbus_bus_register_client): don't return base service name,
4234 instead store it on the DBusConnection and have an accessor
4236 (dbus_bus_register_client): rename dbus_bus_register()
4238 * bus/dispatch.c (check_hello_message): verify that other
4239 connections on the bus also got the correct results, not
4240 just the one sending hello
4242 2003-03-15 Havoc Pennington <hp@pobox.com>
4244 Make it pass the Hello handling test including all OOM codepaths.
4245 Now to do other messages...
4247 * bus/services.c (bus_service_remove_owner): fix crash when
4248 removing owner from an empty list of owners
4249 (bus_registry_ensure): don't leave service in the list of
4250 a connection's owned services if we fail to put the service
4253 * bus/connection.c (bus_connection_preallocate_oom_error): set
4254 error flag on the OOM error.
4256 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4257 handle _dbus_transport_set_connection failure
4259 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4260 to create watches up front and simply enable/disable them as
4262 (unix_connection_set): this can now fail on OOM
4264 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4265 of enabling/disabling a watch or timeout.
4267 * bus/loop.c (bus_loop_iterate): don't touch disabled
4270 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4272 2003-03-15 Havoc Pennington <hp@pobox.com>
4274 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4275 write useful test code, after all that futzing around ;-)
4277 Test does not yet pass because we can't handle OOM in
4278 _dbus_transport_messages_pending (basically,
4279 dbus_connection_preallocate_send() does not prealloc the write
4280 watch). To fix this, I think we need to add new stuff to
4281 set_watch_functions, namely a SetEnabled function so we can alloc
4282 the watch earlier, then enable it later.
4284 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4285 dbus-memory.c to the convenience lib
4287 * bus/test.c: rename some static functions to keep them clearly
4288 distinct from stuff in connection.c. Handle client disconnection.
4290 2003-03-14 Havoc Pennington <hp@pobox.com>
4292 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4293 transport, tests more of the real codepath. Set up clients
4294 with bus_setup_debug_client.
4296 * bus/test.c (bus_setup_debug_client): function to set up debug
4297 "clients" on the main loop
4299 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4302 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4305 * dbus/dbus-server-debug.c: support a debug server based on pipes
4307 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4308 (_dbus_close): new function
4310 * configure.in: check for socketpair
4312 2003-03-14 Havoc Pennington <hp@redhat.com>
4314 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4317 * dbus/dbus-transport-debug.c: rework this a good bit to be
4318 less complicated. hopefully still works.
4320 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4323 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4326 * dbus/dbus-message.c (dbus_message_copy): rename from
4327 dbus_message_new_from_message, fix it up to copy
4328 all the message fields, add test case
4330 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4331 not quite passing yet
4333 2003-03-14 Havoc Pennington <hp@pobox.com>
4335 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4336 until no work remains" in test code. (the large diff here
4337 is just code movement, no actual changes)
4339 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4340 1, no point waiting around for test code.
4341 (_dbus_server_debug_accept_transport): unref the timeout
4342 after adding it (right?)
4344 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4346 2003-03-13 Havoc Pennington <hp@redhat.com>
4348 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4351 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4354 * dbus/dbus-connection.h: Make AddWatchFunction and
4355 AddTimeoutFunction return a bool so they can fail on out-of-memory
4357 * bus/bus.c (bus_context_new): set up timeout handlers
4359 * bus/connection.c (bus_connections_setup_connection): set up
4362 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4365 * bus/bus.c (bus_context_new): adapt to changes
4367 * bus/connection.c: adapt to changes
4369 * test/watch.c: adapt to DBusWatch changes
4371 * bus/dispatch.c (bus_dispatch_test): started adding this but
4374 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4376 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4378 2003-03-13 Havoc Pennington <hp@pobox.com>
4380 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4381 set up a test framework as for the library
4383 2003-03-12 Havoc Pennington <hp@pobox.com>
4385 Throughout: purge global variables, introduce BusActivation,
4386 BusConnections, BusRegistry, etc. objects instead.
4388 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4391 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4392 going to redo this a bit differently I think
4394 2003-03-12 Havoc Pennington <hp@redhat.com>
4396 Mega-patch that gets the message bus daemon initially handling
4397 out-of-memory. Work still needed. Also lots of random
4398 moving stuff to DBusError instead of ResultCode.
4400 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4402 * dbus/dbus-connection.c
4403 (dbus_connection_send_with_reply_and_block): use DBusError
4405 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4408 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4409 code here, as the only failure possible is OOM.
4411 * bus/connection.c (bus_connection_disconnect):
4412 rename bus_connection_disconnected as it's a notification only
4414 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4415 "name" on get_args failure, should be done by get_args;
4416 don't disconnect client for bad args, just return an error.
4417 (bus_driver_handle_service_exists): ditto
4419 * bus/services.c (bus_services_list): NULL-terminate returned array
4421 * bus/driver.c (bus_driver_send_service_lost)
4422 (bus_driver_send_service_acquired): send messages from driver to a
4423 specific client to the client's unique name, not to the broadcast
4426 * dbus/dbus-message.c (decode_header_data): reject messages that
4427 contain no name field
4428 (_dbus_message_get_client_serial): rename to
4429 dbus_message_get_serial and make public
4430 (_dbus_message_set_serial): rename from set_client_serial
4431 (_dbus_message_set_reply_serial): make public
4432 (_dbus_message_get_reply_serial): make public
4434 * bus/connection.c (bus_connection_foreach): allow stopping
4435 iteration by returning FALSE from foreach function.
4437 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4438 (dbus_connection_free_preallocated_send)
4439 (dbus_connection_preallocate_send): new API for sending a message
4440 without possibility of malloc failure.
4441 (dbus_connection_send_message): rename to just
4442 dbus_connection_send (and same for whole function family)
4444 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4446 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4448 * bus/activation.c: handle/return errors
4450 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4452 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4453 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4454 (_dbus_result_from_errno): move to this file
4456 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4458 * dbus/dbus-marshal.c:
4459 (_dbus_marshal_set_string):
4460 Take a length argument so we can marshal the correct string
4463 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4464 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4465 (_dbus_marshal_test):
4466 * dbus/dbus-marshal.h:
4467 Add support for marshalling and demarshalling dicts.
4469 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4470 Add support for TYPE DICT.
4472 * dbus/dbus-message.c: (set_string_field):
4473 Adjust header padding.
4475 (dbus_message_append_args_valist), (dbus_message_append_dict),
4476 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4477 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4478 (check_message_handling), (check_have_valid_message):
4479 * dbus/dbus-message.h:
4480 Add functions for setting and getting dicts.
4482 * dbus/dbus-protocol.h:
4488 * doc/dbus-specification.sgml:
4489 Add information about how dicts are marshalled.
4491 * test/data/invalid-messages/dict-with-nil-value.message:
4492 * test/data/invalid-messages/too-short-dict.message:
4493 * test/data/valid-messages/dict-simple.message:
4494 * test/data/valid-messages/dict.message:
4495 Add sample messages containing dicts.
4497 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4499 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4501 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4504 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4505 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4506 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4507 (dbus_dict_set_double), (dbus_dict_set_string),
4508 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4509 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4510 (dbus_dict_set_string_array), (_dbus_dict_test):
4512 Fix according to comments from Havoc.
4514 2003-03-06 Michael Meeks <michael@server.home>
4516 * configure.in: if we don't have kde-config, disable have_qt.
4518 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4523 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4524 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4525 (dbus_dict_remove), (dbus_dict_get_value_type),
4526 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4527 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4528 (dbus_dict_put_double), (dbus_dict_put_string),
4529 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4530 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4531 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4532 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4533 (dbus_dict_get_double), (dbus_dict_get_string),
4534 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4535 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4536 (dbus_dict_get_string_array), (_dbus_dict_test):
4538 Add DBusDict implementation
4540 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4544 2003-03-04 Havoc Pennington <hp@pobox.com>
4546 * test/data/auth/*: adapt to changes
4548 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4549 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4552 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4553 more stuff from being in a context name, to make the protocol
4554 simpler to deal with
4556 * dbus/dbus-errors.c (dbus_error_has_name): new function
4557 (dbus_error_is_set): new function
4559 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4560 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4562 * dbus/dbus-connection.c (dbus_connection_flush): also read
4563 messages during a flush operation
4565 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4567 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4569 * configure.in: Check for gethostbyname on Solaris.
4571 * dbus/dbus-transport.c: (_dbus_transport_open):
4572 Remove duplicate "tcp" entry.
4574 * doc/dbus-specification.sgml:
4575 Clarify some things.
4577 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4579 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4580 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4581 (_dbus_keyring_test):
4582 * dbus/dbus-md5.c: (_dbus_md5_compute):
4583 * dbus/dbus-sha.c: (_dbus_sha_compute):
4586 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4588 * README: Add some things.
4590 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4592 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4593 after case DBUS_TYPE_BOOELAN.
4595 2003-03-02 Havoc Pennington <hp@pobox.com>
4597 * test/break-loader.c (randomly_set_extreme_ints): add test that
4598 sets really huge and small integers
4600 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4601 that length of boolean array fits in the string, and that
4602 string has room for boolean value in single-bool case.
4604 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4605 optional value to "ALIGN" command which is what to fill the
4608 * test/data/valid-messages/no-padding.message: add regression
4609 test for the message padding problem
4611 2003-03-02 Havoc Pennington <hp@pobox.com>
4613 * dbus/dbus-message.c (decode_header_data): fix to always init
4614 message_padding, from Benjamin Dauvergne
4616 2003-03-02 Havoc Pennington <hp@pobox.com>
4622 2003-03-01 Joe Shaw <joe@assbarn.com>
4624 * configure.in: Check for "struct cmsgcred" and try to access its
4625 members for BSD-like unices.
4627 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4628 _dbus_read_credentials_unix_socket().
4629 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4630 read() for reading the credential byte off the unix socket. Use
4631 struct cmsgcred on systems that support it.
4633 2003-02-27 Alexander Larsson <alexl@redhat.com>
4637 Make gthreads-2.0 dependency optional. Don't build thread test if
4640 2003-02-27 Havoc Pennington <hp@pobox.com>
4642 * dbus/dbus-connection.c
4643 (dbus_connection_send_message_with_reply_and_block): fix doh!
4644 doh! doh! bug that resulted in never removing a reply from the
4645 queue, no wonder we called get_reply_serial so much ;-)
4647 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4648 and client serial instead of demarshaling them every time
4650 2003-02-27 Havoc Pennington <hp@pobox.com>
4652 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4653 more inlined, using dbus-string-private.h, speeds things up
4656 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4657 when freeing the string
4658 (_dbus_string_steal_data): fix for align offset
4659 (undo_alignment): new function
4661 2003-02-26 Havoc Pennington <hp@redhat.com>
4663 All kinds of audit fixes from Owen, plus initial attempt to
4664 handle unaligned memory returned from malloc.
4666 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4667 leave room for align_offset and nul byte
4668 (fixup_alignment): function to track an align_offset and
4669 ensure real->str is aligned
4670 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4671 to allow a nul byte plus align offset
4672 (_dbus_string_lock): fix overflow issue
4673 (_dbus_string_init_const_len): add assertions on sanity of len,
4674 assign allocated to be ALLOCATION_PADDING larger than len
4675 (set_length): fixup the overflow handling
4676 (_dbus_string_get_data_len): fix overflow in assertion
4677 (open_gap): detect overflow in size of gap to be opened
4678 (_dbus_string_lengthen): add overflow check
4679 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4680 (_dbus_string_append): add overflow check
4681 (_dbus_string_append_unichar): overflow
4682 (_dbus_string_delete): fix overflow in assertion
4683 (_dbus_string_copy_len): overflow in assertion
4684 (_dbus_string_replace_len): overflows in assertions
4685 (_dbus_string_find): change to implement in terms of
4686 _dbus_string_find_to
4687 (_dbus_string_find_to): assorted fixage
4688 (_dbus_string_equal_c_str): assert c_str != NULL,
4689 fix logic so the function works
4690 (_dbus_string_ends_with_c_str): fix overflow thingy
4691 (_dbus_string_base64_encode): overflow fix
4692 (_dbus_string_validate_ascii): overflow
4693 (_dbus_string_validate_nul): overflow
4695 2003-02-26 Havoc Pennington <hp@redhat.com>
4697 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4699 2003-02-26 Alexander Larsson <alexl@redhat.com>
4702 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4704 * dbus/dbus-connection.c:
4705 * dbus/dbus-connection.h:
4706 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4707 Add dbus_connection_set_wakeup_main_function and use it when queueing
4708 incoming and outgoing messages.
4711 * dbus/dbus-dataslot.c:
4712 Threadsafe usage of DBusDataSlotAllocator
4714 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4717 * dbus/dbus-server-unix.c:
4720 * glib/dbus-gmain.c:
4721 Implement the new wakeup functions for glib.
4724 * glib/test-thread-client.c:
4725 * glib/test-thread-server.c:
4726 * glib/test-thread.h:
4727 Initial cut at some thread test code. Not really done yet.
4729 2003-02-26 Havoc Pennington <hp@pobox.com>
4731 * dbus/dbus-connection.c
4732 (dbus_connection_send_message_with_reply_and_block): fix crash
4733 where we ref'd the outgoing message instead of the returned reply
4735 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4736 at the end of this function, so if we didn't need to read for
4737 authentication, we reinstall it for receiving messages
4739 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4740 a NULL sender for peer-to-peer case
4742 * dbus/dbus-transport-unix.c (check_read_watch): handle
4743 !authenticated case correctly
4745 * glib/dbus-gmain.c: add support for DBusServer
4747 * dbus/dbus-server.c: add data slot support
4749 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4750 return values and handle errors
4752 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4755 * Doxyfile.in (INPUT): add glib subdir
4757 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4758 setup_with_g_main instead of hookup_with_g_main; write docs
4760 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4762 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4763 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4764 * dbus/dbus-message.c: (dbus_message_append_boolean),
4765 (dbus_message_append_boolean_array),
4766 (dbus_message_get_args_valist), (_dbus_message_test):
4767 * dbus/dbus-message.h:
4768 * doc/dbus-specification.sgml:
4769 Various fixes as pointed out by Havoc.
4771 * test/data/invalid-messages/bad-boolean-array.message:
4772 * test/data/invalid-messages/bad-boolean.message:
4773 Add invalid boolean value test cases.
4775 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4777 * dbus/dbus-internals.c: (_dbus_type_to_string):
4778 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4779 (_dbus_marshal_validate_arg):
4780 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4781 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4782 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4783 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4784 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4785 (dbus_message_iter_get_double),
4786 (dbus_message_iter_get_boolean_array), (message_iter_test):
4787 * dbus/dbus-message.h:
4788 * dbus/dbus-protocol.h:
4789 * doc/dbus-specification.sgml:
4790 * test/data/valid-messages/lots-of-arguments.message:
4791 Add support for boolean and boolean array types.
4793 2003-02-23 Havoc Pennington <hp@pobox.com>
4795 * dbus/dbus-keyring.c: finish most of this implementation and
4798 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4799 these barf if the error isn't cleared to NULL
4801 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4802 (_dbus_create_directory): new function
4804 * dbus/dbus-errors.c (dbus_set_error): fix warning
4806 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4807 (_dbus_string_hex_decode): new function
4808 (test_hex_roundtrip): test code
4810 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4812 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4814 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4815 the save-to-temp/rename trick to atomically write the new file
4816 (_dbus_string_parse_uint): new function
4818 2003-02-22 Havoc Pennington <hp@pobox.com>
4820 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4822 2003-02-22 Havoc Pennington <hp@pobox.com>
4824 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4825 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4827 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4829 * dbus/test/data/sha-1: add US government test suite for SHA-1
4831 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4833 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4834 Make string arrays NULL-terminated.
4836 * dbus/dbus-memory.c: (dbus_free_string_array):
4837 * dbus/dbus-memory.h:
4838 New function for freeing NULL-terminated string arrays.
4840 * dbus/dbus-message-builder.c: (append_quoted_string),
4841 (_dbus_message_data_load):
4842 Add support for array types.
4844 * dbus/dbus-message.c: (check_message_handling):
4845 Add more types as test cases.
4847 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4848 (_dbus_string_parse_double):
4849 Add the start offset to the end offset.
4851 * test/data/valid-messages/lots-of-arguments.message:
4852 New test message with lots of arguments.
4854 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4856 * dbus/dbus-message.c: (dbus_message_append_nil),
4857 (dbus_message_append_int32), (dbus_message_append_uint32),
4858 (dbus_message_append_double), (dbus_message_append_string),
4859 (dbus_message_append_int32_array),
4860 (dbus_message_append_uint32_array),
4861 (dbus_message_append_double_array),
4862 (dbus_message_append_byte_array),
4863 (dbus_message_append_string_array):
4864 Fix all out-of-memory handling in these functions.
4866 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4868 * dbus/dbus-message.c: (dbus_message_append_nil):
4871 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4873 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4874 (dbus_message_append_nil), (dbus_message_append_int32_array),
4875 (dbus_message_append_uint32_array),
4876 (dbus_message_append_double_array),
4877 (dbus_message_append_byte_array),
4878 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4879 (dbus_message_iter_get_int32_array),
4880 (dbus_message_iter_get_uint32_array),
4881 (dbus_message_iter_get_double_array),
4882 (dbus_message_iter_get_byte_array),
4883 (dbus_message_iter_get_string_array):
4885 * dbus/dbus-message.h:
4886 Add functions for appending and getting arrays.
4888 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4890 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4891 element size at least 8 bytes, fixes mempool tests on
4894 2003-02-20 Alexander Larsson <alexl@redhat.com>
4896 * dbus/dbus-transport-unix.c (unix_do_iteration):
4897 Unlock the connection mutex during a blocking select call.
4898 Add todo about how we need a way to wake up the select.
4900 * dbus/dbus-connection-internal.h:
4901 * dbus/dbus-connection.c:
4902 Add _dbus_connection_lock and _dbus_connection_unlock.
4904 2003-02-19 Havoc Pennington <hp@pobox.com>
4906 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4907 Doxyfile.in, not Doxyfile
4909 * dbus/dbus-keyring.c: do some hacking on this
4911 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4913 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4915 (dbus_set_error): remove dbus_error_init, check for message ==
4916 NULL *before* we sprintf into it, and add @todo about including
4917 system headers in this file
4919 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4921 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4923 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4924 get various bits of user information based on either username
4926 (_dbus_homedir_from_username): new function
4928 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4931 Add check for nonposix getpwnam_r
4933 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4934 Align the pool element size to a sizeof (void *) boundary.
4936 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4937 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4938 General Solaris fixes.
4940 * test/data/valid-messages/simplest-manual.message:
4941 Explicitly state that we want little-endian packing.
4943 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4945 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4947 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4948 Added to create a transport connecting using a tcp/ip socket.
4950 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4951 to a tcp socket at given host and port.
4952 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4955 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4957 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4958 Added to create a server listening on a TCP/IP socket.
4960 2003-02-19 Havoc Pennington <hp@pobox.com>
4962 Throughout: mop up all the Doxygen warnings and undocumented
4965 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4966 to search any paths.
4968 * dbus/dbus-threads.c: move global mutex initializers to
4969 dbus-internals.h, multiple prototypes was confusing doxygen
4970 besides being kind of ugly
4972 * Doxyfile (PREDEFINED): have Doxygen define
4973 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4974 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4975 (do not abuse the feature! it's for stuff like the autogenerated
4976 macros in dbus-md5.c, not just for things you don't feel like
4979 2003-02-18 Havoc Pennington <hp@pobox.com>
4981 * dbus/dbus-string.c (_dbus_string_zero): new function
4983 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4984 wrap it in some dbus-friendly API
4986 * dbus/dbus-types.h: add 16-bit types
4988 2003-02-18 Joe Shaw <joe@assbarn.com>
4990 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4991 credentials from our currently running process.
4992 (get_word): Fix a buglet where we were copying the entire length
4993 instead of relative to our position.
4995 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4996 keys on the stack... it's 640k of data.
4998 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4999 read the credentials byte off the socket, even if we don't have
5001 (_dbus_poll): Implement poll() using select() for systems which
5004 * glib/test-dbus-glib.c (main): Print out an error if no
5005 parameters are given.
5007 * test/data/auth/fallback.auth-script: Added. Tests that a client
5008 can fallback to a secondary auth mechanism if the first fails.
5010 2003-02-18 Havoc Pennington <hp@pobox.com>
5014 2003-02-17 Havoc Pennington <hp@pobox.com>
5016 * doc/dbus-specification.sgml: lots of cosmetic
5017 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5018 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5019 s/server/bus/ (except in authentication section). Add a section
5020 "Message Bus Message Routing"
5022 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5028 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5030 * doc/dbus-specification.sgml:
5031 Specification updates.
5033 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5035 * bus/activation.c: (bus_activation_init), (child_setup),
5036 (bus_activation_activate_service):
5038 * bus/main.c: (main):
5039 Set DBUS_ADDRESS environment variable.
5041 * dbus/dbus-errors.c: (dbus_set_error):
5042 Don't use va_copy since that's a C99 feature.
5044 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5045 (_dbus_spawn_async):
5046 * dbus/dbus-sysdeps.h:
5047 Add child_setup_func to _dbus_spawn_async.
5049 * doc/dbus-specification.sgml:
5050 Update specification.
5052 * test/spawn-test.c: (setup_func), (main):
5055 2003-02-17 Alexander Larsson <alexl@redhat.com>
5057 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5060 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5064 * doc/dbus-test-plan.sgml:
5065 Add test plan document.
5070 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5072 * dbus/dbus-message.c: (decode_header_data),
5073 (_dbus_message_loader_return_buffer):
5074 Set the header padding amount when loading a message.
5076 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5078 * bus/dispatch.c: (send_one_message):
5079 Only send broadcast messages to registered connections.
5081 * dbus/dbus-message.c: (dbus_message_name_is):
5082 * dbus/dbus-message.h:
5083 New convenience function.
5085 * dbus/dbus-transport-debug.c: (do_reading):
5086 Only dispatch one message per run.
5089 * test/bus-test.c: (new_connection_callback), (die),
5090 (test_hello_client1_handler), (test_hello_client2_handler),
5091 (test_hello_replies), (main):
5093 * test/bus-test-loop.[ch]:
5096 2003-02-16 Havoc Pennington <hp@pobox.com>
5098 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5099 backward conditional
5101 2003-02-16 Alexander Larsson <alexl@redhat.com>
5103 * dbus/dbus-connection.c:
5104 Implement sent_message_with_reply. (with_reply_and block is still
5106 Made dispatch_message not lose message if OOM.
5108 * dbus/dbus-errors.h:
5109 Add NoReply error (for reply timeouts).
5111 2003-02-16 Alexander Larsson <alexl@redhat.com>
5113 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5114 Actually free keys and values when destroying hashtable.
5116 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5118 * dbus/dbus-auth.c: (client_try_next_mechanism):
5121 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5122 Return TRUE if there's no thread implementation around.
5124 * glib/dbus-gmain.c: (free_source),
5125 (dbus_connection_hookup_with_g_main):
5126 Make sure to remove the GSource when the connection is finalized.
5128 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5130 * bus/dispatch.c: (bus_dispatch_message_handler):
5131 * dbus/dbus-errors.h:
5132 Return an error if someone tries to send a message to a service
5135 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5137 * bus/activation.c: (load_directory), (bus_activation_init),
5138 (bus_activation_activate_service):
5141 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5142 More work on the activation handling.
5144 * dbus/dbus-errors.h:
5145 Add some error messages
5147 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5148 * dbus/dbus-message.h:
5149 New function that creates an error message.
5151 * dbus/dbus-protocol.h:
5152 Add ACTIVATE_SERVER message.
5154 * dbus/dbus-server-unix.c: (unix_handle_watch),
5155 (_dbus_server_new_for_domain_socket):
5156 Call _dbus_fd_set_close_on_exec.
5158 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5159 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5160 (_dbus_fd_set_close_on_exec):
5161 * dbus/dbus-sysdeps.h:
5162 Add _dbus_fd_set_close_on exec function. Also add function that checks
5163 that all open fds are set to close-on-exec and warns otherwise.
5165 * dbus/dbus-transport-unix.c:
5166 (_dbus_transport_new_for_domain_socket):
5167 Call _dbus_fd_set_close_on_exec.
5169 2003-02-16 Havoc Pennington <hp@pobox.com>
5171 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5172 allow people to avoid setting SIGPIPE to SIG_IGN
5173 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5174 we've been asked not to
5176 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5178 * dbus/dbus-list.c: (_dbus_list_append_link),
5179 (_dbus_list_prepend_link):
5180 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5184 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5187 * bus/activation.c: (bus_activation_entry_free),
5188 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5190 * bus/main.c: (main):
5191 Add simple activation support, doesn't work yet though.
5193 2003-02-15 Zack Rusin <zack@kde.org>
5195 * qt/dbus-qthread.cpp: small casting fix
5197 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5199 * dbus/dbus-errors.c: (dbus_set_error):
5200 * dbus/dbus-errors.h:
5201 Add a few errors and make dbus_set_error void.
5203 * dbus/dbus-sysdeps.c:
5204 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5205 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5206 * dbus/dbus-sysdeps.h:
5207 Add _dbus_spawn_async.
5209 * test/spawn-test.c: (main):
5210 Test for _dbus_spawn_async.
5212 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5214 * dbus/dbus-internals.h:
5215 Fix build without tests.
5217 * dbus/dbus-list.c: (alloc_link):
5218 Fix a segfault when a malloc fails.
5220 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5221 (dbus_malloc0), (dbus_realloc):
5222 Add support for malloc debugging.
5224 2003-02-15 Alexander Larsson <alexl@redhat.com>
5226 * dbus/dbus-threads.c:
5227 * dbus/dbus-threads.h:
5228 Add condvars. Remove static mutext from API.
5229 Implement static mutexes by initializing them from threads_init.
5231 * glib/dbus-gthread.c:
5232 * qt/dbus-qthread.cpp:
5233 Update with the thread api changes.
5238 Turn StaticMutex into normal mutex + init function.
5239 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5240 _dbus_list_append_link, _dbus_list_prepend_link
5243 * dbus/dbus-sysdeps.c:
5244 * dbus/dbus-sysdeps.h:
5245 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5246 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5248 * dbus/dbus-protocol.h:
5249 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5251 * dbus/dbus-message.c:
5252 Make ref/unref atomic.
5255 * dbus/dbus-connection-internal.h:
5256 * dbus/dbus-connection.c:
5257 * dbus/dbus-connection.h:
5259 Change _peek to _borrow,_return & _steal_borrowed.
5260 Change disconnect callback to event.
5261 Make dbus_connection_dispatch_messages reentrant.
5263 * dbus/dbus-transport.c:
5264 Don't ref the connection on calls to the transport
5267 * dbus/dbus-message-handler.c:
5270 * glib/dbus-gmain.c:
5271 Don't use peek_message anymore
5274 * test/debug-thread.c:
5275 * test/debug-thread.h:
5276 Simple thread implementation that asserts() on deadlocks in
5277 single-threaded code.
5280 (main) Call debug_threads_init.
5283 Use disconnect message instead of disconnect callback.
5287 Don't call dbus_connection_set_disconnect_function. Instead export
5288 bus_connection_disconnect.
5291 Call bus_connection_disconnect when we get a disconnected message.
5293 2003-02-15 Havoc Pennington <hp@pobox.com>
5295 * dbus/dbus-message.c (dbus_message_new): fool around with the
5298 2003-02-14 Havoc Pennington <hp@pobox.com>
5300 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5302 * dbus/dbus-memory.c: fail if the debug functions indicate we
5305 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5306 (_dbus_decrement_fail_alloc_counter): debug functions to
5307 simulate memory allocation failures
5309 2003-02-14 Havoc Pennington <hp@pobox.com>
5311 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5314 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5316 * bus/driver.c: (bus_driver_handle_hello):
5318 * bus/services.c: (bus_service_lookup):
5319 Reorder message sending so we get a more sane order.
5321 * test/bus-test.c: (message_handler):
5324 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5326 * bus/driver.c: (bus_driver_send_service_deleted),
5327 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5328 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5329 (bus_driver_send_welcome_message),
5330 (bus_driver_handle_list_services),
5331 (bus_driver_handle_acquire_service),
5332 (bus_driver_handle_service_exists):
5333 * dbus/dbus-bus.c: (dbus_bus_register_client),
5334 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5335 * dbus/dbus-errors.c: (dbus_result_to_string):
5336 * dbus/dbus-errors.h:
5337 * dbus/dbus-message.c: (dbus_message_append_args),
5338 (dbus_message_append_args_valist), (dbus_message_get_args),
5339 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5340 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5341 (dbus_message_iter_get_byte_array),
5342 (dbus_message_iter_get_string_array), (message_iter_test),
5343 (check_message_handling), (_dbus_message_test):
5344 * dbus/dbus-message.h:
5345 * test/bus-test.c: (main):
5346 Change fields to arguments in messages, so that they won't be
5347 confused with header fields.
5349 * glib/test-dbus-glib.c: (main):
5350 Remove append_fields from hello message.
5352 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5354 * dbus/dbus-errors.c:
5355 * dbus/dbus-message.c:
5356 * dbus/dbus-string.c:
5357 Documentation fixes.
5359 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5361 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5363 Implement support for timeouts in dbus-glib.
5365 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5367 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5368 * dbus/dbus-message.c: (process_test_subdir):
5369 * test/break-loader.c: (find_breaks_based_on):
5370 Plug some memory leaks.
5372 2003-02-13 Richard Hult <rhult@codefactory.se>
5374 * bus/main.c: Fix build.
5376 * dbus/dbus-errors.h:
5377 * dbus/dbus-errors.c: Fix copyright for Anders.
5379 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5384 * bus/connection.c: (bus_connection_foreach):
5387 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5388 (unescape_string), (new_section), (parse_section_start),
5389 (parse_key_value), (report_error), (bus_desktop_file_load),
5390 (bus_desktop_file_get_string):
5391 * bus/desktop-file.h:
5392 Use DBusError for error reporting.
5394 * bus/dispatch.c: (send_one_message),
5395 (bus_dispatch_message_handler):
5396 * bus/driver.c: (bus_driver_send_service_deleted),
5397 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5398 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5399 (bus_driver_send_welcome_message),
5400 (bus_driver_handle_list_services),
5401 (bus_driver_handle_acquire_service),
5402 (bus_driver_handle_service_exists):
5403 * bus/loop.c: (bus_loop_run):
5405 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5407 * bus/utils.c: (bus_wait_for_memory):
5409 New files with general utility functions.
5411 * dbus/dbus-internals.h:
5412 Remove _DBUS_HANDLE_OOM.
5414 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5416 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5417 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5418 * dbus/dbus-errors.h:
5419 Add DBusError structure.
5421 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5423 * test/data/valid-messages/standard-acquire-service.message:
5424 * test/data/valid-messages/standard-hello.message:
5425 * test/data/valid-messages/standard-list-services.message:
5426 * test/data/valid-messages/standard-service-exists.message:
5427 Add some standard messages.
5429 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5431 * bus/driver.c: (bus_driver_send_welcome_message),
5432 (bus_driver_handle_list_services),
5433 (bus_driver_handle_acquire_service),
5434 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5435 Update for API changes in libdbus.
5437 * dbus/dbus-message.c: (dbus_message_new_reply):
5438 * dbus/dbus-message.h:
5439 Remove the name argument. The spec states that replies shouldn't
5442 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5444 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5445 (report_error), (bus_desktop_file_load), (lookup_section),
5446 (lookup_line), (bus_desktop_file_get_raw),
5447 (bus_desktop_file_get_string):
5448 * bus/desktop-file.h:
5449 Some fixes, and new functions for getting a key value from a section.
5451 2003-02-13 Havoc Pennington <hp@pobox.com>
5453 * test/data/auth/fail-after-n-attempts.auth-script: new test
5455 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5458 2003-02-13 Havoc Pennington <hp@pobox.com>
5460 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5461 dbus_credentials_match were backward
5463 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5464 NO_CREDENTIALS and ROOT_CREDENTIALS
5466 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5467 into here. Never process more commands after we've reached an
5468 end state; store further data as unused bytes.
5470 * test/data/auth/*: add more auth tests
5472 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5473 command to match exact string and EXPECT_UNUSED to match unused
5476 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5478 2003-02-12 Havoc Pennington <hp@pobox.com>
5480 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5481 \r off of popped lines
5483 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5486 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5489 2003-02-12 Havoc Pennington <hp@pobox.com>
5491 * dbus/Makefile.am: remove break-loader from the build, since it
5494 * configure.in: add --enable-gcov to turn on coverage profiling
5495 flags and disable optimization
5497 2003-02-10 Havoc Pennington <hp@pobox.com>
5499 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5500 initial cut at test framework for DBusAuth from laptop.
5501 Doesn't quite work yet but it compiles and I need to get
5502 it off the 266mhz laptop. ;-)
5504 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5505 fix a memleak in error case
5507 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5510 * bus/desktop-file.c:
5511 * bus/desktop-file.h:
5512 Add a desktop file parser.
5514 2003-02-11 Zack Rusin <zack@kde.org>
5516 * qt/message.[h|cpp]: sample implementation
5517 of the KDE wrapper for DBusMessage
5519 2003-02-09 Zack Rusin <zack@kde.org>
5521 * test/bus-test.c: make_it_compile
5522 * doc/dbus-specification.sgml: minimal semantic fix
5524 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5530 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5533 * dbus/dbus-break-loader.c:
5535 * test/break-loader.c:
5536 Move dbus-break-loader to test/ and rename it to break-loader.
5538 2003-02-02 Havoc Pennington <hp@pobox.com>
5540 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5541 for code to manage cookies in your home directory
5543 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5545 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5546 to authenticate, then disconnect the client.
5548 2003-02-03 Alexander Larsson <alexl@redhat.com>
5550 * dbus/dbus-message.c (dbus_message_append_fields):
5553 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5555 * doc/dbus-specification.sgml:
5556 Update address format section.
5558 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5561 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5562 (message_handler), (new_connection_callback), (loop_quit),
5566 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5568 * bus/driver.c: (bus_driver_handle_service_exists):
5569 Simplify the code a bit.
5571 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5574 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5577 Add libdbus-daemon.la and link to it.
5579 2003-02-01 James Willcox <jwillcox@gnome.org>
5581 * bus/driver.c: (bus_driver_handle_own_service):
5582 Actually include the service reply code in the message.
5584 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5586 * bus/driver.c: (bus_driver_handle_service_exists):
5587 Don't unref the incoming message.
5589 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5591 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5593 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5595 * dbus/dbus-server.c: (dbus_server_listen):
5596 * dbus/dbus-transport.c: (_dbus_transport_open):
5597 ifdef out the calls to the debug transport and server.
5599 2003-02-02 Alexander Larsson <alexl@redhat.com>
5601 * dbus/dbus-watch.c (dbus_watch_get_flags):
5602 Add note in the docs that ERROR or HANGUP won't be returned
5603 and are assumed always on.
5605 * glib/dbus-gmain.c (add_watch):
5606 Always add IO_ERR | IO_HUP
5608 * dbus/dbus-message.h:
5609 Add semicolon after dbus_message_iter_get_string_array().
5610 Makes qt code build again
5612 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5614 * bus/driver.c: (create_unique_client_name),
5615 (bus_driver_handle_hello):
5616 Don't take a name, just use a numeric id to identify
5620 * dbus/dbus-bus.c: (dbus_bus_register_client),
5621 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5623 Add new convenience functions for communicating with the bus.
5625 * dbus/dbus-message.h:
5627 * dbus/dbus-protocol.h:
5630 2003-02-01 Alexander Larsson <alexl@redhat.com>
5632 * dbus/dbus-message.c (dbus_message_append_fields):
5633 Add some more doc comments.
5635 2003-02-01 Havoc Pennington <hp@pobox.com>
5637 * dbus/dbus-break-loader.c (randomly_modify_length): change
5638 a 4-byte value in the message as if it were a length
5640 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5641 execute bit on saved files
5643 2003-02-01 Havoc Pennington <hp@pobox.com>
5645 * dbus/dbus-break-loader.c (main): new program to find messages
5646 that break the loader.
5648 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5649 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5651 * dbus/dbus-string.c (_dbus_string_set_byte): new
5653 2003-01-31 Havoc Pennington <hp@pobox.com>
5655 * dbus/dbus-message.c: refactor the test code to be more general,
5656 in preparation for writing a "randomly permute test cases to
5657 try to break the loader" program.
5659 2003-01-31 Havoc Pennington <hp@pobox.com>
5661 * doc/dbus-specification.sgml: work on the specification
5663 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5664 the protocol version of the message.
5666 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5667 no longer specifies that.
5668 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5671 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5672 "break" for DBUS_TYPE_NIL, remove @todo
5674 2003-01-31 Havoc Pennington <hp@pobox.com>
5676 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5677 just set_is_error/get_is_error as this is a commonly-used
5678 function, and write docs.
5680 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5682 * dbus/dbus-address.c: (dbus_address_entry_free):
5683 Free key and value lists.
5685 * dbus/dbus-internals.c: (_dbus_type_to_string):
5686 Add the types we didn't have.
5688 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5689 (_dbus_marshal_validate_arg):
5692 * dbus/dbus-message.c: (dbus_message_set_sender):
5693 Remove todo about being able to set sender to NULL.
5695 (dbus_message_set_is_error_reply),
5696 (dbus_message_get_is_error_reply):
5697 * dbus/dbus-message.h:
5700 * dbus/dbus-protocol.h:
5701 Add error reply flag.
5703 * test/data/valid-messages/opposite-endian.message:
5704 Add NIL type to test.
5706 2003-01-31 Havoc Pennington <hp@pobox.com>
5708 * doc/dbus-specification.sgml: fully specify the header. Add
5709 flags and major protocol version, and change header/body len to
5712 * dbus/dbus-message-builder.c (append_saved_length): append length
5715 * dbus/dbus-message.c (dbus_message_create_header): change header
5716 length and body length to unsigned. Add the new fields from the
5718 (_dbus_message_loader_return_buffer): unsigned header/body len
5720 2003-01-30 Havoc Pennington <hp@pobox.com>
5722 * dbus/dbus-auth.c: rework to use only REJECTED, no
5725 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5726 use REJECTED, suggested by Mark McLoughlin
5728 2003-01-30 Havoc Pennington <hp@pobox.com>
5730 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5731 a better way to report errors here. e.g. "unix address lacks
5732 path" or something. also "no such file" when the path doesn't
5735 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5737 (dbus_parse_address): add @todo about documenting address format,
5738 and allowing , and ; to be escaped
5740 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5743 Add dbus-address.[ch]
5745 * dbus/dbus-address.c: (dbus_address_entry_free),
5746 (dbus_address_entries_free), (create_entry),
5747 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5748 (dbus_parse_address), (_dbus_address_test):
5749 * dbus/dbus-address.h:
5750 New files for dealing with address parsing.
5752 * dbus/dbus-connection.c:
5753 Document timeout functions.
5755 * dbus/dbus-message.c:
5756 Document dbus_message_new_from_message.
5758 * dbus/dbus-server-debug.c:
5761 * dbus/dbus-server.c: (dbus_server_listen):
5762 Parse address and use correct server implementation.
5764 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5765 * dbus/dbus-string.h:
5766 New function with test.
5768 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5772 * dbus/dbus-transport-debug.c:
5775 * dbus/dbus-transport.c: (_dbus_transport_open):
5776 Parse address and use correct transport implementation.
5778 2003-01-30 Havoc Pennington <hp@pobox.com>
5780 * dbus/dbus-message.c: use message->byte_order instead of
5781 DBUS_COMPILER_BYTE_ORDER throughout.
5782 (dbus_message_create_header): pad header to align the
5783 start of the body of the message to 8-byte boundary
5785 * dbus/dbus-marshal.h: make all the demarshalers take const
5786 DBusString arguments.
5788 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5789 validate message args here, so we don't have to do slow validation
5790 later, and so we catch bad messages as they are incoming. Also add
5791 better checks on header_len and body_len. Also fill in
5794 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5795 implemented properly)
5796 (_dbus_string_validate_nul): new function to check all-nul
5798 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5799 get_arg_end_pos and remove all validation
5800 (_dbus_marshal_validate_arg): actually do validation here.
5802 2003-01-29 Havoc Pennington <hp@pobox.com>
5804 * dbus/dbus-message.c (check_message_handling): fix assertion
5805 failure on set_client_serial
5807 2003-01-28 Havoc Pennington <hp@pobox.com>
5809 * dbus/dbus-server-debug.c: Add doc section comments
5811 * dbus/dbus-transport-debug.c: add doc section comments
5813 2003-01-28 Havoc Pennington <hp@redhat.com>
5815 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5816 the reverse order from how I had it
5817 (_dbus_string_base64_encode): reverse encoding order. I was
5818 basically byteswapping everything during encoding.
5820 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5822 * dbus/dbus-connection-internal.h:
5823 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5824 (_dbus_connection_remove_timeout):
5825 Add functions for adding and removing timeouts.
5827 * dbus/dbus-message.c: (dbus_message_new_from_message):
5828 Add new function that takes a message and creates an exact
5829 copy of it, but with the refcount set to 1.
5830 (check_message_handling):
5833 * dbus/dbus-server-protected.h:
5834 * dbus/dbus-server.c: (_dbus_server_init_base),
5835 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5836 (dbus_server_set_timeout_functions):
5837 (_dbus_server_remove_timeout):
5838 New functions so that a server can add and remove timeouts.
5840 (dbus_server_listen):
5841 Add commented out call to dbus_server_debug_new.
5843 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5844 Actually set the handler, doh.
5846 * dbus/dbus-transport.c: (_dbus_transport_open):
5847 Add commented out call to dbus_transport_debug_client_new.
5850 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5852 2003-01-28 Havoc Pennington <hp@pobox.com>
5854 * dbus/dbus-message.c (check_message_handling): function to check
5855 on the loaded message, iterates over it etc.
5857 2003-01-28 Havoc Pennington <hp@pobox.com>
5859 * test/Makefile.am (dist-hook): fix make distdir
5861 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5863 2003-01-27 Havoc Pennington <hp@pobox.com>
5865 * dbus/dbus-mempool.c (time_for_size): replace printf with
5868 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5869 empty lines; fix the SAVE_LENGTH stuff to be
5870 START_LENGTH/END_LENGTH so it actually works; couple other
5873 * test/Makefile.am (dist-hook): add dist-hook for .message files
5875 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5876 can be constant or locked.
5877 (_dbus_string_free): allow freeing a const string as
5880 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5882 * dbus/dbus-test-main.c (main): take an argument which is the
5883 directory containing test data
5885 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5886 argument to this and load all the messages in test/data/
5887 checking that they can be loaded or not loaded as appropriate.
5889 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5891 * bus/dispatch.c: (bus_dispatch_message_handler):
5892 Dispatch messages sent to services.
5894 * bus/driver.c: (bus_driver_send_service_deleted),
5895 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5896 (bus_driver_send_service_acquired):
5897 Add helper functions for sending service related messages.
5899 (bus_driver_send_welcome_message):
5900 Send HELLO_REPLY instead of WELCOME.
5902 (bus_driver_handle_list_services):
5903 Send LIST_SERVICES_REPLY instead of SERVICES.
5905 (bus_driver_handle_own_service),
5906 (bus_driver_handle_service_exists):
5907 New message handlers.
5909 (bus_driver_handle_message):
5910 Invoke new message handlers.
5912 (bus_driver_remove_connection):
5913 Don't remove any services here since that's done automatically
5914 by bus_service_remove_owner now.
5917 New function signatures.
5919 * bus/services.c: (bus_service_add_owner):
5920 Send ServiceAcquired message if we're the only primary owner.
5922 (bus_service_remove_owner):
5923 Send ServiceAcquired/ServiceLost messages.
5925 (bus_service_set_prohibit_replacement),
5926 (bus_service_get_prohibit_replacement):
5927 Functions for setting prohibit replacement.
5929 (bus_service_has_owner):
5930 New function that checks if a connection is in the owner queue of
5934 Add new function signatures.
5936 * dbus/dbus-list.c: (_dbus_list_test):
5937 Add tests for _dbus_list_remove_last and traversing the list backwards.
5940 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5941 go any further, so return NULL then.
5943 * dbus/dbus-protocol.h:
5944 Add new messages, service flags and service replies.
5946 2003-01-26 Havoc Pennington <hp@pobox.com>
5948 * dbus/dbus-message-builder.c: implement, completely untested.
5950 * test/data/*: add data to be used in testing.
5951 ".message" files are our simple loadable text format.
5952 ".message-raw" will be binary dumps of messages.
5954 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5956 2003-01-26 Havoc Pennington <hp@pobox.com>
5958 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5960 * dbus/dbus-errors.c (dbus_result_to_string): add
5963 * dbus/dbus-message-builder.c: new file, will contain code to load
5964 up messages from files. Not implemented yet.
5966 2003-01-26 Havoc Pennington <hp@pobox.com>
5968 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5969 the sender by setting to NULL
5971 2003-01-26 Havoc Pennington <hp@pobox.com>
5973 The unit tests pass, but otherwise untested. If it breaks, the
5974 tests should have been better. ;-)
5976 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5979 * dbus/dbus-message.c: redo everything so we maintain
5980 message->header as the only copy of the various fields.
5981 This avoids the possibility of out-of-memory in some cases,
5982 for example dbus_message_lock() can't run out of memory anymore,
5983 and avoids extra copying. Figured I may as well go ahead and do
5984 this since it was busted for dbus_message_lock to not return
5985 failure on OOM, and dbus_message_write_header was totally
5986 unchecked for OOM. Also fixed some random other bugs.
5988 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5989 that strings are nul-terminated. Also, end_pos can be equal
5990 to string length just not greater than, I think.
5991 (_dbus_marshal_set_int32): new function
5992 (_dbus_marshal_set_uint32): new function
5993 (_dbus_marshal_set_string): new function
5995 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5996 a warning, init timeout_list to NULL
5997 (dbus_connection_send_message): don't use uninitialized variable
6000 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6002 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6004 * bus/driver.c: (bus_driver_handle_hello),
6005 (bus_driver_send_welcome_message):
6008 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6010 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6011 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6012 (dbus_connection_unref):
6013 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6014 * dbus/dbus-message.c: (dbus_message_unref),
6017 (dbus_message_get_fields):
6018 Remove debugging printout.
6020 (_dbus_message_loader_return_buffer):
6021 Don't store the header string.
6023 (_dbus_message_test):
6026 2003-01-26 Richard Hult <rhult@codefactory.se>
6028 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6029 the file descriptor list, since it can change under us.
6031 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6033 * glib/dbus-gmain.c: (dbus_connection_prepare),
6034 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6035 (remove_watch), (dbus_connection_hookup_with_g_main):
6036 Rewrite the glib handling to use its own GSource instead of a
6037 GIOChannel so we can catch messages put in the queue while waiting
6040 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6043 * bus/connection.c: (connection_disconnect_handler),
6044 (connection_watch_callback), (bus_connection_setup):
6045 * bus/dispatch.c: (send_one_message),
6046 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6047 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6049 * bus/driver.c: (bus_driver_send_service_deleted),
6050 (bus_driver_send_service_created), (bus_driver_handle_hello),
6051 (bus_driver_send_welcome_message),
6052 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6053 (bus_driver_handle_message):
6055 Refactor code, put the message dispatching in its own file. Use
6056 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6059 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6061 * dbus/dbus-internals.h:
6062 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6064 * dbus/dbus-message.c: (dbus_message_get_sender):
6065 * dbus/dbus-message.h:
6066 Implement dbus_message_get_sender.
6068 * dbus/dbus-protocol.h:
6069 Add message and service defines.
6071 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6073 * dbus/dbus-connection.c: (dbus_connection_send_message):
6074 * dbus/dbus-message-internal.h:
6075 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6076 (dbus_message_write_header):
6077 Remove _dbus_messag_unlock and don't set the client serial on a
6078 message if one already exists.
6080 2003-01-24 Havoc Pennington <hp@pobox.com>
6082 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6085 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6088 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6090 * dbus/dbus-list.c: (alloc_link), (free_link):
6091 Use a memory pool for the links.
6093 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6095 * bus/connection.c: (bus_connection_foreach):
6097 Add new bus_connection_foreach function.
6099 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6100 Add function that broadcasts a message to all clients.
6102 (bus_driver_send_service_created), (bus_driver_handle_hello),
6103 (bus_driver_send_welcome_message),
6104 (bus_driver_handle_list_services), (bus_driver_message_handler):
6105 Implement functions that take care of listing services, and notifying
6106 clients when new services are created.
6108 * bus/services.c: (bus_services_list):
6110 Add new function that returns an array of strings with the currently
6111 registered services.
6114 * glib/dbus-gmain.c:
6115 Update copyright year.
6117 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6119 * dbus/dbus-connection.c: (dbus_connection_send_message):
6120 Unlock the message in case it was sent earlier.
6122 (dbus_connection_send_message_with_reply_and_block):
6123 Remove the reply message from the list.
6125 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6126 Set array_len and new_pos correctly.
6128 (_dbus_marshal_test):
6129 Remove debug output.
6131 * dbus/dbus-message-internal.h:
6132 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6133 New function that returns the reply serial.
6135 (_dbus_message_unlock):
6136 New function that unlocks a message and resets its header.
6138 (dbus_message_append_string_array),
6139 (dbus_message_get_fields_valist),
6140 (dbus_message_iter_get_field_type),
6141 (dbus_message_iter_get_string_array),
6142 (dbus_message_get_fields),
6143 (dbus_message_append_fields_valist):
6144 Handle string arrays.
6146 (dbus_message_set_sender):
6147 Make this function public since the bus daemon needs it.
6149 (decode_header_data):
6150 Set the reply serial to -1 initially.
6152 * dbus/dbus-message.h:
6153 Add dbus_message_set_sender.
6155 2003-01-24 Havoc Pennington <hp@pobox.com>
6157 * doc/dbus-specification.sgml: add some stuff
6159 2003-01-22 Havoc Pennington <hp@pobox.com>
6161 * doc/dbus-specification.sgml: Start to document the protocol.
6163 2003-01-22 Havoc Pennington <hp@pobox.com>
6165 * dbus/dbus-connection.c
6166 (dbus_connection_send_message_with_reply_and_block): add some @todo
6168 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6170 2003-01-21 Havoc Pennington <hp@pobox.com>
6172 (patch untested because can't compile)
6174 * bus/driver.c (create_unique_client_name): make this function
6175 never recycle client names. Also, caller should initialize
6178 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6180 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6182 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6183 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6184 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6185 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6186 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6187 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6188 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6189 * dbus/dbus-marshal.h:
6190 * dbus/dbus-protocol.h:
6191 Add support for marshalling and demarshalling integer, double
6194 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6199 * bus/connection.c: (connection_disconnect_handler):
6200 Remove the connection from the bus driver's list.
6202 (connection_watch_callback): Dispatch messages.
6204 (free_connection_data): Free connection name.
6206 (bus_connection_setup): Add connection to the bus driver's list.
6207 (bus_connection_remove_owned_service):
6208 (bus_connection_set_name), (bus_connection_get_name):
6209 Add functions for setting and getting the connection's name.
6212 Add function headers.
6214 * bus/driver.c: (create_unique_client_name),
6215 (bus_driver_handle_hello_message),
6216 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6217 (bus_driver_add_connection), (bus_driver_remove_connection):
6220 * bus/services.c: (bus_service_free):
6222 New file that handles communication and registreation with the bus
6225 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6227 * dbus/dbus-connection.c: (dbus_connection_send_message):
6228 Add a new client_serial parameter.
6230 (dbus_connection_send_message_with_reply):
6231 Remove a @todo since we've implemented the blocking function.
6233 (dbus_connection_send_message_with_reply_and_block):
6234 New function that sends a message and waits for a reply and
6235 then returns the reply.
6237 * dbus/dbus-connection.h:
6240 * dbus/dbus-errors.c: (dbus_result_to_string):
6241 * dbus/dbus-errors.h:
6242 Add new DBUS_RESULT.
6244 * dbus/dbus-message-internal.h:
6245 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6246 (_dbus_message_set_sender), (dbus_message_write_header),
6247 (dbus_message_new_reply), (decode_header_data),
6248 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6249 * dbus/dbus-message.h:
6250 Add new functions that set the reply serial and sender.
6251 Also marshal and demarshal them correctly and add test.
6253 * dbus/dbus-protocol.h:
6254 Add new DBUS_MESSAGE_TYPE_SENDER.
6257 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6258 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6259 (dbus_connection_hookup_with_g_main):
6260 * glib/test-dbus-glib.c: (main):
6261 Rewrite to use GIOChannel and remove the GSource crack.
6263 * test/echo-client.c: (main):
6264 * test/watch.c: (check_messages):
6265 Update for changed APIs
6267 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6269 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6271 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6272 Create a DBusTimeoutList.
6273 (dbus_connection_set_timeout_functions): Add new function to
6274 set timeout callbacks
6276 * dbus/dbus-connection.h: Add public DBusTimeout API.
6278 * dbus/dbus-message.c: (dbus_message_get_service):
6279 * dbus/dbus-message.h: New function.
6281 * dbus/dbus-server.c: Fix small doc typo.
6283 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6285 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6287 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6288 of the string, just as long as specified.
6290 2003-01-19 Havoc Pennington <hp@pobox.com>
6292 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6295 * dbus/dbus-server.c (dbus_server_set_max_connections)
6296 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6297 keep track of current number of connections, and add API for
6298 setting a max (but haven't implemented enforcing the max yet)
6300 2003-01-18 Havoc Pennington <hp@pobox.com>
6302 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6303 reading/writing if read_watch != NULL or write_watch != NULL.
6305 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6306 the message loader code to actually load message->header and
6307 message->body into the newly-created message.
6309 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6312 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6313 (dbus_connection_get_max_message_size)
6314 (dbus_connection_set_max_live_messages_size)
6315 (dbus_connection_get_max_live_messages_size): implement some
6316 resource limitation functions
6318 * dbus/dbus-resources.c: new file implementing some of the
6319 resource limits stuff
6321 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6322 missing docs, add @todo to handle OOM etc.
6324 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6327 2003-01-18 Havoc Pennington <hp@pobox.com>
6329 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6330 connection if it hasn't been already.
6332 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6333 replace with DisconnectFunction.
6335 2003-01-18 Havoc Pennington <hp@pobox.com>
6337 Building --disable-verbose-mode --disable-asserts --disable-tests
6338 cuts the library from 112K to 45K or so
6340 * configure.in: check for varargs macro support,
6341 add --enable-verbose-mode, --enable-asserts.
6343 * dbus/dbus-internals.h (_dbus_assert): support
6345 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6347 2003-01-18 Havoc Pennington <hp@pobox.com>
6349 * dbus/dbus-test.c: include config.h so that tests actually run
6351 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6352 so the failure mode when that assumption fails will be plenty
6355 2003-01-18 Havoc Pennington <hp@pobox.com>
6357 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6359 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6362 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6363 since we don't want to use those in make check
6365 2003-01-15 Havoc Pennington <hp@redhat.com>
6371 2003-01-15 Havoc Pennington <hp@redhat.com>
6373 * test/Makefile.am: fix so that test source code ends up in the
6374 distribution on make distcheck
6376 2003-01-15 Havoc Pennington <hp@redhat.com>
6382 2003-01-15 Havoc Pennington <hp@redhat.com>
6384 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6385 fix build when --disable-tests
6387 * Makefile.am (EXTRA_DIST): put HACKING in here
6389 * HACKING: document procedure for making a tarball release.
6391 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6393 * bus/connection.c: (connection_error_handler),
6394 (bus_connection_setup):
6395 * bus/main.c: (main):
6396 Make sure that the DBusConnectionData struct is NULLed
6397 out to prevent a segfault.
6399 * dbus/dbus-errors.c: (dbus_result_to_string):
6400 * dbus/dbus-errors.h:
6401 * dbus/dbus-message.c: (dbus_message_get_fields),
6402 (dbus_message_get_fields_valist), (_dbus_message_test):
6403 * dbus/dbus-message.h:
6404 Make dbus_message_get_fields return a result code so we can
6405 track invalid fields as well as oom.
6407 2003-01-11 Havoc Pennington <hp@pobox.com>
6409 * configure.in: change --enable-test/--enable-ansi action-if-given
6410 to enable_foo=$enableval instead of enable_foo=yes
6412 2003-01-08 Havoc Pennington <hp@pobox.com>
6414 * dbus/dbus-string.c (_dbus_string_align_length): new function
6416 * dbus/dbus-test-main.c: move main() for test app here
6418 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6419 symbol to run tests, because dbus-test isn't in the main
6422 Code review nitpicks.
6424 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6425 for people with narrow emacs ;-). Assert client_serial was filled
6426 in. Assert message->name != NULL.
6427 (dbus_message_append_fields): have "first_field_type" arg separate
6428 from va list, needed for C++ binding that also uses varargs IIRC
6429 and helps with type safety
6430 (dbus_message_new): add @todo about using DBusString to store
6431 service/name internally
6432 (dbus_message_new): don't leak ->service and ->name on OOM later
6434 (dbus_message_unref): free the service name
6435 (dbus_message_get_fields): same change to varargs
6436 i.e. first_field_type
6437 (_dbus_message_loader_return_buffer): assert that the message data
6438 is aligned (if not it's a bug in our code). Put in verbose griping
6439 about why we set corrupted = TRUE.
6440 (decode_header_data): add FIXME that char* is evil. Was going to
6441 add FIXME about evil locale-specific string.h strncmp, but just
6442 switched to wacky string-as-uint32 optimization. Move check for
6443 "no room for field name" above get_const_data_len() to avoid
6444 assertion failure in get_const_data_len if we have trailing 2
6445 bytes or the like. Check for service and name fields being
6446 provided twice. Don't leak service/name on error. Require field
6447 names to be aligned to 4 bytes.
6449 * dbus/dbus-marshal.c: move byte swap stuff to header
6450 (_dbus_pack_int32): uscore-prefix
6451 (_dbus_unpack_int32): uscore-prefix
6452 (_dbus_unpack_uint32): export
6453 (_dbus_demarshal_string): add @todo complaining about use of
6455 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6456 handling allowing corrupt data to go unchecked
6458 2003-01-08 Havoc Pennington <hp@redhat.com>
6460 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6461 to the select() as needed for authentication. (should be using
6462 _dbus_poll() not select, but for another day)
6464 * dbus/dbus.h: include dbus/dbus-protocol.h
6466 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6468 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6471 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6473 * dbus/dbus-internals.c: (_dbus_type_to_string):
6474 New function that returns a string describing a type.
6476 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6477 * dbus/dbus-marshal.h:
6478 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6479 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6480 (dbus_message_iter_get_byte_array):
6481 * dbus/dbus-message.h:
6482 Add new convenience functions for appending and getting message fields.
6483 Also add demarshalling routines for byte arrays.
6485 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6487 * dbus/dbus-connection-internal.h:
6488 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6489 (_dbus_connection_get_next_client_serial),
6490 (dbus_connection_send_message):
6491 * dbus/dbus-internals.h:
6492 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6493 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6494 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6495 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6496 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6497 (_dbus_verbose_bytes), (_dbus_marshal_test):
6498 * dbus/dbus-marshal.h:
6499 * dbus/dbus-message-internal.h:
6500 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6501 (dbus_message_write_header), (_dbus_message_lock),
6502 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6503 (dbus_message_get_name), (dbus_message_append_int32),
6504 (dbus_message_append_uint32), (dbus_message_append_double),
6505 (dbus_message_append_string), (dbus_message_append_byte_array),
6506 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6507 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6508 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6509 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6510 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6511 (decode_header_data), (_dbus_message_loader_return_buffer),
6512 (message_iter_test), (_dbus_message_test):
6513 * dbus/dbus-message.h:
6514 * dbus/dbus-protocol.h:
6515 * dbus/dbus-test.c: (main):
6517 * glib/test-dbus-glib.c: (message_handler), (main):
6518 * test/echo-client.c: (main):
6519 * test/watch.c: (check_messages):
6520 Make messages sendable and receivable for real.
6522 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6524 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6525 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6526 * dbus/dbus-message.c: (dbus_message_append_int32),
6527 (dbus_message_append_uint32), (dbus_message_append_double),
6528 (dbus_message_append_string), (dbus_message_append_byte_array):
6529 Handle OOM restoration.
6531 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6533 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6534 (_dbus_demarshal_string), (_dbus_marshal_test):
6535 * dbus/dbus-marshal.h:
6536 * dbus/dbus-message.c: (dbus_message_get_name),
6537 Document these functions.
6539 (dbus_message_append_int32), (dbus_message_append_uint32),
6540 (dbus_message_append_double), (dbus_message_append_string),
6541 (dbus_message_append_byte_array):
6542 * dbus/dbus-message.h:
6543 Add functions for adding message fields of different types.
6545 * dbus/dbus-protocol.h:
6546 Add the different types.
6548 2003-01-05 Havoc Pennington <hp@pobox.com>
6550 * bus/connection.c: implement routines for handling connections,
6551 first thing is keeping a list of owned services on each connection
6552 and setting up watches etc.
6554 * bus/services.c: implement a mapping from service names to lists
6557 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6559 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6560 to use static mutexes for global data
6562 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6563 collection of functions to set/get application-specific data
6564 on the DBusConnection.
6566 2003-01-04 Havoc Pennington <hp@pobox.com>
6568 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6569 (_dbus_poll): new function
6571 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6574 * bus/loop.c: initial code for the daemon main loop
6576 2003-01-04 Havoc Pennington <hp@pobox.com>
6578 * test/watch.c (error_handler): make it safe if the error handler
6579 is called multiple times (if we s/error handler/disconnect
6580 handler/ we should just guarantee it's called only once)
6582 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6583 error handler on disconnect (it's quite possible we should
6584 just change the error handler to a "disconnect handler," I'm
6585 not sure we have any other meaningful errors)
6587 * configure.in: check for getpwnam_r
6589 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6590 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6591 mechanism as in SASL spec, using socket credentials
6593 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6594 (_dbus_send_credentials_unix_socket): new function
6596 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6598 (_dbus_write): only check errno if <0 returned
6599 (_dbus_write_two): ditto
6601 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6603 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6604 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6605 (_dbus_marshal_test):
6606 * dbus/dbus-marshal.h:
6607 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6608 to _dbus_marshal_utf8_string. Also fix some tests.
6610 2002-12-28 Harri Porten <porten@kde.org>
6612 * configure.in: added check for C++ compiler and a very cheesy
6613 check for the Qt integration
6615 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6617 * qt/Makefile.am: added
6619 * qt/.cvsignore: added
6621 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6622 latter, added #ifdef QT_THREAD_SUPPORT guard.
6624 * dbus/Makefile.am: added missing headers for make dist
6626 2002-12-28 Kristian Rietveld <kris@gtk.org>
6628 * dbus/Makefile.am: fixup export-symbols-regex.
6630 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6632 * acinclude.m4: Add this file and put the
6633 PKG_CHECK_MODULE macro in it.
6635 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6637 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6638 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6639 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6640 (_dbus_marshal_test):
6641 Make the demarshalling routines align the pos argument.
6642 Add string marshalling tests and fix the obvious bugs
6645 2002-12-26 Havoc Pennington <hp@pobox.com>
6647 * dbus/dbus-auth.c: fixes fixes fixes
6649 * dbus/dbus-transport-unix.c: wire up support for
6650 encoding/decoding data on the wire
6652 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6653 (_dbus_auth_decode_data): append to target string
6654 instead of nuking it.
6656 2002-12-26 Havoc Pennington <hp@pobox.com>
6658 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6659 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6662 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6663 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6664 now). Main point is because I wanted unpack_uint32 to implement
6666 (_dbus_verbose_bytes): new function
6668 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6670 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6671 mechanism to handle a corrupt message stream
6672 (_dbus_message_loader_new): fix preallocation to only prealloc,
6675 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6676 (_dbus_string_test): enhance tests for copy/move and fix the
6679 * dbus/dbus-transport-unix.c: Hold references in more places to
6680 avoid reentrancy problems
6682 * dbus/dbus-transport.c: ditto
6684 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6685 leak reference count in no-message case
6687 * test/watch.c (do_mainloop): handle adding/removing watches
6688 during iteration over the watches. Also, ref the connection/server
6689 stored on a watch, so we don't try to mangle a destroyed one.
6691 * dbus/dbus-transport-unix.c (do_authentication): perform
6694 * dbus/dbus-auth.c (get_state): add a state
6695 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6696 (_dbus_auth_get_unused_bytes): append the unused bytes
6697 to the passed in string, rather than prepend
6699 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6700 the auth conversation DBusAuth
6702 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6703 (_dbus_transport_new_for_domain_socket): when creating a
6704 transport, pass in whether it's a client-side or server-side
6705 transport so we know which DBusAuth to create
6707 2002-12-03 Havoc Pennington <hp@pobox.com>
6709 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6710 _after_ finalizing the derived members
6711 (unix_connection_set): unref watch if we fail to add it
6713 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6714 transport first, so that the connection owned by the
6715 transport will be valid as the transport finalizes.
6717 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6718 if necessary, and remove watches from the connection.
6720 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6722 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6724 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6725 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6726 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6727 (_dbus_marshal_test):
6728 * dbus/dbus-marshal.h:
6729 Add string marshal functions and have the demarshal functions
6730 return the new position.
6732 2002-12-25 Havoc Pennington <hp@pobox.com>
6734 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6735 it is a simple protocol that just maps directly to SASL.
6737 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6738 initial implementation, not actually used yet.
6740 * dbus/dbus-string.c (_dbus_string_find): new function
6741 (_dbus_string_equal): new function
6742 (_dbus_string_base64_encode): new function
6743 (_dbus_string_base64_decode): new function
6745 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6748 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6749 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6750 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6751 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6752 * dbus/dbus-marshal.h:
6753 * dbus/dbus-protocol.h:
6754 * dbus/dbus-test.c: (main):
6756 Add un-optimized marshalling/demarshalling routines.
6758 2002-12-25 Harri Porten <porten@kde.org>
6760 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6762 2002-12-24 Zack Rusin <zack@kde.org>
6764 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6765 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6768 2002-12-24 Havoc Pennington <hp@pobox.com>
6770 * glib/dbus-gthread.c: fix include
6772 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6773 I think glib API needs to change, though, as you don't
6774 want to use DBusMessageFunction, you want to use the
6775 DBusMessageHandler object. Probably
6776 dbus_connection_open_with_g_main_loop()
6777 and dbus_connection_setup_g_main_loop() or something like that
6778 (but think of better names...) that just create a connection
6779 that has watch/timeout functions etc. already set up.
6781 * dbus/dbus-connection.c
6782 (dbus_connection_send_message_with_reply): new function just to
6783 show how the message handler helps us deal with replies.
6785 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6787 * dbus/dbus-string.c (_dbus_string_test): free a string that
6790 * dbus/dbus-hash.c: use memory pools for the hash entries
6791 (rebuild_table): be more paranoid about overflow, and
6792 shrink table when we can
6793 (_dbus_hash_test): reduce number of sprintfs and write
6794 valid C89. Add tests for case where we grow and then
6795 shrink the hash table.
6797 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6799 * dbus/dbus-connection.c (dbus_connection_register_handler)
6800 (dbus_connection_unregister_handler): new functions
6802 * dbus/dbus-message.c (dbus_message_get_name): new
6804 * dbus/dbus-list.c: fix docs typo
6806 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6807 an object representing a handler for messages.
6809 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6812 * glib/dbus-gthread.c: (dbus_gthread_init):
6813 Don't use the gdbus prefix for public functions.
6815 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6819 Add GLib checks and fixup .pc files
6823 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6824 (gdbus_connection_check), (gdbus_connection_dispatch),
6825 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6826 (dbus_connection_gsource_new):
6827 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6828 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6829 * glib/test-dbus-glib.c: (message_handler), (main):
6832 2002-12-15 Harri Porten <porten@kde.org>
6834 * autogen.sh: check for libtoolize before attempting to use it
6836 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6839 * .cvsignore: ignore more stamp files
6841 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6843 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6844 without make install.
6846 2002-12-15 Havoc Pennington <hp@pobox.com>
6848 * dbus/dbus-threads.c: add thread stubs that a higher library
6849 layer can fill in. e.g. the GLib wrapper might fill them in with
6850 GThread stuff. We still need to use this thread API to
6851 thread-safe-ize the library.
6853 2002-12-12 Havoc Pennington <hp@pobox.com>
6855 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6856 below new interfaces and include fewer system headers.
6858 * dbus/dbus-sysdeps.c (_dbus_read): new function
6859 (_dbus_write): new function
6860 (_dbus_write_two): new function
6861 (_dbus_connect_unix_socket): new function
6862 (_dbus_listen_unix_socket): new function
6864 * dbus/dbus-message-internal.h: change interfaces to use
6867 2002-12-11 Havoc Pennington <hp@pobox.com>
6869 * dbus/dbus-types.h: add dbus_unichar
6871 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6873 * dbus/dbus-connection.c (dbus_connection_send_message): return
6876 * dbus/dbus-transport.c: include dbus-watch.h
6878 * dbus/dbus-connection.c: include dbus-message-internal.h
6880 * HACKING: add file with coding guidelines stuff.
6882 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6883 handling here, for security purposes (as in vsftpd). Not actually
6884 using this class yet.
6886 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6887 system/libc usage here, as in vsftpd, for ease of auditing (and
6888 should also simplify portability). Haven't actually moved all the
6889 system/libc usage into here yet.
6891 2002-11-25 Havoc Pennington <hp@pobox.com>
6893 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6894 always print the first verbose message.
6896 2002-11-24 Havoc Pennington <hp@pobox.com>
6898 * test/echo-client.c, test/echo-server.c: cheesy test
6901 * configure.in (AC_CHECK_FUNCS): check for writev
6903 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6906 * dbus/dbus-list.c (_dbus_list_foreach): new function
6908 * dbus/dbus-internals.c (_dbus_verbose): new function
6910 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6911 representing a server that listens for connections.
6913 * dbus/.cvsignore: create
6915 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6916 public API for reporting errors
6918 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6919 public object representing a connection that
6920 sends/receives messages. (Same object used for
6921 both client and server.)
6923 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6924 Basic abstraction for different kinds of stream
6925 that we might read/write messages from.
6927 2002-11-23 Havoc Pennington <hp@pobox.com>
6929 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6932 * dbus/dbus-test.c (main): add list test, and include
6933 dbus-test.h as intended
6935 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6936 (_dbus_hash_table_remove_int): return value indicates
6937 whether the entry existed to remove
6939 * dbus/dbus-list.c: add linked list utility class,
6942 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6945 2002-11-23 Havoc Pennington <hp@pobox.com>
6947 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6948 DBUS_END_DECLS to nothing, that should fix this once and for all
6950 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6952 * dbus/dbus-message.c, dbus/dbus-hash.c:
6953 add some missing @brief
6955 2002-11-23 Havoc Pennington <hp@pobox.com>
6957 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6958 to avoid confusing Doxygen
6960 * dbus/dbus-hash.c: @} not }@
6962 * dbus/dbus-message.c (struct DBusMessage): split out
6965 2002-11-23 Havoc Pennington <hp@pobox.com>
6967 * configure.in: pile on more warning flags if using gcc
6969 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6970 to document static functions
6972 * configure.in: add summary to end of configure so it
6973 looks nice and attractive
6975 * dbus/dbus-hash.c: finish implementation and write unit
6978 * configure.in: add --enable-tests to enable unit tests
6980 * dbus/dbus-test.c: test program to run unit tests
6981 for all files in dbus/*, initially runs a test for
6984 * dbus/dbus-internals.h: file to hold some internal utility stuff
6986 2002-11-22 Havoc Pennington <hp@redhat.com>
6988 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6989 "ported" away from Tcl
6991 * dbus/dbus-types.h: header for types such as dbus_bool_t
6993 2002-11-22 Havoc Pennington <hp@redhat.com>
6995 * dbus/dbus.h: fixups for doc warnings
6997 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6999 (QUIET): make it quiet so we can see warnings
7001 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7003 2002-11-22 Havoc Pennington <hp@redhat.com>
7005 * Makefile.am: include "Doxyfile" target in all-local
7007 * configure.in: generate the Doxyfile
7009 * Doxyfile.in: move Doxyfile here, so we can use
7010 configure to generate a Doxyfile with the right
7013 2002-11-22 Havoc Pennington <hp@redhat.com>
7015 * dbus/dbus-message.c: move inline docs into .c file
7017 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7018 so all docs are under doc/
7019 (MAN_EXTENSION): generate man pages. Use extension
7020 ".3dbus" which matches ".3qt" on my system,
7021 I guess this is OK, I don't know really.
7022 (FILE_PATTERNS): look for .c files not .h, makes sense
7025 2002-11-22 Havoc Pennington <hp@pobox.com>
7027 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7028 because any app can be a server, and any app can be a client,
7029 the bus is a special kind of server.
7031 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7033 * Doxyfile : adding. Still needs Makefile rules to be generated
7034 automatically (just run "doxygen" in the toplevel dir for now to
7037 * dbus/dbus-message.h : Adding sample docs (javadoc since
7038 resembles gtk-doc a little more)
7040 * dbus/dbus.h : Adding sample docs
7042 2002-11-21 Havoc Pennington <hp@redhat.com>
7044 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7045 so we can allow ourselves to include files directly,
7046 instead of having to use dbus.h
7048 * dbus/dbus.h: fill in
7050 * dbus/dbus-message.h: sketch out a sample header file.
7051 Include griping if you include it directly instead of
7054 * dbus/dbus-macros.h: new file with macros for extern "C",
7055 TRUE/FALSE, NULL, etc.
7057 * doc/file-boilerplate.c: put include guards in here
7059 2002-11-21 Havoc Pennington <hp@redhat.com>
7061 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7063 * COPYING: include the GPL as well, and license code
7064 under both AFL and GPL.
7066 2002-11-21 Havoc Pennington <hp@redhat.com>
7068 * acconfig.h: get rid of this
7070 * autogen.sh (run_configure): add --no-configure option
7072 * configure.in: remove AC_ARG_PROGRAM to make
7073 autoconf complain less. add AC_PREREQ.
7074 add AC_DEFINE third arg.
7076 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7079 Fix references so we can distcheck.
7081 2002-11-21 Havoc Pennington <hp@redhat.com>
7083 * Initial module creation