1 2004-07-24 Havoc Pennington <hp@redhat.com>
3 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
8 * configure.in: add --enable-selinux
10 * bus/policy.c (bus_policy_merge): add FIXME to a comment
12 * bus/main.c (main): initialize and shut down selinux
14 * bus/connection.c: store SELinux ID on each connection, to avoid
15 repeated getting of the string context and converting it into
18 * bus/bus.c (bus_context_get_policy): new accessor, though it
20 (bus_context_check_security_policy): check whether the security
21 context of sender connection can send to the security context of
24 * bus/config-parser.c: add parsing for <selinux> and <associate>
26 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
27 implement dbus_connection_get_unix_fd()
29 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
30 function, used by the selinux stuff
32 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
34 * bus/config-loader-libxml.c: complete the implementation of
35 libxml backend for config file loader. Doesn't work with full OOM
38 * configure.in: change error when selecting libxml into a warning.
40 * test/data/invalid-config-files: add two non-well-formed XML
43 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
45 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
46 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
47 be necessary to read all the buffer. (bug #894)
49 * bus/activation.c (bus_activation_activate_service): fix a
50 potential assertion failure (bug #896). Small optimization in the
51 case of auto-activation messages.
53 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
54 add test case for byte-through-vararg bug (#901). patch by Kimmo
57 2004-07-28 Anders Carlsson <andersca@gnome.org>
60 * python/dbus_bindings.pyx.in:
61 Add dbus.init_gthreads (), allow emit_signal to pass
62 arguments to the signal.
64 2004-07-24 Havoc Pennington <hp@redhat.com>
66 * AUTHORS: add some people, not really comprehensively, let me
69 2004-07-24 Havoc Pennington <hp@redhat.com>
71 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
74 * test/Makefile.am (DIST_SUBDIRS): here also
76 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
78 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
79 breaking build on Solaris, reported by Farhad Saberi on the ML.
81 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
82 va_arg invocation to account for integer promotion in the case of
83 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
85 * bus/services.c (bus_service_remove_owner): fix bug #902, use
86 _dbus_list_get_first_link, not _dbus_list_get_first.
88 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
90 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
91 handler functions so that the asserts in _dbus_object_subtree_unref
94 * dbus/dbus-transport-unix.c (do_reading):
95 _dbus_transport_queue_messages return value is of type
96 dbus_bool_t, not DBusDispatchStatus.
98 2004-07-19 David Zeuthen <david@fubar.dk>
100 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
103 (check_get_connection_unix_user): Debug says GetProperty; but the
104 method is called GetConnectionUnixUser
105 (check_get_connection_unix_process_id): New function
106 (bus_dispatch_test): Actually call check_get_connection_unix_user();
107 also call check_get_connection_unix_process_id()
110 (bus_driver_handle_get_connection_unix_process_id): New function,
111 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
115 (handle_server_data_external_mech): Set pid from the credentials
116 obtained from the socket
118 * dbus/dbus-connection.c:
119 (dbus_connection_get_unix_process_id): New function
121 * dbus/dbus-connection.h:
122 Add prototype for dbus_connection_get_unix_process_id
124 * dbus/dbus-transport.c:
125 (_dbus_transport_get_unix_process_id): New function
127 * dbus/dbus-transport.h:
128 Add prototype for _dbus_transport_get_unix_process_id
130 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
132 * dbus/dbus-message.c: Message counter fix, patch by Christian
133 Hammond <chipx86@gnupdate.org>
135 2004-07-18 Seth Nickell <seth@gnome.org>
138 * python/dbus_bindings.pyx.in:
139 * python/tests/test-client.py:
141 Add dbus.ByteArray and dbus_bindings.ByteArray
142 types so that byte streams can be passed back.
144 Give jdahlin the heaps of credit that are so
147 2004-07-12 Seth Nickell <seth@gnome.org>
151 Add message argument to the default object_method_handler
154 * python/dbus_bindings.pyx.in:
156 Automatically return NIL when passed an empty list
157 (we can't pass back a list since lists are typed
158 and we don't have any idea what type the the client
159 intended the list to be... :-( )
161 2004-07-10 Seth Nickell <seth@gnome.org>
163 * python/examples/Makefile.am:
165 Fix distcheck breakage caused by new examples.
167 2004-07-10 Seth Nickell <seth@gnome.org>
171 Add "message" argument to service-side dbus.Object
172 methods. This will break existing services written
173 using the python bindings, but will allow extraction
174 of all the message information (e.g. who its from).
176 Add improved "object oriented" signal handling/emission.
178 * python/examples/example-service.py:
182 * python/examples/example-signal-emitter.py:
183 * python/examples/example-signal-recipient.py:
185 Two new examples that show how to emit and receive
186 signals using the new APIs.
188 * python/examples/example-signals.py:
189 * python/examples/gconf-proxy-service.py:
190 * python/examples/gconf-proxy-service2.py:
192 Add "message" argument to service methods.
194 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
196 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
197 * dbus/bus.c (dbus_bus_get_unix_user)
198 * doc/dbus-specification.xml: implement GetConnectionUnixUser
199 method of org.freedesktop.DBus interface.
201 * bus/dispatch.c: test case
203 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
205 * python/Makefile.am: switched include directory from glib/ to dbus/
206 since dbus-glib.h moved
208 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
210 * configure.in: prevent building the gcj stuff and libxml loader
211 since they are broken.
213 2004-06-20 Havoc Pennington <hp@redhat.com>
215 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
216 codes from the dbus error names
218 * glib/dbus-glib.h: move to subdir dbus/ since it's included
219 as dbus/dbus-glib.h and that breakage is now visible due to
220 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
222 * glib/dbus-glib.h: s/gproxy/g_proxy/
224 * dbus/dbus-shared.h: new header to hold stuff shared with
227 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
230 * glib/dbus-glib.h (dbus_set_g_error): move to
233 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
234 of stuff to enable this
236 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
238 * a bunch of other changes with the same basic "separate glib
239 bindings from dbus.h" theme
241 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
243 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
245 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
247 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
249 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
250 the reply value of the ServiceExists message.
252 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
254 * python/dbus_bindings.pyx.in: No longer need to parse path
255 elements and pass them as arrays of strings. The C API now
256 accepts plain path strings.
257 (_build_parsed_path): removed
259 2004-06-07 Havoc Pennington <hp@redhat.com>
261 * doc/TODO: remove auto-activation item since it's done; sort
262 items by importance/milestone
264 2004-06-07 Havoc Pennington <hp@redhat.com>
266 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
267 random signature when using REQUIRED_FIELDS (this hack won't work
270 * dbus/dbus-message.c: change the signature to be a header field,
271 instead of message->signature special-case string. Incremental
272 step forward. Then we can fix up code to send the signature in the
273 message, then fix up code to validate said signature, then fix up
274 code to not put the typecodes inline, etc.
275 (load_one_message): don't make up the signature after the fact
276 (decode_header_data): require signature field for the known
279 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
281 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
283 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
285 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
287 * mono/Handler.cs: Updated to follow new path argument for
288 (un-)registering objects.
290 * mono/example/Makefile.am:
292 * configure.in: Bumped required version for mono and use new -pkg
295 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
297 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
298 registration functions take the path argument as char* instead of
301 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
302 split off the path decompostion part of
303 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
306 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
308 2004-06-02 Kristian Høgsberg <krh@redhat.com>
310 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
311 machine approach. A state is implemented as a function that
312 handles incoming events as specified for that state.
314 * doc/dbus-specification.xml: Update auth protocol state machine
315 specification to match implementation. Remove some leftover
318 2004-06-02 Kristian Høgsberg <krh@redhat.com>
320 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
321 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
324 * Doxyfile.in: remove deprecated options.
326 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
327 glib/test-thread.h, glib/test-thread-client.c,
328 glib/test-thread-server.c, glib/test-profile.c,
329 glib/test-dbus-glib.c: remove these unused files.
331 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
333 * dbus/dbus-object-tree.c
334 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
335 non-fallback handlers (bug #684).
336 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
337 (find_subtree_recurse): report wether the returned subtree is an
338 exact match or a "fallback" match higher up in the tree.
339 (object_tree_test_iteration): update test case.
341 2004-06-01 Seth Nickell <seth@gnome.org>
343 * python/dbus_bindings.pyx.in:
344 * python/tests/test-client.py:
346 Round off basic type support. Add dicts (yay!), and
347 remaining array types.
349 Make MessageIter more general so it works for dicts too.
351 Mark all loop variables as C integers.
353 2004-05-31 Havoc Pennington <hp@redhat.com>
355 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
358 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
360 * glib/dbus-glib-tool.c (main): set up to have a --self-test
361 option that runs the tests, and start filling in some code
362 including for starters just dumping the interfaces to stdout
364 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
366 * test/data/valid-introspection-files/lots-of-types.xml: test of
367 an example introspection file
369 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
372 2004-05-31 Seth Nickell <seth@gnome.org>
374 * python/dbus_bindings.pyx.in:
375 * python/tests/test-client.py:
380 Fix string array memory trashing bug... oops...
382 2004-05-30 Seth Nickell <seth@gnome.org>
386 Add a nicer-but-less-flexible alternate API for handling
387 calls to virtual objects in dbus.ObjectTree.
389 Screw up the argument order to the dbus.Object constructor
390 for consistency with dbus.ObjectTree (and to make dbus_methods
391 optional for future extension)
393 * python/examples/Makefile.am:
394 * python/examples/gconf-proxy-service.py:
395 * python/examples/gconf-proxy-service2.py:
397 Alternate implementation of gconf-proxy-service using the
398 nicer dbus.ObjectTree API.
400 * python/examples/example-service.py:
401 * python/tests/test-server.py
403 Reverse the argument order to deal with dbus.Object constructor
406 2004-05-30 Seth Nickell <seth@gnome.org>
408 * python/examples/example-client.py:
409 * python/examples/example-service.py:
411 Take it back. Lists seem to work but they're broken
412 in the test suite. Make the base examples use
415 2004-05-30 Seth Nickell <seth@gnome.org>
417 * python/dbus_bindings.pyx.in:
418 * python/tests/test-client.py:
420 Add some more tests and fix errors that crop up.
421 Unfortunately, currently it seems like marshalling
422 and unmarshalling of lists is completely broken :-(
424 2004-05-30 Seth Nickell <seth@gnome.org>
426 * python/dbus_bindings.pyx.in:
428 Add support for ObjectPath type.
432 Refactor message handling code to a common function.
434 * python/tests/test-client.py:
435 * python/tests/test-server.py:
437 Add tests that check to make sure values of all types
438 can be echoed from a service w/o mangling.
440 2004-05-29 Seth Nickell <seth@gnome.org>
444 Add ObjectTree class which allows implementation
445 of trees of "virtual" objects. Basically the python
446 wrapper for "register_fallback".
448 * python/examples/Makefile.am
449 * python/examples/gconf-proxy-client.py:
450 * python/examples/gconf-proxy-service.py:
452 Implement a simple GConf proxy service that supports
453 get/set on string and int GConf keys using the ObjectTree.
455 2004-05-29 Seth Nickell <seth@gnome.org>
458 * python/examples/example-client.py:
459 * python/examples/example-service.py:
460 * python/examples/list-system-services.py:
462 Add SessionBus, SystemBus and ActivationBus classes
463 so you don't need to know the special little BUS_TYPE
466 2004-05-29 Havoc Pennington <hp@redhat.com>
468 * bus/config-parser.c (process_test_valid_subdir): temporarily
469 stop testing config parser OOM handling, since expat has issues
470 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
472 * bus/dbus-daemon-1.1.in: change requested_reply to
473 send_requested_reply/receive_requested_reply so we can send the
474 replies, not just receive them.
476 * bus/config-parser.c: parse the new
477 send_requested_reply/receive_requested_reply
479 * bus/policy.c (bus_client_policy_check_can_send): add
480 requested_reply argument and use it
482 * bus/bus.c (bus_context_check_security_policy): pass through
483 requested_reply status to message send check
485 * bus/system.conf.in: adapt to requested_reply change
487 2004-05-28 Havoc Pennington <hp@redhat.com>
489 * test/glib/test-service-glib.c (main): remove unused variable
491 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
493 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
494 from the enum, no longer in use.
496 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
499 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
500 whether error_name passed in is a valid error name.
502 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
504 * dbus/dbus-message.c (dbus_message_get_args): Added support for
505 OBJECT_PATH and OBJECT_PATH_ARRAY
507 2004-05-28 Seth Nickell <seth@gnome.org>
509 * python/examples/Makefile.am:
511 Forget to add Makefile.am. Do not pass go.
513 2004-05-28 Michael Meeks <michael@ximian.com>
515 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
518 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
520 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
521 (_dbus_message_iter_get_basic_type_array): impl.
522 drastically simplify ~all relevant _get methods to use these.
523 (_dbus_message_iter_append_basic_array),
524 (dbus_message_iter_append_basic): impl
525 drastically simplify ~all relevant _append methods to use these.
527 * dbus/dbus-message-builder.c (parse_basic_type)
528 (parse_basic_array, lookup_basic_type): impl.
529 (_dbus_message_data_load): prune scads of duplicate /
532 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
533 (_dbus_demarshal_basic_type): implement,
534 (demarshal_and_validate_len/arg): beef up debug.
535 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
537 2004-05-27 Seth Nickell <seth@gnome.org>
540 * python/Makefile.am:
542 Include the example python apps in the tarball.
544 * python/examples/list-system-services.py
546 Add a python new example that fetches the list of services
549 2004-05-27 Seth Nickell <seth@gnome.org>
552 * python/dbus_bindings.pyx.in:
554 Fix failure to notify that a signal was not handled,
555 resulted in hung functions.
557 2004-05-25 Colin Walters <walters@redhat.com>
559 * tools/dbus-monitor.c (main): Monitor all types of messages.
561 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
563 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
564 which unregisters the object path and disposes the handler.
566 2004-05-23 Kristian Høgsberg <krh@redhat.com>
568 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
570 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
571 operands to && so we call dbus_message_iter_next () for the last
574 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
576 * dbus/dbus-object-tree.c
577 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
578 children even if the requested path isn't registered.
579 (object_tree_test_iteration): test object_tree_list_registered.
581 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
584 2004-05-20 Kristian Høgsberg <krh@redhat.com>
586 * doc/TODO: Remove resolved items.
588 * bus/expirelist.h (struct BusExpireList): remove unused n_items
591 * bus/connection.c (bus_connections_expect_reply): Enforce the
592 per-connection limit on pending replies.
594 Patch from Jon Trowbridge <trow@ximian.com>:
596 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
597 up a watch that triggers a config reload when one end of the pipe
599 (signal_handler): Instead of doing the config reload in our SIGHUP
600 handler, just write to the reload pipe and let the associated
601 watch handle the reload when control returns to the main loop.
603 * bus/driver.c (bus_driver_handle_reload_config): Added.
604 Implements a ReloadConfig method for requesting a configuration
605 file reload via the bus driver.
607 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
609 * HACKING: Updated release instructions concerning the wiki page.
611 2004-05-18 Kristian Høgsberg <krh@redhat.com>
613 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
614 filter against auth->allowed_mechs; we only add allowed mechs in
617 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
618 ALLOWED_MECHS to auth-script format so we can set the list of
621 * data/auth/client-out-of-mechanisms.auth-script: New test to
622 check client disconnects when it is out of mechanisms to try.
624 * dbus/dbus-auth.c (process_command): Remove check for lines
625 longer that 1 MB; we only buffer up maximum 16 kB.
627 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
628 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
629 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
630 assume there might be unused bytes.
632 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
633 client-out-of-mechs, it is handled in process_reject(). Move check
634 for max failures to send_rejected(), as it's a server-only thing.
636 * dbus/dbus-auth.c: Factor out protocol reply code into functions
637 send_auth(), send_data(), send_rejected(), send_error(),
638 send_ok(), send_begin() and send_cancel().
640 2004-05-17 Kristian Høgsberg <krh@redhat.com>
642 Remove base64 encoding, replace with hex encoding. Original patch
643 from trow@ximian.com, added error handling.
645 * dbus/dbus-string.c (_dbus_string_base64_encode)
646 (_dbus_string_base64_decode): Remove.
647 (_dbus_string_hex_decode): Add end_return argument so we can
648 distinguish between OOM and invalid hex encoding.
649 (_dbus_string_test): Remove base64 tests and add test case for
652 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
653 Replace base64 with hex.
655 * test/data/auth/invalid-hex-encoding.auth-script: New test case
656 for invalid hex encoded data in auth protocol.
658 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
660 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
663 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
665 * mono/dbus-sharp.dll.config.in: Added for GAC
666 * mono/dbus-sharp.snk: Added for GAC
667 * mono/Assembly.cs.in: Added for GAC
668 * mono/Makefile.am: Changes for GAC installation
669 * configure.in: Added refs for dbus-sharp.dll.config.in and
670 Assembly.cs.in. More fixes for mono testing
671 * mono/example/Makefile.am: Changed var to CSC
672 * Makefile.am: Changed flag name to DBUS_USE_CSC
674 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
676 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
677 * mono/doc/*: Added documentation framework
678 * configure.in: Added monodoc check
679 * README: Added description of mono configure flags
681 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
683 * doc/dbus-specification.xml: Added a "Required" column to the
684 header fields table and changed the "zero or more" verbage in
685 the above paragraph to read "The header must contain the required
686 named header fields and zero or more of the optional named header
688 * test/data/invalid-messages/*.message: Added the required PATH
689 named header field to the tests so that they don't fail on
692 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
694 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
695 the stack by implicitly defining variable and parameter types and
696 removing the hack of defining C pointers as python objects and later
699 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
701 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
703 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
705 * mono/DBusType/Dict.cs: Handle empty dicts
706 * mono/DBusType/Array.cs: Handle empty arrays
707 * mono/Arguments.cs: Handle empty arguments
709 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
711 * dbus-sharp.pc.in: Modified to include include Libs and Requires
714 2004-04-25 Kristian Høgsberg <krh@redhat.com>
716 * test/data/valid-messages/standard-*.message: Update message
717 test scripts to new header field names.
719 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
721 * test/break-loader.c (randomly_do_n_things): tracked down buffer
722 overflow to times_we_did_each_thing array which would chop off the
723 first character of the failure_dir string. Increased the size of
724 the array to 7 to reflect the number of random mutation functions
727 2004-04-21 Kristian Høgsberg <krh@redhat.com>
729 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
730 unix_server->watch here, it is unreffed in disconnect.
731 (_dbus_server_new_for_tcp_socket): convert NULL host to
732 "localhost" here so we don't append NULL to address.
734 * dbus/dbus-server.c (_dbus_server_test): Add test case for
735 various addresses, including tcp with no explicit host.
737 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
739 * dbus/dbus-message.c (decode_header_data, decode_string_field):
740 fix incorrect setting of .name_offset in the HeaderField (it was
741 off by two bytes, positioned right after the name and typecode)
743 * bus/bus.c (bus_context_new, bus_context_unref): test before
744 calling dbus_server_free_data_slot and _dbus_user_database_unref
747 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
750 2004-04-19 Kristian Høgsberg <krh@redhat.com>
752 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
753 _dbus_poll() instead of select().
755 2004-04-15 Jon Trowbridge <trow@ximian.com>
757 * bus/main.c (signal_handler): Reload the configuration files
759 (main): Set up our SIGHUP handler.
761 * bus/bus.c (struct BusContext): Store the config file, user and
762 fork flag in the BusContext.
763 (process_config_first_time_only): Added. Contains the code
764 (previously in bus_context_new) for setting up the BusContext from
765 the BusConfigParser that should only be run the first time the
766 config files are read.
767 (process_config_every_time): Added. Contains the code (previously
768 in bus_context_new) for setting up the BusContext from the
769 BusConfigParser that should be run every time the config files are
771 (load_config): Added. Builds a BusConfigParser from the config
772 files and passes the resulting structure off to
773 process_config_first_time_only (assuming this is the first time)
774 and process_config_every_time.
775 (bus_context_new): All of the config-related code has been moved
776 to process_config_first_time_only and process_config_every_time.
777 Now this function just does the non-config-related initializations
778 and calls load_config.
779 (bus_context_reload_config): Added.
781 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
783 * bus/driver.c (bus_driver_handle_get_service_owner):
784 implement a GetServiceOwner method.
785 * doc/dbus-specification.xml: document it.
786 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
788 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
789 implement, using the bus GetServiceOwner method.
791 * test/glib/test-dbus-glib.c:
792 use dbus_gproxy_new_for_service_owner so that we can receive the
795 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
797 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
798 dbus/dbus-message.c, dbus/dbus-protocol.h
799 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
801 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
802 dbus/dbus-message.c, dbus/dbus-protocol.h
803 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
805 * dbus/dbus-internals.c (_dbus_header_field_to_string):
806 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
807 DBUS_HEADER_FIELD_SENDER resolves to "sender"
809 * doc/dbus-specification.xml (Header Fields Table):
810 s/SERVICE/DESTINATION
811 s/SENDER_SERVICE/SENDER
814 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
816 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
819 2004-04-13 Michael Meeks <michael@ximian.com>
821 * glib/dbus-gobject.c (handle_introspect): split out
822 (introspect_properties): this.
823 (handle_introspect): implement this.
825 * test/glib/Makefile.am: use the absolute path so the bus
826 daemon's chdir ("/") doesn't kill us dead.
828 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
830 2004-04-12 Jon Trowbridge <trow@ximian.com>
832 * bus/config-parser.c (struct BusConfigParser): Added
833 included_files field.
834 (seen_include): Added. Checks whether or not a file has already
835 been included by any parent BusConfigParser.
836 (bus_config_parser_new): Copy the parent's included_files.
837 (include_file): Track which files have been included, and fail on
839 (process_test_valid_subdir): Changed printf to report if we are
840 testing valid or invalid conf files.
841 (all_are_equiv): Changed printf to be a bit clearer about
842 what we are actually doing.
843 (bus_config_parser_test): Test invalid configuration files.
845 2004-04-09 Jon Trowbridge <trow@ximian.com>
847 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
848 argument. If non-null, the newly-constructed BusConfigParser will
849 be initialized with the parent's BusLimits instead of the default
851 (include_file): When including a config file, pass in
852 the current parser as the parent and then copy the BusLimits
853 from the included BusConfigParser pack to the current parser.
854 (process_test_valid_subdir): Renamed from process_test_subdir.
855 (process_test_equiv_subdir): Added. Walks through a directory,
856 descending into each subdirectory and loading the config files
857 it finds there. If any subdirectory contains two config files
858 that don't produce identical BusConfigParser structs, fail.
859 For now, the BusConfigParser's BusPolicies are not compared.
860 (bus_config_parser_test): Call both process_test_valid_subdir and
861 process_test_equiv_subdir.
863 * bus/config-loader-libxml.c (bus_config_load): Take a parent
864 argument and pass it along to the call to bus_config_parser_new.
865 Also made a few small changes to allow this code to compile.
867 * bus/config-loader-expat.c (bus_config_load): Take a parent
868 argument and pass it along to the call to bus_config_parser_new.
870 * bus/bus.c (bus_context_new): Load the config file
871 with a NULL parent argument.
873 2004-03-29 Michael Meeks <michael@ximian.com>
875 * glib/dbus-gobject.c (introspect_properties): split
876 out, fix mangled 'while' flow control.
877 (introspect_signals): implement.
878 (handle_introspect): update.
880 2004-03-29 Michael Meeks <michael@ximian.com>
882 * glib/dbus-gobject.c (set_object_property): split out /
883 re-work, use the property type, and not the message type(!)
884 (get_object_property): ditto.
886 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
887 (dbus_gvalue_marshal): make this code re-usable, needed
888 for signals too, also on both proxy and server side.
889 Re-write for more efficiency / readability.
891 2004-03-29 Michael Meeks <michael@ximian.com>
893 * dbus/dbus-message.c
894 (dbus_message_new_error_printf): impl.
896 * dbus/dbus-connection.c
897 (dbus_connection_unregister_object_path): fix warning.
899 * configure.in: fix no-mono-installed situation.
901 2004-03-27 Havoc Pennington <hp@redhat.com>
903 Patch from Timo Teräs:
905 * tools/dbus-send.c (main): if --print-reply, assume type is
906 method call; support boolean type args
908 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
909 bunch of memleak and logic bugs
911 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
914 * mono/Introspector.cs:
916 * mono/InterfaceProxy.cs:
918 * mono/ProxyBuilder.cs:
920 Added InterfaceProxy class to avoid building proxies for every
924 * dbus-message.c (dbus_message_append_args_valist)
925 (dbus_message_iter_get_object_path)
926 (dbus_message_iter_get_object_path_array)
927 (dbus_message_iter_append_object_path)
928 (dbus_message_iter_append_object_path_array):
929 Added object_path iter functions to handle OBJECT_PATH arguments
931 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
933 First checkin of mono bindings.
936 Build stuff for the bindings
937 * dbus-sharp.pc.in: Added for pkgconfig
939 2004-03-21 Havoc Pennington <hp@redhat.com>
941 * test/test-service.c (main): remove debug spew
943 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
945 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
948 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
949 (dbus_message_iter_init_array_iterator)
950 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
951 indicate whether the iterator is empty
953 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
956 2004-03-19 Havoc Pennington <hp@redhat.com>
962 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
964 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
965 you don't need pyrex to make dist
967 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
970 2004-03-18 Richard Hult <richard@imendio.com>
972 * dbus/dbus-message.c (dbus_message_get_auto_activation)
973 (dbus_message_set_auto_activation): Add doxygen docs.
975 2004-03-16 Richard Hult <richard@imendio.com>
977 * bus/activation.c: (bus_activation_service_created),
978 (bus_activation_send_pending_auto_activation_messages),
979 (bus_activation_activate_service):
981 * bus/dispatch.c: (bus_dispatch),
982 (check_nonexistent_service_auto_activation),
983 (check_service_auto_activated),
984 (check_segfault_service_auto_activation),
985 (check_existent_service_auto_activation), (bus_dispatch_test):
986 * bus/driver.c: (bus_driver_handle_activate_service):
987 * bus/services.c: (bus_registry_acquire_service):
988 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
989 (dbus_message_get_auto_activation):
990 * dbus/dbus-message.h:
991 * dbus/dbus-protocol.h: Implement auto-activation.
993 * doc/dbus-specification.xml: Add auto-activation to the spec.
995 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
997 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
998 fix a bug with CUSTOM types.
1000 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1001 a unit test for this bug (used to fail).
1003 2004-03-12 Mikael Hallendal <micke@imendio.com>
1006 (babysitter_watch_callback): notify all pending activations waiting for
1007 the same exec that the activation failed.
1008 (bus_activation_activate_service): shortcut the activation if we
1009 already waiting for the same executable to start up.
1011 2004-03-12 Mikael Hallendal <micke@imendio.com>
1014 - Added service file reloading.
1015 Each service files directory is kept in an hash table in
1016 BusActivation and each BusActivationEntry knows what .service-file it
1017 was read from. So when you try to activate a service the bus will
1018 check if it's been updated, removed or if new .service-files has
1020 - Test code at the bottom for the service file reloading.
1021 * bus/test-main.c: (main):
1023 - added service reloading test.
1024 * dbus/dbus-sysdeps.c:
1025 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1027 2004-03-08 Michael Meeks <michael@ximian.com>
1029 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1030 bail immediately if disconnected, to avoid busy loop.
1032 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1033 cleanup cut/paste/inefficiency.
1035 2004-03-01 David Zeuthen <david@fubar.dk>
1037 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1038 bug where args were used twice. This bug resulted in a segfault
1039 on a Debian/PPC system when starting the messagebus daemon. Include
1040 dbus-sysdeps.h for DBUS_VA_COPY
1042 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1044 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1045 appropriate va_copy implementation. From GLib
1047 2004-02-24 Joe Shaw <joe@ximian.com>
1049 * bus/services.c (bus_registry_acquire_service): We need to pass
1050 in the service name to dbus_set_error() to prevent a crash.
1052 2003-12-26 Anders Carlsson <andersca@gnome.org>
1054 * AUTHORS: Reveal my True identity.
1056 2003-12-17 Mikael Hallendal <micke@imendio.com>
1058 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1059 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1061 2003-12-13 Mikael Hallendal <micke@imendio.com>
1063 * doc/TODO: Added not about better error check of configuration files.
1065 2003-12-02 Richard Hult <richard@imendio.com>
1067 * Update AFL version to 2.0 throughout the source files to reflect
1068 the update that was done a while ago.
1070 2003-12-02 Richard Hult <richard@imendio.com>
1072 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1073 wrote_dict_key to FALSE on the iter that the dict is appended to,
1074 just like when appending other types. Fixes a bug where a dict
1075 couldn't be put inside a dict.
1076 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1077 (message_iter_test, _dbus_message_test): Add test case for dict
1080 2003-12-01 David Zeuthen <david@fubar.dk>
1082 * python/dbus.py: Add the actual message when calling the reciever
1083 of a signal such that parameters can be inspected. Add the method
1084 remove_signal_receiver
1086 2003-11-26 Mikael Hallendal <micke@imendio.com>
1090 * glib/*.[ch]: Made ref functions return the pointer
1092 2003-11-25 Zack Rusin <zack@kde.org>
1094 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1096 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1099 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1100 the Integrator and to better fit with the server,
1102 2003-11-24 Zack Rusin <zack@kde.org>
1104 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1105 the integrator handles it now
1107 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1108 since QTimer wasn't really meant to be used the way DBusTimeout is
1110 2003-11-24 Zack Rusin <zack@kde.org>
1112 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1113 Integrator class which integrates D-BUS with the Qt event loop,
1115 * qt/connection.h, qt/connection.cpp: Move all the code which
1116 was dealing with D-BUS integration to the Integrator class,
1117 and start using Integrator,
1119 2003-11-23 Zack Rusin <zack@kde.org>
1121 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1124 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1125 switching namespaces to DBusQt, reworking the class,
1127 * Makefile.cvs: switching dependencies so that it matches KDE
1130 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1133 2003-11-19 Havoc Pennington <hp@redhat.com>
1137 * configure.in: bump version to 0.20
1139 * configure.in (have_qt): add yet another place to look for qt
1140 (someone hand trolltech a .pc file...)
1142 2003-11-01 Havoc Pennington <hp@redhat.com>
1144 * doc/dbus-specification.xml: add state machine docs on the auth
1145 protocol; just a first draft, I'm sure it's wrong.
1147 2003-10-28 David Zeuthen <david@fubar.dk>
1149 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1150 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1152 2003-10-28 Havoc Pennington <hp@redhat.com>
1154 * dbus/dbus-message.c (get_next_field): delete unused function
1156 2003-10-28 Havoc Pennington <hp@redhat.com>
1158 * bus/expirelist.c (do_expiration_with_current_time): detect
1159 failure of the expire_func due to OOM
1161 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1163 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1164 NoReply error that's now created by the bus when the service exits
1166 2003-10-28 Havoc Pennington <hp@redhat.com>
1168 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1169 tests for set_path, set_interface, set_member, etc.
1171 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1173 * dbus/dbus-message.c (set_string_field): always just delete and
1174 re-append the field; accept NULL for deletion
1175 (re_align_fields_recurse): reimplement
1177 2003-10-26 Havoc Pennington <hp@redhat.com>
1179 * dbus/dbus-connection.c: fix docs to properly describe the
1180 disconnected message
1181 (_dbus_connection_notify_disconnected): remove this function;
1182 we can't synchronously add the disconnected message, we have to
1183 do it after we've queued any remaining real messages
1184 (_dbus_connection_get_dispatch_status_unlocked): queue the
1185 disconnect message only if the transport has finished queueing all
1186 its real messages and is disconnected.
1187 (dbus_connection_disconnect): update the dispatch status here
1189 2003-10-22 Havoc Pennington <hp@redhat.com>
1191 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1193 * bus/connection.c (bus_transaction_send_from_driver): set the
1194 destination to the connection's base service
1196 2003-10-20 Havoc Pennington <hp@redhat.com>
1198 hmm, make check is currently not passing.
1200 * doc/dbus-specification.xml: add requirement that custom type
1201 names follow the same rules as interface names.
1203 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1204 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1207 * doc/dbus-specification.xml: update type codes to match
1208 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1209 CUSTOM. Add type OBJECT_PATH to the spec.
1211 2003-10-17 Havoc Pennington <hp@redhat.com>
1213 * bus/driver.c (create_unique_client_name): use "." as separator
1214 in base service names instead of '-'
1216 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1217 byte at the end of the string
1219 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1220 optimization macros since string validation seems to be a slow
1223 * doc/dbus-specification.xml: restrict valid
1224 service/interface/member/error names. Add test suite code for the
1227 * dbus/dbus-string.c: limit service/interface/member/error names
1230 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1231 format arg to verbose spew
1233 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1234 memory, return instead of g_error
1236 * test/test-service.c (path_message_func): support emitting a
1239 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1240 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1241 assuming the activation bus was the session bus so that services
1242 started manually will still register.
1243 (init_connections_unlocked): fix so that in OOM situation we get
1244 the same semantics when retrying the function
1246 * test/test-service.c (main): change to use path registration, to
1247 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1248 than DBUS_BUS_SESSION
1250 2003-10-16 Havoc Pennington <hp@redhat.com>
1252 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1254 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1255 coverage of the tests
1256 (coverage-report.txt): don't move the .da and .bbg files around
1258 2003-10-16 Havoc Pennington <hp@redhat.com>
1260 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1263 2003-10-16 Havoc Pennington <hp@redhat.com>
1265 * bus/connection.c (bus_pending_reply_expired): either cancel or
1267 (bus_connections_check_reply): use unlink, not remove_link, as we
1268 don't want to free the link; fixes double free mess
1270 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1271 where no reply was received
1273 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1276 * bus/signals.c (match_rule_matches): add special cases for the
1277 bus driver, so you can match on sender/destination for it.
1279 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1280 DBUS_PRINT_BACKTRACE is set
1282 * dbus/dbus-internals.c: add pid to assertion failure messages
1284 * dbus/dbus-connection.c: add message type code to the debug spew
1286 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1287 sender=foo not service=foo
1289 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1290 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1291 DBUS_ACTIVATION_ADDRESS instead
1293 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1294 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1296 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1299 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1300 (dbus_message_iter_get_object_path_array): new function (half
1301 finished, disabled for the moment)
1303 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1304 DBUS_MESSAGE_TYPE_ERROR
1306 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1307 avoid redirecting stderr to /dev/null
1308 (babysit): close stdin if not doing the "exit_with_session" thing
1310 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1311 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1312 stdout/stdin, so things don't get confused
1314 * bus/system.conf.in: fix to allow replies, I modified .conf
1315 instead of .conf.in again.
1317 2003-10-14 David Zeuthen <david@fubar.dk>
1319 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1320 argtype to arg_type when raising unknown arg type exception.
1321 Changed type list to reflect the changes in dbus-protocol.h so
1322 the bindings actually work.
1324 2003-10-14 Havoc Pennington <hp@redhat.com>
1326 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1327 to have a bug keeping it from outputting the .da files sometimes
1328 (string_get_string): don't append garbage nul bytes to the string.
1330 2003-10-15 Seth Nickell <seth@gnome.org>
1332 * python/Makefile.am:
1334 Include dbus_h_wrapper.h in the dist tarball.
1336 2003-10-14 Havoc Pennington <hp@redhat.com>
1338 * bus/bus.c (bus_context_check_security_policy): revamp this to
1339 work more sanely with new policy-based requested reply setup
1341 * bus/connection.c (bus_transaction_send_from_driver): set bus
1342 driver messages as no reply
1344 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1345 requested_reply attribute on allow/deny rules
1347 * bus/system.conf: add <allow requested_reply="true"/>
1349 * bus/driver.c (bus_driver_handle_message): fix check for replies
1350 sent to the bus driver, which was backward. How did this ever work
1351 at all though? I think I'm missing something.
1353 * dbus/dbus-message.c (decode_header_data): require error and
1354 method return messages to have a reply serial field to be valid
1355 (_dbus_message_loader_queue_messages): break up this function;
1356 validate that reply serial and plain serial are nonzero;
1357 clean up the OOM/error handling.
1358 (get_uint_field): don't return -1 from this
1359 (dbus_message_create_header): fix signed/unsigned bug
1361 * bus/connection.c (bus_connections_expect_reply): save serial of
1362 the incoming message, not reply serial
1364 2003-10-14 Havoc Pennington <hp@redhat.com>
1366 * bus/connection.c: implement pending reply tracking using
1369 * bus/bus.c (bus_context_check_security_policy): verify that a
1370 reply is pending in order to allow a reply to be sent. Deny
1371 messages of unknown type.
1373 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1375 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1376 (bus_context_get_reply_timeout): new
1378 2003-10-13 Seth Nickell <seth@gnome.org>
1380 * python/Makefile.am:
1382 Pass "make distcheck": remove a couple files from DIST_FILES
1383 that weren't included in the final version.
1385 2003-10-12 Havoc Pennington <hp@pobox.com>
1387 Added test code that 1) starts an actual bus daemon and 2) uses
1388 DBusGProxy; fixed bugs that were revealed by the test. Lots
1389 more testing possible, but this is the basic framework.
1391 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1392 empty proxy lists from the proxy list hash
1394 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1395 couple of return_if_fail checks
1397 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1398 to allocate, so everything is cleared to NULL as it should be.
1400 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1401 source as data to dbus_connection_set_timeout_functions() as the
1402 timeout functions expected
1404 * test/glib/run-test.sh: add a little script to start up a message
1405 bus and run tests using it
1407 * tools/dbus-launch.1: updates
1409 * tools/dbus-launch.c (main): add --config-file option
1411 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1412 that could never be reached.
1414 * dbus/dbus-message.c (dbus_message_new_method_return)
1415 (dbus_message_new_error, dbus_message_new_signal): set the
1416 no-reply-expected flag on all these. Redundant, but may
1417 as well be consistent.
1419 2003-10-11 Havoc Pennington <hp@pobox.com>
1421 * test/decode-gcov.c (function_solve_graph): make broken block
1422 graph a nonfatal error since it seems to be broken. Need to debug
1425 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1426 can't just check type > INVALID < LAST anymore
1428 * dbus/dbus-message.c (dbus_message_get_signature): new function
1429 (dbus_message_has_signature): new function
1430 (struct DBusMessage): add signature field (right now it isn't sent
1431 over the wire, just generated on the fly)
1432 (dbus_message_copy): copy the signature, and init strings to
1433 proper length to avoid some reallocs
1434 (dbus_message_iter_init_array_iterator): return void, since it
1436 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1437 (_dbus_message_loader_queue_messages): add silly temporary hack to
1438 fill in message->signature on load
1440 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1441 characters, so they are relatively human-readable.
1443 2003-10-11 Havoc Pennington <hp@pobox.com>
1445 * dbus/dbus-message.c (_dbus_message_test): add more test
1446 coverage, but #if 0 for now since they uncover a bug
1447 not fixed yet; I think in re_align_field_recurse()
1448 (re_align_field_recurse): add FIXME about broken assertion
1450 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1452 * bus/connection.c: share a couple code bits with expirelist.c
1454 * bus/expirelist.h, bus/expirelist.c: implement a generic
1455 expire-items-after-N-seconds facility, was going to share between
1456 expiring connections and replies, decided not to use for expiring
1457 connections for now.
1459 * COPYING: include AFL 2.0 (still need to change all the file headers)
1461 2003-10-09 Havoc Pennington <hp@redhat.com>
1463 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1464 gcc 3.3. Not that we do anything about it yet.
1466 * bus/signals.c (bus_match_rule_parse): impose max length on the
1469 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1471 2003-10-09 Havoc Pennington <hp@redhat.com>
1473 Make matching rules theoretically work (add parser).
1475 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1476 the case where destination is explicitly specified as bus driver
1477 and someone else is eavesdropping.
1479 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1480 definition of eavesdropping and assertion
1482 * tools/dbus-send.c (main): use dbus_message_type_from_string
1484 * bus/signals.c (bus_match_rule_parse): implement
1486 * dbus/dbus-message.c (dbus_message_type_from_string): new
1488 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1490 2003-10-02 Havoc Pennington <hp@pobox.com>
1492 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1493 dbus_gproxy_oneway_call
1495 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1496 (dbus_server_setup_with_g_main): fix to allow calling them more
1497 than once on the same args
1498 (dbus_bus_get_with_g_main): new function
1500 2003-10-02 Havoc Pennington <hp@redhat.com>
1502 * doc/dbus-tutorial.xml: write some stuff
1504 2003-09-29 Havoc Pennington <hp@pobox.com>
1506 * configure.in: split checks for Doxygen from XML docs, check for
1509 * doc/Makefile.am: XML-ify all the docs, and add a blank
1512 2003-09-29 Havoc Pennington <hp@pobox.com>
1514 * Merge dbus-object-names branch. To see the entire patch
1515 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1516 it's huuuuge though.
1517 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1519 2003-09-28 Havoc Pennington <hp@pobox.com>
1521 * HACKING: update to reflect new server
1523 2003-09-26 Seth Nickell <seth@gnome.org>
1526 * python/examples/example-signals.py:
1528 Start implementing some notions of signals. The API
1529 is really terrible, but they sort of work (with the
1530 exception of being able to filter by service, and to
1531 transmit signals *as* a particular service). Need to
1532 figure out how to make messages come from the service
1535 * python/dbus_bindings.pyx.in:
1537 Removed duplicate message_handler callbacks.
1539 2003-09-25 Havoc Pennington <hp@redhat.com>
1541 * bus/session.conf.in: fix my mess
1543 2003-09-25 Havoc Pennington <hp@pobox.com>
1545 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1547 2003-09-25 Seth Nickell <seth@gnome.org>
1549 * python/examples/example-service.py:
1551 Johan notices complete wrong code in example-service, but
1552 completely wrong in a way that works exactly the same (!).
1553 Johan is confused, how could this possibly work? Example
1554 code fails to serve purpose of making things clear.
1557 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1559 * doc/dbus-specification.sgml: don't require header fields
1560 to be 4-byte aligned and specify that fields should be
1561 distinguished from padding by the fact that zero is not
1564 * doc/TODO: remove re-alignment item and add item to doc
1565 the OBJECT_PATH type.
1567 * dbus/dbus-message.c:
1568 (HeaderField): rename the original member to value_offset
1569 and introduce a name_offset member to keep track of where
1570 the field actually begins.
1571 (adjust_field_offsets): remove.
1572 (append_int_field), (append_uint_field),
1573 (append_string_field): don't align the start of the header
1574 field to a 4-byte boundary.
1575 (get_next_field): impl finding the next marhsalled field
1576 after a given field.
1577 (re_align_field_recurse): impl re-aligning a number of
1578 already marshalled fields.
1579 (delete_field): impl deleting a field of any type and
1580 re-aligning any following fields.
1581 (delete_int_or_uint_field), (delete_string_field): remove.
1582 (set_int_field), (set_uint_field): no need to re-check
1583 that we have the correct type for the field.
1584 (set_string_field): ditto and impl re-aligning any
1586 (decode_header_data): update to take into account that
1587 the fields aren't 4-byte aligned any more and the new
1588 way to distinguish padding from header fields. Also,
1589 don't exit when there is too much header padding.
1590 (process_test_subdir): print the directory.
1591 (_dbus_message_test): add test to make sure a following
1592 field is re-aligned correctly after field deletion.
1594 * dbus/dbus-string.[ch]:
1595 (_dbus_string_insert_bytes): rename from insert_byte and
1596 allow the insert of multiple bytes.
1597 (_dbus_string_test): test inserting multiple bytes.
1599 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1600 warning note to docs about having to re-align any
1601 marshalled values following the string.
1603 * dbus/dbus-message-builder.c:
1604 (append_string_field), (_dbus_message_data_load):
1605 don't align the header field.
1607 * dbus/dbus-auth.c: (process_test_subdir): print the
1610 * test/break-loader.c: (randomly_add_one_byte): upd. for
1613 * test/data/invalid-messages/bad-header-field-alignment.message:
1616 * test/data/valid-messages/unknown-header-field.message: shove
1617 a dict in the unknown field.
1619 2003-09-25 Seth Nickell <seth@gnome.org>
1622 * python/dbus_bindings.pyx.in:
1624 Handle return values.
1626 * python/examples/example-client.py:
1627 * python/examples/example-service.py:
1629 Pass back return values from the service to the client.
1631 2003-09-24 Seth Nickell <seth@gnome.org>
1635 Connect Object methods (when you are sharing an object) up... pass
1636 in a list of methods to be shared. Sharing all the methods just
1637 worked out too weird. You can now create nice Services over the
1640 * python/dbus_bindings.pyx.in:
1642 Keep references to user_data tuples passed into C functions so
1643 Python doesn't garbage collect on us.
1645 Implement MethodReturn and Error subclasses of Message for creating
1646 DBusMessage's of those types.
1648 * python/examples/example-client.py:
1649 * python/examples/example-service.py:
1651 Simple example code showing both how create DBus services and objects,
1652 and how to use them.
1654 2003-09-23 Havoc Pennington <hp@pobox.com>
1656 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1658 2003-09-23 Havoc Pennington <hp@redhat.com>
1660 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1661 (dbus_gproxy_disconnect_signal): implement
1662 (dbus_gproxy_manager_remove_signal_match): implement
1663 (dbus_gproxy_manager_add_signal_match): implement
1664 (dbus_gproxy_oneway_call): implement
1666 2003-09-23 Havoc Pennington <hp@pobox.com>
1668 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1669 subclass. This means dropping the transparent thread safety of the
1670 proxy; you now need a separate proxy per-thread, or your own
1671 locking on the proxy. Probably right anyway.
1672 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1674 2003-09-22 Havoc Pennington <hp@redhat.com>
1676 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1678 2003-09-21 Seth Nickell <seth@gnome.org>
1680 First checkin of the Python bindings.
1682 * python/.cvsignore:
1683 * python/Makefile.am:
1684 * python/dbus_bindings.pyx.in:
1685 * python/dbus_h_wrapper.h:
1687 Pieces for Pyrex to operate on, building a dbus_bindings.so
1688 python module for low-level access to the DBus APIs.
1692 High-level Python module for accessing DBus objects.
1697 Build stuff for the python bindings.
1701 Extra macro needed for finding the Python C header files.
1703 2003-09-21 Havoc Pennington <hp@pobox.com>
1705 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1706 implementing the proxy manager, didn't get very far.
1708 * dbus/dbus-bus.c (dbus_bus_add_match): new
1709 (dbus_bus_remove_match): new
1711 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1712 path_name argument; adjust the other not-yet-implemented
1713 gproxy constructors to be what I think they should be.
1715 2003-09-21 Havoc Pennington <hp@pobox.com>
1717 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1718 by default for message bus connections.
1720 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1721 exit_on_disconnect flag is set and we process the disconnected
1723 (dbus_connection_set_exit_on_disconnect): new function
1725 2003-09-21 Havoc Pennington <hp@pobox.com>
1727 Get matching rules mostly working in the bus; only actually
1728 parsing the rule text remains. However, the client side of
1729 "signal connections" hasn't been started, this patch is only the
1732 * dbus/dispatch.c: fix for the matching rules changes
1734 * bus/driver.c (bus_driver_handle_remove_match)
1735 (bus_driver_handle_add_match): send an ack reply from these
1738 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1739 arguments, reported by Seth Nickell
1741 * bus/config-parser.c (append_rule_from_element): support
1742 eavesdrop=true|false attribute on policies so match rules
1743 can be prevented from snooping on the system bus.
1745 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1746 and "destination" in attribute names; fix some docs bugs;
1747 add eavesdrop=true|false attribute
1749 * bus/driver.c (bus_driver_handle_add_match)
1750 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1753 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1754 rid of broadcast service concept, signals are just always broadcast
1756 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1757 mostly implement matching rules stuff (currently only exposed as signal
1760 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1762 * doc/dbus-specification.sgml: Change the header field name
1763 to be an enum and update the rest of the spec to reference
1764 the fields using the conventinal name.
1766 * dbus/dbus-protocol.h: update to reflect the spec.
1768 * doc/TODO: add item to remove the 4 byte alignment requirement.
1770 * dbus/dbus-message.c: Remove the code to generalise the
1771 header/body length and serial number header fields as named
1772 header fields so we can reference field names using the
1774 (append_int_field), (append_uint_field), (append_string_field):
1775 Append the field name as a byte rather than four chars.
1776 (delete_int_or_uint_field), (delete_string_field): reflect the
1777 fact that the field name and typecode now occupy 4 bytes instead
1779 (decode_string_field), (decode_header_data): update to reflect
1780 protocol changes and move the field specific encoding from
1781 decode_string_field() back into decode_header_data().
1783 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1784 Add utility to aid debugging.
1786 * dbus/dbus-message-builder.c:
1787 (append_string_field), (_dbus_message_data_load): Update to
1788 reflect protocol changes; Change the FIELD_NAME directive
1789 to HEADER_FIELD and allow it to take the field's conventional
1790 name rather than the actual value.
1792 * test/data/*/*.message: Update to use HEADER_FIELD instead
1793 of FIELD_NAME; Always align the header on an 8 byte boundary
1794 *before* updating the header length.
1796 2003-09-15 Havoc Pennington <hp@pobox.com>
1798 * dbus/dbus-pending-call.c: add the get/set object data
1799 boilerplate as for DBusConnection, etc. Use generic object data
1800 for the notify callback.
1802 * glib/dbus-gparser.c (parse_node): parse child nodes
1804 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1806 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1807 contain functions shared between the convenience lib and the
1810 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1811 -export-symbols-regex to the GLib library
1813 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1814 fix the locking in here, and add a default handler for
1815 Introspect() that just returns sub-nodes.
1817 2003-09-14 Havoc Pennington <hp@pobox.com>
1819 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1820 rather than gfoo consistent
1822 * glib/dbus-gproxy.h: delete for now, move contents to
1823 dbus-glib.h, because the include files don't work right since we
1824 aren't in the dbus/ subdir.
1826 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1827 (dbus_gproxy_end_call): finish
1828 (dbus_gproxy_begin_call): finish
1830 * glib/dbus-gmain.c (dbus_set_g_error): new
1832 * glib/dbus-gobject.c (handle_introspect): include information
1833 about child nodes in the introspection
1835 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1836 function to help in implementation of introspection
1838 * dbus/dbus-object-tree.c
1839 (_dbus_object_tree_list_registered_and_unlock): new function
1841 2003-09-12 Havoc Pennington <hp@pobox.com>
1843 * glib/dbus-gidl.h: add common base class for all the foo_info
1846 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1849 * test/Makefile.am: try test srcdir -ef . in addition to test
1850 srcdir = ., one of them should work (yeah lame)
1852 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1855 * glib/dbus-gparser.h: make description_load routines return
1856 NodeInfo* not Parser*
1858 * Makefile.am (SUBDIRS): build test dir after all library dirs
1860 * configure.in: add GTK+ detection
1862 2003-09-07 Havoc Pennington <hp@pobox.com>
1864 * Make Doxygen contented.
1866 2003-09-07 Havoc Pennington <hp@pobox.com>
1868 * doc/dbus-specification.sgml: more updates
1870 2003-09-06 Havoc Pennington <hp@pobox.com>
1872 * doc/dbus-specification.sgml: partial updates
1874 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1875 zillionth time; hopefully I edited the right file this time.
1877 * bus/config-parser.c (append_rule_from_element): support
1878 send_type, send_path, receive_type, receive_path
1880 * bus/policy.c: add message type and path to the list of things
1881 that can be "firewalled"
1883 2003-09-06 Havoc Pennington <hp@pobox.com>
1885 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1886 (dbus_connection_register_object_path): make this not handle
1887 messages to paths below the given path
1889 2003-09-03 Havoc Pennington <hp@pobox.com>
1891 * test/glib/Makefile.am: add this with random glib-linked test
1894 * glib/Makefile.am: remove the random test programs from here,
1895 leave only the unit tests
1897 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1898 uscore/javacaps conversion, and fix
1899 (get_object_property, set_object_property): change to .NET
1900 convention for mapping props to methods, set_FooBar/get_FooBar,
1901 since one language has such a convention we may as well copy it.
1902 Plus real methods in either getFooBar or get_foo_bar style won't
1903 collide with this convention.
1905 2003-09-01 Havoc Pennington <hp@pobox.com>
1907 * glib/dbus-gparser.c: implement
1909 * glib/dbus-gobject.c: start implementing skeletons support
1911 * configure.in: when disabling checks/assert, also define
1912 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1914 2003-09-01 Havoc Pennington <hp@pobox.com>
1916 * glib/Makefile.am: rearrange a bunch of files and get "make
1917 check" framework set up
1919 2003-08-31 Havoc Pennington <hp@pobox.com>
1921 * fix build with --disable-tests
1923 2003-08-30 Havoc Pennington <hp@pobox.com>
1925 * dbus/dbus-connection.c: purge DBusMessageHandler
1927 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1928 use callbacks everywhere
1930 2003-08-30 Havoc Pennington <hp@pobox.com>
1932 * test/data/valid-config-files/system.d/test.conf: change to
1933 root for the user so warnings don't get printed
1935 * dbus/dbus-message.c: add dbus_message_get_path,
1936 dbus_message_set_path
1938 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1939 dispatching to a path
1941 * dbus/dbus-string.c (_dbus_string_validate_path): add
1943 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1944 (_dbus_marshal_object_path): implement
1946 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1947 to contain the path to the target object
1948 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1949 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1951 2003-08-30 Havoc Pennington <hp@pobox.com>
1953 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1955 2003-08-29 Havoc Pennington <hp@pobox.com>
1957 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1959 (struct DBusObjectSubtree): shrink this
1960 a lot, since we may have a lot of them
1961 (_dbus_object_tree_free_all_unlocked): implement
1962 (_dbus_object_tree_dispatch_and_unlock): implement
1964 2003-08-29 Havoc Pennington <hp@pobox.com>
1966 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1968 2003-08-28 Havoc Pennington <hp@pobox.com>
1972 * dbus/dbus-connection.c: port to no ObjectID, create a
1973 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1975 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1976 everything except UnregisterFunction and MessageFunction
1978 * dbus/dbus-marshal.c: port away from DBusObjectID,
1979 add DBUS_TYPE_OBJECT_PATH
1981 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1982 dbus/dbus-objectid.[hc]: remove these, we are moving to
1983 path-based object IDs
1985 2003-08-25 Havoc Pennington <hp@pobox.com>
1987 Just noticed that dbus_message_test is hosed, I wonder when I
1988 broke that. I thought make check was passing earlier...
1990 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1991 container tree, will replace most of dbus-object-registry
1993 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1996 2003-08-19 Havoc Pennington <hp@pobox.com>
1998 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1999 (dbus_message_is_error): fix this function
2001 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2004 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2005 reflect clarified man page
2006 (bus_client_policy_check_can_send): ditto
2008 * bus/session.conf.in: fixup
2010 * bus/system.conf.in: fixup
2012 2003-08-18 Havoc Pennington <hp@redhat.com>
2014 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2016 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2017 dumb bug created earlier (wrong order of args to
2018 decode_header_data())
2020 * tools/dbus-send.c: port
2022 * tools/dbus-print-message.c (print_message): port
2024 * test/data/*messages: port all messages over
2026 * dbus/dbus-message-builder.c: support including
2029 * bus/driver.c: port over
2031 * bus/dispatch.c: port over to new stuff
2033 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2034 rename disconnect signal to "Disconnected"
2036 2003-08-17 Havoc Pennington <hp@pobox.com>
2038 This doesn't compile yet, but syncing up so I can hack on it from
2039 work. What are branches for if not broken code? ;-)
2041 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2042 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2043 DBUS_HEADER_FIELD_ERROR_NAME
2045 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2046 for the interface+member pairs
2047 (string_hash): change to use g_str_hash algorithm
2048 (find_direct_function, find_string_function): refactor these to
2051 * dbus/dbus-message.c: port all of this over to support
2052 interface/member fields instead of name field
2054 * dbus/dbus-object-registry.c: port over
2056 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2057 from _dbus_string_validate_name
2059 * bus/dbus-daemon-1.1: change file format for the
2060 <deny>/<allow> stuff to match new message naming scheme
2062 * bus/policy.c: port over
2064 * bus/config-parser.c: parse new format
2066 2003-08-16 Havoc Pennington <hp@pobox.com>
2068 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2071 * glib/dbus-gproxy.c: some hacking
2073 2003-08-15 Havoc Pennington <hp@redhat.com>
2075 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2077 * dbus/dbus-connection.c
2078 (dbus_connection_send_with_reply_and_block): factor out internals;
2079 change to convert any error replies to DBusError instead of
2080 returning them as a message
2082 2003-08-15 Havoc Pennington <hp@pobox.com>
2084 * dbus/dbus-connection.c,
2085 dbus/dbus-pending-call.c: Finish the pending call stuff
2087 2003-08-14 Havoc Pennington <hp@redhat.com>
2089 * dbus/dbus-pending-call.c: start on new object that will replace
2090 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2093 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2094 with remote interfaces
2096 * dbus/dbus-gidl.c: do the boring boilerplate in here
2098 2003-08-12 Havoc Pennington <hp@pobox.com>
2100 * bus/dispatch.c (bus_dispatch): make this return proper
2101 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2103 * dbus/dbus-errors.c (dbus_set_error): use
2104 _dbus_string_append_printf_valist
2106 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2107 (_dbus_string_append_printf): new
2109 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2112 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2113 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2114 message is unhandled.
2116 2003-08-11 Havoc Pennington <hp@pobox.com>
2118 * bus/test.c (client_disconnect_handler): change to return
2119 HANDLED (would have been REMOVE_MESSAGE)
2121 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2122 HANDLED/NOT_YET_HANDLED instead of
2123 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2126 2003-08-10 Havoc Pennington <hp@pobox.com>
2128 * tools/dbus-send.c (main): add --type argument, for now
2129 supporting only method_call and signal types.
2131 * tools/dbus-print-message.c: print message type
2133 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2134 init connection->objects
2136 * doc/dbus-specification.sgml: fix sgml
2138 * bus/*.c: port over to object-instance API changes
2140 * test/test-service.c: ditto
2142 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2143 name, we will have to fix up the rest of the code to also handle
2145 (dbus_message_new): generic message-creation call
2146 (set_string_field): allow appending name field
2148 2003-08-06 Havoc Pennington <hp@pobox.com>
2150 * dbus/dbus-object-registry.c: implement signal connection
2153 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2155 * dbus/dbus-internals.c (_dbus_memdup): new function
2157 2003-08-02 Havoc Pennington <hp@pobox.com>
2159 * dbus/dbus-message.c (dbus_message_get_no_reply)
2160 (dbus_message_set_no_reply): add these and remove
2161 set_is_error/get_is_error
2163 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2164 remove the ERROR flag, since there's now an ERROR type
2166 2003-08-01 Havoc Pennington <hp@pobox.com>
2168 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2171 * dbus/dbus-message.c (dbus_message_get_type): new function
2173 * doc/dbus-specification.sgml: add "type" byte to messages
2175 2003-08-01 Havoc Pennington <hp@pobox.com>
2177 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2178 a message type enum to distinguish kinds of message
2179 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2180 that need not be replied to
2182 2003-08-01 Havoc Pennington <hp@pobox.com>
2184 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2185 (unpack_8_octets): fix no-64-bit-int bug
2187 * dbus/dbus-object-registry.c (validate_id): validate the
2188 connection ID bits, not just the instance ID.
2190 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2191 the connection-global 33 bits of the object ID
2193 * dbus/dbus-object-registry.c (info_from_entry): fill in
2194 object ID in the new way
2196 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2197 define server/client/instance bits.
2199 2003-07-30 Havoc Pennington <hp@pobox.com>
2201 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2204 2003-07-13 Havoc Pennington <hp@pobox.com>
2206 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2207 fields to DBusObjectVTable and DBusObjectInfo
2209 2003-07-12 Havoc Pennington <hp@pobox.com>
2211 * dbus/dbus-object-registry.c: implement unit test,
2212 fix bugs discovered in process
2214 * dbus/dbus-connection.c: remove handler_table and
2215 register_handler(), add DBusObjectRegistry usage
2217 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2218 (dbus_object_id_set_null): new functions
2220 2003-07-08 Havoc Pennington <hp@pobox.com>
2222 * dbus/dbus-object.c: implement some of this
2224 * dbus/dbus-object-registry.c
2225 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2227 (_dbus_object_registry_new): handle OOM
2229 2003-07-08 Havoc Pennington <hp@pobox.com>
2231 * dbus/dbus-object.h: sketch out an API for registering objects
2232 with a connection, that allows us to use as little as 24 bytes
2233 per object and lets application code represent an object in
2234 any conceivable way.
2236 * dbus/dbus-object-registry.c: implement the hard bits of the
2237 DBusConnection aspect of object API. Not yet wired up.
2239 2003-07-06 Havoc Pennington <hp@pobox.com>
2241 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2242 (_dbus_marshal_object_id): new
2243 (_dbus_demarshal_object_id): new
2244 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2245 consolidate identical switch cases. Don't conditionalize handling
2246 of DBUS_TYPE_UINT64, need to handle the type always.
2247 (_dbus_marshal_validate_arg): consolidate identical cases, and
2248 handle DBUS_TYPE_OBJECT_ID
2250 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2252 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2254 2003-09-28 Havoc Pennington <hp@pobox.com>
2258 2003-09-28 Havoc Pennington <hp@pobox.com>
2260 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2261 to work with Debian db2html
2263 2003-09-28 Havoc Pennington <hp@pobox.com>
2265 * configure.in: 0.13
2267 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2268 stylesheet-images for benefit of Debian
2270 Change back to using filesystem-linked sockets for the system
2271 bus, so only root can create the default system bus address.
2273 * bus/system.conf.in: change to use
2274 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2276 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2279 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2280 here, and AC_DEFINE DBUS_SYSTEM_PATH
2282 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2285 * doc/busconfig.dtd:
2288 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2290 * doc/dbus-specification.sgml:
2291 Add activation reply values.
2293 2003-08-05 Havoc Pennington <hp@redhat.com>
2295 * configure.in: 0.12
2297 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2299 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2300 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2301 (add_watch), (remove_watch), (create_source):
2302 Refcount fds, fixes some reentrancy issues.
2304 2003-07-30 Havoc Pennington <hp@redhat.com>
2306 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2307 bus address to be abstract if we have abstract sockets
2311 2003-07-28 Havoc Pennington <hp@redhat.com>
2313 * bus/messagebus.in: fix to avoid processname/servicename
2314 confusion, from Michael Kearey
2315 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2317 2003-07-23 Havoc Pennington <hp@pobox.com>
2319 * dbus/dbus-message.c (dbus_message_iter_get_named):
2320 fix from Andy Hanton to remove broken "+1"
2322 2003-07-16 Havoc Pennington <hp@pobox.com>
2324 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2325 babysitter process, as suggested by Thomas Leonard, so
2326 an "eval `dbus-launch --exit-with-session`" will actually
2329 2003-07-16 Havoc Pennington <hp@pobox.com>
2331 * configure.in: print out EXPANDED_* variables in the summary at
2332 the end; clean up the code that computes EXPANDED_ variables and
2333 get the ones using exec_prefix right. Should make things work
2334 when you build without --prefix
2336 2003-06-29 Havoc Pennington <hp@pobox.com>
2338 * mono/Test.cs (class Test): fire up a main loop and run it
2340 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2341 done once, the app has to do it
2343 2003-06-26 Havoc Pennington <hp@pobox.com>
2345 * mono/Connection.cs: set up connection with the glib main loop
2347 2003-07-01 Havoc Pennington <hp@redhat.com>
2349 * doc/dbus-specification.sgml: clarify the format of a type code,
2350 change suggested by Jim Blandy
2352 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2355 * tools/Makefile.am: Don't assume srcdir == builddir.
2357 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2358 the allocated block.
2359 (_dbus_memory_test): New function.
2360 * dbus/dbus-test.h: Add _dbus_memory_test ().
2361 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2363 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2365 (dbus_message_new): Remove obsolete @todo.
2367 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2368 (_dbus_marshal_set_uint64): Fix comment.
2370 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2371 hardcode FIELD_REPLY_SERIAL.
2373 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2374 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2376 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2377 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2379 2003-06-24 Havoc Pennington <hp@pobox.com>
2381 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2383 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2389 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2390 * gcj/org/.cvsignore:
2391 * gcj/org/Makefile.am:
2392 * gcj/org/freedesktop/.cvsignore:
2393 * gcj/org/freedesktop/Makefile.am:
2394 * gcj/org/freedesktop/dbus/.cvsignore:
2395 * gcj/org/freedesktop/dbus/Makefile.am:
2396 * gcj/org/freedesktop/dbus/Message.java: (Message),
2398 * gcj/org/freedesktop/dbus/natMessage.cc:
2399 Fix the build system.
2401 2003-06-22 Havoc Pennington <hp@pobox.com>
2403 * mono/Connection.cs: add more bindings
2405 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2408 2003-06-22 Havoc Pennington <hp@pobox.com>
2410 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2411 Start wrapping more stuff.
2413 2003-06-22 Havoc Pennington <hp@pobox.com>
2415 * mono/Message.cs: implement Message.Wrap() that ensures we only
2416 have a single C# wrapper per DBusMessage, assuming it works which
2417 it probably doesn't.
2419 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2420 (dbus_message_free_data_slot): new
2421 (dbus_message_set_data): new
2422 (dbus_message_get_data): new
2424 2003-06-22 Havoc Pennington <hp@pobox.com>
2426 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2427 (_dbus_data_slot_allocator_alloc): rework these to keep a
2428 reference count on each slot and automatically manage a global
2429 slot ID variable passed in by address
2431 * bus/bus.c: convert to new dataslot API
2433 * dbus/dbus-bus.c: convert to new dataslot API
2435 * dbus/dbus-connection.c: convert to new dataslot API
2437 * dbus/dbus-server.c: convert to new dataslot API
2439 * glib/dbus-gmain.c: ditto
2443 * bus/connection.c: ditto
2445 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2447 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2448 after the gcj checks so that the correct configuration tags
2449 will be added to libtool.
2451 * dbus-glib-1.pc.in: No need to specify any includes since
2452 dbus-1.pc.in has those.
2454 2003-06-22 Havoc Pennington <hp@pobox.com>
2456 * mono/*, gcj/*, configure.in, Makefile.am:
2457 Check in makefiles and subdirs for mono and gcj bindings.
2458 Neither binding actually exists, just trying to get through
2459 all the build and other boring bits.
2461 2003-06-21 Philip Blundell <philb@gnu.org>
2463 * tools/dbus-monitor.1: Updated.
2465 * tools/dbus-send.1: Likewise.
2467 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2469 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2470 for hangup and error after checking read so we won't discard
2471 pending data if both hangup and read are set.
2473 2003-06-19 Philip Blundell <philb@gnu.org>
2475 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2477 * tools/dbus-send.c: Accept both --system and --session.
2479 * tools/dbus-monitor.c: Same here.
2481 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2483 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2484 from C++ (Patch by Miloslav Trmac).
2486 2003-06-15 Joe Shaw <joe@assbarn.com>
2488 * configure.in: Check for socklen_t.
2490 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2492 * test/test-segfault.c: Add #include <sys/time.h>
2494 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2495 dbus-launch needs it.
2497 2003-06-09 Havoc Pennington <hp@redhat.com>
2499 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2500 SUN_LEN, it breaks abstract socket usage
2502 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2505 2003-06-04 Havoc Pennington <hp@pobox.com>
2507 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2508 using unix:abstract=/foo, and when listening in a tmpdir
2509 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2511 * dbus/dbus-transport.c (_dbus_transport_open): support
2514 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2515 support abstract sockets
2517 * dbus/dbus-transport-unix.c
2518 (_dbus_transport_new_for_domain_socket): support abstract sockets
2520 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2521 toggle as an argument, implement abstract namespace support
2522 (_dbus_listen_unix_socket): ditto
2524 * configure.in: add --enable-abstract-sockets and implement
2525 a configure check for autodetection of the right value.
2527 2003-06-01 Havoc Pennington <hp@pobox.com>
2529 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2530 in /tmp (though on Linux this will end up being useless,
2531 when we add abstract namespace support)
2533 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2536 2003-05-28 Colin Walters <walters@verbum.org>
2538 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2540 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2542 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2544 2003-05-17 Colin Walters <walters@gnu.org>
2546 * tools/dbus-send.c: Don't exit with an error code if --help was
2547 passed. Default to using the session bus instead of the system
2550 * tools/dbus-launch.c: Ditto.
2552 * tools/dbus-monitor.c: Ditto.
2554 * tools/dbus-send.1: Update with new arguments.
2556 * tools/dbus-launch.c: Emit code to export variables. New
2557 arguments -s and -c to specify shell syntax, and a bit of code to
2558 autodetect syntax. Also, allow specifying a program to run.
2560 * tools/dbus-launch.1: Update with new arguments.
2562 * tools/dbus-send.1: Ditto.
2564 * tools/dbus-monitor.1: Ditto.
2566 2003-05-17 Havoc Pennington <hp@pobox.com>
2568 * bus/config-parser.c (merge_included): merge in policies from
2569 child configuration file.
2571 * bus/policy.c (bus_policy_merge): function to merge two policies
2574 2003-05-16 Havoc Pennington <hp@redhat.com>
2576 * dbus/dbus-connection.c: disable verbose lock spew
2578 * tools/dbus-send.c: add --print-reply command line option
2580 * tools/dbus-print-message.h (print_message): new util function
2581 shared by dbus-send and dbus-monitor
2583 * tools/dbus-monitor.c (handler_func): exit on disconnect
2585 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2586 disconnected, don't try to use the read_watch
2588 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2589 so we can find this bug more easily
2591 2003-05-16 Havoc Pennington <hp@redhat.com>
2593 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2594 NULL as DBusHashTable is annoyingly likely to do.
2596 2003-05-16 Colin Walters <walters@verbum.org>
2598 * tools/dbus-monitor.c: Add --session argument and usage()
2601 * tools/dbus-monitor.1: Update with new --session arg.
2603 * bus/Makefile.am (install-data-hook): Create
2604 $(libdir)/dbus-1.0/services so that the session bus is happy.
2606 2003-05-15 Havoc Pennington <hp@redhat.com>
2608 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2609 on non-x86. ifdef's are evil.
2611 2003-05-15 Havoc Pennington <hp@redhat.com>
2613 * configure.in: 0.11
2617 * bus/Makefile.am (initddir): apparently we are supposed to put
2618 init scripts in /etc/rc.d/init.d not /etc/init.d
2620 * bus/Makefile.am: remove the "you must --enable-tests to make
2621 check" as it broke distcheck
2623 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2625 2003-05-13 James Willcox <jwillcox@gnome.org>
2628 * bus/activation.c: (bus_activation_service_created),
2629 (bus_activation_activate_service):
2630 * bus/driver.c: (bus_driver_send_service_deleted),
2631 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2632 (bus_driver_send_service_acquired),
2633 (bus_driver_send_welcome_message),
2634 (bus_driver_handle_list_services):
2635 * bus/session.conf.in:
2636 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2637 (dbus_bus_service_exists), (dbus_bus_activate_service):
2640 Add some convenience API which lets you activate a service, and did a
2641 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2642 and dbus_message_get_args()
2644 2003-05-11 Havoc Pennington <hp@pobox.com>
2646 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2647 calling _dbus_marshal_validate_arg() for every byte in a byte
2650 * dbus/dbus-message-handler.c: use atomic reference counting to
2651 reduce number of locks slightly; the global lock in here sucks
2653 * dbus/dbus-connection.c
2654 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2655 update_dispatch_status that can be called with lock held; then use
2656 in a couple places to reduce locking/unlocking
2657 (dbus_connection_send): hold the lock over the whole function
2658 instead of acquiring it twice.
2660 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2662 * bus/connection.c (bus_connections_setup_connection): fix access
2663 to already-freed memory.
2665 * dbus/dbus-connection.c: keep a little cache of linked list
2666 nodes, to avoid using the global linked list alloc lock in the
2667 normal send-message case. Instead we just use the connection lock
2668 that we already have to take.
2670 * dbus/dbus-list.c (_dbus_list_find_last): new function
2672 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2673 change to use a struct for the atomic type; fix docs,
2674 they return value before increment, not after increment.
2676 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2677 (_dbus_string_append_8_aligned): new functions to try to
2678 microoptimize this operation.
2679 (reallocate_for_length): break this out of set_length(), to
2680 improve profile info, and also so we can consider inlining the
2683 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2684 strings with some preallocation, cuts down on our calls to realloc
2685 a fair bit. Though if we can get the "move entire string to empty
2686 string" optimization below to kick in here, it would be better.
2688 * dbus/dbus-string.c (_dbus_string_move): just call
2689 _dbus_string_move_len
2690 (_dbus_string_move_len): add a special case for moving
2691 an entire string into an empty string; we can just
2692 swap the string data instead of doing any reallocs.
2693 (_dbus_string_init_preallocated): new function
2695 2003-05-11 Havoc Pennington <hp@pobox.com>
2697 Write a "test-profile" that does echo client-server with threads;
2698 profile reveals lock contention, memcpy/realloc of buffers, and
2699 UTF-8 validation as hot spots. 20% of lock contention eliminated
2700 with dbus_atomic_inc/dec implementation on x86. Much remaining
2701 contention is global mempool locks for GList and DBusList.
2703 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2706 * dbus/dbus-connection.c (struct DBusConnection): use
2707 dbus_atomic_t for the reference count
2709 * dbus/dbus-message.c (struct DBusMessage): declare
2710 dbus_atomic_t values as volatile
2712 * configure.in: code to detect ability to use atomic integer
2713 operations in assembly, from GLib patch
2715 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2716 time, tired of it being wrong in threads and forked processes
2718 * glib/test-profile.c: a little program to bounce messages back
2719 and forth between threads and eat CPU
2721 * dbus/dbus-connection.c: add debug spew macros for debugging
2722 thread locks; include config.h at top; fix deadlock in
2723 dbus_connection_flush()
2725 2003-05-08 Havoc Pennington <hp@pobox.com>
2727 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2728 data from getting written, and there wasn't a good reason to
2731 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2732 dbus_verbose lines in test coverage
2733 (main): add list of functions sorted by # of untested blocks
2734 to the coverage report
2736 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2738 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2740 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2741 extend test coverage
2743 * test/data/auth/cancel.auth-script: test canceling an
2746 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2747 aren't used. in CVS history if we end up needing them.
2749 2003-05-04 Havoc Pennington <hp@pobox.com>
2751 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2754 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2755 function, which assumed length was in # of strings, not bytes
2757 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2760 * dbus/dbus-connection.c
2761 (_dbus_connection_queue_received_message): disable function for
2762 now, we are only using it in test mode
2764 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2765 remove a mistaken FIXME
2767 2003-05-04 Havoc Pennington <hp@pobox.com>
2769 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2770 unlock mutex on successful return, patch from Anders Gustafsson
2772 2003-05-04 Havoc Pennington <hp@pobox.com>
2774 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2777 2003-05-04 Havoc Pennington <hp@pobox.com>
2779 * tools/dbus-launch.c: implement
2781 * bus/main.c (main), bus/bus.c (bus_context_new):
2782 implement --print-pid and --fork
2784 2003-05-03 Havoc Pennington <hp@redhat.com>
2786 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2787 the address had no value, and add to test suite. Fix and
2788 regression test from Miloslav Trmac
2790 2003-05-03 Havoc Pennington <hp@pobox.com>
2792 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2793 watch is invalid when handled
2795 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2796 dbus-launch utility to launch the bus from a shell script. Didn't
2797 actually implement dbus-launch yet, it's just a placeholder still.
2799 2003-05-03 Havoc Pennington <hp@pobox.com>
2801 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2802 daemon; also documents daemon config file, so replaces
2803 doc/config-file.txt. Corrected some stuff from config-file.txt in
2804 the process of moving it.
2806 2003-05-03 Havoc Pennington <hp@pobox.com>
2808 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2811 2003-05-03 Colin Walters <walters@verbum.org>
2813 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2814 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2816 * Makefile.am: Update to use new .pc versioning scheme.
2818 2003-05-02 Havoc Pennington <hp@redhat.com>
2820 * bus/system.conf.in: allow send/receive to/from message bus
2823 2003-04-30 Havoc Pennington <hp@redhat.com>
2825 * configure.in: print a note when building with unit tests and
2828 2003-04-30 Havoc Pennington <hp@redhat.com>
2830 * Makefile.am: add a check-local that complains if you didn't
2831 configure with --enable-tests
2833 2003-04-29 Havoc Pennington <hp@redhat.com>
2835 * glib/dbus-gmain.c: docs cleanups
2837 * dbus/dbus-types.h: add docs on int64 types
2839 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2840 public API docs section
2842 2003-04-29 Havoc Pennington <hp@redhat.com>
2844 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2845 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2846 parallel install API version, not with the D-BUS package version.
2848 * HACKING: move some of README over here
2850 * README: updates, and document API/ABI policy
2852 * configure.in: reindentation
2854 2003-04-29 Havoc Pennington <hp@redhat.com>
2856 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2857 to use this library" to be sure people have the right
2860 2003-04-28 Havoc Pennington <hp@redhat.com>
2862 * configure.in: add --enable-docs which by default is auto yes if
2863 doxygen and db2html found, no otherwise; but can be forced on/off
2865 * doc/Makefile.am: conditionalize whether to build docs on
2868 2003-04-28 Havoc Pennington <hp@redhat.com>
2870 * configure.in: 0.10
2874 * bus/system.conf.in: add <includedir>system.d</includedir>
2876 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2877 username was provided but not uid
2879 * bus/config-parser.c (struct BusConfigParser): keep track of
2880 whether the parser is toplevel or was included; change some
2881 of the error handling if it's included.
2883 2003-04-27 Havoc Pennington <hp@pobox.com>
2887 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2888 report correct status if we finish processing authentication
2889 inside this function.
2891 * bus/activation.c (try_send_activation_failure): use
2892 bus_transaction_send_error_reply
2894 * bus/connection.c (bus_connection_get_groups): return an error
2895 explaining the problem
2897 * bus/bus.c (bus_context_check_security_policy): implement
2898 restriction here that inactive connections can only send the
2899 hello message. Also, allow bus driver to send anything to
2902 * bus/connection.c (bus_connection_complete): create the
2903 BusClientPolicy here instead of on-demand.
2904 (bus_connection_get_policy): don't return an error
2906 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2907 sender field in message being replied to
2909 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2910 causing it to return FALSE always
2912 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2913 we checked sender rather than destination
2915 2003-04-25 Havoc Pennington <hp@redhat.com>
2917 test suite is slightly hosed at the moment, will fix soon
2919 * bus/connection.c (bus_connections_expire_incomplete): fix to
2920 properly disable the timeout when required
2921 (bus_connection_set_name): check whether we can remove incomplete
2922 connections timeout after we complete each connection.
2924 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2925 probably still broken.
2927 * bus/services.c (bus_registry_acquire_service): implement max
2928 number of services owned, and honor allow/deny rules on which
2929 services a connection can own.
2931 * bus/connection.c (bus_connection_get_policy): report errors here
2933 * bus/activation.c: implement limit on number of pending
2936 2003-04-25 Havoc Pennington <hp@redhat.com>
2938 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2939 where we used >= 0 instead of != DBUS_UID_UNSET.
2941 2003-04-25 Havoc Pennington <hp@redhat.com>
2943 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2944 were toggled without add/remove, fix from Anders Gustafsson
2946 2003-04-24 Havoc Pennington <hp@redhat.com>
2948 * test/data/valid-config-files/basic.conf: add <limit> tags to
2951 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2952 <limit> tag in configuration file.
2954 2003-04-24 Havoc Pennington <hp@redhat.com>
2956 * bus/dispatch.c: somehow missed some name_is
2958 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2959 (_dbus_timeout_set_interval): new
2961 * bus/connection.c (bus_connections_setup_connection): record time
2962 when each connection is first set up, and expire them after the
2963 auth timeout passes.
2965 2003-04-24 Havoc Pennington <hp@redhat.com>
2967 * dbus/dbus-message.c (dbus_message_name_is): rename
2968 (dbus_message_service_is): rename
2969 (dbus_message_sender_is): rename
2970 (dbus_message_get_service): rename
2972 2003-04-24 Havoc Pennington <hp@redhat.com>
2974 * configure.in: add --enable-checks
2976 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2978 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2979 to use thread locks.
2980 (_dbus_connection_handler_destroyed_locked): move some private
2981 functions into proper docs group
2983 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2984 _dbus_return_val_if_fail
2986 Throughout: use dbus_return_if_fail
2988 2003-04-23 James Willcox <jwillcox@gnome.org>
2991 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2992 (dbus_connection_setup_with_g_main),
2993 (dbus_server_setup_with_g_main):
2994 * glib/test-dbus-glib.c: (main):
2995 * glib/test-thread-client.c: (main):
2996 * glib/test-thread-server.c: (new_connection_callback), (main):
2997 * tools/dbus-monitor.c: (main):
2999 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3000 and dbus_server_setup_with_g_main().
3002 2003-04-20 Havoc Pennington <hp@pobox.com>
3004 * doc/dbus-specification.sgml: document the restrictions on
3005 message and service names
3007 2003-04-22 Havoc Pennington <hp@redhat.com>
3009 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3010 support, and do some code cleanups to share more code and
3011 speed up array marshal/demarshal.
3013 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3015 * configure.in: generate dbus-arch-deps.h
3017 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3020 2003-04-22 Havoc Pennington <hp@redhat.com>
3022 * test/data/valid-messages/opposite-endian.message: fix test
3023 to use proper type for rply field
3025 * test/data/invalid-messages: add tests for below validation
3027 * dbus/dbus-message.c (decode_header_data): validate field types,
3028 and validate that named fields are valid names
3029 (decode_name_field): consider messages in the
3030 org.freedesktop.Local. namespace to be invalid.
3032 * dbus/dbus-string.c (_dbus_string_validate_name): new
3034 2003-04-19 Havoc Pennington <hp@pobox.com>
3036 * bus/driver.c (bus_driver_handle_hello): check limits and
3037 return an error if they are exceeded.
3039 * bus/connection.c: maintain separate lists of active and inactive
3040 connections, and a count of each. Maintain count of completed
3041 connections per user. Implement code to check connection limits.
3043 * dbus/dbus-list.c (_dbus_list_unlink): export
3045 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3046 number of bytes in the message queue for a connection
3048 2003-04-18 Havoc Pennington <hp@pobox.com>
3050 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3052 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3055 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3056 on realloc be sure to update the pointer in the keyring
3058 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3059 offset to avoid writing to unallocated memory
3061 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3062 try the next mechanism, so we properly handle OOM
3064 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3066 (_dbus_keyring_new): fix OOM bug
3067 (_dbus_keyring_new_homedir): always set error; impose a maximum
3068 number of keys we'll load from the file, mostly to speed up the
3069 test suite and make its OOM checks more useful, but also for
3072 * dbus/dbus-auth.c (process_error_server): reject authentication
3073 if we get an error from the client
3074 (process_cancel): on cancel, send REJECTED, per the spec
3075 (process_error_client): send CANCEL if we get an error from the
3078 2003-04-18 Havoc Pennington <hp@pobox.com>
3080 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3083 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3086 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3087 about DBUS_TEST_HOMEDIR once
3089 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3092 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3093 config file so we test the right thing
3095 Throughout: assorted docs improvements
3097 2003-04-18 Havoc Pennington <hp@pobox.com>
3099 * glib/dbus-gmain.c: adapt to watch changes
3101 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3103 * dbus/dbus-server.h: remove dbus_server_handle_watch
3105 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3107 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3108 like DBusTimeout, so we don't need dbus_connection_handle_watch
3111 2003-04-17 Havoc Pennington <hp@redhat.com>
3113 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3114 database usage so it all goes via the DBusUserDatabase cache.
3116 2003-04-17 Havoc Pennington <hp@redhat.com>
3118 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3119 there was an OOM watch we skipped, we always return TRUE so we
3120 iterate again to have a look at it again. Fixes test suite hang.
3121 Code rearrangement also lets us lose some memset and only iterate
3122 over callbacks once.
3124 * bus/driver.c (bus_driver_handle_message): sense of test for
3127 2003-04-16 Havoc Pennington <hp@pobox.com>
3129 * doc/dbus-specification.sgml: make spec say serials are unsigned
3131 * dbus/dbus-message.h: change message serials to unsigned
3133 * dbus/dbus-connection.c: adapt to message serials being unsigned
3135 2003-04-15 Havoc Pennington <hp@pobox.com>
3137 * bus/bus.c: create and keep around a shared DBusUserDatabase
3140 * bus/connection.c (bus_connection_get_groups): don't cache
3141 groups for user in the connection object, since user database
3142 object now does that.
3144 2003-04-16 Havoc Pennington <hp@redhat.com>
3146 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3147 list of size counters
3148 (_dbus_message_loader_putback_message_link): put back a popped link
3150 * dbus/dbus-connection.c
3151 (dbus_connection_set_max_live_messages_size): rename
3153 (dbus_connection_get_outgoing_size): get size of outgoing
3155 (_dbus_connection_set_connection_counter): remove this cruft
3157 2003-04-14 Havoc Pennington <hp@redhat.com>
3159 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3160 caching, but at some point we might want to be able to use a
3163 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3164 SHA1 conf file to test the sha1 auth mechanism, since the regular
3165 test always uses EXTERNAL when available.
3168 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3169 add conf file that requires use of sha1 auth
3171 2003-04-13 Havoc Pennington <hp@pobox.com>
3173 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3174 from Philip Blundell to send messages and monitor them.
3176 2003-04-13 Havoc Pennington <hp@pobox.com>
3178 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3181 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3184 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3185 fix to only recover unused bytes if we're already authenticated
3186 (_dbus_transport_get_is_authenticated): fix to still mark us
3187 authenticated if there are unused bytes.
3189 * bus/dispatch.c: implement security policy checking
3191 * bus/connection.c (bus_transaction_send_from_driver): new
3193 * bus/bus.c (bus_context_check_security_policy): new
3195 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3196 now we just set the DBusError and it gets converted to an error
3199 * bus/connection.c (allow_user_function): enable code using actual
3200 data from the config file
3202 * bus/policy.c (list_allows_user): handle wildcard rules for
3203 user/group connection perms
3205 2003-04-13 Havoc Pennington <hp@pobox.com>
3207 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3209 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3211 * bus/policy.c (bus_policy_append_mandatory_rule)
3212 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3213 (bus_policy_append_group_rule): new functions
3215 2003-04-12 Havoc Pennington <hp@pobox.com>
3217 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3219 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3220 the pid/gid/uid, just for paranoia.
3222 * test/break-loader.c (randomly_do_n_things): find a byte
3223 containing a type code, and randomly change it to a different
3226 2003-04-12 Havoc Pennington <hp@pobox.com>
3228 * bus/policy.h: change BusPolicy to be the thing from the config
3229 file, and rename old BusPolicy to BusClientPolicy
3231 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3232 match change in how policy works
3234 * dbus/dbus-internals.h: mark assert_not_reached as
3235 __attribute((noreturn))__
3237 2003-04-11 Havoc Pennington <hp@redhat.com>
3239 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3240 the broadcast service. Use boolean return for ServiceExists.
3242 2003-04-11 Havoc Pennington <hp@redhat.com>
3244 * configure.in: add another directory to look for qt in.
3246 2003-04-11 Havoc Pennington <hp@redhat.com>
3248 * AUTHORS: add Colin Walters
3250 2003-04-11 Havoc Pennington <hp@redhat.com>
3256 2003-04-11 Havoc Pennington <hp@redhat.com>
3258 * bus/messagebus.in: remove pid file when stopping the
3259 message bus, since the bus won't have privileges to remove it
3262 2003-04-11 Havoc Pennington <hp@redhat.com>
3264 * bus/bus.c (bus_context_new): move credentials change after
3267 2003-04-11 Havoc Pennington <hp@pobox.com>
3269 * test/decode-gcov.c: add "below average functions" to the
3270 coverage report, and change how some of the code works.
3272 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3273 not in the coverage stats.
3275 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3276 couple places so running the test suite doesn't result in megaspam.
3278 2003-04-11 Havoc Pennington <hp@pobox.com>
3280 * bus/dispatch.c (check_existent_service_activation): accept a no
3281 memory error in a place we didn't before
3283 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3284 in case the first one failed," since the test suite is less
3287 2003-04-10 Havoc Pennington <hp@pobox.com>
3289 * bus/dispatch.c (check_segfault_service_activation): add test
3290 for launching an executable that just crashes.
3292 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3293 don't leave a million cores. We'll see how portable this is.
3295 2003-04-10 Havoc Pennington <hp@pobox.com>
3297 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3298 the possible parent failures before we fork, so that we don't
3299 fail to create a babysitter after creating the child.
3301 * bus/activation.c (bus_activation_activate_service): kill child
3302 if we don't successfully complete the activation.
3304 2003-04-10 Havoc Pennington <hp@redhat.com>
3306 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3307 the connection if it's disconnected
3309 * bus/activation.c (bus_activation_service_created): use new
3310 transaction features to roll back removal of pending activation if
3311 we don't successfully create the service after all. Don't remove
3312 pending activation if the function fails.
3314 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3315 (_dbus_list_insert_after_link): new code to facilitate
3318 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3319 new functionality, so we can preallocate the ability to insert
3322 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3323 allowing us to put custom hooks in a transaction to be used for
3324 cancelling said transaction
3326 * doc/dbus-specification.sgml: add some discussion of secondary
3327 service owners, and disallow zero-length service names
3329 * bus/services.c (bus_registry_acquire_service): new function,
3330 splits out part of bus_driver_handle_acquire_service() and fixes
3331 a bug where we didn't remove the service doing the acquiring
3332 from the secondary queue if we failed to remove the current owner
3333 from the front of the queue.
3335 2003-04-10 Alexander Larsson <alexl@redhat.com>
3337 * doc/dbus-specification.sgml:
3338 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3340 2003-04-10 Alexander Larsson <alexl@redhat.com>
3345 Added files to cvsignore
3347 * dbus/dbus-message.h:
3348 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3349 Make get_named() take two out argument and return a boolean.
3350 (dbus_message_iter_get_args_valist):
3351 Update usage of get_named().
3352 (dbus_message_iter_append_byte):
3354 (dbus_message_iter_append_named)
3356 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3359 2003-04-10 Alexander Larsson <alexl@redhat.com>
3361 * dbus/dbus-marshal.[ch]:
3362 Add array_type_pos argument to _dbus_marshal_validate_arg.
3363 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3365 * dbus/dbus-message.[ch]:
3366 Multi-dimensional arrays have full type specification in the
3367 outermost array. Iter code re-arranged to handle this.
3368 Added some more iter tests.
3370 * doc/dbus-specification.sgml:
3373 Update new array encoding description.
3374 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3376 * test/data/invalid-messages/array-with-mixed-types.message:
3377 * test/data/valid-messages/array-of-array-of-uint32.message:
3378 Change to the new array format.
3380 * test/data/invalid-messages/too-short-dict.message:
3383 * test/data/valid-messages/recursive-types.message:
3384 Fix up and extend test.
3386 2003-04-10 Havoc Pennington <hp@pobox.com>
3388 * bus/dispatch.c: lots of fixes
3390 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3391 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3392 that was crack, broke the test service.
3394 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3395 handling to avoid piling up errors if we get a failure on the
3398 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3399 pid in assertion failures.
3401 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3402 to some fixed size of file descriptor array. Don't return TRUE
3403 anytime a timeout exists, that led to lots of busy loop silliness
3406 2003-04-09 Havoc Pennington <hp@redhat.com>
3408 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3409 I'd checked this in earlier but hadn't.
3411 2003-04-09 Havoc Pennington <hp@redhat.com>
3413 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3414 the activation test (man this is getting old!)
3416 2003-04-09 Havoc Pennington <hp@redhat.com>
3418 * test/test-utils.c: use dispatch status function to fix this up
3420 * bus/connection.c (connection_watch_callback): don't dispatch
3422 (connection_timeout_callback): don't dispatch from here
3423 (bus_connections_setup_connection): set the dispatch status function
3424 (bus_connection_disconnected): unset it
3426 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3427 used to add a connection to be dispatched
3428 (_dbus_loop_iterate): do the dispatching at the end of each
3431 * dbus/dbus-connection.c
3432 (dbus_connection_set_dispatch_status_function): new function
3433 allowing us to fix up main loop usage
3434 (_dbus_connection_last_unref): free all the various function
3436 (dbus_connection_dispatch): call the DispatchStatusFunction
3437 whenever this function returns
3438 (dbus_connection_handle_watch): call DispatchStatusFunction
3439 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3440 (reply_handler_timeout): call DispatchStatusFunction
3441 (dbus_connection_flush): call DispatchStatusFunction
3443 2003-04-09 Havoc Pennington <hp@redhat.com>
3445 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3448 * bus/dispatch.c (check_service_activated): fix bug in test
3450 * dbus/dbus-mainloop.c (check_timeout): fix this up
3452 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3453 verbose output so we can sort out output from different processes,
3454 e.g. in the activation case.
3456 2003-04-08 Colin Walters <walters@gnu.org>
3458 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3460 (bus_context_new): Set it.
3461 (bus_context_unref): Use it to delete the pid file.
3463 2003-04-08 Havoc Pennington <hp@redhat.com>
3465 * test/data/invalid-messages/array-with-mixed-types.message:
3466 regression test that fails for the moment
3468 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3469 tests for convenience
3471 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3472 array of nil, it broke things.
3474 * test/data/invalid-messages/array-of-nil.message: regression test
3476 * test/data/valid-messages/array-of-array-of-uint32.message:
3477 happened to write this so added it to suite
3479 2003-04-08 Havoc Pennington <hp@redhat.com>
3481 * bus/driver.c (bus_driver_handle_acquire_service): init
3482 retval/reply before checking name
3484 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3485 recursion depth argument
3487 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3488 in the public struct for future extension
3490 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3493 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3496 * doc/dbus-specification.sgml: fix typo
3498 2003-04-08 Alexander Larsson <alexl@redhat.com>
3500 Implemented recursive types, named types and new-style iters
3503 * glib/test-thread-client.c: (thread_func):
3504 * glib/test-thread-server.c: (handle_test_message):
3505 * test/test-service.c: (handle_echo):
3514 * dbus/dbus-internals.c: (_dbus_type_to_string):
3515 Update for new types.
3517 * dbus/dbus-marshal.[ch]:
3518 Implement recursive types and the new marshalling format.
3519 Remove hardcoded dict marshalling.
3520 Marshal named types.
3522 * dbus/dbus-message-builder.c:
3524 Remove references to old types
3526 * dbus/dbus-message.[ch]:
3527 New non-refcounted iter API that supports recursive iters.
3528 Use iters for appending, including support for recursive
3530 Add byte and named type support.
3531 Update everything to new marshalling formats.
3532 Add tests for new API.
3534 * dbus/dbus-protocol.h:
3535 Remove old array types.
3536 Add types: BYTE, ARRAY, DICT, NAMED
3538 * dbus/dbus-string.c:
3539 * dbus/dbus-sysdeps.c:
3540 Make parse_double locale safe.
3542 * dbus/dbus-test-main.c:
3548 * doc/dbus-specification.sgml:
3551 * test/data/incomplete-messages/missing-body.message:
3552 * test/data/invalid-messages/bad-boolean.message:
3553 * test/data/invalid-messages/bad-boolean-array.message:
3554 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3555 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3556 * test/data/invalid-messages/too-short-dict.message:
3557 * test/data/valid-messages/dict-simple.message:
3558 * test/data/valid-messages/dict.message:
3559 * test/data/valid-messages/emptiness.message:
3560 * test/data/valid-messages/lots-of-arguments.message:
3561 * test/data/valid-messages/no-padding.message:
3562 * test/data/valid-messages/recursive-types.message:
3563 Add missing NAME fields
3564 Fix up dicts & arrays
3566 * test/data/invalid-messages/dict-with-nil-value.message:
3567 Removed, this is not invalid anymore.
3569 * test/data/valid-messages/recursive-types.message:
3570 Add new test for deeply recursive types.
3572 2003-04-07 Havoc Pennington <hp@pobox.com>
3574 * bus/driver.c (bus_driver_handle_acquire_service): return an
3575 error if you try to acquire a service that starts with ':'
3577 2003-04-07 Havoc Pennington <hp@redhat.com>
3579 * doc/dbus-specification.sgml: require that base service names
3580 start with ':' and that the base service is created/deleted
3581 as first and last things a connection does on the bus
3583 * bus/dispatch.c (check_existent_service_activation): lots more
3584 work on the activation test; it doesn't fully pass yet...
3586 * test/test-service.c (main): fix so we don't memleak the
3587 connection to the message bus
3588 (filter_func): accept a message asking us to exit
3590 2003-04-06 Havoc Pennington <hp@pobox.com>
3592 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3595 * configure.in: fixes to Qt detection from Colin Walters
3597 * doc/Makefile.am: Only remove generated docbook dirs if they
3598 exist, from Colin Walters
3600 * dbus/dbus-bus.c: change how we set well-known connections to
3601 NULL, so that it works if a single connection is stored in
3602 two well-known array slots.
3604 * test/Makefile.am: remove a lot of stuff that isn't immediately
3605 useful, it's in CVS history if we want it.
3607 * test/test-service.c: use dbus-mainloop instead of that
3610 2003-04-06 Havoc Pennington <hp@pobox.com>
3612 * dbus/Makefile.am: split lists of sources into stuff that goes in
3613 the library, util functions that go in the lib and are also used
3614 elsewhere, and util functions that are used in tests/daemon but
3615 don't go in the lib.
3617 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3618 here so it can be used in test binaries also
3620 2003-04-06 Havoc Pennington <hp@pobox.com>
3622 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3623 here in the parent process, so we can return an error if it
3624 fails. Also, move some of the code into the child so the parent
3625 is less hosed if we fail midway through.
3627 * bus/bus.c (bus_context_new): move pidfile detection further up
3628 in the function, before we start overwriting sockets and such.
3630 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3632 * configure.in: add --with-system-pid-file and --with-system-socket
3634 2003-04-06 Colin Walters <walters@verbum.org>
3636 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3638 * bus/system.conf.in: Declare a pidfile.
3640 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3641 create one (if appropriate).
3643 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3644 (struct BusConfigParser) [pidfile]: New.
3645 (element_type_to_name, merge_included, start_busconfig_child)
3646 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3647 (bus_config_parser_unref): Free it.
3648 (bus_config_parser_get_pidfile): New function.
3650 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3652 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3654 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3656 * dbus/dbus-sysdeps.h: Prototype it.
3658 2003-04-06 Havoc Pennington <hp@pobox.com>
3660 * bus/bus.c (bus_context_new): print the address in here, rather
3661 than in main(), because we need to do it before forking the daemon
3663 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3664 on the service nonexistent error
3666 * bus/driver.c (bus_driver_handle_acquire_service): set the
3667 sender on the AcquireService reply
3669 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3670 server also listen on a UNIX socket so services can connect to it.
3672 2003-04-06 Havoc Pennington <hp@pobox.com>
3674 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3675 so it detects deadlocks and also we actually init threads when
3678 2003-04-06 Havoc Pennington <hp@pobox.com>
3680 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3681 save the domain socket name, and unlink it when we disconnect the
3682 server. Means that at least when we exit normally, we won't leave
3683 a bunch of junk in /tmp
3685 * dbus/dbus-transport-unix.c
3686 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3687 memory management). (I was making a real change here but then
3690 2003-04-06 Havoc Pennington <hp@pobox.com>
3692 * bus/bus.c (bus_context_new): fix wrong handling of
3693 server_data_slot_unref() in the error case.
3695 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3696 "(condition) != 0" to _dbus_real_assert so that
3697 "_dbus_assert (pointer)" doesn't cause a warning
3699 * bus/main.c (main): accept --print-address option to print out
3700 the message bus address
3702 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3704 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3705 "tmpdir" option to unix: address on client side
3707 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3710 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3711 we can use to create sockets in the test suite.
3713 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3714 cleanly. To be used for testing.
3716 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3718 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3720 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3721 handle trying to call this when there's no servers active
3723 2003-04-05 Havoc Pennington <hp@pobox.com>
3729 2003-04-05 Havoc Pennington <hp@pobox.com>
3731 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3732 crash on startup. Need to get "try starting the daemon"
3733 in the test suite I guess. ;-)
3735 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3736 tracked the number of open connections; it's better done in
3737 application-specific code as you want it to span all servers etc.
3739 2003-04-05 Havoc Pennington <hp@pobox.com>
3741 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3742 patch from Colin Walters
3744 2003-04-05 Havoc Pennington <hp@pobox.com>
3746 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3747 reality; in fact multiple mechanisms are allowed.
3749 * dbus/dbus-internals.c (_dbus_real_assert)
3750 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3751 _dbus_assert_not_reached() into functions, so that they don't show
3752 up in basic block counts for test coverage, and don't use up as
3753 much disk space. Does mean slower execution speed though, so
3754 assumes --disable-asserts is the normal production case.
3756 2003-04-05 Havoc Pennington <hp@pobox.com>
3758 * test/Makefile.am (dist-hook): also dist *.in files
3764 2003-04-05 Havoc Pennington <hp@pobox.com>
3766 * dbus/dbus-string.c: docs warning
3768 * dbus/dbus-spawn.c: missing docs
3770 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3772 2003-04-05 Havoc Pennington <hp@pobox.com>
3774 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3777 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3778 to -1 once we've reaped the babysitter
3779 (_dbus_babysitter_handle_watch): do as much work as we can, not
3782 * bus/activation.c: add code using DBusBabysitter so that we
3783 handle it when a service fails to start up properly.
3784 (bus_activation_service_created): don't remove the activation
3785 entries as we go, just let them get removed when we free the pending
3786 activation. Unref reply messages after sending them.
3788 2003-04-05 Havoc Pennington <hp@pobox.com>
3790 * test/decode-gcov.c (main): print per-directory stats in the report
3792 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3794 2003-04-05 Havoc Pennington <hp@pobox.com>
3796 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3798 * test/decode-gcov.c: hack up a little program to suck data
3799 out of gcov files. Yes this is sort of silly.
3801 * configure.in: define something in config.h and do an
3802 AM_CONDITIONAL when gcov is enabled
3804 2003-04-04 Havoc Pennington <hp@redhat.com>
3806 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3807 return a "babysitter" object that is used to monitor the status of
3808 the spawned process and reap it when required.
3810 * test/test-segfault.c, test/test-exit.c,
3811 test/test-sleep-forever.c: binaries that do various lame things,
3812 used in the test suite.
3814 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3816 2003-04-03 Havoc Pennington <hp@pobox.com>
3818 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3819 in preparation for modifying it, dbus-sysdeps is getting
3822 2003-04-03 Havoc Pennington <hp@redhat.com>
3824 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3827 * bus/*.[hc]: adapt to mainloop change
3829 2003-04-03 Havoc Pennington <hp@redhat.com>
3831 * bus/activation.c (load_directory): fix up memleaks
3832 (bus_activation_entry_free): free the entry
3834 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3835 we get one from the message bus; fix memleaks.
3837 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3839 2003-04-03 Havoc Pennington <hp@pobox.com>
3841 * bus/config-parser.c (bus_config_parser_unref): free
3842 list of mechanisms, bug discovered by test suite enhancements
3843 (putting system.conf and session.conf into suite)
3845 * test/Makefile.am, test/test-service.c: add placeholder for a
3846 test service that we'll activate as part of test suite. Doesn't
3849 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3850 setting NULL value, and use system malloc not dbus_malloc()
3851 when we have unavoidable memleakage.
3853 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3854 didn't work, and support DBUS_BUS_ACTIVATION.
3856 * bus/activation.c (child_setup): pass our well-known bus type to
3859 * bus/config-parser.c: support <type> to specify well-known type
3861 * doc/dbus-specification.sgml: document the env variables to
3862 locate well-known buses and find service activator
3864 2003-04-02 Havoc Pennington <hp@redhat.com>
3866 * test/Makefile.am (all-local): add a rule to copy tests to
3867 builddir, so we can have generated tests. Use this to remove the
3868 silly hack for testing system.conf and session.conf. Will use this
3869 shortly to generate .service files pointing to test binaries.
3871 2003-04-02 Havoc Pennington <hp@redhat.com>
3873 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3874 current alloc and needed new length, not max of the doubled
3875 allocation and needed new length. Also, when building tests,
3876 don't do the double-allocation stuff, just realloc every time.
3878 2003-04-02 Havoc Pennington <hp@redhat.com>
3880 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3882 (_dbus_string_get_dirname): new
3883 (_dbus_sysdeps_test): new
3884 (_dbus_directory_open): include dirnames in error messages
3886 * bus/config-parser.c: interpret <include> and <includedir> and
3887 <servicedir> relative to config file location if the given
3888 filename is not absolute.
3890 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3892 2003-04-02 Havoc Pennington <hp@redhat.com>
3894 * bus/connection.c (bus_transaction_send_error_reply): set sender
3895 service for the error, and unref the reply on success
3897 * bus/activation.c: convert to use BusTransaction so OOM can be
3899 (bus_activation_service_created): set sender of the message
3901 2003-04-01 Havoc Pennington <hp@redhat.com>
3903 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3904 <includedir> (at least mostly)
3906 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3907 first, then the user ID
3909 2003-04-01 Havoc Pennington <hp@pobox.com>
3911 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3914 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3916 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3918 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3919 socket 0777, and unlink any existing socket.
3921 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3922 the configuration file so specifies; set up auth mechanism
3925 * bus/config-parser.c (bus_config_parser_content): add support
3926 for <fork> option and fill in code for <auth>
3928 * bus/system.conf.in: add <fork/> to default configuration,
3929 and limit auth mechanisms to EXTERNAL
3931 * doc/config-file.txt (Elements): add <fork>
3933 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3934 (_dbus_change_identity): new function
3936 2003-03-31 Havoc Pennington <hp@redhat.com>
3938 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3939 (_dbus_listen_unix_socket): fix off-by-one error in null
3940 termination spotted by Nalin
3942 2003-03-31 Havoc Pennington <hp@redhat.com>
3944 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3945 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3946 having a real home directory available.
3948 2003-03-31 Havoc Pennington <hp@redhat.com>
3950 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3952 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3954 * configure.in: add support for specifying a style of init script
3957 2003-03-31 Havoc Pennington <hp@redhat.com>
3959 Fix some annoying DBusString API and fix all affected code.
3961 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3963 (_dbus_string_get_data): change to return string instead of using
3965 (_dbus_string_get_const_data): ditto
3966 (_dbus_string_get_data_len): ditto
3967 (_dbus_string_get_const_data_len): ditto
3969 2003-03-31 Havoc Pennington <hp@redhat.com>
3971 * bus/main.c (main): fix up the command line arguments to be nicer
3973 2003-03-31 Havoc Pennington <hp@redhat.com>
3975 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3976 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3977 final location that lands in the config file
3979 * bus/config-loader-expat.c (bus_config_load): fix type of
3982 * doc/TODO: remove TODO item for dbus_bus_get()
3984 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3986 2003-03-31 Havoc Pennington <hp@pobox.com>
3988 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3989 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3990 argument since they are always client side
3992 * dbus/dbus-server.c (dbus_server_get_address): new function
3994 * bus/main.c (main): take the configuration file as an argument.
3996 * test/data/valid-config-files/debug-allow-all.conf: new file to
3997 use with dispatch.c tests for example
3999 * bus/test-main.c (main): require test data dir
4001 * bus/bus.c (bus_context_new): change this to take a
4002 configuration file name as argument
4004 * doc/config-file.txt (Elements): add <servicedir>
4006 * bus/system.conf, bus/session.conf: new files
4008 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4009 well-known socket if none set
4011 * configure.in: create system.conf and session.conf
4013 2003-03-30 Havoc Pennington <hp@pobox.com>
4015 * bus/config-parser.c: hacking
4017 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4018 to shut down, since it could cause weirdness with the DBusList
4021 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4022 link-oriented stack routines
4023 (alloc_link): free the mempool if the first alloc from it fails
4025 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4027 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4029 (_dbus_string_skip_white): new
4031 * doc/config-file.txt (Elements): add <includedir>
4033 2003-03-28 Havoc Pennington <hp@pobox.com>
4035 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4036 (_dbus_string_copy_data): new functions
4038 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4040 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4044 * dbus/dbus-memory.c:
4047 2003-03-28 Havoc Pennington <hp@pobox.com>
4049 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4050 I think it may have just been superstition. Not sure.
4052 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4053 failures that were not being handled.
4055 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4057 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4058 row that will fail on out-of-memory.
4060 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4061 function for testing out-of-memory handling.
4063 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4064 allocation functions, they do map exactly to the expat ones.
4066 2003-03-27 Havoc Pennington <hp@redhat.com>
4068 * bus/config-loader-libxml.c (bus_config_load): add another error
4071 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4074 Add note about automatic service activation.
4076 * doc/dbus-specification.sgml:
4077 Rename the specification and clarify a few things.
4079 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4082 * dbus/dbus-address.c:
4084 * dbus/dbus-marshal.c:
4085 * dbus/dbus-server-debug-pipe.c:
4086 * dbus/dbus-transport-unix.c:
4087 Fix documentation warnings.
4089 2003-03-26 Havoc Pennington <hp@pobox.com>
4091 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4092 after every test so it's quick and easy to see which leaked, and
4093 so we test multiple dbus_shutdown() calls
4095 * configure.in: change configure.in XML stuff to also support
4098 * config-loader-libxml.c: some hacking
4100 * config-loader-expat.c: some hacking
4102 * config-parser.c: some hacking, plus tests
4104 2003-03-25 Havoc Pennington <hp@redhat.com>
4106 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4108 * configure.in: add --with-xml option to specify XML library,
4109 right now only libxml is supported.
4111 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4112 nonworking code between home and work, still just stubs
4114 2003-03-24 Havoc Pennington <hp@redhat.com>
4116 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4119 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4120 NULL argument for "message" if the error is a well-known one,
4121 fill in a generic message in this case.
4123 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4126 * bus/test.c (bus_test_flush_bus): add
4128 * bus/policy.c (bus_policy_test): test code stub
4130 2003-03-24 Havoc Pennington <hp@pobox.com>
4132 * bus/connection.c (bus_connections_setup_connection): set up
4133 the "can this user connect" function, but it always returns
4134 TRUE until we have a config file parser so we can have a config
4135 file that allows connections.
4137 2003-03-23 Havoc Pennington <hp@pobox.com>
4139 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4140 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4141 the mutex, so we can check for proper memory management
4144 * dbus/dbus-dataslot.c: remove the mutex from
4145 DBusDataSlotAllocator and lock it manually when using it,
4146 to simplify fitting it into the global slots framework.
4148 * dbus/dbus-threads.c (init_static_locks): rework how we're
4149 handling global locks so they are easily shut down.
4151 * bus/policy.c (bus_policy_append_rule): fix
4153 * bus/test-main.c (main): check for memleaks
4155 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4156 test suite check for memleaks
4158 * dbus/dbus-memory.c: add support in test mode for tracking
4159 number of outstanding blocks
4161 2003-03-23 Havoc Pennington <hp@pobox.com>
4163 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4166 * dbus/dbus-hash.h: add ULONG hash keys
4168 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4169 (_dbus_get_group_id): new function
4171 2003-03-20 Havoc Pennington <hp@redhat.com>
4173 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4175 (dbus_connection_get_unix_user): new function
4177 2003-03-20 Havoc Pennington <hp@pobox.com>
4179 * bus/connection.c (bus_connection_send_oom_error): assert that
4180 message has a sender
4181 (connection_execute_transaction): ditto
4182 (bus_connection_preallocate_oom_error): fix to set the sender, and
4183 set recipient to the destination service, not the bus driver
4185 * bus/policy.c: hacking
4187 * dbus/dbus-message.c (dbus_message_service_is): new function
4188 (dbus_message_sender_is): new
4190 2003-03-19 Havoc Pennington <hp@redhat.com>
4192 * bus/policy.c: start sketching code for policy restrictions on
4193 what connections can do.
4195 2003-03-18 Havoc Pennington <hp@redhat.com>
4197 * doc/TODO: some notes on high-level todo items. Little nitpick
4198 stuff is all in @todo, so no need to add it here.
4200 * doc/config-file.txt: some notes on how config file might look
4202 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4208 2003-03-17 Havoc Pennington <hp@redhat.com>
4210 * dbus/dbus-internals.h: add gcc attributes so that
4211 our printf-style functions warn on bad arguments to
4214 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4217 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4220 2003-03-17 Havoc Pennington <hp@redhat.com>
4222 * bus/test-main.c (main): make it print something as it runs
4223 so make check doesn't look stuck
4225 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4226 from CVS, now obsolete
4228 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4230 * bus/dispatch.c: (bus_dispatch):
4231 Refetch the service name since it may have been reallocated
4232 when dbus_message_set_sender was called.
4234 * dbus/dbus-sysdeps.c: (_dbus_accept):
4235 Add address and address length variables and use them to stop
4236 valgrind from complaining.
4238 2003-03-17 Havoc Pennington <hp@pobox.com>
4240 All tests pass, no memleaks, no valgrind complaints.
4242 * bus/test.c: refcount handler_slot
4244 * bus/connection.c (bus_connections_new): refcount
4245 connection_data_slot
4247 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4248 bytes so that auth scripts pass.
4250 * bus/dispatch.c: init message_handler_slot so it gets allocated
4253 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4255 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4256 dealloc server_pipe_hash when no longer used for benefit of
4259 * dbus/dbus-auth.c (process_command): memleak fix
4261 * bus/dispatch.c (check_hello_message): memleak fix
4263 2003-03-16 Havoc Pennington <hp@pobox.com>
4265 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4267 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4269 * bus/activation.c (bus_activation_activate_service): Append
4270 the pending activation entry to the list of pending activations.
4272 2003-03-16 Havoc Pennington <hp@pobox.com>
4274 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4277 * dbus/dbus-address.c (create_entry): fix OOM handling when
4278 failing to alloc entry->method
4280 2003-03-16 Havoc Pennington <hp@pobox.com>
4282 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4285 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4286 add some missing dbus_set_result
4288 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4289 alloc the DBusMessageHandler
4291 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4292 the transport here, since we call this from the finalizer; it
4293 resulted in a double-finalize.
4295 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4296 where we tried to use transport->connection that was NULL,
4297 happened when transport was disconnected early on due to OOM
4299 * bus/*.c: adapt to handle OOM for watches/timeouts
4301 * dbus/dbus-transport-unix.c: port to handle OOM during
4304 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4305 reference to unused bytes instead of a copy
4307 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4310 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4313 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4316 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4318 * doc/dbus-specification.sgml:
4319 Document reply message for ActivateService.
4321 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4323 * bus/activation.c: (bus_pending_activation_entry_free),
4324 (bus_pending_activation_free), (bus_activation_new),
4325 (bus_activation_unref), (bus_activation_service_created),
4326 (bus_activation_activate_service):
4328 * bus/bus.c: (bus_context_new):
4329 * bus/desktop-file.c: (new_section):
4330 * bus/driver.c: (bus_driver_send_service_deleted),
4331 (bus_driver_handle_activate_service):
4332 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4334 * dbus/dbus-connection.c:
4335 (dbus_connection_send_with_reply_and_block):
4336 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4337 * dbus/dbus-protocol.h:
4338 Make activation work better. Now pending activations will be queued
4339 and the daemon won't try to activate services that are already registered.
4341 2003-03-16 Havoc Pennington <hp@pobox.com>
4343 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4346 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4347 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4349 2003-03-16 Havoc Pennington <hp@pobox.com>
4351 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4352 this. always run the test suite before commit...
4354 * bus/*: adapt to DBusConnection API changes
4356 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4357 requires renaming stuff to avoid dbus_connection_dispatch name
4360 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4363 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4364 separate from _dbus_message_loader_return_buffer()
4366 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4367 this, because it's now always broken to use; the number of
4368 messages in queue vs. the number still buffered by the message
4369 loader is undefined/meaningless. Should use
4370 dbus_connection_get_dispatch_state().
4371 (dbus_connection_dispatch): rename from
4372 dbus_connection_dispatch_message
4374 2003-03-16 Havoc Pennington <hp@pobox.com>
4376 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4379 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4381 * dbus/dbus-connection.c:
4382 (dbus_connection_send_with_reply_and_block):
4383 Decrease connection->n_incoming when removing an entry
4385 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4386 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4387 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4388 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4389 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4390 (dbus_dict_get_byte_array):
4391 Handle NULL arrays and strings. Also add support for byte arrays.
4393 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4394 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4395 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4396 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4397 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4398 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4399 * dbus/dbus-marshal.h:
4400 Add support for marshalling and demarshalling empty arrays and strings.
4402 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4403 (dbus_message_append_string_array),
4404 (dbus_message_iter_get_boolean),
4405 (dbus_message_iter_get_boolean_array),
4406 (dbus_message_iter_get_int32_array),
4407 (dbus_message_iter_get_uint32_array),
4408 (dbus_message_iter_get_double_array),
4409 (dbus_message_iter_get_byte_array),
4410 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4411 (check_message_handling):
4412 Add support for getting empty arrays and dicts.
4414 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4415 Don't do any validation at all for now, that's better than just checking
4418 * test/data/valid-messages/emptiness.message:
4419 New test message with lots of empty arrays.
4421 2003-03-16 Havoc Pennington <hp@pobox.com>
4423 * dbus/dbus-connection.c
4424 (_dbus_connection_queue_received_message_link): new function that
4425 can't fail due to OOM
4427 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4428 new function pops a message together with a list link
4431 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4432 message queuing functions to avoid needing to alloc memory
4434 2003-03-16 Havoc Pennington <hp@pobox.com>
4436 Oops - test code was only testing failure of around 30 of the
4437 mallocs in the test path, but it turns out there are 500+
4438 mallocs. I believe this was due to misguided linking setup such
4439 that there was one copy of dbus_malloc etc. in the daemon and one
4440 in the shared lib, and only daemon mallocs were tested. In any
4441 case, the test case now tests all 500+ mallocs, and doesn't pass
4442 yet, though there are lots of fixes in this patch.
4444 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4445 this so that it doesn't need to allocate memory, since it
4446 has no way of indicating failure due to OOM (and would be
4447 annoying if it did).
4449 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4451 * bus/Makefile.am: rearrange to create two self-contained
4452 libraries, to avoid having libraries with overlapping symbols.
4453 that was resulting in weirdness, e.g. I'm pretty sure there
4454 were two copies of global static variables.
4456 * dbus/dbus-internals.c: move the malloc debug stuff to
4459 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4462 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4464 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4467 * bus/dispatch.c (bus_dispatch_add_connection): free
4468 message_handler_slot when no longer using it, so
4469 memory leak checkers are happy for the test suite.
4471 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4473 * bus/bus.c (new_connection_callback): disconnect in here if
4474 bus_connections_setup_connection fails.
4476 * bus/connection.c (bus_connections_unref): fix to free the
4478 (bus_connections_setup_connection): if this fails, don't
4479 disconnect the connection, just be sure there are no side
4482 * dbus/dbus-string.c (undo_alignment): unbreak this
4484 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4486 (_dbus_auth_new): fix the order in which we free strings
4489 * bus/connection.c (bus_connection_disconnected): fix to
4490 not send ServiceDeleted multiple times in case of memory
4493 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4494 get the base service name
4495 (dbus_bus_register_client): don't return base service name,
4496 instead store it on the DBusConnection and have an accessor
4498 (dbus_bus_register_client): rename dbus_bus_register()
4500 * bus/dispatch.c (check_hello_message): verify that other
4501 connections on the bus also got the correct results, not
4502 just the one sending hello
4504 2003-03-15 Havoc Pennington <hp@pobox.com>
4506 Make it pass the Hello handling test including all OOM codepaths.
4507 Now to do other messages...
4509 * bus/services.c (bus_service_remove_owner): fix crash when
4510 removing owner from an empty list of owners
4511 (bus_registry_ensure): don't leave service in the list of
4512 a connection's owned services if we fail to put the service
4515 * bus/connection.c (bus_connection_preallocate_oom_error): set
4516 error flag on the OOM error.
4518 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4519 handle _dbus_transport_set_connection failure
4521 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4522 to create watches up front and simply enable/disable them as
4524 (unix_connection_set): this can now fail on OOM
4526 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4527 of enabling/disabling a watch or timeout.
4529 * bus/loop.c (bus_loop_iterate): don't touch disabled
4532 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4534 2003-03-15 Havoc Pennington <hp@pobox.com>
4536 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4537 write useful test code, after all that futzing around ;-)
4539 Test does not yet pass because we can't handle OOM in
4540 _dbus_transport_messages_pending (basically,
4541 dbus_connection_preallocate_send() does not prealloc the write
4542 watch). To fix this, I think we need to add new stuff to
4543 set_watch_functions, namely a SetEnabled function so we can alloc
4544 the watch earlier, then enable it later.
4546 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4547 dbus-memory.c to the convenience lib
4549 * bus/test.c: rename some static functions to keep them clearly
4550 distinct from stuff in connection.c. Handle client disconnection.
4552 2003-03-14 Havoc Pennington <hp@pobox.com>
4554 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4555 transport, tests more of the real codepath. Set up clients
4556 with bus_setup_debug_client.
4558 * bus/test.c (bus_setup_debug_client): function to set up debug
4559 "clients" on the main loop
4561 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4564 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4567 * dbus/dbus-server-debug.c: support a debug server based on pipes
4569 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4570 (_dbus_close): new function
4572 * configure.in: check for socketpair
4574 2003-03-14 Havoc Pennington <hp@redhat.com>
4576 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4579 * dbus/dbus-transport-debug.c: rework this a good bit to be
4580 less complicated. hopefully still works.
4582 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4585 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4588 * dbus/dbus-message.c (dbus_message_copy): rename from
4589 dbus_message_new_from_message, fix it up to copy
4590 all the message fields, add test case
4592 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4593 not quite passing yet
4595 2003-03-14 Havoc Pennington <hp@pobox.com>
4597 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4598 until no work remains" in test code. (the large diff here
4599 is just code movement, no actual changes)
4601 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4602 1, no point waiting around for test code.
4603 (_dbus_server_debug_accept_transport): unref the timeout
4604 after adding it (right?)
4606 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4608 2003-03-13 Havoc Pennington <hp@redhat.com>
4610 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4613 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4616 * dbus/dbus-connection.h: Make AddWatchFunction and
4617 AddTimeoutFunction return a bool so they can fail on out-of-memory
4619 * bus/bus.c (bus_context_new): set up timeout handlers
4621 * bus/connection.c (bus_connections_setup_connection): set up
4624 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4627 * bus/bus.c (bus_context_new): adapt to changes
4629 * bus/connection.c: adapt to changes
4631 * test/watch.c: adapt to DBusWatch changes
4633 * bus/dispatch.c (bus_dispatch_test): started adding this but
4636 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4638 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4640 2003-03-13 Havoc Pennington <hp@pobox.com>
4642 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4643 set up a test framework as for the library
4645 2003-03-12 Havoc Pennington <hp@pobox.com>
4647 Throughout: purge global variables, introduce BusActivation,
4648 BusConnections, BusRegistry, etc. objects instead.
4650 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4653 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4654 going to redo this a bit differently I think
4656 2003-03-12 Havoc Pennington <hp@redhat.com>
4658 Mega-patch that gets the message bus daemon initially handling
4659 out-of-memory. Work still needed. Also lots of random
4660 moving stuff to DBusError instead of ResultCode.
4662 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4664 * dbus/dbus-connection.c
4665 (dbus_connection_send_with_reply_and_block): use DBusError
4667 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4670 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4671 code here, as the only failure possible is OOM.
4673 * bus/connection.c (bus_connection_disconnect):
4674 rename bus_connection_disconnected as it's a notification only
4676 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4677 "name" on get_args failure, should be done by get_args;
4678 don't disconnect client for bad args, just return an error.
4679 (bus_driver_handle_service_exists): ditto
4681 * bus/services.c (bus_services_list): NULL-terminate returned array
4683 * bus/driver.c (bus_driver_send_service_lost)
4684 (bus_driver_send_service_acquired): send messages from driver to a
4685 specific client to the client's unique name, not to the broadcast
4688 * dbus/dbus-message.c (decode_header_data): reject messages that
4689 contain no name field
4690 (_dbus_message_get_client_serial): rename to
4691 dbus_message_get_serial and make public
4692 (_dbus_message_set_serial): rename from set_client_serial
4693 (_dbus_message_set_reply_serial): make public
4694 (_dbus_message_get_reply_serial): make public
4696 * bus/connection.c (bus_connection_foreach): allow stopping
4697 iteration by returning FALSE from foreach function.
4699 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4700 (dbus_connection_free_preallocated_send)
4701 (dbus_connection_preallocate_send): new API for sending a message
4702 without possibility of malloc failure.
4703 (dbus_connection_send_message): rename to just
4704 dbus_connection_send (and same for whole function family)
4706 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4708 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4710 * bus/activation.c: handle/return errors
4712 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4714 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4715 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4716 (_dbus_result_from_errno): move to this file
4718 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4720 * dbus/dbus-marshal.c:
4721 (_dbus_marshal_set_string):
4722 Take a length argument so we can marshal the correct string
4725 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4726 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4727 (_dbus_marshal_test):
4728 * dbus/dbus-marshal.h:
4729 Add support for marshalling and demarshalling dicts.
4731 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4732 Add support for TYPE DICT.
4734 * dbus/dbus-message.c: (set_string_field):
4735 Adjust header padding.
4737 (dbus_message_append_args_valist), (dbus_message_append_dict),
4738 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4739 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4740 (check_message_handling), (check_have_valid_message):
4741 * dbus/dbus-message.h:
4742 Add functions for setting and getting dicts.
4744 * dbus/dbus-protocol.h:
4750 * doc/dbus-specification.sgml:
4751 Add information about how dicts are marshalled.
4753 * test/data/invalid-messages/dict-with-nil-value.message:
4754 * test/data/invalid-messages/too-short-dict.message:
4755 * test/data/valid-messages/dict-simple.message:
4756 * test/data/valid-messages/dict.message:
4757 Add sample messages containing dicts.
4759 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4761 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4763 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4766 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4767 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4768 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4769 (dbus_dict_set_double), (dbus_dict_set_string),
4770 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4771 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4772 (dbus_dict_set_string_array), (_dbus_dict_test):
4774 Fix according to comments from Havoc.
4776 2003-03-06 Michael Meeks <michael@server.home>
4778 * configure.in: if we don't have kde-config, disable have_qt.
4780 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4785 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4786 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4787 (dbus_dict_remove), (dbus_dict_get_value_type),
4788 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4789 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4790 (dbus_dict_put_double), (dbus_dict_put_string),
4791 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4792 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4793 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4794 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4795 (dbus_dict_get_double), (dbus_dict_get_string),
4796 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4797 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4798 (dbus_dict_get_string_array), (_dbus_dict_test):
4800 Add DBusDict implementation
4802 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4806 2003-03-04 Havoc Pennington <hp@pobox.com>
4808 * test/data/auth/*: adapt to changes
4810 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4811 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4814 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4815 more stuff from being in a context name, to make the protocol
4816 simpler to deal with
4818 * dbus/dbus-errors.c (dbus_error_has_name): new function
4819 (dbus_error_is_set): new function
4821 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4822 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4824 * dbus/dbus-connection.c (dbus_connection_flush): also read
4825 messages during a flush operation
4827 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4829 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4831 * configure.in: Check for gethostbyname on Solaris.
4833 * dbus/dbus-transport.c: (_dbus_transport_open):
4834 Remove duplicate "tcp" entry.
4836 * doc/dbus-specification.sgml:
4837 Clarify some things.
4839 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4841 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4842 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4843 (_dbus_keyring_test):
4844 * dbus/dbus-md5.c: (_dbus_md5_compute):
4845 * dbus/dbus-sha.c: (_dbus_sha_compute):
4848 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4850 * README: Add some things.
4852 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4854 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4855 after case DBUS_TYPE_BOOELAN.
4857 2003-03-02 Havoc Pennington <hp@pobox.com>
4859 * test/break-loader.c (randomly_set_extreme_ints): add test that
4860 sets really huge and small integers
4862 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4863 that length of boolean array fits in the string, and that
4864 string has room for boolean value in single-bool case.
4866 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4867 optional value to "ALIGN" command which is what to fill the
4870 * test/data/valid-messages/no-padding.message: add regression
4871 test for the message padding problem
4873 2003-03-02 Havoc Pennington <hp@pobox.com>
4875 * dbus/dbus-message.c (decode_header_data): fix to always init
4876 message_padding, from Benjamin Dauvergne
4878 2003-03-02 Havoc Pennington <hp@pobox.com>
4884 2003-03-01 Joe Shaw <joe@assbarn.com>
4886 * configure.in: Check for "struct cmsgcred" and try to access its
4887 members for BSD-like unices.
4889 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4890 _dbus_read_credentials_unix_socket().
4891 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4892 read() for reading the credential byte off the unix socket. Use
4893 struct cmsgcred on systems that support it.
4895 2003-02-27 Alexander Larsson <alexl@redhat.com>
4899 Make gthreads-2.0 dependency optional. Don't build thread test if
4902 2003-02-27 Havoc Pennington <hp@pobox.com>
4904 * dbus/dbus-connection.c
4905 (dbus_connection_send_message_with_reply_and_block): fix doh!
4906 doh! doh! bug that resulted in never removing a reply from the
4907 queue, no wonder we called get_reply_serial so much ;-)
4909 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4910 and client serial instead of demarshaling them every time
4912 2003-02-27 Havoc Pennington <hp@pobox.com>
4914 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4915 more inlined, using dbus-string-private.h, speeds things up
4918 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4919 when freeing the string
4920 (_dbus_string_steal_data): fix for align offset
4921 (undo_alignment): new function
4923 2003-02-26 Havoc Pennington <hp@redhat.com>
4925 All kinds of audit fixes from Owen, plus initial attempt to
4926 handle unaligned memory returned from malloc.
4928 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4929 leave room for align_offset and nul byte
4930 (fixup_alignment): function to track an align_offset and
4931 ensure real->str is aligned
4932 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4933 to allow a nul byte plus align offset
4934 (_dbus_string_lock): fix overflow issue
4935 (_dbus_string_init_const_len): add assertions on sanity of len,
4936 assign allocated to be ALLOCATION_PADDING larger than len
4937 (set_length): fixup the overflow handling
4938 (_dbus_string_get_data_len): fix overflow in assertion
4939 (open_gap): detect overflow in size of gap to be opened
4940 (_dbus_string_lengthen): add overflow check
4941 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4942 (_dbus_string_append): add overflow check
4943 (_dbus_string_append_unichar): overflow
4944 (_dbus_string_delete): fix overflow in assertion
4945 (_dbus_string_copy_len): overflow in assertion
4946 (_dbus_string_replace_len): overflows in assertions
4947 (_dbus_string_find): change to implement in terms of
4948 _dbus_string_find_to
4949 (_dbus_string_find_to): assorted fixage
4950 (_dbus_string_equal_c_str): assert c_str != NULL,
4951 fix logic so the function works
4952 (_dbus_string_ends_with_c_str): fix overflow thingy
4953 (_dbus_string_base64_encode): overflow fix
4954 (_dbus_string_validate_ascii): overflow
4955 (_dbus_string_validate_nul): overflow
4957 2003-02-26 Havoc Pennington <hp@redhat.com>
4959 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4961 2003-02-26 Alexander Larsson <alexl@redhat.com>
4964 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4966 * dbus/dbus-connection.c:
4967 * dbus/dbus-connection.h:
4968 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4969 Add dbus_connection_set_wakeup_main_function and use it when queueing
4970 incoming and outgoing messages.
4973 * dbus/dbus-dataslot.c:
4974 Threadsafe usage of DBusDataSlotAllocator
4976 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4979 * dbus/dbus-server-unix.c:
4982 * glib/dbus-gmain.c:
4983 Implement the new wakeup functions for glib.
4986 * glib/test-thread-client.c:
4987 * glib/test-thread-server.c:
4988 * glib/test-thread.h:
4989 Initial cut at some thread test code. Not really done yet.
4991 2003-02-26 Havoc Pennington <hp@pobox.com>
4993 * dbus/dbus-connection.c
4994 (dbus_connection_send_message_with_reply_and_block): fix crash
4995 where we ref'd the outgoing message instead of the returned reply
4997 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4998 at the end of this function, so if we didn't need to read for
4999 authentication, we reinstall it for receiving messages
5001 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5002 a NULL sender for peer-to-peer case
5004 * dbus/dbus-transport-unix.c (check_read_watch): handle
5005 !authenticated case correctly
5007 * glib/dbus-gmain.c: add support for DBusServer
5009 * dbus/dbus-server.c: add data slot support
5011 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5012 return values and handle errors
5014 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5017 * Doxyfile.in (INPUT): add glib subdir
5019 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5020 setup_with_g_main instead of hookup_with_g_main; write docs
5022 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5024 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5025 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5026 * dbus/dbus-message.c: (dbus_message_append_boolean),
5027 (dbus_message_append_boolean_array),
5028 (dbus_message_get_args_valist), (_dbus_message_test):
5029 * dbus/dbus-message.h:
5030 * doc/dbus-specification.sgml:
5031 Various fixes as pointed out by Havoc.
5033 * test/data/invalid-messages/bad-boolean-array.message:
5034 * test/data/invalid-messages/bad-boolean.message:
5035 Add invalid boolean value test cases.
5037 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5039 * dbus/dbus-internals.c: (_dbus_type_to_string):
5040 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5041 (_dbus_marshal_validate_arg):
5042 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5043 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5044 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5045 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5046 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5047 (dbus_message_iter_get_double),
5048 (dbus_message_iter_get_boolean_array), (message_iter_test):
5049 * dbus/dbus-message.h:
5050 * dbus/dbus-protocol.h:
5051 * doc/dbus-specification.sgml:
5052 * test/data/valid-messages/lots-of-arguments.message:
5053 Add support for boolean and boolean array types.
5055 2003-02-23 Havoc Pennington <hp@pobox.com>
5057 * dbus/dbus-keyring.c: finish most of this implementation and
5060 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5061 these barf if the error isn't cleared to NULL
5063 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5064 (_dbus_create_directory): new function
5066 * dbus/dbus-errors.c (dbus_set_error): fix warning
5068 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5069 (_dbus_string_hex_decode): new function
5070 (test_hex_roundtrip): test code
5072 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5074 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5076 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5077 the save-to-temp/rename trick to atomically write the new file
5078 (_dbus_string_parse_uint): new function
5080 2003-02-22 Havoc Pennington <hp@pobox.com>
5082 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5084 2003-02-22 Havoc Pennington <hp@pobox.com>
5086 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5087 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5089 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5091 * dbus/test/data/sha-1: add US government test suite for SHA-1
5093 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5095 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5096 Make string arrays NULL-terminated.
5098 * dbus/dbus-memory.c: (dbus_free_string_array):
5099 * dbus/dbus-memory.h:
5100 New function for freeing NULL-terminated string arrays.
5102 * dbus/dbus-message-builder.c: (append_quoted_string),
5103 (_dbus_message_data_load):
5104 Add support for array types.
5106 * dbus/dbus-message.c: (check_message_handling):
5107 Add more types as test cases.
5109 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5110 (_dbus_string_parse_double):
5111 Add the start offset to the end offset.
5113 * test/data/valid-messages/lots-of-arguments.message:
5114 New test message with lots of arguments.
5116 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5118 * dbus/dbus-message.c: (dbus_message_append_nil),
5119 (dbus_message_append_int32), (dbus_message_append_uint32),
5120 (dbus_message_append_double), (dbus_message_append_string),
5121 (dbus_message_append_int32_array),
5122 (dbus_message_append_uint32_array),
5123 (dbus_message_append_double_array),
5124 (dbus_message_append_byte_array),
5125 (dbus_message_append_string_array):
5126 Fix all out-of-memory handling in these functions.
5128 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5130 * dbus/dbus-message.c: (dbus_message_append_nil):
5133 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5135 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5136 (dbus_message_append_nil), (dbus_message_append_int32_array),
5137 (dbus_message_append_uint32_array),
5138 (dbus_message_append_double_array),
5139 (dbus_message_append_byte_array),
5140 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5141 (dbus_message_iter_get_int32_array),
5142 (dbus_message_iter_get_uint32_array),
5143 (dbus_message_iter_get_double_array),
5144 (dbus_message_iter_get_byte_array),
5145 (dbus_message_iter_get_string_array):
5147 * dbus/dbus-message.h:
5148 Add functions for appending and getting arrays.
5150 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5152 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5153 element size at least 8 bytes, fixes mempool tests on
5156 2003-02-20 Alexander Larsson <alexl@redhat.com>
5158 * dbus/dbus-transport-unix.c (unix_do_iteration):
5159 Unlock the connection mutex during a blocking select call.
5160 Add todo about how we need a way to wake up the select.
5162 * dbus/dbus-connection-internal.h:
5163 * dbus/dbus-connection.c:
5164 Add _dbus_connection_lock and _dbus_connection_unlock.
5166 2003-02-19 Havoc Pennington <hp@pobox.com>
5168 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5169 Doxyfile.in, not Doxyfile
5171 * dbus/dbus-keyring.c: do some hacking on this
5173 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5175 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5177 (dbus_set_error): remove dbus_error_init, check for message ==
5178 NULL *before* we sprintf into it, and add @todo about including
5179 system headers in this file
5181 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5183 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5185 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5186 get various bits of user information based on either username
5188 (_dbus_homedir_from_username): new function
5190 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5193 Add check for nonposix getpwnam_r
5195 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5196 Align the pool element size to a sizeof (void *) boundary.
5198 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5199 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5200 General Solaris fixes.
5202 * test/data/valid-messages/simplest-manual.message:
5203 Explicitly state that we want little-endian packing.
5205 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5207 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5209 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5210 Added to create a transport connecting using a tcp/ip socket.
5212 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5213 to a tcp socket at given host and port.
5214 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5217 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5219 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5220 Added to create a server listening on a TCP/IP socket.
5222 2003-02-19 Havoc Pennington <hp@pobox.com>
5224 Throughout: mop up all the Doxygen warnings and undocumented
5227 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5228 to search any paths.
5230 * dbus/dbus-threads.c: move global mutex initializers to
5231 dbus-internals.h, multiple prototypes was confusing doxygen
5232 besides being kind of ugly
5234 * Doxyfile (PREDEFINED): have Doxygen define
5235 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5236 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5237 (do not abuse the feature! it's for stuff like the autogenerated
5238 macros in dbus-md5.c, not just for things you don't feel like
5241 2003-02-18 Havoc Pennington <hp@pobox.com>
5243 * dbus/dbus-string.c (_dbus_string_zero): new function
5245 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5246 wrap it in some dbus-friendly API
5248 * dbus/dbus-types.h: add 16-bit types
5250 2003-02-18 Joe Shaw <joe@assbarn.com>
5252 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5253 credentials from our currently running process.
5254 (get_word): Fix a buglet where we were copying the entire length
5255 instead of relative to our position.
5257 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5258 keys on the stack... it's 640k of data.
5260 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5261 read the credentials byte off the socket, even if we don't have
5263 (_dbus_poll): Implement poll() using select() for systems which
5266 * glib/test-dbus-glib.c (main): Print out an error if no
5267 parameters are given.
5269 * test/data/auth/fallback.auth-script: Added. Tests that a client
5270 can fallback to a secondary auth mechanism if the first fails.
5272 2003-02-18 Havoc Pennington <hp@pobox.com>
5276 2003-02-17 Havoc Pennington <hp@pobox.com>
5278 * doc/dbus-specification.sgml: lots of cosmetic
5279 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5280 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5281 s/server/bus/ (except in authentication section). Add a section
5282 "Message Bus Message Routing"
5284 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5290 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5292 * doc/dbus-specification.sgml:
5293 Specification updates.
5295 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5297 * bus/activation.c: (bus_activation_init), (child_setup),
5298 (bus_activation_activate_service):
5300 * bus/main.c: (main):
5301 Set DBUS_ADDRESS environment variable.
5303 * dbus/dbus-errors.c: (dbus_set_error):
5304 Don't use va_copy since that's a C99 feature.
5306 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5307 (_dbus_spawn_async):
5308 * dbus/dbus-sysdeps.h:
5309 Add child_setup_func to _dbus_spawn_async.
5311 * doc/dbus-specification.sgml:
5312 Update specification.
5314 * test/spawn-test.c: (setup_func), (main):
5317 2003-02-17 Alexander Larsson <alexl@redhat.com>
5319 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5322 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5326 * doc/dbus-test-plan.sgml:
5327 Add test plan document.
5332 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5334 * dbus/dbus-message.c: (decode_header_data),
5335 (_dbus_message_loader_return_buffer):
5336 Set the header padding amount when loading a message.
5338 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5340 * bus/dispatch.c: (send_one_message):
5341 Only send broadcast messages to registered connections.
5343 * dbus/dbus-message.c: (dbus_message_name_is):
5344 * dbus/dbus-message.h:
5345 New convenience function.
5347 * dbus/dbus-transport-debug.c: (do_reading):
5348 Only dispatch one message per run.
5351 * test/bus-test.c: (new_connection_callback), (die),
5352 (test_hello_client1_handler), (test_hello_client2_handler),
5353 (test_hello_replies), (main):
5355 * test/bus-test-loop.[ch]:
5358 2003-02-16 Havoc Pennington <hp@pobox.com>
5360 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5361 backward conditional
5363 2003-02-16 Alexander Larsson <alexl@redhat.com>
5365 * dbus/dbus-connection.c:
5366 Implement sent_message_with_reply. (with_reply_and block is still
5368 Made dispatch_message not lose message if OOM.
5370 * dbus/dbus-errors.h:
5371 Add NoReply error (for reply timeouts).
5373 2003-02-16 Alexander Larsson <alexl@redhat.com>
5375 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5376 Actually free keys and values when destroying hashtable.
5378 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5380 * dbus/dbus-auth.c: (client_try_next_mechanism):
5383 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5384 Return TRUE if there's no thread implementation around.
5386 * glib/dbus-gmain.c: (free_source),
5387 (dbus_connection_hookup_with_g_main):
5388 Make sure to remove the GSource when the connection is finalized.
5390 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5392 * bus/dispatch.c: (bus_dispatch_message_handler):
5393 * dbus/dbus-errors.h:
5394 Return an error if someone tries to send a message to a service
5397 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5399 * bus/activation.c: (load_directory), (bus_activation_init),
5400 (bus_activation_activate_service):
5403 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5404 More work on the activation handling.
5406 * dbus/dbus-errors.h:
5407 Add some error messages
5409 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5410 * dbus/dbus-message.h:
5411 New function that creates an error message.
5413 * dbus/dbus-protocol.h:
5414 Add ACTIVATE_SERVER message.
5416 * dbus/dbus-server-unix.c: (unix_handle_watch),
5417 (_dbus_server_new_for_domain_socket):
5418 Call _dbus_fd_set_close_on_exec.
5420 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5421 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5422 (_dbus_fd_set_close_on_exec):
5423 * dbus/dbus-sysdeps.h:
5424 Add _dbus_fd_set_close_on exec function. Also add function that checks
5425 that all open fds are set to close-on-exec and warns otherwise.
5427 * dbus/dbus-transport-unix.c:
5428 (_dbus_transport_new_for_domain_socket):
5429 Call _dbus_fd_set_close_on_exec.
5431 2003-02-16 Havoc Pennington <hp@pobox.com>
5433 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5434 allow people to avoid setting SIGPIPE to SIG_IGN
5435 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5436 we've been asked not to
5438 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5440 * dbus/dbus-list.c: (_dbus_list_append_link),
5441 (_dbus_list_prepend_link):
5442 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5446 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5449 * bus/activation.c: (bus_activation_entry_free),
5450 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5452 * bus/main.c: (main):
5453 Add simple activation support, doesn't work yet though.
5455 2003-02-15 Zack Rusin <zack@kde.org>
5457 * qt/dbus-qthread.cpp: small casting fix
5459 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5461 * dbus/dbus-errors.c: (dbus_set_error):
5462 * dbus/dbus-errors.h:
5463 Add a few errors and make dbus_set_error void.
5465 * dbus/dbus-sysdeps.c:
5466 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5467 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5468 * dbus/dbus-sysdeps.h:
5469 Add _dbus_spawn_async.
5471 * test/spawn-test.c: (main):
5472 Test for _dbus_spawn_async.
5474 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5476 * dbus/dbus-internals.h:
5477 Fix build without tests.
5479 * dbus/dbus-list.c: (alloc_link):
5480 Fix a segfault when a malloc fails.
5482 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5483 (dbus_malloc0), (dbus_realloc):
5484 Add support for malloc debugging.
5486 2003-02-15 Alexander Larsson <alexl@redhat.com>
5488 * dbus/dbus-threads.c:
5489 * dbus/dbus-threads.h:
5490 Add condvars. Remove static mutext from API.
5491 Implement static mutexes by initializing them from threads_init.
5493 * glib/dbus-gthread.c:
5494 * qt/dbus-qthread.cpp:
5495 Update with the thread api changes.
5500 Turn StaticMutex into normal mutex + init function.
5501 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5502 _dbus_list_append_link, _dbus_list_prepend_link
5505 * dbus/dbus-sysdeps.c:
5506 * dbus/dbus-sysdeps.h:
5507 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5508 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5510 * dbus/dbus-protocol.h:
5511 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5513 * dbus/dbus-message.c:
5514 Make ref/unref atomic.
5517 * dbus/dbus-connection-internal.h:
5518 * dbus/dbus-connection.c:
5519 * dbus/dbus-connection.h:
5521 Change _peek to _borrow,_return & _steal_borrowed.
5522 Change disconnect callback to event.
5523 Make dbus_connection_dispatch_messages reentrant.
5525 * dbus/dbus-transport.c:
5526 Don't ref the connection on calls to the transport
5529 * dbus/dbus-message-handler.c:
5532 * glib/dbus-gmain.c:
5533 Don't use peek_message anymore
5536 * test/debug-thread.c:
5537 * test/debug-thread.h:
5538 Simple thread implementation that asserts() on deadlocks in
5539 single-threaded code.
5542 (main) Call debug_threads_init.
5545 Use disconnect message instead of disconnect callback.
5549 Don't call dbus_connection_set_disconnect_function. Instead export
5550 bus_connection_disconnect.
5553 Call bus_connection_disconnect when we get a disconnected message.
5555 2003-02-15 Havoc Pennington <hp@pobox.com>
5557 * dbus/dbus-message.c (dbus_message_new): fool around with the
5560 2003-02-14 Havoc Pennington <hp@pobox.com>
5562 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5564 * dbus/dbus-memory.c: fail if the debug functions indicate we
5567 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5568 (_dbus_decrement_fail_alloc_counter): debug functions to
5569 simulate memory allocation failures
5571 2003-02-14 Havoc Pennington <hp@pobox.com>
5573 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5576 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5578 * bus/driver.c: (bus_driver_handle_hello):
5580 * bus/services.c: (bus_service_lookup):
5581 Reorder message sending so we get a more sane order.
5583 * test/bus-test.c: (message_handler):
5586 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5588 * bus/driver.c: (bus_driver_send_service_deleted),
5589 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5590 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5591 (bus_driver_send_welcome_message),
5592 (bus_driver_handle_list_services),
5593 (bus_driver_handle_acquire_service),
5594 (bus_driver_handle_service_exists):
5595 * dbus/dbus-bus.c: (dbus_bus_register_client),
5596 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5597 * dbus/dbus-errors.c: (dbus_result_to_string):
5598 * dbus/dbus-errors.h:
5599 * dbus/dbus-message.c: (dbus_message_append_args),
5600 (dbus_message_append_args_valist), (dbus_message_get_args),
5601 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5602 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5603 (dbus_message_iter_get_byte_array),
5604 (dbus_message_iter_get_string_array), (message_iter_test),
5605 (check_message_handling), (_dbus_message_test):
5606 * dbus/dbus-message.h:
5607 * test/bus-test.c: (main):
5608 Change fields to arguments in messages, so that they won't be
5609 confused with header fields.
5611 * glib/test-dbus-glib.c: (main):
5612 Remove append_fields from hello message.
5614 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5616 * dbus/dbus-errors.c:
5617 * dbus/dbus-message.c:
5618 * dbus/dbus-string.c:
5619 Documentation fixes.
5621 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5623 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5625 Implement support for timeouts in dbus-glib.
5627 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5629 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5630 * dbus/dbus-message.c: (process_test_subdir):
5631 * test/break-loader.c: (find_breaks_based_on):
5632 Plug some memory leaks.
5634 2003-02-13 Richard Hult <rhult@codefactory.se>
5636 * bus/main.c: Fix build.
5638 * dbus/dbus-errors.h:
5639 * dbus/dbus-errors.c: Fix copyright for Anders.
5641 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5646 * bus/connection.c: (bus_connection_foreach):
5649 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5650 (unescape_string), (new_section), (parse_section_start),
5651 (parse_key_value), (report_error), (bus_desktop_file_load),
5652 (bus_desktop_file_get_string):
5653 * bus/desktop-file.h:
5654 Use DBusError for error reporting.
5656 * bus/dispatch.c: (send_one_message),
5657 (bus_dispatch_message_handler):
5658 * bus/driver.c: (bus_driver_send_service_deleted),
5659 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5660 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5661 (bus_driver_send_welcome_message),
5662 (bus_driver_handle_list_services),
5663 (bus_driver_handle_acquire_service),
5664 (bus_driver_handle_service_exists):
5665 * bus/loop.c: (bus_loop_run):
5667 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5669 * bus/utils.c: (bus_wait_for_memory):
5671 New files with general utility functions.
5673 * dbus/dbus-internals.h:
5674 Remove _DBUS_HANDLE_OOM.
5676 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5678 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5679 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5680 * dbus/dbus-errors.h:
5681 Add DBusError structure.
5683 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5685 * test/data/valid-messages/standard-acquire-service.message:
5686 * test/data/valid-messages/standard-hello.message:
5687 * test/data/valid-messages/standard-list-services.message:
5688 * test/data/valid-messages/standard-service-exists.message:
5689 Add some standard messages.
5691 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5693 * bus/driver.c: (bus_driver_send_welcome_message),
5694 (bus_driver_handle_list_services),
5695 (bus_driver_handle_acquire_service),
5696 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5697 Update for API changes in libdbus.
5699 * dbus/dbus-message.c: (dbus_message_new_reply):
5700 * dbus/dbus-message.h:
5701 Remove the name argument. The spec states that replies shouldn't
5704 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5706 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5707 (report_error), (bus_desktop_file_load), (lookup_section),
5708 (lookup_line), (bus_desktop_file_get_raw),
5709 (bus_desktop_file_get_string):
5710 * bus/desktop-file.h:
5711 Some fixes, and new functions for getting a key value from a section.
5713 2003-02-13 Havoc Pennington <hp@pobox.com>
5715 * test/data/auth/fail-after-n-attempts.auth-script: new test
5717 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5720 2003-02-13 Havoc Pennington <hp@pobox.com>
5722 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5723 dbus_credentials_match were backward
5725 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5726 NO_CREDENTIALS and ROOT_CREDENTIALS
5728 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5729 into here. Never process more commands after we've reached an
5730 end state; store further data as unused bytes.
5732 * test/data/auth/*: add more auth tests
5734 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5735 command to match exact string and EXPECT_UNUSED to match unused
5738 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5740 2003-02-12 Havoc Pennington <hp@pobox.com>
5742 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5743 \r off of popped lines
5745 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5748 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5751 2003-02-12 Havoc Pennington <hp@pobox.com>
5753 * dbus/Makefile.am: remove break-loader from the build, since it
5756 * configure.in: add --enable-gcov to turn on coverage profiling
5757 flags and disable optimization
5759 2003-02-10 Havoc Pennington <hp@pobox.com>
5761 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5762 initial cut at test framework for DBusAuth from laptop.
5763 Doesn't quite work yet but it compiles and I need to get
5764 it off the 266mhz laptop. ;-)
5766 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5767 fix a memleak in error case
5769 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5772 * bus/desktop-file.c:
5773 * bus/desktop-file.h:
5774 Add a desktop file parser.
5776 2003-02-11 Zack Rusin <zack@kde.org>
5778 * qt/message.[h|cpp]: sample implementation
5779 of the KDE wrapper for DBusMessage
5781 2003-02-09 Zack Rusin <zack@kde.org>
5783 * test/bus-test.c: make_it_compile
5784 * doc/dbus-specification.sgml: minimal semantic fix
5786 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5792 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5795 * dbus/dbus-break-loader.c:
5797 * test/break-loader.c:
5798 Move dbus-break-loader to test/ and rename it to break-loader.
5800 2003-02-02 Havoc Pennington <hp@pobox.com>
5802 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5803 for code to manage cookies in your home directory
5805 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5807 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5808 to authenticate, then disconnect the client.
5810 2003-02-03 Alexander Larsson <alexl@redhat.com>
5812 * dbus/dbus-message.c (dbus_message_append_fields):
5815 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5817 * doc/dbus-specification.sgml:
5818 Update address format section.
5820 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5823 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5824 (message_handler), (new_connection_callback), (loop_quit),
5828 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5830 * bus/driver.c: (bus_driver_handle_service_exists):
5831 Simplify the code a bit.
5833 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5836 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5839 Add libdbus-daemon.la and link to it.
5841 2003-02-01 James Willcox <jwillcox@gnome.org>
5843 * bus/driver.c: (bus_driver_handle_own_service):
5844 Actually include the service reply code in the message.
5846 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5848 * bus/driver.c: (bus_driver_handle_service_exists):
5849 Don't unref the incoming message.
5851 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5853 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5855 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5857 * dbus/dbus-server.c: (dbus_server_listen):
5858 * dbus/dbus-transport.c: (_dbus_transport_open):
5859 ifdef out the calls to the debug transport and server.
5861 2003-02-02 Alexander Larsson <alexl@redhat.com>
5863 * dbus/dbus-watch.c (dbus_watch_get_flags):
5864 Add note in the docs that ERROR or HANGUP won't be returned
5865 and are assumed always on.
5867 * glib/dbus-gmain.c (add_watch):
5868 Always add IO_ERR | IO_HUP
5870 * dbus/dbus-message.h:
5871 Add semicolon after dbus_message_iter_get_string_array().
5872 Makes qt code build again
5874 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5876 * bus/driver.c: (create_unique_client_name),
5877 (bus_driver_handle_hello):
5878 Don't take a name, just use a numeric id to identify
5882 * dbus/dbus-bus.c: (dbus_bus_register_client),
5883 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5885 Add new convenience functions for communicating with the bus.
5887 * dbus/dbus-message.h:
5889 * dbus/dbus-protocol.h:
5892 2003-02-01 Alexander Larsson <alexl@redhat.com>
5894 * dbus/dbus-message.c (dbus_message_append_fields):
5895 Add some more doc comments.
5897 2003-02-01 Havoc Pennington <hp@pobox.com>
5899 * dbus/dbus-break-loader.c (randomly_modify_length): change
5900 a 4-byte value in the message as if it were a length
5902 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5903 execute bit on saved files
5905 2003-02-01 Havoc Pennington <hp@pobox.com>
5907 * dbus/dbus-break-loader.c (main): new program to find messages
5908 that break the loader.
5910 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5911 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5913 * dbus/dbus-string.c (_dbus_string_set_byte): new
5915 2003-01-31 Havoc Pennington <hp@pobox.com>
5917 * dbus/dbus-message.c: refactor the test code to be more general,
5918 in preparation for writing a "randomly permute test cases to
5919 try to break the loader" program.
5921 2003-01-31 Havoc Pennington <hp@pobox.com>
5923 * doc/dbus-specification.sgml: work on the specification
5925 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5926 the protocol version of the message.
5928 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5929 no longer specifies that.
5930 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5933 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5934 "break" for DBUS_TYPE_NIL, remove @todo
5936 2003-01-31 Havoc Pennington <hp@pobox.com>
5938 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5939 just set_is_error/get_is_error as this is a commonly-used
5940 function, and write docs.
5942 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5944 * dbus/dbus-address.c: (dbus_address_entry_free):
5945 Free key and value lists.
5947 * dbus/dbus-internals.c: (_dbus_type_to_string):
5948 Add the types we didn't have.
5950 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5951 (_dbus_marshal_validate_arg):
5954 * dbus/dbus-message.c: (dbus_message_set_sender):
5955 Remove todo about being able to set sender to NULL.
5957 (dbus_message_set_is_error_reply),
5958 (dbus_message_get_is_error_reply):
5959 * dbus/dbus-message.h:
5962 * dbus/dbus-protocol.h:
5963 Add error reply flag.
5965 * test/data/valid-messages/opposite-endian.message:
5966 Add NIL type to test.
5968 2003-01-31 Havoc Pennington <hp@pobox.com>
5970 * doc/dbus-specification.sgml: fully specify the header. Add
5971 flags and major protocol version, and change header/body len to
5974 * dbus/dbus-message-builder.c (append_saved_length): append length
5977 * dbus/dbus-message.c (dbus_message_create_header): change header
5978 length and body length to unsigned. Add the new fields from the
5980 (_dbus_message_loader_return_buffer): unsigned header/body len
5982 2003-01-30 Havoc Pennington <hp@pobox.com>
5984 * dbus/dbus-auth.c: rework to use only REJECTED, no
5987 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5988 use REJECTED, suggested by Mark McLoughlin
5990 2003-01-30 Havoc Pennington <hp@pobox.com>
5992 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5993 a better way to report errors here. e.g. "unix address lacks
5994 path" or something. also "no such file" when the path doesn't
5997 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5999 (dbus_parse_address): add @todo about documenting address format,
6000 and allowing , and ; to be escaped
6002 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6005 Add dbus-address.[ch]
6007 * dbus/dbus-address.c: (dbus_address_entry_free),
6008 (dbus_address_entries_free), (create_entry),
6009 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6010 (dbus_parse_address), (_dbus_address_test):
6011 * dbus/dbus-address.h:
6012 New files for dealing with address parsing.
6014 * dbus/dbus-connection.c:
6015 Document timeout functions.
6017 * dbus/dbus-message.c:
6018 Document dbus_message_new_from_message.
6020 * dbus/dbus-server-debug.c:
6023 * dbus/dbus-server.c: (dbus_server_listen):
6024 Parse address and use correct server implementation.
6026 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6027 * dbus/dbus-string.h:
6028 New function with test.
6030 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6034 * dbus/dbus-transport-debug.c:
6037 * dbus/dbus-transport.c: (_dbus_transport_open):
6038 Parse address and use correct transport implementation.
6040 2003-01-30 Havoc Pennington <hp@pobox.com>
6042 * dbus/dbus-message.c: use message->byte_order instead of
6043 DBUS_COMPILER_BYTE_ORDER throughout.
6044 (dbus_message_create_header): pad header to align the
6045 start of the body of the message to 8-byte boundary
6047 * dbus/dbus-marshal.h: make all the demarshalers take const
6048 DBusString arguments.
6050 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6051 validate message args here, so we don't have to do slow validation
6052 later, and so we catch bad messages as they are incoming. Also add
6053 better checks on header_len and body_len. Also fill in
6056 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6057 implemented properly)
6058 (_dbus_string_validate_nul): new function to check all-nul
6060 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6061 get_arg_end_pos and remove all validation
6062 (_dbus_marshal_validate_arg): actually do validation here.
6064 2003-01-29 Havoc Pennington <hp@pobox.com>
6066 * dbus/dbus-message.c (check_message_handling): fix assertion
6067 failure on set_client_serial
6069 2003-01-28 Havoc Pennington <hp@pobox.com>
6071 * dbus/dbus-server-debug.c: Add doc section comments
6073 * dbus/dbus-transport-debug.c: add doc section comments
6075 2003-01-28 Havoc Pennington <hp@redhat.com>
6077 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6078 the reverse order from how I had it
6079 (_dbus_string_base64_encode): reverse encoding order. I was
6080 basically byteswapping everything during encoding.
6082 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6084 * dbus/dbus-connection-internal.h:
6085 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6086 (_dbus_connection_remove_timeout):
6087 Add functions for adding and removing timeouts.
6089 * dbus/dbus-message.c: (dbus_message_new_from_message):
6090 Add new function that takes a message and creates an exact
6091 copy of it, but with the refcount set to 1.
6092 (check_message_handling):
6095 * dbus/dbus-server-protected.h:
6096 * dbus/dbus-server.c: (_dbus_server_init_base),
6097 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6098 (dbus_server_set_timeout_functions):
6099 (_dbus_server_remove_timeout):
6100 New functions so that a server can add and remove timeouts.
6102 (dbus_server_listen):
6103 Add commented out call to dbus_server_debug_new.
6105 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6106 Actually set the handler, doh.
6108 * dbus/dbus-transport.c: (_dbus_transport_open):
6109 Add commented out call to dbus_transport_debug_client_new.
6112 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6114 2003-01-28 Havoc Pennington <hp@pobox.com>
6116 * dbus/dbus-message.c (check_message_handling): function to check
6117 on the loaded message, iterates over it etc.
6119 2003-01-28 Havoc Pennington <hp@pobox.com>
6121 * test/Makefile.am (dist-hook): fix make distdir
6123 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6125 2003-01-27 Havoc Pennington <hp@pobox.com>
6127 * dbus/dbus-mempool.c (time_for_size): replace printf with
6130 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6131 empty lines; fix the SAVE_LENGTH stuff to be
6132 START_LENGTH/END_LENGTH so it actually works; couple other
6135 * test/Makefile.am (dist-hook): add dist-hook for .message files
6137 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6138 can be constant or locked.
6139 (_dbus_string_free): allow freeing a const string as
6142 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6144 * dbus/dbus-test-main.c (main): take an argument which is the
6145 directory containing test data
6147 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6148 argument to this and load all the messages in test/data/
6149 checking that they can be loaded or not loaded as appropriate.
6151 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6153 * bus/dispatch.c: (bus_dispatch_message_handler):
6154 Dispatch messages sent to services.
6156 * bus/driver.c: (bus_driver_send_service_deleted),
6157 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6158 (bus_driver_send_service_acquired):
6159 Add helper functions for sending service related messages.
6161 (bus_driver_send_welcome_message):
6162 Send HELLO_REPLY instead of WELCOME.
6164 (bus_driver_handle_list_services):
6165 Send LIST_SERVICES_REPLY instead of SERVICES.
6167 (bus_driver_handle_own_service),
6168 (bus_driver_handle_service_exists):
6169 New message handlers.
6171 (bus_driver_handle_message):
6172 Invoke new message handlers.
6174 (bus_driver_remove_connection):
6175 Don't remove any services here since that's done automatically
6176 by bus_service_remove_owner now.
6179 New function signatures.
6181 * bus/services.c: (bus_service_add_owner):
6182 Send ServiceAcquired message if we're the only primary owner.
6184 (bus_service_remove_owner):
6185 Send ServiceAcquired/ServiceLost messages.
6187 (bus_service_set_prohibit_replacement),
6188 (bus_service_get_prohibit_replacement):
6189 Functions for setting prohibit replacement.
6191 (bus_service_has_owner):
6192 New function that checks if a connection is in the owner queue of
6196 Add new function signatures.
6198 * dbus/dbus-list.c: (_dbus_list_test):
6199 Add tests for _dbus_list_remove_last and traversing the list backwards.
6202 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6203 go any further, so return NULL then.
6205 * dbus/dbus-protocol.h:
6206 Add new messages, service flags and service replies.
6208 2003-01-26 Havoc Pennington <hp@pobox.com>
6210 * dbus/dbus-message-builder.c: implement, completely untested.
6212 * test/data/*: add data to be used in testing.
6213 ".message" files are our simple loadable text format.
6214 ".message-raw" will be binary dumps of messages.
6216 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6218 2003-01-26 Havoc Pennington <hp@pobox.com>
6220 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6222 * dbus/dbus-errors.c (dbus_result_to_string): add
6225 * dbus/dbus-message-builder.c: new file, will contain code to load
6226 up messages from files. Not implemented yet.
6228 2003-01-26 Havoc Pennington <hp@pobox.com>
6230 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6231 the sender by setting to NULL
6233 2003-01-26 Havoc Pennington <hp@pobox.com>
6235 The unit tests pass, but otherwise untested. If it breaks, the
6236 tests should have been better. ;-)
6238 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6241 * dbus/dbus-message.c: redo everything so we maintain
6242 message->header as the only copy of the various fields.
6243 This avoids the possibility of out-of-memory in some cases,
6244 for example dbus_message_lock() can't run out of memory anymore,
6245 and avoids extra copying. Figured I may as well go ahead and do
6246 this since it was busted for dbus_message_lock to not return
6247 failure on OOM, and dbus_message_write_header was totally
6248 unchecked for OOM. Also fixed some random other bugs.
6250 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6251 that strings are nul-terminated. Also, end_pos can be equal
6252 to string length just not greater than, I think.
6253 (_dbus_marshal_set_int32): new function
6254 (_dbus_marshal_set_uint32): new function
6255 (_dbus_marshal_set_string): new function
6257 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6258 a warning, init timeout_list to NULL
6259 (dbus_connection_send_message): don't use uninitialized variable
6262 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6264 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6266 * bus/driver.c: (bus_driver_handle_hello),
6267 (bus_driver_send_welcome_message):
6270 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6272 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6273 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6274 (dbus_connection_unref):
6275 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6276 * dbus/dbus-message.c: (dbus_message_unref),
6279 (dbus_message_get_fields):
6280 Remove debugging printout.
6282 (_dbus_message_loader_return_buffer):
6283 Don't store the header string.
6285 (_dbus_message_test):
6288 2003-01-26 Richard Hult <rhult@codefactory.se>
6290 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6291 the file descriptor list, since it can change under us.
6293 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6295 * glib/dbus-gmain.c: (dbus_connection_prepare),
6296 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6297 (remove_watch), (dbus_connection_hookup_with_g_main):
6298 Rewrite the glib handling to use its own GSource instead of a
6299 GIOChannel so we can catch messages put in the queue while waiting
6302 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6305 * bus/connection.c: (connection_disconnect_handler),
6306 (connection_watch_callback), (bus_connection_setup):
6307 * bus/dispatch.c: (send_one_message),
6308 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6309 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6311 * bus/driver.c: (bus_driver_send_service_deleted),
6312 (bus_driver_send_service_created), (bus_driver_handle_hello),
6313 (bus_driver_send_welcome_message),
6314 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6315 (bus_driver_handle_message):
6317 Refactor code, put the message dispatching in its own file. Use
6318 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6321 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6323 * dbus/dbus-internals.h:
6324 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6326 * dbus/dbus-message.c: (dbus_message_get_sender):
6327 * dbus/dbus-message.h:
6328 Implement dbus_message_get_sender.
6330 * dbus/dbus-protocol.h:
6331 Add message and service defines.
6333 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6335 * dbus/dbus-connection.c: (dbus_connection_send_message):
6336 * dbus/dbus-message-internal.h:
6337 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6338 (dbus_message_write_header):
6339 Remove _dbus_messag_unlock and don't set the client serial on a
6340 message if one already exists.
6342 2003-01-24 Havoc Pennington <hp@pobox.com>
6344 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6347 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6350 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6352 * dbus/dbus-list.c: (alloc_link), (free_link):
6353 Use a memory pool for the links.
6355 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6357 * bus/connection.c: (bus_connection_foreach):
6359 Add new bus_connection_foreach function.
6361 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6362 Add function that broadcasts a message to all clients.
6364 (bus_driver_send_service_created), (bus_driver_handle_hello),
6365 (bus_driver_send_welcome_message),
6366 (bus_driver_handle_list_services), (bus_driver_message_handler):
6367 Implement functions that take care of listing services, and notifying
6368 clients when new services are created.
6370 * bus/services.c: (bus_services_list):
6372 Add new function that returns an array of strings with the currently
6373 registered services.
6376 * glib/dbus-gmain.c:
6377 Update copyright year.
6379 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6381 * dbus/dbus-connection.c: (dbus_connection_send_message):
6382 Unlock the message in case it was sent earlier.
6384 (dbus_connection_send_message_with_reply_and_block):
6385 Remove the reply message from the list.
6387 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6388 Set array_len and new_pos correctly.
6390 (_dbus_marshal_test):
6391 Remove debug output.
6393 * dbus/dbus-message-internal.h:
6394 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6395 New function that returns the reply serial.
6397 (_dbus_message_unlock):
6398 New function that unlocks a message and resets its header.
6400 (dbus_message_append_string_array),
6401 (dbus_message_get_fields_valist),
6402 (dbus_message_iter_get_field_type),
6403 (dbus_message_iter_get_string_array),
6404 (dbus_message_get_fields),
6405 (dbus_message_append_fields_valist):
6406 Handle string arrays.
6408 (dbus_message_set_sender):
6409 Make this function public since the bus daemon needs it.
6411 (decode_header_data):
6412 Set the reply serial to -1 initially.
6414 * dbus/dbus-message.h:
6415 Add dbus_message_set_sender.
6417 2003-01-24 Havoc Pennington <hp@pobox.com>
6419 * doc/dbus-specification.sgml: add some stuff
6421 2003-01-22 Havoc Pennington <hp@pobox.com>
6423 * doc/dbus-specification.sgml: Start to document the protocol.
6425 2003-01-22 Havoc Pennington <hp@pobox.com>
6427 * dbus/dbus-connection.c
6428 (dbus_connection_send_message_with_reply_and_block): add some @todo
6430 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6432 2003-01-21 Havoc Pennington <hp@pobox.com>
6434 (patch untested because can't compile)
6436 * bus/driver.c (create_unique_client_name): make this function
6437 never recycle client names. Also, caller should initialize
6440 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6442 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6444 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6445 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6446 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6447 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6448 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6449 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6450 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6451 * dbus/dbus-marshal.h:
6452 * dbus/dbus-protocol.h:
6453 Add support for marshalling and demarshalling integer, double
6456 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6461 * bus/connection.c: (connection_disconnect_handler):
6462 Remove the connection from the bus driver's list.
6464 (connection_watch_callback): Dispatch messages.
6466 (free_connection_data): Free connection name.
6468 (bus_connection_setup): Add connection to the bus driver's list.
6469 (bus_connection_remove_owned_service):
6470 (bus_connection_set_name), (bus_connection_get_name):
6471 Add functions for setting and getting the connection's name.
6474 Add function headers.
6476 * bus/driver.c: (create_unique_client_name),
6477 (bus_driver_handle_hello_message),
6478 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6479 (bus_driver_add_connection), (bus_driver_remove_connection):
6482 * bus/services.c: (bus_service_free):
6484 New file that handles communication and registreation with the bus
6487 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6489 * dbus/dbus-connection.c: (dbus_connection_send_message):
6490 Add a new client_serial parameter.
6492 (dbus_connection_send_message_with_reply):
6493 Remove a @todo since we've implemented the blocking function.
6495 (dbus_connection_send_message_with_reply_and_block):
6496 New function that sends a message and waits for a reply and
6497 then returns the reply.
6499 * dbus/dbus-connection.h:
6502 * dbus/dbus-errors.c: (dbus_result_to_string):
6503 * dbus/dbus-errors.h:
6504 Add new DBUS_RESULT.
6506 * dbus/dbus-message-internal.h:
6507 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6508 (_dbus_message_set_sender), (dbus_message_write_header),
6509 (dbus_message_new_reply), (decode_header_data),
6510 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6511 * dbus/dbus-message.h:
6512 Add new functions that set the reply serial and sender.
6513 Also marshal and demarshal them correctly and add test.
6515 * dbus/dbus-protocol.h:
6516 Add new DBUS_MESSAGE_TYPE_SENDER.
6519 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6520 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6521 (dbus_connection_hookup_with_g_main):
6522 * glib/test-dbus-glib.c: (main):
6523 Rewrite to use GIOChannel and remove the GSource crack.
6525 * test/echo-client.c: (main):
6526 * test/watch.c: (check_messages):
6527 Update for changed APIs
6529 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6531 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6533 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6534 Create a DBusTimeoutList.
6535 (dbus_connection_set_timeout_functions): Add new function to
6536 set timeout callbacks
6538 * dbus/dbus-connection.h: Add public DBusTimeout API.
6540 * dbus/dbus-message.c: (dbus_message_get_service):
6541 * dbus/dbus-message.h: New function.
6543 * dbus/dbus-server.c: Fix small doc typo.
6545 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6547 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6549 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6550 of the string, just as long as specified.
6552 2003-01-19 Havoc Pennington <hp@pobox.com>
6554 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6557 * dbus/dbus-server.c (dbus_server_set_max_connections)
6558 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6559 keep track of current number of connections, and add API for
6560 setting a max (but haven't implemented enforcing the max yet)
6562 2003-01-18 Havoc Pennington <hp@pobox.com>
6564 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6565 reading/writing if read_watch != NULL or write_watch != NULL.
6567 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6568 the message loader code to actually load message->header and
6569 message->body into the newly-created message.
6571 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6574 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6575 (dbus_connection_get_max_message_size)
6576 (dbus_connection_set_max_live_messages_size)
6577 (dbus_connection_get_max_live_messages_size): implement some
6578 resource limitation functions
6580 * dbus/dbus-resources.c: new file implementing some of the
6581 resource limits stuff
6583 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6584 missing docs, add @todo to handle OOM etc.
6586 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6589 2003-01-18 Havoc Pennington <hp@pobox.com>
6591 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6592 connection if it hasn't been already.
6594 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6595 replace with DisconnectFunction.
6597 2003-01-18 Havoc Pennington <hp@pobox.com>
6599 Building --disable-verbose-mode --disable-asserts --disable-tests
6600 cuts the library from 112K to 45K or so
6602 * configure.in: check for varargs macro support,
6603 add --enable-verbose-mode, --enable-asserts.
6605 * dbus/dbus-internals.h (_dbus_assert): support
6607 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6609 2003-01-18 Havoc Pennington <hp@pobox.com>
6611 * dbus/dbus-test.c: include config.h so that tests actually run
6613 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6614 so the failure mode when that assumption fails will be plenty
6617 2003-01-18 Havoc Pennington <hp@pobox.com>
6619 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6621 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6624 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6625 since we don't want to use those in make check
6627 2003-01-15 Havoc Pennington <hp@redhat.com>
6633 2003-01-15 Havoc Pennington <hp@redhat.com>
6635 * test/Makefile.am: fix so that test source code ends up in the
6636 distribution on make distcheck
6638 2003-01-15 Havoc Pennington <hp@redhat.com>
6644 2003-01-15 Havoc Pennington <hp@redhat.com>
6646 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6647 fix build when --disable-tests
6649 * Makefile.am (EXTRA_DIST): put HACKING in here
6651 * HACKING: document procedure for making a tarball release.
6653 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6655 * bus/connection.c: (connection_error_handler),
6656 (bus_connection_setup):
6657 * bus/main.c: (main):
6658 Make sure that the DBusConnectionData struct is NULLed
6659 out to prevent a segfault.
6661 * dbus/dbus-errors.c: (dbus_result_to_string):
6662 * dbus/dbus-errors.h:
6663 * dbus/dbus-message.c: (dbus_message_get_fields),
6664 (dbus_message_get_fields_valist), (_dbus_message_test):
6665 * dbus/dbus-message.h:
6666 Make dbus_message_get_fields return a result code so we can
6667 track invalid fields as well as oom.
6669 2003-01-11 Havoc Pennington <hp@pobox.com>
6671 * configure.in: change --enable-test/--enable-ansi action-if-given
6672 to enable_foo=$enableval instead of enable_foo=yes
6674 2003-01-08 Havoc Pennington <hp@pobox.com>
6676 * dbus/dbus-string.c (_dbus_string_align_length): new function
6678 * dbus/dbus-test-main.c: move main() for test app here
6680 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6681 symbol to run tests, because dbus-test isn't in the main
6684 Code review nitpicks.
6686 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6687 for people with narrow emacs ;-). Assert client_serial was filled
6688 in. Assert message->name != NULL.
6689 (dbus_message_append_fields): have "first_field_type" arg separate
6690 from va list, needed for C++ binding that also uses varargs IIRC
6691 and helps with type safety
6692 (dbus_message_new): add @todo about using DBusString to store
6693 service/name internally
6694 (dbus_message_new): don't leak ->service and ->name on OOM later
6696 (dbus_message_unref): free the service name
6697 (dbus_message_get_fields): same change to varargs
6698 i.e. first_field_type
6699 (_dbus_message_loader_return_buffer): assert that the message data
6700 is aligned (if not it's a bug in our code). Put in verbose griping
6701 about why we set corrupted = TRUE.
6702 (decode_header_data): add FIXME that char* is evil. Was going to
6703 add FIXME about evil locale-specific string.h strncmp, but just
6704 switched to wacky string-as-uint32 optimization. Move check for
6705 "no room for field name" above get_const_data_len() to avoid
6706 assertion failure in get_const_data_len if we have trailing 2
6707 bytes or the like. Check for service and name fields being
6708 provided twice. Don't leak service/name on error. Require field
6709 names to be aligned to 4 bytes.
6711 * dbus/dbus-marshal.c: move byte swap stuff to header
6712 (_dbus_pack_int32): uscore-prefix
6713 (_dbus_unpack_int32): uscore-prefix
6714 (_dbus_unpack_uint32): export
6715 (_dbus_demarshal_string): add @todo complaining about use of
6717 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6718 handling allowing corrupt data to go unchecked
6720 2003-01-08 Havoc Pennington <hp@redhat.com>
6722 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6723 to the select() as needed for authentication. (should be using
6724 _dbus_poll() not select, but for another day)
6726 * dbus/dbus.h: include dbus/dbus-protocol.h
6728 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6730 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6733 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6735 * dbus/dbus-internals.c: (_dbus_type_to_string):
6736 New function that returns a string describing a type.
6738 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6739 * dbus/dbus-marshal.h:
6740 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6741 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6742 (dbus_message_iter_get_byte_array):
6743 * dbus/dbus-message.h:
6744 Add new convenience functions for appending and getting message fields.
6745 Also add demarshalling routines for byte arrays.
6747 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6749 * dbus/dbus-connection-internal.h:
6750 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6751 (_dbus_connection_get_next_client_serial),
6752 (dbus_connection_send_message):
6753 * dbus/dbus-internals.h:
6754 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6755 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6756 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6757 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6758 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6759 (_dbus_verbose_bytes), (_dbus_marshal_test):
6760 * dbus/dbus-marshal.h:
6761 * dbus/dbus-message-internal.h:
6762 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6763 (dbus_message_write_header), (_dbus_message_lock),
6764 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6765 (dbus_message_get_name), (dbus_message_append_int32),
6766 (dbus_message_append_uint32), (dbus_message_append_double),
6767 (dbus_message_append_string), (dbus_message_append_byte_array),
6768 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6769 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6770 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6771 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6772 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6773 (decode_header_data), (_dbus_message_loader_return_buffer),
6774 (message_iter_test), (_dbus_message_test):
6775 * dbus/dbus-message.h:
6776 * dbus/dbus-protocol.h:
6777 * dbus/dbus-test.c: (main):
6779 * glib/test-dbus-glib.c: (message_handler), (main):
6780 * test/echo-client.c: (main):
6781 * test/watch.c: (check_messages):
6782 Make messages sendable and receivable for real.
6784 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6786 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6787 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6788 * dbus/dbus-message.c: (dbus_message_append_int32),
6789 (dbus_message_append_uint32), (dbus_message_append_double),
6790 (dbus_message_append_string), (dbus_message_append_byte_array):
6791 Handle OOM restoration.
6793 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6795 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6796 (_dbus_demarshal_string), (_dbus_marshal_test):
6797 * dbus/dbus-marshal.h:
6798 * dbus/dbus-message.c: (dbus_message_get_name),
6799 Document these functions.
6801 (dbus_message_append_int32), (dbus_message_append_uint32),
6802 (dbus_message_append_double), (dbus_message_append_string),
6803 (dbus_message_append_byte_array):
6804 * dbus/dbus-message.h:
6805 Add functions for adding message fields of different types.
6807 * dbus/dbus-protocol.h:
6808 Add the different types.
6810 2003-01-05 Havoc Pennington <hp@pobox.com>
6812 * bus/connection.c: implement routines for handling connections,
6813 first thing is keeping a list of owned services on each connection
6814 and setting up watches etc.
6816 * bus/services.c: implement a mapping from service names to lists
6819 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6821 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6822 to use static mutexes for global data
6824 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6825 collection of functions to set/get application-specific data
6826 on the DBusConnection.
6828 2003-01-04 Havoc Pennington <hp@pobox.com>
6830 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6831 (_dbus_poll): new function
6833 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6836 * bus/loop.c: initial code for the daemon main loop
6838 2003-01-04 Havoc Pennington <hp@pobox.com>
6840 * test/watch.c (error_handler): make it safe if the error handler
6841 is called multiple times (if we s/error handler/disconnect
6842 handler/ we should just guarantee it's called only once)
6844 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6845 error handler on disconnect (it's quite possible we should
6846 just change the error handler to a "disconnect handler," I'm
6847 not sure we have any other meaningful errors)
6849 * configure.in: check for getpwnam_r
6851 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6852 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6853 mechanism as in SASL spec, using socket credentials
6855 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6856 (_dbus_send_credentials_unix_socket): new function
6858 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6860 (_dbus_write): only check errno if <0 returned
6861 (_dbus_write_two): ditto
6863 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6865 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6866 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6867 (_dbus_marshal_test):
6868 * dbus/dbus-marshal.h:
6869 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6870 to _dbus_marshal_utf8_string. Also fix some tests.
6872 2002-12-28 Harri Porten <porten@kde.org>
6874 * configure.in: added check for C++ compiler and a very cheesy
6875 check for the Qt integration
6877 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6879 * qt/Makefile.am: added
6881 * qt/.cvsignore: added
6883 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6884 latter, added #ifdef QT_THREAD_SUPPORT guard.
6886 * dbus/Makefile.am: added missing headers for make dist
6888 2002-12-28 Kristian Rietveld <kris@gtk.org>
6890 * dbus/Makefile.am: fixup export-symbols-regex.
6892 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6894 * acinclude.m4: Add this file and put the
6895 PKG_CHECK_MODULE macro in it.
6897 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6899 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6900 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6901 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6902 (_dbus_marshal_test):
6903 Make the demarshalling routines align the pos argument.
6904 Add string marshalling tests and fix the obvious bugs
6907 2002-12-26 Havoc Pennington <hp@pobox.com>
6909 * dbus/dbus-auth.c: fixes fixes fixes
6911 * dbus/dbus-transport-unix.c: wire up support for
6912 encoding/decoding data on the wire
6914 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6915 (_dbus_auth_decode_data): append to target string
6916 instead of nuking it.
6918 2002-12-26 Havoc Pennington <hp@pobox.com>
6920 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6921 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6924 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6925 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6926 now). Main point is because I wanted unpack_uint32 to implement
6928 (_dbus_verbose_bytes): new function
6930 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6932 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6933 mechanism to handle a corrupt message stream
6934 (_dbus_message_loader_new): fix preallocation to only prealloc,
6937 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6938 (_dbus_string_test): enhance tests for copy/move and fix the
6941 * dbus/dbus-transport-unix.c: Hold references in more places to
6942 avoid reentrancy problems
6944 * dbus/dbus-transport.c: ditto
6946 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6947 leak reference count in no-message case
6949 * test/watch.c (do_mainloop): handle adding/removing watches
6950 during iteration over the watches. Also, ref the connection/server
6951 stored on a watch, so we don't try to mangle a destroyed one.
6953 * dbus/dbus-transport-unix.c (do_authentication): perform
6956 * dbus/dbus-auth.c (get_state): add a state
6957 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6958 (_dbus_auth_get_unused_bytes): append the unused bytes
6959 to the passed in string, rather than prepend
6961 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6962 the auth conversation DBusAuth
6964 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6965 (_dbus_transport_new_for_domain_socket): when creating a
6966 transport, pass in whether it's a client-side or server-side
6967 transport so we know which DBusAuth to create
6969 2002-12-03 Havoc Pennington <hp@pobox.com>
6971 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6972 _after_ finalizing the derived members
6973 (unix_connection_set): unref watch if we fail to add it
6975 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6976 transport first, so that the connection owned by the
6977 transport will be valid as the transport finalizes.
6979 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6980 if necessary, and remove watches from the connection.
6982 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6984 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6986 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6987 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6988 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6989 (_dbus_marshal_test):
6990 * dbus/dbus-marshal.h:
6991 Add string marshal functions and have the demarshal functions
6992 return the new position.
6994 2002-12-25 Havoc Pennington <hp@pobox.com>
6996 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6997 it is a simple protocol that just maps directly to SASL.
6999 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7000 initial implementation, not actually used yet.
7002 * dbus/dbus-string.c (_dbus_string_find): new function
7003 (_dbus_string_equal): new function
7004 (_dbus_string_base64_encode): new function
7005 (_dbus_string_base64_decode): new function
7007 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7010 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7011 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7012 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7013 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7014 * dbus/dbus-marshal.h:
7015 * dbus/dbus-protocol.h:
7016 * dbus/dbus-test.c: (main):
7018 Add un-optimized marshalling/demarshalling routines.
7020 2002-12-25 Harri Porten <porten@kde.org>
7022 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7024 2002-12-24 Zack Rusin <zack@kde.org>
7026 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7027 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7030 2002-12-24 Havoc Pennington <hp@pobox.com>
7032 * glib/dbus-gthread.c: fix include
7034 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7035 I think glib API needs to change, though, as you don't
7036 want to use DBusMessageFunction, you want to use the
7037 DBusMessageHandler object. Probably
7038 dbus_connection_open_with_g_main_loop()
7039 and dbus_connection_setup_g_main_loop() or something like that
7040 (but think of better names...) that just create a connection
7041 that has watch/timeout functions etc. already set up.
7043 * dbus/dbus-connection.c
7044 (dbus_connection_send_message_with_reply): new function just to
7045 show how the message handler helps us deal with replies.
7047 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7049 * dbus/dbus-string.c (_dbus_string_test): free a string that
7052 * dbus/dbus-hash.c: use memory pools for the hash entries
7053 (rebuild_table): be more paranoid about overflow, and
7054 shrink table when we can
7055 (_dbus_hash_test): reduce number of sprintfs and write
7056 valid C89. Add tests for case where we grow and then
7057 shrink the hash table.
7059 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7061 * dbus/dbus-connection.c (dbus_connection_register_handler)
7062 (dbus_connection_unregister_handler): new functions
7064 * dbus/dbus-message.c (dbus_message_get_name): new
7066 * dbus/dbus-list.c: fix docs typo
7068 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7069 an object representing a handler for messages.
7071 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7074 * glib/dbus-gthread.c: (dbus_gthread_init):
7075 Don't use the gdbus prefix for public functions.
7077 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7081 Add GLib checks and fixup .pc files
7085 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7086 (gdbus_connection_check), (gdbus_connection_dispatch),
7087 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7088 (dbus_connection_gsource_new):
7089 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7090 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7091 * glib/test-dbus-glib.c: (message_handler), (main):
7094 2002-12-15 Harri Porten <porten@kde.org>
7096 * autogen.sh: check for libtoolize before attempting to use it
7098 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7101 * .cvsignore: ignore more stamp files
7103 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7105 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7106 without make install.
7108 2002-12-15 Havoc Pennington <hp@pobox.com>
7110 * dbus/dbus-threads.c: add thread stubs that a higher library
7111 layer can fill in. e.g. the GLib wrapper might fill them in with
7112 GThread stuff. We still need to use this thread API to
7113 thread-safe-ize the library.
7115 2002-12-12 Havoc Pennington <hp@pobox.com>
7117 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7118 below new interfaces and include fewer system headers.
7120 * dbus/dbus-sysdeps.c (_dbus_read): new function
7121 (_dbus_write): new function
7122 (_dbus_write_two): new function
7123 (_dbus_connect_unix_socket): new function
7124 (_dbus_listen_unix_socket): new function
7126 * dbus/dbus-message-internal.h: change interfaces to use
7129 2002-12-11 Havoc Pennington <hp@pobox.com>
7131 * dbus/dbus-types.h: add dbus_unichar
7133 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7135 * dbus/dbus-connection.c (dbus_connection_send_message): return
7138 * dbus/dbus-transport.c: include dbus-watch.h
7140 * dbus/dbus-connection.c: include dbus-message-internal.h
7142 * HACKING: add file with coding guidelines stuff.
7144 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7145 handling here, for security purposes (as in vsftpd). Not actually
7146 using this class yet.
7148 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7149 system/libc usage here, as in vsftpd, for ease of auditing (and
7150 should also simplify portability). Haven't actually moved all the
7151 system/libc usage into here yet.
7153 2002-11-25 Havoc Pennington <hp@pobox.com>
7155 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7156 always print the first verbose message.
7158 2002-11-24 Havoc Pennington <hp@pobox.com>
7160 * test/echo-client.c, test/echo-server.c: cheesy test
7163 * configure.in (AC_CHECK_FUNCS): check for writev
7165 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7168 * dbus/dbus-list.c (_dbus_list_foreach): new function
7170 * dbus/dbus-internals.c (_dbus_verbose): new function
7172 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7173 representing a server that listens for connections.
7175 * dbus/.cvsignore: create
7177 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7178 public API for reporting errors
7180 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7181 public object representing a connection that
7182 sends/receives messages. (Same object used for
7183 both client and server.)
7185 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7186 Basic abstraction for different kinds of stream
7187 that we might read/write messages from.
7189 2002-11-23 Havoc Pennington <hp@pobox.com>
7191 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7194 * dbus/dbus-test.c (main): add list test, and include
7195 dbus-test.h as intended
7197 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7198 (_dbus_hash_table_remove_int): return value indicates
7199 whether the entry existed to remove
7201 * dbus/dbus-list.c: add linked list utility class,
7204 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7207 2002-11-23 Havoc Pennington <hp@pobox.com>
7209 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7210 DBUS_END_DECLS to nothing, that should fix this once and for all
7212 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7214 * dbus/dbus-message.c, dbus/dbus-hash.c:
7215 add some missing @brief
7217 2002-11-23 Havoc Pennington <hp@pobox.com>
7219 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7220 to avoid confusing Doxygen
7222 * dbus/dbus-hash.c: @} not }@
7224 * dbus/dbus-message.c (struct DBusMessage): split out
7227 2002-11-23 Havoc Pennington <hp@pobox.com>
7229 * configure.in: pile on more warning flags if using gcc
7231 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7232 to document static functions
7234 * configure.in: add summary to end of configure so it
7235 looks nice and attractive
7237 * dbus/dbus-hash.c: finish implementation and write unit
7240 * configure.in: add --enable-tests to enable unit tests
7242 * dbus/dbus-test.c: test program to run unit tests
7243 for all files in dbus/*, initially runs a test for
7246 * dbus/dbus-internals.h: file to hold some internal utility stuff
7248 2002-11-22 Havoc Pennington <hp@redhat.com>
7250 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7251 "ported" away from Tcl
7253 * dbus/dbus-types.h: header for types such as dbus_bool_t
7255 2002-11-22 Havoc Pennington <hp@redhat.com>
7257 * dbus/dbus.h: fixups for doc warnings
7259 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7261 (QUIET): make it quiet so we can see warnings
7263 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7265 2002-11-22 Havoc Pennington <hp@redhat.com>
7267 * Makefile.am: include "Doxyfile" target in all-local
7269 * configure.in: generate the Doxyfile
7271 * Doxyfile.in: move Doxyfile here, so we can use
7272 configure to generate a Doxyfile with the right
7275 2002-11-22 Havoc Pennington <hp@redhat.com>
7277 * dbus/dbus-message.c: move inline docs into .c file
7279 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7280 so all docs are under doc/
7281 (MAN_EXTENSION): generate man pages. Use extension
7282 ".3dbus" which matches ".3qt" on my system,
7283 I guess this is OK, I don't know really.
7284 (FILE_PATTERNS): look for .c files not .h, makes sense
7287 2002-11-22 Havoc Pennington <hp@pobox.com>
7289 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7290 because any app can be a server, and any app can be a client,
7291 the bus is a special kind of server.
7293 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7295 * Doxyfile : adding. Still needs Makefile rules to be generated
7296 automatically (just run "doxygen" in the toplevel dir for now to
7299 * dbus/dbus-message.h : Adding sample docs (javadoc since
7300 resembles gtk-doc a little more)
7302 * dbus/dbus.h : Adding sample docs
7304 2002-11-21 Havoc Pennington <hp@redhat.com>
7306 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7307 so we can allow ourselves to include files directly,
7308 instead of having to use dbus.h
7310 * dbus/dbus.h: fill in
7312 * dbus/dbus-message.h: sketch out a sample header file.
7313 Include griping if you include it directly instead of
7316 * dbus/dbus-macros.h: new file with macros for extern "C",
7317 TRUE/FALSE, NULL, etc.
7319 * doc/file-boilerplate.c: put include guards in here
7321 2002-11-21 Havoc Pennington <hp@redhat.com>
7323 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7325 * COPYING: include the GPL as well, and license code
7326 under both AFL and GPL.
7328 2002-11-21 Havoc Pennington <hp@redhat.com>
7330 * acconfig.h: get rid of this
7332 * autogen.sh (run_configure): add --no-configure option
7334 * configure.in: remove AC_ARG_PROGRAM to make
7335 autoconf complain less. add AC_PREREQ.
7336 add AC_DEFINE third arg.
7338 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7341 Fix references so we can distcheck.
7343 2002-11-21 Havoc Pennington <hp@redhat.com>
7345 * Initial module creation