1 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
3 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5 * mono/Handler.cs: Updated to follow new path argument for
6 (un-)registering objects.
8 * mono/example/Makefile.am:
10 * configure.in: Bumped required version for mono and use new -pkg
13 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
15 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
16 registration functions take the path argument as char* instead of
19 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
20 split off the path decompostion part of
21 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
24 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
26 2004-06-02 Kristian Høgsberg <krh@redhat.com>
28 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
29 machine approach. A state is implemented as a function that
30 handles incoming events as specified for that state.
32 * doc/dbus-specification.xml: Update auth protocol state machine
33 specification to match implementation. Remove some leftover
36 2004-06-02 Kristian Høgsberg <krh@redhat.com>
38 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
39 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
42 * Doxyfile.in: remove deprecated options.
44 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
45 glib/test-thread.h, glib/test-thread-client.c,
46 glib/test-thread-server.c, glib/test-profile.c,
47 glib/test-dbus-glib.c: remove these unused files.
49 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
51 * dbus/dbus-object-tree.c
52 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
53 non-fallback handlers (bug #684).
54 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
55 (find_subtree_recurse): report wether the returned subtree is an
56 exact match or a "fallback" match higher up in the tree.
57 (object_tree_test_iteration): update test case.
59 2004-06-01 Seth Nickell <seth@gnome.org>
61 * python/dbus_bindings.pyx.in:
62 * python/tests/test-client.py:
64 Round off basic type support. Add dicts (yay!), and
65 remaining array types.
67 Make MessageIter more general so it works for dicts too.
69 Mark all loop variables as C integers.
71 2004-05-31 Havoc Pennington <hp@redhat.com>
73 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
76 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
78 * glib/dbus-glib-tool.c (main): set up to have a --self-test
79 option that runs the tests, and start filling in some code
80 including for starters just dumping the interfaces to stdout
82 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
84 * test/data/valid-introspection-files/lots-of-types.xml: test of
85 an example introspection file
87 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
90 2004-05-31 Seth Nickell <seth@gnome.org>
92 * python/dbus_bindings.pyx.in:
93 * python/tests/test-client.py:
98 Fix string array memory trashing bug... oops...
100 2004-05-30 Seth Nickell <seth@gnome.org>
104 Add a nicer-but-less-flexible alternate API for handling
105 calls to virtual objects in dbus.ObjectTree.
107 Screw up the argument order to the dbus.Object constructor
108 for consistency with dbus.ObjectTree (and to make dbus_methods
109 optional for future extension)
111 * python/examples/Makefile.am:
112 * python/examples/gconf-proxy-service.py:
113 * python/examples/gconf-proxy-service2.py:
115 Alternate implementation of gconf-proxy-service using the
116 nicer dbus.ObjectTree API.
118 * python/examples/example-service.py:
119 * python/tests/test-server.py
121 Reverse the argument order to deal with dbus.Object constructor
124 2004-05-30 Seth Nickell <seth@gnome.org>
126 * python/examples/example-client.py:
127 * python/examples/example-service.py:
129 Take it back. Lists seem to work but they're broken
130 in the test suite. Make the base examples use
133 2004-05-30 Seth Nickell <seth@gnome.org>
135 * python/dbus_bindings.pyx.in:
136 * python/tests/test-client.py:
138 Add some more tests and fix errors that crop up.
139 Unfortunately, currently it seems like marshalling
140 and unmarshalling of lists is completely broken :-(
142 2004-05-30 Seth Nickell <seth@gnome.org>
144 * python/dbus_bindings.pyx.in:
146 Add support for ObjectPath type.
150 Refactor message handling code to a common function.
152 * python/tests/test-client.py:
153 * python/tests/test-server.py:
155 Add tests that check to make sure values of all types
156 can be echoed from a service w/o mangling.
158 2004-05-29 Seth Nickell <seth@gnome.org>
162 Add ObjectTree class which allows implementation
163 of trees of "virtual" objects. Basically the python
164 wrapper for "register_fallback".
166 * python/examples/Makefile.am
167 * python/examples/gconf-proxy-client.py:
168 * python/examples/gconf-proxy-service.py:
170 Implement a simple GConf proxy service that supports
171 get/set on string and int GConf keys using the ObjectTree.
173 2004-05-29 Seth Nickell <seth@gnome.org>
176 * python/examples/example-client.py:
177 * python/examples/example-service.py:
178 * python/examples/list-system-services.py:
180 Add SessionBus, SystemBus and ActivationBus classes
181 so you don't need to know the special little BUS_TYPE
184 2004-05-29 Havoc Pennington <hp@redhat.com>
186 * bus/config-parser.c (process_test_valid_subdir): temporarily
187 stop testing config parser OOM handling, since expat has issues
188 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
190 * bus/dbus-daemon-1.1.in: change requested_reply to
191 send_requested_reply/receive_requested_reply so we can send the
192 replies, not just receive them.
194 * bus/config-parser.c: parse the new
195 send_requested_reply/receive_requested_reply
197 * bus/policy.c (bus_client_policy_check_can_send): add
198 requested_reply argument and use it
200 * bus/bus.c (bus_context_check_security_policy): pass through
201 requested_reply status to message send check
203 * bus/system.conf.in: adapt to requested_reply change
205 2004-05-28 Havoc Pennington <hp@redhat.com>
207 * test/glib/test-service-glib.c (main): remove unused variable
209 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
211 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
212 from the enum, no longer in use.
214 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
217 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
218 whether error_name passed in is a valid error name.
220 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
222 * dbus/dbus-message.c (dbus_message_get_args): Added support for
223 OBJECT_PATH and OBJECT_PATH_ARRAY
225 2004-05-28 Seth Nickell <seth@gnome.org>
227 * python/examples/Makefile.am:
229 Forget to add Makefile.am. Do not pass go.
231 2004-05-28 Michael Meeks <michael@ximian.com>
233 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
236 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
238 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
239 (_dbus_message_iter_get_basic_type_array): impl.
240 drastically simplify ~all relevant _get methods to use these.
241 (_dbus_message_iter_append_basic_array),
242 (dbus_message_iter_append_basic): impl
243 drastically simplify ~all relevant _append methods to use these.
245 * dbus/dbus-message-builder.c (parse_basic_type)
246 (parse_basic_array, lookup_basic_type): impl.
247 (_dbus_message_data_load): prune scads of duplicate /
250 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
251 (_dbus_demarshal_basic_type): implement,
252 (demarshal_and_validate_len/arg): beef up debug.
253 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
255 2004-05-27 Seth Nickell <seth@gnome.org>
258 * python/Makefile.am:
260 Include the example python apps in the tarball.
262 * python/examples/list-system-services.py
264 Add a python new example that fetches the list of services
267 2004-05-27 Seth Nickell <seth@gnome.org>
270 * python/dbus_bindings.pyx.in:
272 Fix failure to notify that a signal was not handled,
273 resulted in hung functions.
275 2004-05-25 Colin Walters <walters@redhat.com>
277 * tools/dbus-monitor.c (main): Monitor all types of messages.
279 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
281 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
282 which unregisters the object path and disposes the handler.
284 2004-05-23 Kristian Høgsberg <krh@redhat.com>
286 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
288 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
289 operands to && so we call dbus_message_iter_next () for the last
292 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
294 * dbus/dbus-object-tree.c
295 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
296 children even if the requested path isn't registered.
297 (object_tree_test_iteration): test object_tree_list_registered.
299 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
302 2004-05-20 Kristian Høgsberg <krh@redhat.com>
304 * doc/TODO: Remove resolved items.
306 * bus/expirelist.h (struct BusExpireList): remove unused n_items
309 * bus/connection.c (bus_connections_expect_reply): Enforce the
310 per-connection limit on pending replies.
312 Patch from Jon Trowbridge <trow@ximian.com>:
314 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
315 up a watch that triggers a config reload when one end of the pipe
317 (signal_handler): Instead of doing the config reload in our SIGHUP
318 handler, just write to the reload pipe and let the associated
319 watch handle the reload when control returns to the main loop.
321 * bus/driver.c (bus_driver_handle_reload_config): Added.
322 Implements a ReloadConfig method for requesting a configuration
323 file reload via the bus driver.
325 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
327 * HACKING: Updated release instructions concerning the wiki page.
329 2004-05-18 Kristian Høgsberg <krh@redhat.com>
331 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
332 filter against auth->allowed_mechs; we only add allowed mechs in
335 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
336 ALLOWED_MECHS to auth-script format so we can set the list of
339 * data/auth/client-out-of-mechanisms.auth-script: New test to
340 check client disconnects when it is out of mechanisms to try.
342 * dbus/dbus-auth.c (process_command): Remove check for lines
343 longer that 1 MB; we only buffer up maximum 16 kB.
345 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
346 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
347 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
348 assume there might be unused bytes.
350 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
351 client-out-of-mechs, it is handled in process_reject(). Move check
352 for max failures to send_rejected(), as it's a server-only thing.
354 * dbus/dbus-auth.c: Factor out protocol reply code into functions
355 send_auth(), send_data(), send_rejected(), send_error(),
356 send_ok(), send_begin() and send_cancel().
358 2004-05-17 Kristian Høgsberg <krh@redhat.com>
360 Remove base64 encoding, replace with hex encoding. Original patch
361 from trow@ximian.com, added error handling.
363 * dbus/dbus-string.c (_dbus_string_base64_encode)
364 (_dbus_string_base64_decode): Remove.
365 (_dbus_string_hex_decode): Add end_return argument so we can
366 distinguish between OOM and invalid hex encoding.
367 (_dbus_string_test): Remove base64 tests and add test case for
370 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
371 Replace base64 with hex.
373 * test/data/auth/invalid-hex-encoding.auth-script: New test case
374 for invalid hex encoded data in auth protocol.
376 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
378 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
381 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
383 * mono/dbus-sharp.dll.config.in: Added for GAC
384 * mono/dbus-sharp.snk: Added for GAC
385 * mono/Assembly.cs.in: Added for GAC
386 * mono/Makefile.am: Changes for GAC installation
387 * configure.in: Added refs for dbus-sharp.dll.config.in and
388 Assembly.cs.in. More fixes for mono testing
389 * mono/example/Makefile.am: Changed var to CSC
390 * Makefile.am: Changed flag name to DBUS_USE_CSC
392 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
394 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
395 * mono/doc/*: Added documentation framework
396 * configure.in: Added monodoc check
397 * README: Added description of mono configure flags
399 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
401 * doc/dbus-specification.xml: Added a "Required" column to the
402 header fields table and changed the "zero or more" verbage in
403 the above paragraph to read "The header must contain the required
404 named header fields and zero or more of the optional named header
406 * test/data/invalid-messages/*.message: Added the required PATH
407 named header field to the tests so that they don't fail on
410 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
412 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
413 the stack by implicitly defining variable and parameter types and
414 removing the hack of defining C pointers as python objects and later
417 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
419 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
421 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
423 * mono/DBusType/Dict.cs: Handle empty dicts
424 * mono/DBusType/Array.cs: Handle empty arrays
425 * mono/Arguments.cs: Handle empty arguments
428 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
430 * dbus-sharp.pc.in: Modified to include include Libs and Requires
433 2004-04-25 Kristian Høgsberg <krh@redhat.com>
435 * test/data/valid-messages/standard-*.message: Update message
436 test scripts to new header field names.
438 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
440 * test/break-loader.c (randomly_do_n_things): tracked down buffer
441 overflow to times_we_did_each_thing array which would chop off the
442 first character of the failure_dir string. Increased the size of
443 the array to 7 to reflect the number of random mutation functions
446 2004-04-21 Kristian Høgsberg <krh@redhat.com>
448 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
449 unix_server->watch here, it is unreffed in disconnect.
450 (_dbus_server_new_for_tcp_socket): convert NULL host to
451 "localhost" here so we don't append NULL to address.
453 * dbus/dbus-server.c (_dbus_server_test): Add test case for
454 various addresses, including tcp with no explicit host.
456 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
458 * dbus/dbus-message.c (decode_header_data, decode_string_field):
459 fix incorrect setting of .name_offset in the HeaderField (it was
460 off by two bytes, positioned right after the name and typecode)
462 * bus/bus.c (bus_context_new, bus_context_unref): test before
463 calling dbus_server_free_data_slot and _dbus_user_database_unref
466 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
469 2004-04-19 Kristian Høgsberg <krh@redhat.com>
471 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
472 _dbus_poll() instead of select().
474 2004-04-15 Jon Trowbridge <trow@ximian.com>
476 * bus/main.c (signal_handler): Reload the configuration files
478 (main): Set up our SIGHUP handler.
480 * bus/bus.c (struct BusContext): Store the config file, user and
481 fork flag in the BusContext.
482 (process_config_first_time_only): Added. Contains the code
483 (previously in bus_context_new) for setting up the BusContext from
484 the BusConfigParser that should only be run the first time the
485 config files are read.
486 (process_config_every_time): Added. Contains the code (previously
487 in bus_context_new) for setting up the BusContext from the
488 BusConfigParser that should be run every time the config files are
490 (load_config): Added. Builds a BusConfigParser from the config
491 files and passes the resulting structure off to
492 process_config_first_time_only (assuming this is the first time)
493 and process_config_every_time.
494 (bus_context_new): All of the config-related code has been moved
495 to process_config_first_time_only and process_config_every_time.
496 Now this function just does the non-config-related initializations
497 and calls load_config.
498 (bus_context_reload_config): Added.
500 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
502 * bus/driver.c (bus_driver_handle_get_service_owner):
503 implement a GetServiceOwner method.
504 * doc/dbus-specification.xml: document it.
505 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
507 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
508 implement, using the bus GetServiceOwner method.
510 * test/glib/test-dbus-glib.c:
511 use dbus_gproxy_new_for_service_owner so that we can receive the
514 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
516 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
517 dbus/dbus-message.c, dbus/dbus-protocol.h
518 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
520 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
521 dbus/dbus-message.c, dbus/dbus-protocol.h
522 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
524 * dbus/dbus-internals.c (_dbus_header_field_to_string):
525 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
526 DBUS_HEADER_FIELD_SENDER resolves to "sender"
528 * doc/dbus-specification.xml (Header Fields Table):
529 s/SERVICE/DESTINATION
530 s/SENDER_SERVICE/SENDER
533 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
535 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
538 2004-04-13 Michael Meeks <michael@ximian.com>
540 * glib/dbus-gobject.c (handle_introspect): split out
541 (introspect_properties): this.
542 (handle_introspect): implement this.
544 * test/glib/Makefile.am: use the absolute path so the bus
545 daemon's chdir ("/") doesn't kill us dead.
547 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
549 2004-04-12 Jon Trowbridge <trow@ximian.com>
551 * bus/config-parser.c (struct BusConfigParser): Added
552 included_files field.
553 (seen_include): Added. Checks whether or not a file has already
554 been included by any parent BusConfigParser.
555 (bus_config_parser_new): Copy the parent's included_files.
556 (include_file): Track which files have been included, and fail on
558 (process_test_valid_subdir): Changed printf to report if we are
559 testing valid or invalid conf files.
560 (all_are_equiv): Changed printf to be a bit clearer about
561 what we are actually doing.
562 (bus_config_parser_test): Test invalid configuration files.
564 2004-04-09 Jon Trowbridge <trow@ximian.com>
566 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
567 argument. If non-null, the newly-constructed BusConfigParser will
568 be initialized with the parent's BusLimits instead of the default
570 (include_file): When including a config file, pass in
571 the current parser as the parent and then copy the BusLimits
572 from the included BusConfigParser pack to the current parser.
573 (process_test_valid_subdir): Renamed from process_test_subdir.
574 (process_test_equiv_subdir): Added. Walks through a directory,
575 descending into each subdirectory and loading the config files
576 it finds there. If any subdirectory contains two config files
577 that don't produce identical BusConfigParser structs, fail.
578 For now, the BusConfigParser's BusPolicies are not compared.
579 (bus_config_parser_test): Call both process_test_valid_subdir and
580 process_test_equiv_subdir.
582 * bus/config-loader-libxml.c (bus_config_load): Take a parent
583 argument and pass it along to the call to bus_config_parser_new.
584 Also made a few small changes to allow this code to compile.
586 * bus/config-loader-expat.c (bus_config_load): Take a parent
587 argument and pass it along to the call to bus_config_parser_new.
589 * bus/bus.c (bus_context_new): Load the config file
590 with a NULL parent argument.
592 2004-03-29 Michael Meeks <michael@ximian.com>
594 * glib/dbus-gobject.c (introspect_properties): split
595 out, fix mangled 'while' flow control.
596 (introspect_signals): implement.
597 (handle_introspect): update.
599 2004-03-29 Michael Meeks <michael@ximian.com>
601 * glib/dbus-gobject.c (set_object_property): split out /
602 re-work, use the property type, and not the message type(!)
603 (get_object_property): ditto.
605 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
606 (dbus_gvalue_marshal): make this code re-usable, needed
607 for signals too, also on both proxy and server side.
608 Re-write for more efficiency / readability.
610 2004-03-29 Michael Meeks <michael@ximian.com>
612 * dbus/dbus-message.c
613 (dbus_message_new_error_printf): impl.
615 * dbus/dbus-connection.c
616 (dbus_connection_unregister_object_path): fix warning.
618 * configure.in: fix no-mono-installed situation.
620 2004-03-27 Havoc Pennington <hp@redhat.com>
622 Patch from Timo Teräs:
624 * tools/dbus-send.c (main): if --print-reply, assume type is
625 method call; support boolean type args
627 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
628 bunch of memleak and logic bugs
630 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
633 * mono/Introspector.cs:
635 * mono/InterfaceProxy.cs:
637 * mono/ProxyBuilder.cs:
639 Added InterfaceProxy class to avoid building proxies for every
643 * dbus-message.c (dbus_message_append_args_valist)
644 (dbus_message_iter_get_object_path)
645 (dbus_message_iter_get_object_path_array)
646 (dbus_message_iter_append_object_path)
647 (dbus_message_iter_append_object_path_array):
648 Added object_path iter functions to handle OBJECT_PATH arguments
650 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
652 First checkin of mono bindings.
655 Build stuff for the bindings
656 * dbus-sharp.pc.in: Added for pkgconfig
658 2004-03-21 Havoc Pennington <hp@redhat.com>
660 * test/test-service.c (main): remove debug spew
662 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
664 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
667 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
668 (dbus_message_iter_init_array_iterator)
669 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
670 indicate whether the iterator is empty
672 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
675 2004-03-19 Havoc Pennington <hp@redhat.com>
681 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
683 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
684 you don't need pyrex to make dist
686 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
689 2004-03-18 Richard Hult <richard@imendio.com>
691 * dbus/dbus-message.c (dbus_message_get_auto_activation)
692 (dbus_message_set_auto_activation): Add doxygen docs.
694 2004-03-16 Richard Hult <richard@imendio.com>
696 * bus/activation.c: (bus_activation_service_created),
697 (bus_activation_send_pending_auto_activation_messages),
698 (bus_activation_activate_service):
700 * bus/dispatch.c: (bus_dispatch),
701 (check_nonexistent_service_auto_activation),
702 (check_service_auto_activated),
703 (check_segfault_service_auto_activation),
704 (check_existent_service_auto_activation), (bus_dispatch_test):
705 * bus/driver.c: (bus_driver_handle_activate_service):
706 * bus/services.c: (bus_registry_acquire_service):
707 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
708 (dbus_message_get_auto_activation):
709 * dbus/dbus-message.h:
710 * dbus/dbus-protocol.h: Implement auto-activation.
712 * doc/dbus-specification.xml: Add auto-activation to the spec.
714 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
716 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
717 fix a bug with CUSTOM types.
719 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
720 a unit test for this bug (used to fail).
722 2004-03-12 Mikael Hallendal <micke@imendio.com>
725 (babysitter_watch_callback): notify all pending activations waiting for
726 the same exec that the activation failed.
727 (bus_activation_activate_service): shortcut the activation if we
728 already waiting for the same executable to start up.
730 2004-03-12 Mikael Hallendal <micke@imendio.com>
733 - Added service file reloading.
734 Each service files directory is kept in an hash table in
735 BusActivation and each BusActivationEntry knows what .service-file it
736 was read from. So when you try to activate a service the bus will
737 check if it's been updated, removed or if new .service-files has
739 - Test code at the bottom for the service file reloading.
740 * bus/test-main.c: (main):
742 - added service reloading test.
743 * dbus/dbus-sysdeps.c:
744 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
746 2004-03-08 Michael Meeks <michael@ximian.com>
748 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
749 bail immediately if disconnected, to avoid busy loop.
751 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
752 cleanup cut/paste/inefficiency.
754 2004-03-01 David Zeuthen <david@fubar.dk>
756 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
757 bug where args were used twice. This bug resulted in a segfault
758 on a Debian/PPC system when starting the messagebus daemon. Include
759 dbus-sysdeps.h for DBUS_VA_COPY
761 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
763 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
764 appropriate va_copy implementation. From GLib
766 2004-02-24 Joe Shaw <joe@ximian.com>
768 * bus/services.c (bus_registry_acquire_service): We need to pass
769 in the service name to dbus_set_error() to prevent a crash.
771 2003-12-26 Anders Carlsson <andersca@gnome.org>
773 * AUTHORS: Reveal my True identity.
775 2003-12-17 Mikael Hallendal <micke@imendio.com>
777 * dbus/dbus-message.c: (dbus_message_append_args_valist):
778 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
780 2003-12-13 Mikael Hallendal <micke@imendio.com>
782 * doc/TODO: Added not about better error check of configuration files.
784 2003-12-02 Richard Hult <richard@imendio.com>
786 * Update AFL version to 2.0 throughout the source files to reflect
787 the update that was done a while ago.
789 2003-12-02 Richard Hult <richard@imendio.com>
791 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
792 wrote_dict_key to FALSE on the iter that the dict is appended to,
793 just like when appending other types. Fixes a bug where a dict
794 couldn't be put inside a dict.
795 (dbus_message_iter_append_dict_key): Fix typo in warning message.
796 (message_iter_test, _dbus_message_test): Add test case for dict
799 2003-12-01 David Zeuthen <david@fubar.dk>
801 * python/dbus.py: Add the actual message when calling the reciever
802 of a signal such that parameters can be inspected. Add the method
803 remove_signal_receiver
805 2003-11-26 Mikael Hallendal <micke@imendio.com>
809 * glib/*.[ch]: Made ref functions return the pointer
811 2003-11-25 Zack Rusin <zack@kde.org>
813 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
815 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
818 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
819 the Integrator and to better fit with the server,
821 2003-11-24 Zack Rusin <zack@kde.org>
823 * qt/connection.h, qt/connection.cpp: removing initDbus method since
824 the integrator handles it now
826 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
827 since QTimer wasn't really meant to be used the way DBusTimeout is
829 2003-11-24 Zack Rusin <zack@kde.org>
831 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
832 Integrator class which integrates D-BUS with the Qt event loop,
834 * qt/connection.h, qt/connection.cpp: Move all the code which
835 was dealing with D-BUS integration to the Integrator class,
836 and start using Integrator,
838 2003-11-23 Zack Rusin <zack@kde.org>
840 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
843 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
844 switching namespaces to DBusQt, reworking the class,
846 * Makefile.cvs: switching dependencies so that it matches KDE
849 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
852 2003-11-19 Havoc Pennington <hp@redhat.com>
856 * configure.in: bump version to 0.20
858 * configure.in (have_qt): add yet another place to look for qt
859 (someone hand trolltech a .pc file...)
861 2003-11-01 Havoc Pennington <hp@redhat.com>
863 * doc/dbus-specification.xml: add state machine docs on the auth
864 protocol; just a first draft, I'm sure it's wrong.
866 2003-10-28 David Zeuthen <david@fubar.dk>
868 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
869 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
871 2003-10-28 Havoc Pennington <hp@redhat.com>
873 * dbus/dbus-message.c (get_next_field): delete unused function
875 2003-10-28 Havoc Pennington <hp@redhat.com>
877 * bus/expirelist.c (do_expiration_with_current_time): detect
878 failure of the expire_func due to OOM
880 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
882 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
883 NoReply error that's now created by the bus when the service exits
885 2003-10-28 Havoc Pennington <hp@redhat.com>
887 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
888 tests for set_path, set_interface, set_member, etc.
890 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
892 * dbus/dbus-message.c (set_string_field): always just delete and
893 re-append the field; accept NULL for deletion
894 (re_align_fields_recurse): reimplement
896 2003-10-26 Havoc Pennington <hp@redhat.com>
898 * dbus/dbus-connection.c: fix docs to properly describe the
900 (_dbus_connection_notify_disconnected): remove this function;
901 we can't synchronously add the disconnected message, we have to
902 do it after we've queued any remaining real messages
903 (_dbus_connection_get_dispatch_status_unlocked): queue the
904 disconnect message only if the transport has finished queueing all
905 its real messages and is disconnected.
906 (dbus_connection_disconnect): update the dispatch status here
908 2003-10-22 Havoc Pennington <hp@redhat.com>
910 * bus/bus.c (bus_context_check_security_policy): fix up assertion
912 * bus/connection.c (bus_transaction_send_from_driver): set the
913 destination to the connection's base service
915 2003-10-20 Havoc Pennington <hp@redhat.com>
917 hmm, make check is currently not passing.
919 * doc/dbus-specification.xml: add requirement that custom type
920 names follow the same rules as interface names.
922 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
923 duplication and allow 'c' to be 'custom'; dict is now 'm' for
926 * doc/dbus-specification.xml: update type codes to match
927 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
928 CUSTOM. Add type OBJECT_PATH to the spec.
930 2003-10-17 Havoc Pennington <hp@redhat.com>
932 * bus/driver.c (create_unique_client_name): use "." as separator
933 in base service names instead of '-'
935 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
936 byte at the end of the string
938 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
939 optimization macros since string validation seems to be a slow
942 * doc/dbus-specification.xml: restrict valid
943 service/interface/member/error names. Add test suite code for the
946 * dbus/dbus-string.c: limit service/interface/member/error names
949 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
950 format arg to verbose spew
952 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
953 memory, return instead of g_error
955 * test/test-service.c (path_message_func): support emitting a
958 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
959 activation bus type if DBUS_BUS_ACTIVATION was set; default to
960 assuming the activation bus was the session bus so that services
961 started manually will still register.
962 (init_connections_unlocked): fix so that in OOM situation we get
963 the same semantics when retrying the function
965 * test/test-service.c (main): change to use path registration, to
966 test those codepaths; register with DBUS_BUS_ACTIVATION rather
967 than DBUS_BUS_SESSION
969 2003-10-16 Havoc Pennington <hp@redhat.com>
971 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
973 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
974 coverage of the tests
975 (coverage-report.txt): don't move the .da and .bbg files around
977 2003-10-16 Havoc Pennington <hp@redhat.com>
979 * bus/bus.c (struct BusContext): remove struct field I didn't mean
982 2003-10-16 Havoc Pennington <hp@redhat.com>
984 * bus/connection.c (bus_pending_reply_expired): either cancel or
986 (bus_connections_check_reply): use unlink, not remove_link, as we
987 don't want to free the link; fixes double free mess
989 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
990 where no reply was received
992 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
995 * bus/signals.c (match_rule_matches): add special cases for the
996 bus driver, so you can match on sender/destination for it.
998 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
999 DBUS_PRINT_BACKTRACE is set
1001 * dbus/dbus-internals.c: add pid to assertion failure messages
1003 * dbus/dbus-connection.c: add message type code to the debug spew
1005 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1006 sender=foo not service=foo
1008 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1009 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1010 DBUS_ACTIVATION_ADDRESS instead
1012 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1013 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1015 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1018 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1019 (dbus_message_iter_get_object_path_array): new function (half
1020 finished, disabled for the moment)
1022 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1023 DBUS_MESSAGE_TYPE_ERROR
1025 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1026 avoid redirecting stderr to /dev/null
1027 (babysit): close stdin if not doing the "exit_with_session" thing
1029 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1030 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1031 stdout/stdin, so things don't get confused
1033 * bus/system.conf.in: fix to allow replies, I modified .conf
1034 instead of .conf.in again.
1036 2003-10-14 David Zeuthen <david@fubar.dk>
1038 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1039 argtype to arg_type when raising unknown arg type exception.
1040 Changed type list to reflect the changes in dbus-protocol.h so
1041 the bindings actually work.
1043 2003-10-14 Havoc Pennington <hp@redhat.com>
1045 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1046 to have a bug keeping it from outputting the .da files sometimes
1047 (string_get_string): don't append garbage nul bytes to the string.
1049 2003-10-15 Seth Nickell <seth@gnome.org>
1051 * python/Makefile.am:
1053 Include dbus_h_wrapper.h in the dist tarball.
1055 2003-10-14 Havoc Pennington <hp@redhat.com>
1057 * bus/bus.c (bus_context_check_security_policy): revamp this to
1058 work more sanely with new policy-based requested reply setup
1060 * bus/connection.c (bus_transaction_send_from_driver): set bus
1061 driver messages as no reply
1063 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1064 requested_reply attribute on allow/deny rules
1066 * bus/system.conf: add <allow requested_reply="true"/>
1068 * bus/driver.c (bus_driver_handle_message): fix check for replies
1069 sent to the bus driver, which was backward. How did this ever work
1070 at all though? I think I'm missing something.
1072 * dbus/dbus-message.c (decode_header_data): require error and
1073 method return messages to have a reply serial field to be valid
1074 (_dbus_message_loader_queue_messages): break up this function;
1075 validate that reply serial and plain serial are nonzero;
1076 clean up the OOM/error handling.
1077 (get_uint_field): don't return -1 from this
1078 (dbus_message_create_header): fix signed/unsigned bug
1080 * bus/connection.c (bus_connections_expect_reply): save serial of
1081 the incoming message, not reply serial
1083 2003-10-14 Havoc Pennington <hp@redhat.com>
1085 * bus/connection.c: implement pending reply tracking using
1088 * bus/bus.c (bus_context_check_security_policy): verify that a
1089 reply is pending in order to allow a reply to be sent. Deny
1090 messages of unknown type.
1092 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1094 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1095 (bus_context_get_reply_timeout): new
1097 2003-10-13 Seth Nickell <seth@gnome.org>
1099 * python/Makefile.am:
1101 Pass "make distcheck": remove a couple files from DIST_FILES
1102 that weren't included in the final version.
1104 2003-10-12 Havoc Pennington <hp@pobox.com>
1106 Added test code that 1) starts an actual bus daemon and 2) uses
1107 DBusGProxy; fixed bugs that were revealed by the test. Lots
1108 more testing possible, but this is the basic framework.
1110 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1111 empty proxy lists from the proxy list hash
1113 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1114 couple of return_if_fail checks
1116 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1117 to allocate, so everything is cleared to NULL as it should be.
1119 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1120 source as data to dbus_connection_set_timeout_functions() as the
1121 timeout functions expected
1123 * test/glib/run-test.sh: add a little script to start up a message
1124 bus and run tests using it
1126 * tools/dbus-launch.1: updates
1128 * tools/dbus-launch.c (main): add --config-file option
1130 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1131 that could never be reached.
1133 * dbus/dbus-message.c (dbus_message_new_method_return)
1134 (dbus_message_new_error, dbus_message_new_signal): set the
1135 no-reply-expected flag on all these. Redundant, but may
1136 as well be consistent.
1138 2003-10-11 Havoc Pennington <hp@pobox.com>
1140 * test/decode-gcov.c (function_solve_graph): make broken block
1141 graph a nonfatal error since it seems to be broken. Need to debug
1144 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1145 can't just check type > INVALID < LAST anymore
1147 * dbus/dbus-message.c (dbus_message_get_signature): new function
1148 (dbus_message_has_signature): new function
1149 (struct DBusMessage): add signature field (right now it isn't sent
1150 over the wire, just generated on the fly)
1151 (dbus_message_copy): copy the signature, and init strings to
1152 proper length to avoid some reallocs
1153 (dbus_message_iter_init_array_iterator): return void, since it
1155 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1156 (_dbus_message_loader_queue_messages): add silly temporary hack to
1157 fill in message->signature on load
1159 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1160 characters, so they are relatively human-readable.
1162 2003-10-11 Havoc Pennington <hp@pobox.com>
1164 * dbus/dbus-message.c (_dbus_message_test): add more test
1165 coverage, but #if 0 for now since they uncover a bug
1166 not fixed yet; I think in re_align_field_recurse()
1167 (re_align_field_recurse): add FIXME about broken assertion
1169 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1171 * bus/connection.c: share a couple code bits with expirelist.c
1173 * bus/expirelist.h, bus/expirelist.c: implement a generic
1174 expire-items-after-N-seconds facility, was going to share between
1175 expiring connections and replies, decided not to use for expiring
1176 connections for now.
1178 * COPYING: include AFL 2.0 (still need to change all the file headers)
1180 2003-10-09 Havoc Pennington <hp@redhat.com>
1182 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1183 gcc 3.3. Not that we do anything about it yet.
1185 * bus/signals.c (bus_match_rule_parse): impose max length on the
1188 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1190 2003-10-09 Havoc Pennington <hp@redhat.com>
1192 Make matching rules theoretically work (add parser).
1194 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1195 the case where destination is explicitly specified as bus driver
1196 and someone else is eavesdropping.
1198 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1199 definition of eavesdropping and assertion
1201 * tools/dbus-send.c (main): use dbus_message_type_from_string
1203 * bus/signals.c (bus_match_rule_parse): implement
1205 * dbus/dbus-message.c (dbus_message_type_from_string): new
1207 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1209 2003-10-02 Havoc Pennington <hp@pobox.com>
1211 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1212 dbus_gproxy_oneway_call
1214 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1215 (dbus_server_setup_with_g_main): fix to allow calling them more
1216 than once on the same args
1217 (dbus_bus_get_with_g_main): new function
1219 2003-10-02 Havoc Pennington <hp@redhat.com>
1221 * doc/dbus-tutorial.xml: write some stuff
1223 2003-09-29 Havoc Pennington <hp@pobox.com>
1225 * configure.in: split checks for Doxygen from XML docs, check for
1228 * doc/Makefile.am: XML-ify all the docs, and add a blank
1231 2003-09-29 Havoc Pennington <hp@pobox.com>
1233 * Merge dbus-object-names branch. To see the entire patch
1234 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1235 it's huuuuge though.
1236 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1238 2003-09-28 Havoc Pennington <hp@pobox.com>
1240 * HACKING: update to reflect new server
1242 2003-09-26 Seth Nickell <seth@gnome.org>
1245 * python/examples/example-signals.py:
1247 Start implementing some notions of signals. The API
1248 is really terrible, but they sort of work (with the
1249 exception of being able to filter by service, and to
1250 transmit signals *as* a particular service). Need to
1251 figure out how to make messages come from the service
1254 * python/dbus_bindings.pyx.in:
1256 Removed duplicate message_handler callbacks.
1258 2003-09-25 Havoc Pennington <hp@redhat.com>
1260 * bus/session.conf.in: fix my mess
1262 2003-09-25 Havoc Pennington <hp@pobox.com>
1264 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1266 2003-09-25 Seth Nickell <seth@gnome.org>
1268 * python/examples/example-service.py:
1270 Johan notices complete wrong code in example-service, but
1271 completely wrong in a way that works exactly the same (!).
1272 Johan is confused, how could this possibly work? Example
1273 code fails to serve purpose of making things clear.
1276 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1278 * doc/dbus-specification.sgml: don't require header fields
1279 to be 4-byte aligned and specify that fields should be
1280 distinguished from padding by the fact that zero is not
1283 * doc/TODO: remove re-alignment item and add item to doc
1284 the OBJECT_PATH type.
1286 * dbus/dbus-message.c:
1287 (HeaderField): rename the original member to value_offset
1288 and introduce a name_offset member to keep track of where
1289 the field actually begins.
1290 (adjust_field_offsets): remove.
1291 (append_int_field), (append_uint_field),
1292 (append_string_field): don't align the start of the header
1293 field to a 4-byte boundary.
1294 (get_next_field): impl finding the next marhsalled field
1295 after a given field.
1296 (re_align_field_recurse): impl re-aligning a number of
1297 already marshalled fields.
1298 (delete_field): impl deleting a field of any type and
1299 re-aligning any following fields.
1300 (delete_int_or_uint_field), (delete_string_field): remove.
1301 (set_int_field), (set_uint_field): no need to re-check
1302 that we have the correct type for the field.
1303 (set_string_field): ditto and impl re-aligning any
1305 (decode_header_data): update to take into account that
1306 the fields aren't 4-byte aligned any more and the new
1307 way to distinguish padding from header fields. Also,
1308 don't exit when there is too much header padding.
1309 (process_test_subdir): print the directory.
1310 (_dbus_message_test): add test to make sure a following
1311 field is re-aligned correctly after field deletion.
1313 * dbus/dbus-string.[ch]:
1314 (_dbus_string_insert_bytes): rename from insert_byte and
1315 allow the insert of multiple bytes.
1316 (_dbus_string_test): test inserting multiple bytes.
1318 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1319 warning note to docs about having to re-align any
1320 marshalled values following the string.
1322 * dbus/dbus-message-builder.c:
1323 (append_string_field), (_dbus_message_data_load):
1324 don't align the header field.
1326 * dbus/dbus-auth.c: (process_test_subdir): print the
1329 * test/break-loader.c: (randomly_add_one_byte): upd. for
1332 * test/data/invalid-messages/bad-header-field-alignment.message:
1335 * test/data/valid-messages/unknown-header-field.message: shove
1336 a dict in the unknown field.
1338 2003-09-25 Seth Nickell <seth@gnome.org>
1341 * python/dbus_bindings.pyx.in:
1343 Handle return values.
1345 * python/examples/example-client.py:
1346 * python/examples/example-service.py:
1348 Pass back return values from the service to the client.
1350 2003-09-24 Seth Nickell <seth@gnome.org>
1354 Connect Object methods (when you are sharing an object) up... pass
1355 in a list of methods to be shared. Sharing all the methods just
1356 worked out too weird. You can now create nice Services over the
1359 * python/dbus_bindings.pyx.in:
1361 Keep references to user_data tuples passed into C functions so
1362 Python doesn't garbage collect on us.
1364 Implement MethodReturn and Error subclasses of Message for creating
1365 DBusMessage's of those types.
1367 * python/examples/example-client.py:
1368 * python/examples/example-service.py:
1370 Simple example code showing both how create DBus services and objects,
1371 and how to use them.
1373 2003-09-23 Havoc Pennington <hp@pobox.com>
1375 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1377 2003-09-23 Havoc Pennington <hp@redhat.com>
1379 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1380 (dbus_gproxy_disconnect_signal): implement
1381 (dbus_gproxy_manager_remove_signal_match): implement
1382 (dbus_gproxy_manager_add_signal_match): implement
1383 (dbus_gproxy_oneway_call): implement
1385 2003-09-23 Havoc Pennington <hp@pobox.com>
1387 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1388 subclass. This means dropping the transparent thread safety of the
1389 proxy; you now need a separate proxy per-thread, or your own
1390 locking on the proxy. Probably right anyway.
1391 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1393 2003-09-22 Havoc Pennington <hp@redhat.com>
1395 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1397 2003-09-21 Seth Nickell <seth@gnome.org>
1399 First checkin of the Python bindings.
1401 * python/.cvsignore:
1402 * python/Makefile.am:
1403 * python/dbus_bindings.pyx.in:
1404 * python/dbus_h_wrapper.h:
1406 Pieces for Pyrex to operate on, building a dbus_bindings.so
1407 python module for low-level access to the DBus APIs.
1411 High-level Python module for accessing DBus objects.
1416 Build stuff for the python bindings.
1420 Extra macro needed for finding the Python C header files.
1422 2003-09-21 Havoc Pennington <hp@pobox.com>
1424 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1425 implementing the proxy manager, didn't get very far.
1427 * dbus/dbus-bus.c (dbus_bus_add_match): new
1428 (dbus_bus_remove_match): new
1430 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1431 path_name argument; adjust the other not-yet-implemented
1432 gproxy constructors to be what I think they should be.
1434 2003-09-21 Havoc Pennington <hp@pobox.com>
1436 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1437 by default for message bus connections.
1439 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1440 exit_on_disconnect flag is set and we process the disconnected
1442 (dbus_connection_set_exit_on_disconnect): new function
1444 2003-09-21 Havoc Pennington <hp@pobox.com>
1446 Get matching rules mostly working in the bus; only actually
1447 parsing the rule text remains. However, the client side of
1448 "signal connections" hasn't been started, this patch is only the
1451 * dbus/dispatch.c: fix for the matching rules changes
1453 * bus/driver.c (bus_driver_handle_remove_match)
1454 (bus_driver_handle_add_match): send an ack reply from these
1457 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1458 arguments, reported by Seth Nickell
1460 * bus/config-parser.c (append_rule_from_element): support
1461 eavesdrop=true|false attribute on policies so match rules
1462 can be prevented from snooping on the system bus.
1464 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1465 and "destination" in attribute names; fix some docs bugs;
1466 add eavesdrop=true|false attribute
1468 * bus/driver.c (bus_driver_handle_add_match)
1469 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1472 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1473 rid of broadcast service concept, signals are just always broadcast
1475 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1476 mostly implement matching rules stuff (currently only exposed as signal
1479 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1481 * doc/dbus-specification.sgml: Change the header field name
1482 to be an enum and update the rest of the spec to reference
1483 the fields using the conventinal name.
1485 * dbus/dbus-protocol.h: update to reflect the spec.
1487 * doc/TODO: add item to remove the 4 byte alignment requirement.
1489 * dbus/dbus-message.c: Remove the code to generalise the
1490 header/body length and serial number header fields as named
1491 header fields so we can reference field names using the
1493 (append_int_field), (append_uint_field), (append_string_field):
1494 Append the field name as a byte rather than four chars.
1495 (delete_int_or_uint_field), (delete_string_field): reflect the
1496 fact that the field name and typecode now occupy 4 bytes instead
1498 (decode_string_field), (decode_header_data): update to reflect
1499 protocol changes and move the field specific encoding from
1500 decode_string_field() back into decode_header_data().
1502 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1503 Add utility to aid debugging.
1505 * dbus/dbus-message-builder.c:
1506 (append_string_field), (_dbus_message_data_load): Update to
1507 reflect protocol changes; Change the FIELD_NAME directive
1508 to HEADER_FIELD and allow it to take the field's conventional
1509 name rather than the actual value.
1511 * test/data/*/*.message: Update to use HEADER_FIELD instead
1512 of FIELD_NAME; Always align the header on an 8 byte boundary
1513 *before* updating the header length.
1515 2003-09-15 Havoc Pennington <hp@pobox.com>
1517 * dbus/dbus-pending-call.c: add the get/set object data
1518 boilerplate as for DBusConnection, etc. Use generic object data
1519 for the notify callback.
1521 * glib/dbus-gparser.c (parse_node): parse child nodes
1523 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1525 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1526 contain functions shared between the convenience lib and the
1529 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1530 -export-symbols-regex to the GLib library
1532 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1533 fix the locking in here, and add a default handler for
1534 Introspect() that just returns sub-nodes.
1536 2003-09-14 Havoc Pennington <hp@pobox.com>
1538 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1539 rather than gfoo consistent
1541 * glib/dbus-gproxy.h: delete for now, move contents to
1542 dbus-glib.h, because the include files don't work right since we
1543 aren't in the dbus/ subdir.
1545 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1546 (dbus_gproxy_end_call): finish
1547 (dbus_gproxy_begin_call): finish
1549 * glib/dbus-gmain.c (dbus_set_g_error): new
1551 * glib/dbus-gobject.c (handle_introspect): include information
1552 about child nodes in the introspection
1554 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1555 function to help in implementation of introspection
1557 * dbus/dbus-object-tree.c
1558 (_dbus_object_tree_list_registered_and_unlock): new function
1560 2003-09-12 Havoc Pennington <hp@pobox.com>
1562 * glib/dbus-gidl.h: add common base class for all the foo_info
1565 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1568 * test/Makefile.am: try test srcdir -ef . in addition to test
1569 srcdir = ., one of them should work (yeah lame)
1571 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1574 * glib/dbus-gparser.h: make description_load routines return
1575 NodeInfo* not Parser*
1577 * Makefile.am (SUBDIRS): build test dir after all library dirs
1579 * configure.in: add GTK+ detection
1581 2003-09-07 Havoc Pennington <hp@pobox.com>
1583 * Make Doxygen contented.
1585 2003-09-07 Havoc Pennington <hp@pobox.com>
1587 * doc/dbus-specification.sgml: more updates
1589 2003-09-06 Havoc Pennington <hp@pobox.com>
1591 * doc/dbus-specification.sgml: partial updates
1593 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1594 zillionth time; hopefully I edited the right file this time.
1596 * bus/config-parser.c (append_rule_from_element): support
1597 send_type, send_path, receive_type, receive_path
1599 * bus/policy.c: add message type and path to the list of things
1600 that can be "firewalled"
1602 2003-09-06 Havoc Pennington <hp@pobox.com>
1604 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1605 (dbus_connection_register_object_path): make this not handle
1606 messages to paths below the given path
1608 2003-09-03 Havoc Pennington <hp@pobox.com>
1610 * test/glib/Makefile.am: add this with random glib-linked test
1613 * glib/Makefile.am: remove the random test programs from here,
1614 leave only the unit tests
1616 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1617 uscore/javacaps conversion, and fix
1618 (get_object_property, set_object_property): change to .NET
1619 convention for mapping props to methods, set_FooBar/get_FooBar,
1620 since one language has such a convention we may as well copy it.
1621 Plus real methods in either getFooBar or get_foo_bar style won't
1622 collide with this convention.
1624 2003-09-01 Havoc Pennington <hp@pobox.com>
1626 * glib/dbus-gparser.c: implement
1628 * glib/dbus-gobject.c: start implementing skeletons support
1630 * configure.in: when disabling checks/assert, also define
1631 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1633 2003-09-01 Havoc Pennington <hp@pobox.com>
1635 * glib/Makefile.am: rearrange a bunch of files and get "make
1636 check" framework set up
1638 2003-08-31 Havoc Pennington <hp@pobox.com>
1640 * fix build with --disable-tests
1642 2003-08-30 Havoc Pennington <hp@pobox.com>
1644 * dbus/dbus-connection.c: purge DBusMessageHandler
1646 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1647 use callbacks everywhere
1649 2003-08-30 Havoc Pennington <hp@pobox.com>
1651 * test/data/valid-config-files/system.d/test.conf: change to
1652 root for the user so warnings don't get printed
1654 * dbus/dbus-message.c: add dbus_message_get_path,
1655 dbus_message_set_path
1657 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1658 dispatching to a path
1660 * dbus/dbus-string.c (_dbus_string_validate_path): add
1662 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1663 (_dbus_marshal_object_path): implement
1665 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1666 to contain the path to the target object
1667 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1668 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1670 2003-08-30 Havoc Pennington <hp@pobox.com>
1672 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1674 2003-08-29 Havoc Pennington <hp@pobox.com>
1676 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1678 (struct DBusObjectSubtree): shrink this
1679 a lot, since we may have a lot of them
1680 (_dbus_object_tree_free_all_unlocked): implement
1681 (_dbus_object_tree_dispatch_and_unlock): implement
1683 2003-08-29 Havoc Pennington <hp@pobox.com>
1685 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1687 2003-08-28 Havoc Pennington <hp@pobox.com>
1691 * dbus/dbus-connection.c: port to no ObjectID, create a
1692 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1694 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1695 everything except UnregisterFunction and MessageFunction
1697 * dbus/dbus-marshal.c: port away from DBusObjectID,
1698 add DBUS_TYPE_OBJECT_PATH
1700 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1701 dbus/dbus-objectid.[hc]: remove these, we are moving to
1702 path-based object IDs
1704 2003-08-25 Havoc Pennington <hp@pobox.com>
1706 Just noticed that dbus_message_test is hosed, I wonder when I
1707 broke that. I thought make check was passing earlier...
1709 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1710 container tree, will replace most of dbus-object-registry
1712 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1715 2003-08-19 Havoc Pennington <hp@pobox.com>
1717 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1718 (dbus_message_is_error): fix this function
1720 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1723 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1724 reflect clarified man page
1725 (bus_client_policy_check_can_send): ditto
1727 * bus/session.conf.in: fixup
1729 * bus/system.conf.in: fixup
1731 2003-08-18 Havoc Pennington <hp@redhat.com>
1733 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1735 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1736 dumb bug created earlier (wrong order of args to
1737 decode_header_data())
1739 * tools/dbus-send.c: port
1741 * tools/dbus-print-message.c (print_message): port
1743 * test/data/*messages: port all messages over
1745 * dbus/dbus-message-builder.c: support including
1748 * bus/driver.c: port over
1750 * bus/dispatch.c: port over to new stuff
1752 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1753 rename disconnect signal to "Disconnected"
1755 2003-08-17 Havoc Pennington <hp@pobox.com>
1757 This doesn't compile yet, but syncing up so I can hack on it from
1758 work. What are branches for if not broken code? ;-)
1760 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1761 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1762 DBUS_HEADER_FIELD_ERROR_NAME
1764 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1765 for the interface+member pairs
1766 (string_hash): change to use g_str_hash algorithm
1767 (find_direct_function, find_string_function): refactor these to
1770 * dbus/dbus-message.c: port all of this over to support
1771 interface/member fields instead of name field
1773 * dbus/dbus-object-registry.c: port over
1775 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1776 from _dbus_string_validate_name
1778 * bus/dbus-daemon-1.1: change file format for the
1779 <deny>/<allow> stuff to match new message naming scheme
1781 * bus/policy.c: port over
1783 * bus/config-parser.c: parse new format
1785 2003-08-16 Havoc Pennington <hp@pobox.com>
1787 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1790 * glib/dbus-gproxy.c: some hacking
1792 2003-08-15 Havoc Pennington <hp@redhat.com>
1794 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1796 * dbus/dbus-connection.c
1797 (dbus_connection_send_with_reply_and_block): factor out internals;
1798 change to convert any error replies to DBusError instead of
1799 returning them as a message
1801 2003-08-15 Havoc Pennington <hp@pobox.com>
1803 * dbus/dbus-connection.c,
1804 dbus/dbus-pending-call.c: Finish the pending call stuff
1806 2003-08-14 Havoc Pennington <hp@redhat.com>
1808 * dbus/dbus-pending-call.c: start on new object that will replace
1809 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1812 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1813 with remote interfaces
1815 * dbus/dbus-gidl.c: do the boring boilerplate in here
1817 2003-08-12 Havoc Pennington <hp@pobox.com>
1819 * bus/dispatch.c (bus_dispatch): make this return proper
1820 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1822 * dbus/dbus-errors.c (dbus_set_error): use
1823 _dbus_string_append_printf_valist
1825 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1826 (_dbus_string_append_printf): new
1828 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1831 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1832 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1833 message is unhandled.
1835 2003-08-11 Havoc Pennington <hp@pobox.com>
1837 * bus/test.c (client_disconnect_handler): change to return
1838 HANDLED (would have been REMOVE_MESSAGE)
1840 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1841 HANDLED/NOT_YET_HANDLED instead of
1842 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1845 2003-08-10 Havoc Pennington <hp@pobox.com>
1847 * tools/dbus-send.c (main): add --type argument, for now
1848 supporting only method_call and signal types.
1850 * tools/dbus-print-message.c: print message type
1852 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1853 init connection->objects
1855 * doc/dbus-specification.sgml: fix sgml
1857 * bus/*.c: port over to object-instance API changes
1859 * test/test-service.c: ditto
1861 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1862 name, we will have to fix up the rest of the code to also handle
1864 (dbus_message_new): generic message-creation call
1865 (set_string_field): allow appending name field
1867 2003-08-06 Havoc Pennington <hp@pobox.com>
1869 * dbus/dbus-object-registry.c: implement signal connection
1872 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1874 * dbus/dbus-internals.c (_dbus_memdup): new function
1876 2003-08-02 Havoc Pennington <hp@pobox.com>
1878 * dbus/dbus-message.c (dbus_message_get_no_reply)
1879 (dbus_message_set_no_reply): add these and remove
1880 set_is_error/get_is_error
1882 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1883 remove the ERROR flag, since there's now an ERROR type
1885 2003-08-01 Havoc Pennington <hp@pobox.com>
1887 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1890 * dbus/dbus-message.c (dbus_message_get_type): new function
1892 * doc/dbus-specification.sgml: add "type" byte to messages
1894 2003-08-01 Havoc Pennington <hp@pobox.com>
1896 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1897 a message type enum to distinguish kinds of message
1898 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1899 that need not be replied to
1901 2003-08-01 Havoc Pennington <hp@pobox.com>
1903 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1904 (unpack_8_octets): fix no-64-bit-int bug
1906 * dbus/dbus-object-registry.c (validate_id): validate the
1907 connection ID bits, not just the instance ID.
1909 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1910 the connection-global 33 bits of the object ID
1912 * dbus/dbus-object-registry.c (info_from_entry): fill in
1913 object ID in the new way
1915 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1916 define server/client/instance bits.
1918 2003-07-30 Havoc Pennington <hp@pobox.com>
1920 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1923 2003-07-13 Havoc Pennington <hp@pobox.com>
1925 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1926 fields to DBusObjectVTable and DBusObjectInfo
1928 2003-07-12 Havoc Pennington <hp@pobox.com>
1930 * dbus/dbus-object-registry.c: implement unit test,
1931 fix bugs discovered in process
1933 * dbus/dbus-connection.c: remove handler_table and
1934 register_handler(), add DBusObjectRegistry usage
1936 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1937 (dbus_object_id_set_null): new functions
1939 2003-07-08 Havoc Pennington <hp@pobox.com>
1941 * dbus/dbus-object.c: implement some of this
1943 * dbus/dbus-object-registry.c
1944 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1946 (_dbus_object_registry_new): handle OOM
1948 2003-07-08 Havoc Pennington <hp@pobox.com>
1950 * dbus/dbus-object.h: sketch out an API for registering objects
1951 with a connection, that allows us to use as little as 24 bytes
1952 per object and lets application code represent an object in
1953 any conceivable way.
1955 * dbus/dbus-object-registry.c: implement the hard bits of the
1956 DBusConnection aspect of object API. Not yet wired up.
1958 2003-07-06 Havoc Pennington <hp@pobox.com>
1960 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1961 (_dbus_marshal_object_id): new
1962 (_dbus_demarshal_object_id): new
1963 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1964 consolidate identical switch cases. Don't conditionalize handling
1965 of DBUS_TYPE_UINT64, need to handle the type always.
1966 (_dbus_marshal_validate_arg): consolidate identical cases, and
1967 handle DBUS_TYPE_OBJECT_ID
1969 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1971 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1973 2003-09-28 Havoc Pennington <hp@pobox.com>
1977 2003-09-28 Havoc Pennington <hp@pobox.com>
1979 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1980 to work with Debian db2html
1982 2003-09-28 Havoc Pennington <hp@pobox.com>
1984 * configure.in: 0.13
1986 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1987 stylesheet-images for benefit of Debian
1989 Change back to using filesystem-linked sockets for the system
1990 bus, so only root can create the default system bus address.
1992 * bus/system.conf.in: change to use
1993 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1995 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1998 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1999 here, and AC_DEFINE DBUS_SYSTEM_PATH
2001 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2004 * doc/busconfig.dtd:
2007 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2009 * doc/dbus-specification.sgml:
2010 Add activation reply values.
2012 2003-08-05 Havoc Pennington <hp@redhat.com>
2014 * configure.in: 0.12
2016 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2018 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2019 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2020 (add_watch), (remove_watch), (create_source):
2021 Refcount fds, fixes some reentrancy issues.
2023 2003-07-30 Havoc Pennington <hp@redhat.com>
2025 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2026 bus address to be abstract if we have abstract sockets
2030 2003-07-28 Havoc Pennington <hp@redhat.com>
2032 * bus/messagebus.in: fix to avoid processname/servicename
2033 confusion, from Michael Kearey
2034 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2036 2003-07-23 Havoc Pennington <hp@pobox.com>
2038 * dbus/dbus-message.c (dbus_message_iter_get_named):
2039 fix from Andy Hanton to remove broken "+1"
2041 2003-07-16 Havoc Pennington <hp@pobox.com>
2043 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2044 babysitter process, as suggested by Thomas Leonard, so
2045 an "eval `dbus-launch --exit-with-session`" will actually
2048 2003-07-16 Havoc Pennington <hp@pobox.com>
2050 * configure.in: print out EXPANDED_* variables in the summary at
2051 the end; clean up the code that computes EXPANDED_ variables and
2052 get the ones using exec_prefix right. Should make things work
2053 when you build without --prefix
2055 2003-06-29 Havoc Pennington <hp@pobox.com>
2057 * mono/Test.cs (class Test): fire up a main loop and run it
2059 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2060 done once, the app has to do it
2062 2003-06-26 Havoc Pennington <hp@pobox.com>
2064 * mono/Connection.cs: set up connection with the glib main loop
2066 2003-07-01 Havoc Pennington <hp@redhat.com>
2068 * doc/dbus-specification.sgml: clarify the format of a type code,
2069 change suggested by Jim Blandy
2071 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2074 * tools/Makefile.am: Don't assume srcdir == builddir.
2076 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2077 the allocated block.
2078 (_dbus_memory_test): New function.
2079 * dbus/dbus-test.h: Add _dbus_memory_test ().
2080 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2082 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2084 (dbus_message_new): Remove obsolete @todo.
2086 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2087 (_dbus_marshal_set_uint64): Fix comment.
2089 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2090 hardcode FIELD_REPLY_SERIAL.
2092 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2093 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2095 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2096 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2098 2003-06-24 Havoc Pennington <hp@pobox.com>
2100 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2102 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2108 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2109 * gcj/org/.cvsignore:
2110 * gcj/org/Makefile.am:
2111 * gcj/org/freedesktop/.cvsignore:
2112 * gcj/org/freedesktop/Makefile.am:
2113 * gcj/org/freedesktop/dbus/.cvsignore:
2114 * gcj/org/freedesktop/dbus/Makefile.am:
2115 * gcj/org/freedesktop/dbus/Message.java: (Message),
2117 * gcj/org/freedesktop/dbus/natMessage.cc:
2118 Fix the build system.
2120 2003-06-22 Havoc Pennington <hp@pobox.com>
2122 * mono/Connection.cs: add more bindings
2124 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2127 2003-06-22 Havoc Pennington <hp@pobox.com>
2129 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2130 Start wrapping more stuff.
2132 2003-06-22 Havoc Pennington <hp@pobox.com>
2134 * mono/Message.cs: implement Message.Wrap() that ensures we only
2135 have a single C# wrapper per DBusMessage, assuming it works which
2136 it probably doesn't.
2138 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2139 (dbus_message_free_data_slot): new
2140 (dbus_message_set_data): new
2141 (dbus_message_get_data): new
2143 2003-06-22 Havoc Pennington <hp@pobox.com>
2145 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2146 (_dbus_data_slot_allocator_alloc): rework these to keep a
2147 reference count on each slot and automatically manage a global
2148 slot ID variable passed in by address
2150 * bus/bus.c: convert to new dataslot API
2152 * dbus/dbus-bus.c: convert to new dataslot API
2154 * dbus/dbus-connection.c: convert to new dataslot API
2156 * dbus/dbus-server.c: convert to new dataslot API
2158 * glib/dbus-gmain.c: ditto
2162 * bus/connection.c: ditto
2164 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2166 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2167 after the gcj checks so that the correct configuration tags
2168 will be added to libtool.
2170 * dbus-glib-1.pc.in: No need to specify any includes since
2171 dbus-1.pc.in has those.
2173 2003-06-22 Havoc Pennington <hp@pobox.com>
2175 * mono/*, gcj/*, configure.in, Makefile.am:
2176 Check in makefiles and subdirs for mono and gcj bindings.
2177 Neither binding actually exists, just trying to get through
2178 all the build and other boring bits.
2180 2003-06-21 Philip Blundell <philb@gnu.org>
2182 * tools/dbus-monitor.1: Updated.
2184 * tools/dbus-send.1: Likewise.
2186 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2188 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2189 for hangup and error after checking read so we won't discard
2190 pending data if both hangup and read are set.
2192 2003-06-19 Philip Blundell <philb@gnu.org>
2194 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2196 * tools/dbus-send.c: Accept both --system and --session.
2198 * tools/dbus-monitor.c: Same here.
2200 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2202 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2203 from C++ (Patch by Miloslav Trmac).
2205 2003-06-15 Joe Shaw <joe@assbarn.com>
2207 * configure.in: Check for socklen_t.
2209 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2211 * test/test-segfault.c: Add #include <sys/time.h>
2213 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2214 dbus-launch needs it.
2216 2003-06-09 Havoc Pennington <hp@redhat.com>
2218 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2219 SUN_LEN, it breaks abstract socket usage
2221 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2224 2003-06-04 Havoc Pennington <hp@pobox.com>
2226 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2227 using unix:abstract=/foo, and when listening in a tmpdir
2228 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2230 * dbus/dbus-transport.c (_dbus_transport_open): support
2233 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2234 support abstract sockets
2236 * dbus/dbus-transport-unix.c
2237 (_dbus_transport_new_for_domain_socket): support abstract sockets
2239 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2240 toggle as an argument, implement abstract namespace support
2241 (_dbus_listen_unix_socket): ditto
2243 * configure.in: add --enable-abstract-sockets and implement
2244 a configure check for autodetection of the right value.
2246 2003-06-01 Havoc Pennington <hp@pobox.com>
2248 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2249 in /tmp (though on Linux this will end up being useless,
2250 when we add abstract namespace support)
2252 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2255 2003-05-28 Colin Walters <walters@verbum.org>
2257 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2259 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2261 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2263 2003-05-17 Colin Walters <walters@gnu.org>
2265 * tools/dbus-send.c: Don't exit with an error code if --help was
2266 passed. Default to using the session bus instead of the system
2269 * tools/dbus-launch.c: Ditto.
2271 * tools/dbus-monitor.c: Ditto.
2273 * tools/dbus-send.1: Update with new arguments.
2275 * tools/dbus-launch.c: Emit code to export variables. New
2276 arguments -s and -c to specify shell syntax, and a bit of code to
2277 autodetect syntax. Also, allow specifying a program to run.
2279 * tools/dbus-launch.1: Update with new arguments.
2281 * tools/dbus-send.1: Ditto.
2283 * tools/dbus-monitor.1: Ditto.
2285 2003-05-17 Havoc Pennington <hp@pobox.com>
2287 * bus/config-parser.c (merge_included): merge in policies from
2288 child configuration file.
2290 * bus/policy.c (bus_policy_merge): function to merge two policies
2293 2003-05-16 Havoc Pennington <hp@redhat.com>
2295 * dbus/dbus-connection.c: disable verbose lock spew
2297 * tools/dbus-send.c: add --print-reply command line option
2299 * tools/dbus-print-message.h (print_message): new util function
2300 shared by dbus-send and dbus-monitor
2302 * tools/dbus-monitor.c (handler_func): exit on disconnect
2304 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2305 disconnected, don't try to use the read_watch
2307 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2308 so we can find this bug more easily
2310 2003-05-16 Havoc Pennington <hp@redhat.com>
2312 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2313 NULL as DBusHashTable is annoyingly likely to do.
2315 2003-05-16 Colin Walters <walters@verbum.org>
2317 * tools/dbus-monitor.c: Add --session argument and usage()
2320 * tools/dbus-monitor.1: Update with new --session arg.
2322 * bus/Makefile.am (install-data-hook): Create
2323 $(libdir)/dbus-1.0/services so that the session bus is happy.
2325 2003-05-15 Havoc Pennington <hp@redhat.com>
2327 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2328 on non-x86. ifdef's are evil.
2330 2003-05-15 Havoc Pennington <hp@redhat.com>
2332 * configure.in: 0.11
2336 * bus/Makefile.am (initddir): apparently we are supposed to put
2337 init scripts in /etc/rc.d/init.d not /etc/init.d
2339 * bus/Makefile.am: remove the "you must --enable-tests to make
2340 check" as it broke distcheck
2342 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2344 2003-05-13 James Willcox <jwillcox@gnome.org>
2347 * bus/activation.c: (bus_activation_service_created),
2348 (bus_activation_activate_service):
2349 * bus/driver.c: (bus_driver_send_service_deleted),
2350 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2351 (bus_driver_send_service_acquired),
2352 (bus_driver_send_welcome_message),
2353 (bus_driver_handle_list_services):
2354 * bus/session.conf.in:
2355 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2356 (dbus_bus_service_exists), (dbus_bus_activate_service):
2359 Add some convenience API which lets you activate a service, and did a
2360 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2361 and dbus_message_get_args()
2363 2003-05-11 Havoc Pennington <hp@pobox.com>
2365 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2366 calling _dbus_marshal_validate_arg() for every byte in a byte
2369 * dbus/dbus-message-handler.c: use atomic reference counting to
2370 reduce number of locks slightly; the global lock in here sucks
2372 * dbus/dbus-connection.c
2373 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2374 update_dispatch_status that can be called with lock held; then use
2375 in a couple places to reduce locking/unlocking
2376 (dbus_connection_send): hold the lock over the whole function
2377 instead of acquiring it twice.
2379 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2381 * bus/connection.c (bus_connections_setup_connection): fix access
2382 to already-freed memory.
2384 * dbus/dbus-connection.c: keep a little cache of linked list
2385 nodes, to avoid using the global linked list alloc lock in the
2386 normal send-message case. Instead we just use the connection lock
2387 that we already have to take.
2389 * dbus/dbus-list.c (_dbus_list_find_last): new function
2391 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2392 change to use a struct for the atomic type; fix docs,
2393 they return value before increment, not after increment.
2395 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2396 (_dbus_string_append_8_aligned): new functions to try to
2397 microoptimize this operation.
2398 (reallocate_for_length): break this out of set_length(), to
2399 improve profile info, and also so we can consider inlining the
2402 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2403 strings with some preallocation, cuts down on our calls to realloc
2404 a fair bit. Though if we can get the "move entire string to empty
2405 string" optimization below to kick in here, it would be better.
2407 * dbus/dbus-string.c (_dbus_string_move): just call
2408 _dbus_string_move_len
2409 (_dbus_string_move_len): add a special case for moving
2410 an entire string into an empty string; we can just
2411 swap the string data instead of doing any reallocs.
2412 (_dbus_string_init_preallocated): new function
2414 2003-05-11 Havoc Pennington <hp@pobox.com>
2416 Write a "test-profile" that does echo client-server with threads;
2417 profile reveals lock contention, memcpy/realloc of buffers, and
2418 UTF-8 validation as hot spots. 20% of lock contention eliminated
2419 with dbus_atomic_inc/dec implementation on x86. Much remaining
2420 contention is global mempool locks for GList and DBusList.
2422 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2425 * dbus/dbus-connection.c (struct DBusConnection): use
2426 dbus_atomic_t for the reference count
2428 * dbus/dbus-message.c (struct DBusMessage): declare
2429 dbus_atomic_t values as volatile
2431 * configure.in: code to detect ability to use atomic integer
2432 operations in assembly, from GLib patch
2434 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2435 time, tired of it being wrong in threads and forked processes
2437 * glib/test-profile.c: a little program to bounce messages back
2438 and forth between threads and eat CPU
2440 * dbus/dbus-connection.c: add debug spew macros for debugging
2441 thread locks; include config.h at top; fix deadlock in
2442 dbus_connection_flush()
2444 2003-05-08 Havoc Pennington <hp@pobox.com>
2446 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2447 data from getting written, and there wasn't a good reason to
2450 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2451 dbus_verbose lines in test coverage
2452 (main): add list of functions sorted by # of untested blocks
2453 to the coverage report
2455 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2457 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2459 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2460 extend test coverage
2462 * test/data/auth/cancel.auth-script: test canceling an
2465 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2466 aren't used. in CVS history if we end up needing them.
2468 2003-05-04 Havoc Pennington <hp@pobox.com>
2470 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2473 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2474 function, which assumed length was in # of strings, not bytes
2476 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2479 * dbus/dbus-connection.c
2480 (_dbus_connection_queue_received_message): disable function for
2481 now, we are only using it in test mode
2483 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2484 remove a mistaken FIXME
2486 2003-05-04 Havoc Pennington <hp@pobox.com>
2488 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2489 unlock mutex on successful return, patch from Anders Gustafsson
2491 2003-05-04 Havoc Pennington <hp@pobox.com>
2493 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2496 2003-05-04 Havoc Pennington <hp@pobox.com>
2498 * tools/dbus-launch.c: implement
2500 * bus/main.c (main), bus/bus.c (bus_context_new):
2501 implement --print-pid and --fork
2503 2003-05-03 Havoc Pennington <hp@redhat.com>
2505 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2506 the address had no value, and add to test suite. Fix and
2507 regression test from Miloslav Trmac
2509 2003-05-03 Havoc Pennington <hp@pobox.com>
2511 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2512 watch is invalid when handled
2514 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2515 dbus-launch utility to launch the bus from a shell script. Didn't
2516 actually implement dbus-launch yet, it's just a placeholder still.
2518 2003-05-03 Havoc Pennington <hp@pobox.com>
2520 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2521 daemon; also documents daemon config file, so replaces
2522 doc/config-file.txt. Corrected some stuff from config-file.txt in
2523 the process of moving it.
2525 2003-05-03 Havoc Pennington <hp@pobox.com>
2527 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2530 2003-05-03 Colin Walters <walters@verbum.org>
2532 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2533 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2535 * Makefile.am: Update to use new .pc versioning scheme.
2537 2003-05-02 Havoc Pennington <hp@redhat.com>
2539 * bus/system.conf.in: allow send/receive to/from message bus
2542 2003-04-30 Havoc Pennington <hp@redhat.com>
2544 * configure.in: print a note when building with unit tests and
2547 2003-04-30 Havoc Pennington <hp@redhat.com>
2549 * Makefile.am: add a check-local that complains if you didn't
2550 configure with --enable-tests
2552 2003-04-29 Havoc Pennington <hp@redhat.com>
2554 * glib/dbus-gmain.c: docs cleanups
2556 * dbus/dbus-types.h: add docs on int64 types
2558 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2559 public API docs section
2561 2003-04-29 Havoc Pennington <hp@redhat.com>
2563 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2564 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2565 parallel install API version, not with the D-BUS package version.
2567 * HACKING: move some of README over here
2569 * README: updates, and document API/ABI policy
2571 * configure.in: reindentation
2573 2003-04-29 Havoc Pennington <hp@redhat.com>
2575 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2576 to use this library" to be sure people have the right
2579 2003-04-28 Havoc Pennington <hp@redhat.com>
2581 * configure.in: add --enable-docs which by default is auto yes if
2582 doxygen and db2html found, no otherwise; but can be forced on/off
2584 * doc/Makefile.am: conditionalize whether to build docs on
2587 2003-04-28 Havoc Pennington <hp@redhat.com>
2589 * configure.in: 0.10
2593 * bus/system.conf.in: add <includedir>system.d</includedir>
2595 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2596 username was provided but not uid
2598 * bus/config-parser.c (struct BusConfigParser): keep track of
2599 whether the parser is toplevel or was included; change some
2600 of the error handling if it's included.
2602 2003-04-27 Havoc Pennington <hp@pobox.com>
2606 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2607 report correct status if we finish processing authentication
2608 inside this function.
2610 * bus/activation.c (try_send_activation_failure): use
2611 bus_transaction_send_error_reply
2613 * bus/connection.c (bus_connection_get_groups): return an error
2614 explaining the problem
2616 * bus/bus.c (bus_context_check_security_policy): implement
2617 restriction here that inactive connections can only send the
2618 hello message. Also, allow bus driver to send anything to
2621 * bus/connection.c (bus_connection_complete): create the
2622 BusClientPolicy here instead of on-demand.
2623 (bus_connection_get_policy): don't return an error
2625 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2626 sender field in message being replied to
2628 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2629 causing it to return FALSE always
2631 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2632 we checked sender rather than destination
2634 2003-04-25 Havoc Pennington <hp@redhat.com>
2636 test suite is slightly hosed at the moment, will fix soon
2638 * bus/connection.c (bus_connections_expire_incomplete): fix to
2639 properly disable the timeout when required
2640 (bus_connection_set_name): check whether we can remove incomplete
2641 connections timeout after we complete each connection.
2643 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2644 probably still broken.
2646 * bus/services.c (bus_registry_acquire_service): implement max
2647 number of services owned, and honor allow/deny rules on which
2648 services a connection can own.
2650 * bus/connection.c (bus_connection_get_policy): report errors here
2652 * bus/activation.c: implement limit on number of pending
2655 2003-04-25 Havoc Pennington <hp@redhat.com>
2657 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2658 where we used >= 0 instead of != DBUS_UID_UNSET.
2660 2003-04-25 Havoc Pennington <hp@redhat.com>
2662 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2663 were toggled without add/remove, fix from Anders Gustafsson
2665 2003-04-24 Havoc Pennington <hp@redhat.com>
2667 * test/data/valid-config-files/basic.conf: add <limit> tags to
2670 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2671 <limit> tag in configuration file.
2673 2003-04-24 Havoc Pennington <hp@redhat.com>
2675 * bus/dispatch.c: somehow missed some name_is
2677 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2678 (_dbus_timeout_set_interval): new
2680 * bus/connection.c (bus_connections_setup_connection): record time
2681 when each connection is first set up, and expire them after the
2682 auth timeout passes.
2684 2003-04-24 Havoc Pennington <hp@redhat.com>
2686 * dbus/dbus-message.c (dbus_message_name_is): rename
2687 (dbus_message_service_is): rename
2688 (dbus_message_sender_is): rename
2689 (dbus_message_get_service): rename
2691 2003-04-24 Havoc Pennington <hp@redhat.com>
2693 * configure.in: add --enable-checks
2695 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2697 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2698 to use thread locks.
2699 (_dbus_connection_handler_destroyed_locked): move some private
2700 functions into proper docs group
2702 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2703 _dbus_return_val_if_fail
2705 Throughout: use dbus_return_if_fail
2707 2003-04-23 James Willcox <jwillcox@gnome.org>
2710 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2711 (dbus_connection_setup_with_g_main),
2712 (dbus_server_setup_with_g_main):
2713 * glib/test-dbus-glib.c: (main):
2714 * glib/test-thread-client.c: (main):
2715 * glib/test-thread-server.c: (new_connection_callback), (main):
2716 * tools/dbus-monitor.c: (main):
2718 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2719 and dbus_server_setup_with_g_main().
2721 2003-04-20 Havoc Pennington <hp@pobox.com>
2723 * doc/dbus-specification.sgml: document the restrictions on
2724 message and service names
2726 2003-04-22 Havoc Pennington <hp@redhat.com>
2728 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2729 support, and do some code cleanups to share more code and
2730 speed up array marshal/demarshal.
2732 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2734 * configure.in: generate dbus-arch-deps.h
2736 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2739 2003-04-22 Havoc Pennington <hp@redhat.com>
2741 * test/data/valid-messages/opposite-endian.message: fix test
2742 to use proper type for rply field
2744 * test/data/invalid-messages: add tests for below validation
2746 * dbus/dbus-message.c (decode_header_data): validate field types,
2747 and validate that named fields are valid names
2748 (decode_name_field): consider messages in the
2749 org.freedesktop.Local. namespace to be invalid.
2751 * dbus/dbus-string.c (_dbus_string_validate_name): new
2753 2003-04-19 Havoc Pennington <hp@pobox.com>
2755 * bus/driver.c (bus_driver_handle_hello): check limits and
2756 return an error if they are exceeded.
2758 * bus/connection.c: maintain separate lists of active and inactive
2759 connections, and a count of each. Maintain count of completed
2760 connections per user. Implement code to check connection limits.
2762 * dbus/dbus-list.c (_dbus_list_unlink): export
2764 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2765 number of bytes in the message queue for a connection
2767 2003-04-18 Havoc Pennington <hp@pobox.com>
2769 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2771 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2774 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2775 on realloc be sure to update the pointer in the keyring
2777 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2778 offset to avoid writing to unallocated memory
2780 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2781 try the next mechanism, so we properly handle OOM
2783 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2785 (_dbus_keyring_new): fix OOM bug
2786 (_dbus_keyring_new_homedir): always set error; impose a maximum
2787 number of keys we'll load from the file, mostly to speed up the
2788 test suite and make its OOM checks more useful, but also for
2791 * dbus/dbus-auth.c (process_error_server): reject authentication
2792 if we get an error from the client
2793 (process_cancel): on cancel, send REJECTED, per the spec
2794 (process_error_client): send CANCEL if we get an error from the
2797 2003-04-18 Havoc Pennington <hp@pobox.com>
2799 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2802 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2805 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2806 about DBUS_TEST_HOMEDIR once
2808 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2811 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2812 config file so we test the right thing
2814 Throughout: assorted docs improvements
2816 2003-04-18 Havoc Pennington <hp@pobox.com>
2818 * glib/dbus-gmain.c: adapt to watch changes
2820 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2822 * dbus/dbus-server.h: remove dbus_server_handle_watch
2824 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2826 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2827 like DBusTimeout, so we don't need dbus_connection_handle_watch
2830 2003-04-17 Havoc Pennington <hp@redhat.com>
2832 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2833 database usage so it all goes via the DBusUserDatabase cache.
2835 2003-04-17 Havoc Pennington <hp@redhat.com>
2837 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2838 there was an OOM watch we skipped, we always return TRUE so we
2839 iterate again to have a look at it again. Fixes test suite hang.
2840 Code rearrangement also lets us lose some memset and only iterate
2841 over callbacks once.
2843 * bus/driver.c (bus_driver_handle_message): sense of test for
2846 2003-04-16 Havoc Pennington <hp@pobox.com>
2848 * doc/dbus-specification.sgml: make spec say serials are unsigned
2850 * dbus/dbus-message.h: change message serials to unsigned
2852 * dbus/dbus-connection.c: adapt to message serials being unsigned
2854 2003-04-15 Havoc Pennington <hp@pobox.com>
2856 * bus/bus.c: create and keep around a shared DBusUserDatabase
2859 * bus/connection.c (bus_connection_get_groups): don't cache
2860 groups for user in the connection object, since user database
2861 object now does that.
2863 2003-04-16 Havoc Pennington <hp@redhat.com>
2865 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2866 list of size counters
2867 (_dbus_message_loader_putback_message_link): put back a popped link
2869 * dbus/dbus-connection.c
2870 (dbus_connection_set_max_live_messages_size): rename
2872 (dbus_connection_get_outgoing_size): get size of outgoing
2874 (_dbus_connection_set_connection_counter): remove this cruft
2876 2003-04-14 Havoc Pennington <hp@redhat.com>
2878 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2879 caching, but at some point we might want to be able to use a
2882 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2883 SHA1 conf file to test the sha1 auth mechanism, since the regular
2884 test always uses EXTERNAL when available.
2887 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2888 add conf file that requires use of sha1 auth
2890 2003-04-13 Havoc Pennington <hp@pobox.com>
2892 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2893 from Philip Blundell to send messages and monitor them.
2895 2003-04-13 Havoc Pennington <hp@pobox.com>
2897 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2900 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2903 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2904 fix to only recover unused bytes if we're already authenticated
2905 (_dbus_transport_get_is_authenticated): fix to still mark us
2906 authenticated if there are unused bytes.
2908 * bus/dispatch.c: implement security policy checking
2910 * bus/connection.c (bus_transaction_send_from_driver): new
2912 * bus/bus.c (bus_context_check_security_policy): new
2914 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2915 now we just set the DBusError and it gets converted to an error
2918 * bus/connection.c (allow_user_function): enable code using actual
2919 data from the config file
2921 * bus/policy.c (list_allows_user): handle wildcard rules for
2922 user/group connection perms
2924 2003-04-13 Havoc Pennington <hp@pobox.com>
2926 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2928 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2930 * bus/policy.c (bus_policy_append_mandatory_rule)
2931 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2932 (bus_policy_append_group_rule): new functions
2934 2003-04-12 Havoc Pennington <hp@pobox.com>
2936 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2938 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2939 the pid/gid/uid, just for paranoia.
2941 * test/break-loader.c (randomly_do_n_things): find a byte
2942 containing a type code, and randomly change it to a different
2945 2003-04-12 Havoc Pennington <hp@pobox.com>
2947 * bus/policy.h: change BusPolicy to be the thing from the config
2948 file, and rename old BusPolicy to BusClientPolicy
2950 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2951 match change in how policy works
2953 * dbus/dbus-internals.h: mark assert_not_reached as
2954 __attribute((noreturn))__
2956 2003-04-11 Havoc Pennington <hp@redhat.com>
2958 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2959 the broadcast service. Use boolean return for ServiceExists.
2961 2003-04-11 Havoc Pennington <hp@redhat.com>
2963 * configure.in: add another directory to look for qt in.
2965 2003-04-11 Havoc Pennington <hp@redhat.com>
2967 * AUTHORS: add Colin Walters
2969 2003-04-11 Havoc Pennington <hp@redhat.com>
2975 2003-04-11 Havoc Pennington <hp@redhat.com>
2977 * bus/messagebus.in: remove pid file when stopping the
2978 message bus, since the bus won't have privileges to remove it
2981 2003-04-11 Havoc Pennington <hp@redhat.com>
2983 * bus/bus.c (bus_context_new): move credentials change after
2986 2003-04-11 Havoc Pennington <hp@pobox.com>
2988 * test/decode-gcov.c: add "below average functions" to the
2989 coverage report, and change how some of the code works.
2991 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2992 not in the coverage stats.
2994 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2995 couple places so running the test suite doesn't result in megaspam.
2997 2003-04-11 Havoc Pennington <hp@pobox.com>
2999 * bus/dispatch.c (check_existent_service_activation): accept a no
3000 memory error in a place we didn't before
3002 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3003 in case the first one failed," since the test suite is less
3006 2003-04-10 Havoc Pennington <hp@pobox.com>
3008 * bus/dispatch.c (check_segfault_service_activation): add test
3009 for launching an executable that just crashes.
3011 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3012 don't leave a million cores. We'll see how portable this is.
3014 2003-04-10 Havoc Pennington <hp@pobox.com>
3016 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3017 the possible parent failures before we fork, so that we don't
3018 fail to create a babysitter after creating the child.
3020 * bus/activation.c (bus_activation_activate_service): kill child
3021 if we don't successfully complete the activation.
3023 2003-04-10 Havoc Pennington <hp@redhat.com>
3025 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3026 the connection if it's disconnected
3028 * bus/activation.c (bus_activation_service_created): use new
3029 transaction features to roll back removal of pending activation if
3030 we don't successfully create the service after all. Don't remove
3031 pending activation if the function fails.
3033 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3034 (_dbus_list_insert_after_link): new code to facilitate
3037 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3038 new functionality, so we can preallocate the ability to insert
3041 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3042 allowing us to put custom hooks in a transaction to be used for
3043 cancelling said transaction
3045 * doc/dbus-specification.sgml: add some discussion of secondary
3046 service owners, and disallow zero-length service names
3048 * bus/services.c (bus_registry_acquire_service): new function,
3049 splits out part of bus_driver_handle_acquire_service() and fixes
3050 a bug where we didn't remove the service doing the acquiring
3051 from the secondary queue if we failed to remove the current owner
3052 from the front of the queue.
3054 2003-04-10 Alexander Larsson <alexl@redhat.com>
3056 * doc/dbus-specification.sgml:
3057 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3059 2003-04-10 Alexander Larsson <alexl@redhat.com>
3064 Added files to cvsignore
3066 * dbus/dbus-message.h:
3067 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3068 Make get_named() take two out argument and return a boolean.
3069 (dbus_message_iter_get_args_valist):
3070 Update usage of get_named().
3071 (dbus_message_iter_append_byte):
3073 (dbus_message_iter_append_named)
3075 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3078 2003-04-10 Alexander Larsson <alexl@redhat.com>
3080 * dbus/dbus-marshal.[ch]:
3081 Add array_type_pos argument to _dbus_marshal_validate_arg.
3082 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3084 * dbus/dbus-message.[ch]:
3085 Multi-dimensional arrays have full type specification in the
3086 outermost array. Iter code re-arranged to handle this.
3087 Added some more iter tests.
3089 * doc/dbus-specification.sgml:
3092 Update new array encoding description.
3093 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3095 * test/data/invalid-messages/array-with-mixed-types.message:
3096 * test/data/valid-messages/array-of-array-of-uint32.message:
3097 Change to the new array format.
3099 * test/data/invalid-messages/too-short-dict.message:
3102 * test/data/valid-messages/recursive-types.message:
3103 Fix up and extend test.
3105 2003-04-10 Havoc Pennington <hp@pobox.com>
3107 * bus/dispatch.c: lots of fixes
3109 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3110 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3111 that was crack, broke the test service.
3113 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3114 handling to avoid piling up errors if we get a failure on the
3117 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3118 pid in assertion failures.
3120 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3121 to some fixed size of file descriptor array. Don't return TRUE
3122 anytime a timeout exists, that led to lots of busy loop silliness
3125 2003-04-09 Havoc Pennington <hp@redhat.com>
3127 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3128 I'd checked this in earlier but hadn't.
3130 2003-04-09 Havoc Pennington <hp@redhat.com>
3132 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3133 the activation test (man this is getting old!)
3135 2003-04-09 Havoc Pennington <hp@redhat.com>
3137 * test/test-utils.c: use dispatch status function to fix this up
3139 * bus/connection.c (connection_watch_callback): don't dispatch
3141 (connection_timeout_callback): don't dispatch from here
3142 (bus_connections_setup_connection): set the dispatch status function
3143 (bus_connection_disconnected): unset it
3145 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3146 used to add a connection to be dispatched
3147 (_dbus_loop_iterate): do the dispatching at the end of each
3150 * dbus/dbus-connection.c
3151 (dbus_connection_set_dispatch_status_function): new function
3152 allowing us to fix up main loop usage
3153 (_dbus_connection_last_unref): free all the various function
3155 (dbus_connection_dispatch): call the DispatchStatusFunction
3156 whenever this function returns
3157 (dbus_connection_handle_watch): call DispatchStatusFunction
3158 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3159 (reply_handler_timeout): call DispatchStatusFunction
3160 (dbus_connection_flush): call DispatchStatusFunction
3162 2003-04-09 Havoc Pennington <hp@redhat.com>
3164 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3167 * bus/dispatch.c (check_service_activated): fix bug in test
3169 * dbus/dbus-mainloop.c (check_timeout): fix this up
3171 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3172 verbose output so we can sort out output from different processes,
3173 e.g. in the activation case.
3175 2003-04-08 Colin Walters <walters@gnu.org>
3177 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3179 (bus_context_new): Set it.
3180 (bus_context_unref): Use it to delete the pid file.
3182 2003-04-08 Havoc Pennington <hp@redhat.com>
3184 * test/data/invalid-messages/array-with-mixed-types.message:
3185 regression test that fails for the moment
3187 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3188 tests for convenience
3190 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3191 array of nil, it broke things.
3193 * test/data/invalid-messages/array-of-nil.message: regression test
3195 * test/data/valid-messages/array-of-array-of-uint32.message:
3196 happened to write this so added it to suite
3198 2003-04-08 Havoc Pennington <hp@redhat.com>
3200 * bus/driver.c (bus_driver_handle_acquire_service): init
3201 retval/reply before checking name
3203 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3204 recursion depth argument
3206 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3207 in the public struct for future extension
3209 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3212 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3215 * doc/dbus-specification.sgml: fix typo
3217 2003-04-08 Alexander Larsson <alexl@redhat.com>
3219 Implemented recursive types, named types and new-style iters
3222 * glib/test-thread-client.c: (thread_func):
3223 * glib/test-thread-server.c: (handle_test_message):
3224 * test/test-service.c: (handle_echo):
3233 * dbus/dbus-internals.c: (_dbus_type_to_string):
3234 Update for new types.
3236 * dbus/dbus-marshal.[ch]:
3237 Implement recursive types and the new marshalling format.
3238 Remove hardcoded dict marshalling.
3239 Marshal named types.
3241 * dbus/dbus-message-builder.c:
3243 Remove references to old types
3245 * dbus/dbus-message.[ch]:
3246 New non-refcounted iter API that supports recursive iters.
3247 Use iters for appending, including support for recursive
3249 Add byte and named type support.
3250 Update everything to new marshalling formats.
3251 Add tests for new API.
3253 * dbus/dbus-protocol.h:
3254 Remove old array types.
3255 Add types: BYTE, ARRAY, DICT, NAMED
3257 * dbus/dbus-string.c:
3258 * dbus/dbus-sysdeps.c:
3259 Make parse_double locale safe.
3261 * dbus/dbus-test-main.c:
3267 * doc/dbus-specification.sgml:
3270 * test/data/incomplete-messages/missing-body.message:
3271 * test/data/invalid-messages/bad-boolean.message:
3272 * test/data/invalid-messages/bad-boolean-array.message:
3273 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3274 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3275 * test/data/invalid-messages/too-short-dict.message:
3276 * test/data/valid-messages/dict-simple.message:
3277 * test/data/valid-messages/dict.message:
3278 * test/data/valid-messages/emptiness.message:
3279 * test/data/valid-messages/lots-of-arguments.message:
3280 * test/data/valid-messages/no-padding.message:
3281 * test/data/valid-messages/recursive-types.message:
3282 Add missing NAME fields
3283 Fix up dicts & arrays
3285 * test/data/invalid-messages/dict-with-nil-value.message:
3286 Removed, this is not invalid anymore.
3288 * test/data/valid-messages/recursive-types.message:
3289 Add new test for deeply recursive types.
3291 2003-04-07 Havoc Pennington <hp@pobox.com>
3293 * bus/driver.c (bus_driver_handle_acquire_service): return an
3294 error if you try to acquire a service that starts with ':'
3296 2003-04-07 Havoc Pennington <hp@redhat.com>
3298 * doc/dbus-specification.sgml: require that base service names
3299 start with ':' and that the base service is created/deleted
3300 as first and last things a connection does on the bus
3302 * bus/dispatch.c (check_existent_service_activation): lots more
3303 work on the activation test; it doesn't fully pass yet...
3305 * test/test-service.c (main): fix so we don't memleak the
3306 connection to the message bus
3307 (filter_func): accept a message asking us to exit
3309 2003-04-06 Havoc Pennington <hp@pobox.com>
3311 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3314 * configure.in: fixes to Qt detection from Colin Walters
3316 * doc/Makefile.am: Only remove generated docbook dirs if they
3317 exist, from Colin Walters
3319 * dbus/dbus-bus.c: change how we set well-known connections to
3320 NULL, so that it works if a single connection is stored in
3321 two well-known array slots.
3323 * test/Makefile.am: remove a lot of stuff that isn't immediately
3324 useful, it's in CVS history if we want it.
3326 * test/test-service.c: use dbus-mainloop instead of that
3329 2003-04-06 Havoc Pennington <hp@pobox.com>
3331 * dbus/Makefile.am: split lists of sources into stuff that goes in
3332 the library, util functions that go in the lib and are also used
3333 elsewhere, and util functions that are used in tests/daemon but
3334 don't go in the lib.
3336 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3337 here so it can be used in test binaries also
3339 2003-04-06 Havoc Pennington <hp@pobox.com>
3341 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3342 here in the parent process, so we can return an error if it
3343 fails. Also, move some of the code into the child so the parent
3344 is less hosed if we fail midway through.
3346 * bus/bus.c (bus_context_new): move pidfile detection further up
3347 in the function, before we start overwriting sockets and such.
3349 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3351 * configure.in: add --with-system-pid-file and --with-system-socket
3353 2003-04-06 Colin Walters <walters@verbum.org>
3355 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3357 * bus/system.conf.in: Declare a pidfile.
3359 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3360 create one (if appropriate).
3362 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3363 (struct BusConfigParser) [pidfile]: New.
3364 (element_type_to_name, merge_included, start_busconfig_child)
3365 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3366 (bus_config_parser_unref): Free it.
3367 (bus_config_parser_get_pidfile): New function.
3369 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3371 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3373 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3375 * dbus/dbus-sysdeps.h: Prototype it.
3377 2003-04-06 Havoc Pennington <hp@pobox.com>
3379 * bus/bus.c (bus_context_new): print the address in here, rather
3380 than in main(), because we need to do it before forking the daemon
3382 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3383 on the service nonexistent error
3385 * bus/driver.c (bus_driver_handle_acquire_service): set the
3386 sender on the AcquireService reply
3388 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3389 server also listen on a UNIX socket so services can connect to it.
3391 2003-04-06 Havoc Pennington <hp@pobox.com>
3393 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3394 so it detects deadlocks and also we actually init threads when
3397 2003-04-06 Havoc Pennington <hp@pobox.com>
3399 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3400 save the domain socket name, and unlink it when we disconnect the
3401 server. Means that at least when we exit normally, we won't leave
3402 a bunch of junk in /tmp
3404 * dbus/dbus-transport-unix.c
3405 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3406 memory management). (I was making a real change here but then
3409 2003-04-06 Havoc Pennington <hp@pobox.com>
3411 * bus/bus.c (bus_context_new): fix wrong handling of
3412 server_data_slot_unref() in the error case.
3414 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3415 "(condition) != 0" to _dbus_real_assert so that
3416 "_dbus_assert (pointer)" doesn't cause a warning
3418 * bus/main.c (main): accept --print-address option to print out
3419 the message bus address
3421 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3423 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3424 "tmpdir" option to unix: address on client side
3426 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3429 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3430 we can use to create sockets in the test suite.
3432 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3433 cleanly. To be used for testing.
3435 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3437 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3439 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3440 handle trying to call this when there's no servers active
3442 2003-04-05 Havoc Pennington <hp@pobox.com>
3448 2003-04-05 Havoc Pennington <hp@pobox.com>
3450 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3451 crash on startup. Need to get "try starting the daemon"
3452 in the test suite I guess. ;-)
3454 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3455 tracked the number of open connections; it's better done in
3456 application-specific code as you want it to span all servers etc.
3458 2003-04-05 Havoc Pennington <hp@pobox.com>
3460 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3461 patch from Colin Walters
3463 2003-04-05 Havoc Pennington <hp@pobox.com>
3465 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3466 reality; in fact multiple mechanisms are allowed.
3468 * dbus/dbus-internals.c (_dbus_real_assert)
3469 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3470 _dbus_assert_not_reached() into functions, so that they don't show
3471 up in basic block counts for test coverage, and don't use up as
3472 much disk space. Does mean slower execution speed though, so
3473 assumes --disable-asserts is the normal production case.
3475 2003-04-05 Havoc Pennington <hp@pobox.com>
3477 * test/Makefile.am (dist-hook): also dist *.in files
3483 2003-04-05 Havoc Pennington <hp@pobox.com>
3485 * dbus/dbus-string.c: docs warning
3487 * dbus/dbus-spawn.c: missing docs
3489 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3491 2003-04-05 Havoc Pennington <hp@pobox.com>
3493 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3496 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3497 to -1 once we've reaped the babysitter
3498 (_dbus_babysitter_handle_watch): do as much work as we can, not
3501 * bus/activation.c: add code using DBusBabysitter so that we
3502 handle it when a service fails to start up properly.
3503 (bus_activation_service_created): don't remove the activation
3504 entries as we go, just let them get removed when we free the pending
3505 activation. Unref reply messages after sending them.
3507 2003-04-05 Havoc Pennington <hp@pobox.com>
3509 * test/decode-gcov.c (main): print per-directory stats in the report
3511 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3513 2003-04-05 Havoc Pennington <hp@pobox.com>
3515 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3517 * test/decode-gcov.c: hack up a little program to suck data
3518 out of gcov files. Yes this is sort of silly.
3520 * configure.in: define something in config.h and do an
3521 AM_CONDITIONAL when gcov is enabled
3523 2003-04-04 Havoc Pennington <hp@redhat.com>
3525 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3526 return a "babysitter" object that is used to monitor the status of
3527 the spawned process and reap it when required.
3529 * test/test-segfault.c, test/test-exit.c,
3530 test/test-sleep-forever.c: binaries that do various lame things,
3531 used in the test suite.
3533 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3535 2003-04-03 Havoc Pennington <hp@pobox.com>
3537 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3538 in preparation for modifying it, dbus-sysdeps is getting
3541 2003-04-03 Havoc Pennington <hp@redhat.com>
3543 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3546 * bus/*.[hc]: adapt to mainloop change
3548 2003-04-03 Havoc Pennington <hp@redhat.com>
3550 * bus/activation.c (load_directory): fix up memleaks
3551 (bus_activation_entry_free): free the entry
3553 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3554 we get one from the message bus; fix memleaks.
3556 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3558 2003-04-03 Havoc Pennington <hp@pobox.com>
3560 * bus/config-parser.c (bus_config_parser_unref): free
3561 list of mechanisms, bug discovered by test suite enhancements
3562 (putting system.conf and session.conf into suite)
3564 * test/Makefile.am, test/test-service.c: add placeholder for a
3565 test service that we'll activate as part of test suite. Doesn't
3568 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3569 setting NULL value, and use system malloc not dbus_malloc()
3570 when we have unavoidable memleakage.
3572 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3573 didn't work, and support DBUS_BUS_ACTIVATION.
3575 * bus/activation.c (child_setup): pass our well-known bus type to
3578 * bus/config-parser.c: support <type> to specify well-known type
3580 * doc/dbus-specification.sgml: document the env variables to
3581 locate well-known buses and find service activator
3583 2003-04-02 Havoc Pennington <hp@redhat.com>
3585 * test/Makefile.am (all-local): add a rule to copy tests to
3586 builddir, so we can have generated tests. Use this to remove the
3587 silly hack for testing system.conf and session.conf. Will use this
3588 shortly to generate .service files pointing to test binaries.
3590 2003-04-02 Havoc Pennington <hp@redhat.com>
3592 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3593 current alloc and needed new length, not max of the doubled
3594 allocation and needed new length. Also, when building tests,
3595 don't do the double-allocation stuff, just realloc every time.
3597 2003-04-02 Havoc Pennington <hp@redhat.com>
3599 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3601 (_dbus_string_get_dirname): new
3602 (_dbus_sysdeps_test): new
3603 (_dbus_directory_open): include dirnames in error messages
3605 * bus/config-parser.c: interpret <include> and <includedir> and
3606 <servicedir> relative to config file location if the given
3607 filename is not absolute.
3609 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3611 2003-04-02 Havoc Pennington <hp@redhat.com>
3613 * bus/connection.c (bus_transaction_send_error_reply): set sender
3614 service for the error, and unref the reply on success
3616 * bus/activation.c: convert to use BusTransaction so OOM can be
3618 (bus_activation_service_created): set sender of the message
3620 2003-04-01 Havoc Pennington <hp@redhat.com>
3622 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3623 <includedir> (at least mostly)
3625 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3626 first, then the user ID
3628 2003-04-01 Havoc Pennington <hp@pobox.com>
3630 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3633 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3635 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3637 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3638 socket 0777, and unlink any existing socket.
3640 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3641 the configuration file so specifies; set up auth mechanism
3644 * bus/config-parser.c (bus_config_parser_content): add support
3645 for <fork> option and fill in code for <auth>
3647 * bus/system.conf.in: add <fork/> to default configuration,
3648 and limit auth mechanisms to EXTERNAL
3650 * doc/config-file.txt (Elements): add <fork>
3652 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3653 (_dbus_change_identity): new function
3655 2003-03-31 Havoc Pennington <hp@redhat.com>
3657 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3658 (_dbus_listen_unix_socket): fix off-by-one error in null
3659 termination spotted by Nalin
3661 2003-03-31 Havoc Pennington <hp@redhat.com>
3663 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3664 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3665 having a real home directory available.
3667 2003-03-31 Havoc Pennington <hp@redhat.com>
3669 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3671 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3673 * configure.in: add support for specifying a style of init script
3676 2003-03-31 Havoc Pennington <hp@redhat.com>
3678 Fix some annoying DBusString API and fix all affected code.
3680 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3682 (_dbus_string_get_data): change to return string instead of using
3684 (_dbus_string_get_const_data): ditto
3685 (_dbus_string_get_data_len): ditto
3686 (_dbus_string_get_const_data_len): ditto
3688 2003-03-31 Havoc Pennington <hp@redhat.com>
3690 * bus/main.c (main): fix up the command line arguments to be nicer
3692 2003-03-31 Havoc Pennington <hp@redhat.com>
3694 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3695 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3696 final location that lands in the config file
3698 * bus/config-loader-expat.c (bus_config_load): fix type of
3701 * doc/TODO: remove TODO item for dbus_bus_get()
3703 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3705 2003-03-31 Havoc Pennington <hp@pobox.com>
3707 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3708 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3709 argument since they are always client side
3711 * dbus/dbus-server.c (dbus_server_get_address): new function
3713 * bus/main.c (main): take the configuration file as an argument.
3715 * test/data/valid-config-files/debug-allow-all.conf: new file to
3716 use with dispatch.c tests for example
3718 * bus/test-main.c (main): require test data dir
3720 * bus/bus.c (bus_context_new): change this to take a
3721 configuration file name as argument
3723 * doc/config-file.txt (Elements): add <servicedir>
3725 * bus/system.conf, bus/session.conf: new files
3727 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3728 well-known socket if none set
3730 * configure.in: create system.conf and session.conf
3732 2003-03-30 Havoc Pennington <hp@pobox.com>
3734 * bus/config-parser.c: hacking
3736 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3737 to shut down, since it could cause weirdness with the DBusList
3740 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3741 link-oriented stack routines
3742 (alloc_link): free the mempool if the first alloc from it fails
3744 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3746 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3748 (_dbus_string_skip_white): new
3750 * doc/config-file.txt (Elements): add <includedir>
3752 2003-03-28 Havoc Pennington <hp@pobox.com>
3754 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3755 (_dbus_string_copy_data): new functions
3757 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3759 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3763 * dbus/dbus-memory.c:
3766 2003-03-28 Havoc Pennington <hp@pobox.com>
3768 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3769 I think it may have just been superstition. Not sure.
3771 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3772 failures that were not being handled.
3774 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3776 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3777 row that will fail on out-of-memory.
3779 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3780 function for testing out-of-memory handling.
3782 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3783 allocation functions, they do map exactly to the expat ones.
3785 2003-03-27 Havoc Pennington <hp@redhat.com>
3787 * bus/config-loader-libxml.c (bus_config_load): add another error
3790 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3793 Add note about automatic service activation.
3795 * doc/dbus-specification.sgml:
3796 Rename the specification and clarify a few things.
3798 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3801 * dbus/dbus-address.c:
3803 * dbus/dbus-marshal.c:
3804 * dbus/dbus-server-debug-pipe.c:
3805 * dbus/dbus-transport-unix.c:
3806 Fix documentation warnings.
3808 2003-03-26 Havoc Pennington <hp@pobox.com>
3810 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3811 after every test so it's quick and easy to see which leaked, and
3812 so we test multiple dbus_shutdown() calls
3814 * configure.in: change configure.in XML stuff to also support
3817 * config-loader-libxml.c: some hacking
3819 * config-loader-expat.c: some hacking
3821 * config-parser.c: some hacking, plus tests
3823 2003-03-25 Havoc Pennington <hp@redhat.com>
3825 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3827 * configure.in: add --with-xml option to specify XML library,
3828 right now only libxml is supported.
3830 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3831 nonworking code between home and work, still just stubs
3833 2003-03-24 Havoc Pennington <hp@redhat.com>
3835 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3838 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3839 NULL argument for "message" if the error is a well-known one,
3840 fill in a generic message in this case.
3842 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3845 * bus/test.c (bus_test_flush_bus): add
3847 * bus/policy.c (bus_policy_test): test code stub
3849 2003-03-24 Havoc Pennington <hp@pobox.com>
3851 * bus/connection.c (bus_connections_setup_connection): set up
3852 the "can this user connect" function, but it always returns
3853 TRUE until we have a config file parser so we can have a config
3854 file that allows connections.
3856 2003-03-23 Havoc Pennington <hp@pobox.com>
3858 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3859 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3860 the mutex, so we can check for proper memory management
3863 * dbus/dbus-dataslot.c: remove the mutex from
3864 DBusDataSlotAllocator and lock it manually when using it,
3865 to simplify fitting it into the global slots framework.
3867 * dbus/dbus-threads.c (init_static_locks): rework how we're
3868 handling global locks so they are easily shut down.
3870 * bus/policy.c (bus_policy_append_rule): fix
3872 * bus/test-main.c (main): check for memleaks
3874 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3875 test suite check for memleaks
3877 * dbus/dbus-memory.c: add support in test mode for tracking
3878 number of outstanding blocks
3880 2003-03-23 Havoc Pennington <hp@pobox.com>
3882 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3885 * dbus/dbus-hash.h: add ULONG hash keys
3887 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3888 (_dbus_get_group_id): new function
3890 2003-03-20 Havoc Pennington <hp@redhat.com>
3892 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3894 (dbus_connection_get_unix_user): new function
3896 2003-03-20 Havoc Pennington <hp@pobox.com>
3898 * bus/connection.c (bus_connection_send_oom_error): assert that
3899 message has a sender
3900 (connection_execute_transaction): ditto
3901 (bus_connection_preallocate_oom_error): fix to set the sender, and
3902 set recipient to the destination service, not the bus driver
3904 * bus/policy.c: hacking
3906 * dbus/dbus-message.c (dbus_message_service_is): new function
3907 (dbus_message_sender_is): new
3909 2003-03-19 Havoc Pennington <hp@redhat.com>
3911 * bus/policy.c: start sketching code for policy restrictions on
3912 what connections can do.
3914 2003-03-18 Havoc Pennington <hp@redhat.com>
3916 * doc/TODO: some notes on high-level todo items. Little nitpick
3917 stuff is all in @todo, so no need to add it here.
3919 * doc/config-file.txt: some notes on how config file might look
3921 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3927 2003-03-17 Havoc Pennington <hp@redhat.com>
3929 * dbus/dbus-internals.h: add gcc attributes so that
3930 our printf-style functions warn on bad arguments to
3933 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3936 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3939 2003-03-17 Havoc Pennington <hp@redhat.com>
3941 * bus/test-main.c (main): make it print something as it runs
3942 so make check doesn't look stuck
3944 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3945 from CVS, now obsolete
3947 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3949 * bus/dispatch.c: (bus_dispatch):
3950 Refetch the service name since it may have been reallocated
3951 when dbus_message_set_sender was called.
3953 * dbus/dbus-sysdeps.c: (_dbus_accept):
3954 Add address and address length variables and use them to stop
3955 valgrind from complaining.
3957 2003-03-17 Havoc Pennington <hp@pobox.com>
3959 All tests pass, no memleaks, no valgrind complaints.
3961 * bus/test.c: refcount handler_slot
3963 * bus/connection.c (bus_connections_new): refcount
3964 connection_data_slot
3966 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3967 bytes so that auth scripts pass.
3969 * bus/dispatch.c: init message_handler_slot so it gets allocated
3972 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3974 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3975 dealloc server_pipe_hash when no longer used for benefit of
3978 * dbus/dbus-auth.c (process_command): memleak fix
3980 * bus/dispatch.c (check_hello_message): memleak fix
3982 2003-03-16 Havoc Pennington <hp@pobox.com>
3984 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3986 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3988 * bus/activation.c (bus_activation_activate_service): Append
3989 the pending activation entry to the list of pending activations.
3991 2003-03-16 Havoc Pennington <hp@pobox.com>
3993 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3996 * dbus/dbus-address.c (create_entry): fix OOM handling when
3997 failing to alloc entry->method
3999 2003-03-16 Havoc Pennington <hp@pobox.com>
4001 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4004 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4005 add some missing dbus_set_result
4007 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4008 alloc the DBusMessageHandler
4010 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4011 the transport here, since we call this from the finalizer; it
4012 resulted in a double-finalize.
4014 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4015 where we tried to use transport->connection that was NULL,
4016 happened when transport was disconnected early on due to OOM
4018 * bus/*.c: adapt to handle OOM for watches/timeouts
4020 * dbus/dbus-transport-unix.c: port to handle OOM during
4023 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4024 reference to unused bytes instead of a copy
4026 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4029 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4032 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4035 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4037 * doc/dbus-specification.sgml:
4038 Document reply message for ActivateService.
4040 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4042 * bus/activation.c: (bus_pending_activation_entry_free),
4043 (bus_pending_activation_free), (bus_activation_new),
4044 (bus_activation_unref), (bus_activation_service_created),
4045 (bus_activation_activate_service):
4047 * bus/bus.c: (bus_context_new):
4048 * bus/desktop-file.c: (new_section):
4049 * bus/driver.c: (bus_driver_send_service_deleted),
4050 (bus_driver_handle_activate_service):
4051 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4053 * dbus/dbus-connection.c:
4054 (dbus_connection_send_with_reply_and_block):
4055 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4056 * dbus/dbus-protocol.h:
4057 Make activation work better. Now pending activations will be queued
4058 and the daemon won't try to activate services that are already registered.
4060 2003-03-16 Havoc Pennington <hp@pobox.com>
4062 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4065 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4066 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4068 2003-03-16 Havoc Pennington <hp@pobox.com>
4070 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4071 this. always run the test suite before commit...
4073 * bus/*: adapt to DBusConnection API changes
4075 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4076 requires renaming stuff to avoid dbus_connection_dispatch name
4079 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4082 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4083 separate from _dbus_message_loader_return_buffer()
4085 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4086 this, because it's now always broken to use; the number of
4087 messages in queue vs. the number still buffered by the message
4088 loader is undefined/meaningless. Should use
4089 dbus_connection_get_dispatch_state().
4090 (dbus_connection_dispatch): rename from
4091 dbus_connection_dispatch_message
4093 2003-03-16 Havoc Pennington <hp@pobox.com>
4095 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4098 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4100 * dbus/dbus-connection.c:
4101 (dbus_connection_send_with_reply_and_block):
4102 Decrease connection->n_incoming when removing an entry
4104 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4105 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4106 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4107 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4108 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4109 (dbus_dict_get_byte_array):
4110 Handle NULL arrays and strings. Also add support for byte arrays.
4112 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4113 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4114 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4115 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4116 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4117 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4118 * dbus/dbus-marshal.h:
4119 Add support for marshalling and demarshalling empty arrays and strings.
4121 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4122 (dbus_message_append_string_array),
4123 (dbus_message_iter_get_boolean),
4124 (dbus_message_iter_get_boolean_array),
4125 (dbus_message_iter_get_int32_array),
4126 (dbus_message_iter_get_uint32_array),
4127 (dbus_message_iter_get_double_array),
4128 (dbus_message_iter_get_byte_array),
4129 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4130 (check_message_handling):
4131 Add support for getting empty arrays and dicts.
4133 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4134 Don't do any validation at all for now, that's better than just checking
4137 * test/data/valid-messages/emptiness.message:
4138 New test message with lots of empty arrays.
4140 2003-03-16 Havoc Pennington <hp@pobox.com>
4142 * dbus/dbus-connection.c
4143 (_dbus_connection_queue_received_message_link): new function that
4144 can't fail due to OOM
4146 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4147 new function pops a message together with a list link
4150 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4151 message queuing functions to avoid needing to alloc memory
4153 2003-03-16 Havoc Pennington <hp@pobox.com>
4155 Oops - test code was only testing failure of around 30 of the
4156 mallocs in the test path, but it turns out there are 500+
4157 mallocs. I believe this was due to misguided linking setup such
4158 that there was one copy of dbus_malloc etc. in the daemon and one
4159 in the shared lib, and only daemon mallocs were tested. In any
4160 case, the test case now tests all 500+ mallocs, and doesn't pass
4161 yet, though there are lots of fixes in this patch.
4163 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4164 this so that it doesn't need to allocate memory, since it
4165 has no way of indicating failure due to OOM (and would be
4166 annoying if it did).
4168 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4170 * bus/Makefile.am: rearrange to create two self-contained
4171 libraries, to avoid having libraries with overlapping symbols.
4172 that was resulting in weirdness, e.g. I'm pretty sure there
4173 were two copies of global static variables.
4175 * dbus/dbus-internals.c: move the malloc debug stuff to
4178 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4181 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4183 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4186 * bus/dispatch.c (bus_dispatch_add_connection): free
4187 message_handler_slot when no longer using it, so
4188 memory leak checkers are happy for the test suite.
4190 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4192 * bus/bus.c (new_connection_callback): disconnect in here if
4193 bus_connections_setup_connection fails.
4195 * bus/connection.c (bus_connections_unref): fix to free the
4197 (bus_connections_setup_connection): if this fails, don't
4198 disconnect the connection, just be sure there are no side
4201 * dbus/dbus-string.c (undo_alignment): unbreak this
4203 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4205 (_dbus_auth_new): fix the order in which we free strings
4208 * bus/connection.c (bus_connection_disconnected): fix to
4209 not send ServiceDeleted multiple times in case of memory
4212 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4213 get the base service name
4214 (dbus_bus_register_client): don't return base service name,
4215 instead store it on the DBusConnection and have an accessor
4217 (dbus_bus_register_client): rename dbus_bus_register()
4219 * bus/dispatch.c (check_hello_message): verify that other
4220 connections on the bus also got the correct results, not
4221 just the one sending hello
4223 2003-03-15 Havoc Pennington <hp@pobox.com>
4225 Make it pass the Hello handling test including all OOM codepaths.
4226 Now to do other messages...
4228 * bus/services.c (bus_service_remove_owner): fix crash when
4229 removing owner from an empty list of owners
4230 (bus_registry_ensure): don't leave service in the list of
4231 a connection's owned services if we fail to put the service
4234 * bus/connection.c (bus_connection_preallocate_oom_error): set
4235 error flag on the OOM error.
4237 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4238 handle _dbus_transport_set_connection failure
4240 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4241 to create watches up front and simply enable/disable them as
4243 (unix_connection_set): this can now fail on OOM
4245 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4246 of enabling/disabling a watch or timeout.
4248 * bus/loop.c (bus_loop_iterate): don't touch disabled
4251 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4253 2003-03-15 Havoc Pennington <hp@pobox.com>
4255 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4256 write useful test code, after all that futzing around ;-)
4258 Test does not yet pass because we can't handle OOM in
4259 _dbus_transport_messages_pending (basically,
4260 dbus_connection_preallocate_send() does not prealloc the write
4261 watch). To fix this, I think we need to add new stuff to
4262 set_watch_functions, namely a SetEnabled function so we can alloc
4263 the watch earlier, then enable it later.
4265 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4266 dbus-memory.c to the convenience lib
4268 * bus/test.c: rename some static functions to keep them clearly
4269 distinct from stuff in connection.c. Handle client disconnection.
4271 2003-03-14 Havoc Pennington <hp@pobox.com>
4273 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4274 transport, tests more of the real codepath. Set up clients
4275 with bus_setup_debug_client.
4277 * bus/test.c (bus_setup_debug_client): function to set up debug
4278 "clients" on the main loop
4280 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4283 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4286 * dbus/dbus-server-debug.c: support a debug server based on pipes
4288 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4289 (_dbus_close): new function
4291 * configure.in: check for socketpair
4293 2003-03-14 Havoc Pennington <hp@redhat.com>
4295 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4298 * dbus/dbus-transport-debug.c: rework this a good bit to be
4299 less complicated. hopefully still works.
4301 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4304 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4307 * dbus/dbus-message.c (dbus_message_copy): rename from
4308 dbus_message_new_from_message, fix it up to copy
4309 all the message fields, add test case
4311 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4312 not quite passing yet
4314 2003-03-14 Havoc Pennington <hp@pobox.com>
4316 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4317 until no work remains" in test code. (the large diff here
4318 is just code movement, no actual changes)
4320 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4321 1, no point waiting around for test code.
4322 (_dbus_server_debug_accept_transport): unref the timeout
4323 after adding it (right?)
4325 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4327 2003-03-13 Havoc Pennington <hp@redhat.com>
4329 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4332 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4335 * dbus/dbus-connection.h: Make AddWatchFunction and
4336 AddTimeoutFunction return a bool so they can fail on out-of-memory
4338 * bus/bus.c (bus_context_new): set up timeout handlers
4340 * bus/connection.c (bus_connections_setup_connection): set up
4343 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4346 * bus/bus.c (bus_context_new): adapt to changes
4348 * bus/connection.c: adapt to changes
4350 * test/watch.c: adapt to DBusWatch changes
4352 * bus/dispatch.c (bus_dispatch_test): started adding this but
4355 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4357 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4359 2003-03-13 Havoc Pennington <hp@pobox.com>
4361 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4362 set up a test framework as for the library
4364 2003-03-12 Havoc Pennington <hp@pobox.com>
4366 Throughout: purge global variables, introduce BusActivation,
4367 BusConnections, BusRegistry, etc. objects instead.
4369 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4372 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4373 going to redo this a bit differently I think
4375 2003-03-12 Havoc Pennington <hp@redhat.com>
4377 Mega-patch that gets the message bus daemon initially handling
4378 out-of-memory. Work still needed. Also lots of random
4379 moving stuff to DBusError instead of ResultCode.
4381 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4383 * dbus/dbus-connection.c
4384 (dbus_connection_send_with_reply_and_block): use DBusError
4386 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4389 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4390 code here, as the only failure possible is OOM.
4392 * bus/connection.c (bus_connection_disconnect):
4393 rename bus_connection_disconnected as it's a notification only
4395 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4396 "name" on get_args failure, should be done by get_args;
4397 don't disconnect client for bad args, just return an error.
4398 (bus_driver_handle_service_exists): ditto
4400 * bus/services.c (bus_services_list): NULL-terminate returned array
4402 * bus/driver.c (bus_driver_send_service_lost)
4403 (bus_driver_send_service_acquired): send messages from driver to a
4404 specific client to the client's unique name, not to the broadcast
4407 * dbus/dbus-message.c (decode_header_data): reject messages that
4408 contain no name field
4409 (_dbus_message_get_client_serial): rename to
4410 dbus_message_get_serial and make public
4411 (_dbus_message_set_serial): rename from set_client_serial
4412 (_dbus_message_set_reply_serial): make public
4413 (_dbus_message_get_reply_serial): make public
4415 * bus/connection.c (bus_connection_foreach): allow stopping
4416 iteration by returning FALSE from foreach function.
4418 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4419 (dbus_connection_free_preallocated_send)
4420 (dbus_connection_preallocate_send): new API for sending a message
4421 without possibility of malloc failure.
4422 (dbus_connection_send_message): rename to just
4423 dbus_connection_send (and same for whole function family)
4425 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4427 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4429 * bus/activation.c: handle/return errors
4431 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4433 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4434 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4435 (_dbus_result_from_errno): move to this file
4437 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4439 * dbus/dbus-marshal.c:
4440 (_dbus_marshal_set_string):
4441 Take a length argument so we can marshal the correct string
4444 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4445 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4446 (_dbus_marshal_test):
4447 * dbus/dbus-marshal.h:
4448 Add support for marshalling and demarshalling dicts.
4450 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4451 Add support for TYPE DICT.
4453 * dbus/dbus-message.c: (set_string_field):
4454 Adjust header padding.
4456 (dbus_message_append_args_valist), (dbus_message_append_dict),
4457 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4458 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4459 (check_message_handling), (check_have_valid_message):
4460 * dbus/dbus-message.h:
4461 Add functions for setting and getting dicts.
4463 * dbus/dbus-protocol.h:
4469 * doc/dbus-specification.sgml:
4470 Add information about how dicts are marshalled.
4472 * test/data/invalid-messages/dict-with-nil-value.message:
4473 * test/data/invalid-messages/too-short-dict.message:
4474 * test/data/valid-messages/dict-simple.message:
4475 * test/data/valid-messages/dict.message:
4476 Add sample messages containing dicts.
4478 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4480 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4482 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4485 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4486 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4487 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4488 (dbus_dict_set_double), (dbus_dict_set_string),
4489 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4490 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4491 (dbus_dict_set_string_array), (_dbus_dict_test):
4493 Fix according to comments from Havoc.
4495 2003-03-06 Michael Meeks <michael@server.home>
4497 * configure.in: if we don't have kde-config, disable have_qt.
4499 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4504 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4505 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4506 (dbus_dict_remove), (dbus_dict_get_value_type),
4507 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4508 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4509 (dbus_dict_put_double), (dbus_dict_put_string),
4510 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4511 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4512 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4513 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4514 (dbus_dict_get_double), (dbus_dict_get_string),
4515 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4516 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4517 (dbus_dict_get_string_array), (_dbus_dict_test):
4519 Add DBusDict implementation
4521 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4525 2003-03-04 Havoc Pennington <hp@pobox.com>
4527 * test/data/auth/*: adapt to changes
4529 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4530 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4533 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4534 more stuff from being in a context name, to make the protocol
4535 simpler to deal with
4537 * dbus/dbus-errors.c (dbus_error_has_name): new function
4538 (dbus_error_is_set): new function
4540 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4541 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4543 * dbus/dbus-connection.c (dbus_connection_flush): also read
4544 messages during a flush operation
4546 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4548 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4550 * configure.in: Check for gethostbyname on Solaris.
4552 * dbus/dbus-transport.c: (_dbus_transport_open):
4553 Remove duplicate "tcp" entry.
4555 * doc/dbus-specification.sgml:
4556 Clarify some things.
4558 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4560 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4561 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4562 (_dbus_keyring_test):
4563 * dbus/dbus-md5.c: (_dbus_md5_compute):
4564 * dbus/dbus-sha.c: (_dbus_sha_compute):
4567 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4569 * README: Add some things.
4571 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4573 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4574 after case DBUS_TYPE_BOOELAN.
4576 2003-03-02 Havoc Pennington <hp@pobox.com>
4578 * test/break-loader.c (randomly_set_extreme_ints): add test that
4579 sets really huge and small integers
4581 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4582 that length of boolean array fits in the string, and that
4583 string has room for boolean value in single-bool case.
4585 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4586 optional value to "ALIGN" command which is what to fill the
4589 * test/data/valid-messages/no-padding.message: add regression
4590 test for the message padding problem
4592 2003-03-02 Havoc Pennington <hp@pobox.com>
4594 * dbus/dbus-message.c (decode_header_data): fix to always init
4595 message_padding, from Benjamin Dauvergne
4597 2003-03-02 Havoc Pennington <hp@pobox.com>
4603 2003-03-01 Joe Shaw <joe@assbarn.com>
4605 * configure.in: Check for "struct cmsgcred" and try to access its
4606 members for BSD-like unices.
4608 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4609 _dbus_read_credentials_unix_socket().
4610 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4611 read() for reading the credential byte off the unix socket. Use
4612 struct cmsgcred on systems that support it.
4614 2003-02-27 Alexander Larsson <alexl@redhat.com>
4618 Make gthreads-2.0 dependency optional. Don't build thread test if
4621 2003-02-27 Havoc Pennington <hp@pobox.com>
4623 * dbus/dbus-connection.c
4624 (dbus_connection_send_message_with_reply_and_block): fix doh!
4625 doh! doh! bug that resulted in never removing a reply from the
4626 queue, no wonder we called get_reply_serial so much ;-)
4628 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4629 and client serial instead of demarshaling them every time
4631 2003-02-27 Havoc Pennington <hp@pobox.com>
4633 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4634 more inlined, using dbus-string-private.h, speeds things up
4637 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4638 when freeing the string
4639 (_dbus_string_steal_data): fix for align offset
4640 (undo_alignment): new function
4642 2003-02-26 Havoc Pennington <hp@redhat.com>
4644 All kinds of audit fixes from Owen, plus initial attempt to
4645 handle unaligned memory returned from malloc.
4647 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4648 leave room for align_offset and nul byte
4649 (fixup_alignment): function to track an align_offset and
4650 ensure real->str is aligned
4651 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4652 to allow a nul byte plus align offset
4653 (_dbus_string_lock): fix overflow issue
4654 (_dbus_string_init_const_len): add assertions on sanity of len,
4655 assign allocated to be ALLOCATION_PADDING larger than len
4656 (set_length): fixup the overflow handling
4657 (_dbus_string_get_data_len): fix overflow in assertion
4658 (open_gap): detect overflow in size of gap to be opened
4659 (_dbus_string_lengthen): add overflow check
4660 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4661 (_dbus_string_append): add overflow check
4662 (_dbus_string_append_unichar): overflow
4663 (_dbus_string_delete): fix overflow in assertion
4664 (_dbus_string_copy_len): overflow in assertion
4665 (_dbus_string_replace_len): overflows in assertions
4666 (_dbus_string_find): change to implement in terms of
4667 _dbus_string_find_to
4668 (_dbus_string_find_to): assorted fixage
4669 (_dbus_string_equal_c_str): assert c_str != NULL,
4670 fix logic so the function works
4671 (_dbus_string_ends_with_c_str): fix overflow thingy
4672 (_dbus_string_base64_encode): overflow fix
4673 (_dbus_string_validate_ascii): overflow
4674 (_dbus_string_validate_nul): overflow
4676 2003-02-26 Havoc Pennington <hp@redhat.com>
4678 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4680 2003-02-26 Alexander Larsson <alexl@redhat.com>
4683 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4685 * dbus/dbus-connection.c:
4686 * dbus/dbus-connection.h:
4687 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4688 Add dbus_connection_set_wakeup_main_function and use it when queueing
4689 incoming and outgoing messages.
4692 * dbus/dbus-dataslot.c:
4693 Threadsafe usage of DBusDataSlotAllocator
4695 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4698 * dbus/dbus-server-unix.c:
4701 * glib/dbus-gmain.c:
4702 Implement the new wakeup functions for glib.
4705 * glib/test-thread-client.c:
4706 * glib/test-thread-server.c:
4707 * glib/test-thread.h:
4708 Initial cut at some thread test code. Not really done yet.
4710 2003-02-26 Havoc Pennington <hp@pobox.com>
4712 * dbus/dbus-connection.c
4713 (dbus_connection_send_message_with_reply_and_block): fix crash
4714 where we ref'd the outgoing message instead of the returned reply
4716 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4717 at the end of this function, so if we didn't need to read for
4718 authentication, we reinstall it for receiving messages
4720 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4721 a NULL sender for peer-to-peer case
4723 * dbus/dbus-transport-unix.c (check_read_watch): handle
4724 !authenticated case correctly
4726 * glib/dbus-gmain.c: add support for DBusServer
4728 * dbus/dbus-server.c: add data slot support
4730 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4731 return values and handle errors
4733 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4736 * Doxyfile.in (INPUT): add glib subdir
4738 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4739 setup_with_g_main instead of hookup_with_g_main; write docs
4741 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4743 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4744 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4745 * dbus/dbus-message.c: (dbus_message_append_boolean),
4746 (dbus_message_append_boolean_array),
4747 (dbus_message_get_args_valist), (_dbus_message_test):
4748 * dbus/dbus-message.h:
4749 * doc/dbus-specification.sgml:
4750 Various fixes as pointed out by Havoc.
4752 * test/data/invalid-messages/bad-boolean-array.message:
4753 * test/data/invalid-messages/bad-boolean.message:
4754 Add invalid boolean value test cases.
4756 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4758 * dbus/dbus-internals.c: (_dbus_type_to_string):
4759 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4760 (_dbus_marshal_validate_arg):
4761 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4762 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4763 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4764 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4765 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4766 (dbus_message_iter_get_double),
4767 (dbus_message_iter_get_boolean_array), (message_iter_test):
4768 * dbus/dbus-message.h:
4769 * dbus/dbus-protocol.h:
4770 * doc/dbus-specification.sgml:
4771 * test/data/valid-messages/lots-of-arguments.message:
4772 Add support for boolean and boolean array types.
4774 2003-02-23 Havoc Pennington <hp@pobox.com>
4776 * dbus/dbus-keyring.c: finish most of this implementation and
4779 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4780 these barf if the error isn't cleared to NULL
4782 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4783 (_dbus_create_directory): new function
4785 * dbus/dbus-errors.c (dbus_set_error): fix warning
4787 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4788 (_dbus_string_hex_decode): new function
4789 (test_hex_roundtrip): test code
4791 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4793 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4795 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4796 the save-to-temp/rename trick to atomically write the new file
4797 (_dbus_string_parse_uint): new function
4799 2003-02-22 Havoc Pennington <hp@pobox.com>
4801 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4803 2003-02-22 Havoc Pennington <hp@pobox.com>
4805 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4806 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4808 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4810 * dbus/test/data/sha-1: add US government test suite for SHA-1
4812 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4814 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4815 Make string arrays NULL-terminated.
4817 * dbus/dbus-memory.c: (dbus_free_string_array):
4818 * dbus/dbus-memory.h:
4819 New function for freeing NULL-terminated string arrays.
4821 * dbus/dbus-message-builder.c: (append_quoted_string),
4822 (_dbus_message_data_load):
4823 Add support for array types.
4825 * dbus/dbus-message.c: (check_message_handling):
4826 Add more types as test cases.
4828 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4829 (_dbus_string_parse_double):
4830 Add the start offset to the end offset.
4832 * test/data/valid-messages/lots-of-arguments.message:
4833 New test message with lots of arguments.
4835 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4837 * dbus/dbus-message.c: (dbus_message_append_nil),
4838 (dbus_message_append_int32), (dbus_message_append_uint32),
4839 (dbus_message_append_double), (dbus_message_append_string),
4840 (dbus_message_append_int32_array),
4841 (dbus_message_append_uint32_array),
4842 (dbus_message_append_double_array),
4843 (dbus_message_append_byte_array),
4844 (dbus_message_append_string_array):
4845 Fix all out-of-memory handling in these functions.
4847 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4849 * dbus/dbus-message.c: (dbus_message_append_nil):
4852 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4854 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4855 (dbus_message_append_nil), (dbus_message_append_int32_array),
4856 (dbus_message_append_uint32_array),
4857 (dbus_message_append_double_array),
4858 (dbus_message_append_byte_array),
4859 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4860 (dbus_message_iter_get_int32_array),
4861 (dbus_message_iter_get_uint32_array),
4862 (dbus_message_iter_get_double_array),
4863 (dbus_message_iter_get_byte_array),
4864 (dbus_message_iter_get_string_array):
4866 * dbus/dbus-message.h:
4867 Add functions for appending and getting arrays.
4869 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4871 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4872 element size at least 8 bytes, fixes mempool tests on
4875 2003-02-20 Alexander Larsson <alexl@redhat.com>
4877 * dbus/dbus-transport-unix.c (unix_do_iteration):
4878 Unlock the connection mutex during a blocking select call.
4879 Add todo about how we need a way to wake up the select.
4881 * dbus/dbus-connection-internal.h:
4882 * dbus/dbus-connection.c:
4883 Add _dbus_connection_lock and _dbus_connection_unlock.
4885 2003-02-19 Havoc Pennington <hp@pobox.com>
4887 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4888 Doxyfile.in, not Doxyfile
4890 * dbus/dbus-keyring.c: do some hacking on this
4892 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4894 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4896 (dbus_set_error): remove dbus_error_init, check for message ==
4897 NULL *before* we sprintf into it, and add @todo about including
4898 system headers in this file
4900 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4902 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4904 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4905 get various bits of user information based on either username
4907 (_dbus_homedir_from_username): new function
4909 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4912 Add check for nonposix getpwnam_r
4914 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4915 Align the pool element size to a sizeof (void *) boundary.
4917 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4918 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4919 General Solaris fixes.
4921 * test/data/valid-messages/simplest-manual.message:
4922 Explicitly state that we want little-endian packing.
4924 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4926 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4928 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4929 Added to create a transport connecting using a tcp/ip socket.
4931 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4932 to a tcp socket at given host and port.
4933 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4936 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4938 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4939 Added to create a server listening on a TCP/IP socket.
4941 2003-02-19 Havoc Pennington <hp@pobox.com>
4943 Throughout: mop up all the Doxygen warnings and undocumented
4946 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4947 to search any paths.
4949 * dbus/dbus-threads.c: move global mutex initializers to
4950 dbus-internals.h, multiple prototypes was confusing doxygen
4951 besides being kind of ugly
4953 * Doxyfile (PREDEFINED): have Doxygen define
4954 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4955 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4956 (do not abuse the feature! it's for stuff like the autogenerated
4957 macros in dbus-md5.c, not just for things you don't feel like
4960 2003-02-18 Havoc Pennington <hp@pobox.com>
4962 * dbus/dbus-string.c (_dbus_string_zero): new function
4964 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4965 wrap it in some dbus-friendly API
4967 * dbus/dbus-types.h: add 16-bit types
4969 2003-02-18 Joe Shaw <joe@assbarn.com>
4971 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4972 credentials from our currently running process.
4973 (get_word): Fix a buglet where we were copying the entire length
4974 instead of relative to our position.
4976 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4977 keys on the stack... it's 640k of data.
4979 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4980 read the credentials byte off the socket, even if we don't have
4982 (_dbus_poll): Implement poll() using select() for systems which
4985 * glib/test-dbus-glib.c (main): Print out an error if no
4986 parameters are given.
4988 * test/data/auth/fallback.auth-script: Added. Tests that a client
4989 can fallback to a secondary auth mechanism if the first fails.
4991 2003-02-18 Havoc Pennington <hp@pobox.com>
4995 2003-02-17 Havoc Pennington <hp@pobox.com>
4997 * doc/dbus-specification.sgml: lots of cosmetic
4998 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4999 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5000 s/server/bus/ (except in authentication section). Add a section
5001 "Message Bus Message Routing"
5003 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5009 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5011 * doc/dbus-specification.sgml:
5012 Specification updates.
5014 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5016 * bus/activation.c: (bus_activation_init), (child_setup),
5017 (bus_activation_activate_service):
5019 * bus/main.c: (main):
5020 Set DBUS_ADDRESS environment variable.
5022 * dbus/dbus-errors.c: (dbus_set_error):
5023 Don't use va_copy since that's a C99 feature.
5025 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5026 (_dbus_spawn_async):
5027 * dbus/dbus-sysdeps.h:
5028 Add child_setup_func to _dbus_spawn_async.
5030 * doc/dbus-specification.sgml:
5031 Update specification.
5033 * test/spawn-test.c: (setup_func), (main):
5036 2003-02-17 Alexander Larsson <alexl@redhat.com>
5038 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5041 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5045 * doc/dbus-test-plan.sgml:
5046 Add test plan document.
5051 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5053 * dbus/dbus-message.c: (decode_header_data),
5054 (_dbus_message_loader_return_buffer):
5055 Set the header padding amount when loading a message.
5057 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5059 * bus/dispatch.c: (send_one_message):
5060 Only send broadcast messages to registered connections.
5062 * dbus/dbus-message.c: (dbus_message_name_is):
5063 * dbus/dbus-message.h:
5064 New convenience function.
5066 * dbus/dbus-transport-debug.c: (do_reading):
5067 Only dispatch one message per run.
5070 * test/bus-test.c: (new_connection_callback), (die),
5071 (test_hello_client1_handler), (test_hello_client2_handler),
5072 (test_hello_replies), (main):
5074 * test/bus-test-loop.[ch]:
5077 2003-02-16 Havoc Pennington <hp@pobox.com>
5079 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5080 backward conditional
5082 2003-02-16 Alexander Larsson <alexl@redhat.com>
5084 * dbus/dbus-connection.c:
5085 Implement sent_message_with_reply. (with_reply_and block is still
5087 Made dispatch_message not lose message if OOM.
5089 * dbus/dbus-errors.h:
5090 Add NoReply error (for reply timeouts).
5092 2003-02-16 Alexander Larsson <alexl@redhat.com>
5094 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5095 Actually free keys and values when destroying hashtable.
5097 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5099 * dbus/dbus-auth.c: (client_try_next_mechanism):
5102 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5103 Return TRUE if there's no thread implementation around.
5105 * glib/dbus-gmain.c: (free_source),
5106 (dbus_connection_hookup_with_g_main):
5107 Make sure to remove the GSource when the connection is finalized.
5109 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5111 * bus/dispatch.c: (bus_dispatch_message_handler):
5112 * dbus/dbus-errors.h:
5113 Return an error if someone tries to send a message to a service
5116 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5118 * bus/activation.c: (load_directory), (bus_activation_init),
5119 (bus_activation_activate_service):
5122 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5123 More work on the activation handling.
5125 * dbus/dbus-errors.h:
5126 Add some error messages
5128 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5129 * dbus/dbus-message.h:
5130 New function that creates an error message.
5132 * dbus/dbus-protocol.h:
5133 Add ACTIVATE_SERVER message.
5135 * dbus/dbus-server-unix.c: (unix_handle_watch),
5136 (_dbus_server_new_for_domain_socket):
5137 Call _dbus_fd_set_close_on_exec.
5139 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5140 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5141 (_dbus_fd_set_close_on_exec):
5142 * dbus/dbus-sysdeps.h:
5143 Add _dbus_fd_set_close_on exec function. Also add function that checks
5144 that all open fds are set to close-on-exec and warns otherwise.
5146 * dbus/dbus-transport-unix.c:
5147 (_dbus_transport_new_for_domain_socket):
5148 Call _dbus_fd_set_close_on_exec.
5150 2003-02-16 Havoc Pennington <hp@pobox.com>
5152 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5153 allow people to avoid setting SIGPIPE to SIG_IGN
5154 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5155 we've been asked not to
5157 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5159 * dbus/dbus-list.c: (_dbus_list_append_link),
5160 (_dbus_list_prepend_link):
5161 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5165 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5168 * bus/activation.c: (bus_activation_entry_free),
5169 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5171 * bus/main.c: (main):
5172 Add simple activation support, doesn't work yet though.
5174 2003-02-15 Zack Rusin <zack@kde.org>
5176 * qt/dbus-qthread.cpp: small casting fix
5178 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5180 * dbus/dbus-errors.c: (dbus_set_error):
5181 * dbus/dbus-errors.h:
5182 Add a few errors and make dbus_set_error void.
5184 * dbus/dbus-sysdeps.c:
5185 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5186 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5187 * dbus/dbus-sysdeps.h:
5188 Add _dbus_spawn_async.
5190 * test/spawn-test.c: (main):
5191 Test for _dbus_spawn_async.
5193 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5195 * dbus/dbus-internals.h:
5196 Fix build without tests.
5198 * dbus/dbus-list.c: (alloc_link):
5199 Fix a segfault when a malloc fails.
5201 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5202 (dbus_malloc0), (dbus_realloc):
5203 Add support for malloc debugging.
5205 2003-02-15 Alexander Larsson <alexl@redhat.com>
5207 * dbus/dbus-threads.c:
5208 * dbus/dbus-threads.h:
5209 Add condvars. Remove static mutext from API.
5210 Implement static mutexes by initializing them from threads_init.
5212 * glib/dbus-gthread.c:
5213 * qt/dbus-qthread.cpp:
5214 Update with the thread api changes.
5219 Turn StaticMutex into normal mutex + init function.
5220 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5221 _dbus_list_append_link, _dbus_list_prepend_link
5224 * dbus/dbus-sysdeps.c:
5225 * dbus/dbus-sysdeps.h:
5226 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5227 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5229 * dbus/dbus-protocol.h:
5230 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5232 * dbus/dbus-message.c:
5233 Make ref/unref atomic.
5236 * dbus/dbus-connection-internal.h:
5237 * dbus/dbus-connection.c:
5238 * dbus/dbus-connection.h:
5240 Change _peek to _borrow,_return & _steal_borrowed.
5241 Change disconnect callback to event.
5242 Make dbus_connection_dispatch_messages reentrant.
5244 * dbus/dbus-transport.c:
5245 Don't ref the connection on calls to the transport
5248 * dbus/dbus-message-handler.c:
5251 * glib/dbus-gmain.c:
5252 Don't use peek_message anymore
5255 * test/debug-thread.c:
5256 * test/debug-thread.h:
5257 Simple thread implementation that asserts() on deadlocks in
5258 single-threaded code.
5261 (main) Call debug_threads_init.
5264 Use disconnect message instead of disconnect callback.
5268 Don't call dbus_connection_set_disconnect_function. Instead export
5269 bus_connection_disconnect.
5272 Call bus_connection_disconnect when we get a disconnected message.
5274 2003-02-15 Havoc Pennington <hp@pobox.com>
5276 * dbus/dbus-message.c (dbus_message_new): fool around with the
5279 2003-02-14 Havoc Pennington <hp@pobox.com>
5281 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5283 * dbus/dbus-memory.c: fail if the debug functions indicate we
5286 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5287 (_dbus_decrement_fail_alloc_counter): debug functions to
5288 simulate memory allocation failures
5290 2003-02-14 Havoc Pennington <hp@pobox.com>
5292 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5295 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5297 * bus/driver.c: (bus_driver_handle_hello):
5299 * bus/services.c: (bus_service_lookup):
5300 Reorder message sending so we get a more sane order.
5302 * test/bus-test.c: (message_handler):
5305 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5307 * bus/driver.c: (bus_driver_send_service_deleted),
5308 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5309 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5310 (bus_driver_send_welcome_message),
5311 (bus_driver_handle_list_services),
5312 (bus_driver_handle_acquire_service),
5313 (bus_driver_handle_service_exists):
5314 * dbus/dbus-bus.c: (dbus_bus_register_client),
5315 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5316 * dbus/dbus-errors.c: (dbus_result_to_string):
5317 * dbus/dbus-errors.h:
5318 * dbus/dbus-message.c: (dbus_message_append_args),
5319 (dbus_message_append_args_valist), (dbus_message_get_args),
5320 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5321 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5322 (dbus_message_iter_get_byte_array),
5323 (dbus_message_iter_get_string_array), (message_iter_test),
5324 (check_message_handling), (_dbus_message_test):
5325 * dbus/dbus-message.h:
5326 * test/bus-test.c: (main):
5327 Change fields to arguments in messages, so that they won't be
5328 confused with header fields.
5330 * glib/test-dbus-glib.c: (main):
5331 Remove append_fields from hello message.
5333 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5335 * dbus/dbus-errors.c:
5336 * dbus/dbus-message.c:
5337 * dbus/dbus-string.c:
5338 Documentation fixes.
5340 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5342 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5344 Implement support for timeouts in dbus-glib.
5346 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5348 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5349 * dbus/dbus-message.c: (process_test_subdir):
5350 * test/break-loader.c: (find_breaks_based_on):
5351 Plug some memory leaks.
5353 2003-02-13 Richard Hult <rhult@codefactory.se>
5355 * bus/main.c: Fix build.
5357 * dbus/dbus-errors.h:
5358 * dbus/dbus-errors.c: Fix copyright for Anders.
5360 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5365 * bus/connection.c: (bus_connection_foreach):
5368 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5369 (unescape_string), (new_section), (parse_section_start),
5370 (parse_key_value), (report_error), (bus_desktop_file_load),
5371 (bus_desktop_file_get_string):
5372 * bus/desktop-file.h:
5373 Use DBusError for error reporting.
5375 * bus/dispatch.c: (send_one_message),
5376 (bus_dispatch_message_handler):
5377 * bus/driver.c: (bus_driver_send_service_deleted),
5378 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5379 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5380 (bus_driver_send_welcome_message),
5381 (bus_driver_handle_list_services),
5382 (bus_driver_handle_acquire_service),
5383 (bus_driver_handle_service_exists):
5384 * bus/loop.c: (bus_loop_run):
5386 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5388 * bus/utils.c: (bus_wait_for_memory):
5390 New files with general utility functions.
5392 * dbus/dbus-internals.h:
5393 Remove _DBUS_HANDLE_OOM.
5395 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5397 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5398 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5399 * dbus/dbus-errors.h:
5400 Add DBusError structure.
5402 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5404 * test/data/valid-messages/standard-acquire-service.message:
5405 * test/data/valid-messages/standard-hello.message:
5406 * test/data/valid-messages/standard-list-services.message:
5407 * test/data/valid-messages/standard-service-exists.message:
5408 Add some standard messages.
5410 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5412 * bus/driver.c: (bus_driver_send_welcome_message),
5413 (bus_driver_handle_list_services),
5414 (bus_driver_handle_acquire_service),
5415 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5416 Update for API changes in libdbus.
5418 * dbus/dbus-message.c: (dbus_message_new_reply):
5419 * dbus/dbus-message.h:
5420 Remove the name argument. The spec states that replies shouldn't
5423 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5425 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5426 (report_error), (bus_desktop_file_load), (lookup_section),
5427 (lookup_line), (bus_desktop_file_get_raw),
5428 (bus_desktop_file_get_string):
5429 * bus/desktop-file.h:
5430 Some fixes, and new functions for getting a key value from a section.
5432 2003-02-13 Havoc Pennington <hp@pobox.com>
5434 * test/data/auth/fail-after-n-attempts.auth-script: new test
5436 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5439 2003-02-13 Havoc Pennington <hp@pobox.com>
5441 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5442 dbus_credentials_match were backward
5444 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5445 NO_CREDENTIALS and ROOT_CREDENTIALS
5447 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5448 into here. Never process more commands after we've reached an
5449 end state; store further data as unused bytes.
5451 * test/data/auth/*: add more auth tests
5453 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5454 command to match exact string and EXPECT_UNUSED to match unused
5457 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5459 2003-02-12 Havoc Pennington <hp@pobox.com>
5461 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5462 \r off of popped lines
5464 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5467 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5470 2003-02-12 Havoc Pennington <hp@pobox.com>
5472 * dbus/Makefile.am: remove break-loader from the build, since it
5475 * configure.in: add --enable-gcov to turn on coverage profiling
5476 flags and disable optimization
5478 2003-02-10 Havoc Pennington <hp@pobox.com>
5480 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5481 initial cut at test framework for DBusAuth from laptop.
5482 Doesn't quite work yet but it compiles and I need to get
5483 it off the 266mhz laptop. ;-)
5485 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5486 fix a memleak in error case
5488 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5491 * bus/desktop-file.c:
5492 * bus/desktop-file.h:
5493 Add a desktop file parser.
5495 2003-02-11 Zack Rusin <zack@kde.org>
5497 * qt/message.[h|cpp]: sample implementation
5498 of the KDE wrapper for DBusMessage
5500 2003-02-09 Zack Rusin <zack@kde.org>
5502 * test/bus-test.c: make_it_compile
5503 * doc/dbus-specification.sgml: minimal semantic fix
5505 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5511 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5514 * dbus/dbus-break-loader.c:
5516 * test/break-loader.c:
5517 Move dbus-break-loader to test/ and rename it to break-loader.
5519 2003-02-02 Havoc Pennington <hp@pobox.com>
5521 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5522 for code to manage cookies in your home directory
5524 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5526 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5527 to authenticate, then disconnect the client.
5529 2003-02-03 Alexander Larsson <alexl@redhat.com>
5531 * dbus/dbus-message.c (dbus_message_append_fields):
5534 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5536 * doc/dbus-specification.sgml:
5537 Update address format section.
5539 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5542 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5543 (message_handler), (new_connection_callback), (loop_quit),
5547 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5549 * bus/driver.c: (bus_driver_handle_service_exists):
5550 Simplify the code a bit.
5552 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5555 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5558 Add libdbus-daemon.la and link to it.
5560 2003-02-01 James Willcox <jwillcox@gnome.org>
5562 * bus/driver.c: (bus_driver_handle_own_service):
5563 Actually include the service reply code in the message.
5565 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5567 * bus/driver.c: (bus_driver_handle_service_exists):
5568 Don't unref the incoming message.
5570 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5572 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5574 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5576 * dbus/dbus-server.c: (dbus_server_listen):
5577 * dbus/dbus-transport.c: (_dbus_transport_open):
5578 ifdef out the calls to the debug transport and server.
5580 2003-02-02 Alexander Larsson <alexl@redhat.com>
5582 * dbus/dbus-watch.c (dbus_watch_get_flags):
5583 Add note in the docs that ERROR or HANGUP won't be returned
5584 and are assumed always on.
5586 * glib/dbus-gmain.c (add_watch):
5587 Always add IO_ERR | IO_HUP
5589 * dbus/dbus-message.h:
5590 Add semicolon after dbus_message_iter_get_string_array().
5591 Makes qt code build again
5593 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5595 * bus/driver.c: (create_unique_client_name),
5596 (bus_driver_handle_hello):
5597 Don't take a name, just use a numeric id to identify
5601 * dbus/dbus-bus.c: (dbus_bus_register_client),
5602 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5604 Add new convenience functions for communicating with the bus.
5606 * dbus/dbus-message.h:
5608 * dbus/dbus-protocol.h:
5611 2003-02-01 Alexander Larsson <alexl@redhat.com>
5613 * dbus/dbus-message.c (dbus_message_append_fields):
5614 Add some more doc comments.
5616 2003-02-01 Havoc Pennington <hp@pobox.com>
5618 * dbus/dbus-break-loader.c (randomly_modify_length): change
5619 a 4-byte value in the message as if it were a length
5621 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5622 execute bit on saved files
5624 2003-02-01 Havoc Pennington <hp@pobox.com>
5626 * dbus/dbus-break-loader.c (main): new program to find messages
5627 that break the loader.
5629 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5630 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5632 * dbus/dbus-string.c (_dbus_string_set_byte): new
5634 2003-01-31 Havoc Pennington <hp@pobox.com>
5636 * dbus/dbus-message.c: refactor the test code to be more general,
5637 in preparation for writing a "randomly permute test cases to
5638 try to break the loader" program.
5640 2003-01-31 Havoc Pennington <hp@pobox.com>
5642 * doc/dbus-specification.sgml: work on the specification
5644 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5645 the protocol version of the message.
5647 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5648 no longer specifies that.
5649 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5652 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5653 "break" for DBUS_TYPE_NIL, remove @todo
5655 2003-01-31 Havoc Pennington <hp@pobox.com>
5657 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5658 just set_is_error/get_is_error as this is a commonly-used
5659 function, and write docs.
5661 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5663 * dbus/dbus-address.c: (dbus_address_entry_free):
5664 Free key and value lists.
5666 * dbus/dbus-internals.c: (_dbus_type_to_string):
5667 Add the types we didn't have.
5669 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5670 (_dbus_marshal_validate_arg):
5673 * dbus/dbus-message.c: (dbus_message_set_sender):
5674 Remove todo about being able to set sender to NULL.
5676 (dbus_message_set_is_error_reply),
5677 (dbus_message_get_is_error_reply):
5678 * dbus/dbus-message.h:
5681 * dbus/dbus-protocol.h:
5682 Add error reply flag.
5684 * test/data/valid-messages/opposite-endian.message:
5685 Add NIL type to test.
5687 2003-01-31 Havoc Pennington <hp@pobox.com>
5689 * doc/dbus-specification.sgml: fully specify the header. Add
5690 flags and major protocol version, and change header/body len to
5693 * dbus/dbus-message-builder.c (append_saved_length): append length
5696 * dbus/dbus-message.c (dbus_message_create_header): change header
5697 length and body length to unsigned. Add the new fields from the
5699 (_dbus_message_loader_return_buffer): unsigned header/body len
5701 2003-01-30 Havoc Pennington <hp@pobox.com>
5703 * dbus/dbus-auth.c: rework to use only REJECTED, no
5706 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5707 use REJECTED, suggested by Mark McLoughlin
5709 2003-01-30 Havoc Pennington <hp@pobox.com>
5711 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5712 a better way to report errors here. e.g. "unix address lacks
5713 path" or something. also "no such file" when the path doesn't
5716 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5718 (dbus_parse_address): add @todo about documenting address format,
5719 and allowing , and ; to be escaped
5721 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5724 Add dbus-address.[ch]
5726 * dbus/dbus-address.c: (dbus_address_entry_free),
5727 (dbus_address_entries_free), (create_entry),
5728 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5729 (dbus_parse_address), (_dbus_address_test):
5730 * dbus/dbus-address.h:
5731 New files for dealing with address parsing.
5733 * dbus/dbus-connection.c:
5734 Document timeout functions.
5736 * dbus/dbus-message.c:
5737 Document dbus_message_new_from_message.
5739 * dbus/dbus-server-debug.c:
5742 * dbus/dbus-server.c: (dbus_server_listen):
5743 Parse address and use correct server implementation.
5745 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5746 * dbus/dbus-string.h:
5747 New function with test.
5749 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5753 * dbus/dbus-transport-debug.c:
5756 * dbus/dbus-transport.c: (_dbus_transport_open):
5757 Parse address and use correct transport implementation.
5759 2003-01-30 Havoc Pennington <hp@pobox.com>
5761 * dbus/dbus-message.c: use message->byte_order instead of
5762 DBUS_COMPILER_BYTE_ORDER throughout.
5763 (dbus_message_create_header): pad header to align the
5764 start of the body of the message to 8-byte boundary
5766 * dbus/dbus-marshal.h: make all the demarshalers take const
5767 DBusString arguments.
5769 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5770 validate message args here, so we don't have to do slow validation
5771 later, and so we catch bad messages as they are incoming. Also add
5772 better checks on header_len and body_len. Also fill in
5775 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5776 implemented properly)
5777 (_dbus_string_validate_nul): new function to check all-nul
5779 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5780 get_arg_end_pos and remove all validation
5781 (_dbus_marshal_validate_arg): actually do validation here.
5783 2003-01-29 Havoc Pennington <hp@pobox.com>
5785 * dbus/dbus-message.c (check_message_handling): fix assertion
5786 failure on set_client_serial
5788 2003-01-28 Havoc Pennington <hp@pobox.com>
5790 * dbus/dbus-server-debug.c: Add doc section comments
5792 * dbus/dbus-transport-debug.c: add doc section comments
5794 2003-01-28 Havoc Pennington <hp@redhat.com>
5796 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5797 the reverse order from how I had it
5798 (_dbus_string_base64_encode): reverse encoding order. I was
5799 basically byteswapping everything during encoding.
5801 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5803 * dbus/dbus-connection-internal.h:
5804 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5805 (_dbus_connection_remove_timeout):
5806 Add functions for adding and removing timeouts.
5808 * dbus/dbus-message.c: (dbus_message_new_from_message):
5809 Add new function that takes a message and creates an exact
5810 copy of it, but with the refcount set to 1.
5811 (check_message_handling):
5814 * dbus/dbus-server-protected.h:
5815 * dbus/dbus-server.c: (_dbus_server_init_base),
5816 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5817 (dbus_server_set_timeout_functions):
5818 (_dbus_server_remove_timeout):
5819 New functions so that a server can add and remove timeouts.
5821 (dbus_server_listen):
5822 Add commented out call to dbus_server_debug_new.
5824 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5825 Actually set the handler, doh.
5827 * dbus/dbus-transport.c: (_dbus_transport_open):
5828 Add commented out call to dbus_transport_debug_client_new.
5831 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5833 2003-01-28 Havoc Pennington <hp@pobox.com>
5835 * dbus/dbus-message.c (check_message_handling): function to check
5836 on the loaded message, iterates over it etc.
5838 2003-01-28 Havoc Pennington <hp@pobox.com>
5840 * test/Makefile.am (dist-hook): fix make distdir
5842 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5844 2003-01-27 Havoc Pennington <hp@pobox.com>
5846 * dbus/dbus-mempool.c (time_for_size): replace printf with
5849 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5850 empty lines; fix the SAVE_LENGTH stuff to be
5851 START_LENGTH/END_LENGTH so it actually works; couple other
5854 * test/Makefile.am (dist-hook): add dist-hook for .message files
5856 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5857 can be constant or locked.
5858 (_dbus_string_free): allow freeing a const string as
5861 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5863 * dbus/dbus-test-main.c (main): take an argument which is the
5864 directory containing test data
5866 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5867 argument to this and load all the messages in test/data/
5868 checking that they can be loaded or not loaded as appropriate.
5870 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5872 * bus/dispatch.c: (bus_dispatch_message_handler):
5873 Dispatch messages sent to services.
5875 * bus/driver.c: (bus_driver_send_service_deleted),
5876 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5877 (bus_driver_send_service_acquired):
5878 Add helper functions for sending service related messages.
5880 (bus_driver_send_welcome_message):
5881 Send HELLO_REPLY instead of WELCOME.
5883 (bus_driver_handle_list_services):
5884 Send LIST_SERVICES_REPLY instead of SERVICES.
5886 (bus_driver_handle_own_service),
5887 (bus_driver_handle_service_exists):
5888 New message handlers.
5890 (bus_driver_handle_message):
5891 Invoke new message handlers.
5893 (bus_driver_remove_connection):
5894 Don't remove any services here since that's done automatically
5895 by bus_service_remove_owner now.
5898 New function signatures.
5900 * bus/services.c: (bus_service_add_owner):
5901 Send ServiceAcquired message if we're the only primary owner.
5903 (bus_service_remove_owner):
5904 Send ServiceAcquired/ServiceLost messages.
5906 (bus_service_set_prohibit_replacement),
5907 (bus_service_get_prohibit_replacement):
5908 Functions for setting prohibit replacement.
5910 (bus_service_has_owner):
5911 New function that checks if a connection is in the owner queue of
5915 Add new function signatures.
5917 * dbus/dbus-list.c: (_dbus_list_test):
5918 Add tests for _dbus_list_remove_last and traversing the list backwards.
5921 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5922 go any further, so return NULL then.
5924 * dbus/dbus-protocol.h:
5925 Add new messages, service flags and service replies.
5927 2003-01-26 Havoc Pennington <hp@pobox.com>
5929 * dbus/dbus-message-builder.c: implement, completely untested.
5931 * test/data/*: add data to be used in testing.
5932 ".message" files are our simple loadable text format.
5933 ".message-raw" will be binary dumps of messages.
5935 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5937 2003-01-26 Havoc Pennington <hp@pobox.com>
5939 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5941 * dbus/dbus-errors.c (dbus_result_to_string): add
5944 * dbus/dbus-message-builder.c: new file, will contain code to load
5945 up messages from files. Not implemented yet.
5947 2003-01-26 Havoc Pennington <hp@pobox.com>
5949 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5950 the sender by setting to NULL
5952 2003-01-26 Havoc Pennington <hp@pobox.com>
5954 The unit tests pass, but otherwise untested. If it breaks, the
5955 tests should have been better. ;-)
5957 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5960 * dbus/dbus-message.c: redo everything so we maintain
5961 message->header as the only copy of the various fields.
5962 This avoids the possibility of out-of-memory in some cases,
5963 for example dbus_message_lock() can't run out of memory anymore,
5964 and avoids extra copying. Figured I may as well go ahead and do
5965 this since it was busted for dbus_message_lock to not return
5966 failure on OOM, and dbus_message_write_header was totally
5967 unchecked for OOM. Also fixed some random other bugs.
5969 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5970 that strings are nul-terminated. Also, end_pos can be equal
5971 to string length just not greater than, I think.
5972 (_dbus_marshal_set_int32): new function
5973 (_dbus_marshal_set_uint32): new function
5974 (_dbus_marshal_set_string): new function
5976 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5977 a warning, init timeout_list to NULL
5978 (dbus_connection_send_message): don't use uninitialized variable
5981 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5983 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5985 * bus/driver.c: (bus_driver_handle_hello),
5986 (bus_driver_send_welcome_message):
5989 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5991 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5992 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5993 (dbus_connection_unref):
5994 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5995 * dbus/dbus-message.c: (dbus_message_unref),
5998 (dbus_message_get_fields):
5999 Remove debugging printout.
6001 (_dbus_message_loader_return_buffer):
6002 Don't store the header string.
6004 (_dbus_message_test):
6007 2003-01-26 Richard Hult <rhult@codefactory.se>
6009 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6010 the file descriptor list, since it can change under us.
6012 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6014 * glib/dbus-gmain.c: (dbus_connection_prepare),
6015 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6016 (remove_watch), (dbus_connection_hookup_with_g_main):
6017 Rewrite the glib handling to use its own GSource instead of a
6018 GIOChannel so we can catch messages put in the queue while waiting
6021 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6024 * bus/connection.c: (connection_disconnect_handler),
6025 (connection_watch_callback), (bus_connection_setup):
6026 * bus/dispatch.c: (send_one_message),
6027 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6028 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6030 * bus/driver.c: (bus_driver_send_service_deleted),
6031 (bus_driver_send_service_created), (bus_driver_handle_hello),
6032 (bus_driver_send_welcome_message),
6033 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6034 (bus_driver_handle_message):
6036 Refactor code, put the message dispatching in its own file. Use
6037 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6040 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6042 * dbus/dbus-internals.h:
6043 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6045 * dbus/dbus-message.c: (dbus_message_get_sender):
6046 * dbus/dbus-message.h:
6047 Implement dbus_message_get_sender.
6049 * dbus/dbus-protocol.h:
6050 Add message and service defines.
6052 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6054 * dbus/dbus-connection.c: (dbus_connection_send_message):
6055 * dbus/dbus-message-internal.h:
6056 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6057 (dbus_message_write_header):
6058 Remove _dbus_messag_unlock and don't set the client serial on a
6059 message if one already exists.
6061 2003-01-24 Havoc Pennington <hp@pobox.com>
6063 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6066 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6069 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6071 * dbus/dbus-list.c: (alloc_link), (free_link):
6072 Use a memory pool for the links.
6074 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6076 * bus/connection.c: (bus_connection_foreach):
6078 Add new bus_connection_foreach function.
6080 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6081 Add function that broadcasts a message to all clients.
6083 (bus_driver_send_service_created), (bus_driver_handle_hello),
6084 (bus_driver_send_welcome_message),
6085 (bus_driver_handle_list_services), (bus_driver_message_handler):
6086 Implement functions that take care of listing services, and notifying
6087 clients when new services are created.
6089 * bus/services.c: (bus_services_list):
6091 Add new function that returns an array of strings with the currently
6092 registered services.
6095 * glib/dbus-gmain.c:
6096 Update copyright year.
6098 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6100 * dbus/dbus-connection.c: (dbus_connection_send_message):
6101 Unlock the message in case it was sent earlier.
6103 (dbus_connection_send_message_with_reply_and_block):
6104 Remove the reply message from the list.
6106 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6107 Set array_len and new_pos correctly.
6109 (_dbus_marshal_test):
6110 Remove debug output.
6112 * dbus/dbus-message-internal.h:
6113 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6114 New function that returns the reply serial.
6116 (_dbus_message_unlock):
6117 New function that unlocks a message and resets its header.
6119 (dbus_message_append_string_array),
6120 (dbus_message_get_fields_valist),
6121 (dbus_message_iter_get_field_type),
6122 (dbus_message_iter_get_string_array),
6123 (dbus_message_get_fields),
6124 (dbus_message_append_fields_valist):
6125 Handle string arrays.
6127 (dbus_message_set_sender):
6128 Make this function public since the bus daemon needs it.
6130 (decode_header_data):
6131 Set the reply serial to -1 initially.
6133 * dbus/dbus-message.h:
6134 Add dbus_message_set_sender.
6136 2003-01-24 Havoc Pennington <hp@pobox.com>
6138 * doc/dbus-specification.sgml: add some stuff
6140 2003-01-22 Havoc Pennington <hp@pobox.com>
6142 * doc/dbus-specification.sgml: Start to document the protocol.
6144 2003-01-22 Havoc Pennington <hp@pobox.com>
6146 * dbus/dbus-connection.c
6147 (dbus_connection_send_message_with_reply_and_block): add some @todo
6149 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6151 2003-01-21 Havoc Pennington <hp@pobox.com>
6153 (patch untested because can't compile)
6155 * bus/driver.c (create_unique_client_name): make this function
6156 never recycle client names. Also, caller should initialize
6159 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6161 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6163 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6164 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6165 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6166 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6167 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6168 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6169 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6170 * dbus/dbus-marshal.h:
6171 * dbus/dbus-protocol.h:
6172 Add support for marshalling and demarshalling integer, double
6175 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6180 * bus/connection.c: (connection_disconnect_handler):
6181 Remove the connection from the bus driver's list.
6183 (connection_watch_callback): Dispatch messages.
6185 (free_connection_data): Free connection name.
6187 (bus_connection_setup): Add connection to the bus driver's list.
6188 (bus_connection_remove_owned_service):
6189 (bus_connection_set_name), (bus_connection_get_name):
6190 Add functions for setting and getting the connection's name.
6193 Add function headers.
6195 * bus/driver.c: (create_unique_client_name),
6196 (bus_driver_handle_hello_message),
6197 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6198 (bus_driver_add_connection), (bus_driver_remove_connection):
6201 * bus/services.c: (bus_service_free):
6203 New file that handles communication and registreation with the bus
6206 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6208 * dbus/dbus-connection.c: (dbus_connection_send_message):
6209 Add a new client_serial parameter.
6211 (dbus_connection_send_message_with_reply):
6212 Remove a @todo since we've implemented the blocking function.
6214 (dbus_connection_send_message_with_reply_and_block):
6215 New function that sends a message and waits for a reply and
6216 then returns the reply.
6218 * dbus/dbus-connection.h:
6221 * dbus/dbus-errors.c: (dbus_result_to_string):
6222 * dbus/dbus-errors.h:
6223 Add new DBUS_RESULT.
6225 * dbus/dbus-message-internal.h:
6226 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6227 (_dbus_message_set_sender), (dbus_message_write_header),
6228 (dbus_message_new_reply), (decode_header_data),
6229 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6230 * dbus/dbus-message.h:
6231 Add new functions that set the reply serial and sender.
6232 Also marshal and demarshal them correctly and add test.
6234 * dbus/dbus-protocol.h:
6235 Add new DBUS_MESSAGE_TYPE_SENDER.
6238 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6239 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6240 (dbus_connection_hookup_with_g_main):
6241 * glib/test-dbus-glib.c: (main):
6242 Rewrite to use GIOChannel and remove the GSource crack.
6244 * test/echo-client.c: (main):
6245 * test/watch.c: (check_messages):
6246 Update for changed APIs
6248 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6250 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6252 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6253 Create a DBusTimeoutList.
6254 (dbus_connection_set_timeout_functions): Add new function to
6255 set timeout callbacks
6257 * dbus/dbus-connection.h: Add public DBusTimeout API.
6259 * dbus/dbus-message.c: (dbus_message_get_service):
6260 * dbus/dbus-message.h: New function.
6262 * dbus/dbus-server.c: Fix small doc typo.
6264 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6266 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6268 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6269 of the string, just as long as specified.
6271 2003-01-19 Havoc Pennington <hp@pobox.com>
6273 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6276 * dbus/dbus-server.c (dbus_server_set_max_connections)
6277 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6278 keep track of current number of connections, and add API for
6279 setting a max (but haven't implemented enforcing the max yet)
6281 2003-01-18 Havoc Pennington <hp@pobox.com>
6283 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6284 reading/writing if read_watch != NULL or write_watch != NULL.
6286 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6287 the message loader code to actually load message->header and
6288 message->body into the newly-created message.
6290 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6293 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6294 (dbus_connection_get_max_message_size)
6295 (dbus_connection_set_max_live_messages_size)
6296 (dbus_connection_get_max_live_messages_size): implement some
6297 resource limitation functions
6299 * dbus/dbus-resources.c: new file implementing some of the
6300 resource limits stuff
6302 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6303 missing docs, add @todo to handle OOM etc.
6305 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6308 2003-01-18 Havoc Pennington <hp@pobox.com>
6310 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6311 connection if it hasn't been already.
6313 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6314 replace with DisconnectFunction.
6316 2003-01-18 Havoc Pennington <hp@pobox.com>
6318 Building --disable-verbose-mode --disable-asserts --disable-tests
6319 cuts the library from 112K to 45K or so
6321 * configure.in: check for varargs macro support,
6322 add --enable-verbose-mode, --enable-asserts.
6324 * dbus/dbus-internals.h (_dbus_assert): support
6326 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6328 2003-01-18 Havoc Pennington <hp@pobox.com>
6330 * dbus/dbus-test.c: include config.h so that tests actually run
6332 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6333 so the failure mode when that assumption fails will be plenty
6336 2003-01-18 Havoc Pennington <hp@pobox.com>
6338 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6340 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6343 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6344 since we don't want to use those in make check
6346 2003-01-15 Havoc Pennington <hp@redhat.com>
6352 2003-01-15 Havoc Pennington <hp@redhat.com>
6354 * test/Makefile.am: fix so that test source code ends up in the
6355 distribution on make distcheck
6357 2003-01-15 Havoc Pennington <hp@redhat.com>
6363 2003-01-15 Havoc Pennington <hp@redhat.com>
6365 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6366 fix build when --disable-tests
6368 * Makefile.am (EXTRA_DIST): put HACKING in here
6370 * HACKING: document procedure for making a tarball release.
6372 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6374 * bus/connection.c: (connection_error_handler),
6375 (bus_connection_setup):
6376 * bus/main.c: (main):
6377 Make sure that the DBusConnectionData struct is NULLed
6378 out to prevent a segfault.
6380 * dbus/dbus-errors.c: (dbus_result_to_string):
6381 * dbus/dbus-errors.h:
6382 * dbus/dbus-message.c: (dbus_message_get_fields),
6383 (dbus_message_get_fields_valist), (_dbus_message_test):
6384 * dbus/dbus-message.h:
6385 Make dbus_message_get_fields return a result code so we can
6386 track invalid fields as well as oom.
6388 2003-01-11 Havoc Pennington <hp@pobox.com>
6390 * configure.in: change --enable-test/--enable-ansi action-if-given
6391 to enable_foo=$enableval instead of enable_foo=yes
6393 2003-01-08 Havoc Pennington <hp@pobox.com>
6395 * dbus/dbus-string.c (_dbus_string_align_length): new function
6397 * dbus/dbus-test-main.c: move main() for test app here
6399 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6400 symbol to run tests, because dbus-test isn't in the main
6403 Code review nitpicks.
6405 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6406 for people with narrow emacs ;-). Assert client_serial was filled
6407 in. Assert message->name != NULL.
6408 (dbus_message_append_fields): have "first_field_type" arg separate
6409 from va list, needed for C++ binding that also uses varargs IIRC
6410 and helps with type safety
6411 (dbus_message_new): add @todo about using DBusString to store
6412 service/name internally
6413 (dbus_message_new): don't leak ->service and ->name on OOM later
6415 (dbus_message_unref): free the service name
6416 (dbus_message_get_fields): same change to varargs
6417 i.e. first_field_type
6418 (_dbus_message_loader_return_buffer): assert that the message data
6419 is aligned (if not it's a bug in our code). Put in verbose griping
6420 about why we set corrupted = TRUE.
6421 (decode_header_data): add FIXME that char* is evil. Was going to
6422 add FIXME about evil locale-specific string.h strncmp, but just
6423 switched to wacky string-as-uint32 optimization. Move check for
6424 "no room for field name" above get_const_data_len() to avoid
6425 assertion failure in get_const_data_len if we have trailing 2
6426 bytes or the like. Check for service and name fields being
6427 provided twice. Don't leak service/name on error. Require field
6428 names to be aligned to 4 bytes.
6430 * dbus/dbus-marshal.c: move byte swap stuff to header
6431 (_dbus_pack_int32): uscore-prefix
6432 (_dbus_unpack_int32): uscore-prefix
6433 (_dbus_unpack_uint32): export
6434 (_dbus_demarshal_string): add @todo complaining about use of
6436 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6437 handling allowing corrupt data to go unchecked
6439 2003-01-08 Havoc Pennington <hp@redhat.com>
6441 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6442 to the select() as needed for authentication. (should be using
6443 _dbus_poll() not select, but for another day)
6445 * dbus/dbus.h: include dbus/dbus-protocol.h
6447 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6449 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6452 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6454 * dbus/dbus-internals.c: (_dbus_type_to_string):
6455 New function that returns a string describing a type.
6457 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6458 * dbus/dbus-marshal.h:
6459 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6460 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6461 (dbus_message_iter_get_byte_array):
6462 * dbus/dbus-message.h:
6463 Add new convenience functions for appending and getting message fields.
6464 Also add demarshalling routines for byte arrays.
6466 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6468 * dbus/dbus-connection-internal.h:
6469 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6470 (_dbus_connection_get_next_client_serial),
6471 (dbus_connection_send_message):
6472 * dbus/dbus-internals.h:
6473 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6474 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6475 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6476 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6477 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6478 (_dbus_verbose_bytes), (_dbus_marshal_test):
6479 * dbus/dbus-marshal.h:
6480 * dbus/dbus-message-internal.h:
6481 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6482 (dbus_message_write_header), (_dbus_message_lock),
6483 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6484 (dbus_message_get_name), (dbus_message_append_int32),
6485 (dbus_message_append_uint32), (dbus_message_append_double),
6486 (dbus_message_append_string), (dbus_message_append_byte_array),
6487 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6488 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6489 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6490 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6491 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6492 (decode_header_data), (_dbus_message_loader_return_buffer),
6493 (message_iter_test), (_dbus_message_test):
6494 * dbus/dbus-message.h:
6495 * dbus/dbus-protocol.h:
6496 * dbus/dbus-test.c: (main):
6498 * glib/test-dbus-glib.c: (message_handler), (main):
6499 * test/echo-client.c: (main):
6500 * test/watch.c: (check_messages):
6501 Make messages sendable and receivable for real.
6503 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6505 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6506 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6507 * dbus/dbus-message.c: (dbus_message_append_int32),
6508 (dbus_message_append_uint32), (dbus_message_append_double),
6509 (dbus_message_append_string), (dbus_message_append_byte_array):
6510 Handle OOM restoration.
6512 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6514 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6515 (_dbus_demarshal_string), (_dbus_marshal_test):
6516 * dbus/dbus-marshal.h:
6517 * dbus/dbus-message.c: (dbus_message_get_name),
6518 Document these functions.
6520 (dbus_message_append_int32), (dbus_message_append_uint32),
6521 (dbus_message_append_double), (dbus_message_append_string),
6522 (dbus_message_append_byte_array):
6523 * dbus/dbus-message.h:
6524 Add functions for adding message fields of different types.
6526 * dbus/dbus-protocol.h:
6527 Add the different types.
6529 2003-01-05 Havoc Pennington <hp@pobox.com>
6531 * bus/connection.c: implement routines for handling connections,
6532 first thing is keeping a list of owned services on each connection
6533 and setting up watches etc.
6535 * bus/services.c: implement a mapping from service names to lists
6538 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6540 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6541 to use static mutexes for global data
6543 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6544 collection of functions to set/get application-specific data
6545 on the DBusConnection.
6547 2003-01-04 Havoc Pennington <hp@pobox.com>
6549 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6550 (_dbus_poll): new function
6552 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6555 * bus/loop.c: initial code for the daemon main loop
6557 2003-01-04 Havoc Pennington <hp@pobox.com>
6559 * test/watch.c (error_handler): make it safe if the error handler
6560 is called multiple times (if we s/error handler/disconnect
6561 handler/ we should just guarantee it's called only once)
6563 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6564 error handler on disconnect (it's quite possible we should
6565 just change the error handler to a "disconnect handler," I'm
6566 not sure we have any other meaningful errors)
6568 * configure.in: check for getpwnam_r
6570 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6571 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6572 mechanism as in SASL spec, using socket credentials
6574 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6575 (_dbus_send_credentials_unix_socket): new function
6577 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6579 (_dbus_write): only check errno if <0 returned
6580 (_dbus_write_two): ditto
6582 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6584 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6585 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6586 (_dbus_marshal_test):
6587 * dbus/dbus-marshal.h:
6588 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6589 to _dbus_marshal_utf8_string. Also fix some tests.
6591 2002-12-28 Harri Porten <porten@kde.org>
6593 * configure.in: added check for C++ compiler and a very cheesy
6594 check for the Qt integration
6596 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6598 * qt/Makefile.am: added
6600 * qt/.cvsignore: added
6602 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6603 latter, added #ifdef QT_THREAD_SUPPORT guard.
6605 * dbus/Makefile.am: added missing headers for make dist
6607 2002-12-28 Kristian Rietveld <kris@gtk.org>
6609 * dbus/Makefile.am: fixup export-symbols-regex.
6611 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6613 * acinclude.m4: Add this file and put the
6614 PKG_CHECK_MODULE macro in it.
6616 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6618 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6619 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6620 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6621 (_dbus_marshal_test):
6622 Make the demarshalling routines align the pos argument.
6623 Add string marshalling tests and fix the obvious bugs
6626 2002-12-26 Havoc Pennington <hp@pobox.com>
6628 * dbus/dbus-auth.c: fixes fixes fixes
6630 * dbus/dbus-transport-unix.c: wire up support for
6631 encoding/decoding data on the wire
6633 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6634 (_dbus_auth_decode_data): append to target string
6635 instead of nuking it.
6637 2002-12-26 Havoc Pennington <hp@pobox.com>
6639 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6640 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6643 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6644 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6645 now). Main point is because I wanted unpack_uint32 to implement
6647 (_dbus_verbose_bytes): new function
6649 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6651 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6652 mechanism to handle a corrupt message stream
6653 (_dbus_message_loader_new): fix preallocation to only prealloc,
6656 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6657 (_dbus_string_test): enhance tests for copy/move and fix the
6660 * dbus/dbus-transport-unix.c: Hold references in more places to
6661 avoid reentrancy problems
6663 * dbus/dbus-transport.c: ditto
6665 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6666 leak reference count in no-message case
6668 * test/watch.c (do_mainloop): handle adding/removing watches
6669 during iteration over the watches. Also, ref the connection/server
6670 stored on a watch, so we don't try to mangle a destroyed one.
6672 * dbus/dbus-transport-unix.c (do_authentication): perform
6675 * dbus/dbus-auth.c (get_state): add a state
6676 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6677 (_dbus_auth_get_unused_bytes): append the unused bytes
6678 to the passed in string, rather than prepend
6680 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6681 the auth conversation DBusAuth
6683 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6684 (_dbus_transport_new_for_domain_socket): when creating a
6685 transport, pass in whether it's a client-side or server-side
6686 transport so we know which DBusAuth to create
6688 2002-12-03 Havoc Pennington <hp@pobox.com>
6690 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6691 _after_ finalizing the derived members
6692 (unix_connection_set): unref watch if we fail to add it
6694 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6695 transport first, so that the connection owned by the
6696 transport will be valid as the transport finalizes.
6698 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6699 if necessary, and remove watches from the connection.
6701 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6703 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6705 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6706 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6707 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6708 (_dbus_marshal_test):
6709 * dbus/dbus-marshal.h:
6710 Add string marshal functions and have the demarshal functions
6711 return the new position.
6713 2002-12-25 Havoc Pennington <hp@pobox.com>
6715 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6716 it is a simple protocol that just maps directly to SASL.
6718 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6719 initial implementation, not actually used yet.
6721 * dbus/dbus-string.c (_dbus_string_find): new function
6722 (_dbus_string_equal): new function
6723 (_dbus_string_base64_encode): new function
6724 (_dbus_string_base64_decode): new function
6726 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6729 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6730 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6731 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6732 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6733 * dbus/dbus-marshal.h:
6734 * dbus/dbus-protocol.h:
6735 * dbus/dbus-test.c: (main):
6737 Add un-optimized marshalling/demarshalling routines.
6739 2002-12-25 Harri Porten <porten@kde.org>
6741 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6743 2002-12-24 Zack Rusin <zack@kde.org>
6745 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6746 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6749 2002-12-24 Havoc Pennington <hp@pobox.com>
6751 * glib/dbus-gthread.c: fix include
6753 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6754 I think glib API needs to change, though, as you don't
6755 want to use DBusMessageFunction, you want to use the
6756 DBusMessageHandler object. Probably
6757 dbus_connection_open_with_g_main_loop()
6758 and dbus_connection_setup_g_main_loop() or something like that
6759 (but think of better names...) that just create a connection
6760 that has watch/timeout functions etc. already set up.
6762 * dbus/dbus-connection.c
6763 (dbus_connection_send_message_with_reply): new function just to
6764 show how the message handler helps us deal with replies.
6766 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6768 * dbus/dbus-string.c (_dbus_string_test): free a string that
6771 * dbus/dbus-hash.c: use memory pools for the hash entries
6772 (rebuild_table): be more paranoid about overflow, and
6773 shrink table when we can
6774 (_dbus_hash_test): reduce number of sprintfs and write
6775 valid C89. Add tests for case where we grow and then
6776 shrink the hash table.
6778 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6780 * dbus/dbus-connection.c (dbus_connection_register_handler)
6781 (dbus_connection_unregister_handler): new functions
6783 * dbus/dbus-message.c (dbus_message_get_name): new
6785 * dbus/dbus-list.c: fix docs typo
6787 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6788 an object representing a handler for messages.
6790 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6793 * glib/dbus-gthread.c: (dbus_gthread_init):
6794 Don't use the gdbus prefix for public functions.
6796 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6800 Add GLib checks and fixup .pc files
6804 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6805 (gdbus_connection_check), (gdbus_connection_dispatch),
6806 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6807 (dbus_connection_gsource_new):
6808 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6809 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6810 * glib/test-dbus-glib.c: (message_handler), (main):
6813 2002-12-15 Harri Porten <porten@kde.org>
6815 * autogen.sh: check for libtoolize before attempting to use it
6817 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6820 * .cvsignore: ignore more stamp files
6822 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6824 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6825 without make install.
6827 2002-12-15 Havoc Pennington <hp@pobox.com>
6829 * dbus/dbus-threads.c: add thread stubs that a higher library
6830 layer can fill in. e.g. the GLib wrapper might fill them in with
6831 GThread stuff. We still need to use this thread API to
6832 thread-safe-ize the library.
6834 2002-12-12 Havoc Pennington <hp@pobox.com>
6836 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6837 below new interfaces and include fewer system headers.
6839 * dbus/dbus-sysdeps.c (_dbus_read): new function
6840 (_dbus_write): new function
6841 (_dbus_write_two): new function
6842 (_dbus_connect_unix_socket): new function
6843 (_dbus_listen_unix_socket): new function
6845 * dbus/dbus-message-internal.h: change interfaces to use
6848 2002-12-11 Havoc Pennington <hp@pobox.com>
6850 * dbus/dbus-types.h: add dbus_unichar
6852 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6854 * dbus/dbus-connection.c (dbus_connection_send_message): return
6857 * dbus/dbus-transport.c: include dbus-watch.h
6859 * dbus/dbus-connection.c: include dbus-message-internal.h
6861 * HACKING: add file with coding guidelines stuff.
6863 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6864 handling here, for security purposes (as in vsftpd). Not actually
6865 using this class yet.
6867 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6868 system/libc usage here, as in vsftpd, for ease of auditing (and
6869 should also simplify portability). Haven't actually moved all the
6870 system/libc usage into here yet.
6872 2002-11-25 Havoc Pennington <hp@pobox.com>
6874 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6875 always print the first verbose message.
6877 2002-11-24 Havoc Pennington <hp@pobox.com>
6879 * test/echo-client.c, test/echo-server.c: cheesy test
6882 * configure.in (AC_CHECK_FUNCS): check for writev
6884 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6887 * dbus/dbus-list.c (_dbus_list_foreach): new function
6889 * dbus/dbus-internals.c (_dbus_verbose): new function
6891 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6892 representing a server that listens for connections.
6894 * dbus/.cvsignore: create
6896 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6897 public API for reporting errors
6899 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6900 public object representing a connection that
6901 sends/receives messages. (Same object used for
6902 both client and server.)
6904 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6905 Basic abstraction for different kinds of stream
6906 that we might read/write messages from.
6908 2002-11-23 Havoc Pennington <hp@pobox.com>
6910 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6913 * dbus/dbus-test.c (main): add list test, and include
6914 dbus-test.h as intended
6916 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6917 (_dbus_hash_table_remove_int): return value indicates
6918 whether the entry existed to remove
6920 * dbus/dbus-list.c: add linked list utility class,
6923 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6926 2002-11-23 Havoc Pennington <hp@pobox.com>
6928 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6929 DBUS_END_DECLS to nothing, that should fix this once and for all
6931 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6933 * dbus/dbus-message.c, dbus/dbus-hash.c:
6934 add some missing @brief
6936 2002-11-23 Havoc Pennington <hp@pobox.com>
6938 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6939 to avoid confusing Doxygen
6941 * dbus/dbus-hash.c: @} not }@
6943 * dbus/dbus-message.c (struct DBusMessage): split out
6946 2002-11-23 Havoc Pennington <hp@pobox.com>
6948 * configure.in: pile on more warning flags if using gcc
6950 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6951 to document static functions
6953 * configure.in: add summary to end of configure so it
6954 looks nice and attractive
6956 * dbus/dbus-hash.c: finish implementation and write unit
6959 * configure.in: add --enable-tests to enable unit tests
6961 * dbus/dbus-test.c: test program to run unit tests
6962 for all files in dbus/*, initially runs a test for
6965 * dbus/dbus-internals.h: file to hold some internal utility stuff
6967 2002-11-22 Havoc Pennington <hp@redhat.com>
6969 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6970 "ported" away from Tcl
6972 * dbus/dbus-types.h: header for types such as dbus_bool_t
6974 2002-11-22 Havoc Pennington <hp@redhat.com>
6976 * dbus/dbus.h: fixups for doc warnings
6978 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6980 (QUIET): make it quiet so we can see warnings
6982 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6984 2002-11-22 Havoc Pennington <hp@redhat.com>
6986 * Makefile.am: include "Doxyfile" target in all-local
6988 * configure.in: generate the Doxyfile
6990 * Doxyfile.in: move Doxyfile here, so we can use
6991 configure to generate a Doxyfile with the right
6994 2002-11-22 Havoc Pennington <hp@redhat.com>
6996 * dbus/dbus-message.c: move inline docs into .c file
6998 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6999 so all docs are under doc/
7000 (MAN_EXTENSION): generate man pages. Use extension
7001 ".3dbus" which matches ".3qt" on my system,
7002 I guess this is OK, I don't know really.
7003 (FILE_PATTERNS): look for .c files not .h, makes sense
7006 2002-11-22 Havoc Pennington <hp@pobox.com>
7008 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7009 because any app can be a server, and any app can be a client,
7010 the bus is a special kind of server.
7012 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7014 * Doxyfile : adding. Still needs Makefile rules to be generated
7015 automatically (just run "doxygen" in the toplevel dir for now to
7018 * dbus/dbus-message.h : Adding sample docs (javadoc since
7019 resembles gtk-doc a little more)
7021 * dbus/dbus.h : Adding sample docs
7023 2002-11-21 Havoc Pennington <hp@redhat.com>
7025 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7026 so we can allow ourselves to include files directly,
7027 instead of having to use dbus.h
7029 * dbus/dbus.h: fill in
7031 * dbus/dbus-message.h: sketch out a sample header file.
7032 Include griping if you include it directly instead of
7035 * dbus/dbus-macros.h: new file with macros for extern "C",
7036 TRUE/FALSE, NULL, etc.
7038 * doc/file-boilerplate.c: put include guards in here
7040 2002-11-21 Havoc Pennington <hp@redhat.com>
7042 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7044 * COPYING: include the GPL as well, and license code
7045 under both AFL and GPL.
7047 2002-11-21 Havoc Pennington <hp@redhat.com>
7049 * acconfig.h: get rid of this
7051 * autogen.sh (run_configure): add --no-configure option
7053 * configure.in: remove AC_ARG_PROGRAM to make
7054 autoconf complain less. add AC_PREREQ.
7055 add AC_DEFINE third arg.
7057 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7060 Fix references so we can distcheck.
7062 2002-11-21 Havoc Pennington <hp@redhat.com>
7064 * Initial module creation