1 2004-05-30 Seth Nickell <seth@gnome.org>
3 * python/examples/example-client.py:
4 * python/examples/example-service.py:
6 Take it back. Lists seem to work but they're broken
7 in the test suite. Make the base examples use
10 2004-05-30 Seth Nickell <seth@gnome.org>
12 * python/dbus_bindings.pyx.in:
13 * python/tests/test-client.py:
15 Add some more tests and fix errors that crop up.
16 Unfortunately, currently it seems like marshalling
17 and unmarshalling of lists is completely broken :-(
19 2004-05-30 Seth Nickell <seth@gnome.org>
21 * python/dbus_bindings.pyx.in:
23 Add support for ObjectPath type.
27 Refactor message handling code to a common function.
29 * python/tests/test-client.py:
30 * python/tests/test-server.py:
32 Add tests that check to make sure values of all types
33 can be echoed from a service w/o mangling.
35 2004-05-29 Seth Nickell <seth@gnome.org>
39 Add ObjectTree class which allows implementation
40 of trees of "virtual" objects. Basically the python
41 wrapper for "register_fallback".
43 * python/examples/Makefile.am
44 * python/examples/gconf-proxy-client.py:
45 * python/examples/gconf-proxy-service.py:
47 Implement a simple GConf proxy service that supports
48 get/set on string and int GConf keys using the ObjectTree.
50 2004-05-29 Seth Nickell <seth@gnome.org>
53 * python/examples/example-client.py:
54 * python/examples/example-service.py:
55 * python/examples/list-system-services.py:
57 Add SessionBus, SystemBus and ActivationBus classes
58 so you don't need to know the special little BUS_TYPE
61 2004-05-29 Havoc Pennington <hp@redhat.com>
63 * bus/config-parser.c (process_test_valid_subdir): temporarily
64 stop testing config parser OOM handling, since expat has issues
65 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
67 * bus/dbus-daemon-1.1.in: change requested_reply to
68 send_requested_reply/receive_requested_reply so we can send the
69 replies, not just receive them.
71 * bus/config-parser.c: parse the new
72 send_requested_reply/receive_requested_reply
74 * bus/policy.c (bus_client_policy_check_can_send): add
75 requested_reply argument and use it
77 * bus/bus.c (bus_context_check_security_policy): pass through
78 requested_reply status to message send check
80 * bus/system.conf.in: adapt to requested_reply change
82 2004-05-28 Havoc Pennington <hp@redhat.com>
84 * test/glib/test-service-glib.c (main): remove unused variable
86 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
88 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
89 from the enum, no longer in use.
91 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
94 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
95 whether error_name passed in is a valid error name.
97 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
99 * dbus/dbus-message.c (dbus_message_get_args): Added support for
100 OBJECT_PATH and OBJECT_PATH_ARRAY
102 2004-05-28 Seth Nickell <seth@gnome.org>
104 * python/examples/Makefile.am:
106 Forget to add Makefile.am. Do not pass go.
108 2004-05-28 Michael Meeks <michael@ximian.com>
110 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
113 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
115 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
116 (_dbus_message_iter_get_basic_type_array): impl.
117 drastically simplify ~all relevant _get methods to use these.
118 (_dbus_message_iter_append_basic_array),
119 (dbus_message_iter_append_basic): impl
120 drastically simplify ~all relevant _append methods to use these.
122 * dbus/dbus-message-builder.c (parse_basic_type)
123 (parse_basic_array, lookup_basic_type): impl.
124 (_dbus_message_data_load): prune scads of duplicate /
127 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
128 (_dbus_demarshal_basic_type): implement,
129 (demarshal_and_validate_len/arg): beef up debug.
130 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
132 2004-05-27 Seth Nickell <seth@gnome.org>
135 * python/Makefile.am:
137 Include the example python apps in the tarball.
139 * python/examples/list-system-services.py
141 Add a python new example that fetches the list of services
144 2004-05-27 Seth Nickell <seth@gnome.org>
147 * python/dbus_bindings.pyx.in:
149 Fix failure to notify that a signal was not handled,
150 resulted in hung functions.
152 2004-05-25 Colin Walters <walters@redhat.com>
154 * tools/dbus-monitor.c (main): Monitor all types of messages.
156 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
158 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
159 which unregisters the object path and disposes the handler.
161 2004-05-23 Kristian Høgsberg <krh@redhat.com>
163 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
165 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
166 operands to && so we call dbus_message_iter_next () for the last
169 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
171 * dbus/dbus-object-tree.c
172 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
173 children even if the requested path isn't registered.
174 (object_tree_test_iteration): test object_tree_list_registered.
176 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
179 2004-05-20 Kristian Høgsberg <krh@redhat.com>
181 * doc/TODO: Remove resolved items.
183 * bus/expirelist.h (struct BusExpireList): remove unused n_items
186 * bus/connection.c (bus_connections_expect_reply): Enforce the
187 per-connection limit on pending replies.
189 Patch from Jon Trowbridge <trow@ximian.com>:
191 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
192 up a watch that triggers a config reload when one end of the pipe
194 (signal_handler): Instead of doing the config reload in our SIGHUP
195 handler, just write to the reload pipe and let the associated
196 watch handle the reload when control returns to the main loop.
198 * bus/driver.c (bus_driver_handle_reload_config): Added.
199 Implements a ReloadConfig method for requesting a configuration
200 file reload via the bus driver.
202 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
204 * HACKING: Updated release instructions concerning the wiki page.
206 2004-05-18 Kristian Høgsberg <krh@redhat.com>
208 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
209 filter against auth->allowed_mechs; we only add allowed mechs in
212 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
213 ALLOWED_MECHS to auth-script format so we can set the list of
216 * data/auth/client-out-of-mechanisms.auth-script: New test to
217 check client disconnects when it is out of mechanisms to try.
219 * dbus/dbus-auth.c (process_command): Remove check for lines
220 longer that 1 MB; we only buffer up maximum 16 kB.
222 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
223 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
224 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
225 assume there might be unused bytes.
227 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
228 client-out-of-mechs, it is handled in process_reject(). Move check
229 for max failures to send_rejected(), as it's a server-only thing.
231 * dbus/dbus-auth.c: Factor out protocol reply code into functions
232 send_auth(), send_data(), send_rejected(), send_error(),
233 send_ok(), send_begin() and send_cancel().
235 2004-05-17 Kristian Høgsberg <krh@redhat.com>
237 Remove base64 encoding, replace with hex encoding. Original patch
238 from trow@ximian.com, added error handling.
240 * dbus/dbus-string.c (_dbus_string_base64_encode)
241 (_dbus_string_base64_decode): Remove.
242 (_dbus_string_hex_decode): Add end_return argument so we can
243 distinguish between OOM and invalid hex encoding.
244 (_dbus_string_test): Remove base64 tests and add test case for
247 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
248 Replace base64 with hex.
250 * test/data/auth/invalid-hex-encoding.auth-script: New test case
251 for invalid hex encoded data in auth protocol.
253 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
255 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
258 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
260 * mono/dbus-sharp.dll.config.in: Added for GAC
261 * mono/dbus-sharp.snk: Added for GAC
262 * mono/Assembly.cs.in: Added for GAC
263 * mono/Makefile.am: Changes for GAC installation
264 * configure.in: Added refs for dbus-sharp.dll.config.in and
265 Assembly.cs.in. More fixes for mono testing
266 * mono/example/Makefile.am: Changed var to CSC
267 * Makefile.am: Changed flag name to DBUS_USE_CSC
269 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
271 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
272 * mono/doc/*: Added documentation framework
273 * configure.in: Added monodoc check
274 * README: Added description of mono configure flags
276 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
278 * doc/dbus-specification.xml: Added a "Required" column to the
279 header fields table and changed the "zero or more" verbage in
280 the above paragraph to read "The header must contain the required
281 named header fields and zero or more of the optional named header
283 * test/data/invalid-messages/*.message: Added the required PATH
284 named header field to the tests so that they don't fail on
287 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
289 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
290 the stack by implicitly defining variable and parameter types and
291 removing the hack of defining C pointers as python objects and later
294 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
296 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
298 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
300 * mono/DBusType/Dict.cs: Handle empty dicts
301 * mono/DBusType/Array.cs: Handle empty arrays
302 * mono/Arguments.cs: Handle empty arguments
305 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
307 * dbus-sharp.pc.in: Modified to include include Libs and Requires
310 2004-04-25 Kristian Høgsberg <krh@redhat.com>
312 * test/data/valid-messages/standard-*.message: Update message
313 test scripts to new header field names.
315 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
317 * test/break-loader.c (randomly_do_n_things): tracked down buffer
318 overflow to times_we_did_each_thing array which would chop off the
319 first character of the failure_dir string. Increased the size of
320 the array to 7 to reflect the number of random mutation functions
323 2004-04-21 Kristian Høgsberg <krh@redhat.com>
325 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
326 unix_server->watch here, it is unreffed in disconnect.
327 (_dbus_server_new_for_tcp_socket): convert NULL host to
328 "localhost" here so we don't append NULL to address.
330 * dbus/dbus-server.c (_dbus_server_test): Add test case for
331 various addresses, including tcp with no explicit host.
333 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
335 * dbus/dbus-message.c (decode_header_data, decode_string_field):
336 fix incorrect setting of .name_offset in the HeaderField (it was
337 off by two bytes, positioned right after the name and typecode)
339 * bus/bus.c (bus_context_new, bus_context_unref): test before
340 calling dbus_server_free_data_slot and _dbus_user_database_unref
343 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
346 2004-04-19 Kristian Høgsberg <krh@redhat.com>
348 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
349 _dbus_poll() instead of select().
351 2004-04-15 Jon Trowbridge <trow@ximian.com>
353 * bus/main.c (signal_handler): Reload the configuration files
355 (main): Set up our SIGHUP handler.
357 * bus/bus.c (struct BusContext): Store the config file, user and
358 fork flag in the BusContext.
359 (process_config_first_time_only): Added. Contains the code
360 (previously in bus_context_new) for setting up the BusContext from
361 the BusConfigParser that should only be run the first time the
362 config files are read.
363 (process_config_every_time): Added. Contains the code (previously
364 in bus_context_new) for setting up the BusContext from the
365 BusConfigParser that should be run every time the config files are
367 (load_config): Added. Builds a BusConfigParser from the config
368 files and passes the resulting structure off to
369 process_config_first_time_only (assuming this is the first time)
370 and process_config_every_time.
371 (bus_context_new): All of the config-related code has been moved
372 to process_config_first_time_only and process_config_every_time.
373 Now this function just does the non-config-related initializations
374 and calls load_config.
375 (bus_context_reload_config): Added.
377 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
379 * bus/driver.c (bus_driver_handle_get_service_owner):
380 implement a GetServiceOwner method.
381 * doc/dbus-specification.xml: document it.
382 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
384 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
385 implement, using the bus GetServiceOwner method.
387 * test/glib/test-dbus-glib.c:
388 use dbus_gproxy_new_for_service_owner so that we can receive the
391 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
393 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
394 dbus/dbus-message.c, dbus/dbus-protocol.h
395 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
397 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
398 dbus/dbus-message.c, dbus/dbus-protocol.h
399 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
401 * dbus/dbus-internals.c (_dbus_header_field_to_string):
402 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
403 DBUS_HEADER_FIELD_SENDER resolves to "sender"
405 * doc/dbus-specification.xml (Header Fields Table):
406 s/SERVICE/DESTINATION
407 s/SENDER_SERVICE/SENDER
410 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
412 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
415 2004-04-13 Michael Meeks <michael@ximian.com>
417 * glib/dbus-gobject.c (handle_introspect): split out
418 (introspect_properties): this.
419 (handle_introspect): implement this.
421 * test/glib/Makefile.am: use the absolute path so the bus
422 daemon's chdir ("/") doesn't kill us dead.
424 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
426 2004-04-12 Jon Trowbridge <trow@ximian.com>
428 * bus/config-parser.c (struct BusConfigParser): Added
429 included_files field.
430 (seen_include): Added. Checks whether or not a file has already
431 been included by any parent BusConfigParser.
432 (bus_config_parser_new): Copy the parent's included_files.
433 (include_file): Track which files have been included, and fail on
435 (process_test_valid_subdir): Changed printf to report if we are
436 testing valid or invalid conf files.
437 (all_are_equiv): Changed printf to be a bit clearer about
438 what we are actually doing.
439 (bus_config_parser_test): Test invalid configuration files.
441 2004-04-09 Jon Trowbridge <trow@ximian.com>
443 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
444 argument. If non-null, the newly-constructed BusConfigParser will
445 be initialized with the parent's BusLimits instead of the default
447 (include_file): When including a config file, pass in
448 the current parser as the parent and then copy the BusLimits
449 from the included BusConfigParser pack to the current parser.
450 (process_test_valid_subdir): Renamed from process_test_subdir.
451 (process_test_equiv_subdir): Added. Walks through a directory,
452 descending into each subdirectory and loading the config files
453 it finds there. If any subdirectory contains two config files
454 that don't produce identical BusConfigParser structs, fail.
455 For now, the BusConfigParser's BusPolicies are not compared.
456 (bus_config_parser_test): Call both process_test_valid_subdir and
457 process_test_equiv_subdir.
459 * bus/config-loader-libxml.c (bus_config_load): Take a parent
460 argument and pass it along to the call to bus_config_parser_new.
461 Also made a few small changes to allow this code to compile.
463 * bus/config-loader-expat.c (bus_config_load): Take a parent
464 argument and pass it along to the call to bus_config_parser_new.
466 * bus/bus.c (bus_context_new): Load the config file
467 with a NULL parent argument.
469 2004-03-29 Michael Meeks <michael@ximian.com>
471 * glib/dbus-gobject.c (introspect_properties): split
472 out, fix mangled 'while' flow control.
473 (introspect_signals): implement.
474 (handle_introspect): update.
476 2004-03-29 Michael Meeks <michael@ximian.com>
478 * glib/dbus-gobject.c (set_object_property): split out /
479 re-work, use the property type, and not the message type(!)
480 (get_object_property): ditto.
482 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
483 (dbus_gvalue_marshal): make this code re-usable, needed
484 for signals too, also on both proxy and server side.
485 Re-write for more efficiency / readability.
487 2004-03-29 Michael Meeks <michael@ximian.com>
489 * dbus/dbus-message.c
490 (dbus_message_new_error_printf): impl.
492 * dbus/dbus-connection.c
493 (dbus_connection_unregister_object_path): fix warning.
495 * configure.in: fix no-mono-installed situation.
497 2004-03-27 Havoc Pennington <hp@redhat.com>
499 Patch from Timo Teräs:
501 * tools/dbus-send.c (main): if --print-reply, assume type is
502 method call; support boolean type args
504 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
505 bunch of memleak and logic bugs
507 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
510 * mono/Introspector.cs:
512 * mono/InterfaceProxy.cs:
514 * mono/ProxyBuilder.cs:
516 Added InterfaceProxy class to avoid building proxies for every
520 * dbus-message.c (dbus_message_append_args_valist)
521 (dbus_message_iter_get_object_path)
522 (dbus_message_iter_get_object_path_array)
523 (dbus_message_iter_append_object_path)
524 (dbus_message_iter_append_object_path_array):
525 Added object_path iter functions to handle OBJECT_PATH arguments
527 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
529 First checkin of mono bindings.
532 Build stuff for the bindings
533 * dbus-sharp.pc.in: Added for pkgconfig
535 2004-03-21 Havoc Pennington <hp@redhat.com>
537 * test/test-service.c (main): remove debug spew
539 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
541 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
544 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
545 (dbus_message_iter_init_array_iterator)
546 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
547 indicate whether the iterator is empty
549 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
552 2004-03-19 Havoc Pennington <hp@redhat.com>
558 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
560 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
561 you don't need pyrex to make dist
563 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
566 2004-03-18 Richard Hult <richard@imendio.com>
568 * dbus/dbus-message.c (dbus_message_get_auto_activation)
569 (dbus_message_set_auto_activation): Add doxygen docs.
571 2004-03-16 Richard Hult <richard@imendio.com>
573 * bus/activation.c: (bus_activation_service_created),
574 (bus_activation_send_pending_auto_activation_messages),
575 (bus_activation_activate_service):
577 * bus/dispatch.c: (bus_dispatch),
578 (check_nonexistent_service_auto_activation),
579 (check_service_auto_activated),
580 (check_segfault_service_auto_activation),
581 (check_existent_service_auto_activation), (bus_dispatch_test):
582 * bus/driver.c: (bus_driver_handle_activate_service):
583 * bus/services.c: (bus_registry_acquire_service):
584 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
585 (dbus_message_get_auto_activation):
586 * dbus/dbus-message.h:
587 * dbus/dbus-protocol.h: Implement auto-activation.
589 * doc/dbus-specification.xml: Add auto-activation to the spec.
591 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
593 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
594 fix a bug with CUSTOM types.
596 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
597 a unit test for this bug (used to fail).
599 2004-03-12 Mikael Hallendal <micke@imendio.com>
602 (babysitter_watch_callback): notify all pending activations waiting for
603 the same exec that the activation failed.
604 (bus_activation_activate_service): shortcut the activation if we
605 already waiting for the same executable to start up.
607 2004-03-12 Mikael Hallendal <micke@imendio.com>
610 - Added service file reloading.
611 Each service files directory is kept in an hash table in
612 BusActivation and each BusActivationEntry knows what .service-file it
613 was read from. So when you try to activate a service the bus will
614 check if it's been updated, removed or if new .service-files has
616 - Test code at the bottom for the service file reloading.
617 * bus/test-main.c: (main):
619 - added service reloading test.
620 * dbus/dbus-sysdeps.c:
621 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
623 2004-03-08 Michael Meeks <michael@ximian.com>
625 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
626 bail immediately if disconnected, to avoid busy loop.
628 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
629 cleanup cut/paste/inefficiency.
631 2004-03-01 David Zeuthen <david@fubar.dk>
633 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
634 bug where args were used twice. This bug resulted in a segfault
635 on a Debian/PPC system when starting the messagebus daemon. Include
636 dbus-sysdeps.h for DBUS_VA_COPY
638 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
640 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
641 appropriate va_copy implementation. From GLib
643 2004-02-24 Joe Shaw <joe@ximian.com>
645 * bus/services.c (bus_registry_acquire_service): We need to pass
646 in the service name to dbus_set_error() to prevent a crash.
648 2003-12-26 Anders Carlsson <andersca@gnome.org>
650 * AUTHORS: Reveal my True identity.
652 2003-12-17 Mikael Hallendal <micke@imendio.com>
654 * dbus/dbus-message.c: (dbus_message_append_args_valist):
655 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
657 2003-12-13 Mikael Hallendal <micke@imendio.com>
659 * doc/TODO: Added not about better error check of configuration files.
661 2003-12-02 Richard Hult <richard@imendio.com>
663 * Update AFL version to 2.0 throughout the source files to reflect
664 the update that was done a while ago.
666 2003-12-02 Richard Hult <richard@imendio.com>
668 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
669 wrote_dict_key to FALSE on the iter that the dict is appended to,
670 just like when appending other types. Fixes a bug where a dict
671 couldn't be put inside a dict.
672 (dbus_message_iter_append_dict_key): Fix typo in warning message.
673 (message_iter_test, _dbus_message_test): Add test case for dict
676 2003-12-01 David Zeuthen <david@fubar.dk>
678 * python/dbus.py: Add the actual message when calling the reciever
679 of a signal such that parameters can be inspected. Add the method
680 remove_signal_receiver
682 2003-11-26 Mikael Hallendal <micke@imendio.com>
686 * glib/*.[ch]: Made ref functions return the pointer
688 2003-11-25 Zack Rusin <zack@kde.org>
690 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
692 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
695 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
696 the Integrator and to better fit with the server,
698 2003-11-24 Zack Rusin <zack@kde.org>
700 * qt/connection.h, qt/connection.cpp: removing initDbus method since
701 the integrator handles it now
703 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
704 since QTimer wasn't really meant to be used the way DBusTimeout is
706 2003-11-24 Zack Rusin <zack@kde.org>
708 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
709 Integrator class which integrates D-BUS with the Qt event loop,
711 * qt/connection.h, qt/connection.cpp: Move all the code which
712 was dealing with D-BUS integration to the Integrator class,
713 and start using Integrator,
715 2003-11-23 Zack Rusin <zack@kde.org>
717 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
720 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
721 switching namespaces to DBusQt, reworking the class,
723 * Makefile.cvs: switching dependencies so that it matches KDE
726 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
729 2003-11-19 Havoc Pennington <hp@redhat.com>
733 * configure.in: bump version to 0.20
735 * configure.in (have_qt): add yet another place to look for qt
736 (someone hand trolltech a .pc file...)
738 2003-11-01 Havoc Pennington <hp@redhat.com>
740 * doc/dbus-specification.xml: add state machine docs on the auth
741 protocol; just a first draft, I'm sure it's wrong.
743 2003-10-28 David Zeuthen <david@fubar.dk>
745 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
746 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
748 2003-10-28 Havoc Pennington <hp@redhat.com>
750 * dbus/dbus-message.c (get_next_field): delete unused function
752 2003-10-28 Havoc Pennington <hp@redhat.com>
754 * bus/expirelist.c (do_expiration_with_current_time): detect
755 failure of the expire_func due to OOM
757 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
759 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
760 NoReply error that's now created by the bus when the service exits
762 2003-10-28 Havoc Pennington <hp@redhat.com>
764 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
765 tests for set_path, set_interface, set_member, etc.
767 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
769 * dbus/dbus-message.c (set_string_field): always just delete and
770 re-append the field; accept NULL for deletion
771 (re_align_fields_recurse): reimplement
773 2003-10-26 Havoc Pennington <hp@redhat.com>
775 * dbus/dbus-connection.c: fix docs to properly describe the
777 (_dbus_connection_notify_disconnected): remove this function;
778 we can't synchronously add the disconnected message, we have to
779 do it after we've queued any remaining real messages
780 (_dbus_connection_get_dispatch_status_unlocked): queue the
781 disconnect message only if the transport has finished queueing all
782 its real messages and is disconnected.
783 (dbus_connection_disconnect): update the dispatch status here
785 2003-10-22 Havoc Pennington <hp@redhat.com>
787 * bus/bus.c (bus_context_check_security_policy): fix up assertion
789 * bus/connection.c (bus_transaction_send_from_driver): set the
790 destination to the connection's base service
792 2003-10-20 Havoc Pennington <hp@redhat.com>
794 hmm, make check is currently not passing.
796 * doc/dbus-specification.xml: add requirement that custom type
797 names follow the same rules as interface names.
799 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
800 duplication and allow 'c' to be 'custom'; dict is now 'm' for
803 * doc/dbus-specification.xml: update type codes to match
804 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
805 CUSTOM. Add type OBJECT_PATH to the spec.
807 2003-10-17 Havoc Pennington <hp@redhat.com>
809 * bus/driver.c (create_unique_client_name): use "." as separator
810 in base service names instead of '-'
812 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
813 byte at the end of the string
815 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
816 optimization macros since string validation seems to be a slow
819 * doc/dbus-specification.xml: restrict valid
820 service/interface/member/error names. Add test suite code for the
823 * dbus/dbus-string.c: limit service/interface/member/error names
826 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
827 format arg to verbose spew
829 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
830 memory, return instead of g_error
832 * test/test-service.c (path_message_func): support emitting a
835 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
836 activation bus type if DBUS_BUS_ACTIVATION was set; default to
837 assuming the activation bus was the session bus so that services
838 started manually will still register.
839 (init_connections_unlocked): fix so that in OOM situation we get
840 the same semantics when retrying the function
842 * test/test-service.c (main): change to use path registration, to
843 test those codepaths; register with DBUS_BUS_ACTIVATION rather
844 than DBUS_BUS_SESSION
846 2003-10-16 Havoc Pennington <hp@redhat.com>
848 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
850 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
851 coverage of the tests
852 (coverage-report.txt): don't move the .da and .bbg files around
854 2003-10-16 Havoc Pennington <hp@redhat.com>
856 * bus/bus.c (struct BusContext): remove struct field I didn't mean
859 2003-10-16 Havoc Pennington <hp@redhat.com>
861 * bus/connection.c (bus_pending_reply_expired): either cancel or
863 (bus_connections_check_reply): use unlink, not remove_link, as we
864 don't want to free the link; fixes double free mess
866 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
867 where no reply was received
869 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
872 * bus/signals.c (match_rule_matches): add special cases for the
873 bus driver, so you can match on sender/destination for it.
875 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
876 DBUS_PRINT_BACKTRACE is set
878 * dbus/dbus-internals.c: add pid to assertion failure messages
880 * dbus/dbus-connection.c: add message type code to the debug spew
882 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
883 sender=foo not service=foo
885 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
886 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
887 DBUS_ACTIVATION_ADDRESS instead
889 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
890 DBUS_SYSTEM_BUS_ADDRESS if appropriate
892 * bus/bus.c (bus_context_new): handle OOM copying bus type into
895 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
896 (dbus_message_iter_get_object_path_array): new function (half
897 finished, disabled for the moment)
899 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
900 DBUS_MESSAGE_TYPE_ERROR
902 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
903 avoid redirecting stderr to /dev/null
904 (babysit): close stdin if not doing the "exit_with_session" thing
906 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
907 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
908 stdout/stdin, so things don't get confused
910 * bus/system.conf.in: fix to allow replies, I modified .conf
911 instead of .conf.in again.
913 2003-10-14 David Zeuthen <david@fubar.dk>
915 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
916 argtype to arg_type when raising unknown arg type exception.
917 Changed type list to reflect the changes in dbus-protocol.h so
918 the bindings actually work.
920 2003-10-14 Havoc Pennington <hp@redhat.com>
922 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
923 to have a bug keeping it from outputting the .da files sometimes
924 (string_get_string): don't append garbage nul bytes to the string.
926 2003-10-15 Seth Nickell <seth@gnome.org>
928 * python/Makefile.am:
930 Include dbus_h_wrapper.h in the dist tarball.
932 2003-10-14 Havoc Pennington <hp@redhat.com>
934 * bus/bus.c (bus_context_check_security_policy): revamp this to
935 work more sanely with new policy-based requested reply setup
937 * bus/connection.c (bus_transaction_send_from_driver): set bus
938 driver messages as no reply
940 * bus/policy.c (bus_client_policy_check_can_receive): handle a
941 requested_reply attribute on allow/deny rules
943 * bus/system.conf: add <allow requested_reply="true"/>
945 * bus/driver.c (bus_driver_handle_message): fix check for replies
946 sent to the bus driver, which was backward. How did this ever work
947 at all though? I think I'm missing something.
949 * dbus/dbus-message.c (decode_header_data): require error and
950 method return messages to have a reply serial field to be valid
951 (_dbus_message_loader_queue_messages): break up this function;
952 validate that reply serial and plain serial are nonzero;
953 clean up the OOM/error handling.
954 (get_uint_field): don't return -1 from this
955 (dbus_message_create_header): fix signed/unsigned bug
957 * bus/connection.c (bus_connections_expect_reply): save serial of
958 the incoming message, not reply serial
960 2003-10-14 Havoc Pennington <hp@redhat.com>
962 * bus/connection.c: implement pending reply tracking using
965 * bus/bus.c (bus_context_check_security_policy): verify that a
966 reply is pending in order to allow a reply to be sent. Deny
967 messages of unknown type.
969 * bus/dbus-daemon-1.1.in: update to mention new resource limits
971 * bus/bus.c (bus_context_get_max_replies_per_connection): new
972 (bus_context_get_reply_timeout): new
974 2003-10-13 Seth Nickell <seth@gnome.org>
976 * python/Makefile.am:
978 Pass "make distcheck": remove a couple files from DIST_FILES
979 that weren't included in the final version.
981 2003-10-12 Havoc Pennington <hp@pobox.com>
983 Added test code that 1) starts an actual bus daemon and 2) uses
984 DBusGProxy; fixed bugs that were revealed by the test. Lots
985 more testing possible, but this is the basic framework.
987 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
988 empty proxy lists from the proxy list hash
990 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
991 couple of return_if_fail checks
993 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
994 to allocate, so everything is cleared to NULL as it should be.
996 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
997 source as data to dbus_connection_set_timeout_functions() as the
998 timeout functions expected
1000 * test/glib/run-test.sh: add a little script to start up a message
1001 bus and run tests using it
1003 * tools/dbus-launch.1: updates
1005 * tools/dbus-launch.c (main): add --config-file option
1007 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1008 that could never be reached.
1010 * dbus/dbus-message.c (dbus_message_new_method_return)
1011 (dbus_message_new_error, dbus_message_new_signal): set the
1012 no-reply-expected flag on all these. Redundant, but may
1013 as well be consistent.
1015 2003-10-11 Havoc Pennington <hp@pobox.com>
1017 * test/decode-gcov.c (function_solve_graph): make broken block
1018 graph a nonfatal error since it seems to be broken. Need to debug
1021 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1022 can't just check type > INVALID < LAST anymore
1024 * dbus/dbus-message.c (dbus_message_get_signature): new function
1025 (dbus_message_has_signature): new function
1026 (struct DBusMessage): add signature field (right now it isn't sent
1027 over the wire, just generated on the fly)
1028 (dbus_message_copy): copy the signature, and init strings to
1029 proper length to avoid some reallocs
1030 (dbus_message_iter_init_array_iterator): return void, since it
1032 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1033 (_dbus_message_loader_queue_messages): add silly temporary hack to
1034 fill in message->signature on load
1036 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1037 characters, so they are relatively human-readable.
1039 2003-10-11 Havoc Pennington <hp@pobox.com>
1041 * dbus/dbus-message.c (_dbus_message_test): add more test
1042 coverage, but #if 0 for now since they uncover a bug
1043 not fixed yet; I think in re_align_field_recurse()
1044 (re_align_field_recurse): add FIXME about broken assertion
1046 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1048 * bus/connection.c: share a couple code bits with expirelist.c
1050 * bus/expirelist.h, bus/expirelist.c: implement a generic
1051 expire-items-after-N-seconds facility, was going to share between
1052 expiring connections and replies, decided not to use for expiring
1053 connections for now.
1055 * COPYING: include AFL 2.0 (still need to change all the file headers)
1057 2003-10-09 Havoc Pennington <hp@redhat.com>
1059 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1060 gcc 3.3. Not that we do anything about it yet.
1062 * bus/signals.c (bus_match_rule_parse): impose max length on the
1065 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1067 2003-10-09 Havoc Pennington <hp@redhat.com>
1069 Make matching rules theoretically work (add parser).
1071 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1072 the case where destination is explicitly specified as bus driver
1073 and someone else is eavesdropping.
1075 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1076 definition of eavesdropping and assertion
1078 * tools/dbus-send.c (main): use dbus_message_type_from_string
1080 * bus/signals.c (bus_match_rule_parse): implement
1082 * dbus/dbus-message.c (dbus_message_type_from_string): new
1084 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1086 2003-10-02 Havoc Pennington <hp@pobox.com>
1088 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1089 dbus_gproxy_oneway_call
1091 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1092 (dbus_server_setup_with_g_main): fix to allow calling them more
1093 than once on the same args
1094 (dbus_bus_get_with_g_main): new function
1096 2003-10-02 Havoc Pennington <hp@redhat.com>
1098 * doc/dbus-tutorial.xml: write some stuff
1100 2003-09-29 Havoc Pennington <hp@pobox.com>
1102 * configure.in: split checks for Doxygen from XML docs, check for
1105 * doc/Makefile.am: XML-ify all the docs, and add a blank
1108 2003-09-29 Havoc Pennington <hp@pobox.com>
1110 * Merge dbus-object-names branch. To see the entire patch
1111 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1112 it's huuuuge though.
1113 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1115 2003-09-28 Havoc Pennington <hp@pobox.com>
1117 * HACKING: update to reflect new server
1119 2003-09-26 Seth Nickell <seth@gnome.org>
1122 * python/examples/example-signals.py:
1124 Start implementing some notions of signals. The API
1125 is really terrible, but they sort of work (with the
1126 exception of being able to filter by service, and to
1127 transmit signals *as* a particular service). Need to
1128 figure out how to make messages come from the service
1131 * python/dbus_bindings.pyx.in:
1133 Removed duplicate message_handler callbacks.
1135 2003-09-25 Havoc Pennington <hp@redhat.com>
1137 * bus/session.conf.in: fix my mess
1139 2003-09-25 Havoc Pennington <hp@pobox.com>
1141 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1143 2003-09-25 Seth Nickell <seth@gnome.org>
1145 * python/examples/example-service.py:
1147 Johan notices complete wrong code in example-service, but
1148 completely wrong in a way that works exactly the same (!).
1149 Johan is confused, how could this possibly work? Example
1150 code fails to serve purpose of making things clear.
1153 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1155 * doc/dbus-specification.sgml: don't require header fields
1156 to be 4-byte aligned and specify that fields should be
1157 distinguished from padding by the fact that zero is not
1160 * doc/TODO: remove re-alignment item and add item to doc
1161 the OBJECT_PATH type.
1163 * dbus/dbus-message.c:
1164 (HeaderField): rename the original member to value_offset
1165 and introduce a name_offset member to keep track of where
1166 the field actually begins.
1167 (adjust_field_offsets): remove.
1168 (append_int_field), (append_uint_field),
1169 (append_string_field): don't align the start of the header
1170 field to a 4-byte boundary.
1171 (get_next_field): impl finding the next marhsalled field
1172 after a given field.
1173 (re_align_field_recurse): impl re-aligning a number of
1174 already marshalled fields.
1175 (delete_field): impl deleting a field of any type and
1176 re-aligning any following fields.
1177 (delete_int_or_uint_field), (delete_string_field): remove.
1178 (set_int_field), (set_uint_field): no need to re-check
1179 that we have the correct type for the field.
1180 (set_string_field): ditto and impl re-aligning any
1182 (decode_header_data): update to take into account that
1183 the fields aren't 4-byte aligned any more and the new
1184 way to distinguish padding from header fields. Also,
1185 don't exit when there is too much header padding.
1186 (process_test_subdir): print the directory.
1187 (_dbus_message_test): add test to make sure a following
1188 field is re-aligned correctly after field deletion.
1190 * dbus/dbus-string.[ch]:
1191 (_dbus_string_insert_bytes): rename from insert_byte and
1192 allow the insert of multiple bytes.
1193 (_dbus_string_test): test inserting multiple bytes.
1195 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1196 warning note to docs about having to re-align any
1197 marshalled values following the string.
1199 * dbus/dbus-message-builder.c:
1200 (append_string_field), (_dbus_message_data_load):
1201 don't align the header field.
1203 * dbus/dbus-auth.c: (process_test_subdir): print the
1206 * test/break-loader.c: (randomly_add_one_byte): upd. for
1209 * test/data/invalid-messages/bad-header-field-alignment.message:
1212 * test/data/valid-messages/unknown-header-field.message: shove
1213 a dict in the unknown field.
1215 2003-09-25 Seth Nickell <seth@gnome.org>
1218 * python/dbus_bindings.pyx.in:
1220 Handle return values.
1222 * python/examples/example-client.py:
1223 * python/examples/example-service.py:
1225 Pass back return values from the service to the client.
1227 2003-09-24 Seth Nickell <seth@gnome.org>
1231 Connect Object methods (when you are sharing an object) up... pass
1232 in a list of methods to be shared. Sharing all the methods just
1233 worked out too weird. You can now create nice Services over the
1236 * python/dbus_bindings.pyx.in:
1238 Keep references to user_data tuples passed into C functions so
1239 Python doesn't garbage collect on us.
1241 Implement MethodReturn and Error subclasses of Message for creating
1242 DBusMessage's of those types.
1244 * python/examples/example-client.py:
1245 * python/examples/example-service.py:
1247 Simple example code showing both how create DBus services and objects,
1248 and how to use them.
1250 2003-09-23 Havoc Pennington <hp@pobox.com>
1252 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1254 2003-09-23 Havoc Pennington <hp@redhat.com>
1256 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1257 (dbus_gproxy_disconnect_signal): implement
1258 (dbus_gproxy_manager_remove_signal_match): implement
1259 (dbus_gproxy_manager_add_signal_match): implement
1260 (dbus_gproxy_oneway_call): implement
1262 2003-09-23 Havoc Pennington <hp@pobox.com>
1264 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1265 subclass. This means dropping the transparent thread safety of the
1266 proxy; you now need a separate proxy per-thread, or your own
1267 locking on the proxy. Probably right anyway.
1268 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1270 2003-09-22 Havoc Pennington <hp@redhat.com>
1272 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1274 2003-09-21 Seth Nickell <seth@gnome.org>
1276 First checkin of the Python bindings.
1278 * python/.cvsignore:
1279 * python/Makefile.am:
1280 * python/dbus_bindings.pyx.in:
1281 * python/dbus_h_wrapper.h:
1283 Pieces for Pyrex to operate on, building a dbus_bindings.so
1284 python module for low-level access to the DBus APIs.
1288 High-level Python module for accessing DBus objects.
1293 Build stuff for the python bindings.
1297 Extra macro needed for finding the Python C header files.
1299 2003-09-21 Havoc Pennington <hp@pobox.com>
1301 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1302 implementing the proxy manager, didn't get very far.
1304 * dbus/dbus-bus.c (dbus_bus_add_match): new
1305 (dbus_bus_remove_match): new
1307 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1308 path_name argument; adjust the other not-yet-implemented
1309 gproxy constructors to be what I think they should be.
1311 2003-09-21 Havoc Pennington <hp@pobox.com>
1313 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1314 by default for message bus connections.
1316 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1317 exit_on_disconnect flag is set and we process the disconnected
1319 (dbus_connection_set_exit_on_disconnect): new function
1321 2003-09-21 Havoc Pennington <hp@pobox.com>
1323 Get matching rules mostly working in the bus; only actually
1324 parsing the rule text remains. However, the client side of
1325 "signal connections" hasn't been started, this patch is only the
1328 * dbus/dispatch.c: fix for the matching rules changes
1330 * bus/driver.c (bus_driver_handle_remove_match)
1331 (bus_driver_handle_add_match): send an ack reply from these
1334 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1335 arguments, reported by Seth Nickell
1337 * bus/config-parser.c (append_rule_from_element): support
1338 eavesdrop=true|false attribute on policies so match rules
1339 can be prevented from snooping on the system bus.
1341 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1342 and "destination" in attribute names; fix some docs bugs;
1343 add eavesdrop=true|false attribute
1345 * bus/driver.c (bus_driver_handle_add_match)
1346 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1349 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1350 rid of broadcast service concept, signals are just always broadcast
1352 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1353 mostly implement matching rules stuff (currently only exposed as signal
1356 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1358 * doc/dbus-specification.sgml: Change the header field name
1359 to be an enum and update the rest of the spec to reference
1360 the fields using the conventinal name.
1362 * dbus/dbus-protocol.h: update to reflect the spec.
1364 * doc/TODO: add item to remove the 4 byte alignment requirement.
1366 * dbus/dbus-message.c: Remove the code to generalise the
1367 header/body length and serial number header fields as named
1368 header fields so we can reference field names using the
1370 (append_int_field), (append_uint_field), (append_string_field):
1371 Append the field name as a byte rather than four chars.
1372 (delete_int_or_uint_field), (delete_string_field): reflect the
1373 fact that the field name and typecode now occupy 4 bytes instead
1375 (decode_string_field), (decode_header_data): update to reflect
1376 protocol changes and move the field specific encoding from
1377 decode_string_field() back into decode_header_data().
1379 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1380 Add utility to aid debugging.
1382 * dbus/dbus-message-builder.c:
1383 (append_string_field), (_dbus_message_data_load): Update to
1384 reflect protocol changes; Change the FIELD_NAME directive
1385 to HEADER_FIELD and allow it to take the field's conventional
1386 name rather than the actual value.
1388 * test/data/*/*.message: Update to use HEADER_FIELD instead
1389 of FIELD_NAME; Always align the header on an 8 byte boundary
1390 *before* updating the header length.
1392 2003-09-15 Havoc Pennington <hp@pobox.com>
1394 * dbus/dbus-pending-call.c: add the get/set object data
1395 boilerplate as for DBusConnection, etc. Use generic object data
1396 for the notify callback.
1398 * glib/dbus-gparser.c (parse_node): parse child nodes
1400 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1402 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1403 contain functions shared between the convenience lib and the
1406 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1407 -export-symbols-regex to the GLib library
1409 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1410 fix the locking in here, and add a default handler for
1411 Introspect() that just returns sub-nodes.
1413 2003-09-14 Havoc Pennington <hp@pobox.com>
1415 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1416 rather than gfoo consistent
1418 * glib/dbus-gproxy.h: delete for now, move contents to
1419 dbus-glib.h, because the include files don't work right since we
1420 aren't in the dbus/ subdir.
1422 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1423 (dbus_gproxy_end_call): finish
1424 (dbus_gproxy_begin_call): finish
1426 * glib/dbus-gmain.c (dbus_set_g_error): new
1428 * glib/dbus-gobject.c (handle_introspect): include information
1429 about child nodes in the introspection
1431 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1432 function to help in implementation of introspection
1434 * dbus/dbus-object-tree.c
1435 (_dbus_object_tree_list_registered_and_unlock): new function
1437 2003-09-12 Havoc Pennington <hp@pobox.com>
1439 * glib/dbus-gidl.h: add common base class for all the foo_info
1442 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1445 * test/Makefile.am: try test srcdir -ef . in addition to test
1446 srcdir = ., one of them should work (yeah lame)
1448 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1451 * glib/dbus-gparser.h: make description_load routines return
1452 NodeInfo* not Parser*
1454 * Makefile.am (SUBDIRS): build test dir after all library dirs
1456 * configure.in: add GTK+ detection
1458 2003-09-07 Havoc Pennington <hp@pobox.com>
1460 * Make Doxygen contented.
1462 2003-09-07 Havoc Pennington <hp@pobox.com>
1464 * doc/dbus-specification.sgml: more updates
1466 2003-09-06 Havoc Pennington <hp@pobox.com>
1468 * doc/dbus-specification.sgml: partial updates
1470 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1471 zillionth time; hopefully I edited the right file this time.
1473 * bus/config-parser.c (append_rule_from_element): support
1474 send_type, send_path, receive_type, receive_path
1476 * bus/policy.c: add message type and path to the list of things
1477 that can be "firewalled"
1479 2003-09-06 Havoc Pennington <hp@pobox.com>
1481 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1482 (dbus_connection_register_object_path): make this not handle
1483 messages to paths below the given path
1485 2003-09-03 Havoc Pennington <hp@pobox.com>
1487 * test/glib/Makefile.am: add this with random glib-linked test
1490 * glib/Makefile.am: remove the random test programs from here,
1491 leave only the unit tests
1493 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1494 uscore/javacaps conversion, and fix
1495 (get_object_property, set_object_property): change to .NET
1496 convention for mapping props to methods, set_FooBar/get_FooBar,
1497 since one language has such a convention we may as well copy it.
1498 Plus real methods in either getFooBar or get_foo_bar style won't
1499 collide with this convention.
1501 2003-09-01 Havoc Pennington <hp@pobox.com>
1503 * glib/dbus-gparser.c: implement
1505 * glib/dbus-gobject.c: start implementing skeletons support
1507 * configure.in: when disabling checks/assert, also define
1508 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1510 2003-09-01 Havoc Pennington <hp@pobox.com>
1512 * glib/Makefile.am: rearrange a bunch of files and get "make
1513 check" framework set up
1515 2003-08-31 Havoc Pennington <hp@pobox.com>
1517 * fix build with --disable-tests
1519 2003-08-30 Havoc Pennington <hp@pobox.com>
1521 * dbus/dbus-connection.c: purge DBusMessageHandler
1523 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1524 use callbacks everywhere
1526 2003-08-30 Havoc Pennington <hp@pobox.com>
1528 * test/data/valid-config-files/system.d/test.conf: change to
1529 root for the user so warnings don't get printed
1531 * dbus/dbus-message.c: add dbus_message_get_path,
1532 dbus_message_set_path
1534 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1535 dispatching to a path
1537 * dbus/dbus-string.c (_dbus_string_validate_path): add
1539 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1540 (_dbus_marshal_object_path): implement
1542 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1543 to contain the path to the target object
1544 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1545 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1547 2003-08-30 Havoc Pennington <hp@pobox.com>
1549 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1551 2003-08-29 Havoc Pennington <hp@pobox.com>
1553 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1555 (struct DBusObjectSubtree): shrink this
1556 a lot, since we may have a lot of them
1557 (_dbus_object_tree_free_all_unlocked): implement
1558 (_dbus_object_tree_dispatch_and_unlock): implement
1560 2003-08-29 Havoc Pennington <hp@pobox.com>
1562 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1564 2003-08-28 Havoc Pennington <hp@pobox.com>
1568 * dbus/dbus-connection.c: port to no ObjectID, create a
1569 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1571 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1572 everything except UnregisterFunction and MessageFunction
1574 * dbus/dbus-marshal.c: port away from DBusObjectID,
1575 add DBUS_TYPE_OBJECT_PATH
1577 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1578 dbus/dbus-objectid.[hc]: remove these, we are moving to
1579 path-based object IDs
1581 2003-08-25 Havoc Pennington <hp@pobox.com>
1583 Just noticed that dbus_message_test is hosed, I wonder when I
1584 broke that. I thought make check was passing earlier...
1586 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1587 container tree, will replace most of dbus-object-registry
1589 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1592 2003-08-19 Havoc Pennington <hp@pobox.com>
1594 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1595 (dbus_message_is_error): fix this function
1597 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1600 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1601 reflect clarified man page
1602 (bus_client_policy_check_can_send): ditto
1604 * bus/session.conf.in: fixup
1606 * bus/system.conf.in: fixup
1608 2003-08-18 Havoc Pennington <hp@redhat.com>
1610 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1612 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1613 dumb bug created earlier (wrong order of args to
1614 decode_header_data())
1616 * tools/dbus-send.c: port
1618 * tools/dbus-print-message.c (print_message): port
1620 * test/data/*messages: port all messages over
1622 * dbus/dbus-message-builder.c: support including
1625 * bus/driver.c: port over
1627 * bus/dispatch.c: port over to new stuff
1629 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1630 rename disconnect signal to "Disconnected"
1632 2003-08-17 Havoc Pennington <hp@pobox.com>
1634 This doesn't compile yet, but syncing up so I can hack on it from
1635 work. What are branches for if not broken code? ;-)
1637 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1638 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1639 DBUS_HEADER_FIELD_ERROR_NAME
1641 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1642 for the interface+member pairs
1643 (string_hash): change to use g_str_hash algorithm
1644 (find_direct_function, find_string_function): refactor these to
1647 * dbus/dbus-message.c: port all of this over to support
1648 interface/member fields instead of name field
1650 * dbus/dbus-object-registry.c: port over
1652 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1653 from _dbus_string_validate_name
1655 * bus/dbus-daemon-1.1: change file format for the
1656 <deny>/<allow> stuff to match new message naming scheme
1658 * bus/policy.c: port over
1660 * bus/config-parser.c: parse new format
1662 2003-08-16 Havoc Pennington <hp@pobox.com>
1664 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1667 * glib/dbus-gproxy.c: some hacking
1669 2003-08-15 Havoc Pennington <hp@redhat.com>
1671 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1673 * dbus/dbus-connection.c
1674 (dbus_connection_send_with_reply_and_block): factor out internals;
1675 change to convert any error replies to DBusError instead of
1676 returning them as a message
1678 2003-08-15 Havoc Pennington <hp@pobox.com>
1680 * dbus/dbus-connection.c,
1681 dbus/dbus-pending-call.c: Finish the pending call stuff
1683 2003-08-14 Havoc Pennington <hp@redhat.com>
1685 * dbus/dbus-pending-call.c: start on new object that will replace
1686 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1689 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1690 with remote interfaces
1692 * dbus/dbus-gidl.c: do the boring boilerplate in here
1694 2003-08-12 Havoc Pennington <hp@pobox.com>
1696 * bus/dispatch.c (bus_dispatch): make this return proper
1697 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1699 * dbus/dbus-errors.c (dbus_set_error): use
1700 _dbus_string_append_printf_valist
1702 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1703 (_dbus_string_append_printf): new
1705 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1708 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1709 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1710 message is unhandled.
1712 2003-08-11 Havoc Pennington <hp@pobox.com>
1714 * bus/test.c (client_disconnect_handler): change to return
1715 HANDLED (would have been REMOVE_MESSAGE)
1717 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1718 HANDLED/NOT_YET_HANDLED instead of
1719 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1722 2003-08-10 Havoc Pennington <hp@pobox.com>
1724 * tools/dbus-send.c (main): add --type argument, for now
1725 supporting only method_call and signal types.
1727 * tools/dbus-print-message.c: print message type
1729 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1730 init connection->objects
1732 * doc/dbus-specification.sgml: fix sgml
1734 * bus/*.c: port over to object-instance API changes
1736 * test/test-service.c: ditto
1738 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1739 name, we will have to fix up the rest of the code to also handle
1741 (dbus_message_new): generic message-creation call
1742 (set_string_field): allow appending name field
1744 2003-08-06 Havoc Pennington <hp@pobox.com>
1746 * dbus/dbus-object-registry.c: implement signal connection
1749 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1751 * dbus/dbus-internals.c (_dbus_memdup): new function
1753 2003-08-02 Havoc Pennington <hp@pobox.com>
1755 * dbus/dbus-message.c (dbus_message_get_no_reply)
1756 (dbus_message_set_no_reply): add these and remove
1757 set_is_error/get_is_error
1759 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1760 remove the ERROR flag, since there's now an ERROR type
1762 2003-08-01 Havoc Pennington <hp@pobox.com>
1764 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1767 * dbus/dbus-message.c (dbus_message_get_type): new function
1769 * doc/dbus-specification.sgml: add "type" byte to messages
1771 2003-08-01 Havoc Pennington <hp@pobox.com>
1773 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1774 a message type enum to distinguish kinds of message
1775 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1776 that need not be replied to
1778 2003-08-01 Havoc Pennington <hp@pobox.com>
1780 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1781 (unpack_8_octets): fix no-64-bit-int bug
1783 * dbus/dbus-object-registry.c (validate_id): validate the
1784 connection ID bits, not just the instance ID.
1786 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1787 the connection-global 33 bits of the object ID
1789 * dbus/dbus-object-registry.c (info_from_entry): fill in
1790 object ID in the new way
1792 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1793 define server/client/instance bits.
1795 2003-07-30 Havoc Pennington <hp@pobox.com>
1797 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1800 2003-07-13 Havoc Pennington <hp@pobox.com>
1802 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1803 fields to DBusObjectVTable and DBusObjectInfo
1805 2003-07-12 Havoc Pennington <hp@pobox.com>
1807 * dbus/dbus-object-registry.c: implement unit test,
1808 fix bugs discovered in process
1810 * dbus/dbus-connection.c: remove handler_table and
1811 register_handler(), add DBusObjectRegistry usage
1813 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1814 (dbus_object_id_set_null): new functions
1816 2003-07-08 Havoc Pennington <hp@pobox.com>
1818 * dbus/dbus-object.c: implement some of this
1820 * dbus/dbus-object-registry.c
1821 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1823 (_dbus_object_registry_new): handle OOM
1825 2003-07-08 Havoc Pennington <hp@pobox.com>
1827 * dbus/dbus-object.h: sketch out an API for registering objects
1828 with a connection, that allows us to use as little as 24 bytes
1829 per object and lets application code represent an object in
1830 any conceivable way.
1832 * dbus/dbus-object-registry.c: implement the hard bits of the
1833 DBusConnection aspect of object API. Not yet wired up.
1835 2003-07-06 Havoc Pennington <hp@pobox.com>
1837 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1838 (_dbus_marshal_object_id): new
1839 (_dbus_demarshal_object_id): new
1840 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1841 consolidate identical switch cases. Don't conditionalize handling
1842 of DBUS_TYPE_UINT64, need to handle the type always.
1843 (_dbus_marshal_validate_arg): consolidate identical cases, and
1844 handle DBUS_TYPE_OBJECT_ID
1846 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1848 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1850 2003-09-28 Havoc Pennington <hp@pobox.com>
1854 2003-09-28 Havoc Pennington <hp@pobox.com>
1856 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1857 to work with Debian db2html
1859 2003-09-28 Havoc Pennington <hp@pobox.com>
1861 * configure.in: 0.13
1863 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1864 stylesheet-images for benefit of Debian
1866 Change back to using filesystem-linked sockets for the system
1867 bus, so only root can create the default system bus address.
1869 * bus/system.conf.in: change to use
1870 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1872 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1875 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1876 here, and AC_DEFINE DBUS_SYSTEM_PATH
1878 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1881 * doc/busconfig.dtd:
1884 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1886 * doc/dbus-specification.sgml:
1887 Add activation reply values.
1889 2003-08-05 Havoc Pennington <hp@redhat.com>
1891 * configure.in: 0.12
1893 2003-08-05 Anders Carlsson <andersca@codefactory.se>
1895 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1896 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1897 (add_watch), (remove_watch), (create_source):
1898 Refcount fds, fixes some reentrancy issues.
1900 2003-07-30 Havoc Pennington <hp@redhat.com>
1902 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1903 bus address to be abstract if we have abstract sockets
1907 2003-07-28 Havoc Pennington <hp@redhat.com>
1909 * bus/messagebus.in: fix to avoid processname/servicename
1910 confusion, from Michael Kearey
1911 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1913 2003-07-23 Havoc Pennington <hp@pobox.com>
1915 * dbus/dbus-message.c (dbus_message_iter_get_named):
1916 fix from Andy Hanton to remove broken "+1"
1918 2003-07-16 Havoc Pennington <hp@pobox.com>
1920 * tools/dbus-launch.c (babysit): close stdout/stderr in the
1921 babysitter process, as suggested by Thomas Leonard, so
1922 an "eval `dbus-launch --exit-with-session`" will actually
1925 2003-07-16 Havoc Pennington <hp@pobox.com>
1927 * configure.in: print out EXPANDED_* variables in the summary at
1928 the end; clean up the code that computes EXPANDED_ variables and
1929 get the ones using exec_prefix right. Should make things work
1930 when you build without --prefix
1932 2003-06-29 Havoc Pennington <hp@pobox.com>
1934 * mono/Test.cs (class Test): fire up a main loop and run it
1936 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1937 done once, the app has to do it
1939 2003-06-26 Havoc Pennington <hp@pobox.com>
1941 * mono/Connection.cs: set up connection with the glib main loop
1943 2003-07-01 Havoc Pennington <hp@redhat.com>
1945 * doc/dbus-specification.sgml: clarify the format of a type code,
1946 change suggested by Jim Blandy
1948 2003-06-29 Miloslav Trmac <mitr@volny.cz>
1951 * tools/Makefile.am: Don't assume srcdir == builddir.
1953 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1954 the allocated block.
1955 (_dbus_memory_test): New function.
1956 * dbus/dbus-test.h: Add _dbus_memory_test ().
1957 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1959 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1961 (dbus_message_new): Remove obsolete @todo.
1963 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1964 (_dbus_marshal_set_uint64): Fix comment.
1966 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1967 hardcode FIELD_REPLY_SERIAL.
1969 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1970 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1972 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1973 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1975 2003-06-24 Havoc Pennington <hp@pobox.com>
1977 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1979 2003-06-23 Anders Carlsson <andersca@codefactory.se>
1985 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1986 * gcj/org/.cvsignore:
1987 * gcj/org/Makefile.am:
1988 * gcj/org/freedesktop/.cvsignore:
1989 * gcj/org/freedesktop/Makefile.am:
1990 * gcj/org/freedesktop/dbus/.cvsignore:
1991 * gcj/org/freedesktop/dbus/Makefile.am:
1992 * gcj/org/freedesktop/dbus/Message.java: (Message),
1994 * gcj/org/freedesktop/dbus/natMessage.cc:
1995 Fix the build system.
1997 2003-06-22 Havoc Pennington <hp@pobox.com>
1999 * mono/Connection.cs: add more bindings
2001 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2004 2003-06-22 Havoc Pennington <hp@pobox.com>
2006 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2007 Start wrapping more stuff.
2009 2003-06-22 Havoc Pennington <hp@pobox.com>
2011 * mono/Message.cs: implement Message.Wrap() that ensures we only
2012 have a single C# wrapper per DBusMessage, assuming it works which
2013 it probably doesn't.
2015 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2016 (dbus_message_free_data_slot): new
2017 (dbus_message_set_data): new
2018 (dbus_message_get_data): new
2020 2003-06-22 Havoc Pennington <hp@pobox.com>
2022 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2023 (_dbus_data_slot_allocator_alloc): rework these to keep a
2024 reference count on each slot and automatically manage a global
2025 slot ID variable passed in by address
2027 * bus/bus.c: convert to new dataslot API
2029 * dbus/dbus-bus.c: convert to new dataslot API
2031 * dbus/dbus-connection.c: convert to new dataslot API
2033 * dbus/dbus-server.c: convert to new dataslot API
2035 * glib/dbus-gmain.c: ditto
2039 * bus/connection.c: ditto
2041 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2043 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2044 after the gcj checks so that the correct configuration tags
2045 will be added to libtool.
2047 * dbus-glib-1.pc.in: No need to specify any includes since
2048 dbus-1.pc.in has those.
2050 2003-06-22 Havoc Pennington <hp@pobox.com>
2052 * mono/*, gcj/*, configure.in, Makefile.am:
2053 Check in makefiles and subdirs for mono and gcj bindings.
2054 Neither binding actually exists, just trying to get through
2055 all the build and other boring bits.
2057 2003-06-21 Philip Blundell <philb@gnu.org>
2059 * tools/dbus-monitor.1: Updated.
2061 * tools/dbus-send.1: Likewise.
2063 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2065 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2066 for hangup and error after checking read so we won't discard
2067 pending data if both hangup and read are set.
2069 2003-06-19 Philip Blundell <philb@gnu.org>
2071 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2073 * tools/dbus-send.c: Accept both --system and --session.
2075 * tools/dbus-monitor.c: Same here.
2077 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2079 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2080 from C++ (Patch by Miloslav Trmac).
2082 2003-06-15 Joe Shaw <joe@assbarn.com>
2084 * configure.in: Check for socklen_t.
2086 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2088 * test/test-segfault.c: Add #include <sys/time.h>
2090 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2091 dbus-launch needs it.
2093 2003-06-09 Havoc Pennington <hp@redhat.com>
2095 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2096 SUN_LEN, it breaks abstract socket usage
2098 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2101 2003-06-04 Havoc Pennington <hp@pobox.com>
2103 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2104 using unix:abstract=/foo, and when listening in a tmpdir
2105 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2107 * dbus/dbus-transport.c (_dbus_transport_open): support
2110 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2111 support abstract sockets
2113 * dbus/dbus-transport-unix.c
2114 (_dbus_transport_new_for_domain_socket): support abstract sockets
2116 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2117 toggle as an argument, implement abstract namespace support
2118 (_dbus_listen_unix_socket): ditto
2120 * configure.in: add --enable-abstract-sockets and implement
2121 a configure check for autodetection of the right value.
2123 2003-06-01 Havoc Pennington <hp@pobox.com>
2125 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2126 in /tmp (though on Linux this will end up being useless,
2127 when we add abstract namespace support)
2129 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2132 2003-05-28 Colin Walters <walters@verbum.org>
2134 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2136 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2138 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2140 2003-05-17 Colin Walters <walters@gnu.org>
2142 * tools/dbus-send.c: Don't exit with an error code if --help was
2143 passed. Default to using the session bus instead of the system
2146 * tools/dbus-launch.c: Ditto.
2148 * tools/dbus-monitor.c: Ditto.
2150 * tools/dbus-send.1: Update with new arguments.
2152 * tools/dbus-launch.c: Emit code to export variables. New
2153 arguments -s and -c to specify shell syntax, and a bit of code to
2154 autodetect syntax. Also, allow specifying a program to run.
2156 * tools/dbus-launch.1: Update with new arguments.
2158 * tools/dbus-send.1: Ditto.
2160 * tools/dbus-monitor.1: Ditto.
2162 2003-05-17 Havoc Pennington <hp@pobox.com>
2164 * bus/config-parser.c (merge_included): merge in policies from
2165 child configuration file.
2167 * bus/policy.c (bus_policy_merge): function to merge two policies
2170 2003-05-16 Havoc Pennington <hp@redhat.com>
2172 * dbus/dbus-connection.c: disable verbose lock spew
2174 * tools/dbus-send.c: add --print-reply command line option
2176 * tools/dbus-print-message.h (print_message): new util function
2177 shared by dbus-send and dbus-monitor
2179 * tools/dbus-monitor.c (handler_func): exit on disconnect
2181 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2182 disconnected, don't try to use the read_watch
2184 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2185 so we can find this bug more easily
2187 2003-05-16 Havoc Pennington <hp@redhat.com>
2189 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2190 NULL as DBusHashTable is annoyingly likely to do.
2192 2003-05-16 Colin Walters <walters@verbum.org>
2194 * tools/dbus-monitor.c: Add --session argument and usage()
2197 * tools/dbus-monitor.1: Update with new --session arg.
2199 * bus/Makefile.am (install-data-hook): Create
2200 $(libdir)/dbus-1.0/services so that the session bus is happy.
2202 2003-05-15 Havoc Pennington <hp@redhat.com>
2204 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2205 on non-x86. ifdef's are evil.
2207 2003-05-15 Havoc Pennington <hp@redhat.com>
2209 * configure.in: 0.11
2213 * bus/Makefile.am (initddir): apparently we are supposed to put
2214 init scripts in /etc/rc.d/init.d not /etc/init.d
2216 * bus/Makefile.am: remove the "you must --enable-tests to make
2217 check" as it broke distcheck
2219 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2221 2003-05-13 James Willcox <jwillcox@gnome.org>
2224 * bus/activation.c: (bus_activation_service_created),
2225 (bus_activation_activate_service):
2226 * bus/driver.c: (bus_driver_send_service_deleted),
2227 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2228 (bus_driver_send_service_acquired),
2229 (bus_driver_send_welcome_message),
2230 (bus_driver_handle_list_services):
2231 * bus/session.conf.in:
2232 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2233 (dbus_bus_service_exists), (dbus_bus_activate_service):
2236 Add some convenience API which lets you activate a service, and did a
2237 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2238 and dbus_message_get_args()
2240 2003-05-11 Havoc Pennington <hp@pobox.com>
2242 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2243 calling _dbus_marshal_validate_arg() for every byte in a byte
2246 * dbus/dbus-message-handler.c: use atomic reference counting to
2247 reduce number of locks slightly; the global lock in here sucks
2249 * dbus/dbus-connection.c
2250 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2251 update_dispatch_status that can be called with lock held; then use
2252 in a couple places to reduce locking/unlocking
2253 (dbus_connection_send): hold the lock over the whole function
2254 instead of acquiring it twice.
2256 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2258 * bus/connection.c (bus_connections_setup_connection): fix access
2259 to already-freed memory.
2261 * dbus/dbus-connection.c: keep a little cache of linked list
2262 nodes, to avoid using the global linked list alloc lock in the
2263 normal send-message case. Instead we just use the connection lock
2264 that we already have to take.
2266 * dbus/dbus-list.c (_dbus_list_find_last): new function
2268 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2269 change to use a struct for the atomic type; fix docs,
2270 they return value before increment, not after increment.
2272 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2273 (_dbus_string_append_8_aligned): new functions to try to
2274 microoptimize this operation.
2275 (reallocate_for_length): break this out of set_length(), to
2276 improve profile info, and also so we can consider inlining the
2279 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2280 strings with some preallocation, cuts down on our calls to realloc
2281 a fair bit. Though if we can get the "move entire string to empty
2282 string" optimization below to kick in here, it would be better.
2284 * dbus/dbus-string.c (_dbus_string_move): just call
2285 _dbus_string_move_len
2286 (_dbus_string_move_len): add a special case for moving
2287 an entire string into an empty string; we can just
2288 swap the string data instead of doing any reallocs.
2289 (_dbus_string_init_preallocated): new function
2291 2003-05-11 Havoc Pennington <hp@pobox.com>
2293 Write a "test-profile" that does echo client-server with threads;
2294 profile reveals lock contention, memcpy/realloc of buffers, and
2295 UTF-8 validation as hot spots. 20% of lock contention eliminated
2296 with dbus_atomic_inc/dec implementation on x86. Much remaining
2297 contention is global mempool locks for GList and DBusList.
2299 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2302 * dbus/dbus-connection.c (struct DBusConnection): use
2303 dbus_atomic_t for the reference count
2305 * dbus/dbus-message.c (struct DBusMessage): declare
2306 dbus_atomic_t values as volatile
2308 * configure.in: code to detect ability to use atomic integer
2309 operations in assembly, from GLib patch
2311 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2312 time, tired of it being wrong in threads and forked processes
2314 * glib/test-profile.c: a little program to bounce messages back
2315 and forth between threads and eat CPU
2317 * dbus/dbus-connection.c: add debug spew macros for debugging
2318 thread locks; include config.h at top; fix deadlock in
2319 dbus_connection_flush()
2321 2003-05-08 Havoc Pennington <hp@pobox.com>
2323 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2324 data from getting written, and there wasn't a good reason to
2327 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2328 dbus_verbose lines in test coverage
2329 (main): add list of functions sorted by # of untested blocks
2330 to the coverage report
2332 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2334 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2336 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2337 extend test coverage
2339 * test/data/auth/cancel.auth-script: test canceling an
2342 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2343 aren't used. in CVS history if we end up needing them.
2345 2003-05-04 Havoc Pennington <hp@pobox.com>
2347 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2350 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2351 function, which assumed length was in # of strings, not bytes
2353 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2356 * dbus/dbus-connection.c
2357 (_dbus_connection_queue_received_message): disable function for
2358 now, we are only using it in test mode
2360 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2361 remove a mistaken FIXME
2363 2003-05-04 Havoc Pennington <hp@pobox.com>
2365 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2366 unlock mutex on successful return, patch from Anders Gustafsson
2368 2003-05-04 Havoc Pennington <hp@pobox.com>
2370 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2373 2003-05-04 Havoc Pennington <hp@pobox.com>
2375 * tools/dbus-launch.c: implement
2377 * bus/main.c (main), bus/bus.c (bus_context_new):
2378 implement --print-pid and --fork
2380 2003-05-03 Havoc Pennington <hp@redhat.com>
2382 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2383 the address had no value, and add to test suite. Fix and
2384 regression test from Miloslav Trmac
2386 2003-05-03 Havoc Pennington <hp@pobox.com>
2388 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2389 watch is invalid when handled
2391 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2392 dbus-launch utility to launch the bus from a shell script. Didn't
2393 actually implement dbus-launch yet, it's just a placeholder still.
2395 2003-05-03 Havoc Pennington <hp@pobox.com>
2397 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2398 daemon; also documents daemon config file, so replaces
2399 doc/config-file.txt. Corrected some stuff from config-file.txt in
2400 the process of moving it.
2402 2003-05-03 Havoc Pennington <hp@pobox.com>
2404 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2407 2003-05-03 Colin Walters <walters@verbum.org>
2409 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2410 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2412 * Makefile.am: Update to use new .pc versioning scheme.
2414 2003-05-02 Havoc Pennington <hp@redhat.com>
2416 * bus/system.conf.in: allow send/receive to/from message bus
2419 2003-04-30 Havoc Pennington <hp@redhat.com>
2421 * configure.in: print a note when building with unit tests and
2424 2003-04-30 Havoc Pennington <hp@redhat.com>
2426 * Makefile.am: add a check-local that complains if you didn't
2427 configure with --enable-tests
2429 2003-04-29 Havoc Pennington <hp@redhat.com>
2431 * glib/dbus-gmain.c: docs cleanups
2433 * dbus/dbus-types.h: add docs on int64 types
2435 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2436 public API docs section
2438 2003-04-29 Havoc Pennington <hp@redhat.com>
2440 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2441 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2442 parallel install API version, not with the D-BUS package version.
2444 * HACKING: move some of README over here
2446 * README: updates, and document API/ABI policy
2448 * configure.in: reindentation
2450 2003-04-29 Havoc Pennington <hp@redhat.com>
2452 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2453 to use this library" to be sure people have the right
2456 2003-04-28 Havoc Pennington <hp@redhat.com>
2458 * configure.in: add --enable-docs which by default is auto yes if
2459 doxygen and db2html found, no otherwise; but can be forced on/off
2461 * doc/Makefile.am: conditionalize whether to build docs on
2464 2003-04-28 Havoc Pennington <hp@redhat.com>
2466 * configure.in: 0.10
2470 * bus/system.conf.in: add <includedir>system.d</includedir>
2472 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2473 username was provided but not uid
2475 * bus/config-parser.c (struct BusConfigParser): keep track of
2476 whether the parser is toplevel or was included; change some
2477 of the error handling if it's included.
2479 2003-04-27 Havoc Pennington <hp@pobox.com>
2483 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2484 report correct status if we finish processing authentication
2485 inside this function.
2487 * bus/activation.c (try_send_activation_failure): use
2488 bus_transaction_send_error_reply
2490 * bus/connection.c (bus_connection_get_groups): return an error
2491 explaining the problem
2493 * bus/bus.c (bus_context_check_security_policy): implement
2494 restriction here that inactive connections can only send the
2495 hello message. Also, allow bus driver to send anything to
2498 * bus/connection.c (bus_connection_complete): create the
2499 BusClientPolicy here instead of on-demand.
2500 (bus_connection_get_policy): don't return an error
2502 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2503 sender field in message being replied to
2505 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2506 causing it to return FALSE always
2508 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2509 we checked sender rather than destination
2511 2003-04-25 Havoc Pennington <hp@redhat.com>
2513 test suite is slightly hosed at the moment, will fix soon
2515 * bus/connection.c (bus_connections_expire_incomplete): fix to
2516 properly disable the timeout when required
2517 (bus_connection_set_name): check whether we can remove incomplete
2518 connections timeout after we complete each connection.
2520 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2521 probably still broken.
2523 * bus/services.c (bus_registry_acquire_service): implement max
2524 number of services owned, and honor allow/deny rules on which
2525 services a connection can own.
2527 * bus/connection.c (bus_connection_get_policy): report errors here
2529 * bus/activation.c: implement limit on number of pending
2532 2003-04-25 Havoc Pennington <hp@redhat.com>
2534 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2535 where we used >= 0 instead of != DBUS_UID_UNSET.
2537 2003-04-25 Havoc Pennington <hp@redhat.com>
2539 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2540 were toggled without add/remove, fix from Anders Gustafsson
2542 2003-04-24 Havoc Pennington <hp@redhat.com>
2544 * test/data/valid-config-files/basic.conf: add <limit> tags to
2547 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2548 <limit> tag in configuration file.
2550 2003-04-24 Havoc Pennington <hp@redhat.com>
2552 * bus/dispatch.c: somehow missed some name_is
2554 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2555 (_dbus_timeout_set_interval): new
2557 * bus/connection.c (bus_connections_setup_connection): record time
2558 when each connection is first set up, and expire them after the
2559 auth timeout passes.
2561 2003-04-24 Havoc Pennington <hp@redhat.com>
2563 * dbus/dbus-message.c (dbus_message_name_is): rename
2564 (dbus_message_service_is): rename
2565 (dbus_message_sender_is): rename
2566 (dbus_message_get_service): rename
2568 2003-04-24 Havoc Pennington <hp@redhat.com>
2570 * configure.in: add --enable-checks
2572 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2574 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2575 to use thread locks.
2576 (_dbus_connection_handler_destroyed_locked): move some private
2577 functions into proper docs group
2579 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2580 _dbus_return_val_if_fail
2582 Throughout: use dbus_return_if_fail
2584 2003-04-23 James Willcox <jwillcox@gnome.org>
2587 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2588 (dbus_connection_setup_with_g_main),
2589 (dbus_server_setup_with_g_main):
2590 * glib/test-dbus-glib.c: (main):
2591 * glib/test-thread-client.c: (main):
2592 * glib/test-thread-server.c: (new_connection_callback), (main):
2593 * tools/dbus-monitor.c: (main):
2595 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2596 and dbus_server_setup_with_g_main().
2598 2003-04-20 Havoc Pennington <hp@pobox.com>
2600 * doc/dbus-specification.sgml: document the restrictions on
2601 message and service names
2603 2003-04-22 Havoc Pennington <hp@redhat.com>
2605 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2606 support, and do some code cleanups to share more code and
2607 speed up array marshal/demarshal.
2609 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2611 * configure.in: generate dbus-arch-deps.h
2613 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2616 2003-04-22 Havoc Pennington <hp@redhat.com>
2618 * test/data/valid-messages/opposite-endian.message: fix test
2619 to use proper type for rply field
2621 * test/data/invalid-messages: add tests for below validation
2623 * dbus/dbus-message.c (decode_header_data): validate field types,
2624 and validate that named fields are valid names
2625 (decode_name_field): consider messages in the
2626 org.freedesktop.Local. namespace to be invalid.
2628 * dbus/dbus-string.c (_dbus_string_validate_name): new
2630 2003-04-19 Havoc Pennington <hp@pobox.com>
2632 * bus/driver.c (bus_driver_handle_hello): check limits and
2633 return an error if they are exceeded.
2635 * bus/connection.c: maintain separate lists of active and inactive
2636 connections, and a count of each. Maintain count of completed
2637 connections per user. Implement code to check connection limits.
2639 * dbus/dbus-list.c (_dbus_list_unlink): export
2641 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2642 number of bytes in the message queue for a connection
2644 2003-04-18 Havoc Pennington <hp@pobox.com>
2646 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2648 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2651 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2652 on realloc be sure to update the pointer in the keyring
2654 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2655 offset to avoid writing to unallocated memory
2657 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2658 try the next mechanism, so we properly handle OOM
2660 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2662 (_dbus_keyring_new): fix OOM bug
2663 (_dbus_keyring_new_homedir): always set error; impose a maximum
2664 number of keys we'll load from the file, mostly to speed up the
2665 test suite and make its OOM checks more useful, but also for
2668 * dbus/dbus-auth.c (process_error_server): reject authentication
2669 if we get an error from the client
2670 (process_cancel): on cancel, send REJECTED, per the spec
2671 (process_error_client): send CANCEL if we get an error from the
2674 2003-04-18 Havoc Pennington <hp@pobox.com>
2676 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2679 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2682 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2683 about DBUS_TEST_HOMEDIR once
2685 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2688 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2689 config file so we test the right thing
2691 Throughout: assorted docs improvements
2693 2003-04-18 Havoc Pennington <hp@pobox.com>
2695 * glib/dbus-gmain.c: adapt to watch changes
2697 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2699 * dbus/dbus-server.h: remove dbus_server_handle_watch
2701 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2703 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2704 like DBusTimeout, so we don't need dbus_connection_handle_watch
2707 2003-04-17 Havoc Pennington <hp@redhat.com>
2709 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2710 database usage so it all goes via the DBusUserDatabase cache.
2712 2003-04-17 Havoc Pennington <hp@redhat.com>
2714 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2715 there was an OOM watch we skipped, we always return TRUE so we
2716 iterate again to have a look at it again. Fixes test suite hang.
2717 Code rearrangement also lets us lose some memset and only iterate
2718 over callbacks once.
2720 * bus/driver.c (bus_driver_handle_message): sense of test for
2723 2003-04-16 Havoc Pennington <hp@pobox.com>
2725 * doc/dbus-specification.sgml: make spec say serials are unsigned
2727 * dbus/dbus-message.h: change message serials to unsigned
2729 * dbus/dbus-connection.c: adapt to message serials being unsigned
2731 2003-04-15 Havoc Pennington <hp@pobox.com>
2733 * bus/bus.c: create and keep around a shared DBusUserDatabase
2736 * bus/connection.c (bus_connection_get_groups): don't cache
2737 groups for user in the connection object, since user database
2738 object now does that.
2740 2003-04-16 Havoc Pennington <hp@redhat.com>
2742 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2743 list of size counters
2744 (_dbus_message_loader_putback_message_link): put back a popped link
2746 * dbus/dbus-connection.c
2747 (dbus_connection_set_max_live_messages_size): rename
2749 (dbus_connection_get_outgoing_size): get size of outgoing
2751 (_dbus_connection_set_connection_counter): remove this cruft
2753 2003-04-14 Havoc Pennington <hp@redhat.com>
2755 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2756 caching, but at some point we might want to be able to use a
2759 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2760 SHA1 conf file to test the sha1 auth mechanism, since the regular
2761 test always uses EXTERNAL when available.
2764 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2765 add conf file that requires use of sha1 auth
2767 2003-04-13 Havoc Pennington <hp@pobox.com>
2769 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2770 from Philip Blundell to send messages and monitor them.
2772 2003-04-13 Havoc Pennington <hp@pobox.com>
2774 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2777 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2780 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2781 fix to only recover unused bytes if we're already authenticated
2782 (_dbus_transport_get_is_authenticated): fix to still mark us
2783 authenticated if there are unused bytes.
2785 * bus/dispatch.c: implement security policy checking
2787 * bus/connection.c (bus_transaction_send_from_driver): new
2789 * bus/bus.c (bus_context_check_security_policy): new
2791 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2792 now we just set the DBusError and it gets converted to an error
2795 * bus/connection.c (allow_user_function): enable code using actual
2796 data from the config file
2798 * bus/policy.c (list_allows_user): handle wildcard rules for
2799 user/group connection perms
2801 2003-04-13 Havoc Pennington <hp@pobox.com>
2803 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2805 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2807 * bus/policy.c (bus_policy_append_mandatory_rule)
2808 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2809 (bus_policy_append_group_rule): new functions
2811 2003-04-12 Havoc Pennington <hp@pobox.com>
2813 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2815 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2816 the pid/gid/uid, just for paranoia.
2818 * test/break-loader.c (randomly_do_n_things): find a byte
2819 containing a type code, and randomly change it to a different
2822 2003-04-12 Havoc Pennington <hp@pobox.com>
2824 * bus/policy.h: change BusPolicy to be the thing from the config
2825 file, and rename old BusPolicy to BusClientPolicy
2827 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2828 match change in how policy works
2830 * dbus/dbus-internals.h: mark assert_not_reached as
2831 __attribute((noreturn))__
2833 2003-04-11 Havoc Pennington <hp@redhat.com>
2835 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2836 the broadcast service. Use boolean return for ServiceExists.
2838 2003-04-11 Havoc Pennington <hp@redhat.com>
2840 * configure.in: add another directory to look for qt in.
2842 2003-04-11 Havoc Pennington <hp@redhat.com>
2844 * AUTHORS: add Colin Walters
2846 2003-04-11 Havoc Pennington <hp@redhat.com>
2852 2003-04-11 Havoc Pennington <hp@redhat.com>
2854 * bus/messagebus.in: remove pid file when stopping the
2855 message bus, since the bus won't have privileges to remove it
2858 2003-04-11 Havoc Pennington <hp@redhat.com>
2860 * bus/bus.c (bus_context_new): move credentials change after
2863 2003-04-11 Havoc Pennington <hp@pobox.com>
2865 * test/decode-gcov.c: add "below average functions" to the
2866 coverage report, and change how some of the code works.
2868 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2869 not in the coverage stats.
2871 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2872 couple places so running the test suite doesn't result in megaspam.
2874 2003-04-11 Havoc Pennington <hp@pobox.com>
2876 * bus/dispatch.c (check_existent_service_activation): accept a no
2877 memory error in a place we didn't before
2879 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2880 in case the first one failed," since the test suite is less
2883 2003-04-10 Havoc Pennington <hp@pobox.com>
2885 * bus/dispatch.c (check_segfault_service_activation): add test
2886 for launching an executable that just crashes.
2888 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2889 don't leave a million cores. We'll see how portable this is.
2891 2003-04-10 Havoc Pennington <hp@pobox.com>
2893 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2894 the possible parent failures before we fork, so that we don't
2895 fail to create a babysitter after creating the child.
2897 * bus/activation.c (bus_activation_activate_service): kill child
2898 if we don't successfully complete the activation.
2900 2003-04-10 Havoc Pennington <hp@redhat.com>
2902 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2903 the connection if it's disconnected
2905 * bus/activation.c (bus_activation_service_created): use new
2906 transaction features to roll back removal of pending activation if
2907 we don't successfully create the service after all. Don't remove
2908 pending activation if the function fails.
2910 * dbus/dbus-list.c (_dbus_list_insert_before_link)
2911 (_dbus_list_insert_after_link): new code to facilitate
2914 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2915 new functionality, so we can preallocate the ability to insert
2918 * bus/connection.c (bus_transaction_add_cancel_hook): new function
2919 allowing us to put custom hooks in a transaction to be used for
2920 cancelling said transaction
2922 * doc/dbus-specification.sgml: add some discussion of secondary
2923 service owners, and disallow zero-length service names
2925 * bus/services.c (bus_registry_acquire_service): new function,
2926 splits out part of bus_driver_handle_acquire_service() and fixes
2927 a bug where we didn't remove the service doing the acquiring
2928 from the secondary queue if we failed to remove the current owner
2929 from the front of the queue.
2931 2003-04-10 Alexander Larsson <alexl@redhat.com>
2933 * doc/dbus-specification.sgml:
2934 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2936 2003-04-10 Alexander Larsson <alexl@redhat.com>
2941 Added files to cvsignore
2943 * dbus/dbus-message.h:
2944 * dbus/dbus-message.c: (dbus_message_iter_get_named):
2945 Make get_named() take two out argument and return a boolean.
2946 (dbus_message_iter_get_args_valist):
2947 Update usage of get_named().
2948 (dbus_message_iter_append_byte):
2950 (dbus_message_iter_append_named)
2952 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2955 2003-04-10 Alexander Larsson <alexl@redhat.com>
2957 * dbus/dbus-marshal.[ch]:
2958 Add array_type_pos argument to _dbus_marshal_validate_arg.
2959 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2961 * dbus/dbus-message.[ch]:
2962 Multi-dimensional arrays have full type specification in the
2963 outermost array. Iter code re-arranged to handle this.
2964 Added some more iter tests.
2966 * doc/dbus-specification.sgml:
2969 Update new array encoding description.
2970 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2972 * test/data/invalid-messages/array-with-mixed-types.message:
2973 * test/data/valid-messages/array-of-array-of-uint32.message:
2974 Change to the new array format.
2976 * test/data/invalid-messages/too-short-dict.message:
2979 * test/data/valid-messages/recursive-types.message:
2980 Fix up and extend test.
2982 2003-04-10 Havoc Pennington <hp@pobox.com>
2984 * bus/dispatch.c: lots of fixes
2986 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2987 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2988 that was crack, broke the test service.
2990 * dbus/dbus-transport.c (_dbus_transport_open): fix error
2991 handling to avoid piling up errors if we get a failure on the
2994 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2995 pid in assertion failures.
2997 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2998 to some fixed size of file descriptor array. Don't return TRUE
2999 anytime a timeout exists, that led to lots of busy loop silliness
3002 2003-04-09 Havoc Pennington <hp@redhat.com>
3004 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3005 I'd checked this in earlier but hadn't.
3007 2003-04-09 Havoc Pennington <hp@redhat.com>
3009 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3010 the activation test (man this is getting old!)
3012 2003-04-09 Havoc Pennington <hp@redhat.com>
3014 * test/test-utils.c: use dispatch status function to fix this up
3016 * bus/connection.c (connection_watch_callback): don't dispatch
3018 (connection_timeout_callback): don't dispatch from here
3019 (bus_connections_setup_connection): set the dispatch status function
3020 (bus_connection_disconnected): unset it
3022 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3023 used to add a connection to be dispatched
3024 (_dbus_loop_iterate): do the dispatching at the end of each
3027 * dbus/dbus-connection.c
3028 (dbus_connection_set_dispatch_status_function): new function
3029 allowing us to fix up main loop usage
3030 (_dbus_connection_last_unref): free all the various function
3032 (dbus_connection_dispatch): call the DispatchStatusFunction
3033 whenever this function returns
3034 (dbus_connection_handle_watch): call DispatchStatusFunction
3035 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3036 (reply_handler_timeout): call DispatchStatusFunction
3037 (dbus_connection_flush): call DispatchStatusFunction
3039 2003-04-09 Havoc Pennington <hp@redhat.com>
3041 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3044 * bus/dispatch.c (check_service_activated): fix bug in test
3046 * dbus/dbus-mainloop.c (check_timeout): fix this up
3048 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3049 verbose output so we can sort out output from different processes,
3050 e.g. in the activation case.
3052 2003-04-08 Colin Walters <walters@gnu.org>
3054 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3056 (bus_context_new): Set it.
3057 (bus_context_unref): Use it to delete the pid file.
3059 2003-04-08 Havoc Pennington <hp@redhat.com>
3061 * test/data/invalid-messages/array-with-mixed-types.message:
3062 regression test that fails for the moment
3064 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3065 tests for convenience
3067 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3068 array of nil, it broke things.
3070 * test/data/invalid-messages/array-of-nil.message: regression test
3072 * test/data/valid-messages/array-of-array-of-uint32.message:
3073 happened to write this so added it to suite
3075 2003-04-08 Havoc Pennington <hp@redhat.com>
3077 * bus/driver.c (bus_driver_handle_acquire_service): init
3078 retval/reply before checking name
3080 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3081 recursion depth argument
3083 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3084 in the public struct for future extension
3086 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3089 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3092 * doc/dbus-specification.sgml: fix typo
3094 2003-04-08 Alexander Larsson <alexl@redhat.com>
3096 Implemented recursive types, named types and new-style iters
3099 * glib/test-thread-client.c: (thread_func):
3100 * glib/test-thread-server.c: (handle_test_message):
3101 * test/test-service.c: (handle_echo):
3110 * dbus/dbus-internals.c: (_dbus_type_to_string):
3111 Update for new types.
3113 * dbus/dbus-marshal.[ch]:
3114 Implement recursive types and the new marshalling format.
3115 Remove hardcoded dict marshalling.
3116 Marshal named types.
3118 * dbus/dbus-message-builder.c:
3120 Remove references to old types
3122 * dbus/dbus-message.[ch]:
3123 New non-refcounted iter API that supports recursive iters.
3124 Use iters for appending, including support for recursive
3126 Add byte and named type support.
3127 Update everything to new marshalling formats.
3128 Add tests for new API.
3130 * dbus/dbus-protocol.h:
3131 Remove old array types.
3132 Add types: BYTE, ARRAY, DICT, NAMED
3134 * dbus/dbus-string.c:
3135 * dbus/dbus-sysdeps.c:
3136 Make parse_double locale safe.
3138 * dbus/dbus-test-main.c:
3144 * doc/dbus-specification.sgml:
3147 * test/data/incomplete-messages/missing-body.message:
3148 * test/data/invalid-messages/bad-boolean.message:
3149 * test/data/invalid-messages/bad-boolean-array.message:
3150 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3151 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3152 * test/data/invalid-messages/too-short-dict.message:
3153 * test/data/valid-messages/dict-simple.message:
3154 * test/data/valid-messages/dict.message:
3155 * test/data/valid-messages/emptiness.message:
3156 * test/data/valid-messages/lots-of-arguments.message:
3157 * test/data/valid-messages/no-padding.message:
3158 * test/data/valid-messages/recursive-types.message:
3159 Add missing NAME fields
3160 Fix up dicts & arrays
3162 * test/data/invalid-messages/dict-with-nil-value.message:
3163 Removed, this is not invalid anymore.
3165 * test/data/valid-messages/recursive-types.message:
3166 Add new test for deeply recursive types.
3168 2003-04-07 Havoc Pennington <hp@pobox.com>
3170 * bus/driver.c (bus_driver_handle_acquire_service): return an
3171 error if you try to acquire a service that starts with ':'
3173 2003-04-07 Havoc Pennington <hp@redhat.com>
3175 * doc/dbus-specification.sgml: require that base service names
3176 start with ':' and that the base service is created/deleted
3177 as first and last things a connection does on the bus
3179 * bus/dispatch.c (check_existent_service_activation): lots more
3180 work on the activation test; it doesn't fully pass yet...
3182 * test/test-service.c (main): fix so we don't memleak the
3183 connection to the message bus
3184 (filter_func): accept a message asking us to exit
3186 2003-04-06 Havoc Pennington <hp@pobox.com>
3188 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3191 * configure.in: fixes to Qt detection from Colin Walters
3193 * doc/Makefile.am: Only remove generated docbook dirs if they
3194 exist, from Colin Walters
3196 * dbus/dbus-bus.c: change how we set well-known connections to
3197 NULL, so that it works if a single connection is stored in
3198 two well-known array slots.
3200 * test/Makefile.am: remove a lot of stuff that isn't immediately
3201 useful, it's in CVS history if we want it.
3203 * test/test-service.c: use dbus-mainloop instead of that
3206 2003-04-06 Havoc Pennington <hp@pobox.com>
3208 * dbus/Makefile.am: split lists of sources into stuff that goes in
3209 the library, util functions that go in the lib and are also used
3210 elsewhere, and util functions that are used in tests/daemon but
3211 don't go in the lib.
3213 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3214 here so it can be used in test binaries also
3216 2003-04-06 Havoc Pennington <hp@pobox.com>
3218 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3219 here in the parent process, so we can return an error if it
3220 fails. Also, move some of the code into the child so the parent
3221 is less hosed if we fail midway through.
3223 * bus/bus.c (bus_context_new): move pidfile detection further up
3224 in the function, before we start overwriting sockets and such.
3226 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3228 * configure.in: add --with-system-pid-file and --with-system-socket
3230 2003-04-06 Colin Walters <walters@verbum.org>
3232 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3234 * bus/system.conf.in: Declare a pidfile.
3236 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3237 create one (if appropriate).
3239 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3240 (struct BusConfigParser) [pidfile]: New.
3241 (element_type_to_name, merge_included, start_busconfig_child)
3242 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3243 (bus_config_parser_unref): Free it.
3244 (bus_config_parser_get_pidfile): New function.
3246 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3248 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3250 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3252 * dbus/dbus-sysdeps.h: Prototype it.
3254 2003-04-06 Havoc Pennington <hp@pobox.com>
3256 * bus/bus.c (bus_context_new): print the address in here, rather
3257 than in main(), because we need to do it before forking the daemon
3259 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3260 on the service nonexistent error
3262 * bus/driver.c (bus_driver_handle_acquire_service): set the
3263 sender on the AcquireService reply
3265 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3266 server also listen on a UNIX socket so services can connect to it.
3268 2003-04-06 Havoc Pennington <hp@pobox.com>
3270 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3271 so it detects deadlocks and also we actually init threads when
3274 2003-04-06 Havoc Pennington <hp@pobox.com>
3276 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3277 save the domain socket name, and unlink it when we disconnect the
3278 server. Means that at least when we exit normally, we won't leave
3279 a bunch of junk in /tmp
3281 * dbus/dbus-transport-unix.c
3282 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3283 memory management). (I was making a real change here but then
3286 2003-04-06 Havoc Pennington <hp@pobox.com>
3288 * bus/bus.c (bus_context_new): fix wrong handling of
3289 server_data_slot_unref() in the error case.
3291 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3292 "(condition) != 0" to _dbus_real_assert so that
3293 "_dbus_assert (pointer)" doesn't cause a warning
3295 * bus/main.c (main): accept --print-address option to print out
3296 the message bus address
3298 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3300 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3301 "tmpdir" option to unix: address on client side
3303 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3306 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3307 we can use to create sockets in the test suite.
3309 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3310 cleanly. To be used for testing.
3312 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3314 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3316 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3317 handle trying to call this when there's no servers active
3319 2003-04-05 Havoc Pennington <hp@pobox.com>
3325 2003-04-05 Havoc Pennington <hp@pobox.com>
3327 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3328 crash on startup. Need to get "try starting the daemon"
3329 in the test suite I guess. ;-)
3331 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3332 tracked the number of open connections; it's better done in
3333 application-specific code as you want it to span all servers etc.
3335 2003-04-05 Havoc Pennington <hp@pobox.com>
3337 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3338 patch from Colin Walters
3340 2003-04-05 Havoc Pennington <hp@pobox.com>
3342 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3343 reality; in fact multiple mechanisms are allowed.
3345 * dbus/dbus-internals.c (_dbus_real_assert)
3346 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3347 _dbus_assert_not_reached() into functions, so that they don't show
3348 up in basic block counts for test coverage, and don't use up as
3349 much disk space. Does mean slower execution speed though, so
3350 assumes --disable-asserts is the normal production case.
3352 2003-04-05 Havoc Pennington <hp@pobox.com>
3354 * test/Makefile.am (dist-hook): also dist *.in files
3360 2003-04-05 Havoc Pennington <hp@pobox.com>
3362 * dbus/dbus-string.c: docs warning
3364 * dbus/dbus-spawn.c: missing docs
3366 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3368 2003-04-05 Havoc Pennington <hp@pobox.com>
3370 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3373 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3374 to -1 once we've reaped the babysitter
3375 (_dbus_babysitter_handle_watch): do as much work as we can, not
3378 * bus/activation.c: add code using DBusBabysitter so that we
3379 handle it when a service fails to start up properly.
3380 (bus_activation_service_created): don't remove the activation
3381 entries as we go, just let them get removed when we free the pending
3382 activation. Unref reply messages after sending them.
3384 2003-04-05 Havoc Pennington <hp@pobox.com>
3386 * test/decode-gcov.c (main): print per-directory stats in the report
3388 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3390 2003-04-05 Havoc Pennington <hp@pobox.com>
3392 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3394 * test/decode-gcov.c: hack up a little program to suck data
3395 out of gcov files. Yes this is sort of silly.
3397 * configure.in: define something in config.h and do an
3398 AM_CONDITIONAL when gcov is enabled
3400 2003-04-04 Havoc Pennington <hp@redhat.com>
3402 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3403 return a "babysitter" object that is used to monitor the status of
3404 the spawned process and reap it when required.
3406 * test/test-segfault.c, test/test-exit.c,
3407 test/test-sleep-forever.c: binaries that do various lame things,
3408 used in the test suite.
3410 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3412 2003-04-03 Havoc Pennington <hp@pobox.com>
3414 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3415 in preparation for modifying it, dbus-sysdeps is getting
3418 2003-04-03 Havoc Pennington <hp@redhat.com>
3420 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3423 * bus/*.[hc]: adapt to mainloop change
3425 2003-04-03 Havoc Pennington <hp@redhat.com>
3427 * bus/activation.c (load_directory): fix up memleaks
3428 (bus_activation_entry_free): free the entry
3430 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3431 we get one from the message bus; fix memleaks.
3433 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3435 2003-04-03 Havoc Pennington <hp@pobox.com>
3437 * bus/config-parser.c (bus_config_parser_unref): free
3438 list of mechanisms, bug discovered by test suite enhancements
3439 (putting system.conf and session.conf into suite)
3441 * test/Makefile.am, test/test-service.c: add placeholder for a
3442 test service that we'll activate as part of test suite. Doesn't
3445 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3446 setting NULL value, and use system malloc not dbus_malloc()
3447 when we have unavoidable memleakage.
3449 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3450 didn't work, and support DBUS_BUS_ACTIVATION.
3452 * bus/activation.c (child_setup): pass our well-known bus type to
3455 * bus/config-parser.c: support <type> to specify well-known type
3457 * doc/dbus-specification.sgml: document the env variables to
3458 locate well-known buses and find service activator
3460 2003-04-02 Havoc Pennington <hp@redhat.com>
3462 * test/Makefile.am (all-local): add a rule to copy tests to
3463 builddir, so we can have generated tests. Use this to remove the
3464 silly hack for testing system.conf and session.conf. Will use this
3465 shortly to generate .service files pointing to test binaries.
3467 2003-04-02 Havoc Pennington <hp@redhat.com>
3469 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3470 current alloc and needed new length, not max of the doubled
3471 allocation and needed new length. Also, when building tests,
3472 don't do the double-allocation stuff, just realloc every time.
3474 2003-04-02 Havoc Pennington <hp@redhat.com>
3476 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3478 (_dbus_string_get_dirname): new
3479 (_dbus_sysdeps_test): new
3480 (_dbus_directory_open): include dirnames in error messages
3482 * bus/config-parser.c: interpret <include> and <includedir> and
3483 <servicedir> relative to config file location if the given
3484 filename is not absolute.
3486 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3488 2003-04-02 Havoc Pennington <hp@redhat.com>
3490 * bus/connection.c (bus_transaction_send_error_reply): set sender
3491 service for the error, and unref the reply on success
3493 * bus/activation.c: convert to use BusTransaction so OOM can be
3495 (bus_activation_service_created): set sender of the message
3497 2003-04-01 Havoc Pennington <hp@redhat.com>
3499 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3500 <includedir> (at least mostly)
3502 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3503 first, then the user ID
3505 2003-04-01 Havoc Pennington <hp@pobox.com>
3507 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3510 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3512 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3514 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3515 socket 0777, and unlink any existing socket.
3517 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3518 the configuration file so specifies; set up auth mechanism
3521 * bus/config-parser.c (bus_config_parser_content): add support
3522 for <fork> option and fill in code for <auth>
3524 * bus/system.conf.in: add <fork/> to default configuration,
3525 and limit auth mechanisms to EXTERNAL
3527 * doc/config-file.txt (Elements): add <fork>
3529 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3530 (_dbus_change_identity): new function
3532 2003-03-31 Havoc Pennington <hp@redhat.com>
3534 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3535 (_dbus_listen_unix_socket): fix off-by-one error in null
3536 termination spotted by Nalin
3538 2003-03-31 Havoc Pennington <hp@redhat.com>
3540 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3541 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3542 having a real home directory available.
3544 2003-03-31 Havoc Pennington <hp@redhat.com>
3546 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3548 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3550 * configure.in: add support for specifying a style of init script
3553 2003-03-31 Havoc Pennington <hp@redhat.com>
3555 Fix some annoying DBusString API and fix all affected code.
3557 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3559 (_dbus_string_get_data): change to return string instead of using
3561 (_dbus_string_get_const_data): ditto
3562 (_dbus_string_get_data_len): ditto
3563 (_dbus_string_get_const_data_len): ditto
3565 2003-03-31 Havoc Pennington <hp@redhat.com>
3567 * bus/main.c (main): fix up the command line arguments to be nicer
3569 2003-03-31 Havoc Pennington <hp@redhat.com>
3571 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3572 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3573 final location that lands in the config file
3575 * bus/config-loader-expat.c (bus_config_load): fix type of
3578 * doc/TODO: remove TODO item for dbus_bus_get()
3580 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3582 2003-03-31 Havoc Pennington <hp@pobox.com>
3584 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3585 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3586 argument since they are always client side
3588 * dbus/dbus-server.c (dbus_server_get_address): new function
3590 * bus/main.c (main): take the configuration file as an argument.
3592 * test/data/valid-config-files/debug-allow-all.conf: new file to
3593 use with dispatch.c tests for example
3595 * bus/test-main.c (main): require test data dir
3597 * bus/bus.c (bus_context_new): change this to take a
3598 configuration file name as argument
3600 * doc/config-file.txt (Elements): add <servicedir>
3602 * bus/system.conf, bus/session.conf: new files
3604 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3605 well-known socket if none set
3607 * configure.in: create system.conf and session.conf
3609 2003-03-30 Havoc Pennington <hp@pobox.com>
3611 * bus/config-parser.c: hacking
3613 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3614 to shut down, since it could cause weirdness with the DBusList
3617 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3618 link-oriented stack routines
3619 (alloc_link): free the mempool if the first alloc from it fails
3621 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3623 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3625 (_dbus_string_skip_white): new
3627 * doc/config-file.txt (Elements): add <includedir>
3629 2003-03-28 Havoc Pennington <hp@pobox.com>
3631 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3632 (_dbus_string_copy_data): new functions
3634 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3636 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3640 * dbus/dbus-memory.c:
3643 2003-03-28 Havoc Pennington <hp@pobox.com>
3645 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3646 I think it may have just been superstition. Not sure.
3648 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3649 failures that were not being handled.
3651 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3653 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3654 row that will fail on out-of-memory.
3656 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3657 function for testing out-of-memory handling.
3659 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3660 allocation functions, they do map exactly to the expat ones.
3662 2003-03-27 Havoc Pennington <hp@redhat.com>
3664 * bus/config-loader-libxml.c (bus_config_load): add another error
3667 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3670 Add note about automatic service activation.
3672 * doc/dbus-specification.sgml:
3673 Rename the specification and clarify a few things.
3675 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3678 * dbus/dbus-address.c:
3680 * dbus/dbus-marshal.c:
3681 * dbus/dbus-server-debug-pipe.c:
3682 * dbus/dbus-transport-unix.c:
3683 Fix documentation warnings.
3685 2003-03-26 Havoc Pennington <hp@pobox.com>
3687 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3688 after every test so it's quick and easy to see which leaked, and
3689 so we test multiple dbus_shutdown() calls
3691 * configure.in: change configure.in XML stuff to also support
3694 * config-loader-libxml.c: some hacking
3696 * config-loader-expat.c: some hacking
3698 * config-parser.c: some hacking, plus tests
3700 2003-03-25 Havoc Pennington <hp@redhat.com>
3702 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3704 * configure.in: add --with-xml option to specify XML library,
3705 right now only libxml is supported.
3707 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3708 nonworking code between home and work, still just stubs
3710 2003-03-24 Havoc Pennington <hp@redhat.com>
3712 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3715 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3716 NULL argument for "message" if the error is a well-known one,
3717 fill in a generic message in this case.
3719 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3722 * bus/test.c (bus_test_flush_bus): add
3724 * bus/policy.c (bus_policy_test): test code stub
3726 2003-03-24 Havoc Pennington <hp@pobox.com>
3728 * bus/connection.c (bus_connections_setup_connection): set up
3729 the "can this user connect" function, but it always returns
3730 TRUE until we have a config file parser so we can have a config
3731 file that allows connections.
3733 2003-03-23 Havoc Pennington <hp@pobox.com>
3735 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3736 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3737 the mutex, so we can check for proper memory management
3740 * dbus/dbus-dataslot.c: remove the mutex from
3741 DBusDataSlotAllocator and lock it manually when using it,
3742 to simplify fitting it into the global slots framework.
3744 * dbus/dbus-threads.c (init_static_locks): rework how we're
3745 handling global locks so they are easily shut down.
3747 * bus/policy.c (bus_policy_append_rule): fix
3749 * bus/test-main.c (main): check for memleaks
3751 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3752 test suite check for memleaks
3754 * dbus/dbus-memory.c: add support in test mode for tracking
3755 number of outstanding blocks
3757 2003-03-23 Havoc Pennington <hp@pobox.com>
3759 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3762 * dbus/dbus-hash.h: add ULONG hash keys
3764 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3765 (_dbus_get_group_id): new function
3767 2003-03-20 Havoc Pennington <hp@redhat.com>
3769 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3771 (dbus_connection_get_unix_user): new function
3773 2003-03-20 Havoc Pennington <hp@pobox.com>
3775 * bus/connection.c (bus_connection_send_oom_error): assert that
3776 message has a sender
3777 (connection_execute_transaction): ditto
3778 (bus_connection_preallocate_oom_error): fix to set the sender, and
3779 set recipient to the destination service, not the bus driver
3781 * bus/policy.c: hacking
3783 * dbus/dbus-message.c (dbus_message_service_is): new function
3784 (dbus_message_sender_is): new
3786 2003-03-19 Havoc Pennington <hp@redhat.com>
3788 * bus/policy.c: start sketching code for policy restrictions on
3789 what connections can do.
3791 2003-03-18 Havoc Pennington <hp@redhat.com>
3793 * doc/TODO: some notes on high-level todo items. Little nitpick
3794 stuff is all in @todo, so no need to add it here.
3796 * doc/config-file.txt: some notes on how config file might look
3798 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3804 2003-03-17 Havoc Pennington <hp@redhat.com>
3806 * dbus/dbus-internals.h: add gcc attributes so that
3807 our printf-style functions warn on bad arguments to
3810 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3813 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3816 2003-03-17 Havoc Pennington <hp@redhat.com>
3818 * bus/test-main.c (main): make it print something as it runs
3819 so make check doesn't look stuck
3821 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3822 from CVS, now obsolete
3824 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3826 * bus/dispatch.c: (bus_dispatch):
3827 Refetch the service name since it may have been reallocated
3828 when dbus_message_set_sender was called.
3830 * dbus/dbus-sysdeps.c: (_dbus_accept):
3831 Add address and address length variables and use them to stop
3832 valgrind from complaining.
3834 2003-03-17 Havoc Pennington <hp@pobox.com>
3836 All tests pass, no memleaks, no valgrind complaints.
3838 * bus/test.c: refcount handler_slot
3840 * bus/connection.c (bus_connections_new): refcount
3841 connection_data_slot
3843 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3844 bytes so that auth scripts pass.
3846 * bus/dispatch.c: init message_handler_slot so it gets allocated
3849 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3851 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3852 dealloc server_pipe_hash when no longer used for benefit of
3855 * dbus/dbus-auth.c (process_command): memleak fix
3857 * bus/dispatch.c (check_hello_message): memleak fix
3859 2003-03-16 Havoc Pennington <hp@pobox.com>
3861 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3863 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3865 * bus/activation.c (bus_activation_activate_service): Append
3866 the pending activation entry to the list of pending activations.
3868 2003-03-16 Havoc Pennington <hp@pobox.com>
3870 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3873 * dbus/dbus-address.c (create_entry): fix OOM handling when
3874 failing to alloc entry->method
3876 2003-03-16 Havoc Pennington <hp@pobox.com>
3878 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3881 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3882 add some missing dbus_set_result
3884 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3885 alloc the DBusMessageHandler
3887 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3888 the transport here, since we call this from the finalizer; it
3889 resulted in a double-finalize.
3891 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3892 where we tried to use transport->connection that was NULL,
3893 happened when transport was disconnected early on due to OOM
3895 * bus/*.c: adapt to handle OOM for watches/timeouts
3897 * dbus/dbus-transport-unix.c: port to handle OOM during
3900 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3901 reference to unused bytes instead of a copy
3903 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3906 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3909 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3912 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3914 * doc/dbus-specification.sgml:
3915 Document reply message for ActivateService.
3917 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3919 * bus/activation.c: (bus_pending_activation_entry_free),
3920 (bus_pending_activation_free), (bus_activation_new),
3921 (bus_activation_unref), (bus_activation_service_created),
3922 (bus_activation_activate_service):
3924 * bus/bus.c: (bus_context_new):
3925 * bus/desktop-file.c: (new_section):
3926 * bus/driver.c: (bus_driver_send_service_deleted),
3927 (bus_driver_handle_activate_service):
3928 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3930 * dbus/dbus-connection.c:
3931 (dbus_connection_send_with_reply_and_block):
3932 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3933 * dbus/dbus-protocol.h:
3934 Make activation work better. Now pending activations will be queued
3935 and the daemon won't try to activate services that are already registered.
3937 2003-03-16 Havoc Pennington <hp@pobox.com>
3939 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3942 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3943 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3945 2003-03-16 Havoc Pennington <hp@pobox.com>
3947 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3948 this. always run the test suite before commit...
3950 * bus/*: adapt to DBusConnection API changes
3952 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3953 requires renaming stuff to avoid dbus_connection_dispatch name
3956 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3959 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3960 separate from _dbus_message_loader_return_buffer()
3962 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3963 this, because it's now always broken to use; the number of
3964 messages in queue vs. the number still buffered by the message
3965 loader is undefined/meaningless. Should use
3966 dbus_connection_get_dispatch_state().
3967 (dbus_connection_dispatch): rename from
3968 dbus_connection_dispatch_message
3970 2003-03-16 Havoc Pennington <hp@pobox.com>
3972 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3975 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3977 * dbus/dbus-connection.c:
3978 (dbus_connection_send_with_reply_and_block):
3979 Decrease connection->n_incoming when removing an entry
3981 * dbus/dbus-dict.c: (dbus_dict_entry_free),
3982 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3983 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3984 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3985 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3986 (dbus_dict_get_byte_array):
3987 Handle NULL arrays and strings. Also add support for byte arrays.
3989 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3990 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3991 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3992 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3993 (_dbus_demarshal_dict), (demarshal_and_validate_len),
3994 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3995 * dbus/dbus-marshal.h:
3996 Add support for marshalling and demarshalling empty arrays and strings.
3998 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3999 (dbus_message_append_string_array),
4000 (dbus_message_iter_get_boolean),
4001 (dbus_message_iter_get_boolean_array),
4002 (dbus_message_iter_get_int32_array),
4003 (dbus_message_iter_get_uint32_array),
4004 (dbus_message_iter_get_double_array),
4005 (dbus_message_iter_get_byte_array),
4006 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4007 (check_message_handling):
4008 Add support for getting empty arrays and dicts.
4010 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4011 Don't do any validation at all for now, that's better than just checking
4014 * test/data/valid-messages/emptiness.message:
4015 New test message with lots of empty arrays.
4017 2003-03-16 Havoc Pennington <hp@pobox.com>
4019 * dbus/dbus-connection.c
4020 (_dbus_connection_queue_received_message_link): new function that
4021 can't fail due to OOM
4023 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4024 new function pops a message together with a list link
4027 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4028 message queuing functions to avoid needing to alloc memory
4030 2003-03-16 Havoc Pennington <hp@pobox.com>
4032 Oops - test code was only testing failure of around 30 of the
4033 mallocs in the test path, but it turns out there are 500+
4034 mallocs. I believe this was due to misguided linking setup such
4035 that there was one copy of dbus_malloc etc. in the daemon and one
4036 in the shared lib, and only daemon mallocs were tested. In any
4037 case, the test case now tests all 500+ mallocs, and doesn't pass
4038 yet, though there are lots of fixes in this patch.
4040 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4041 this so that it doesn't need to allocate memory, since it
4042 has no way of indicating failure due to OOM (and would be
4043 annoying if it did).
4045 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4047 * bus/Makefile.am: rearrange to create two self-contained
4048 libraries, to avoid having libraries with overlapping symbols.
4049 that was resulting in weirdness, e.g. I'm pretty sure there
4050 were two copies of global static variables.
4052 * dbus/dbus-internals.c: move the malloc debug stuff to
4055 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4058 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4060 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4063 * bus/dispatch.c (bus_dispatch_add_connection): free
4064 message_handler_slot when no longer using it, so
4065 memory leak checkers are happy for the test suite.
4067 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4069 * bus/bus.c (new_connection_callback): disconnect in here if
4070 bus_connections_setup_connection fails.
4072 * bus/connection.c (bus_connections_unref): fix to free the
4074 (bus_connections_setup_connection): if this fails, don't
4075 disconnect the connection, just be sure there are no side
4078 * dbus/dbus-string.c (undo_alignment): unbreak this
4080 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4082 (_dbus_auth_new): fix the order in which we free strings
4085 * bus/connection.c (bus_connection_disconnected): fix to
4086 not send ServiceDeleted multiple times in case of memory
4089 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4090 get the base service name
4091 (dbus_bus_register_client): don't return base service name,
4092 instead store it on the DBusConnection and have an accessor
4094 (dbus_bus_register_client): rename dbus_bus_register()
4096 * bus/dispatch.c (check_hello_message): verify that other
4097 connections on the bus also got the correct results, not
4098 just the one sending hello
4100 2003-03-15 Havoc Pennington <hp@pobox.com>
4102 Make it pass the Hello handling test including all OOM codepaths.
4103 Now to do other messages...
4105 * bus/services.c (bus_service_remove_owner): fix crash when
4106 removing owner from an empty list of owners
4107 (bus_registry_ensure): don't leave service in the list of
4108 a connection's owned services if we fail to put the service
4111 * bus/connection.c (bus_connection_preallocate_oom_error): set
4112 error flag on the OOM error.
4114 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4115 handle _dbus_transport_set_connection failure
4117 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4118 to create watches up front and simply enable/disable them as
4120 (unix_connection_set): this can now fail on OOM
4122 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4123 of enabling/disabling a watch or timeout.
4125 * bus/loop.c (bus_loop_iterate): don't touch disabled
4128 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4130 2003-03-15 Havoc Pennington <hp@pobox.com>
4132 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4133 write useful test code, after all that futzing around ;-)
4135 Test does not yet pass because we can't handle OOM in
4136 _dbus_transport_messages_pending (basically,
4137 dbus_connection_preallocate_send() does not prealloc the write
4138 watch). To fix this, I think we need to add new stuff to
4139 set_watch_functions, namely a SetEnabled function so we can alloc
4140 the watch earlier, then enable it later.
4142 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4143 dbus-memory.c to the convenience lib
4145 * bus/test.c: rename some static functions to keep them clearly
4146 distinct from stuff in connection.c. Handle client disconnection.
4148 2003-03-14 Havoc Pennington <hp@pobox.com>
4150 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4151 transport, tests more of the real codepath. Set up clients
4152 with bus_setup_debug_client.
4154 * bus/test.c (bus_setup_debug_client): function to set up debug
4155 "clients" on the main loop
4157 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4160 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4163 * dbus/dbus-server-debug.c: support a debug server based on pipes
4165 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4166 (_dbus_close): new function
4168 * configure.in: check for socketpair
4170 2003-03-14 Havoc Pennington <hp@redhat.com>
4172 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4175 * dbus/dbus-transport-debug.c: rework this a good bit to be
4176 less complicated. hopefully still works.
4178 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4181 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4184 * dbus/dbus-message.c (dbus_message_copy): rename from
4185 dbus_message_new_from_message, fix it up to copy
4186 all the message fields, add test case
4188 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4189 not quite passing yet
4191 2003-03-14 Havoc Pennington <hp@pobox.com>
4193 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4194 until no work remains" in test code. (the large diff here
4195 is just code movement, no actual changes)
4197 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4198 1, no point waiting around for test code.
4199 (_dbus_server_debug_accept_transport): unref the timeout
4200 after adding it (right?)
4202 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4204 2003-03-13 Havoc Pennington <hp@redhat.com>
4206 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4209 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4212 * dbus/dbus-connection.h: Make AddWatchFunction and
4213 AddTimeoutFunction return a bool so they can fail on out-of-memory
4215 * bus/bus.c (bus_context_new): set up timeout handlers
4217 * bus/connection.c (bus_connections_setup_connection): set up
4220 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4223 * bus/bus.c (bus_context_new): adapt to changes
4225 * bus/connection.c: adapt to changes
4227 * test/watch.c: adapt to DBusWatch changes
4229 * bus/dispatch.c (bus_dispatch_test): started adding this but
4232 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4234 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4236 2003-03-13 Havoc Pennington <hp@pobox.com>
4238 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4239 set up a test framework as for the library
4241 2003-03-12 Havoc Pennington <hp@pobox.com>
4243 Throughout: purge global variables, introduce BusActivation,
4244 BusConnections, BusRegistry, etc. objects instead.
4246 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4249 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4250 going to redo this a bit differently I think
4252 2003-03-12 Havoc Pennington <hp@redhat.com>
4254 Mega-patch that gets the message bus daemon initially handling
4255 out-of-memory. Work still needed. Also lots of random
4256 moving stuff to DBusError instead of ResultCode.
4258 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4260 * dbus/dbus-connection.c
4261 (dbus_connection_send_with_reply_and_block): use DBusError
4263 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4266 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4267 code here, as the only failure possible is OOM.
4269 * bus/connection.c (bus_connection_disconnect):
4270 rename bus_connection_disconnected as it's a notification only
4272 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4273 "name" on get_args failure, should be done by get_args;
4274 don't disconnect client for bad args, just return an error.
4275 (bus_driver_handle_service_exists): ditto
4277 * bus/services.c (bus_services_list): NULL-terminate returned array
4279 * bus/driver.c (bus_driver_send_service_lost)
4280 (bus_driver_send_service_acquired): send messages from driver to a
4281 specific client to the client's unique name, not to the broadcast
4284 * dbus/dbus-message.c (decode_header_data): reject messages that
4285 contain no name field
4286 (_dbus_message_get_client_serial): rename to
4287 dbus_message_get_serial and make public
4288 (_dbus_message_set_serial): rename from set_client_serial
4289 (_dbus_message_set_reply_serial): make public
4290 (_dbus_message_get_reply_serial): make public
4292 * bus/connection.c (bus_connection_foreach): allow stopping
4293 iteration by returning FALSE from foreach function.
4295 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4296 (dbus_connection_free_preallocated_send)
4297 (dbus_connection_preallocate_send): new API for sending a message
4298 without possibility of malloc failure.
4299 (dbus_connection_send_message): rename to just
4300 dbus_connection_send (and same for whole function family)
4302 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4304 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4306 * bus/activation.c: handle/return errors
4308 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4310 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4311 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4312 (_dbus_result_from_errno): move to this file
4314 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4316 * dbus/dbus-marshal.c:
4317 (_dbus_marshal_set_string):
4318 Take a length argument so we can marshal the correct string
4321 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4322 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4323 (_dbus_marshal_test):
4324 * dbus/dbus-marshal.h:
4325 Add support for marshalling and demarshalling dicts.
4327 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4328 Add support for TYPE DICT.
4330 * dbus/dbus-message.c: (set_string_field):
4331 Adjust header padding.
4333 (dbus_message_append_args_valist), (dbus_message_append_dict),
4334 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4335 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4336 (check_message_handling), (check_have_valid_message):
4337 * dbus/dbus-message.h:
4338 Add functions for setting and getting dicts.
4340 * dbus/dbus-protocol.h:
4346 * doc/dbus-specification.sgml:
4347 Add information about how dicts are marshalled.
4349 * test/data/invalid-messages/dict-with-nil-value.message:
4350 * test/data/invalid-messages/too-short-dict.message:
4351 * test/data/valid-messages/dict-simple.message:
4352 * test/data/valid-messages/dict.message:
4353 Add sample messages containing dicts.
4355 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4357 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4359 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4362 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4363 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4364 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4365 (dbus_dict_set_double), (dbus_dict_set_string),
4366 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4367 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4368 (dbus_dict_set_string_array), (_dbus_dict_test):
4370 Fix according to comments from Havoc.
4372 2003-03-06 Michael Meeks <michael@server.home>
4374 * configure.in: if we don't have kde-config, disable have_qt.
4376 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4381 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4382 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4383 (dbus_dict_remove), (dbus_dict_get_value_type),
4384 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4385 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4386 (dbus_dict_put_double), (dbus_dict_put_string),
4387 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4388 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4389 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4390 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4391 (dbus_dict_get_double), (dbus_dict_get_string),
4392 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4393 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4394 (dbus_dict_get_string_array), (_dbus_dict_test):
4396 Add DBusDict implementation
4398 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4402 2003-03-04 Havoc Pennington <hp@pobox.com>
4404 * test/data/auth/*: adapt to changes
4406 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4407 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4410 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4411 more stuff from being in a context name, to make the protocol
4412 simpler to deal with
4414 * dbus/dbus-errors.c (dbus_error_has_name): new function
4415 (dbus_error_is_set): new function
4417 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4418 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4420 * dbus/dbus-connection.c (dbus_connection_flush): also read
4421 messages during a flush operation
4423 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4425 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4427 * configure.in: Check for gethostbyname on Solaris.
4429 * dbus/dbus-transport.c: (_dbus_transport_open):
4430 Remove duplicate "tcp" entry.
4432 * doc/dbus-specification.sgml:
4433 Clarify some things.
4435 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4437 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4438 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4439 (_dbus_keyring_test):
4440 * dbus/dbus-md5.c: (_dbus_md5_compute):
4441 * dbus/dbus-sha.c: (_dbus_sha_compute):
4444 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4446 * README: Add some things.
4448 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4450 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4451 after case DBUS_TYPE_BOOELAN.
4453 2003-03-02 Havoc Pennington <hp@pobox.com>
4455 * test/break-loader.c (randomly_set_extreme_ints): add test that
4456 sets really huge and small integers
4458 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4459 that length of boolean array fits in the string, and that
4460 string has room for boolean value in single-bool case.
4462 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4463 optional value to "ALIGN" command which is what to fill the
4466 * test/data/valid-messages/no-padding.message: add regression
4467 test for the message padding problem
4469 2003-03-02 Havoc Pennington <hp@pobox.com>
4471 * dbus/dbus-message.c (decode_header_data): fix to always init
4472 message_padding, from Benjamin Dauvergne
4474 2003-03-02 Havoc Pennington <hp@pobox.com>
4480 2003-03-01 Joe Shaw <joe@assbarn.com>
4482 * configure.in: Check for "struct cmsgcred" and try to access its
4483 members for BSD-like unices.
4485 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4486 _dbus_read_credentials_unix_socket().
4487 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4488 read() for reading the credential byte off the unix socket. Use
4489 struct cmsgcred on systems that support it.
4491 2003-02-27 Alexander Larsson <alexl@redhat.com>
4495 Make gthreads-2.0 dependency optional. Don't build thread test if
4498 2003-02-27 Havoc Pennington <hp@pobox.com>
4500 * dbus/dbus-connection.c
4501 (dbus_connection_send_message_with_reply_and_block): fix doh!
4502 doh! doh! bug that resulted in never removing a reply from the
4503 queue, no wonder we called get_reply_serial so much ;-)
4505 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4506 and client serial instead of demarshaling them every time
4508 2003-02-27 Havoc Pennington <hp@pobox.com>
4510 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4511 more inlined, using dbus-string-private.h, speeds things up
4514 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4515 when freeing the string
4516 (_dbus_string_steal_data): fix for align offset
4517 (undo_alignment): new function
4519 2003-02-26 Havoc Pennington <hp@redhat.com>
4521 All kinds of audit fixes from Owen, plus initial attempt to
4522 handle unaligned memory returned from malloc.
4524 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4525 leave room for align_offset and nul byte
4526 (fixup_alignment): function to track an align_offset and
4527 ensure real->str is aligned
4528 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4529 to allow a nul byte plus align offset
4530 (_dbus_string_lock): fix overflow issue
4531 (_dbus_string_init_const_len): add assertions on sanity of len,
4532 assign allocated to be ALLOCATION_PADDING larger than len
4533 (set_length): fixup the overflow handling
4534 (_dbus_string_get_data_len): fix overflow in assertion
4535 (open_gap): detect overflow in size of gap to be opened
4536 (_dbus_string_lengthen): add overflow check
4537 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4538 (_dbus_string_append): add overflow check
4539 (_dbus_string_append_unichar): overflow
4540 (_dbus_string_delete): fix overflow in assertion
4541 (_dbus_string_copy_len): overflow in assertion
4542 (_dbus_string_replace_len): overflows in assertions
4543 (_dbus_string_find): change to implement in terms of
4544 _dbus_string_find_to
4545 (_dbus_string_find_to): assorted fixage
4546 (_dbus_string_equal_c_str): assert c_str != NULL,
4547 fix logic so the function works
4548 (_dbus_string_ends_with_c_str): fix overflow thingy
4549 (_dbus_string_base64_encode): overflow fix
4550 (_dbus_string_validate_ascii): overflow
4551 (_dbus_string_validate_nul): overflow
4553 2003-02-26 Havoc Pennington <hp@redhat.com>
4555 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4557 2003-02-26 Alexander Larsson <alexl@redhat.com>
4560 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4562 * dbus/dbus-connection.c:
4563 * dbus/dbus-connection.h:
4564 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4565 Add dbus_connection_set_wakeup_main_function and use it when queueing
4566 incoming and outgoing messages.
4569 * dbus/dbus-dataslot.c:
4570 Threadsafe usage of DBusDataSlotAllocator
4572 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4575 * dbus/dbus-server-unix.c:
4578 * glib/dbus-gmain.c:
4579 Implement the new wakeup functions for glib.
4582 * glib/test-thread-client.c:
4583 * glib/test-thread-server.c:
4584 * glib/test-thread.h:
4585 Initial cut at some thread test code. Not really done yet.
4587 2003-02-26 Havoc Pennington <hp@pobox.com>
4589 * dbus/dbus-connection.c
4590 (dbus_connection_send_message_with_reply_and_block): fix crash
4591 where we ref'd the outgoing message instead of the returned reply
4593 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4594 at the end of this function, so if we didn't need to read for
4595 authentication, we reinstall it for receiving messages
4597 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4598 a NULL sender for peer-to-peer case
4600 * dbus/dbus-transport-unix.c (check_read_watch): handle
4601 !authenticated case correctly
4603 * glib/dbus-gmain.c: add support for DBusServer
4605 * dbus/dbus-server.c: add data slot support
4607 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4608 return values and handle errors
4610 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4613 * Doxyfile.in (INPUT): add glib subdir
4615 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4616 setup_with_g_main instead of hookup_with_g_main; write docs
4618 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4620 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4621 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4622 * dbus/dbus-message.c: (dbus_message_append_boolean),
4623 (dbus_message_append_boolean_array),
4624 (dbus_message_get_args_valist), (_dbus_message_test):
4625 * dbus/dbus-message.h:
4626 * doc/dbus-specification.sgml:
4627 Various fixes as pointed out by Havoc.
4629 * test/data/invalid-messages/bad-boolean-array.message:
4630 * test/data/invalid-messages/bad-boolean.message:
4631 Add invalid boolean value test cases.
4633 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4635 * dbus/dbus-internals.c: (_dbus_type_to_string):
4636 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4637 (_dbus_marshal_validate_arg):
4638 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4639 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4640 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4641 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4642 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4643 (dbus_message_iter_get_double),
4644 (dbus_message_iter_get_boolean_array), (message_iter_test):
4645 * dbus/dbus-message.h:
4646 * dbus/dbus-protocol.h:
4647 * doc/dbus-specification.sgml:
4648 * test/data/valid-messages/lots-of-arguments.message:
4649 Add support for boolean and boolean array types.
4651 2003-02-23 Havoc Pennington <hp@pobox.com>
4653 * dbus/dbus-keyring.c: finish most of this implementation and
4656 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4657 these barf if the error isn't cleared to NULL
4659 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4660 (_dbus_create_directory): new function
4662 * dbus/dbus-errors.c (dbus_set_error): fix warning
4664 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4665 (_dbus_string_hex_decode): new function
4666 (test_hex_roundtrip): test code
4668 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4670 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4672 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4673 the save-to-temp/rename trick to atomically write the new file
4674 (_dbus_string_parse_uint): new function
4676 2003-02-22 Havoc Pennington <hp@pobox.com>
4678 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4680 2003-02-22 Havoc Pennington <hp@pobox.com>
4682 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4683 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4685 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4687 * dbus/test/data/sha-1: add US government test suite for SHA-1
4689 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4691 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4692 Make string arrays NULL-terminated.
4694 * dbus/dbus-memory.c: (dbus_free_string_array):
4695 * dbus/dbus-memory.h:
4696 New function for freeing NULL-terminated string arrays.
4698 * dbus/dbus-message-builder.c: (append_quoted_string),
4699 (_dbus_message_data_load):
4700 Add support for array types.
4702 * dbus/dbus-message.c: (check_message_handling):
4703 Add more types as test cases.
4705 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4706 (_dbus_string_parse_double):
4707 Add the start offset to the end offset.
4709 * test/data/valid-messages/lots-of-arguments.message:
4710 New test message with lots of arguments.
4712 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4714 * dbus/dbus-message.c: (dbus_message_append_nil),
4715 (dbus_message_append_int32), (dbus_message_append_uint32),
4716 (dbus_message_append_double), (dbus_message_append_string),
4717 (dbus_message_append_int32_array),
4718 (dbus_message_append_uint32_array),
4719 (dbus_message_append_double_array),
4720 (dbus_message_append_byte_array),
4721 (dbus_message_append_string_array):
4722 Fix all out-of-memory handling in these functions.
4724 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4726 * dbus/dbus-message.c: (dbus_message_append_nil):
4729 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4731 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4732 (dbus_message_append_nil), (dbus_message_append_int32_array),
4733 (dbus_message_append_uint32_array),
4734 (dbus_message_append_double_array),
4735 (dbus_message_append_byte_array),
4736 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4737 (dbus_message_iter_get_int32_array),
4738 (dbus_message_iter_get_uint32_array),
4739 (dbus_message_iter_get_double_array),
4740 (dbus_message_iter_get_byte_array),
4741 (dbus_message_iter_get_string_array):
4743 * dbus/dbus-message.h:
4744 Add functions for appending and getting arrays.
4746 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4748 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4749 element size at least 8 bytes, fixes mempool tests on
4752 2003-02-20 Alexander Larsson <alexl@redhat.com>
4754 * dbus/dbus-transport-unix.c (unix_do_iteration):
4755 Unlock the connection mutex during a blocking select call.
4756 Add todo about how we need a way to wake up the select.
4758 * dbus/dbus-connection-internal.h:
4759 * dbus/dbus-connection.c:
4760 Add _dbus_connection_lock and _dbus_connection_unlock.
4762 2003-02-19 Havoc Pennington <hp@pobox.com>
4764 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4765 Doxyfile.in, not Doxyfile
4767 * dbus/dbus-keyring.c: do some hacking on this
4769 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4771 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4773 (dbus_set_error): remove dbus_error_init, check for message ==
4774 NULL *before* we sprintf into it, and add @todo about including
4775 system headers in this file
4777 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4779 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4781 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4782 get various bits of user information based on either username
4784 (_dbus_homedir_from_username): new function
4786 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4789 Add check for nonposix getpwnam_r
4791 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4792 Align the pool element size to a sizeof (void *) boundary.
4794 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4795 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4796 General Solaris fixes.
4798 * test/data/valid-messages/simplest-manual.message:
4799 Explicitly state that we want little-endian packing.
4801 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4803 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4805 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4806 Added to create a transport connecting using a tcp/ip socket.
4808 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4809 to a tcp socket at given host and port.
4810 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4813 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4815 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4816 Added to create a server listening on a TCP/IP socket.
4818 2003-02-19 Havoc Pennington <hp@pobox.com>
4820 Throughout: mop up all the Doxygen warnings and undocumented
4823 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4824 to search any paths.
4826 * dbus/dbus-threads.c: move global mutex initializers to
4827 dbus-internals.h, multiple prototypes was confusing doxygen
4828 besides being kind of ugly
4830 * Doxyfile (PREDEFINED): have Doxygen define
4831 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4832 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4833 (do not abuse the feature! it's for stuff like the autogenerated
4834 macros in dbus-md5.c, not just for things you don't feel like
4837 2003-02-18 Havoc Pennington <hp@pobox.com>
4839 * dbus/dbus-string.c (_dbus_string_zero): new function
4841 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4842 wrap it in some dbus-friendly API
4844 * dbus/dbus-types.h: add 16-bit types
4846 2003-02-18 Joe Shaw <joe@assbarn.com>
4848 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4849 credentials from our currently running process.
4850 (get_word): Fix a buglet where we were copying the entire length
4851 instead of relative to our position.
4853 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4854 keys on the stack... it's 640k of data.
4856 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4857 read the credentials byte off the socket, even if we don't have
4859 (_dbus_poll): Implement poll() using select() for systems which
4862 * glib/test-dbus-glib.c (main): Print out an error if no
4863 parameters are given.
4865 * test/data/auth/fallback.auth-script: Added. Tests that a client
4866 can fallback to a secondary auth mechanism if the first fails.
4868 2003-02-18 Havoc Pennington <hp@pobox.com>
4872 2003-02-17 Havoc Pennington <hp@pobox.com>
4874 * doc/dbus-specification.sgml: lots of cosmetic
4875 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4876 env variable to DBUS_BUS_ADDRESS, s/client/application/,
4877 s/server/bus/ (except in authentication section). Add a section
4878 "Message Bus Message Routing"
4880 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
4886 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4888 * doc/dbus-specification.sgml:
4889 Specification updates.
4891 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4893 * bus/activation.c: (bus_activation_init), (child_setup),
4894 (bus_activation_activate_service):
4896 * bus/main.c: (main):
4897 Set DBUS_ADDRESS environment variable.
4899 * dbus/dbus-errors.c: (dbus_set_error):
4900 Don't use va_copy since that's a C99 feature.
4902 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4903 (_dbus_spawn_async):
4904 * dbus/dbus-sysdeps.h:
4905 Add child_setup_func to _dbus_spawn_async.
4907 * doc/dbus-specification.sgml:
4908 Update specification.
4910 * test/spawn-test.c: (setup_func), (main):
4913 2003-02-17 Alexander Larsson <alexl@redhat.com>
4915 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4918 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4922 * doc/dbus-test-plan.sgml:
4923 Add test plan document.
4928 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4930 * dbus/dbus-message.c: (decode_header_data),
4931 (_dbus_message_loader_return_buffer):
4932 Set the header padding amount when loading a message.
4934 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4936 * bus/dispatch.c: (send_one_message):
4937 Only send broadcast messages to registered connections.
4939 * dbus/dbus-message.c: (dbus_message_name_is):
4940 * dbus/dbus-message.h:
4941 New convenience function.
4943 * dbus/dbus-transport-debug.c: (do_reading):
4944 Only dispatch one message per run.
4947 * test/bus-test.c: (new_connection_callback), (die),
4948 (test_hello_client1_handler), (test_hello_client2_handler),
4949 (test_hello_replies), (main):
4951 * test/bus-test-loop.[ch]:
4954 2003-02-16 Havoc Pennington <hp@pobox.com>
4956 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4957 backward conditional
4959 2003-02-16 Alexander Larsson <alexl@redhat.com>
4961 * dbus/dbus-connection.c:
4962 Implement sent_message_with_reply. (with_reply_and block is still
4964 Made dispatch_message not lose message if OOM.
4966 * dbus/dbus-errors.h:
4967 Add NoReply error (for reply timeouts).
4969 2003-02-16 Alexander Larsson <alexl@redhat.com>
4971 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4972 Actually free keys and values when destroying hashtable.
4974 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4976 * dbus/dbus-auth.c: (client_try_next_mechanism):
4979 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4980 Return TRUE if there's no thread implementation around.
4982 * glib/dbus-gmain.c: (free_source),
4983 (dbus_connection_hookup_with_g_main):
4984 Make sure to remove the GSource when the connection is finalized.
4986 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4988 * bus/dispatch.c: (bus_dispatch_message_handler):
4989 * dbus/dbus-errors.h:
4990 Return an error if someone tries to send a message to a service
4993 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4995 * bus/activation.c: (load_directory), (bus_activation_init),
4996 (bus_activation_activate_service):
4999 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5000 More work on the activation handling.
5002 * dbus/dbus-errors.h:
5003 Add some error messages
5005 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5006 * dbus/dbus-message.h:
5007 New function that creates an error message.
5009 * dbus/dbus-protocol.h:
5010 Add ACTIVATE_SERVER message.
5012 * dbus/dbus-server-unix.c: (unix_handle_watch),
5013 (_dbus_server_new_for_domain_socket):
5014 Call _dbus_fd_set_close_on_exec.
5016 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5017 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5018 (_dbus_fd_set_close_on_exec):
5019 * dbus/dbus-sysdeps.h:
5020 Add _dbus_fd_set_close_on exec function. Also add function that checks
5021 that all open fds are set to close-on-exec and warns otherwise.
5023 * dbus/dbus-transport-unix.c:
5024 (_dbus_transport_new_for_domain_socket):
5025 Call _dbus_fd_set_close_on_exec.
5027 2003-02-16 Havoc Pennington <hp@pobox.com>
5029 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5030 allow people to avoid setting SIGPIPE to SIG_IGN
5031 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5032 we've been asked not to
5034 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5036 * dbus/dbus-list.c: (_dbus_list_append_link),
5037 (_dbus_list_prepend_link):
5038 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5042 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5045 * bus/activation.c: (bus_activation_entry_free),
5046 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5048 * bus/main.c: (main):
5049 Add simple activation support, doesn't work yet though.
5051 2003-02-15 Zack Rusin <zack@kde.org>
5053 * qt/dbus-qthread.cpp: small casting fix
5055 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5057 * dbus/dbus-errors.c: (dbus_set_error):
5058 * dbus/dbus-errors.h:
5059 Add a few errors and make dbus_set_error void.
5061 * dbus/dbus-sysdeps.c:
5062 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5063 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5064 * dbus/dbus-sysdeps.h:
5065 Add _dbus_spawn_async.
5067 * test/spawn-test.c: (main):
5068 Test for _dbus_spawn_async.
5070 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5072 * dbus/dbus-internals.h:
5073 Fix build without tests.
5075 * dbus/dbus-list.c: (alloc_link):
5076 Fix a segfault when a malloc fails.
5078 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5079 (dbus_malloc0), (dbus_realloc):
5080 Add support for malloc debugging.
5082 2003-02-15 Alexander Larsson <alexl@redhat.com>
5084 * dbus/dbus-threads.c:
5085 * dbus/dbus-threads.h:
5086 Add condvars. Remove static mutext from API.
5087 Implement static mutexes by initializing them from threads_init.
5089 * glib/dbus-gthread.c:
5090 * qt/dbus-qthread.cpp:
5091 Update with the thread api changes.
5096 Turn StaticMutex into normal mutex + init function.
5097 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5098 _dbus_list_append_link, _dbus_list_prepend_link
5101 * dbus/dbus-sysdeps.c:
5102 * dbus/dbus-sysdeps.h:
5103 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5104 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5106 * dbus/dbus-protocol.h:
5107 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5109 * dbus/dbus-message.c:
5110 Make ref/unref atomic.
5113 * dbus/dbus-connection-internal.h:
5114 * dbus/dbus-connection.c:
5115 * dbus/dbus-connection.h:
5117 Change _peek to _borrow,_return & _steal_borrowed.
5118 Change disconnect callback to event.
5119 Make dbus_connection_dispatch_messages reentrant.
5121 * dbus/dbus-transport.c:
5122 Don't ref the connection on calls to the transport
5125 * dbus/dbus-message-handler.c:
5128 * glib/dbus-gmain.c:
5129 Don't use peek_message anymore
5132 * test/debug-thread.c:
5133 * test/debug-thread.h:
5134 Simple thread implementation that asserts() on deadlocks in
5135 single-threaded code.
5138 (main) Call debug_threads_init.
5141 Use disconnect message instead of disconnect callback.
5145 Don't call dbus_connection_set_disconnect_function. Instead export
5146 bus_connection_disconnect.
5149 Call bus_connection_disconnect when we get a disconnected message.
5151 2003-02-15 Havoc Pennington <hp@pobox.com>
5153 * dbus/dbus-message.c (dbus_message_new): fool around with the
5156 2003-02-14 Havoc Pennington <hp@pobox.com>
5158 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5160 * dbus/dbus-memory.c: fail if the debug functions indicate we
5163 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5164 (_dbus_decrement_fail_alloc_counter): debug functions to
5165 simulate memory allocation failures
5167 2003-02-14 Havoc Pennington <hp@pobox.com>
5169 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5172 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5174 * bus/driver.c: (bus_driver_handle_hello):
5176 * bus/services.c: (bus_service_lookup):
5177 Reorder message sending so we get a more sane order.
5179 * test/bus-test.c: (message_handler):
5182 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5184 * bus/driver.c: (bus_driver_send_service_deleted),
5185 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5186 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5187 (bus_driver_send_welcome_message),
5188 (bus_driver_handle_list_services),
5189 (bus_driver_handle_acquire_service),
5190 (bus_driver_handle_service_exists):
5191 * dbus/dbus-bus.c: (dbus_bus_register_client),
5192 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5193 * dbus/dbus-errors.c: (dbus_result_to_string):
5194 * dbus/dbus-errors.h:
5195 * dbus/dbus-message.c: (dbus_message_append_args),
5196 (dbus_message_append_args_valist), (dbus_message_get_args),
5197 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5198 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5199 (dbus_message_iter_get_byte_array),
5200 (dbus_message_iter_get_string_array), (message_iter_test),
5201 (check_message_handling), (_dbus_message_test):
5202 * dbus/dbus-message.h:
5203 * test/bus-test.c: (main):
5204 Change fields to arguments in messages, so that they won't be
5205 confused with header fields.
5207 * glib/test-dbus-glib.c: (main):
5208 Remove append_fields from hello message.
5210 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5212 * dbus/dbus-errors.c:
5213 * dbus/dbus-message.c:
5214 * dbus/dbus-string.c:
5215 Documentation fixes.
5217 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5219 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5221 Implement support for timeouts in dbus-glib.
5223 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5225 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5226 * dbus/dbus-message.c: (process_test_subdir):
5227 * test/break-loader.c: (find_breaks_based_on):
5228 Plug some memory leaks.
5230 2003-02-13 Richard Hult <rhult@codefactory.se>
5232 * bus/main.c: Fix build.
5234 * dbus/dbus-errors.h:
5235 * dbus/dbus-errors.c: Fix copyright for Anders.
5237 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5242 * bus/connection.c: (bus_connection_foreach):
5245 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5246 (unescape_string), (new_section), (parse_section_start),
5247 (parse_key_value), (report_error), (bus_desktop_file_load),
5248 (bus_desktop_file_get_string):
5249 * bus/desktop-file.h:
5250 Use DBusError for error reporting.
5252 * bus/dispatch.c: (send_one_message),
5253 (bus_dispatch_message_handler):
5254 * bus/driver.c: (bus_driver_send_service_deleted),
5255 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5256 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5257 (bus_driver_send_welcome_message),
5258 (bus_driver_handle_list_services),
5259 (bus_driver_handle_acquire_service),
5260 (bus_driver_handle_service_exists):
5261 * bus/loop.c: (bus_loop_run):
5263 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5265 * bus/utils.c: (bus_wait_for_memory):
5267 New files with general utility functions.
5269 * dbus/dbus-internals.h:
5270 Remove _DBUS_HANDLE_OOM.
5272 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5274 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5275 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5276 * dbus/dbus-errors.h:
5277 Add DBusError structure.
5279 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5281 * test/data/valid-messages/standard-acquire-service.message:
5282 * test/data/valid-messages/standard-hello.message:
5283 * test/data/valid-messages/standard-list-services.message:
5284 * test/data/valid-messages/standard-service-exists.message:
5285 Add some standard messages.
5287 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5289 * bus/driver.c: (bus_driver_send_welcome_message),
5290 (bus_driver_handle_list_services),
5291 (bus_driver_handle_acquire_service),
5292 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5293 Update for API changes in libdbus.
5295 * dbus/dbus-message.c: (dbus_message_new_reply):
5296 * dbus/dbus-message.h:
5297 Remove the name argument. The spec states that replies shouldn't
5300 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5302 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5303 (report_error), (bus_desktop_file_load), (lookup_section),
5304 (lookup_line), (bus_desktop_file_get_raw),
5305 (bus_desktop_file_get_string):
5306 * bus/desktop-file.h:
5307 Some fixes, and new functions for getting a key value from a section.
5309 2003-02-13 Havoc Pennington <hp@pobox.com>
5311 * test/data/auth/fail-after-n-attempts.auth-script: new test
5313 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5316 2003-02-13 Havoc Pennington <hp@pobox.com>
5318 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5319 dbus_credentials_match were backward
5321 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5322 NO_CREDENTIALS and ROOT_CREDENTIALS
5324 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5325 into here. Never process more commands after we've reached an
5326 end state; store further data as unused bytes.
5328 * test/data/auth/*: add more auth tests
5330 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5331 command to match exact string and EXPECT_UNUSED to match unused
5334 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5336 2003-02-12 Havoc Pennington <hp@pobox.com>
5338 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5339 \r off of popped lines
5341 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5344 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5347 2003-02-12 Havoc Pennington <hp@pobox.com>
5349 * dbus/Makefile.am: remove break-loader from the build, since it
5352 * configure.in: add --enable-gcov to turn on coverage profiling
5353 flags and disable optimization
5355 2003-02-10 Havoc Pennington <hp@pobox.com>
5357 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5358 initial cut at test framework for DBusAuth from laptop.
5359 Doesn't quite work yet but it compiles and I need to get
5360 it off the 266mhz laptop. ;-)
5362 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5363 fix a memleak in error case
5365 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5368 * bus/desktop-file.c:
5369 * bus/desktop-file.h:
5370 Add a desktop file parser.
5372 2003-02-11 Zack Rusin <zack@kde.org>
5374 * qt/message.[h|cpp]: sample implementation
5375 of the KDE wrapper for DBusMessage
5377 2003-02-09 Zack Rusin <zack@kde.org>
5379 * test/bus-test.c: make_it_compile
5380 * doc/dbus-specification.sgml: minimal semantic fix
5382 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5388 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5391 * dbus/dbus-break-loader.c:
5393 * test/break-loader.c:
5394 Move dbus-break-loader to test/ and rename it to break-loader.
5396 2003-02-02 Havoc Pennington <hp@pobox.com>
5398 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5399 for code to manage cookies in your home directory
5401 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5403 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5404 to authenticate, then disconnect the client.
5406 2003-02-03 Alexander Larsson <alexl@redhat.com>
5408 * dbus/dbus-message.c (dbus_message_append_fields):
5411 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5413 * doc/dbus-specification.sgml:
5414 Update address format section.
5416 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5419 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5420 (message_handler), (new_connection_callback), (loop_quit),
5424 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5426 * bus/driver.c: (bus_driver_handle_service_exists):
5427 Simplify the code a bit.
5429 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5432 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5435 Add libdbus-daemon.la and link to it.
5437 2003-02-01 James Willcox <jwillcox@gnome.org>
5439 * bus/driver.c: (bus_driver_handle_own_service):
5440 Actually include the service reply code in the message.
5442 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5444 * bus/driver.c: (bus_driver_handle_service_exists):
5445 Don't unref the incoming message.
5447 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5449 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5451 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5453 * dbus/dbus-server.c: (dbus_server_listen):
5454 * dbus/dbus-transport.c: (_dbus_transport_open):
5455 ifdef out the calls to the debug transport and server.
5457 2003-02-02 Alexander Larsson <alexl@redhat.com>
5459 * dbus/dbus-watch.c (dbus_watch_get_flags):
5460 Add note in the docs that ERROR or HANGUP won't be returned
5461 and are assumed always on.
5463 * glib/dbus-gmain.c (add_watch):
5464 Always add IO_ERR | IO_HUP
5466 * dbus/dbus-message.h:
5467 Add semicolon after dbus_message_iter_get_string_array().
5468 Makes qt code build again
5470 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5472 * bus/driver.c: (create_unique_client_name),
5473 (bus_driver_handle_hello):
5474 Don't take a name, just use a numeric id to identify
5478 * dbus/dbus-bus.c: (dbus_bus_register_client),
5479 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5481 Add new convenience functions for communicating with the bus.
5483 * dbus/dbus-message.h:
5485 * dbus/dbus-protocol.h:
5488 2003-02-01 Alexander Larsson <alexl@redhat.com>
5490 * dbus/dbus-message.c (dbus_message_append_fields):
5491 Add some more doc comments.
5493 2003-02-01 Havoc Pennington <hp@pobox.com>
5495 * dbus/dbus-break-loader.c (randomly_modify_length): change
5496 a 4-byte value in the message as if it were a length
5498 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5499 execute bit on saved files
5501 2003-02-01 Havoc Pennington <hp@pobox.com>
5503 * dbus/dbus-break-loader.c (main): new program to find messages
5504 that break the loader.
5506 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5507 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5509 * dbus/dbus-string.c (_dbus_string_set_byte): new
5511 2003-01-31 Havoc Pennington <hp@pobox.com>
5513 * dbus/dbus-message.c: refactor the test code to be more general,
5514 in preparation for writing a "randomly permute test cases to
5515 try to break the loader" program.
5517 2003-01-31 Havoc Pennington <hp@pobox.com>
5519 * doc/dbus-specification.sgml: work on the specification
5521 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5522 the protocol version of the message.
5524 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5525 no longer specifies that.
5526 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5529 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5530 "break" for DBUS_TYPE_NIL, remove @todo
5532 2003-01-31 Havoc Pennington <hp@pobox.com>
5534 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5535 just set_is_error/get_is_error as this is a commonly-used
5536 function, and write docs.
5538 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5540 * dbus/dbus-address.c: (dbus_address_entry_free):
5541 Free key and value lists.
5543 * dbus/dbus-internals.c: (_dbus_type_to_string):
5544 Add the types we didn't have.
5546 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5547 (_dbus_marshal_validate_arg):
5550 * dbus/dbus-message.c: (dbus_message_set_sender):
5551 Remove todo about being able to set sender to NULL.
5553 (dbus_message_set_is_error_reply),
5554 (dbus_message_get_is_error_reply):
5555 * dbus/dbus-message.h:
5558 * dbus/dbus-protocol.h:
5559 Add error reply flag.
5561 * test/data/valid-messages/opposite-endian.message:
5562 Add NIL type to test.
5564 2003-01-31 Havoc Pennington <hp@pobox.com>
5566 * doc/dbus-specification.sgml: fully specify the header. Add
5567 flags and major protocol version, and change header/body len to
5570 * dbus/dbus-message-builder.c (append_saved_length): append length
5573 * dbus/dbus-message.c (dbus_message_create_header): change header
5574 length and body length to unsigned. Add the new fields from the
5576 (_dbus_message_loader_return_buffer): unsigned header/body len
5578 2003-01-30 Havoc Pennington <hp@pobox.com>
5580 * dbus/dbus-auth.c: rework to use only REJECTED, no
5583 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5584 use REJECTED, suggested by Mark McLoughlin
5586 2003-01-30 Havoc Pennington <hp@pobox.com>
5588 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5589 a better way to report errors here. e.g. "unix address lacks
5590 path" or something. also "no such file" when the path doesn't
5593 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5595 (dbus_parse_address): add @todo about documenting address format,
5596 and allowing , and ; to be escaped
5598 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5601 Add dbus-address.[ch]
5603 * dbus/dbus-address.c: (dbus_address_entry_free),
5604 (dbus_address_entries_free), (create_entry),
5605 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5606 (dbus_parse_address), (_dbus_address_test):
5607 * dbus/dbus-address.h:
5608 New files for dealing with address parsing.
5610 * dbus/dbus-connection.c:
5611 Document timeout functions.
5613 * dbus/dbus-message.c:
5614 Document dbus_message_new_from_message.
5616 * dbus/dbus-server-debug.c:
5619 * dbus/dbus-server.c: (dbus_server_listen):
5620 Parse address and use correct server implementation.
5622 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5623 * dbus/dbus-string.h:
5624 New function with test.
5626 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5630 * dbus/dbus-transport-debug.c:
5633 * dbus/dbus-transport.c: (_dbus_transport_open):
5634 Parse address and use correct transport implementation.
5636 2003-01-30 Havoc Pennington <hp@pobox.com>
5638 * dbus/dbus-message.c: use message->byte_order instead of
5639 DBUS_COMPILER_BYTE_ORDER throughout.
5640 (dbus_message_create_header): pad header to align the
5641 start of the body of the message to 8-byte boundary
5643 * dbus/dbus-marshal.h: make all the demarshalers take const
5644 DBusString arguments.
5646 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5647 validate message args here, so we don't have to do slow validation
5648 later, and so we catch bad messages as they are incoming. Also add
5649 better checks on header_len and body_len. Also fill in
5652 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5653 implemented properly)
5654 (_dbus_string_validate_nul): new function to check all-nul
5656 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5657 get_arg_end_pos and remove all validation
5658 (_dbus_marshal_validate_arg): actually do validation here.
5660 2003-01-29 Havoc Pennington <hp@pobox.com>
5662 * dbus/dbus-message.c (check_message_handling): fix assertion
5663 failure on set_client_serial
5665 2003-01-28 Havoc Pennington <hp@pobox.com>
5667 * dbus/dbus-server-debug.c: Add doc section comments
5669 * dbus/dbus-transport-debug.c: add doc section comments
5671 2003-01-28 Havoc Pennington <hp@redhat.com>
5673 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5674 the reverse order from how I had it
5675 (_dbus_string_base64_encode): reverse encoding order. I was
5676 basically byteswapping everything during encoding.
5678 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5680 * dbus/dbus-connection-internal.h:
5681 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5682 (_dbus_connection_remove_timeout):
5683 Add functions for adding and removing timeouts.
5685 * dbus/dbus-message.c: (dbus_message_new_from_message):
5686 Add new function that takes a message and creates an exact
5687 copy of it, but with the refcount set to 1.
5688 (check_message_handling):
5691 * dbus/dbus-server-protected.h:
5692 * dbus/dbus-server.c: (_dbus_server_init_base),
5693 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5694 (dbus_server_set_timeout_functions):
5695 (_dbus_server_remove_timeout):
5696 New functions so that a server can add and remove timeouts.
5698 (dbus_server_listen):
5699 Add commented out call to dbus_server_debug_new.
5701 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5702 Actually set the handler, doh.
5704 * dbus/dbus-transport.c: (_dbus_transport_open):
5705 Add commented out call to dbus_transport_debug_client_new.
5708 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5710 2003-01-28 Havoc Pennington <hp@pobox.com>
5712 * dbus/dbus-message.c (check_message_handling): function to check
5713 on the loaded message, iterates over it etc.
5715 2003-01-28 Havoc Pennington <hp@pobox.com>
5717 * test/Makefile.am (dist-hook): fix make distdir
5719 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5721 2003-01-27 Havoc Pennington <hp@pobox.com>
5723 * dbus/dbus-mempool.c (time_for_size): replace printf with
5726 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5727 empty lines; fix the SAVE_LENGTH stuff to be
5728 START_LENGTH/END_LENGTH so it actually works; couple other
5731 * test/Makefile.am (dist-hook): add dist-hook for .message files
5733 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5734 can be constant or locked.
5735 (_dbus_string_free): allow freeing a const string as
5738 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5740 * dbus/dbus-test-main.c (main): take an argument which is the
5741 directory containing test data
5743 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5744 argument to this and load all the messages in test/data/
5745 checking that they can be loaded or not loaded as appropriate.
5747 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5749 * bus/dispatch.c: (bus_dispatch_message_handler):
5750 Dispatch messages sent to services.
5752 * bus/driver.c: (bus_driver_send_service_deleted),
5753 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5754 (bus_driver_send_service_acquired):
5755 Add helper functions for sending service related messages.
5757 (bus_driver_send_welcome_message):
5758 Send HELLO_REPLY instead of WELCOME.
5760 (bus_driver_handle_list_services):
5761 Send LIST_SERVICES_REPLY instead of SERVICES.
5763 (bus_driver_handle_own_service),
5764 (bus_driver_handle_service_exists):
5765 New message handlers.
5767 (bus_driver_handle_message):
5768 Invoke new message handlers.
5770 (bus_driver_remove_connection):
5771 Don't remove any services here since that's done automatically
5772 by bus_service_remove_owner now.
5775 New function signatures.
5777 * bus/services.c: (bus_service_add_owner):
5778 Send ServiceAcquired message if we're the only primary owner.
5780 (bus_service_remove_owner):
5781 Send ServiceAcquired/ServiceLost messages.
5783 (bus_service_set_prohibit_replacement),
5784 (bus_service_get_prohibit_replacement):
5785 Functions for setting prohibit replacement.
5787 (bus_service_has_owner):
5788 New function that checks if a connection is in the owner queue of
5792 Add new function signatures.
5794 * dbus/dbus-list.c: (_dbus_list_test):
5795 Add tests for _dbus_list_remove_last and traversing the list backwards.
5798 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5799 go any further, so return NULL then.
5801 * dbus/dbus-protocol.h:
5802 Add new messages, service flags and service replies.
5804 2003-01-26 Havoc Pennington <hp@pobox.com>
5806 * dbus/dbus-message-builder.c: implement, completely untested.
5808 * test/data/*: add data to be used in testing.
5809 ".message" files are our simple loadable text format.
5810 ".message-raw" will be binary dumps of messages.
5812 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5814 2003-01-26 Havoc Pennington <hp@pobox.com>
5816 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5818 * dbus/dbus-errors.c (dbus_result_to_string): add
5821 * dbus/dbus-message-builder.c: new file, will contain code to load
5822 up messages from files. Not implemented yet.
5824 2003-01-26 Havoc Pennington <hp@pobox.com>
5826 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5827 the sender by setting to NULL
5829 2003-01-26 Havoc Pennington <hp@pobox.com>
5831 The unit tests pass, but otherwise untested. If it breaks, the
5832 tests should have been better. ;-)
5834 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5837 * dbus/dbus-message.c: redo everything so we maintain
5838 message->header as the only copy of the various fields.
5839 This avoids the possibility of out-of-memory in some cases,
5840 for example dbus_message_lock() can't run out of memory anymore,
5841 and avoids extra copying. Figured I may as well go ahead and do
5842 this since it was busted for dbus_message_lock to not return
5843 failure on OOM, and dbus_message_write_header was totally
5844 unchecked for OOM. Also fixed some random other bugs.
5846 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5847 that strings are nul-terminated. Also, end_pos can be equal
5848 to string length just not greater than, I think.
5849 (_dbus_marshal_set_int32): new function
5850 (_dbus_marshal_set_uint32): new function
5851 (_dbus_marshal_set_string): new function
5853 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5854 a warning, init timeout_list to NULL
5855 (dbus_connection_send_message): don't use uninitialized variable
5858 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5860 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5862 * bus/driver.c: (bus_driver_handle_hello),
5863 (bus_driver_send_welcome_message):
5866 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5868 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5869 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5870 (dbus_connection_unref):
5871 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5872 * dbus/dbus-message.c: (dbus_message_unref),
5875 (dbus_message_get_fields):
5876 Remove debugging printout.
5878 (_dbus_message_loader_return_buffer):
5879 Don't store the header string.
5881 (_dbus_message_test):
5884 2003-01-26 Richard Hult <rhult@codefactory.se>
5886 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5887 the file descriptor list, since it can change under us.
5889 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5891 * glib/dbus-gmain.c: (dbus_connection_prepare),
5892 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5893 (remove_watch), (dbus_connection_hookup_with_g_main):
5894 Rewrite the glib handling to use its own GSource instead of a
5895 GIOChannel so we can catch messages put in the queue while waiting
5898 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5901 * bus/connection.c: (connection_disconnect_handler),
5902 (connection_watch_callback), (bus_connection_setup):
5903 * bus/dispatch.c: (send_one_message),
5904 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5905 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5907 * bus/driver.c: (bus_driver_send_service_deleted),
5908 (bus_driver_send_service_created), (bus_driver_handle_hello),
5909 (bus_driver_send_welcome_message),
5910 (bus_driver_handle_list_services), (bus_driver_remove_connection),
5911 (bus_driver_handle_message):
5913 Refactor code, put the message dispatching in its own file. Use
5914 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5917 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5919 * dbus/dbus-internals.h:
5920 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5922 * dbus/dbus-message.c: (dbus_message_get_sender):
5923 * dbus/dbus-message.h:
5924 Implement dbus_message_get_sender.
5926 * dbus/dbus-protocol.h:
5927 Add message and service defines.
5929 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5931 * dbus/dbus-connection.c: (dbus_connection_send_message):
5932 * dbus/dbus-message-internal.h:
5933 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5934 (dbus_message_write_header):
5935 Remove _dbus_messag_unlock and don't set the client serial on a
5936 message if one already exists.
5938 2003-01-24 Havoc Pennington <hp@pobox.com>
5940 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5943 * bus/driver.c (bus_driver_handle_list_services): fix a leak
5946 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5948 * dbus/dbus-list.c: (alloc_link), (free_link):
5949 Use a memory pool for the links.
5951 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5953 * bus/connection.c: (bus_connection_foreach):
5955 Add new bus_connection_foreach function.
5957 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5958 Add function that broadcasts a message to all clients.
5960 (bus_driver_send_service_created), (bus_driver_handle_hello),
5961 (bus_driver_send_welcome_message),
5962 (bus_driver_handle_list_services), (bus_driver_message_handler):
5963 Implement functions that take care of listing services, and notifying
5964 clients when new services are created.
5966 * bus/services.c: (bus_services_list):
5968 Add new function that returns an array of strings with the currently
5969 registered services.
5972 * glib/dbus-gmain.c:
5973 Update copyright year.
5975 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5977 * dbus/dbus-connection.c: (dbus_connection_send_message):
5978 Unlock the message in case it was sent earlier.
5980 (dbus_connection_send_message_with_reply_and_block):
5981 Remove the reply message from the list.
5983 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5984 Set array_len and new_pos correctly.
5986 (_dbus_marshal_test):
5987 Remove debug output.
5989 * dbus/dbus-message-internal.h:
5990 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5991 New function that returns the reply serial.
5993 (_dbus_message_unlock):
5994 New function that unlocks a message and resets its header.
5996 (dbus_message_append_string_array),
5997 (dbus_message_get_fields_valist),
5998 (dbus_message_iter_get_field_type),
5999 (dbus_message_iter_get_string_array),
6000 (dbus_message_get_fields),
6001 (dbus_message_append_fields_valist):
6002 Handle string arrays.
6004 (dbus_message_set_sender):
6005 Make this function public since the bus daemon needs it.
6007 (decode_header_data):
6008 Set the reply serial to -1 initially.
6010 * dbus/dbus-message.h:
6011 Add dbus_message_set_sender.
6013 2003-01-24 Havoc Pennington <hp@pobox.com>
6015 * doc/dbus-specification.sgml: add some stuff
6017 2003-01-22 Havoc Pennington <hp@pobox.com>
6019 * doc/dbus-specification.sgml: Start to document the protocol.
6021 2003-01-22 Havoc Pennington <hp@pobox.com>
6023 * dbus/dbus-connection.c
6024 (dbus_connection_send_message_with_reply_and_block): add some @todo
6026 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6028 2003-01-21 Havoc Pennington <hp@pobox.com>
6030 (patch untested because can't compile)
6032 * bus/driver.c (create_unique_client_name): make this function
6033 never recycle client names. Also, caller should initialize
6036 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6038 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6040 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6041 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6042 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6043 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6044 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6045 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6046 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6047 * dbus/dbus-marshal.h:
6048 * dbus/dbus-protocol.h:
6049 Add support for marshalling and demarshalling integer, double
6052 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6057 * bus/connection.c: (connection_disconnect_handler):
6058 Remove the connection from the bus driver's list.
6060 (connection_watch_callback): Dispatch messages.
6062 (free_connection_data): Free connection name.
6064 (bus_connection_setup): Add connection to the bus driver's list.
6065 (bus_connection_remove_owned_service):
6066 (bus_connection_set_name), (bus_connection_get_name):
6067 Add functions for setting and getting the connection's name.
6070 Add function headers.
6072 * bus/driver.c: (create_unique_client_name),
6073 (bus_driver_handle_hello_message),
6074 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6075 (bus_driver_add_connection), (bus_driver_remove_connection):
6078 * bus/services.c: (bus_service_free):
6080 New file that handles communication and registreation with the bus
6083 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6085 * dbus/dbus-connection.c: (dbus_connection_send_message):
6086 Add a new client_serial parameter.
6088 (dbus_connection_send_message_with_reply):
6089 Remove a @todo since we've implemented the blocking function.
6091 (dbus_connection_send_message_with_reply_and_block):
6092 New function that sends a message and waits for a reply and
6093 then returns the reply.
6095 * dbus/dbus-connection.h:
6098 * dbus/dbus-errors.c: (dbus_result_to_string):
6099 * dbus/dbus-errors.h:
6100 Add new DBUS_RESULT.
6102 * dbus/dbus-message-internal.h:
6103 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6104 (_dbus_message_set_sender), (dbus_message_write_header),
6105 (dbus_message_new_reply), (decode_header_data),
6106 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6107 * dbus/dbus-message.h:
6108 Add new functions that set the reply serial and sender.
6109 Also marshal and demarshal them correctly and add test.
6111 * dbus/dbus-protocol.h:
6112 Add new DBUS_MESSAGE_TYPE_SENDER.
6115 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6116 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6117 (dbus_connection_hookup_with_g_main):
6118 * glib/test-dbus-glib.c: (main):
6119 Rewrite to use GIOChannel and remove the GSource crack.
6121 * test/echo-client.c: (main):
6122 * test/watch.c: (check_messages):
6123 Update for changed APIs
6125 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6127 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6129 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6130 Create a DBusTimeoutList.
6131 (dbus_connection_set_timeout_functions): Add new function to
6132 set timeout callbacks
6134 * dbus/dbus-connection.h: Add public DBusTimeout API.
6136 * dbus/dbus-message.c: (dbus_message_get_service):
6137 * dbus/dbus-message.h: New function.
6139 * dbus/dbus-server.c: Fix small doc typo.
6141 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6143 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6145 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6146 of the string, just as long as specified.
6148 2003-01-19 Havoc Pennington <hp@pobox.com>
6150 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6153 * dbus/dbus-server.c (dbus_server_set_max_connections)
6154 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6155 keep track of current number of connections, and add API for
6156 setting a max (but haven't implemented enforcing the max yet)
6158 2003-01-18 Havoc Pennington <hp@pobox.com>
6160 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6161 reading/writing if read_watch != NULL or write_watch != NULL.
6163 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6164 the message loader code to actually load message->header and
6165 message->body into the newly-created message.
6167 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6170 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6171 (dbus_connection_get_max_message_size)
6172 (dbus_connection_set_max_live_messages_size)
6173 (dbus_connection_get_max_live_messages_size): implement some
6174 resource limitation functions
6176 * dbus/dbus-resources.c: new file implementing some of the
6177 resource limits stuff
6179 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6180 missing docs, add @todo to handle OOM etc.
6182 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6185 2003-01-18 Havoc Pennington <hp@pobox.com>
6187 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6188 connection if it hasn't been already.
6190 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6191 replace with DisconnectFunction.
6193 2003-01-18 Havoc Pennington <hp@pobox.com>
6195 Building --disable-verbose-mode --disable-asserts --disable-tests
6196 cuts the library from 112K to 45K or so
6198 * configure.in: check for varargs macro support,
6199 add --enable-verbose-mode, --enable-asserts.
6201 * dbus/dbus-internals.h (_dbus_assert): support
6203 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6205 2003-01-18 Havoc Pennington <hp@pobox.com>
6207 * dbus/dbus-test.c: include config.h so that tests actually run
6209 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6210 so the failure mode when that assumption fails will be plenty
6213 2003-01-18 Havoc Pennington <hp@pobox.com>
6215 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6217 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6220 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6221 since we don't want to use those in make check
6223 2003-01-15 Havoc Pennington <hp@redhat.com>
6229 2003-01-15 Havoc Pennington <hp@redhat.com>
6231 * test/Makefile.am: fix so that test source code ends up in the
6232 distribution on make distcheck
6234 2003-01-15 Havoc Pennington <hp@redhat.com>
6240 2003-01-15 Havoc Pennington <hp@redhat.com>
6242 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6243 fix build when --disable-tests
6245 * Makefile.am (EXTRA_DIST): put HACKING in here
6247 * HACKING: document procedure for making a tarball release.
6249 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6251 * bus/connection.c: (connection_error_handler),
6252 (bus_connection_setup):
6253 * bus/main.c: (main):
6254 Make sure that the DBusConnectionData struct is NULLed
6255 out to prevent a segfault.
6257 * dbus/dbus-errors.c: (dbus_result_to_string):
6258 * dbus/dbus-errors.h:
6259 * dbus/dbus-message.c: (dbus_message_get_fields),
6260 (dbus_message_get_fields_valist), (_dbus_message_test):
6261 * dbus/dbus-message.h:
6262 Make dbus_message_get_fields return a result code so we can
6263 track invalid fields as well as oom.
6265 2003-01-11 Havoc Pennington <hp@pobox.com>
6267 * configure.in: change --enable-test/--enable-ansi action-if-given
6268 to enable_foo=$enableval instead of enable_foo=yes
6270 2003-01-08 Havoc Pennington <hp@pobox.com>
6272 * dbus/dbus-string.c (_dbus_string_align_length): new function
6274 * dbus/dbus-test-main.c: move main() for test app here
6276 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6277 symbol to run tests, because dbus-test isn't in the main
6280 Code review nitpicks.
6282 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6283 for people with narrow emacs ;-). Assert client_serial was filled
6284 in. Assert message->name != NULL.
6285 (dbus_message_append_fields): have "first_field_type" arg separate
6286 from va list, needed for C++ binding that also uses varargs IIRC
6287 and helps with type safety
6288 (dbus_message_new): add @todo about using DBusString to store
6289 service/name internally
6290 (dbus_message_new): don't leak ->service and ->name on OOM later
6292 (dbus_message_unref): free the service name
6293 (dbus_message_get_fields): same change to varargs
6294 i.e. first_field_type
6295 (_dbus_message_loader_return_buffer): assert that the message data
6296 is aligned (if not it's a bug in our code). Put in verbose griping
6297 about why we set corrupted = TRUE.
6298 (decode_header_data): add FIXME that char* is evil. Was going to
6299 add FIXME about evil locale-specific string.h strncmp, but just
6300 switched to wacky string-as-uint32 optimization. Move check for
6301 "no room for field name" above get_const_data_len() to avoid
6302 assertion failure in get_const_data_len if we have trailing 2
6303 bytes or the like. Check for service and name fields being
6304 provided twice. Don't leak service/name on error. Require field
6305 names to be aligned to 4 bytes.
6307 * dbus/dbus-marshal.c: move byte swap stuff to header
6308 (_dbus_pack_int32): uscore-prefix
6309 (_dbus_unpack_int32): uscore-prefix
6310 (_dbus_unpack_uint32): export
6311 (_dbus_demarshal_string): add @todo complaining about use of
6313 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6314 handling allowing corrupt data to go unchecked
6316 2003-01-08 Havoc Pennington <hp@redhat.com>
6318 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6319 to the select() as needed for authentication. (should be using
6320 _dbus_poll() not select, but for another day)
6322 * dbus/dbus.h: include dbus/dbus-protocol.h
6324 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6326 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6329 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6331 * dbus/dbus-internals.c: (_dbus_type_to_string):
6332 New function that returns a string describing a type.
6334 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6335 * dbus/dbus-marshal.h:
6336 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6337 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6338 (dbus_message_iter_get_byte_array):
6339 * dbus/dbus-message.h:
6340 Add new convenience functions for appending and getting message fields.
6341 Also add demarshalling routines for byte arrays.
6343 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6345 * dbus/dbus-connection-internal.h:
6346 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6347 (_dbus_connection_get_next_client_serial),
6348 (dbus_connection_send_message):
6349 * dbus/dbus-internals.h:
6350 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6351 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6352 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6353 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6354 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6355 (_dbus_verbose_bytes), (_dbus_marshal_test):
6356 * dbus/dbus-marshal.h:
6357 * dbus/dbus-message-internal.h:
6358 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6359 (dbus_message_write_header), (_dbus_message_lock),
6360 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6361 (dbus_message_get_name), (dbus_message_append_int32),
6362 (dbus_message_append_uint32), (dbus_message_append_double),
6363 (dbus_message_append_string), (dbus_message_append_byte_array),
6364 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6365 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6366 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6367 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6368 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6369 (decode_header_data), (_dbus_message_loader_return_buffer),
6370 (message_iter_test), (_dbus_message_test):
6371 * dbus/dbus-message.h:
6372 * dbus/dbus-protocol.h:
6373 * dbus/dbus-test.c: (main):
6375 * glib/test-dbus-glib.c: (message_handler), (main):
6376 * test/echo-client.c: (main):
6377 * test/watch.c: (check_messages):
6378 Make messages sendable and receivable for real.
6380 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6382 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6383 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6384 * dbus/dbus-message.c: (dbus_message_append_int32),
6385 (dbus_message_append_uint32), (dbus_message_append_double),
6386 (dbus_message_append_string), (dbus_message_append_byte_array):
6387 Handle OOM restoration.
6389 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6391 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6392 (_dbus_demarshal_string), (_dbus_marshal_test):
6393 * dbus/dbus-marshal.h:
6394 * dbus/dbus-message.c: (dbus_message_get_name),
6395 Document these functions.
6397 (dbus_message_append_int32), (dbus_message_append_uint32),
6398 (dbus_message_append_double), (dbus_message_append_string),
6399 (dbus_message_append_byte_array):
6400 * dbus/dbus-message.h:
6401 Add functions for adding message fields of different types.
6403 * dbus/dbus-protocol.h:
6404 Add the different types.
6406 2003-01-05 Havoc Pennington <hp@pobox.com>
6408 * bus/connection.c: implement routines for handling connections,
6409 first thing is keeping a list of owned services on each connection
6410 and setting up watches etc.
6412 * bus/services.c: implement a mapping from service names to lists
6415 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6417 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6418 to use static mutexes for global data
6420 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6421 collection of functions to set/get application-specific data
6422 on the DBusConnection.
6424 2003-01-04 Havoc Pennington <hp@pobox.com>
6426 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6427 (_dbus_poll): new function
6429 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6432 * bus/loop.c: initial code for the daemon main loop
6434 2003-01-04 Havoc Pennington <hp@pobox.com>
6436 * test/watch.c (error_handler): make it safe if the error handler
6437 is called multiple times (if we s/error handler/disconnect
6438 handler/ we should just guarantee it's called only once)
6440 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6441 error handler on disconnect (it's quite possible we should
6442 just change the error handler to a "disconnect handler," I'm
6443 not sure we have any other meaningful errors)
6445 * configure.in: check for getpwnam_r
6447 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6448 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6449 mechanism as in SASL spec, using socket credentials
6451 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6452 (_dbus_send_credentials_unix_socket): new function
6454 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6456 (_dbus_write): only check errno if <0 returned
6457 (_dbus_write_two): ditto
6459 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6461 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6462 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6463 (_dbus_marshal_test):
6464 * dbus/dbus-marshal.h:
6465 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6466 to _dbus_marshal_utf8_string. Also fix some tests.
6468 2002-12-28 Harri Porten <porten@kde.org>
6470 * configure.in: added check for C++ compiler and a very cheesy
6471 check for the Qt integration
6473 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6475 * qt/Makefile.am: added
6477 * qt/.cvsignore: added
6479 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6480 latter, added #ifdef QT_THREAD_SUPPORT guard.
6482 * dbus/Makefile.am: added missing headers for make dist
6484 2002-12-28 Kristian Rietveld <kris@gtk.org>
6486 * dbus/Makefile.am: fixup export-symbols-regex.
6488 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6490 * acinclude.m4: Add this file and put the
6491 PKG_CHECK_MODULE macro in it.
6493 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6495 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6496 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6497 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6498 (_dbus_marshal_test):
6499 Make the demarshalling routines align the pos argument.
6500 Add string marshalling tests and fix the obvious bugs
6503 2002-12-26 Havoc Pennington <hp@pobox.com>
6505 * dbus/dbus-auth.c: fixes fixes fixes
6507 * dbus/dbus-transport-unix.c: wire up support for
6508 encoding/decoding data on the wire
6510 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6511 (_dbus_auth_decode_data): append to target string
6512 instead of nuking it.
6514 2002-12-26 Havoc Pennington <hp@pobox.com>
6516 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6517 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6520 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6521 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6522 now). Main point is because I wanted unpack_uint32 to implement
6524 (_dbus_verbose_bytes): new function
6526 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6528 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6529 mechanism to handle a corrupt message stream
6530 (_dbus_message_loader_new): fix preallocation to only prealloc,
6533 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6534 (_dbus_string_test): enhance tests for copy/move and fix the
6537 * dbus/dbus-transport-unix.c: Hold references in more places to
6538 avoid reentrancy problems
6540 * dbus/dbus-transport.c: ditto
6542 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6543 leak reference count in no-message case
6545 * test/watch.c (do_mainloop): handle adding/removing watches
6546 during iteration over the watches. Also, ref the connection/server
6547 stored on a watch, so we don't try to mangle a destroyed one.
6549 * dbus/dbus-transport-unix.c (do_authentication): perform
6552 * dbus/dbus-auth.c (get_state): add a state
6553 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6554 (_dbus_auth_get_unused_bytes): append the unused bytes
6555 to the passed in string, rather than prepend
6557 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6558 the auth conversation DBusAuth
6560 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6561 (_dbus_transport_new_for_domain_socket): when creating a
6562 transport, pass in whether it's a client-side or server-side
6563 transport so we know which DBusAuth to create
6565 2002-12-03 Havoc Pennington <hp@pobox.com>
6567 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6568 _after_ finalizing the derived members
6569 (unix_connection_set): unref watch if we fail to add it
6571 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6572 transport first, so that the connection owned by the
6573 transport will be valid as the transport finalizes.
6575 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6576 if necessary, and remove watches from the connection.
6578 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6580 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6582 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6583 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6584 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6585 (_dbus_marshal_test):
6586 * dbus/dbus-marshal.h:
6587 Add string marshal functions and have the demarshal functions
6588 return the new position.
6590 2002-12-25 Havoc Pennington <hp@pobox.com>
6592 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6593 it is a simple protocol that just maps directly to SASL.
6595 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6596 initial implementation, not actually used yet.
6598 * dbus/dbus-string.c (_dbus_string_find): new function
6599 (_dbus_string_equal): new function
6600 (_dbus_string_base64_encode): new function
6601 (_dbus_string_base64_decode): new function
6603 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6606 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6607 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6608 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6609 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6610 * dbus/dbus-marshal.h:
6611 * dbus/dbus-protocol.h:
6612 * dbus/dbus-test.c: (main):
6614 Add un-optimized marshalling/demarshalling routines.
6616 2002-12-25 Harri Porten <porten@kde.org>
6618 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6620 2002-12-24 Zack Rusin <zack@kde.org>
6622 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6623 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6626 2002-12-24 Havoc Pennington <hp@pobox.com>
6628 * glib/dbus-gthread.c: fix include
6630 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6631 I think glib API needs to change, though, as you don't
6632 want to use DBusMessageFunction, you want to use the
6633 DBusMessageHandler object. Probably
6634 dbus_connection_open_with_g_main_loop()
6635 and dbus_connection_setup_g_main_loop() or something like that
6636 (but think of better names...) that just create a connection
6637 that has watch/timeout functions etc. already set up.
6639 * dbus/dbus-connection.c
6640 (dbus_connection_send_message_with_reply): new function just to
6641 show how the message handler helps us deal with replies.
6643 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6645 * dbus/dbus-string.c (_dbus_string_test): free a string that
6648 * dbus/dbus-hash.c: use memory pools for the hash entries
6649 (rebuild_table): be more paranoid about overflow, and
6650 shrink table when we can
6651 (_dbus_hash_test): reduce number of sprintfs and write
6652 valid C89. Add tests for case where we grow and then
6653 shrink the hash table.
6655 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6657 * dbus/dbus-connection.c (dbus_connection_register_handler)
6658 (dbus_connection_unregister_handler): new functions
6660 * dbus/dbus-message.c (dbus_message_get_name): new
6662 * dbus/dbus-list.c: fix docs typo
6664 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6665 an object representing a handler for messages.
6667 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6670 * glib/dbus-gthread.c: (dbus_gthread_init):
6671 Don't use the gdbus prefix for public functions.
6673 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6677 Add GLib checks and fixup .pc files
6681 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6682 (gdbus_connection_check), (gdbus_connection_dispatch),
6683 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6684 (dbus_connection_gsource_new):
6685 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6686 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6687 * glib/test-dbus-glib.c: (message_handler), (main):
6690 2002-12-15 Harri Porten <porten@kde.org>
6692 * autogen.sh: check for libtoolize before attempting to use it
6694 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6697 * .cvsignore: ignore more stamp files
6699 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6701 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6702 without make install.
6704 2002-12-15 Havoc Pennington <hp@pobox.com>
6706 * dbus/dbus-threads.c: add thread stubs that a higher library
6707 layer can fill in. e.g. the GLib wrapper might fill them in with
6708 GThread stuff. We still need to use this thread API to
6709 thread-safe-ize the library.
6711 2002-12-12 Havoc Pennington <hp@pobox.com>
6713 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6714 below new interfaces and include fewer system headers.
6716 * dbus/dbus-sysdeps.c (_dbus_read): new function
6717 (_dbus_write): new function
6718 (_dbus_write_two): new function
6719 (_dbus_connect_unix_socket): new function
6720 (_dbus_listen_unix_socket): new function
6722 * dbus/dbus-message-internal.h: change interfaces to use
6725 2002-12-11 Havoc Pennington <hp@pobox.com>
6727 * dbus/dbus-types.h: add dbus_unichar
6729 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6731 * dbus/dbus-connection.c (dbus_connection_send_message): return
6734 * dbus/dbus-transport.c: include dbus-watch.h
6736 * dbus/dbus-connection.c: include dbus-message-internal.h
6738 * HACKING: add file with coding guidelines stuff.
6740 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6741 handling here, for security purposes (as in vsftpd). Not actually
6742 using this class yet.
6744 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6745 system/libc usage here, as in vsftpd, for ease of auditing (and
6746 should also simplify portability). Haven't actually moved all the
6747 system/libc usage into here yet.
6749 2002-11-25 Havoc Pennington <hp@pobox.com>
6751 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6752 always print the first verbose message.
6754 2002-11-24 Havoc Pennington <hp@pobox.com>
6756 * test/echo-client.c, test/echo-server.c: cheesy test
6759 * configure.in (AC_CHECK_FUNCS): check for writev
6761 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6764 * dbus/dbus-list.c (_dbus_list_foreach): new function
6766 * dbus/dbus-internals.c (_dbus_verbose): new function
6768 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6769 representing a server that listens for connections.
6771 * dbus/.cvsignore: create
6773 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6774 public API for reporting errors
6776 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6777 public object representing a connection that
6778 sends/receives messages. (Same object used for
6779 both client and server.)
6781 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6782 Basic abstraction for different kinds of stream
6783 that we might read/write messages from.
6785 2002-11-23 Havoc Pennington <hp@pobox.com>
6787 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6790 * dbus/dbus-test.c (main): add list test, and include
6791 dbus-test.h as intended
6793 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6794 (_dbus_hash_table_remove_int): return value indicates
6795 whether the entry existed to remove
6797 * dbus/dbus-list.c: add linked list utility class,
6800 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6803 2002-11-23 Havoc Pennington <hp@pobox.com>
6805 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6806 DBUS_END_DECLS to nothing, that should fix this once and for all
6808 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6810 * dbus/dbus-message.c, dbus/dbus-hash.c:
6811 add some missing @brief
6813 2002-11-23 Havoc Pennington <hp@pobox.com>
6815 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6816 to avoid confusing Doxygen
6818 * dbus/dbus-hash.c: @} not }@
6820 * dbus/dbus-message.c (struct DBusMessage): split out
6823 2002-11-23 Havoc Pennington <hp@pobox.com>
6825 * configure.in: pile on more warning flags if using gcc
6827 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6828 to document static functions
6830 * configure.in: add summary to end of configure so it
6831 looks nice and attractive
6833 * dbus/dbus-hash.c: finish implementation and write unit
6836 * configure.in: add --enable-tests to enable unit tests
6838 * dbus/dbus-test.c: test program to run unit tests
6839 for all files in dbus/*, initially runs a test for
6842 * dbus/dbus-internals.h: file to hold some internal utility stuff
6844 2002-11-22 Havoc Pennington <hp@redhat.com>
6846 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6847 "ported" away from Tcl
6849 * dbus/dbus-types.h: header for types such as dbus_bool_t
6851 2002-11-22 Havoc Pennington <hp@redhat.com>
6853 * dbus/dbus.h: fixups for doc warnings
6855 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6857 (QUIET): make it quiet so we can see warnings
6859 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6861 2002-11-22 Havoc Pennington <hp@redhat.com>
6863 * Makefile.am: include "Doxyfile" target in all-local
6865 * configure.in: generate the Doxyfile
6867 * Doxyfile.in: move Doxyfile here, so we can use
6868 configure to generate a Doxyfile with the right
6871 2002-11-22 Havoc Pennington <hp@redhat.com>
6873 * dbus/dbus-message.c: move inline docs into .c file
6875 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6876 so all docs are under doc/
6877 (MAN_EXTENSION): generate man pages. Use extension
6878 ".3dbus" which matches ".3qt" on my system,
6879 I guess this is OK, I don't know really.
6880 (FILE_PATTERNS): look for .c files not .h, makes sense
6883 2002-11-22 Havoc Pennington <hp@pobox.com>
6885 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6886 because any app can be a server, and any app can be a client,
6887 the bus is a special kind of server.
6889 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
6891 * Doxyfile : adding. Still needs Makefile rules to be generated
6892 automatically (just run "doxygen" in the toplevel dir for now to
6895 * dbus/dbus-message.h : Adding sample docs (javadoc since
6896 resembles gtk-doc a little more)
6898 * dbus/dbus.h : Adding sample docs
6900 2002-11-21 Havoc Pennington <hp@redhat.com>
6902 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6903 so we can allow ourselves to include files directly,
6904 instead of having to use dbus.h
6906 * dbus/dbus.h: fill in
6908 * dbus/dbus-message.h: sketch out a sample header file.
6909 Include griping if you include it directly instead of
6912 * dbus/dbus-macros.h: new file with macros for extern "C",
6913 TRUE/FALSE, NULL, etc.
6915 * doc/file-boilerplate.c: put include guards in here
6917 2002-11-21 Havoc Pennington <hp@redhat.com>
6919 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6921 * COPYING: include the GPL as well, and license code
6922 under both AFL and GPL.
6924 2002-11-21 Havoc Pennington <hp@redhat.com>
6926 * acconfig.h: get rid of this
6928 * autogen.sh (run_configure): add --no-configure option
6930 * configure.in: remove AC_ARG_PROGRAM to make
6931 autoconf complain less. add AC_PREREQ.
6932 add AC_DEFINE third arg.
6934 2002-11-21 Anders Carlsson <andersca@codefactory.se>
6937 Fix references so we can distcheck.
6939 2002-11-21 Havoc Pennington <hp@redhat.com>
6941 * Initial module creation