1 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
3 * doc/dbus-specification.xml: document ServiceOwnerChanged
6 * bus/driver.c, bus/driver.h, bus/services.c: Use
7 ServiceOwnerChanged signal instead of ServiceCreated and
10 * bus/dispatch.c: update testcase for the new signal.
12 2004-09-20 Jon Trowbridge <trow@ximian.com>
14 Patch from Nat Friedman <nat@novell.com>
16 * mono/Makefile.am: A number of small build fixes to allow "make
17 distcheck" to succeed.
19 * mono/example/Makefile.am: "make distcheck" fixes.
21 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
24 * test/Makefile.am: "make distcheck" fixes.
26 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
28 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
30 * doc/busconfig.dtd: update the DTD for the at_console attribute.
32 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
33 messages after the first one (bug #1389).
35 * bus/dispatch.c (check_double_hello_message): add a test case for
36 the double hello message bug.
37 (check_existent_service_activation): fix check of spawning error.
39 2004-09-16 David Zeuthen <david@fubar.dk>
41 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
43 2004-09-12 David Zeuthen <david@fubar.dk>
45 Patch from Kay Sievers <kay.sievers@vrfy.org>
47 * bus/bus.c (bus_context_new):
51 Add commandline option --nofork to override configuration file
54 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
56 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
57 compilers don't like it (bug #974).
59 2004-09-04 Harald Fernengel <harry@kdevelop.org>
61 * qt/connection.*: Applied patch by Jérôme Lodewyck
62 <lodewyck@clipper.ens.fr> to integrate an existing
63 connection into the Qt eventloop
65 2004-08-30 Jon Trowbridge <trow@ximian.com>
67 * mono/BusDriver.cs: Added. This is a class for interacting with
68 the org.freedesktop.DBus service.
70 * mono/Message.cs: Added a mechanism to expose the message that is
71 currently being dispatched via the static Message.Current
72 property. Added Message.Sender and Message.Destination
75 * mono/Handler.cs: Expose the dispatched message via
76 Message.Current when handling method calls.
78 * mono/Service.cs: Expose the dispatched message via
79 Message.Current when handling signal emissions.
81 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
82 Connection.BaseService property.
84 2004-08-28 Havoc Pennington <hp@redhat.com>
86 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
88 More fixes from Steve Grubb
90 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
91 (_dbus_listen_tcp_socket): fix fd leak
93 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
94 EINTR to a bit lower in the code
96 2004-08-26 Jon Trowbridge <trow@ximian.com>
98 * bus/driver.c (bus_driver_handle_service_exists): Respond with
99 TRUE if we are inquiring about the existence of the built-in
100 org.freedesktop.DBus service.
102 2004-08-25 John Palmieri <johnp@redhat.com>
103 * bus/config-parser.c:
104 (struct PolicyType): Add POLICY_CONSOLE
105 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
106 (start_busconfig_child): Sets up console element when
107 <policy at_console=""> is encountered in a policy file
108 (append_rule_from_element): Convert console elements to console
112 (bus_policy_create_client_policy): Add console rules to the client
113 policy based on if the client is at the console
114 (bus_policy_append_console_rule): New function for adding a
115 console rule to a policy
116 (bus_policy_merge): Handle console rule merging
118 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
119 where we check for console user files
121 * dbus/dbus-sysdeps.c:
122 (_dbus_file_exists): New function which checks if the given
124 (_dbus_user_at_console): New function which does the system
125 specific process of checking if the user is at the console
127 * dbus/dbus-userdb.c:
128 (_dbus_is_console_user): New function converts a UID to user name
129 and then calls the system specific _dbus_user_at_console to
130 see if the user is at the console and therefor a console user
132 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
134 * bus/config-parser.c (set_limit):
135 * bus/dbus-daemon-1.1.in:
136 * test/data/valid-config-files/many-rules.conf: set the
137 max_match_rules_per_connection limt from the config file.
139 * doc/busconfig.dtd: update the DTD.
141 * bus/driver.c: remove some unused variables.
143 2004-08-24 Mikael Hallendal <micke@imendio.com>
145 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
146 it's been replaced by dbus_g_bus_get
148 2004-08-23 Colin Walters <walters@redhat.com>
150 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
152 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
154 * bus/selinux.c: Create a thread for policy reload notification.
155 (bus_selinux_get_policy_root): Implement.
157 * bus/config-parser.c (start_busconfig_child)
158 (bus_config_parser_content): Support SELinux-root relative
161 * configure.in <HAVE_SELINUX>: Add -lpthread.
163 * bus/test-main.c (test_pre_hook, test_post_hook): New.
164 (test_post_hook): Move memory checking into here.
165 (test_pre_hook, test_post_hook): Move SELinux checks in
166 here, but conditional on a DBUS_TEST_SELINUX environment
167 variable. Unfortunately we can't run the SELinux checks
168 as a normal user, since they won't have any permissions
169 for /selinux. So this will have to be tested manually
170 for now, until we have virtualization for most of
173 2004-08-23 Havoc Pennington <hp@redhat.com>
175 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
176 drop supplementary groups, suggested by Steve Grubb
178 2004-08-20 Colin Walters <walters@redhat.com>
180 * bus/config-parser.c (start_busconfig_child): Remove some unused
183 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
186 2004-08-17 Joe Shaw <joeshaw@novell.com>
188 * configure.in: If --enable-mono is passed in, if we can't find
191 * mono/Makefile.am: Use /gacutil to install assemblies into the
194 2004-08-12 Havoc Pennington <hp@redhat.com>
196 * NEWS: update for 0.22
198 * configure.in: release 0.22
200 2004-08-11 Colin Walters <walters@redhat.com>
202 * tools/dbus-send.c (main, usage): Add --reply-timeout
205 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
207 * bus/bus.c (process_config_first_time_only): get rid of an unused
208 DBusError that was causing a memoy leak (bug #989).
210 * dbus/dbus-keyring.c, dbus/dbus-message.c:
211 fix compilation on Solaris/Forte C (bug #974)
213 * bus/main.c (main): plug two minuscule memleaks.
215 2004-08-10 Havoc Pennington <hp@redhat.com>
217 * doc/dbus-tutorial.xml: add some more info on GLib bindings
219 2004-08-09 Havoc Pennington <hp@redhat.com>
221 * COPYING: switch to Academic Free License version 2.1 instead of
222 2.0, to resolve complaints about patent termination clause.
224 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
226 * README: added documentation for the --enable-python
229 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
231 * bus/config-parser.c (bus_config_parser_new): fix an invalid
232 _unref in the SELinux support.
234 * doc/busconfig.dtd: update DTD for SELinux support.
236 * bus/config-loader-libxml.c: fix error handler and parser
237 initialisation/cleanup. OOM test now works with libxml2 HEAD.
239 * configure.in: remove the warning about libxml2.
241 * dbus/dbus-bus.c: silence doxygen warning.
243 2004-07-31 Colin Walters <walters@redhat.com>
245 * configure.in: Move #error in SELinux check to its own line.
247 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
249 * dbus/dbus-internals.h (_DBUS_SET_OOM):
250 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
253 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
254 broken by the change in the _SET_OOM macros.
256 2004-07-31 Colin Walters <walters@redhat.com>
258 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
261 2004-07-31 Colin Walters <walters@redhat.com>
263 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
264 to correctly detect DBUS__ACQUIRE_SVC. Also add an
267 2004-07-24 Havoc Pennington <hp@redhat.com>
269 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
271 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
274 * configure.in: add --enable-selinux
276 * bus/policy.c (bus_policy_merge): add FIXME to a comment
278 * bus/main.c (main): initialize and shut down selinux
280 * bus/connection.c: store SELinux ID on each connection, to avoid
281 repeated getting of the string context and converting it into
284 * bus/bus.c (bus_context_get_policy): new accessor, though it
286 (bus_context_check_security_policy): check whether the security
287 context of sender connection can send to the security context of
290 * bus/config-parser.c: add parsing for <selinux> and <associate>
292 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
293 implement dbus_connection_get_unix_fd()
295 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
296 function, used by the selinux stuff
298 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
300 * bus/config-loader-libxml.c: complete the implementation of
301 libxml backend for config file loader. Doesn't work with full OOM
304 * configure.in: change error when selecting libxml into a warning.
306 * test/data/invalid-config-files: add two non-well-formed XML
309 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
311 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
312 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
313 be necessary to read all the buffer. (bug #894)
315 * bus/activation.c (bus_activation_activate_service): fix a
316 potential assertion failure (bug #896). Small optimization in the
317 case of auto-activation messages.
319 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
320 add test case for byte-through-vararg bug (#901). patch by Kimmo
323 2004-07-28 Anders Carlsson <andersca@gnome.org>
326 * python/dbus_bindings.pyx.in:
327 Add dbus.init_gthreads (), allow emit_signal to pass
328 arguments to the signal.
330 2004-07-24 Havoc Pennington <hp@redhat.com>
332 * AUTHORS: add some people, not really comprehensively, let me
335 2004-07-24 Havoc Pennington <hp@redhat.com>
337 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
340 * test/Makefile.am (DIST_SUBDIRS): here also
342 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
344 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
345 breaking build on Solaris, reported by Farhad Saberi on the ML.
347 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
348 va_arg invocation to account for integer promotion in the case of
349 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
351 * bus/services.c (bus_service_remove_owner): fix bug #902, use
352 _dbus_list_get_first_link, not _dbus_list_get_first.
354 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
356 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
357 handler functions so that the asserts in _dbus_object_subtree_unref
360 * dbus/dbus-transport-unix.c (do_reading):
361 _dbus_transport_queue_messages return value is of type
362 dbus_bool_t, not DBusDispatchStatus.
364 2004-07-19 David Zeuthen <david@fubar.dk>
366 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
369 (check_get_connection_unix_user): Debug says GetProperty; but the
370 method is called GetConnectionUnixUser
371 (check_get_connection_unix_process_id): New function
372 (bus_dispatch_test): Actually call check_get_connection_unix_user();
373 also call check_get_connection_unix_process_id()
376 (bus_driver_handle_get_connection_unix_process_id): New function,
377 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
381 (handle_server_data_external_mech): Set pid from the credentials
382 obtained from the socket
384 * dbus/dbus-connection.c:
385 (dbus_connection_get_unix_process_id): New function
387 * dbus/dbus-connection.h:
388 Add prototype for dbus_connection_get_unix_process_id
390 * dbus/dbus-transport.c:
391 (_dbus_transport_get_unix_process_id): New function
393 * dbus/dbus-transport.h:
394 Add prototype for _dbus_transport_get_unix_process_id
396 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
398 * dbus/dbus-message.c: Message counter fix, patch by Christian
399 Hammond <chipx86@gnupdate.org>
401 2004-07-18 Seth Nickell <seth@gnome.org>
404 * python/dbus_bindings.pyx.in:
405 * python/tests/test-client.py:
407 Add dbus.ByteArray and dbus_bindings.ByteArray
408 types so that byte streams can be passed back.
410 Give jdahlin the heaps of credit that are so
413 2004-07-12 Seth Nickell <seth@gnome.org>
417 Add message argument to the default object_method_handler
420 * python/dbus_bindings.pyx.in:
422 Automatically return NIL when passed an empty list
423 (we can't pass back a list since lists are typed
424 and we don't have any idea what type the the client
425 intended the list to be... :-( )
427 2004-07-10 Seth Nickell <seth@gnome.org>
429 * python/examples/Makefile.am:
431 Fix distcheck breakage caused by new examples.
433 2004-07-10 Seth Nickell <seth@gnome.org>
437 Add "message" argument to service-side dbus.Object
438 methods. This will break existing services written
439 using the python bindings, but will allow extraction
440 of all the message information (e.g. who its from).
442 Add improved "object oriented" signal handling/emission.
444 * python/examples/example-service.py:
448 * python/examples/example-signal-emitter.py:
449 * python/examples/example-signal-recipient.py:
451 Two new examples that show how to emit and receive
452 signals using the new APIs.
454 * python/examples/example-signals.py:
455 * python/examples/gconf-proxy-service.py:
456 * python/examples/gconf-proxy-service2.py:
458 Add "message" argument to service methods.
460 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
462 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
463 * dbus/bus.c (dbus_bus_get_unix_user)
464 * doc/dbus-specification.xml: implement GetConnectionUnixUser
465 method of org.freedesktop.DBus interface.
467 * bus/dispatch.c: test case
469 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
471 * python/Makefile.am: switched include directory from glib/ to dbus/
472 since dbus-glib.h moved
474 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
476 * configure.in: prevent building the gcj stuff and libxml loader
477 since they are broken.
479 2004-06-20 Havoc Pennington <hp@redhat.com>
481 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
482 codes from the dbus error names
484 * glib/dbus-glib.h: move to subdir dbus/ since it's included
485 as dbus/dbus-glib.h and that breakage is now visible due to
486 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
488 * glib/dbus-glib.h: s/gproxy/g_proxy/
490 * dbus/dbus-shared.h: new header to hold stuff shared with
493 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
496 * glib/dbus-glib.h (dbus_set_g_error): move to
499 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
500 of stuff to enable this
502 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
504 * a bunch of other changes with the same basic "separate glib
505 bindings from dbus.h" theme
507 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
509 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
511 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
513 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
515 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
516 the reply value of the ServiceExists message.
518 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
520 * python/dbus_bindings.pyx.in: No longer need to parse path
521 elements and pass them as arrays of strings. The C API now
522 accepts plain path strings.
523 (_build_parsed_path): removed
525 2004-06-07 Havoc Pennington <hp@redhat.com>
527 * doc/TODO: remove auto-activation item since it's done; sort
528 items by importance/milestone
530 2004-06-07 Havoc Pennington <hp@redhat.com>
532 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
533 random signature when using REQUIRED_FIELDS (this hack won't work
536 * dbus/dbus-message.c: change the signature to be a header field,
537 instead of message->signature special-case string. Incremental
538 step forward. Then we can fix up code to send the signature in the
539 message, then fix up code to validate said signature, then fix up
540 code to not put the typecodes inline, etc.
541 (load_one_message): don't make up the signature after the fact
542 (decode_header_data): require signature field for the known
545 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
547 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
549 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
551 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
553 * mono/Handler.cs: Updated to follow new path argument for
554 (un-)registering objects.
556 * mono/example/Makefile.am:
558 * configure.in: Bumped required version for mono and use new -pkg
561 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
563 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
564 registration functions take the path argument as char* instead of
567 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
568 split off the path decompostion part of
569 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
572 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
574 2004-06-02 Kristian Høgsberg <krh@redhat.com>
576 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
577 machine approach. A state is implemented as a function that
578 handles incoming events as specified for that state.
580 * doc/dbus-specification.xml: Update auth protocol state machine
581 specification to match implementation. Remove some leftover
584 2004-06-02 Kristian Høgsberg <krh@redhat.com>
586 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
587 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
590 * Doxyfile.in: remove deprecated options.
592 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
593 glib/test-thread.h, glib/test-thread-client.c,
594 glib/test-thread-server.c, glib/test-profile.c,
595 glib/test-dbus-glib.c: remove these unused files.
597 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
599 * dbus/dbus-object-tree.c
600 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
601 non-fallback handlers (bug #684).
602 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
603 (find_subtree_recurse): report wether the returned subtree is an
604 exact match or a "fallback" match higher up in the tree.
605 (object_tree_test_iteration): update test case.
607 2004-06-01 Seth Nickell <seth@gnome.org>
609 * python/dbus_bindings.pyx.in:
610 * python/tests/test-client.py:
612 Round off basic type support. Add dicts (yay!), and
613 remaining array types.
615 Make MessageIter more general so it works for dicts too.
617 Mark all loop variables as C integers.
619 2004-05-31 Havoc Pennington <hp@redhat.com>
621 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
624 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
626 * glib/dbus-glib-tool.c (main): set up to have a --self-test
627 option that runs the tests, and start filling in some code
628 including for starters just dumping the interfaces to stdout
630 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
632 * test/data/valid-introspection-files/lots-of-types.xml: test of
633 an example introspection file
635 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
638 2004-05-31 Seth Nickell <seth@gnome.org>
640 * python/dbus_bindings.pyx.in:
641 * python/tests/test-client.py:
646 Fix string array memory trashing bug... oops...
648 2004-05-30 Seth Nickell <seth@gnome.org>
652 Add a nicer-but-less-flexible alternate API for handling
653 calls to virtual objects in dbus.ObjectTree.
655 Screw up the argument order to the dbus.Object constructor
656 for consistency with dbus.ObjectTree (and to make dbus_methods
657 optional for future extension)
659 * python/examples/Makefile.am:
660 * python/examples/gconf-proxy-service.py:
661 * python/examples/gconf-proxy-service2.py:
663 Alternate implementation of gconf-proxy-service using the
664 nicer dbus.ObjectTree API.
666 * python/examples/example-service.py:
667 * python/tests/test-server.py
669 Reverse the argument order to deal with dbus.Object constructor
672 2004-05-30 Seth Nickell <seth@gnome.org>
674 * python/examples/example-client.py:
675 * python/examples/example-service.py:
677 Take it back. Lists seem to work but they're broken
678 in the test suite. Make the base examples use
681 2004-05-30 Seth Nickell <seth@gnome.org>
683 * python/dbus_bindings.pyx.in:
684 * python/tests/test-client.py:
686 Add some more tests and fix errors that crop up.
687 Unfortunately, currently it seems like marshalling
688 and unmarshalling of lists is completely broken :-(
690 2004-05-30 Seth Nickell <seth@gnome.org>
692 * python/dbus_bindings.pyx.in:
694 Add support for ObjectPath type.
698 Refactor message handling code to a common function.
700 * python/tests/test-client.py:
701 * python/tests/test-server.py:
703 Add tests that check to make sure values of all types
704 can be echoed from a service w/o mangling.
706 2004-05-29 Seth Nickell <seth@gnome.org>
710 Add ObjectTree class which allows implementation
711 of trees of "virtual" objects. Basically the python
712 wrapper for "register_fallback".
714 * python/examples/Makefile.am
715 * python/examples/gconf-proxy-client.py:
716 * python/examples/gconf-proxy-service.py:
718 Implement a simple GConf proxy service that supports
719 get/set on string and int GConf keys using the ObjectTree.
721 2004-05-29 Seth Nickell <seth@gnome.org>
724 * python/examples/example-client.py:
725 * python/examples/example-service.py:
726 * python/examples/list-system-services.py:
728 Add SessionBus, SystemBus and ActivationBus classes
729 so you don't need to know the special little BUS_TYPE
732 2004-05-29 Havoc Pennington <hp@redhat.com>
734 * bus/config-parser.c (process_test_valid_subdir): temporarily
735 stop testing config parser OOM handling, since expat has issues
736 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
738 * bus/dbus-daemon-1.1.in: change requested_reply to
739 send_requested_reply/receive_requested_reply so we can send the
740 replies, not just receive them.
742 * bus/config-parser.c: parse the new
743 send_requested_reply/receive_requested_reply
745 * bus/policy.c (bus_client_policy_check_can_send): add
746 requested_reply argument and use it
748 * bus/bus.c (bus_context_check_security_policy): pass through
749 requested_reply status to message send check
751 * bus/system.conf.in: adapt to requested_reply change
753 2004-05-28 Havoc Pennington <hp@redhat.com>
755 * test/glib/test-service-glib.c (main): remove unused variable
757 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
759 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
760 from the enum, no longer in use.
762 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
765 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
766 whether error_name passed in is a valid error name.
768 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
770 * dbus/dbus-message.c (dbus_message_get_args): Added support for
771 OBJECT_PATH and OBJECT_PATH_ARRAY
773 2004-05-28 Seth Nickell <seth@gnome.org>
775 * python/examples/Makefile.am:
777 Forget to add Makefile.am. Do not pass go.
779 2004-05-28 Michael Meeks <michael@ximian.com>
781 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
784 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
786 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
787 (_dbus_message_iter_get_basic_type_array): impl.
788 drastically simplify ~all relevant _get methods to use these.
789 (_dbus_message_iter_append_basic_array),
790 (dbus_message_iter_append_basic): impl
791 drastically simplify ~all relevant _append methods to use these.
793 * dbus/dbus-message-builder.c (parse_basic_type)
794 (parse_basic_array, lookup_basic_type): impl.
795 (_dbus_message_data_load): prune scads of duplicate /
798 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
799 (_dbus_demarshal_basic_type): implement,
800 (demarshal_and_validate_len/arg): beef up debug.
801 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
803 2004-05-27 Seth Nickell <seth@gnome.org>
806 * python/Makefile.am:
808 Include the example python apps in the tarball.
810 * python/examples/list-system-services.py
812 Add a python new example that fetches the list of services
815 2004-05-27 Seth Nickell <seth@gnome.org>
818 * python/dbus_bindings.pyx.in:
820 Fix failure to notify that a signal was not handled,
821 resulted in hung functions.
823 2004-05-25 Colin Walters <walters@redhat.com>
825 * tools/dbus-monitor.c (main): Monitor all types of messages.
827 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
829 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
830 which unregisters the object path and disposes the handler.
832 2004-05-23 Kristian Høgsberg <krh@redhat.com>
834 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
836 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
837 operands to && so we call dbus_message_iter_next () for the last
840 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
842 * dbus/dbus-object-tree.c
843 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
844 children even if the requested path isn't registered.
845 (object_tree_test_iteration): test object_tree_list_registered.
847 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
850 2004-05-20 Kristian Høgsberg <krh@redhat.com>
852 * doc/TODO: Remove resolved items.
854 * bus/expirelist.h (struct BusExpireList): remove unused n_items
857 * bus/connection.c (bus_connections_expect_reply): Enforce the
858 per-connection limit on pending replies.
860 Patch from Jon Trowbridge <trow@ximian.com>:
862 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
863 up a watch that triggers a config reload when one end of the pipe
865 (signal_handler): Instead of doing the config reload in our SIGHUP
866 handler, just write to the reload pipe and let the associated
867 watch handle the reload when control returns to the main loop.
869 * bus/driver.c (bus_driver_handle_reload_config): Added.
870 Implements a ReloadConfig method for requesting a configuration
871 file reload via the bus driver.
873 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
875 * HACKING: Updated release instructions concerning the wiki page.
877 2004-05-18 Kristian Høgsberg <krh@redhat.com>
879 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
880 filter against auth->allowed_mechs; we only add allowed mechs in
883 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
884 ALLOWED_MECHS to auth-script format so we can set the list of
887 * data/auth/client-out-of-mechanisms.auth-script: New test to
888 check client disconnects when it is out of mechanisms to try.
890 * dbus/dbus-auth.c (process_command): Remove check for lines
891 longer that 1 MB; we only buffer up maximum 16 kB.
893 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
894 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
895 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
896 assume there might be unused bytes.
898 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
899 client-out-of-mechs, it is handled in process_reject(). Move check
900 for max failures to send_rejected(), as it's a server-only thing.
902 * dbus/dbus-auth.c: Factor out protocol reply code into functions
903 send_auth(), send_data(), send_rejected(), send_error(),
904 send_ok(), send_begin() and send_cancel().
906 2004-05-17 Kristian Høgsberg <krh@redhat.com>
908 Remove base64 encoding, replace with hex encoding. Original patch
909 from trow@ximian.com, added error handling.
911 * dbus/dbus-string.c (_dbus_string_base64_encode)
912 (_dbus_string_base64_decode): Remove.
913 (_dbus_string_hex_decode): Add end_return argument so we can
914 distinguish between OOM and invalid hex encoding.
915 (_dbus_string_test): Remove base64 tests and add test case for
918 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
919 Replace base64 with hex.
921 * test/data/auth/invalid-hex-encoding.auth-script: New test case
922 for invalid hex encoded data in auth protocol.
924 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
926 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
929 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
931 * mono/dbus-sharp.dll.config.in: Added for GAC
932 * mono/dbus-sharp.snk: Added for GAC
933 * mono/Assembly.cs.in: Added for GAC
934 * mono/Makefile.am: Changes for GAC installation
935 * configure.in: Added refs for dbus-sharp.dll.config.in and
936 Assembly.cs.in. More fixes for mono testing
937 * mono/example/Makefile.am: Changed var to CSC
938 * Makefile.am: Changed flag name to DBUS_USE_CSC
940 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
942 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
943 * mono/doc/*: Added documentation framework
944 * configure.in: Added monodoc check
945 * README: Added description of mono configure flags
947 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
949 * doc/dbus-specification.xml: Added a "Required" column to the
950 header fields table and changed the "zero or more" verbage in
951 the above paragraph to read "The header must contain the required
952 named header fields and zero or more of the optional named header
954 * test/data/invalid-messages/*.message: Added the required PATH
955 named header field to the tests so that they don't fail on
958 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
960 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
961 the stack by implicitly defining variable and parameter types and
962 removing the hack of defining C pointers as python objects and later
965 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
967 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
969 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
971 * mono/DBusType/Dict.cs: Handle empty dicts
972 * mono/DBusType/Array.cs: Handle empty arrays
973 * mono/Arguments.cs: Handle empty arguments
975 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
977 * dbus-sharp.pc.in: Modified to include include Libs and Requires
980 2004-04-25 Kristian Høgsberg <krh@redhat.com>
982 * test/data/valid-messages/standard-*.message: Update message
983 test scripts to new header field names.
985 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
987 * test/break-loader.c (randomly_do_n_things): tracked down buffer
988 overflow to times_we_did_each_thing array which would chop off the
989 first character of the failure_dir string. Increased the size of
990 the array to 7 to reflect the number of random mutation functions
993 2004-04-21 Kristian Høgsberg <krh@redhat.com>
995 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
996 unix_server->watch here, it is unreffed in disconnect.
997 (_dbus_server_new_for_tcp_socket): convert NULL host to
998 "localhost" here so we don't append NULL to address.
1000 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1001 various addresses, including tcp with no explicit host.
1003 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1005 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1006 fix incorrect setting of .name_offset in the HeaderField (it was
1007 off by two bytes, positioned right after the name and typecode)
1009 * bus/bus.c (bus_context_new, bus_context_unref): test before
1010 calling dbus_server_free_data_slot and _dbus_user_database_unref
1011 in case of an error.
1013 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1016 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1018 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1019 _dbus_poll() instead of select().
1021 2004-04-15 Jon Trowbridge <trow@ximian.com>
1023 * bus/main.c (signal_handler): Reload the configuration files
1025 (main): Set up our SIGHUP handler.
1027 * bus/bus.c (struct BusContext): Store the config file, user and
1028 fork flag in the BusContext.
1029 (process_config_first_time_only): Added. Contains the code
1030 (previously in bus_context_new) for setting up the BusContext from
1031 the BusConfigParser that should only be run the first time the
1032 config files are read.
1033 (process_config_every_time): Added. Contains the code (previously
1034 in bus_context_new) for setting up the BusContext from the
1035 BusConfigParser that should be run every time the config files are
1037 (load_config): Added. Builds a BusConfigParser from the config
1038 files and passes the resulting structure off to
1039 process_config_first_time_only (assuming this is the first time)
1040 and process_config_every_time.
1041 (bus_context_new): All of the config-related code has been moved
1042 to process_config_first_time_only and process_config_every_time.
1043 Now this function just does the non-config-related initializations
1044 and calls load_config.
1045 (bus_context_reload_config): Added.
1047 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1049 * bus/driver.c (bus_driver_handle_get_service_owner):
1050 implement a GetServiceOwner method.
1051 * doc/dbus-specification.xml: document it.
1052 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1054 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1055 implement, using the bus GetServiceOwner method.
1057 * test/glib/test-dbus-glib.c:
1058 use dbus_gproxy_new_for_service_owner so that we can receive the
1061 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1063 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1064 dbus/dbus-message.c, dbus/dbus-protocol.h
1065 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1067 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1068 dbus/dbus-message.c, dbus/dbus-protocol.h
1069 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1071 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1072 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1073 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1075 * doc/dbus-specification.xml (Header Fields Table):
1076 s/SERVICE/DESTINATION
1077 s/SENDER_SERVICE/SENDER
1080 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1082 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1085 2004-04-13 Michael Meeks <michael@ximian.com>
1087 * glib/dbus-gobject.c (handle_introspect): split out
1088 (introspect_properties): this.
1089 (handle_introspect): implement this.
1091 * test/glib/Makefile.am: use the absolute path so the bus
1092 daemon's chdir ("/") doesn't kill us dead.
1094 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1096 2004-04-12 Jon Trowbridge <trow@ximian.com>
1098 * bus/config-parser.c (struct BusConfigParser): Added
1099 included_files field.
1100 (seen_include): Added. Checks whether or not a file has already
1101 been included by any parent BusConfigParser.
1102 (bus_config_parser_new): Copy the parent's included_files.
1103 (include_file): Track which files have been included, and fail on
1104 circular inclusions.
1105 (process_test_valid_subdir): Changed printf to report if we are
1106 testing valid or invalid conf files.
1107 (all_are_equiv): Changed printf to be a bit clearer about
1108 what we are actually doing.
1109 (bus_config_parser_test): Test invalid configuration files.
1111 2004-04-09 Jon Trowbridge <trow@ximian.com>
1113 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1114 argument. If non-null, the newly-constructed BusConfigParser will
1115 be initialized with the parent's BusLimits instead of the default
1117 (include_file): When including a config file, pass in
1118 the current parser as the parent and then copy the BusLimits
1119 from the included BusConfigParser pack to the current parser.
1120 (process_test_valid_subdir): Renamed from process_test_subdir.
1121 (process_test_equiv_subdir): Added. Walks through a directory,
1122 descending into each subdirectory and loading the config files
1123 it finds there. If any subdirectory contains two config files
1124 that don't produce identical BusConfigParser structs, fail.
1125 For now, the BusConfigParser's BusPolicies are not compared.
1126 (bus_config_parser_test): Call both process_test_valid_subdir and
1127 process_test_equiv_subdir.
1129 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1130 argument and pass it along to the call to bus_config_parser_new.
1131 Also made a few small changes to allow this code to compile.
1133 * bus/config-loader-expat.c (bus_config_load): Take a parent
1134 argument and pass it along to the call to bus_config_parser_new.
1136 * bus/bus.c (bus_context_new): Load the config file
1137 with a NULL parent argument.
1139 2004-03-29 Michael Meeks <michael@ximian.com>
1141 * glib/dbus-gobject.c (introspect_properties): split
1142 out, fix mangled 'while' flow control.
1143 (introspect_signals): implement.
1144 (handle_introspect): update.
1146 2004-03-29 Michael Meeks <michael@ximian.com>
1148 * glib/dbus-gobject.c (set_object_property): split out /
1149 re-work, use the property type, and not the message type(!)
1150 (get_object_property): ditto.
1152 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1153 (dbus_gvalue_marshal): make this code re-usable, needed
1154 for signals too, also on both proxy and server side.
1155 Re-write for more efficiency / readability.
1157 2004-03-29 Michael Meeks <michael@ximian.com>
1159 * dbus/dbus-message.c
1160 (dbus_message_new_error_printf): impl.
1162 * dbus/dbus-connection.c
1163 (dbus_connection_unregister_object_path): fix warning.
1165 * configure.in: fix no-mono-installed situation.
1167 2004-03-27 Havoc Pennington <hp@redhat.com>
1169 Patch from Timo Teräs:
1171 * tools/dbus-send.c (main): if --print-reply, assume type is
1172 method call; support boolean type args
1174 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1175 bunch of memleak and logic bugs
1177 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1179 * mono/Arguments.cs:
1180 * mono/Introspector.cs:
1182 * mono/InterfaceProxy.cs:
1184 * mono/ProxyBuilder.cs:
1186 Added InterfaceProxy class to avoid building proxies for every
1190 * dbus-message.c (dbus_message_append_args_valist)
1191 (dbus_message_iter_get_object_path)
1192 (dbus_message_iter_get_object_path_array)
1193 (dbus_message_iter_append_object_path)
1194 (dbus_message_iter_append_object_path_array):
1195 Added object_path iter functions to handle OBJECT_PATH arguments
1197 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1199 First checkin of mono bindings.
1202 Build stuff for the bindings
1203 * dbus-sharp.pc.in: Added for pkgconfig
1205 2004-03-21 Havoc Pennington <hp@redhat.com>
1207 * test/test-service.c (main): remove debug spew
1209 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1211 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1214 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1215 (dbus_message_iter_init_array_iterator)
1216 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1217 indicate whether the iterator is empty
1219 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1222 2004-03-19 Havoc Pennington <hp@redhat.com>
1224 * NEWS: 0.21 updates
1226 * configure.in: 0.21
1228 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1230 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1231 you don't need pyrex to make dist
1233 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1236 2004-03-18 Richard Hult <richard@imendio.com>
1238 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1239 (dbus_message_set_auto_activation): Add doxygen docs.
1241 2004-03-16 Richard Hult <richard@imendio.com>
1243 * bus/activation.c: (bus_activation_service_created),
1244 (bus_activation_send_pending_auto_activation_messages),
1245 (bus_activation_activate_service):
1247 * bus/dispatch.c: (bus_dispatch),
1248 (check_nonexistent_service_auto_activation),
1249 (check_service_auto_activated),
1250 (check_segfault_service_auto_activation),
1251 (check_existent_service_auto_activation), (bus_dispatch_test):
1252 * bus/driver.c: (bus_driver_handle_activate_service):
1253 * bus/services.c: (bus_registry_acquire_service):
1254 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1255 (dbus_message_get_auto_activation):
1256 * dbus/dbus-message.h:
1257 * dbus/dbus-protocol.h: Implement auto-activation.
1259 * doc/dbus-specification.xml: Add auto-activation to the spec.
1261 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1263 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1264 fix a bug with CUSTOM types.
1266 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1267 a unit test for this bug (used to fail).
1269 2004-03-12 Mikael Hallendal <micke@imendio.com>
1272 (babysitter_watch_callback): notify all pending activations waiting for
1273 the same exec that the activation failed.
1274 (bus_activation_activate_service): shortcut the activation if we
1275 already waiting for the same executable to start up.
1277 2004-03-12 Mikael Hallendal <micke@imendio.com>
1280 - Added service file reloading.
1281 Each service files directory is kept in an hash table in
1282 BusActivation and each BusActivationEntry knows what .service-file it
1283 was read from. So when you try to activate a service the bus will
1284 check if it's been updated, removed or if new .service-files has
1286 - Test code at the bottom for the service file reloading.
1287 * bus/test-main.c: (main):
1289 - added service reloading test.
1290 * dbus/dbus-sysdeps.c:
1291 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1293 2004-03-08 Michael Meeks <michael@ximian.com>
1295 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1296 bail immediately if disconnected, to avoid busy loop.
1298 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1299 cleanup cut/paste/inefficiency.
1301 2004-03-01 David Zeuthen <david@fubar.dk>
1303 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1304 bug where args were used twice. This bug resulted in a segfault
1305 on a Debian/PPC system when starting the messagebus daemon. Include
1306 dbus-sysdeps.h for DBUS_VA_COPY
1308 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1310 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1311 appropriate va_copy implementation. From GLib
1313 2004-02-24 Joe Shaw <joe@ximian.com>
1315 * bus/services.c (bus_registry_acquire_service): We need to pass
1316 in the service name to dbus_set_error() to prevent a crash.
1318 2003-12-26 Anders Carlsson <andersca@gnome.org>
1320 * AUTHORS: Reveal my True identity.
1322 2003-12-17 Mikael Hallendal <micke@imendio.com>
1324 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1325 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1327 2003-12-13 Mikael Hallendal <micke@imendio.com>
1329 * doc/TODO: Added not about better error check of configuration files.
1331 2003-12-02 Richard Hult <richard@imendio.com>
1333 * Update AFL version to 2.0 throughout the source files to reflect
1334 the update that was done a while ago.
1336 2003-12-02 Richard Hult <richard@imendio.com>
1338 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1339 wrote_dict_key to FALSE on the iter that the dict is appended to,
1340 just like when appending other types. Fixes a bug where a dict
1341 couldn't be put inside a dict.
1342 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1343 (message_iter_test, _dbus_message_test): Add test case for dict
1346 2003-12-01 David Zeuthen <david@fubar.dk>
1348 * python/dbus.py: Add the actual message when calling the reciever
1349 of a signal such that parameters can be inspected. Add the method
1350 remove_signal_receiver
1352 2003-11-26 Mikael Hallendal <micke@imendio.com>
1356 * glib/*.[ch]: Made ref functions return the pointer
1358 2003-11-25 Zack Rusin <zack@kde.org>
1360 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1362 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1365 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1366 the Integrator and to better fit with the server,
1368 2003-11-24 Zack Rusin <zack@kde.org>
1370 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1371 the integrator handles it now
1373 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1374 since QTimer wasn't really meant to be used the way DBusTimeout is
1376 2003-11-24 Zack Rusin <zack@kde.org>
1378 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1379 Integrator class which integrates D-BUS with the Qt event loop,
1381 * qt/connection.h, qt/connection.cpp: Move all the code which
1382 was dealing with D-BUS integration to the Integrator class,
1383 and start using Integrator,
1385 2003-11-23 Zack Rusin <zack@kde.org>
1387 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1390 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1391 switching namespaces to DBusQt, reworking the class,
1393 * Makefile.cvs: switching dependencies so that it matches KDE
1396 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1399 2003-11-19 Havoc Pennington <hp@redhat.com>
1403 * configure.in: bump version to 0.20
1405 * configure.in (have_qt): add yet another place to look for qt
1406 (someone hand trolltech a .pc file...)
1408 2003-11-01 Havoc Pennington <hp@redhat.com>
1410 * doc/dbus-specification.xml: add state machine docs on the auth
1411 protocol; just a first draft, I'm sure it's wrong.
1413 2003-10-28 David Zeuthen <david@fubar.dk>
1415 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1416 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1418 2003-10-28 Havoc Pennington <hp@redhat.com>
1420 * dbus/dbus-message.c (get_next_field): delete unused function
1422 2003-10-28 Havoc Pennington <hp@redhat.com>
1424 * bus/expirelist.c (do_expiration_with_current_time): detect
1425 failure of the expire_func due to OOM
1427 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1429 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1430 NoReply error that's now created by the bus when the service exits
1432 2003-10-28 Havoc Pennington <hp@redhat.com>
1434 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1435 tests for set_path, set_interface, set_member, etc.
1437 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1439 * dbus/dbus-message.c (set_string_field): always just delete and
1440 re-append the field; accept NULL for deletion
1441 (re_align_fields_recurse): reimplement
1443 2003-10-26 Havoc Pennington <hp@redhat.com>
1445 * dbus/dbus-connection.c: fix docs to properly describe the
1446 disconnected message
1447 (_dbus_connection_notify_disconnected): remove this function;
1448 we can't synchronously add the disconnected message, we have to
1449 do it after we've queued any remaining real messages
1450 (_dbus_connection_get_dispatch_status_unlocked): queue the
1451 disconnect message only if the transport has finished queueing all
1452 its real messages and is disconnected.
1453 (dbus_connection_disconnect): update the dispatch status here
1455 2003-10-22 Havoc Pennington <hp@redhat.com>
1457 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1459 * bus/connection.c (bus_transaction_send_from_driver): set the
1460 destination to the connection's base service
1462 2003-10-20 Havoc Pennington <hp@redhat.com>
1464 hmm, make check is currently not passing.
1466 * doc/dbus-specification.xml: add requirement that custom type
1467 names follow the same rules as interface names.
1469 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1470 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1473 * doc/dbus-specification.xml: update type codes to match
1474 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1475 CUSTOM. Add type OBJECT_PATH to the spec.
1477 2003-10-17 Havoc Pennington <hp@redhat.com>
1479 * bus/driver.c (create_unique_client_name): use "." as separator
1480 in base service names instead of '-'
1482 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1483 byte at the end of the string
1485 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1486 optimization macros since string validation seems to be a slow
1489 * doc/dbus-specification.xml: restrict valid
1490 service/interface/member/error names. Add test suite code for the
1493 * dbus/dbus-string.c: limit service/interface/member/error names
1496 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1497 format arg to verbose spew
1499 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1500 memory, return instead of g_error
1502 * test/test-service.c (path_message_func): support emitting a
1505 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1506 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1507 assuming the activation bus was the session bus so that services
1508 started manually will still register.
1509 (init_connections_unlocked): fix so that in OOM situation we get
1510 the same semantics when retrying the function
1512 * test/test-service.c (main): change to use path registration, to
1513 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1514 than DBUS_BUS_SESSION
1516 2003-10-16 Havoc Pennington <hp@redhat.com>
1518 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1520 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1521 coverage of the tests
1522 (coverage-report.txt): don't move the .da and .bbg files around
1524 2003-10-16 Havoc Pennington <hp@redhat.com>
1526 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1529 2003-10-16 Havoc Pennington <hp@redhat.com>
1531 * bus/connection.c (bus_pending_reply_expired): either cancel or
1533 (bus_connections_check_reply): use unlink, not remove_link, as we
1534 don't want to free the link; fixes double free mess
1536 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1537 where no reply was received
1539 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1542 * bus/signals.c (match_rule_matches): add special cases for the
1543 bus driver, so you can match on sender/destination for it.
1545 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1546 DBUS_PRINT_BACKTRACE is set
1548 * dbus/dbus-internals.c: add pid to assertion failure messages
1550 * dbus/dbus-connection.c: add message type code to the debug spew
1552 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1553 sender=foo not service=foo
1555 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1556 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1557 DBUS_ACTIVATION_ADDRESS instead
1559 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1560 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1562 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1565 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1566 (dbus_message_iter_get_object_path_array): new function (half
1567 finished, disabled for the moment)
1569 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1570 DBUS_MESSAGE_TYPE_ERROR
1572 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1573 avoid redirecting stderr to /dev/null
1574 (babysit): close stdin if not doing the "exit_with_session" thing
1576 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1577 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1578 stdout/stdin, so things don't get confused
1580 * bus/system.conf.in: fix to allow replies, I modified .conf
1581 instead of .conf.in again.
1583 2003-10-14 David Zeuthen <david@fubar.dk>
1585 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1586 argtype to arg_type when raising unknown arg type exception.
1587 Changed type list to reflect the changes in dbus-protocol.h so
1588 the bindings actually work.
1590 2003-10-14 Havoc Pennington <hp@redhat.com>
1592 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1593 to have a bug keeping it from outputting the .da files sometimes
1594 (string_get_string): don't append garbage nul bytes to the string.
1596 2003-10-15 Seth Nickell <seth@gnome.org>
1598 * python/Makefile.am:
1600 Include dbus_h_wrapper.h in the dist tarball.
1602 2003-10-14 Havoc Pennington <hp@redhat.com>
1604 * bus/bus.c (bus_context_check_security_policy): revamp this to
1605 work more sanely with new policy-based requested reply setup
1607 * bus/connection.c (bus_transaction_send_from_driver): set bus
1608 driver messages as no reply
1610 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1611 requested_reply attribute on allow/deny rules
1613 * bus/system.conf: add <allow requested_reply="true"/>
1615 * bus/driver.c (bus_driver_handle_message): fix check for replies
1616 sent to the bus driver, which was backward. How did this ever work
1617 at all though? I think I'm missing something.
1619 * dbus/dbus-message.c (decode_header_data): require error and
1620 method return messages to have a reply serial field to be valid
1621 (_dbus_message_loader_queue_messages): break up this function;
1622 validate that reply serial and plain serial are nonzero;
1623 clean up the OOM/error handling.
1624 (get_uint_field): don't return -1 from this
1625 (dbus_message_create_header): fix signed/unsigned bug
1627 * bus/connection.c (bus_connections_expect_reply): save serial of
1628 the incoming message, not reply serial
1630 2003-10-14 Havoc Pennington <hp@redhat.com>
1632 * bus/connection.c: implement pending reply tracking using
1635 * bus/bus.c (bus_context_check_security_policy): verify that a
1636 reply is pending in order to allow a reply to be sent. Deny
1637 messages of unknown type.
1639 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1641 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1642 (bus_context_get_reply_timeout): new
1644 2003-10-13 Seth Nickell <seth@gnome.org>
1646 * python/Makefile.am:
1648 Pass "make distcheck": remove a couple files from DIST_FILES
1649 that weren't included in the final version.
1651 2003-10-12 Havoc Pennington <hp@pobox.com>
1653 Added test code that 1) starts an actual bus daemon and 2) uses
1654 DBusGProxy; fixed bugs that were revealed by the test. Lots
1655 more testing possible, but this is the basic framework.
1657 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1658 empty proxy lists from the proxy list hash
1660 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1661 couple of return_if_fail checks
1663 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1664 to allocate, so everything is cleared to NULL as it should be.
1666 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1667 source as data to dbus_connection_set_timeout_functions() as the
1668 timeout functions expected
1670 * test/glib/run-test.sh: add a little script to start up a message
1671 bus and run tests using it
1673 * tools/dbus-launch.1: updates
1675 * tools/dbus-launch.c (main): add --config-file option
1677 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1678 that could never be reached.
1680 * dbus/dbus-message.c (dbus_message_new_method_return)
1681 (dbus_message_new_error, dbus_message_new_signal): set the
1682 no-reply-expected flag on all these. Redundant, but may
1683 as well be consistent.
1685 2003-10-11 Havoc Pennington <hp@pobox.com>
1687 * test/decode-gcov.c (function_solve_graph): make broken block
1688 graph a nonfatal error since it seems to be broken. Need to debug
1691 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1692 can't just check type > INVALID < LAST anymore
1694 * dbus/dbus-message.c (dbus_message_get_signature): new function
1695 (dbus_message_has_signature): new function
1696 (struct DBusMessage): add signature field (right now it isn't sent
1697 over the wire, just generated on the fly)
1698 (dbus_message_copy): copy the signature, and init strings to
1699 proper length to avoid some reallocs
1700 (dbus_message_iter_init_array_iterator): return void, since it
1702 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1703 (_dbus_message_loader_queue_messages): add silly temporary hack to
1704 fill in message->signature on load
1706 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1707 characters, so they are relatively human-readable.
1709 2003-10-11 Havoc Pennington <hp@pobox.com>
1711 * dbus/dbus-message.c (_dbus_message_test): add more test
1712 coverage, but #if 0 for now since they uncover a bug
1713 not fixed yet; I think in re_align_field_recurse()
1714 (re_align_field_recurse): add FIXME about broken assertion
1716 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1718 * bus/connection.c: share a couple code bits with expirelist.c
1720 * bus/expirelist.h, bus/expirelist.c: implement a generic
1721 expire-items-after-N-seconds facility, was going to share between
1722 expiring connections and replies, decided not to use for expiring
1723 connections for now.
1725 * COPYING: include AFL 2.0 (still need to change all the file headers)
1727 2003-10-09 Havoc Pennington <hp@redhat.com>
1729 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1730 gcc 3.3. Not that we do anything about it yet.
1732 * bus/signals.c (bus_match_rule_parse): impose max length on the
1735 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1737 2003-10-09 Havoc Pennington <hp@redhat.com>
1739 Make matching rules theoretically work (add parser).
1741 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1742 the case where destination is explicitly specified as bus driver
1743 and someone else is eavesdropping.
1745 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1746 definition of eavesdropping and assertion
1748 * tools/dbus-send.c (main): use dbus_message_type_from_string
1750 * bus/signals.c (bus_match_rule_parse): implement
1752 * dbus/dbus-message.c (dbus_message_type_from_string): new
1754 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1756 2003-10-02 Havoc Pennington <hp@pobox.com>
1758 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1759 dbus_gproxy_oneway_call
1761 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1762 (dbus_server_setup_with_g_main): fix to allow calling them more
1763 than once on the same args
1764 (dbus_bus_get_with_g_main): new function
1766 2003-10-02 Havoc Pennington <hp@redhat.com>
1768 * doc/dbus-tutorial.xml: write some stuff
1770 2003-09-29 Havoc Pennington <hp@pobox.com>
1772 * configure.in: split checks for Doxygen from XML docs, check for
1775 * doc/Makefile.am: XML-ify all the docs, and add a blank
1778 2003-09-29 Havoc Pennington <hp@pobox.com>
1780 * Merge dbus-object-names branch. To see the entire patch
1781 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1782 it's huuuuge though.
1783 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1785 2003-09-28 Havoc Pennington <hp@pobox.com>
1787 * HACKING: update to reflect new server
1789 2003-09-26 Seth Nickell <seth@gnome.org>
1792 * python/examples/example-signals.py:
1794 Start implementing some notions of signals. The API
1795 is really terrible, but they sort of work (with the
1796 exception of being able to filter by service, and to
1797 transmit signals *as* a particular service). Need to
1798 figure out how to make messages come from the service
1801 * python/dbus_bindings.pyx.in:
1803 Removed duplicate message_handler callbacks.
1805 2003-09-25 Havoc Pennington <hp@redhat.com>
1807 * bus/session.conf.in: fix my mess
1809 2003-09-25 Havoc Pennington <hp@pobox.com>
1811 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1813 2003-09-25 Seth Nickell <seth@gnome.org>
1815 * python/examples/example-service.py:
1817 Johan notices complete wrong code in example-service, but
1818 completely wrong in a way that works exactly the same (!).
1819 Johan is confused, how could this possibly work? Example
1820 code fails to serve purpose of making things clear.
1823 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1825 * doc/dbus-specification.sgml: don't require header fields
1826 to be 4-byte aligned and specify that fields should be
1827 distinguished from padding by the fact that zero is not
1830 * doc/TODO: remove re-alignment item and add item to doc
1831 the OBJECT_PATH type.
1833 * dbus/dbus-message.c:
1834 (HeaderField): rename the original member to value_offset
1835 and introduce a name_offset member to keep track of where
1836 the field actually begins.
1837 (adjust_field_offsets): remove.
1838 (append_int_field), (append_uint_field),
1839 (append_string_field): don't align the start of the header
1840 field to a 4-byte boundary.
1841 (get_next_field): impl finding the next marhsalled field
1842 after a given field.
1843 (re_align_field_recurse): impl re-aligning a number of
1844 already marshalled fields.
1845 (delete_field): impl deleting a field of any type and
1846 re-aligning any following fields.
1847 (delete_int_or_uint_field), (delete_string_field): remove.
1848 (set_int_field), (set_uint_field): no need to re-check
1849 that we have the correct type for the field.
1850 (set_string_field): ditto and impl re-aligning any
1852 (decode_header_data): update to take into account that
1853 the fields aren't 4-byte aligned any more and the new
1854 way to distinguish padding from header fields. Also,
1855 don't exit when there is too much header padding.
1856 (process_test_subdir): print the directory.
1857 (_dbus_message_test): add test to make sure a following
1858 field is re-aligned correctly after field deletion.
1860 * dbus/dbus-string.[ch]:
1861 (_dbus_string_insert_bytes): rename from insert_byte and
1862 allow the insert of multiple bytes.
1863 (_dbus_string_test): test inserting multiple bytes.
1865 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1866 warning note to docs about having to re-align any
1867 marshalled values following the string.
1869 * dbus/dbus-message-builder.c:
1870 (append_string_field), (_dbus_message_data_load):
1871 don't align the header field.
1873 * dbus/dbus-auth.c: (process_test_subdir): print the
1876 * test/break-loader.c: (randomly_add_one_byte): upd. for
1879 * test/data/invalid-messages/bad-header-field-alignment.message:
1882 * test/data/valid-messages/unknown-header-field.message: shove
1883 a dict in the unknown field.
1885 2003-09-25 Seth Nickell <seth@gnome.org>
1888 * python/dbus_bindings.pyx.in:
1890 Handle return values.
1892 * python/examples/example-client.py:
1893 * python/examples/example-service.py:
1895 Pass back return values from the service to the client.
1897 2003-09-24 Seth Nickell <seth@gnome.org>
1901 Connect Object methods (when you are sharing an object) up... pass
1902 in a list of methods to be shared. Sharing all the methods just
1903 worked out too weird. You can now create nice Services over the
1906 * python/dbus_bindings.pyx.in:
1908 Keep references to user_data tuples passed into C functions so
1909 Python doesn't garbage collect on us.
1911 Implement MethodReturn and Error subclasses of Message for creating
1912 DBusMessage's of those types.
1914 * python/examples/example-client.py:
1915 * python/examples/example-service.py:
1917 Simple example code showing both how create DBus services and objects,
1918 and how to use them.
1920 2003-09-23 Havoc Pennington <hp@pobox.com>
1922 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1924 2003-09-23 Havoc Pennington <hp@redhat.com>
1926 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1927 (dbus_gproxy_disconnect_signal): implement
1928 (dbus_gproxy_manager_remove_signal_match): implement
1929 (dbus_gproxy_manager_add_signal_match): implement
1930 (dbus_gproxy_oneway_call): implement
1932 2003-09-23 Havoc Pennington <hp@pobox.com>
1934 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1935 subclass. This means dropping the transparent thread safety of the
1936 proxy; you now need a separate proxy per-thread, or your own
1937 locking on the proxy. Probably right anyway.
1938 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1940 2003-09-22 Havoc Pennington <hp@redhat.com>
1942 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1944 2003-09-21 Seth Nickell <seth@gnome.org>
1946 First checkin of the Python bindings.
1948 * python/.cvsignore:
1949 * python/Makefile.am:
1950 * python/dbus_bindings.pyx.in:
1951 * python/dbus_h_wrapper.h:
1953 Pieces for Pyrex to operate on, building a dbus_bindings.so
1954 python module for low-level access to the DBus APIs.
1958 High-level Python module for accessing DBus objects.
1963 Build stuff for the python bindings.
1967 Extra macro needed for finding the Python C header files.
1969 2003-09-21 Havoc Pennington <hp@pobox.com>
1971 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1972 implementing the proxy manager, didn't get very far.
1974 * dbus/dbus-bus.c (dbus_bus_add_match): new
1975 (dbus_bus_remove_match): new
1977 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1978 path_name argument; adjust the other not-yet-implemented
1979 gproxy constructors to be what I think they should be.
1981 2003-09-21 Havoc Pennington <hp@pobox.com>
1983 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1984 by default for message bus connections.
1986 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1987 exit_on_disconnect flag is set and we process the disconnected
1989 (dbus_connection_set_exit_on_disconnect): new function
1991 2003-09-21 Havoc Pennington <hp@pobox.com>
1993 Get matching rules mostly working in the bus; only actually
1994 parsing the rule text remains. However, the client side of
1995 "signal connections" hasn't been started, this patch is only the
1998 * dbus/dispatch.c: fix for the matching rules changes
2000 * bus/driver.c (bus_driver_handle_remove_match)
2001 (bus_driver_handle_add_match): send an ack reply from these
2004 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2005 arguments, reported by Seth Nickell
2007 * bus/config-parser.c (append_rule_from_element): support
2008 eavesdrop=true|false attribute on policies so match rules
2009 can be prevented from snooping on the system bus.
2011 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2012 and "destination" in attribute names; fix some docs bugs;
2013 add eavesdrop=true|false attribute
2015 * bus/driver.c (bus_driver_handle_add_match)
2016 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2019 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2020 rid of broadcast service concept, signals are just always broadcast
2022 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2023 mostly implement matching rules stuff (currently only exposed as signal
2026 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2028 * doc/dbus-specification.sgml: Change the header field name
2029 to be an enum and update the rest of the spec to reference
2030 the fields using the conventinal name.
2032 * dbus/dbus-protocol.h: update to reflect the spec.
2034 * doc/TODO: add item to remove the 4 byte alignment requirement.
2036 * dbus/dbus-message.c: Remove the code to generalise the
2037 header/body length and serial number header fields as named
2038 header fields so we can reference field names using the
2040 (append_int_field), (append_uint_field), (append_string_field):
2041 Append the field name as a byte rather than four chars.
2042 (delete_int_or_uint_field), (delete_string_field): reflect the
2043 fact that the field name and typecode now occupy 4 bytes instead
2045 (decode_string_field), (decode_header_data): update to reflect
2046 protocol changes and move the field specific encoding from
2047 decode_string_field() back into decode_header_data().
2049 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2050 Add utility to aid debugging.
2052 * dbus/dbus-message-builder.c:
2053 (append_string_field), (_dbus_message_data_load): Update to
2054 reflect protocol changes; Change the FIELD_NAME directive
2055 to HEADER_FIELD and allow it to take the field's conventional
2056 name rather than the actual value.
2058 * test/data/*/*.message: Update to use HEADER_FIELD instead
2059 of FIELD_NAME; Always align the header on an 8 byte boundary
2060 *before* updating the header length.
2062 2003-09-15 Havoc Pennington <hp@pobox.com>
2064 * dbus/dbus-pending-call.c: add the get/set object data
2065 boilerplate as for DBusConnection, etc. Use generic object data
2066 for the notify callback.
2068 * glib/dbus-gparser.c (parse_node): parse child nodes
2070 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2072 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2073 contain functions shared between the convenience lib and the
2076 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2077 -export-symbols-regex to the GLib library
2079 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2080 fix the locking in here, and add a default handler for
2081 Introspect() that just returns sub-nodes.
2083 2003-09-14 Havoc Pennington <hp@pobox.com>
2085 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2086 rather than gfoo consistent
2088 * glib/dbus-gproxy.h: delete for now, move contents to
2089 dbus-glib.h, because the include files don't work right since we
2090 aren't in the dbus/ subdir.
2092 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2093 (dbus_gproxy_end_call): finish
2094 (dbus_gproxy_begin_call): finish
2096 * glib/dbus-gmain.c (dbus_set_g_error): new
2098 * glib/dbus-gobject.c (handle_introspect): include information
2099 about child nodes in the introspection
2101 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2102 function to help in implementation of introspection
2104 * dbus/dbus-object-tree.c
2105 (_dbus_object_tree_list_registered_and_unlock): new function
2107 2003-09-12 Havoc Pennington <hp@pobox.com>
2109 * glib/dbus-gidl.h: add common base class for all the foo_info
2112 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2115 * test/Makefile.am: try test srcdir -ef . in addition to test
2116 srcdir = ., one of them should work (yeah lame)
2118 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2121 * glib/dbus-gparser.h: make description_load routines return
2122 NodeInfo* not Parser*
2124 * Makefile.am (SUBDIRS): build test dir after all library dirs
2126 * configure.in: add GTK+ detection
2128 2003-09-07 Havoc Pennington <hp@pobox.com>
2130 * Make Doxygen contented.
2132 2003-09-07 Havoc Pennington <hp@pobox.com>
2134 * doc/dbus-specification.sgml: more updates
2136 2003-09-06 Havoc Pennington <hp@pobox.com>
2138 * doc/dbus-specification.sgml: partial updates
2140 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2141 zillionth time; hopefully I edited the right file this time.
2143 * bus/config-parser.c (append_rule_from_element): support
2144 send_type, send_path, receive_type, receive_path
2146 * bus/policy.c: add message type and path to the list of things
2147 that can be "firewalled"
2149 2003-09-06 Havoc Pennington <hp@pobox.com>
2151 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2152 (dbus_connection_register_object_path): make this not handle
2153 messages to paths below the given path
2155 2003-09-03 Havoc Pennington <hp@pobox.com>
2157 * test/glib/Makefile.am: add this with random glib-linked test
2160 * glib/Makefile.am: remove the random test programs from here,
2161 leave only the unit tests
2163 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2164 uscore/javacaps conversion, and fix
2165 (get_object_property, set_object_property): change to .NET
2166 convention for mapping props to methods, set_FooBar/get_FooBar,
2167 since one language has such a convention we may as well copy it.
2168 Plus real methods in either getFooBar or get_foo_bar style won't
2169 collide with this convention.
2171 2003-09-01 Havoc Pennington <hp@pobox.com>
2173 * glib/dbus-gparser.c: implement
2175 * glib/dbus-gobject.c: start implementing skeletons support
2177 * configure.in: when disabling checks/assert, also define
2178 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2180 2003-09-01 Havoc Pennington <hp@pobox.com>
2182 * glib/Makefile.am: rearrange a bunch of files and get "make
2183 check" framework set up
2185 2003-08-31 Havoc Pennington <hp@pobox.com>
2187 * fix build with --disable-tests
2189 2003-08-30 Havoc Pennington <hp@pobox.com>
2191 * dbus/dbus-connection.c: purge DBusMessageHandler
2193 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2194 use callbacks everywhere
2196 2003-08-30 Havoc Pennington <hp@pobox.com>
2198 * test/data/valid-config-files/system.d/test.conf: change to
2199 root for the user so warnings don't get printed
2201 * dbus/dbus-message.c: add dbus_message_get_path,
2202 dbus_message_set_path
2204 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2205 dispatching to a path
2207 * dbus/dbus-string.c (_dbus_string_validate_path): add
2209 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2210 (_dbus_marshal_object_path): implement
2212 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2213 to contain the path to the target object
2214 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2215 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2217 2003-08-30 Havoc Pennington <hp@pobox.com>
2219 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2221 2003-08-29 Havoc Pennington <hp@pobox.com>
2223 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2225 (struct DBusObjectSubtree): shrink this
2226 a lot, since we may have a lot of them
2227 (_dbus_object_tree_free_all_unlocked): implement
2228 (_dbus_object_tree_dispatch_and_unlock): implement
2230 2003-08-29 Havoc Pennington <hp@pobox.com>
2232 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2234 2003-08-28 Havoc Pennington <hp@pobox.com>
2238 * dbus/dbus-connection.c: port to no ObjectID, create a
2239 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2241 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2242 everything except UnregisterFunction and MessageFunction
2244 * dbus/dbus-marshal.c: port away from DBusObjectID,
2245 add DBUS_TYPE_OBJECT_PATH
2247 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2248 dbus/dbus-objectid.[hc]: remove these, we are moving to
2249 path-based object IDs
2251 2003-08-25 Havoc Pennington <hp@pobox.com>
2253 Just noticed that dbus_message_test is hosed, I wonder when I
2254 broke that. I thought make check was passing earlier...
2256 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2257 container tree, will replace most of dbus-object-registry
2259 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2262 2003-08-19 Havoc Pennington <hp@pobox.com>
2264 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2265 (dbus_message_is_error): fix this function
2267 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2270 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2271 reflect clarified man page
2272 (bus_client_policy_check_can_send): ditto
2274 * bus/session.conf.in: fixup
2276 * bus/system.conf.in: fixup
2278 2003-08-18 Havoc Pennington <hp@redhat.com>
2280 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2282 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2283 dumb bug created earlier (wrong order of args to
2284 decode_header_data())
2286 * tools/dbus-send.c: port
2288 * tools/dbus-print-message.c (print_message): port
2290 * test/data/*messages: port all messages over
2292 * dbus/dbus-message-builder.c: support including
2295 * bus/driver.c: port over
2297 * bus/dispatch.c: port over to new stuff
2299 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2300 rename disconnect signal to "Disconnected"
2302 2003-08-17 Havoc Pennington <hp@pobox.com>
2304 This doesn't compile yet, but syncing up so I can hack on it from
2305 work. What are branches for if not broken code? ;-)
2307 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2308 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2309 DBUS_HEADER_FIELD_ERROR_NAME
2311 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2312 for the interface+member pairs
2313 (string_hash): change to use g_str_hash algorithm
2314 (find_direct_function, find_string_function): refactor these to
2317 * dbus/dbus-message.c: port all of this over to support
2318 interface/member fields instead of name field
2320 * dbus/dbus-object-registry.c: port over
2322 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2323 from _dbus_string_validate_name
2325 * bus/dbus-daemon-1.1: change file format for the
2326 <deny>/<allow> stuff to match new message naming scheme
2328 * bus/policy.c: port over
2330 * bus/config-parser.c: parse new format
2332 2003-08-16 Havoc Pennington <hp@pobox.com>
2334 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2337 * glib/dbus-gproxy.c: some hacking
2339 2003-08-15 Havoc Pennington <hp@redhat.com>
2341 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2343 * dbus/dbus-connection.c
2344 (dbus_connection_send_with_reply_and_block): factor out internals;
2345 change to convert any error replies to DBusError instead of
2346 returning them as a message
2348 2003-08-15 Havoc Pennington <hp@pobox.com>
2350 * dbus/dbus-connection.c,
2351 dbus/dbus-pending-call.c: Finish the pending call stuff
2353 2003-08-14 Havoc Pennington <hp@redhat.com>
2355 * dbus/dbus-pending-call.c: start on new object that will replace
2356 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2359 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2360 with remote interfaces
2362 * dbus/dbus-gidl.c: do the boring boilerplate in here
2364 2003-08-12 Havoc Pennington <hp@pobox.com>
2366 * bus/dispatch.c (bus_dispatch): make this return proper
2367 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2369 * dbus/dbus-errors.c (dbus_set_error): use
2370 _dbus_string_append_printf_valist
2372 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2373 (_dbus_string_append_printf): new
2375 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2378 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2379 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2380 message is unhandled.
2382 2003-08-11 Havoc Pennington <hp@pobox.com>
2384 * bus/test.c (client_disconnect_handler): change to return
2385 HANDLED (would have been REMOVE_MESSAGE)
2387 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2388 HANDLED/NOT_YET_HANDLED instead of
2389 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2392 2003-08-10 Havoc Pennington <hp@pobox.com>
2394 * tools/dbus-send.c (main): add --type argument, for now
2395 supporting only method_call and signal types.
2397 * tools/dbus-print-message.c: print message type
2399 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2400 init connection->objects
2402 * doc/dbus-specification.sgml: fix sgml
2404 * bus/*.c: port over to object-instance API changes
2406 * test/test-service.c: ditto
2408 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2409 name, we will have to fix up the rest of the code to also handle
2411 (dbus_message_new): generic message-creation call
2412 (set_string_field): allow appending name field
2414 2003-08-06 Havoc Pennington <hp@pobox.com>
2416 * dbus/dbus-object-registry.c: implement signal connection
2419 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2421 * dbus/dbus-internals.c (_dbus_memdup): new function
2423 2003-08-02 Havoc Pennington <hp@pobox.com>
2425 * dbus/dbus-message.c (dbus_message_get_no_reply)
2426 (dbus_message_set_no_reply): add these and remove
2427 set_is_error/get_is_error
2429 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2430 remove the ERROR flag, since there's now an ERROR type
2432 2003-08-01 Havoc Pennington <hp@pobox.com>
2434 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2437 * dbus/dbus-message.c (dbus_message_get_type): new function
2439 * doc/dbus-specification.sgml: add "type" byte to messages
2441 2003-08-01 Havoc Pennington <hp@pobox.com>
2443 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2444 a message type enum to distinguish kinds of message
2445 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2446 that need not be replied to
2448 2003-08-01 Havoc Pennington <hp@pobox.com>
2450 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2451 (unpack_8_octets): fix no-64-bit-int bug
2453 * dbus/dbus-object-registry.c (validate_id): validate the
2454 connection ID bits, not just the instance ID.
2456 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2457 the connection-global 33 bits of the object ID
2459 * dbus/dbus-object-registry.c (info_from_entry): fill in
2460 object ID in the new way
2462 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2463 define server/client/instance bits.
2465 2003-07-30 Havoc Pennington <hp@pobox.com>
2467 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2470 2003-07-13 Havoc Pennington <hp@pobox.com>
2472 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2473 fields to DBusObjectVTable and DBusObjectInfo
2475 2003-07-12 Havoc Pennington <hp@pobox.com>
2477 * dbus/dbus-object-registry.c: implement unit test,
2478 fix bugs discovered in process
2480 * dbus/dbus-connection.c: remove handler_table and
2481 register_handler(), add DBusObjectRegistry usage
2483 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2484 (dbus_object_id_set_null): new functions
2486 2003-07-08 Havoc Pennington <hp@pobox.com>
2488 * dbus/dbus-object.c: implement some of this
2490 * dbus/dbus-object-registry.c
2491 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2493 (_dbus_object_registry_new): handle OOM
2495 2003-07-08 Havoc Pennington <hp@pobox.com>
2497 * dbus/dbus-object.h: sketch out an API for registering objects
2498 with a connection, that allows us to use as little as 24 bytes
2499 per object and lets application code represent an object in
2500 any conceivable way.
2502 * dbus/dbus-object-registry.c: implement the hard bits of the
2503 DBusConnection aspect of object API. Not yet wired up.
2505 2003-07-06 Havoc Pennington <hp@pobox.com>
2507 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2508 (_dbus_marshal_object_id): new
2509 (_dbus_demarshal_object_id): new
2510 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2511 consolidate identical switch cases. Don't conditionalize handling
2512 of DBUS_TYPE_UINT64, need to handle the type always.
2513 (_dbus_marshal_validate_arg): consolidate identical cases, and
2514 handle DBUS_TYPE_OBJECT_ID
2516 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2518 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2520 2003-09-28 Havoc Pennington <hp@pobox.com>
2524 2003-09-28 Havoc Pennington <hp@pobox.com>
2526 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2527 to work with Debian db2html
2529 2003-09-28 Havoc Pennington <hp@pobox.com>
2531 * configure.in: 0.13
2533 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2534 stylesheet-images for benefit of Debian
2536 Change back to using filesystem-linked sockets for the system
2537 bus, so only root can create the default system bus address.
2539 * bus/system.conf.in: change to use
2540 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2542 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2545 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2546 here, and AC_DEFINE DBUS_SYSTEM_PATH
2548 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2551 * doc/busconfig.dtd:
2554 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2556 * doc/dbus-specification.sgml:
2557 Add activation reply values.
2559 2003-08-05 Havoc Pennington <hp@redhat.com>
2561 * configure.in: 0.12
2563 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2565 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2566 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2567 (add_watch), (remove_watch), (create_source):
2568 Refcount fds, fixes some reentrancy issues.
2570 2003-07-30 Havoc Pennington <hp@redhat.com>
2572 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2573 bus address to be abstract if we have abstract sockets
2577 2003-07-28 Havoc Pennington <hp@redhat.com>
2579 * bus/messagebus.in: fix to avoid processname/servicename
2580 confusion, from Michael Kearey
2581 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2583 2003-07-23 Havoc Pennington <hp@pobox.com>
2585 * dbus/dbus-message.c (dbus_message_iter_get_named):
2586 fix from Andy Hanton to remove broken "+1"
2588 2003-07-16 Havoc Pennington <hp@pobox.com>
2590 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2591 babysitter process, as suggested by Thomas Leonard, so
2592 an "eval `dbus-launch --exit-with-session`" will actually
2595 2003-07-16 Havoc Pennington <hp@pobox.com>
2597 * configure.in: print out EXPANDED_* variables in the summary at
2598 the end; clean up the code that computes EXPANDED_ variables and
2599 get the ones using exec_prefix right. Should make things work
2600 when you build without --prefix
2602 2003-06-29 Havoc Pennington <hp@pobox.com>
2604 * mono/Test.cs (class Test): fire up a main loop and run it
2606 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2607 done once, the app has to do it
2609 2003-06-26 Havoc Pennington <hp@pobox.com>
2611 * mono/Connection.cs: set up connection with the glib main loop
2613 2003-07-01 Havoc Pennington <hp@redhat.com>
2615 * doc/dbus-specification.sgml: clarify the format of a type code,
2616 change suggested by Jim Blandy
2618 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2621 * tools/Makefile.am: Don't assume srcdir == builddir.
2623 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2624 the allocated block.
2625 (_dbus_memory_test): New function.
2626 * dbus/dbus-test.h: Add _dbus_memory_test ().
2627 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2629 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2631 (dbus_message_new): Remove obsolete @todo.
2633 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2634 (_dbus_marshal_set_uint64): Fix comment.
2636 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2637 hardcode FIELD_REPLY_SERIAL.
2639 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2640 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2642 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2643 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2645 2003-06-24 Havoc Pennington <hp@pobox.com>
2647 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2649 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2655 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2656 * gcj/org/.cvsignore:
2657 * gcj/org/Makefile.am:
2658 * gcj/org/freedesktop/.cvsignore:
2659 * gcj/org/freedesktop/Makefile.am:
2660 * gcj/org/freedesktop/dbus/.cvsignore:
2661 * gcj/org/freedesktop/dbus/Makefile.am:
2662 * gcj/org/freedesktop/dbus/Message.java: (Message),
2664 * gcj/org/freedesktop/dbus/natMessage.cc:
2665 Fix the build system.
2667 2003-06-22 Havoc Pennington <hp@pobox.com>
2669 * mono/Connection.cs: add more bindings
2671 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2674 2003-06-22 Havoc Pennington <hp@pobox.com>
2676 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2677 Start wrapping more stuff.
2679 2003-06-22 Havoc Pennington <hp@pobox.com>
2681 * mono/Message.cs: implement Message.Wrap() that ensures we only
2682 have a single C# wrapper per DBusMessage, assuming it works which
2683 it probably doesn't.
2685 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2686 (dbus_message_free_data_slot): new
2687 (dbus_message_set_data): new
2688 (dbus_message_get_data): new
2690 2003-06-22 Havoc Pennington <hp@pobox.com>
2692 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2693 (_dbus_data_slot_allocator_alloc): rework these to keep a
2694 reference count on each slot and automatically manage a global
2695 slot ID variable passed in by address
2697 * bus/bus.c: convert to new dataslot API
2699 * dbus/dbus-bus.c: convert to new dataslot API
2701 * dbus/dbus-connection.c: convert to new dataslot API
2703 * dbus/dbus-server.c: convert to new dataslot API
2705 * glib/dbus-gmain.c: ditto
2709 * bus/connection.c: ditto
2711 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2713 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2714 after the gcj checks so that the correct configuration tags
2715 will be added to libtool.
2717 * dbus-glib-1.pc.in: No need to specify any includes since
2718 dbus-1.pc.in has those.
2720 2003-06-22 Havoc Pennington <hp@pobox.com>
2722 * mono/*, gcj/*, configure.in, Makefile.am:
2723 Check in makefiles and subdirs for mono and gcj bindings.
2724 Neither binding actually exists, just trying to get through
2725 all the build and other boring bits.
2727 2003-06-21 Philip Blundell <philb@gnu.org>
2729 * tools/dbus-monitor.1: Updated.
2731 * tools/dbus-send.1: Likewise.
2733 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2735 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2736 for hangup and error after checking read so we won't discard
2737 pending data if both hangup and read are set.
2739 2003-06-19 Philip Blundell <philb@gnu.org>
2741 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2743 * tools/dbus-send.c: Accept both --system and --session.
2745 * tools/dbus-monitor.c: Same here.
2747 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2749 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2750 from C++ (Patch by Miloslav Trmac).
2752 2003-06-15 Joe Shaw <joe@assbarn.com>
2754 * configure.in: Check for socklen_t.
2756 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2758 * test/test-segfault.c: Add #include <sys/time.h>
2760 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2761 dbus-launch needs it.
2763 2003-06-09 Havoc Pennington <hp@redhat.com>
2765 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2766 SUN_LEN, it breaks abstract socket usage
2768 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2771 2003-06-04 Havoc Pennington <hp@pobox.com>
2773 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2774 using unix:abstract=/foo, and when listening in a tmpdir
2775 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2777 * dbus/dbus-transport.c (_dbus_transport_open): support
2780 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2781 support abstract sockets
2783 * dbus/dbus-transport-unix.c
2784 (_dbus_transport_new_for_domain_socket): support abstract sockets
2786 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2787 toggle as an argument, implement abstract namespace support
2788 (_dbus_listen_unix_socket): ditto
2790 * configure.in: add --enable-abstract-sockets and implement
2791 a configure check for autodetection of the right value.
2793 2003-06-01 Havoc Pennington <hp@pobox.com>
2795 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2796 in /tmp (though on Linux this will end up being useless,
2797 when we add abstract namespace support)
2799 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2802 2003-05-28 Colin Walters <walters@verbum.org>
2804 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2806 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2808 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2810 2003-05-17 Colin Walters <walters@gnu.org>
2812 * tools/dbus-send.c: Don't exit with an error code if --help was
2813 passed. Default to using the session bus instead of the system
2816 * tools/dbus-launch.c: Ditto.
2818 * tools/dbus-monitor.c: Ditto.
2820 * tools/dbus-send.1: Update with new arguments.
2822 * tools/dbus-launch.c: Emit code to export variables. New
2823 arguments -s and -c to specify shell syntax, and a bit of code to
2824 autodetect syntax. Also, allow specifying a program to run.
2826 * tools/dbus-launch.1: Update with new arguments.
2828 * tools/dbus-send.1: Ditto.
2830 * tools/dbus-monitor.1: Ditto.
2832 2003-05-17 Havoc Pennington <hp@pobox.com>
2834 * bus/config-parser.c (merge_included): merge in policies from
2835 child configuration file.
2837 * bus/policy.c (bus_policy_merge): function to merge two policies
2840 2003-05-16 Havoc Pennington <hp@redhat.com>
2842 * dbus/dbus-connection.c: disable verbose lock spew
2844 * tools/dbus-send.c: add --print-reply command line option
2846 * tools/dbus-print-message.h (print_message): new util function
2847 shared by dbus-send and dbus-monitor
2849 * tools/dbus-monitor.c (handler_func): exit on disconnect
2851 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2852 disconnected, don't try to use the read_watch
2854 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2855 so we can find this bug more easily
2857 2003-05-16 Havoc Pennington <hp@redhat.com>
2859 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2860 NULL as DBusHashTable is annoyingly likely to do.
2862 2003-05-16 Colin Walters <walters@verbum.org>
2864 * tools/dbus-monitor.c: Add --session argument and usage()
2867 * tools/dbus-monitor.1: Update with new --session arg.
2869 * bus/Makefile.am (install-data-hook): Create
2870 $(libdir)/dbus-1.0/services so that the session bus is happy.
2872 2003-05-15 Havoc Pennington <hp@redhat.com>
2874 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2875 on non-x86. ifdef's are evil.
2877 2003-05-15 Havoc Pennington <hp@redhat.com>
2879 * configure.in: 0.11
2883 * bus/Makefile.am (initddir): apparently we are supposed to put
2884 init scripts in /etc/rc.d/init.d not /etc/init.d
2886 * bus/Makefile.am: remove the "you must --enable-tests to make
2887 check" as it broke distcheck
2889 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2891 2003-05-13 James Willcox <jwillcox@gnome.org>
2894 * bus/activation.c: (bus_activation_service_created),
2895 (bus_activation_activate_service):
2896 * bus/driver.c: (bus_driver_send_service_deleted),
2897 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2898 (bus_driver_send_service_acquired),
2899 (bus_driver_send_welcome_message),
2900 (bus_driver_handle_list_services):
2901 * bus/session.conf.in:
2902 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2903 (dbus_bus_service_exists), (dbus_bus_activate_service):
2906 Add some convenience API which lets you activate a service, and did a
2907 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2908 and dbus_message_get_args()
2910 2003-05-11 Havoc Pennington <hp@pobox.com>
2912 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2913 calling _dbus_marshal_validate_arg() for every byte in a byte
2916 * dbus/dbus-message-handler.c: use atomic reference counting to
2917 reduce number of locks slightly; the global lock in here sucks
2919 * dbus/dbus-connection.c
2920 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2921 update_dispatch_status that can be called with lock held; then use
2922 in a couple places to reduce locking/unlocking
2923 (dbus_connection_send): hold the lock over the whole function
2924 instead of acquiring it twice.
2926 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2928 * bus/connection.c (bus_connections_setup_connection): fix access
2929 to already-freed memory.
2931 * dbus/dbus-connection.c: keep a little cache of linked list
2932 nodes, to avoid using the global linked list alloc lock in the
2933 normal send-message case. Instead we just use the connection lock
2934 that we already have to take.
2936 * dbus/dbus-list.c (_dbus_list_find_last): new function
2938 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2939 change to use a struct for the atomic type; fix docs,
2940 they return value before increment, not after increment.
2942 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2943 (_dbus_string_append_8_aligned): new functions to try to
2944 microoptimize this operation.
2945 (reallocate_for_length): break this out of set_length(), to
2946 improve profile info, and also so we can consider inlining the
2949 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2950 strings with some preallocation, cuts down on our calls to realloc
2951 a fair bit. Though if we can get the "move entire string to empty
2952 string" optimization below to kick in here, it would be better.
2954 * dbus/dbus-string.c (_dbus_string_move): just call
2955 _dbus_string_move_len
2956 (_dbus_string_move_len): add a special case for moving
2957 an entire string into an empty string; we can just
2958 swap the string data instead of doing any reallocs.
2959 (_dbus_string_init_preallocated): new function
2961 2003-05-11 Havoc Pennington <hp@pobox.com>
2963 Write a "test-profile" that does echo client-server with threads;
2964 profile reveals lock contention, memcpy/realloc of buffers, and
2965 UTF-8 validation as hot spots. 20% of lock contention eliminated
2966 with dbus_atomic_inc/dec implementation on x86. Much remaining
2967 contention is global mempool locks for GList and DBusList.
2969 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2972 * dbus/dbus-connection.c (struct DBusConnection): use
2973 dbus_atomic_t for the reference count
2975 * dbus/dbus-message.c (struct DBusMessage): declare
2976 dbus_atomic_t values as volatile
2978 * configure.in: code to detect ability to use atomic integer
2979 operations in assembly, from GLib patch
2981 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2982 time, tired of it being wrong in threads and forked processes
2984 * glib/test-profile.c: a little program to bounce messages back
2985 and forth between threads and eat CPU
2987 * dbus/dbus-connection.c: add debug spew macros for debugging
2988 thread locks; include config.h at top; fix deadlock in
2989 dbus_connection_flush()
2991 2003-05-08 Havoc Pennington <hp@pobox.com>
2993 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2994 data from getting written, and there wasn't a good reason to
2997 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2998 dbus_verbose lines in test coverage
2999 (main): add list of functions sorted by # of untested blocks
3000 to the coverage report
3002 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3004 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3006 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3007 extend test coverage
3009 * test/data/auth/cancel.auth-script: test canceling an
3012 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3013 aren't used. in CVS history if we end up needing them.
3015 2003-05-04 Havoc Pennington <hp@pobox.com>
3017 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3020 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3021 function, which assumed length was in # of strings, not bytes
3023 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3026 * dbus/dbus-connection.c
3027 (_dbus_connection_queue_received_message): disable function for
3028 now, we are only using it in test mode
3030 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3031 remove a mistaken FIXME
3033 2003-05-04 Havoc Pennington <hp@pobox.com>
3035 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3036 unlock mutex on successful return, patch from Anders Gustafsson
3038 2003-05-04 Havoc Pennington <hp@pobox.com>
3040 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3043 2003-05-04 Havoc Pennington <hp@pobox.com>
3045 * tools/dbus-launch.c: implement
3047 * bus/main.c (main), bus/bus.c (bus_context_new):
3048 implement --print-pid and --fork
3050 2003-05-03 Havoc Pennington <hp@redhat.com>
3052 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3053 the address had no value, and add to test suite. Fix and
3054 regression test from Miloslav Trmac
3056 2003-05-03 Havoc Pennington <hp@pobox.com>
3058 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3059 watch is invalid when handled
3061 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3062 dbus-launch utility to launch the bus from a shell script. Didn't
3063 actually implement dbus-launch yet, it's just a placeholder still.
3065 2003-05-03 Havoc Pennington <hp@pobox.com>
3067 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3068 daemon; also documents daemon config file, so replaces
3069 doc/config-file.txt. Corrected some stuff from config-file.txt in
3070 the process of moving it.
3072 2003-05-03 Havoc Pennington <hp@pobox.com>
3074 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3077 2003-05-03 Colin Walters <walters@verbum.org>
3079 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3080 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3082 * Makefile.am: Update to use new .pc versioning scheme.
3084 2003-05-02 Havoc Pennington <hp@redhat.com>
3086 * bus/system.conf.in: allow send/receive to/from message bus
3089 2003-04-30 Havoc Pennington <hp@redhat.com>
3091 * configure.in: print a note when building with unit tests and
3094 2003-04-30 Havoc Pennington <hp@redhat.com>
3096 * Makefile.am: add a check-local that complains if you didn't
3097 configure with --enable-tests
3099 2003-04-29 Havoc Pennington <hp@redhat.com>
3101 * glib/dbus-gmain.c: docs cleanups
3103 * dbus/dbus-types.h: add docs on int64 types
3105 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3106 public API docs section
3108 2003-04-29 Havoc Pennington <hp@redhat.com>
3110 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3111 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3112 parallel install API version, not with the D-BUS package version.
3114 * HACKING: move some of README over here
3116 * README: updates, and document API/ABI policy
3118 * configure.in: reindentation
3120 2003-04-29 Havoc Pennington <hp@redhat.com>
3122 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3123 to use this library" to be sure people have the right
3126 2003-04-28 Havoc Pennington <hp@redhat.com>
3128 * configure.in: add --enable-docs which by default is auto yes if
3129 doxygen and db2html found, no otherwise; but can be forced on/off
3131 * doc/Makefile.am: conditionalize whether to build docs on
3134 2003-04-28 Havoc Pennington <hp@redhat.com>
3136 * configure.in: 0.10
3140 * bus/system.conf.in: add <includedir>system.d</includedir>
3142 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3143 username was provided but not uid
3145 * bus/config-parser.c (struct BusConfigParser): keep track of
3146 whether the parser is toplevel or was included; change some
3147 of the error handling if it's included.
3149 2003-04-27 Havoc Pennington <hp@pobox.com>
3153 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3154 report correct status if we finish processing authentication
3155 inside this function.
3157 * bus/activation.c (try_send_activation_failure): use
3158 bus_transaction_send_error_reply
3160 * bus/connection.c (bus_connection_get_groups): return an error
3161 explaining the problem
3163 * bus/bus.c (bus_context_check_security_policy): implement
3164 restriction here that inactive connections can only send the
3165 hello message. Also, allow bus driver to send anything to
3168 * bus/connection.c (bus_connection_complete): create the
3169 BusClientPolicy here instead of on-demand.
3170 (bus_connection_get_policy): don't return an error
3172 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3173 sender field in message being replied to
3175 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3176 causing it to return FALSE always
3178 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3179 we checked sender rather than destination
3181 2003-04-25 Havoc Pennington <hp@redhat.com>
3183 test suite is slightly hosed at the moment, will fix soon
3185 * bus/connection.c (bus_connections_expire_incomplete): fix to
3186 properly disable the timeout when required
3187 (bus_connection_set_name): check whether we can remove incomplete
3188 connections timeout after we complete each connection.
3190 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3191 probably still broken.
3193 * bus/services.c (bus_registry_acquire_service): implement max
3194 number of services owned, and honor allow/deny rules on which
3195 services a connection can own.
3197 * bus/connection.c (bus_connection_get_policy): report errors here
3199 * bus/activation.c: implement limit on number of pending
3202 2003-04-25 Havoc Pennington <hp@redhat.com>
3204 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3205 where we used >= 0 instead of != DBUS_UID_UNSET.
3207 2003-04-25 Havoc Pennington <hp@redhat.com>
3209 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3210 were toggled without add/remove, fix from Anders Gustafsson
3212 2003-04-24 Havoc Pennington <hp@redhat.com>
3214 * test/data/valid-config-files/basic.conf: add <limit> tags to
3217 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3218 <limit> tag in configuration file.
3220 2003-04-24 Havoc Pennington <hp@redhat.com>
3222 * bus/dispatch.c: somehow missed some name_is
3224 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3225 (_dbus_timeout_set_interval): new
3227 * bus/connection.c (bus_connections_setup_connection): record time
3228 when each connection is first set up, and expire them after the
3229 auth timeout passes.
3231 2003-04-24 Havoc Pennington <hp@redhat.com>
3233 * dbus/dbus-message.c (dbus_message_name_is): rename
3234 (dbus_message_service_is): rename
3235 (dbus_message_sender_is): rename
3236 (dbus_message_get_service): rename
3238 2003-04-24 Havoc Pennington <hp@redhat.com>
3240 * configure.in: add --enable-checks
3242 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3244 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3245 to use thread locks.
3246 (_dbus_connection_handler_destroyed_locked): move some private
3247 functions into proper docs group
3249 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3250 _dbus_return_val_if_fail
3252 Throughout: use dbus_return_if_fail
3254 2003-04-23 James Willcox <jwillcox@gnome.org>
3257 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3258 (dbus_connection_setup_with_g_main),
3259 (dbus_server_setup_with_g_main):
3260 * glib/test-dbus-glib.c: (main):
3261 * glib/test-thread-client.c: (main):
3262 * glib/test-thread-server.c: (new_connection_callback), (main):
3263 * tools/dbus-monitor.c: (main):
3265 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3266 and dbus_server_setup_with_g_main().
3268 2003-04-20 Havoc Pennington <hp@pobox.com>
3270 * doc/dbus-specification.sgml: document the restrictions on
3271 message and service names
3273 2003-04-22 Havoc Pennington <hp@redhat.com>
3275 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3276 support, and do some code cleanups to share more code and
3277 speed up array marshal/demarshal.
3279 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3281 * configure.in: generate dbus-arch-deps.h
3283 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3286 2003-04-22 Havoc Pennington <hp@redhat.com>
3288 * test/data/valid-messages/opposite-endian.message: fix test
3289 to use proper type for rply field
3291 * test/data/invalid-messages: add tests for below validation
3293 * dbus/dbus-message.c (decode_header_data): validate field types,
3294 and validate that named fields are valid names
3295 (decode_name_field): consider messages in the
3296 org.freedesktop.Local. namespace to be invalid.
3298 * dbus/dbus-string.c (_dbus_string_validate_name): new
3300 2003-04-19 Havoc Pennington <hp@pobox.com>
3302 * bus/driver.c (bus_driver_handle_hello): check limits and
3303 return an error if they are exceeded.
3305 * bus/connection.c: maintain separate lists of active and inactive
3306 connections, and a count of each. Maintain count of completed
3307 connections per user. Implement code to check connection limits.
3309 * dbus/dbus-list.c (_dbus_list_unlink): export
3311 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3312 number of bytes in the message queue for a connection
3314 2003-04-18 Havoc Pennington <hp@pobox.com>
3316 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3318 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3321 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3322 on realloc be sure to update the pointer in the keyring
3324 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3325 offset to avoid writing to unallocated memory
3327 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3328 try the next mechanism, so we properly handle OOM
3330 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3332 (_dbus_keyring_new): fix OOM bug
3333 (_dbus_keyring_new_homedir): always set error; impose a maximum
3334 number of keys we'll load from the file, mostly to speed up the
3335 test suite and make its OOM checks more useful, but also for
3338 * dbus/dbus-auth.c (process_error_server): reject authentication
3339 if we get an error from the client
3340 (process_cancel): on cancel, send REJECTED, per the spec
3341 (process_error_client): send CANCEL if we get an error from the
3344 2003-04-18 Havoc Pennington <hp@pobox.com>
3346 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3349 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3352 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3353 about DBUS_TEST_HOMEDIR once
3355 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3358 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3359 config file so we test the right thing
3361 Throughout: assorted docs improvements
3363 2003-04-18 Havoc Pennington <hp@pobox.com>
3365 * glib/dbus-gmain.c: adapt to watch changes
3367 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3369 * dbus/dbus-server.h: remove dbus_server_handle_watch
3371 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3373 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3374 like DBusTimeout, so we don't need dbus_connection_handle_watch
3377 2003-04-17 Havoc Pennington <hp@redhat.com>
3379 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3380 database usage so it all goes via the DBusUserDatabase cache.
3382 2003-04-17 Havoc Pennington <hp@redhat.com>
3384 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3385 there was an OOM watch we skipped, we always return TRUE so we
3386 iterate again to have a look at it again. Fixes test suite hang.
3387 Code rearrangement also lets us lose some memset and only iterate
3388 over callbacks once.
3390 * bus/driver.c (bus_driver_handle_message): sense of test for
3393 2003-04-16 Havoc Pennington <hp@pobox.com>
3395 * doc/dbus-specification.sgml: make spec say serials are unsigned
3397 * dbus/dbus-message.h: change message serials to unsigned
3399 * dbus/dbus-connection.c: adapt to message serials being unsigned
3401 2003-04-15 Havoc Pennington <hp@pobox.com>
3403 * bus/bus.c: create and keep around a shared DBusUserDatabase
3406 * bus/connection.c (bus_connection_get_groups): don't cache
3407 groups for user in the connection object, since user database
3408 object now does that.
3410 2003-04-16 Havoc Pennington <hp@redhat.com>
3412 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3413 list of size counters
3414 (_dbus_message_loader_putback_message_link): put back a popped link
3416 * dbus/dbus-connection.c
3417 (dbus_connection_set_max_live_messages_size): rename
3419 (dbus_connection_get_outgoing_size): get size of outgoing
3421 (_dbus_connection_set_connection_counter): remove this cruft
3423 2003-04-14 Havoc Pennington <hp@redhat.com>
3425 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3426 caching, but at some point we might want to be able to use a
3429 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3430 SHA1 conf file to test the sha1 auth mechanism, since the regular
3431 test always uses EXTERNAL when available.
3434 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3435 add conf file that requires use of sha1 auth
3437 2003-04-13 Havoc Pennington <hp@pobox.com>
3439 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3440 from Philip Blundell to send messages and monitor them.
3442 2003-04-13 Havoc Pennington <hp@pobox.com>
3444 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3447 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3450 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3451 fix to only recover unused bytes if we're already authenticated
3452 (_dbus_transport_get_is_authenticated): fix to still mark us
3453 authenticated if there are unused bytes.
3455 * bus/dispatch.c: implement security policy checking
3457 * bus/connection.c (bus_transaction_send_from_driver): new
3459 * bus/bus.c (bus_context_check_security_policy): new
3461 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3462 now we just set the DBusError and it gets converted to an error
3465 * bus/connection.c (allow_user_function): enable code using actual
3466 data from the config file
3468 * bus/policy.c (list_allows_user): handle wildcard rules for
3469 user/group connection perms
3471 2003-04-13 Havoc Pennington <hp@pobox.com>
3473 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3475 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3477 * bus/policy.c (bus_policy_append_mandatory_rule)
3478 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3479 (bus_policy_append_group_rule): new functions
3481 2003-04-12 Havoc Pennington <hp@pobox.com>
3483 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3485 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3486 the pid/gid/uid, just for paranoia.
3488 * test/break-loader.c (randomly_do_n_things): find a byte
3489 containing a type code, and randomly change it to a different
3492 2003-04-12 Havoc Pennington <hp@pobox.com>
3494 * bus/policy.h: change BusPolicy to be the thing from the config
3495 file, and rename old BusPolicy to BusClientPolicy
3497 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3498 match change in how policy works
3500 * dbus/dbus-internals.h: mark assert_not_reached as
3501 __attribute((noreturn))__
3503 2003-04-11 Havoc Pennington <hp@redhat.com>
3505 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3506 the broadcast service. Use boolean return for ServiceExists.
3508 2003-04-11 Havoc Pennington <hp@redhat.com>
3510 * configure.in: add another directory to look for qt in.
3512 2003-04-11 Havoc Pennington <hp@redhat.com>
3514 * AUTHORS: add Colin Walters
3516 2003-04-11 Havoc Pennington <hp@redhat.com>
3522 2003-04-11 Havoc Pennington <hp@redhat.com>
3524 * bus/messagebus.in: remove pid file when stopping the
3525 message bus, since the bus won't have privileges to remove it
3528 2003-04-11 Havoc Pennington <hp@redhat.com>
3530 * bus/bus.c (bus_context_new): move credentials change after
3533 2003-04-11 Havoc Pennington <hp@pobox.com>
3535 * test/decode-gcov.c: add "below average functions" to the
3536 coverage report, and change how some of the code works.
3538 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3539 not in the coverage stats.
3541 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3542 couple places so running the test suite doesn't result in megaspam.
3544 2003-04-11 Havoc Pennington <hp@pobox.com>
3546 * bus/dispatch.c (check_existent_service_activation): accept a no
3547 memory error in a place we didn't before
3549 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3550 in case the first one failed," since the test suite is less
3553 2003-04-10 Havoc Pennington <hp@pobox.com>
3555 * bus/dispatch.c (check_segfault_service_activation): add test
3556 for launching an executable that just crashes.
3558 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3559 don't leave a million cores. We'll see how portable this is.
3561 2003-04-10 Havoc Pennington <hp@pobox.com>
3563 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3564 the possible parent failures before we fork, so that we don't
3565 fail to create a babysitter after creating the child.
3567 * bus/activation.c (bus_activation_activate_service): kill child
3568 if we don't successfully complete the activation.
3570 2003-04-10 Havoc Pennington <hp@redhat.com>
3572 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3573 the connection if it's disconnected
3575 * bus/activation.c (bus_activation_service_created): use new
3576 transaction features to roll back removal of pending activation if
3577 we don't successfully create the service after all. Don't remove
3578 pending activation if the function fails.
3580 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3581 (_dbus_list_insert_after_link): new code to facilitate
3584 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3585 new functionality, so we can preallocate the ability to insert
3588 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3589 allowing us to put custom hooks in a transaction to be used for
3590 cancelling said transaction
3592 * doc/dbus-specification.sgml: add some discussion of secondary
3593 service owners, and disallow zero-length service names
3595 * bus/services.c (bus_registry_acquire_service): new function,
3596 splits out part of bus_driver_handle_acquire_service() and fixes
3597 a bug where we didn't remove the service doing the acquiring
3598 from the secondary queue if we failed to remove the current owner
3599 from the front of the queue.
3601 2003-04-10 Alexander Larsson <alexl@redhat.com>
3603 * doc/dbus-specification.sgml:
3604 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3606 2003-04-10 Alexander Larsson <alexl@redhat.com>
3611 Added files to cvsignore
3613 * dbus/dbus-message.h:
3614 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3615 Make get_named() take two out argument and return a boolean.
3616 (dbus_message_iter_get_args_valist):
3617 Update usage of get_named().
3618 (dbus_message_iter_append_byte):
3620 (dbus_message_iter_append_named)
3622 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3625 2003-04-10 Alexander Larsson <alexl@redhat.com>
3627 * dbus/dbus-marshal.[ch]:
3628 Add array_type_pos argument to _dbus_marshal_validate_arg.
3629 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3631 * dbus/dbus-message.[ch]:
3632 Multi-dimensional arrays have full type specification in the
3633 outermost array. Iter code re-arranged to handle this.
3634 Added some more iter tests.
3636 * doc/dbus-specification.sgml:
3639 Update new array encoding description.
3640 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3642 * test/data/invalid-messages/array-with-mixed-types.message:
3643 * test/data/valid-messages/array-of-array-of-uint32.message:
3644 Change to the new array format.
3646 * test/data/invalid-messages/too-short-dict.message:
3649 * test/data/valid-messages/recursive-types.message:
3650 Fix up and extend test.
3652 2003-04-10 Havoc Pennington <hp@pobox.com>
3654 * bus/dispatch.c: lots of fixes
3656 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3657 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3658 that was crack, broke the test service.
3660 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3661 handling to avoid piling up errors if we get a failure on the
3664 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3665 pid in assertion failures.
3667 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3668 to some fixed size of file descriptor array. Don't return TRUE
3669 anytime a timeout exists, that led to lots of busy loop silliness
3672 2003-04-09 Havoc Pennington <hp@redhat.com>
3674 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3675 I'd checked this in earlier but hadn't.
3677 2003-04-09 Havoc Pennington <hp@redhat.com>
3679 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3680 the activation test (man this is getting old!)
3682 2003-04-09 Havoc Pennington <hp@redhat.com>
3684 * test/test-utils.c: use dispatch status function to fix this up
3686 * bus/connection.c (connection_watch_callback): don't dispatch
3688 (connection_timeout_callback): don't dispatch from here
3689 (bus_connections_setup_connection): set the dispatch status function
3690 (bus_connection_disconnected): unset it
3692 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3693 used to add a connection to be dispatched
3694 (_dbus_loop_iterate): do the dispatching at the end of each
3697 * dbus/dbus-connection.c
3698 (dbus_connection_set_dispatch_status_function): new function
3699 allowing us to fix up main loop usage
3700 (_dbus_connection_last_unref): free all the various function
3702 (dbus_connection_dispatch): call the DispatchStatusFunction
3703 whenever this function returns
3704 (dbus_connection_handle_watch): call DispatchStatusFunction
3705 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3706 (reply_handler_timeout): call DispatchStatusFunction
3707 (dbus_connection_flush): call DispatchStatusFunction
3709 2003-04-09 Havoc Pennington <hp@redhat.com>
3711 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3714 * bus/dispatch.c (check_service_activated): fix bug in test
3716 * dbus/dbus-mainloop.c (check_timeout): fix this up
3718 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3719 verbose output so we can sort out output from different processes,
3720 e.g. in the activation case.
3722 2003-04-08 Colin Walters <walters@gnu.org>
3724 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3726 (bus_context_new): Set it.
3727 (bus_context_unref): Use it to delete the pid file.
3729 2003-04-08 Havoc Pennington <hp@redhat.com>
3731 * test/data/invalid-messages/array-with-mixed-types.message:
3732 regression test that fails for the moment
3734 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3735 tests for convenience
3737 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3738 array of nil, it broke things.
3740 * test/data/invalid-messages/array-of-nil.message: regression test
3742 * test/data/valid-messages/array-of-array-of-uint32.message:
3743 happened to write this so added it to suite
3745 2003-04-08 Havoc Pennington <hp@redhat.com>
3747 * bus/driver.c (bus_driver_handle_acquire_service): init
3748 retval/reply before checking name
3750 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3751 recursion depth argument
3753 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3754 in the public struct for future extension
3756 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3759 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3762 * doc/dbus-specification.sgml: fix typo
3764 2003-04-08 Alexander Larsson <alexl@redhat.com>
3766 Implemented recursive types, named types and new-style iters
3769 * glib/test-thread-client.c: (thread_func):
3770 * glib/test-thread-server.c: (handle_test_message):
3771 * test/test-service.c: (handle_echo):
3780 * dbus/dbus-internals.c: (_dbus_type_to_string):
3781 Update for new types.
3783 * dbus/dbus-marshal.[ch]:
3784 Implement recursive types and the new marshalling format.
3785 Remove hardcoded dict marshalling.
3786 Marshal named types.
3788 * dbus/dbus-message-builder.c:
3790 Remove references to old types
3792 * dbus/dbus-message.[ch]:
3793 New non-refcounted iter API that supports recursive iters.
3794 Use iters for appending, including support for recursive
3796 Add byte and named type support.
3797 Update everything to new marshalling formats.
3798 Add tests for new API.
3800 * dbus/dbus-protocol.h:
3801 Remove old array types.
3802 Add types: BYTE, ARRAY, DICT, NAMED
3804 * dbus/dbus-string.c:
3805 * dbus/dbus-sysdeps.c:
3806 Make parse_double locale safe.
3808 * dbus/dbus-test-main.c:
3814 * doc/dbus-specification.sgml:
3817 * test/data/incomplete-messages/missing-body.message:
3818 * test/data/invalid-messages/bad-boolean.message:
3819 * test/data/invalid-messages/bad-boolean-array.message:
3820 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3821 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3822 * test/data/invalid-messages/too-short-dict.message:
3823 * test/data/valid-messages/dict-simple.message:
3824 * test/data/valid-messages/dict.message:
3825 * test/data/valid-messages/emptiness.message:
3826 * test/data/valid-messages/lots-of-arguments.message:
3827 * test/data/valid-messages/no-padding.message:
3828 * test/data/valid-messages/recursive-types.message:
3829 Add missing NAME fields
3830 Fix up dicts & arrays
3832 * test/data/invalid-messages/dict-with-nil-value.message:
3833 Removed, this is not invalid anymore.
3835 * test/data/valid-messages/recursive-types.message:
3836 Add new test for deeply recursive types.
3838 2003-04-07 Havoc Pennington <hp@pobox.com>
3840 * bus/driver.c (bus_driver_handle_acquire_service): return an
3841 error if you try to acquire a service that starts with ':'
3843 2003-04-07 Havoc Pennington <hp@redhat.com>
3845 * doc/dbus-specification.sgml: require that base service names
3846 start with ':' and that the base service is created/deleted
3847 as first and last things a connection does on the bus
3849 * bus/dispatch.c (check_existent_service_activation): lots more
3850 work on the activation test; it doesn't fully pass yet...
3852 * test/test-service.c (main): fix so we don't memleak the
3853 connection to the message bus
3854 (filter_func): accept a message asking us to exit
3856 2003-04-06 Havoc Pennington <hp@pobox.com>
3858 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3861 * configure.in: fixes to Qt detection from Colin Walters
3863 * doc/Makefile.am: Only remove generated docbook dirs if they
3864 exist, from Colin Walters
3866 * dbus/dbus-bus.c: change how we set well-known connections to
3867 NULL, so that it works if a single connection is stored in
3868 two well-known array slots.
3870 * test/Makefile.am: remove a lot of stuff that isn't immediately
3871 useful, it's in CVS history if we want it.
3873 * test/test-service.c: use dbus-mainloop instead of that
3876 2003-04-06 Havoc Pennington <hp@pobox.com>
3878 * dbus/Makefile.am: split lists of sources into stuff that goes in
3879 the library, util functions that go in the lib and are also used
3880 elsewhere, and util functions that are used in tests/daemon but
3881 don't go in the lib.
3883 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3884 here so it can be used in test binaries also
3886 2003-04-06 Havoc Pennington <hp@pobox.com>
3888 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3889 here in the parent process, so we can return an error if it
3890 fails. Also, move some of the code into the child so the parent
3891 is less hosed if we fail midway through.
3893 * bus/bus.c (bus_context_new): move pidfile detection further up
3894 in the function, before we start overwriting sockets and such.
3896 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3898 * configure.in: add --with-system-pid-file and --with-system-socket
3900 2003-04-06 Colin Walters <walters@verbum.org>
3902 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3904 * bus/system.conf.in: Declare a pidfile.
3906 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3907 create one (if appropriate).
3909 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3910 (struct BusConfigParser) [pidfile]: New.
3911 (element_type_to_name, merge_included, start_busconfig_child)
3912 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3913 (bus_config_parser_unref): Free it.
3914 (bus_config_parser_get_pidfile): New function.
3916 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3918 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3920 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3922 * dbus/dbus-sysdeps.h: Prototype it.
3924 2003-04-06 Havoc Pennington <hp@pobox.com>
3926 * bus/bus.c (bus_context_new): print the address in here, rather
3927 than in main(), because we need to do it before forking the daemon
3929 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3930 on the service nonexistent error
3932 * bus/driver.c (bus_driver_handle_acquire_service): set the
3933 sender on the AcquireService reply
3935 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3936 server also listen on a UNIX socket so services can connect to it.
3938 2003-04-06 Havoc Pennington <hp@pobox.com>
3940 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3941 so it detects deadlocks and also we actually init threads when
3944 2003-04-06 Havoc Pennington <hp@pobox.com>
3946 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3947 save the domain socket name, and unlink it when we disconnect the
3948 server. Means that at least when we exit normally, we won't leave
3949 a bunch of junk in /tmp
3951 * dbus/dbus-transport-unix.c
3952 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3953 memory management). (I was making a real change here but then
3956 2003-04-06 Havoc Pennington <hp@pobox.com>
3958 * bus/bus.c (bus_context_new): fix wrong handling of
3959 server_data_slot_unref() in the error case.
3961 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3962 "(condition) != 0" to _dbus_real_assert so that
3963 "_dbus_assert (pointer)" doesn't cause a warning
3965 * bus/main.c (main): accept --print-address option to print out
3966 the message bus address
3968 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3970 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3971 "tmpdir" option to unix: address on client side
3973 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3976 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3977 we can use to create sockets in the test suite.
3979 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3980 cleanly. To be used for testing.
3982 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3984 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3986 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3987 handle trying to call this when there's no servers active
3989 2003-04-05 Havoc Pennington <hp@pobox.com>
3995 2003-04-05 Havoc Pennington <hp@pobox.com>
3997 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3998 crash on startup. Need to get "try starting the daemon"
3999 in the test suite I guess. ;-)
4001 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4002 tracked the number of open connections; it's better done in
4003 application-specific code as you want it to span all servers etc.
4005 2003-04-05 Havoc Pennington <hp@pobox.com>
4007 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4008 patch from Colin Walters
4010 2003-04-05 Havoc Pennington <hp@pobox.com>
4012 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4013 reality; in fact multiple mechanisms are allowed.
4015 * dbus/dbus-internals.c (_dbus_real_assert)
4016 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4017 _dbus_assert_not_reached() into functions, so that they don't show
4018 up in basic block counts for test coverage, and don't use up as
4019 much disk space. Does mean slower execution speed though, so
4020 assumes --disable-asserts is the normal production case.
4022 2003-04-05 Havoc Pennington <hp@pobox.com>
4024 * test/Makefile.am (dist-hook): also dist *.in files
4030 2003-04-05 Havoc Pennington <hp@pobox.com>
4032 * dbus/dbus-string.c: docs warning
4034 * dbus/dbus-spawn.c: missing docs
4036 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4038 2003-04-05 Havoc Pennington <hp@pobox.com>
4040 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4043 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4044 to -1 once we've reaped the babysitter
4045 (_dbus_babysitter_handle_watch): do as much work as we can, not
4048 * bus/activation.c: add code using DBusBabysitter so that we
4049 handle it when a service fails to start up properly.
4050 (bus_activation_service_created): don't remove the activation
4051 entries as we go, just let them get removed when we free the pending
4052 activation. Unref reply messages after sending them.
4054 2003-04-05 Havoc Pennington <hp@pobox.com>
4056 * test/decode-gcov.c (main): print per-directory stats in the report
4058 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4060 2003-04-05 Havoc Pennington <hp@pobox.com>
4062 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4064 * test/decode-gcov.c: hack up a little program to suck data
4065 out of gcov files. Yes this is sort of silly.
4067 * configure.in: define something in config.h and do an
4068 AM_CONDITIONAL when gcov is enabled
4070 2003-04-04 Havoc Pennington <hp@redhat.com>
4072 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4073 return a "babysitter" object that is used to monitor the status of
4074 the spawned process and reap it when required.
4076 * test/test-segfault.c, test/test-exit.c,
4077 test/test-sleep-forever.c: binaries that do various lame things,
4078 used in the test suite.
4080 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4082 2003-04-03 Havoc Pennington <hp@pobox.com>
4084 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4085 in preparation for modifying it, dbus-sysdeps is getting
4088 2003-04-03 Havoc Pennington <hp@redhat.com>
4090 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4093 * bus/*.[hc]: adapt to mainloop change
4095 2003-04-03 Havoc Pennington <hp@redhat.com>
4097 * bus/activation.c (load_directory): fix up memleaks
4098 (bus_activation_entry_free): free the entry
4100 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4101 we get one from the message bus; fix memleaks.
4103 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4105 2003-04-03 Havoc Pennington <hp@pobox.com>
4107 * bus/config-parser.c (bus_config_parser_unref): free
4108 list of mechanisms, bug discovered by test suite enhancements
4109 (putting system.conf and session.conf into suite)
4111 * test/Makefile.am, test/test-service.c: add placeholder for a
4112 test service that we'll activate as part of test suite. Doesn't
4115 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4116 setting NULL value, and use system malloc not dbus_malloc()
4117 when we have unavoidable memleakage.
4119 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4120 didn't work, and support DBUS_BUS_ACTIVATION.
4122 * bus/activation.c (child_setup): pass our well-known bus type to
4125 * bus/config-parser.c: support <type> to specify well-known type
4127 * doc/dbus-specification.sgml: document the env variables to
4128 locate well-known buses and find service activator
4130 2003-04-02 Havoc Pennington <hp@redhat.com>
4132 * test/Makefile.am (all-local): add a rule to copy tests to
4133 builddir, so we can have generated tests. Use this to remove the
4134 silly hack for testing system.conf and session.conf. Will use this
4135 shortly to generate .service files pointing to test binaries.
4137 2003-04-02 Havoc Pennington <hp@redhat.com>
4139 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4140 current alloc and needed new length, not max of the doubled
4141 allocation and needed new length. Also, when building tests,
4142 don't do the double-allocation stuff, just realloc every time.
4144 2003-04-02 Havoc Pennington <hp@redhat.com>
4146 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4148 (_dbus_string_get_dirname): new
4149 (_dbus_sysdeps_test): new
4150 (_dbus_directory_open): include dirnames in error messages
4152 * bus/config-parser.c: interpret <include> and <includedir> and
4153 <servicedir> relative to config file location if the given
4154 filename is not absolute.
4156 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4158 2003-04-02 Havoc Pennington <hp@redhat.com>
4160 * bus/connection.c (bus_transaction_send_error_reply): set sender
4161 service for the error, and unref the reply on success
4163 * bus/activation.c: convert to use BusTransaction so OOM can be
4165 (bus_activation_service_created): set sender of the message
4167 2003-04-01 Havoc Pennington <hp@redhat.com>
4169 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4170 <includedir> (at least mostly)
4172 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4173 first, then the user ID
4175 2003-04-01 Havoc Pennington <hp@pobox.com>
4177 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4180 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4182 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4184 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4185 socket 0777, and unlink any existing socket.
4187 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4188 the configuration file so specifies; set up auth mechanism
4191 * bus/config-parser.c (bus_config_parser_content): add support
4192 for <fork> option and fill in code for <auth>
4194 * bus/system.conf.in: add <fork/> to default configuration,
4195 and limit auth mechanisms to EXTERNAL
4197 * doc/config-file.txt (Elements): add <fork>
4199 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4200 (_dbus_change_identity): new function
4202 2003-03-31 Havoc Pennington <hp@redhat.com>
4204 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4205 (_dbus_listen_unix_socket): fix off-by-one error in null
4206 termination spotted by Nalin
4208 2003-03-31 Havoc Pennington <hp@redhat.com>
4210 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4211 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4212 having a real home directory available.
4214 2003-03-31 Havoc Pennington <hp@redhat.com>
4216 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4218 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4220 * configure.in: add support for specifying a style of init script
4223 2003-03-31 Havoc Pennington <hp@redhat.com>
4225 Fix some annoying DBusString API and fix all affected code.
4227 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4229 (_dbus_string_get_data): change to return string instead of using
4231 (_dbus_string_get_const_data): ditto
4232 (_dbus_string_get_data_len): ditto
4233 (_dbus_string_get_const_data_len): ditto
4235 2003-03-31 Havoc Pennington <hp@redhat.com>
4237 * bus/main.c (main): fix up the command line arguments to be nicer
4239 2003-03-31 Havoc Pennington <hp@redhat.com>
4241 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4242 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4243 final location that lands in the config file
4245 * bus/config-loader-expat.c (bus_config_load): fix type of
4248 * doc/TODO: remove TODO item for dbus_bus_get()
4250 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4252 2003-03-31 Havoc Pennington <hp@pobox.com>
4254 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4255 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4256 argument since they are always client side
4258 * dbus/dbus-server.c (dbus_server_get_address): new function
4260 * bus/main.c (main): take the configuration file as an argument.
4262 * test/data/valid-config-files/debug-allow-all.conf: new file to
4263 use with dispatch.c tests for example
4265 * bus/test-main.c (main): require test data dir
4267 * bus/bus.c (bus_context_new): change this to take a
4268 configuration file name as argument
4270 * doc/config-file.txt (Elements): add <servicedir>
4272 * bus/system.conf, bus/session.conf: new files
4274 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4275 well-known socket if none set
4277 * configure.in: create system.conf and session.conf
4279 2003-03-30 Havoc Pennington <hp@pobox.com>
4281 * bus/config-parser.c: hacking
4283 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4284 to shut down, since it could cause weirdness with the DBusList
4287 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4288 link-oriented stack routines
4289 (alloc_link): free the mempool if the first alloc from it fails
4291 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4293 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4295 (_dbus_string_skip_white): new
4297 * doc/config-file.txt (Elements): add <includedir>
4299 2003-03-28 Havoc Pennington <hp@pobox.com>
4301 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4302 (_dbus_string_copy_data): new functions
4304 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4306 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4310 * dbus/dbus-memory.c:
4313 2003-03-28 Havoc Pennington <hp@pobox.com>
4315 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4316 I think it may have just been superstition. Not sure.
4318 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4319 failures that were not being handled.
4321 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4323 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4324 row that will fail on out-of-memory.
4326 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4327 function for testing out-of-memory handling.
4329 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4330 allocation functions, they do map exactly to the expat ones.
4332 2003-03-27 Havoc Pennington <hp@redhat.com>
4334 * bus/config-loader-libxml.c (bus_config_load): add another error
4337 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4340 Add note about automatic service activation.
4342 * doc/dbus-specification.sgml:
4343 Rename the specification and clarify a few things.
4345 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4348 * dbus/dbus-address.c:
4350 * dbus/dbus-marshal.c:
4351 * dbus/dbus-server-debug-pipe.c:
4352 * dbus/dbus-transport-unix.c:
4353 Fix documentation warnings.
4355 2003-03-26 Havoc Pennington <hp@pobox.com>
4357 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4358 after every test so it's quick and easy to see which leaked, and
4359 so we test multiple dbus_shutdown() calls
4361 * configure.in: change configure.in XML stuff to also support
4364 * config-loader-libxml.c: some hacking
4366 * config-loader-expat.c: some hacking
4368 * config-parser.c: some hacking, plus tests
4370 2003-03-25 Havoc Pennington <hp@redhat.com>
4372 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4374 * configure.in: add --with-xml option to specify XML library,
4375 right now only libxml is supported.
4377 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4378 nonworking code between home and work, still just stubs
4380 2003-03-24 Havoc Pennington <hp@redhat.com>
4382 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4385 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4386 NULL argument for "message" if the error is a well-known one,
4387 fill in a generic message in this case.
4389 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4392 * bus/test.c (bus_test_flush_bus): add
4394 * bus/policy.c (bus_policy_test): test code stub
4396 2003-03-24 Havoc Pennington <hp@pobox.com>
4398 * bus/connection.c (bus_connections_setup_connection): set up
4399 the "can this user connect" function, but it always returns
4400 TRUE until we have a config file parser so we can have a config
4401 file that allows connections.
4403 2003-03-23 Havoc Pennington <hp@pobox.com>
4405 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4406 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4407 the mutex, so we can check for proper memory management
4410 * dbus/dbus-dataslot.c: remove the mutex from
4411 DBusDataSlotAllocator and lock it manually when using it,
4412 to simplify fitting it into the global slots framework.
4414 * dbus/dbus-threads.c (init_static_locks): rework how we're
4415 handling global locks so they are easily shut down.
4417 * bus/policy.c (bus_policy_append_rule): fix
4419 * bus/test-main.c (main): check for memleaks
4421 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4422 test suite check for memleaks
4424 * dbus/dbus-memory.c: add support in test mode for tracking
4425 number of outstanding blocks
4427 2003-03-23 Havoc Pennington <hp@pobox.com>
4429 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4432 * dbus/dbus-hash.h: add ULONG hash keys
4434 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4435 (_dbus_get_group_id): new function
4437 2003-03-20 Havoc Pennington <hp@redhat.com>
4439 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4441 (dbus_connection_get_unix_user): new function
4443 2003-03-20 Havoc Pennington <hp@pobox.com>
4445 * bus/connection.c (bus_connection_send_oom_error): assert that
4446 message has a sender
4447 (connection_execute_transaction): ditto
4448 (bus_connection_preallocate_oom_error): fix to set the sender, and
4449 set recipient to the destination service, not the bus driver
4451 * bus/policy.c: hacking
4453 * dbus/dbus-message.c (dbus_message_service_is): new function
4454 (dbus_message_sender_is): new
4456 2003-03-19 Havoc Pennington <hp@redhat.com>
4458 * bus/policy.c: start sketching code for policy restrictions on
4459 what connections can do.
4461 2003-03-18 Havoc Pennington <hp@redhat.com>
4463 * doc/TODO: some notes on high-level todo items. Little nitpick
4464 stuff is all in @todo, so no need to add it here.
4466 * doc/config-file.txt: some notes on how config file might look
4468 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4474 2003-03-17 Havoc Pennington <hp@redhat.com>
4476 * dbus/dbus-internals.h: add gcc attributes so that
4477 our printf-style functions warn on bad arguments to
4480 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4483 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4486 2003-03-17 Havoc Pennington <hp@redhat.com>
4488 * bus/test-main.c (main): make it print something as it runs
4489 so make check doesn't look stuck
4491 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4492 from CVS, now obsolete
4494 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4496 * bus/dispatch.c: (bus_dispatch):
4497 Refetch the service name since it may have been reallocated
4498 when dbus_message_set_sender was called.
4500 * dbus/dbus-sysdeps.c: (_dbus_accept):
4501 Add address and address length variables and use them to stop
4502 valgrind from complaining.
4504 2003-03-17 Havoc Pennington <hp@pobox.com>
4506 All tests pass, no memleaks, no valgrind complaints.
4508 * bus/test.c: refcount handler_slot
4510 * bus/connection.c (bus_connections_new): refcount
4511 connection_data_slot
4513 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4514 bytes so that auth scripts pass.
4516 * bus/dispatch.c: init message_handler_slot so it gets allocated
4519 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4521 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4522 dealloc server_pipe_hash when no longer used for benefit of
4525 * dbus/dbus-auth.c (process_command): memleak fix
4527 * bus/dispatch.c (check_hello_message): memleak fix
4529 2003-03-16 Havoc Pennington <hp@pobox.com>
4531 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4533 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4535 * bus/activation.c (bus_activation_activate_service): Append
4536 the pending activation entry to the list of pending activations.
4538 2003-03-16 Havoc Pennington <hp@pobox.com>
4540 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4543 * dbus/dbus-address.c (create_entry): fix OOM handling when
4544 failing to alloc entry->method
4546 2003-03-16 Havoc Pennington <hp@pobox.com>
4548 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4551 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4552 add some missing dbus_set_result
4554 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4555 alloc the DBusMessageHandler
4557 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4558 the transport here, since we call this from the finalizer; it
4559 resulted in a double-finalize.
4561 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4562 where we tried to use transport->connection that was NULL,
4563 happened when transport was disconnected early on due to OOM
4565 * bus/*.c: adapt to handle OOM for watches/timeouts
4567 * dbus/dbus-transport-unix.c: port to handle OOM during
4570 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4571 reference to unused bytes instead of a copy
4573 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4576 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4579 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4582 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4584 * doc/dbus-specification.sgml:
4585 Document reply message for ActivateService.
4587 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4589 * bus/activation.c: (bus_pending_activation_entry_free),
4590 (bus_pending_activation_free), (bus_activation_new),
4591 (bus_activation_unref), (bus_activation_service_created),
4592 (bus_activation_activate_service):
4594 * bus/bus.c: (bus_context_new):
4595 * bus/desktop-file.c: (new_section):
4596 * bus/driver.c: (bus_driver_send_service_deleted),
4597 (bus_driver_handle_activate_service):
4598 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4600 * dbus/dbus-connection.c:
4601 (dbus_connection_send_with_reply_and_block):
4602 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4603 * dbus/dbus-protocol.h:
4604 Make activation work better. Now pending activations will be queued
4605 and the daemon won't try to activate services that are already registered.
4607 2003-03-16 Havoc Pennington <hp@pobox.com>
4609 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4612 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4613 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4615 2003-03-16 Havoc Pennington <hp@pobox.com>
4617 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4618 this. always run the test suite before commit...
4620 * bus/*: adapt to DBusConnection API changes
4622 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4623 requires renaming stuff to avoid dbus_connection_dispatch name
4626 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4629 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4630 separate from _dbus_message_loader_return_buffer()
4632 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4633 this, because it's now always broken to use; the number of
4634 messages in queue vs. the number still buffered by the message
4635 loader is undefined/meaningless. Should use
4636 dbus_connection_get_dispatch_state().
4637 (dbus_connection_dispatch): rename from
4638 dbus_connection_dispatch_message
4640 2003-03-16 Havoc Pennington <hp@pobox.com>
4642 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4645 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4647 * dbus/dbus-connection.c:
4648 (dbus_connection_send_with_reply_and_block):
4649 Decrease connection->n_incoming when removing an entry
4651 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4652 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4653 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4654 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4655 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4656 (dbus_dict_get_byte_array):
4657 Handle NULL arrays and strings. Also add support for byte arrays.
4659 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4660 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4661 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4662 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4663 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4664 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4665 * dbus/dbus-marshal.h:
4666 Add support for marshalling and demarshalling empty arrays and strings.
4668 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4669 (dbus_message_append_string_array),
4670 (dbus_message_iter_get_boolean),
4671 (dbus_message_iter_get_boolean_array),
4672 (dbus_message_iter_get_int32_array),
4673 (dbus_message_iter_get_uint32_array),
4674 (dbus_message_iter_get_double_array),
4675 (dbus_message_iter_get_byte_array),
4676 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4677 (check_message_handling):
4678 Add support for getting empty arrays and dicts.
4680 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4681 Don't do any validation at all for now, that's better than just checking
4684 * test/data/valid-messages/emptiness.message:
4685 New test message with lots of empty arrays.
4687 2003-03-16 Havoc Pennington <hp@pobox.com>
4689 * dbus/dbus-connection.c
4690 (_dbus_connection_queue_received_message_link): new function that
4691 can't fail due to OOM
4693 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4694 new function pops a message together with a list link
4697 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4698 message queuing functions to avoid needing to alloc memory
4700 2003-03-16 Havoc Pennington <hp@pobox.com>
4702 Oops - test code was only testing failure of around 30 of the
4703 mallocs in the test path, but it turns out there are 500+
4704 mallocs. I believe this was due to misguided linking setup such
4705 that there was one copy of dbus_malloc etc. in the daemon and one
4706 in the shared lib, and only daemon mallocs were tested. In any
4707 case, the test case now tests all 500+ mallocs, and doesn't pass
4708 yet, though there are lots of fixes in this patch.
4710 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4711 this so that it doesn't need to allocate memory, since it
4712 has no way of indicating failure due to OOM (and would be
4713 annoying if it did).
4715 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4717 * bus/Makefile.am: rearrange to create two self-contained
4718 libraries, to avoid having libraries with overlapping symbols.
4719 that was resulting in weirdness, e.g. I'm pretty sure there
4720 were two copies of global static variables.
4722 * dbus/dbus-internals.c: move the malloc debug stuff to
4725 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4728 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4730 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4733 * bus/dispatch.c (bus_dispatch_add_connection): free
4734 message_handler_slot when no longer using it, so
4735 memory leak checkers are happy for the test suite.
4737 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4739 * bus/bus.c (new_connection_callback): disconnect in here if
4740 bus_connections_setup_connection fails.
4742 * bus/connection.c (bus_connections_unref): fix to free the
4744 (bus_connections_setup_connection): if this fails, don't
4745 disconnect the connection, just be sure there are no side
4748 * dbus/dbus-string.c (undo_alignment): unbreak this
4750 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4752 (_dbus_auth_new): fix the order in which we free strings
4755 * bus/connection.c (bus_connection_disconnected): fix to
4756 not send ServiceDeleted multiple times in case of memory
4759 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4760 get the base service name
4761 (dbus_bus_register_client): don't return base service name,
4762 instead store it on the DBusConnection and have an accessor
4764 (dbus_bus_register_client): rename dbus_bus_register()
4766 * bus/dispatch.c (check_hello_message): verify that other
4767 connections on the bus also got the correct results, not
4768 just the one sending hello
4770 2003-03-15 Havoc Pennington <hp@pobox.com>
4772 Make it pass the Hello handling test including all OOM codepaths.
4773 Now to do other messages...
4775 * bus/services.c (bus_service_remove_owner): fix crash when
4776 removing owner from an empty list of owners
4777 (bus_registry_ensure): don't leave service in the list of
4778 a connection's owned services if we fail to put the service
4781 * bus/connection.c (bus_connection_preallocate_oom_error): set
4782 error flag on the OOM error.
4784 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4785 handle _dbus_transport_set_connection failure
4787 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4788 to create watches up front and simply enable/disable them as
4790 (unix_connection_set): this can now fail on OOM
4792 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4793 of enabling/disabling a watch or timeout.
4795 * bus/loop.c (bus_loop_iterate): don't touch disabled
4798 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4800 2003-03-15 Havoc Pennington <hp@pobox.com>
4802 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4803 write useful test code, after all that futzing around ;-)
4805 Test does not yet pass because we can't handle OOM in
4806 _dbus_transport_messages_pending (basically,
4807 dbus_connection_preallocate_send() does not prealloc the write
4808 watch). To fix this, I think we need to add new stuff to
4809 set_watch_functions, namely a SetEnabled function so we can alloc
4810 the watch earlier, then enable it later.
4812 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4813 dbus-memory.c to the convenience lib
4815 * bus/test.c: rename some static functions to keep them clearly
4816 distinct from stuff in connection.c. Handle client disconnection.
4818 2003-03-14 Havoc Pennington <hp@pobox.com>
4820 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4821 transport, tests more of the real codepath. Set up clients
4822 with bus_setup_debug_client.
4824 * bus/test.c (bus_setup_debug_client): function to set up debug
4825 "clients" on the main loop
4827 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4830 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4833 * dbus/dbus-server-debug.c: support a debug server based on pipes
4835 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4836 (_dbus_close): new function
4838 * configure.in: check for socketpair
4840 2003-03-14 Havoc Pennington <hp@redhat.com>
4842 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4845 * dbus/dbus-transport-debug.c: rework this a good bit to be
4846 less complicated. hopefully still works.
4848 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4851 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4854 * dbus/dbus-message.c (dbus_message_copy): rename from
4855 dbus_message_new_from_message, fix it up to copy
4856 all the message fields, add test case
4858 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4859 not quite passing yet
4861 2003-03-14 Havoc Pennington <hp@pobox.com>
4863 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4864 until no work remains" in test code. (the large diff here
4865 is just code movement, no actual changes)
4867 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4868 1, no point waiting around for test code.
4869 (_dbus_server_debug_accept_transport): unref the timeout
4870 after adding it (right?)
4872 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4874 2003-03-13 Havoc Pennington <hp@redhat.com>
4876 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4879 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4882 * dbus/dbus-connection.h: Make AddWatchFunction and
4883 AddTimeoutFunction return a bool so they can fail on out-of-memory
4885 * bus/bus.c (bus_context_new): set up timeout handlers
4887 * bus/connection.c (bus_connections_setup_connection): set up
4890 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4893 * bus/bus.c (bus_context_new): adapt to changes
4895 * bus/connection.c: adapt to changes
4897 * test/watch.c: adapt to DBusWatch changes
4899 * bus/dispatch.c (bus_dispatch_test): started adding this but
4902 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4904 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4906 2003-03-13 Havoc Pennington <hp@pobox.com>
4908 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4909 set up a test framework as for the library
4911 2003-03-12 Havoc Pennington <hp@pobox.com>
4913 Throughout: purge global variables, introduce BusActivation,
4914 BusConnections, BusRegistry, etc. objects instead.
4916 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4919 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4920 going to redo this a bit differently I think
4922 2003-03-12 Havoc Pennington <hp@redhat.com>
4924 Mega-patch that gets the message bus daemon initially handling
4925 out-of-memory. Work still needed. Also lots of random
4926 moving stuff to DBusError instead of ResultCode.
4928 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4930 * dbus/dbus-connection.c
4931 (dbus_connection_send_with_reply_and_block): use DBusError
4933 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4936 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4937 code here, as the only failure possible is OOM.
4939 * bus/connection.c (bus_connection_disconnect):
4940 rename bus_connection_disconnected as it's a notification only
4942 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4943 "name" on get_args failure, should be done by get_args;
4944 don't disconnect client for bad args, just return an error.
4945 (bus_driver_handle_service_exists): ditto
4947 * bus/services.c (bus_services_list): NULL-terminate returned array
4949 * bus/driver.c (bus_driver_send_service_lost)
4950 (bus_driver_send_service_acquired): send messages from driver to a
4951 specific client to the client's unique name, not to the broadcast
4954 * dbus/dbus-message.c (decode_header_data): reject messages that
4955 contain no name field
4956 (_dbus_message_get_client_serial): rename to
4957 dbus_message_get_serial and make public
4958 (_dbus_message_set_serial): rename from set_client_serial
4959 (_dbus_message_set_reply_serial): make public
4960 (_dbus_message_get_reply_serial): make public
4962 * bus/connection.c (bus_connection_foreach): allow stopping
4963 iteration by returning FALSE from foreach function.
4965 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4966 (dbus_connection_free_preallocated_send)
4967 (dbus_connection_preallocate_send): new API for sending a message
4968 without possibility of malloc failure.
4969 (dbus_connection_send_message): rename to just
4970 dbus_connection_send (and same for whole function family)
4972 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4974 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4976 * bus/activation.c: handle/return errors
4978 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4980 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4981 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4982 (_dbus_result_from_errno): move to this file
4984 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4986 * dbus/dbus-marshal.c:
4987 (_dbus_marshal_set_string):
4988 Take a length argument so we can marshal the correct string
4991 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4992 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4993 (_dbus_marshal_test):
4994 * dbus/dbus-marshal.h:
4995 Add support for marshalling and demarshalling dicts.
4997 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4998 Add support for TYPE DICT.
5000 * dbus/dbus-message.c: (set_string_field):
5001 Adjust header padding.
5003 (dbus_message_append_args_valist), (dbus_message_append_dict),
5004 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5005 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5006 (check_message_handling), (check_have_valid_message):
5007 * dbus/dbus-message.h:
5008 Add functions for setting and getting dicts.
5010 * dbus/dbus-protocol.h:
5016 * doc/dbus-specification.sgml:
5017 Add information about how dicts are marshalled.
5019 * test/data/invalid-messages/dict-with-nil-value.message:
5020 * test/data/invalid-messages/too-short-dict.message:
5021 * test/data/valid-messages/dict-simple.message:
5022 * test/data/valid-messages/dict.message:
5023 Add sample messages containing dicts.
5025 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5027 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5029 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5032 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5033 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5034 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5035 (dbus_dict_set_double), (dbus_dict_set_string),
5036 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5037 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5038 (dbus_dict_set_string_array), (_dbus_dict_test):
5040 Fix according to comments from Havoc.
5042 2003-03-06 Michael Meeks <michael@server.home>
5044 * configure.in: if we don't have kde-config, disable have_qt.
5046 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5051 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5052 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5053 (dbus_dict_remove), (dbus_dict_get_value_type),
5054 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5055 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5056 (dbus_dict_put_double), (dbus_dict_put_string),
5057 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5058 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5059 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5060 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5061 (dbus_dict_get_double), (dbus_dict_get_string),
5062 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5063 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5064 (dbus_dict_get_string_array), (_dbus_dict_test):
5066 Add DBusDict implementation
5068 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5072 2003-03-04 Havoc Pennington <hp@pobox.com>
5074 * test/data/auth/*: adapt to changes
5076 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5077 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5080 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5081 more stuff from being in a context name, to make the protocol
5082 simpler to deal with
5084 * dbus/dbus-errors.c (dbus_error_has_name): new function
5085 (dbus_error_is_set): new function
5087 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5088 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5090 * dbus/dbus-connection.c (dbus_connection_flush): also read
5091 messages during a flush operation
5093 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5095 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5097 * configure.in: Check for gethostbyname on Solaris.
5099 * dbus/dbus-transport.c: (_dbus_transport_open):
5100 Remove duplicate "tcp" entry.
5102 * doc/dbus-specification.sgml:
5103 Clarify some things.
5105 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5107 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5108 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5109 (_dbus_keyring_test):
5110 * dbus/dbus-md5.c: (_dbus_md5_compute):
5111 * dbus/dbus-sha.c: (_dbus_sha_compute):
5114 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5116 * README: Add some things.
5118 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5120 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5121 after case DBUS_TYPE_BOOELAN.
5123 2003-03-02 Havoc Pennington <hp@pobox.com>
5125 * test/break-loader.c (randomly_set_extreme_ints): add test that
5126 sets really huge and small integers
5128 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5129 that length of boolean array fits in the string, and that
5130 string has room for boolean value in single-bool case.
5132 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5133 optional value to "ALIGN" command which is what to fill the
5136 * test/data/valid-messages/no-padding.message: add regression
5137 test for the message padding problem
5139 2003-03-02 Havoc Pennington <hp@pobox.com>
5141 * dbus/dbus-message.c (decode_header_data): fix to always init
5142 message_padding, from Benjamin Dauvergne
5144 2003-03-02 Havoc Pennington <hp@pobox.com>
5150 2003-03-01 Joe Shaw <joe@assbarn.com>
5152 * configure.in: Check for "struct cmsgcred" and try to access its
5153 members for BSD-like unices.
5155 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5156 _dbus_read_credentials_unix_socket().
5157 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5158 read() for reading the credential byte off the unix socket. Use
5159 struct cmsgcred on systems that support it.
5161 2003-02-27 Alexander Larsson <alexl@redhat.com>
5165 Make gthreads-2.0 dependency optional. Don't build thread test if
5168 2003-02-27 Havoc Pennington <hp@pobox.com>
5170 * dbus/dbus-connection.c
5171 (dbus_connection_send_message_with_reply_and_block): fix doh!
5172 doh! doh! bug that resulted in never removing a reply from the
5173 queue, no wonder we called get_reply_serial so much ;-)
5175 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5176 and client serial instead of demarshaling them every time
5178 2003-02-27 Havoc Pennington <hp@pobox.com>
5180 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5181 more inlined, using dbus-string-private.h, speeds things up
5184 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5185 when freeing the string
5186 (_dbus_string_steal_data): fix for align offset
5187 (undo_alignment): new function
5189 2003-02-26 Havoc Pennington <hp@redhat.com>
5191 All kinds of audit fixes from Owen, plus initial attempt to
5192 handle unaligned memory returned from malloc.
5194 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5195 leave room for align_offset and nul byte
5196 (fixup_alignment): function to track an align_offset and
5197 ensure real->str is aligned
5198 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5199 to allow a nul byte plus align offset
5200 (_dbus_string_lock): fix overflow issue
5201 (_dbus_string_init_const_len): add assertions on sanity of len,
5202 assign allocated to be ALLOCATION_PADDING larger than len
5203 (set_length): fixup the overflow handling
5204 (_dbus_string_get_data_len): fix overflow in assertion
5205 (open_gap): detect overflow in size of gap to be opened
5206 (_dbus_string_lengthen): add overflow check
5207 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5208 (_dbus_string_append): add overflow check
5209 (_dbus_string_append_unichar): overflow
5210 (_dbus_string_delete): fix overflow in assertion
5211 (_dbus_string_copy_len): overflow in assertion
5212 (_dbus_string_replace_len): overflows in assertions
5213 (_dbus_string_find): change to implement in terms of
5214 _dbus_string_find_to
5215 (_dbus_string_find_to): assorted fixage
5216 (_dbus_string_equal_c_str): assert c_str != NULL,
5217 fix logic so the function works
5218 (_dbus_string_ends_with_c_str): fix overflow thingy
5219 (_dbus_string_base64_encode): overflow fix
5220 (_dbus_string_validate_ascii): overflow
5221 (_dbus_string_validate_nul): overflow
5223 2003-02-26 Havoc Pennington <hp@redhat.com>
5225 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5227 2003-02-26 Alexander Larsson <alexl@redhat.com>
5230 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5232 * dbus/dbus-connection.c:
5233 * dbus/dbus-connection.h:
5234 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5235 Add dbus_connection_set_wakeup_main_function and use it when queueing
5236 incoming and outgoing messages.
5239 * dbus/dbus-dataslot.c:
5240 Threadsafe usage of DBusDataSlotAllocator
5242 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5245 * dbus/dbus-server-unix.c:
5248 * glib/dbus-gmain.c:
5249 Implement the new wakeup functions for glib.
5252 * glib/test-thread-client.c:
5253 * glib/test-thread-server.c:
5254 * glib/test-thread.h:
5255 Initial cut at some thread test code. Not really done yet.
5257 2003-02-26 Havoc Pennington <hp@pobox.com>
5259 * dbus/dbus-connection.c
5260 (dbus_connection_send_message_with_reply_and_block): fix crash
5261 where we ref'd the outgoing message instead of the returned reply
5263 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5264 at the end of this function, so if we didn't need to read for
5265 authentication, we reinstall it for receiving messages
5267 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5268 a NULL sender for peer-to-peer case
5270 * dbus/dbus-transport-unix.c (check_read_watch): handle
5271 !authenticated case correctly
5273 * glib/dbus-gmain.c: add support for DBusServer
5275 * dbus/dbus-server.c: add data slot support
5277 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5278 return values and handle errors
5280 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5283 * Doxyfile.in (INPUT): add glib subdir
5285 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5286 setup_with_g_main instead of hookup_with_g_main; write docs
5288 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5290 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5291 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5292 * dbus/dbus-message.c: (dbus_message_append_boolean),
5293 (dbus_message_append_boolean_array),
5294 (dbus_message_get_args_valist), (_dbus_message_test):
5295 * dbus/dbus-message.h:
5296 * doc/dbus-specification.sgml:
5297 Various fixes as pointed out by Havoc.
5299 * test/data/invalid-messages/bad-boolean-array.message:
5300 * test/data/invalid-messages/bad-boolean.message:
5301 Add invalid boolean value test cases.
5303 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5305 * dbus/dbus-internals.c: (_dbus_type_to_string):
5306 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5307 (_dbus_marshal_validate_arg):
5308 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5309 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5310 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5311 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5312 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5313 (dbus_message_iter_get_double),
5314 (dbus_message_iter_get_boolean_array), (message_iter_test):
5315 * dbus/dbus-message.h:
5316 * dbus/dbus-protocol.h:
5317 * doc/dbus-specification.sgml:
5318 * test/data/valid-messages/lots-of-arguments.message:
5319 Add support for boolean and boolean array types.
5321 2003-02-23 Havoc Pennington <hp@pobox.com>
5323 * dbus/dbus-keyring.c: finish most of this implementation and
5326 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5327 these barf if the error isn't cleared to NULL
5329 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5330 (_dbus_create_directory): new function
5332 * dbus/dbus-errors.c (dbus_set_error): fix warning
5334 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5335 (_dbus_string_hex_decode): new function
5336 (test_hex_roundtrip): test code
5338 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5340 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5342 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5343 the save-to-temp/rename trick to atomically write the new file
5344 (_dbus_string_parse_uint): new function
5346 2003-02-22 Havoc Pennington <hp@pobox.com>
5348 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5350 2003-02-22 Havoc Pennington <hp@pobox.com>
5352 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5353 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5355 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5357 * dbus/test/data/sha-1: add US government test suite for SHA-1
5359 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5361 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5362 Make string arrays NULL-terminated.
5364 * dbus/dbus-memory.c: (dbus_free_string_array):
5365 * dbus/dbus-memory.h:
5366 New function for freeing NULL-terminated string arrays.
5368 * dbus/dbus-message-builder.c: (append_quoted_string),
5369 (_dbus_message_data_load):
5370 Add support for array types.
5372 * dbus/dbus-message.c: (check_message_handling):
5373 Add more types as test cases.
5375 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5376 (_dbus_string_parse_double):
5377 Add the start offset to the end offset.
5379 * test/data/valid-messages/lots-of-arguments.message:
5380 New test message with lots of arguments.
5382 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5384 * dbus/dbus-message.c: (dbus_message_append_nil),
5385 (dbus_message_append_int32), (dbus_message_append_uint32),
5386 (dbus_message_append_double), (dbus_message_append_string),
5387 (dbus_message_append_int32_array),
5388 (dbus_message_append_uint32_array),
5389 (dbus_message_append_double_array),
5390 (dbus_message_append_byte_array),
5391 (dbus_message_append_string_array):
5392 Fix all out-of-memory handling in these functions.
5394 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5396 * dbus/dbus-message.c: (dbus_message_append_nil):
5399 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5401 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5402 (dbus_message_append_nil), (dbus_message_append_int32_array),
5403 (dbus_message_append_uint32_array),
5404 (dbus_message_append_double_array),
5405 (dbus_message_append_byte_array),
5406 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5407 (dbus_message_iter_get_int32_array),
5408 (dbus_message_iter_get_uint32_array),
5409 (dbus_message_iter_get_double_array),
5410 (dbus_message_iter_get_byte_array),
5411 (dbus_message_iter_get_string_array):
5413 * dbus/dbus-message.h:
5414 Add functions for appending and getting arrays.
5416 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5418 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5419 element size at least 8 bytes, fixes mempool tests on
5422 2003-02-20 Alexander Larsson <alexl@redhat.com>
5424 * dbus/dbus-transport-unix.c (unix_do_iteration):
5425 Unlock the connection mutex during a blocking select call.
5426 Add todo about how we need a way to wake up the select.
5428 * dbus/dbus-connection-internal.h:
5429 * dbus/dbus-connection.c:
5430 Add _dbus_connection_lock and _dbus_connection_unlock.
5432 2003-02-19 Havoc Pennington <hp@pobox.com>
5434 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5435 Doxyfile.in, not Doxyfile
5437 * dbus/dbus-keyring.c: do some hacking on this
5439 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5441 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5443 (dbus_set_error): remove dbus_error_init, check for message ==
5444 NULL *before* we sprintf into it, and add @todo about including
5445 system headers in this file
5447 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5449 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5451 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5452 get various bits of user information based on either username
5454 (_dbus_homedir_from_username): new function
5456 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5459 Add check for nonposix getpwnam_r
5461 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5462 Align the pool element size to a sizeof (void *) boundary.
5464 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5465 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5466 General Solaris fixes.
5468 * test/data/valid-messages/simplest-manual.message:
5469 Explicitly state that we want little-endian packing.
5471 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5473 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5475 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5476 Added to create a transport connecting using a tcp/ip socket.
5478 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5479 to a tcp socket at given host and port.
5480 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5483 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5485 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5486 Added to create a server listening on a TCP/IP socket.
5488 2003-02-19 Havoc Pennington <hp@pobox.com>
5490 Throughout: mop up all the Doxygen warnings and undocumented
5493 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5494 to search any paths.
5496 * dbus/dbus-threads.c: move global mutex initializers to
5497 dbus-internals.h, multiple prototypes was confusing doxygen
5498 besides being kind of ugly
5500 * Doxyfile (PREDEFINED): have Doxygen define
5501 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5502 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5503 (do not abuse the feature! it's for stuff like the autogenerated
5504 macros in dbus-md5.c, not just for things you don't feel like
5507 2003-02-18 Havoc Pennington <hp@pobox.com>
5509 * dbus/dbus-string.c (_dbus_string_zero): new function
5511 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5512 wrap it in some dbus-friendly API
5514 * dbus/dbus-types.h: add 16-bit types
5516 2003-02-18 Joe Shaw <joe@assbarn.com>
5518 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5519 credentials from our currently running process.
5520 (get_word): Fix a buglet where we were copying the entire length
5521 instead of relative to our position.
5523 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5524 keys on the stack... it's 640k of data.
5526 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5527 read the credentials byte off the socket, even if we don't have
5529 (_dbus_poll): Implement poll() using select() for systems which
5532 * glib/test-dbus-glib.c (main): Print out an error if no
5533 parameters are given.
5535 * test/data/auth/fallback.auth-script: Added. Tests that a client
5536 can fallback to a secondary auth mechanism if the first fails.
5538 2003-02-18 Havoc Pennington <hp@pobox.com>
5542 2003-02-17 Havoc Pennington <hp@pobox.com>
5544 * doc/dbus-specification.sgml: lots of cosmetic
5545 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5546 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5547 s/server/bus/ (except in authentication section). Add a section
5548 "Message Bus Message Routing"
5550 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5556 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5558 * doc/dbus-specification.sgml:
5559 Specification updates.
5561 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5563 * bus/activation.c: (bus_activation_init), (child_setup),
5564 (bus_activation_activate_service):
5566 * bus/main.c: (main):
5567 Set DBUS_ADDRESS environment variable.
5569 * dbus/dbus-errors.c: (dbus_set_error):
5570 Don't use va_copy since that's a C99 feature.
5572 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5573 (_dbus_spawn_async):
5574 * dbus/dbus-sysdeps.h:
5575 Add child_setup_func to _dbus_spawn_async.
5577 * doc/dbus-specification.sgml:
5578 Update specification.
5580 * test/spawn-test.c: (setup_func), (main):
5583 2003-02-17 Alexander Larsson <alexl@redhat.com>
5585 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5588 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5592 * doc/dbus-test-plan.sgml:
5593 Add test plan document.
5598 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5600 * dbus/dbus-message.c: (decode_header_data),
5601 (_dbus_message_loader_return_buffer):
5602 Set the header padding amount when loading a message.
5604 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5606 * bus/dispatch.c: (send_one_message):
5607 Only send broadcast messages to registered connections.
5609 * dbus/dbus-message.c: (dbus_message_name_is):
5610 * dbus/dbus-message.h:
5611 New convenience function.
5613 * dbus/dbus-transport-debug.c: (do_reading):
5614 Only dispatch one message per run.
5617 * test/bus-test.c: (new_connection_callback), (die),
5618 (test_hello_client1_handler), (test_hello_client2_handler),
5619 (test_hello_replies), (main):
5621 * test/bus-test-loop.[ch]:
5624 2003-02-16 Havoc Pennington <hp@pobox.com>
5626 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5627 backward conditional
5629 2003-02-16 Alexander Larsson <alexl@redhat.com>
5631 * dbus/dbus-connection.c:
5632 Implement sent_message_with_reply. (with_reply_and block is still
5634 Made dispatch_message not lose message if OOM.
5636 * dbus/dbus-errors.h:
5637 Add NoReply error (for reply timeouts).
5639 2003-02-16 Alexander Larsson <alexl@redhat.com>
5641 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5642 Actually free keys and values when destroying hashtable.
5644 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5646 * dbus/dbus-auth.c: (client_try_next_mechanism):
5649 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5650 Return TRUE if there's no thread implementation around.
5652 * glib/dbus-gmain.c: (free_source),
5653 (dbus_connection_hookup_with_g_main):
5654 Make sure to remove the GSource when the connection is finalized.
5656 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5658 * bus/dispatch.c: (bus_dispatch_message_handler):
5659 * dbus/dbus-errors.h:
5660 Return an error if someone tries to send a message to a service
5663 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5665 * bus/activation.c: (load_directory), (bus_activation_init),
5666 (bus_activation_activate_service):
5669 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5670 More work on the activation handling.
5672 * dbus/dbus-errors.h:
5673 Add some error messages
5675 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5676 * dbus/dbus-message.h:
5677 New function that creates an error message.
5679 * dbus/dbus-protocol.h:
5680 Add ACTIVATE_SERVER message.
5682 * dbus/dbus-server-unix.c: (unix_handle_watch),
5683 (_dbus_server_new_for_domain_socket):
5684 Call _dbus_fd_set_close_on_exec.
5686 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5687 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5688 (_dbus_fd_set_close_on_exec):
5689 * dbus/dbus-sysdeps.h:
5690 Add _dbus_fd_set_close_on exec function. Also add function that checks
5691 that all open fds are set to close-on-exec and warns otherwise.
5693 * dbus/dbus-transport-unix.c:
5694 (_dbus_transport_new_for_domain_socket):
5695 Call _dbus_fd_set_close_on_exec.
5697 2003-02-16 Havoc Pennington <hp@pobox.com>
5699 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5700 allow people to avoid setting SIGPIPE to SIG_IGN
5701 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5702 we've been asked not to
5704 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5706 * dbus/dbus-list.c: (_dbus_list_append_link),
5707 (_dbus_list_prepend_link):
5708 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5712 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5715 * bus/activation.c: (bus_activation_entry_free),
5716 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5718 * bus/main.c: (main):
5719 Add simple activation support, doesn't work yet though.
5721 2003-02-15 Zack Rusin <zack@kde.org>
5723 * qt/dbus-qthread.cpp: small casting fix
5725 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5727 * dbus/dbus-errors.c: (dbus_set_error):
5728 * dbus/dbus-errors.h:
5729 Add a few errors and make dbus_set_error void.
5731 * dbus/dbus-sysdeps.c:
5732 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5733 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5734 * dbus/dbus-sysdeps.h:
5735 Add _dbus_spawn_async.
5737 * test/spawn-test.c: (main):
5738 Test for _dbus_spawn_async.
5740 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5742 * dbus/dbus-internals.h:
5743 Fix build without tests.
5745 * dbus/dbus-list.c: (alloc_link):
5746 Fix a segfault when a malloc fails.
5748 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5749 (dbus_malloc0), (dbus_realloc):
5750 Add support for malloc debugging.
5752 2003-02-15 Alexander Larsson <alexl@redhat.com>
5754 * dbus/dbus-threads.c:
5755 * dbus/dbus-threads.h:
5756 Add condvars. Remove static mutext from API.
5757 Implement static mutexes by initializing them from threads_init.
5759 * glib/dbus-gthread.c:
5760 * qt/dbus-qthread.cpp:
5761 Update with the thread api changes.
5766 Turn StaticMutex into normal mutex + init function.
5767 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5768 _dbus_list_append_link, _dbus_list_prepend_link
5771 * dbus/dbus-sysdeps.c:
5772 * dbus/dbus-sysdeps.h:
5773 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5774 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5776 * dbus/dbus-protocol.h:
5777 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5779 * dbus/dbus-message.c:
5780 Make ref/unref atomic.
5783 * dbus/dbus-connection-internal.h:
5784 * dbus/dbus-connection.c:
5785 * dbus/dbus-connection.h:
5787 Change _peek to _borrow,_return & _steal_borrowed.
5788 Change disconnect callback to event.
5789 Make dbus_connection_dispatch_messages reentrant.
5791 * dbus/dbus-transport.c:
5792 Don't ref the connection on calls to the transport
5795 * dbus/dbus-message-handler.c:
5798 * glib/dbus-gmain.c:
5799 Don't use peek_message anymore
5802 * test/debug-thread.c:
5803 * test/debug-thread.h:
5804 Simple thread implementation that asserts() on deadlocks in
5805 single-threaded code.
5808 (main) Call debug_threads_init.
5811 Use disconnect message instead of disconnect callback.
5815 Don't call dbus_connection_set_disconnect_function. Instead export
5816 bus_connection_disconnect.
5819 Call bus_connection_disconnect when we get a disconnected message.
5821 2003-02-15 Havoc Pennington <hp@pobox.com>
5823 * dbus/dbus-message.c (dbus_message_new): fool around with the
5826 2003-02-14 Havoc Pennington <hp@pobox.com>
5828 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5830 * dbus/dbus-memory.c: fail if the debug functions indicate we
5833 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5834 (_dbus_decrement_fail_alloc_counter): debug functions to
5835 simulate memory allocation failures
5837 2003-02-14 Havoc Pennington <hp@pobox.com>
5839 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5842 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5844 * bus/driver.c: (bus_driver_handle_hello):
5846 * bus/services.c: (bus_service_lookup):
5847 Reorder message sending so we get a more sane order.
5849 * test/bus-test.c: (message_handler):
5852 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5854 * bus/driver.c: (bus_driver_send_service_deleted),
5855 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5856 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5857 (bus_driver_send_welcome_message),
5858 (bus_driver_handle_list_services),
5859 (bus_driver_handle_acquire_service),
5860 (bus_driver_handle_service_exists):
5861 * dbus/dbus-bus.c: (dbus_bus_register_client),
5862 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5863 * dbus/dbus-errors.c: (dbus_result_to_string):
5864 * dbus/dbus-errors.h:
5865 * dbus/dbus-message.c: (dbus_message_append_args),
5866 (dbus_message_append_args_valist), (dbus_message_get_args),
5867 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5868 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5869 (dbus_message_iter_get_byte_array),
5870 (dbus_message_iter_get_string_array), (message_iter_test),
5871 (check_message_handling), (_dbus_message_test):
5872 * dbus/dbus-message.h:
5873 * test/bus-test.c: (main):
5874 Change fields to arguments in messages, so that they won't be
5875 confused with header fields.
5877 * glib/test-dbus-glib.c: (main):
5878 Remove append_fields from hello message.
5880 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5882 * dbus/dbus-errors.c:
5883 * dbus/dbus-message.c:
5884 * dbus/dbus-string.c:
5885 Documentation fixes.
5887 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5889 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5891 Implement support for timeouts in dbus-glib.
5893 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5895 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5896 * dbus/dbus-message.c: (process_test_subdir):
5897 * test/break-loader.c: (find_breaks_based_on):
5898 Plug some memory leaks.
5900 2003-02-13 Richard Hult <rhult@codefactory.se>
5902 * bus/main.c: Fix build.
5904 * dbus/dbus-errors.h:
5905 * dbus/dbus-errors.c: Fix copyright for Anders.
5907 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5912 * bus/connection.c: (bus_connection_foreach):
5915 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5916 (unescape_string), (new_section), (parse_section_start),
5917 (parse_key_value), (report_error), (bus_desktop_file_load),
5918 (bus_desktop_file_get_string):
5919 * bus/desktop-file.h:
5920 Use DBusError for error reporting.
5922 * bus/dispatch.c: (send_one_message),
5923 (bus_dispatch_message_handler):
5924 * bus/driver.c: (bus_driver_send_service_deleted),
5925 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5926 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5927 (bus_driver_send_welcome_message),
5928 (bus_driver_handle_list_services),
5929 (bus_driver_handle_acquire_service),
5930 (bus_driver_handle_service_exists):
5931 * bus/loop.c: (bus_loop_run):
5933 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5935 * bus/utils.c: (bus_wait_for_memory):
5937 New files with general utility functions.
5939 * dbus/dbus-internals.h:
5940 Remove _DBUS_HANDLE_OOM.
5942 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5944 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5945 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5946 * dbus/dbus-errors.h:
5947 Add DBusError structure.
5949 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5951 * test/data/valid-messages/standard-acquire-service.message:
5952 * test/data/valid-messages/standard-hello.message:
5953 * test/data/valid-messages/standard-list-services.message:
5954 * test/data/valid-messages/standard-service-exists.message:
5955 Add some standard messages.
5957 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5959 * bus/driver.c: (bus_driver_send_welcome_message),
5960 (bus_driver_handle_list_services),
5961 (bus_driver_handle_acquire_service),
5962 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5963 Update for API changes in libdbus.
5965 * dbus/dbus-message.c: (dbus_message_new_reply):
5966 * dbus/dbus-message.h:
5967 Remove the name argument. The spec states that replies shouldn't
5970 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5972 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5973 (report_error), (bus_desktop_file_load), (lookup_section),
5974 (lookup_line), (bus_desktop_file_get_raw),
5975 (bus_desktop_file_get_string):
5976 * bus/desktop-file.h:
5977 Some fixes, and new functions for getting a key value from a section.
5979 2003-02-13 Havoc Pennington <hp@pobox.com>
5981 * test/data/auth/fail-after-n-attempts.auth-script: new test
5983 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5986 2003-02-13 Havoc Pennington <hp@pobox.com>
5988 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5989 dbus_credentials_match were backward
5991 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5992 NO_CREDENTIALS and ROOT_CREDENTIALS
5994 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5995 into here. Never process more commands after we've reached an
5996 end state; store further data as unused bytes.
5998 * test/data/auth/*: add more auth tests
6000 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6001 command to match exact string and EXPECT_UNUSED to match unused
6004 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6006 2003-02-12 Havoc Pennington <hp@pobox.com>
6008 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6009 \r off of popped lines
6011 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6014 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6017 2003-02-12 Havoc Pennington <hp@pobox.com>
6019 * dbus/Makefile.am: remove break-loader from the build, since it
6022 * configure.in: add --enable-gcov to turn on coverage profiling
6023 flags and disable optimization
6025 2003-02-10 Havoc Pennington <hp@pobox.com>
6027 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6028 initial cut at test framework for DBusAuth from laptop.
6029 Doesn't quite work yet but it compiles and I need to get
6030 it off the 266mhz laptop. ;-)
6032 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6033 fix a memleak in error case
6035 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6038 * bus/desktop-file.c:
6039 * bus/desktop-file.h:
6040 Add a desktop file parser.
6042 2003-02-11 Zack Rusin <zack@kde.org>
6044 * qt/message.[h|cpp]: sample implementation
6045 of the KDE wrapper for DBusMessage
6047 2003-02-09 Zack Rusin <zack@kde.org>
6049 * test/bus-test.c: make_it_compile
6050 * doc/dbus-specification.sgml: minimal semantic fix
6052 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6058 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6061 * dbus/dbus-break-loader.c:
6063 * test/break-loader.c:
6064 Move dbus-break-loader to test/ and rename it to break-loader.
6066 2003-02-02 Havoc Pennington <hp@pobox.com>
6068 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6069 for code to manage cookies in your home directory
6071 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6073 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6074 to authenticate, then disconnect the client.
6076 2003-02-03 Alexander Larsson <alexl@redhat.com>
6078 * dbus/dbus-message.c (dbus_message_append_fields):
6081 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6083 * doc/dbus-specification.sgml:
6084 Update address format section.
6086 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6089 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6090 (message_handler), (new_connection_callback), (loop_quit),
6094 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6096 * bus/driver.c: (bus_driver_handle_service_exists):
6097 Simplify the code a bit.
6099 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6102 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6105 Add libdbus-daemon.la and link to it.
6107 2003-02-01 James Willcox <jwillcox@gnome.org>
6109 * bus/driver.c: (bus_driver_handle_own_service):
6110 Actually include the service reply code in the message.
6112 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6114 * bus/driver.c: (bus_driver_handle_service_exists):
6115 Don't unref the incoming message.
6117 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6119 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6121 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6123 * dbus/dbus-server.c: (dbus_server_listen):
6124 * dbus/dbus-transport.c: (_dbus_transport_open):
6125 ifdef out the calls to the debug transport and server.
6127 2003-02-02 Alexander Larsson <alexl@redhat.com>
6129 * dbus/dbus-watch.c (dbus_watch_get_flags):
6130 Add note in the docs that ERROR or HANGUP won't be returned
6131 and are assumed always on.
6133 * glib/dbus-gmain.c (add_watch):
6134 Always add IO_ERR | IO_HUP
6136 * dbus/dbus-message.h:
6137 Add semicolon after dbus_message_iter_get_string_array().
6138 Makes qt code build again
6140 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6142 * bus/driver.c: (create_unique_client_name),
6143 (bus_driver_handle_hello):
6144 Don't take a name, just use a numeric id to identify
6148 * dbus/dbus-bus.c: (dbus_bus_register_client),
6149 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6151 Add new convenience functions for communicating with the bus.
6153 * dbus/dbus-message.h:
6155 * dbus/dbus-protocol.h:
6158 2003-02-01 Alexander Larsson <alexl@redhat.com>
6160 * dbus/dbus-message.c (dbus_message_append_fields):
6161 Add some more doc comments.
6163 2003-02-01 Havoc Pennington <hp@pobox.com>
6165 * dbus/dbus-break-loader.c (randomly_modify_length): change
6166 a 4-byte value in the message as if it were a length
6168 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6169 execute bit on saved files
6171 2003-02-01 Havoc Pennington <hp@pobox.com>
6173 * dbus/dbus-break-loader.c (main): new program to find messages
6174 that break the loader.
6176 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6177 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6179 * dbus/dbus-string.c (_dbus_string_set_byte): new
6181 2003-01-31 Havoc Pennington <hp@pobox.com>
6183 * dbus/dbus-message.c: refactor the test code to be more general,
6184 in preparation for writing a "randomly permute test cases to
6185 try to break the loader" program.
6187 2003-01-31 Havoc Pennington <hp@pobox.com>
6189 * doc/dbus-specification.sgml: work on the specification
6191 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6192 the protocol version of the message.
6194 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6195 no longer specifies that.
6196 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6199 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6200 "break" for DBUS_TYPE_NIL, remove @todo
6202 2003-01-31 Havoc Pennington <hp@pobox.com>
6204 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6205 just set_is_error/get_is_error as this is a commonly-used
6206 function, and write docs.
6208 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6210 * dbus/dbus-address.c: (dbus_address_entry_free):
6211 Free key and value lists.
6213 * dbus/dbus-internals.c: (_dbus_type_to_string):
6214 Add the types we didn't have.
6216 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6217 (_dbus_marshal_validate_arg):
6220 * dbus/dbus-message.c: (dbus_message_set_sender):
6221 Remove todo about being able to set sender to NULL.
6223 (dbus_message_set_is_error_reply),
6224 (dbus_message_get_is_error_reply):
6225 * dbus/dbus-message.h:
6228 * dbus/dbus-protocol.h:
6229 Add error reply flag.
6231 * test/data/valid-messages/opposite-endian.message:
6232 Add NIL type to test.
6234 2003-01-31 Havoc Pennington <hp@pobox.com>
6236 * doc/dbus-specification.sgml: fully specify the header. Add
6237 flags and major protocol version, and change header/body len to
6240 * dbus/dbus-message-builder.c (append_saved_length): append length
6243 * dbus/dbus-message.c (dbus_message_create_header): change header
6244 length and body length to unsigned. Add the new fields from the
6246 (_dbus_message_loader_return_buffer): unsigned header/body len
6248 2003-01-30 Havoc Pennington <hp@pobox.com>
6250 * dbus/dbus-auth.c: rework to use only REJECTED, no
6253 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6254 use REJECTED, suggested by Mark McLoughlin
6256 2003-01-30 Havoc Pennington <hp@pobox.com>
6258 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6259 a better way to report errors here. e.g. "unix address lacks
6260 path" or something. also "no such file" when the path doesn't
6263 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6265 (dbus_parse_address): add @todo about documenting address format,
6266 and allowing , and ; to be escaped
6268 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6271 Add dbus-address.[ch]
6273 * dbus/dbus-address.c: (dbus_address_entry_free),
6274 (dbus_address_entries_free), (create_entry),
6275 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6276 (dbus_parse_address), (_dbus_address_test):
6277 * dbus/dbus-address.h:
6278 New files for dealing with address parsing.
6280 * dbus/dbus-connection.c:
6281 Document timeout functions.
6283 * dbus/dbus-message.c:
6284 Document dbus_message_new_from_message.
6286 * dbus/dbus-server-debug.c:
6289 * dbus/dbus-server.c: (dbus_server_listen):
6290 Parse address and use correct server implementation.
6292 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6293 * dbus/dbus-string.h:
6294 New function with test.
6296 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6300 * dbus/dbus-transport-debug.c:
6303 * dbus/dbus-transport.c: (_dbus_transport_open):
6304 Parse address and use correct transport implementation.
6306 2003-01-30 Havoc Pennington <hp@pobox.com>
6308 * dbus/dbus-message.c: use message->byte_order instead of
6309 DBUS_COMPILER_BYTE_ORDER throughout.
6310 (dbus_message_create_header): pad header to align the
6311 start of the body of the message to 8-byte boundary
6313 * dbus/dbus-marshal.h: make all the demarshalers take const
6314 DBusString arguments.
6316 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6317 validate message args here, so we don't have to do slow validation
6318 later, and so we catch bad messages as they are incoming. Also add
6319 better checks on header_len and body_len. Also fill in
6322 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6323 implemented properly)
6324 (_dbus_string_validate_nul): new function to check all-nul
6326 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6327 get_arg_end_pos and remove all validation
6328 (_dbus_marshal_validate_arg): actually do validation here.
6330 2003-01-29 Havoc Pennington <hp@pobox.com>
6332 * dbus/dbus-message.c (check_message_handling): fix assertion
6333 failure on set_client_serial
6335 2003-01-28 Havoc Pennington <hp@pobox.com>
6337 * dbus/dbus-server-debug.c: Add doc section comments
6339 * dbus/dbus-transport-debug.c: add doc section comments
6341 2003-01-28 Havoc Pennington <hp@redhat.com>
6343 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6344 the reverse order from how I had it
6345 (_dbus_string_base64_encode): reverse encoding order. I was
6346 basically byteswapping everything during encoding.
6348 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6350 * dbus/dbus-connection-internal.h:
6351 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6352 (_dbus_connection_remove_timeout):
6353 Add functions for adding and removing timeouts.
6355 * dbus/dbus-message.c: (dbus_message_new_from_message):
6356 Add new function that takes a message and creates an exact
6357 copy of it, but with the refcount set to 1.
6358 (check_message_handling):
6361 * dbus/dbus-server-protected.h:
6362 * dbus/dbus-server.c: (_dbus_server_init_base),
6363 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6364 (dbus_server_set_timeout_functions):
6365 (_dbus_server_remove_timeout):
6366 New functions so that a server can add and remove timeouts.
6368 (dbus_server_listen):
6369 Add commented out call to dbus_server_debug_new.
6371 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6372 Actually set the handler, doh.
6374 * dbus/dbus-transport.c: (_dbus_transport_open):
6375 Add commented out call to dbus_transport_debug_client_new.
6378 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6380 2003-01-28 Havoc Pennington <hp@pobox.com>
6382 * dbus/dbus-message.c (check_message_handling): function to check
6383 on the loaded message, iterates over it etc.
6385 2003-01-28 Havoc Pennington <hp@pobox.com>
6387 * test/Makefile.am (dist-hook): fix make distdir
6389 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6391 2003-01-27 Havoc Pennington <hp@pobox.com>
6393 * dbus/dbus-mempool.c (time_for_size): replace printf with
6396 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6397 empty lines; fix the SAVE_LENGTH stuff to be
6398 START_LENGTH/END_LENGTH so it actually works; couple other
6401 * test/Makefile.am (dist-hook): add dist-hook for .message files
6403 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6404 can be constant or locked.
6405 (_dbus_string_free): allow freeing a const string as
6408 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6410 * dbus/dbus-test-main.c (main): take an argument which is the
6411 directory containing test data
6413 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6414 argument to this and load all the messages in test/data/
6415 checking that they can be loaded or not loaded as appropriate.
6417 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6419 * bus/dispatch.c: (bus_dispatch_message_handler):
6420 Dispatch messages sent to services.
6422 * bus/driver.c: (bus_driver_send_service_deleted),
6423 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6424 (bus_driver_send_service_acquired):
6425 Add helper functions for sending service related messages.
6427 (bus_driver_send_welcome_message):
6428 Send HELLO_REPLY instead of WELCOME.
6430 (bus_driver_handle_list_services):
6431 Send LIST_SERVICES_REPLY instead of SERVICES.
6433 (bus_driver_handle_own_service),
6434 (bus_driver_handle_service_exists):
6435 New message handlers.
6437 (bus_driver_handle_message):
6438 Invoke new message handlers.
6440 (bus_driver_remove_connection):
6441 Don't remove any services here since that's done automatically
6442 by bus_service_remove_owner now.
6445 New function signatures.
6447 * bus/services.c: (bus_service_add_owner):
6448 Send ServiceAcquired message if we're the only primary owner.
6450 (bus_service_remove_owner):
6451 Send ServiceAcquired/ServiceLost messages.
6453 (bus_service_set_prohibit_replacement),
6454 (bus_service_get_prohibit_replacement):
6455 Functions for setting prohibit replacement.
6457 (bus_service_has_owner):
6458 New function that checks if a connection is in the owner queue of
6462 Add new function signatures.
6464 * dbus/dbus-list.c: (_dbus_list_test):
6465 Add tests for _dbus_list_remove_last and traversing the list backwards.
6468 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6469 go any further, so return NULL then.
6471 * dbus/dbus-protocol.h:
6472 Add new messages, service flags and service replies.
6474 2003-01-26 Havoc Pennington <hp@pobox.com>
6476 * dbus/dbus-message-builder.c: implement, completely untested.
6478 * test/data/*: add data to be used in testing.
6479 ".message" files are our simple loadable text format.
6480 ".message-raw" will be binary dumps of messages.
6482 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6484 2003-01-26 Havoc Pennington <hp@pobox.com>
6486 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6488 * dbus/dbus-errors.c (dbus_result_to_string): add
6491 * dbus/dbus-message-builder.c: new file, will contain code to load
6492 up messages from files. Not implemented yet.
6494 2003-01-26 Havoc Pennington <hp@pobox.com>
6496 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6497 the sender by setting to NULL
6499 2003-01-26 Havoc Pennington <hp@pobox.com>
6501 The unit tests pass, but otherwise untested. If it breaks, the
6502 tests should have been better. ;-)
6504 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6507 * dbus/dbus-message.c: redo everything so we maintain
6508 message->header as the only copy of the various fields.
6509 This avoids the possibility of out-of-memory in some cases,
6510 for example dbus_message_lock() can't run out of memory anymore,
6511 and avoids extra copying. Figured I may as well go ahead and do
6512 this since it was busted for dbus_message_lock to not return
6513 failure on OOM, and dbus_message_write_header was totally
6514 unchecked for OOM. Also fixed some random other bugs.
6516 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6517 that strings are nul-terminated. Also, end_pos can be equal
6518 to string length just not greater than, I think.
6519 (_dbus_marshal_set_int32): new function
6520 (_dbus_marshal_set_uint32): new function
6521 (_dbus_marshal_set_string): new function
6523 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6524 a warning, init timeout_list to NULL
6525 (dbus_connection_send_message): don't use uninitialized variable
6528 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6530 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6532 * bus/driver.c: (bus_driver_handle_hello),
6533 (bus_driver_send_welcome_message):
6536 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6538 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6539 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6540 (dbus_connection_unref):
6541 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6542 * dbus/dbus-message.c: (dbus_message_unref),
6545 (dbus_message_get_fields):
6546 Remove debugging printout.
6548 (_dbus_message_loader_return_buffer):
6549 Don't store the header string.
6551 (_dbus_message_test):
6554 2003-01-26 Richard Hult <rhult@codefactory.se>
6556 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6557 the file descriptor list, since it can change under us.
6559 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6561 * glib/dbus-gmain.c: (dbus_connection_prepare),
6562 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6563 (remove_watch), (dbus_connection_hookup_with_g_main):
6564 Rewrite the glib handling to use its own GSource instead of a
6565 GIOChannel so we can catch messages put in the queue while waiting
6568 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6571 * bus/connection.c: (connection_disconnect_handler),
6572 (connection_watch_callback), (bus_connection_setup):
6573 * bus/dispatch.c: (send_one_message),
6574 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6575 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6577 * bus/driver.c: (bus_driver_send_service_deleted),
6578 (bus_driver_send_service_created), (bus_driver_handle_hello),
6579 (bus_driver_send_welcome_message),
6580 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6581 (bus_driver_handle_message):
6583 Refactor code, put the message dispatching in its own file. Use
6584 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6587 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6589 * dbus/dbus-internals.h:
6590 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6592 * dbus/dbus-message.c: (dbus_message_get_sender):
6593 * dbus/dbus-message.h:
6594 Implement dbus_message_get_sender.
6596 * dbus/dbus-protocol.h:
6597 Add message and service defines.
6599 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6601 * dbus/dbus-connection.c: (dbus_connection_send_message):
6602 * dbus/dbus-message-internal.h:
6603 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6604 (dbus_message_write_header):
6605 Remove _dbus_messag_unlock and don't set the client serial on a
6606 message if one already exists.
6608 2003-01-24 Havoc Pennington <hp@pobox.com>
6610 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6613 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6616 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6618 * dbus/dbus-list.c: (alloc_link), (free_link):
6619 Use a memory pool for the links.
6621 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6623 * bus/connection.c: (bus_connection_foreach):
6625 Add new bus_connection_foreach function.
6627 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6628 Add function that broadcasts a message to all clients.
6630 (bus_driver_send_service_created), (bus_driver_handle_hello),
6631 (bus_driver_send_welcome_message),
6632 (bus_driver_handle_list_services), (bus_driver_message_handler):
6633 Implement functions that take care of listing services, and notifying
6634 clients when new services are created.
6636 * bus/services.c: (bus_services_list):
6638 Add new function that returns an array of strings with the currently
6639 registered services.
6642 * glib/dbus-gmain.c:
6643 Update copyright year.
6645 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6647 * dbus/dbus-connection.c: (dbus_connection_send_message):
6648 Unlock the message in case it was sent earlier.
6650 (dbus_connection_send_message_with_reply_and_block):
6651 Remove the reply message from the list.
6653 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6654 Set array_len and new_pos correctly.
6656 (_dbus_marshal_test):
6657 Remove debug output.
6659 * dbus/dbus-message-internal.h:
6660 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6661 New function that returns the reply serial.
6663 (_dbus_message_unlock):
6664 New function that unlocks a message and resets its header.
6666 (dbus_message_append_string_array),
6667 (dbus_message_get_fields_valist),
6668 (dbus_message_iter_get_field_type),
6669 (dbus_message_iter_get_string_array),
6670 (dbus_message_get_fields),
6671 (dbus_message_append_fields_valist):
6672 Handle string arrays.
6674 (dbus_message_set_sender):
6675 Make this function public since the bus daemon needs it.
6677 (decode_header_data):
6678 Set the reply serial to -1 initially.
6680 * dbus/dbus-message.h:
6681 Add dbus_message_set_sender.
6683 2003-01-24 Havoc Pennington <hp@pobox.com>
6685 * doc/dbus-specification.sgml: add some stuff
6687 2003-01-22 Havoc Pennington <hp@pobox.com>
6689 * doc/dbus-specification.sgml: Start to document the protocol.
6691 2003-01-22 Havoc Pennington <hp@pobox.com>
6693 * dbus/dbus-connection.c
6694 (dbus_connection_send_message_with_reply_and_block): add some @todo
6696 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6698 2003-01-21 Havoc Pennington <hp@pobox.com>
6700 (patch untested because can't compile)
6702 * bus/driver.c (create_unique_client_name): make this function
6703 never recycle client names. Also, caller should initialize
6706 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6708 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6710 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6711 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6712 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6713 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6714 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6715 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6716 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6717 * dbus/dbus-marshal.h:
6718 * dbus/dbus-protocol.h:
6719 Add support for marshalling and demarshalling integer, double
6722 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6727 * bus/connection.c: (connection_disconnect_handler):
6728 Remove the connection from the bus driver's list.
6730 (connection_watch_callback): Dispatch messages.
6732 (free_connection_data): Free connection name.
6734 (bus_connection_setup): Add connection to the bus driver's list.
6735 (bus_connection_remove_owned_service):
6736 (bus_connection_set_name), (bus_connection_get_name):
6737 Add functions for setting and getting the connection's name.
6740 Add function headers.
6742 * bus/driver.c: (create_unique_client_name),
6743 (bus_driver_handle_hello_message),
6744 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6745 (bus_driver_add_connection), (bus_driver_remove_connection):
6748 * bus/services.c: (bus_service_free):
6750 New file that handles communication and registreation with the bus
6753 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6755 * dbus/dbus-connection.c: (dbus_connection_send_message):
6756 Add a new client_serial parameter.
6758 (dbus_connection_send_message_with_reply):
6759 Remove a @todo since we've implemented the blocking function.
6761 (dbus_connection_send_message_with_reply_and_block):
6762 New function that sends a message and waits for a reply and
6763 then returns the reply.
6765 * dbus/dbus-connection.h:
6768 * dbus/dbus-errors.c: (dbus_result_to_string):
6769 * dbus/dbus-errors.h:
6770 Add new DBUS_RESULT.
6772 * dbus/dbus-message-internal.h:
6773 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6774 (_dbus_message_set_sender), (dbus_message_write_header),
6775 (dbus_message_new_reply), (decode_header_data),
6776 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6777 * dbus/dbus-message.h:
6778 Add new functions that set the reply serial and sender.
6779 Also marshal and demarshal them correctly and add test.
6781 * dbus/dbus-protocol.h:
6782 Add new DBUS_MESSAGE_TYPE_SENDER.
6785 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6786 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6787 (dbus_connection_hookup_with_g_main):
6788 * glib/test-dbus-glib.c: (main):
6789 Rewrite to use GIOChannel and remove the GSource crack.
6791 * test/echo-client.c: (main):
6792 * test/watch.c: (check_messages):
6793 Update for changed APIs
6795 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6797 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6799 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6800 Create a DBusTimeoutList.
6801 (dbus_connection_set_timeout_functions): Add new function to
6802 set timeout callbacks
6804 * dbus/dbus-connection.h: Add public DBusTimeout API.
6806 * dbus/dbus-message.c: (dbus_message_get_service):
6807 * dbus/dbus-message.h: New function.
6809 * dbus/dbus-server.c: Fix small doc typo.
6811 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6813 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6815 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6816 of the string, just as long as specified.
6818 2003-01-19 Havoc Pennington <hp@pobox.com>
6820 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6823 * dbus/dbus-server.c (dbus_server_set_max_connections)
6824 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6825 keep track of current number of connections, and add API for
6826 setting a max (but haven't implemented enforcing the max yet)
6828 2003-01-18 Havoc Pennington <hp@pobox.com>
6830 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6831 reading/writing if read_watch != NULL or write_watch != NULL.
6833 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6834 the message loader code to actually load message->header and
6835 message->body into the newly-created message.
6837 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6840 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6841 (dbus_connection_get_max_message_size)
6842 (dbus_connection_set_max_live_messages_size)
6843 (dbus_connection_get_max_live_messages_size): implement some
6844 resource limitation functions
6846 * dbus/dbus-resources.c: new file implementing some of the
6847 resource limits stuff
6849 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6850 missing docs, add @todo to handle OOM etc.
6852 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6855 2003-01-18 Havoc Pennington <hp@pobox.com>
6857 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6858 connection if it hasn't been already.
6860 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6861 replace with DisconnectFunction.
6863 2003-01-18 Havoc Pennington <hp@pobox.com>
6865 Building --disable-verbose-mode --disable-asserts --disable-tests
6866 cuts the library from 112K to 45K or so
6868 * configure.in: check for varargs macro support,
6869 add --enable-verbose-mode, --enable-asserts.
6871 * dbus/dbus-internals.h (_dbus_assert): support
6873 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6875 2003-01-18 Havoc Pennington <hp@pobox.com>
6877 * dbus/dbus-test.c: include config.h so that tests actually run
6879 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6880 so the failure mode when that assumption fails will be plenty
6883 2003-01-18 Havoc Pennington <hp@pobox.com>
6885 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6887 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6890 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6891 since we don't want to use those in make check
6893 2003-01-15 Havoc Pennington <hp@redhat.com>
6899 2003-01-15 Havoc Pennington <hp@redhat.com>
6901 * test/Makefile.am: fix so that test source code ends up in the
6902 distribution on make distcheck
6904 2003-01-15 Havoc Pennington <hp@redhat.com>
6910 2003-01-15 Havoc Pennington <hp@redhat.com>
6912 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6913 fix build when --disable-tests
6915 * Makefile.am (EXTRA_DIST): put HACKING in here
6917 * HACKING: document procedure for making a tarball release.
6919 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6921 * bus/connection.c: (connection_error_handler),
6922 (bus_connection_setup):
6923 * bus/main.c: (main):
6924 Make sure that the DBusConnectionData struct is NULLed
6925 out to prevent a segfault.
6927 * dbus/dbus-errors.c: (dbus_result_to_string):
6928 * dbus/dbus-errors.h:
6929 * dbus/dbus-message.c: (dbus_message_get_fields),
6930 (dbus_message_get_fields_valist), (_dbus_message_test):
6931 * dbus/dbus-message.h:
6932 Make dbus_message_get_fields return a result code so we can
6933 track invalid fields as well as oom.
6935 2003-01-11 Havoc Pennington <hp@pobox.com>
6937 * configure.in: change --enable-test/--enable-ansi action-if-given
6938 to enable_foo=$enableval instead of enable_foo=yes
6940 2003-01-08 Havoc Pennington <hp@pobox.com>
6942 * dbus/dbus-string.c (_dbus_string_align_length): new function
6944 * dbus/dbus-test-main.c: move main() for test app here
6946 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6947 symbol to run tests, because dbus-test isn't in the main
6950 Code review nitpicks.
6952 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6953 for people with narrow emacs ;-). Assert client_serial was filled
6954 in. Assert message->name != NULL.
6955 (dbus_message_append_fields): have "first_field_type" arg separate
6956 from va list, needed for C++ binding that also uses varargs IIRC
6957 and helps with type safety
6958 (dbus_message_new): add @todo about using DBusString to store
6959 service/name internally
6960 (dbus_message_new): don't leak ->service and ->name on OOM later
6962 (dbus_message_unref): free the service name
6963 (dbus_message_get_fields): same change to varargs
6964 i.e. first_field_type
6965 (_dbus_message_loader_return_buffer): assert that the message data
6966 is aligned (if not it's a bug in our code). Put in verbose griping
6967 about why we set corrupted = TRUE.
6968 (decode_header_data): add FIXME that char* is evil. Was going to
6969 add FIXME about evil locale-specific string.h strncmp, but just
6970 switched to wacky string-as-uint32 optimization. Move check for
6971 "no room for field name" above get_const_data_len() to avoid
6972 assertion failure in get_const_data_len if we have trailing 2
6973 bytes or the like. Check for service and name fields being
6974 provided twice. Don't leak service/name on error. Require field
6975 names to be aligned to 4 bytes.
6977 * dbus/dbus-marshal.c: move byte swap stuff to header
6978 (_dbus_pack_int32): uscore-prefix
6979 (_dbus_unpack_int32): uscore-prefix
6980 (_dbus_unpack_uint32): export
6981 (_dbus_demarshal_string): add @todo complaining about use of
6983 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6984 handling allowing corrupt data to go unchecked
6986 2003-01-08 Havoc Pennington <hp@redhat.com>
6988 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6989 to the select() as needed for authentication. (should be using
6990 _dbus_poll() not select, but for another day)
6992 * dbus/dbus.h: include dbus/dbus-protocol.h
6994 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6996 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6999 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7001 * dbus/dbus-internals.c: (_dbus_type_to_string):
7002 New function that returns a string describing a type.
7004 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7005 * dbus/dbus-marshal.h:
7006 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7007 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7008 (dbus_message_iter_get_byte_array):
7009 * dbus/dbus-message.h:
7010 Add new convenience functions for appending and getting message fields.
7011 Also add demarshalling routines for byte arrays.
7013 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7015 * dbus/dbus-connection-internal.h:
7016 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7017 (_dbus_connection_get_next_client_serial),
7018 (dbus_connection_send_message):
7019 * dbus/dbus-internals.h:
7020 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7021 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7022 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7023 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7024 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7025 (_dbus_verbose_bytes), (_dbus_marshal_test):
7026 * dbus/dbus-marshal.h:
7027 * dbus/dbus-message-internal.h:
7028 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7029 (dbus_message_write_header), (_dbus_message_lock),
7030 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7031 (dbus_message_get_name), (dbus_message_append_int32),
7032 (dbus_message_append_uint32), (dbus_message_append_double),
7033 (dbus_message_append_string), (dbus_message_append_byte_array),
7034 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7035 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7036 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7037 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7038 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7039 (decode_header_data), (_dbus_message_loader_return_buffer),
7040 (message_iter_test), (_dbus_message_test):
7041 * dbus/dbus-message.h:
7042 * dbus/dbus-protocol.h:
7043 * dbus/dbus-test.c: (main):
7045 * glib/test-dbus-glib.c: (message_handler), (main):
7046 * test/echo-client.c: (main):
7047 * test/watch.c: (check_messages):
7048 Make messages sendable and receivable for real.
7050 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7052 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7053 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7054 * dbus/dbus-message.c: (dbus_message_append_int32),
7055 (dbus_message_append_uint32), (dbus_message_append_double),
7056 (dbus_message_append_string), (dbus_message_append_byte_array):
7057 Handle OOM restoration.
7059 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7061 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7062 (_dbus_demarshal_string), (_dbus_marshal_test):
7063 * dbus/dbus-marshal.h:
7064 * dbus/dbus-message.c: (dbus_message_get_name),
7065 Document these functions.
7067 (dbus_message_append_int32), (dbus_message_append_uint32),
7068 (dbus_message_append_double), (dbus_message_append_string),
7069 (dbus_message_append_byte_array):
7070 * dbus/dbus-message.h:
7071 Add functions for adding message fields of different types.
7073 * dbus/dbus-protocol.h:
7074 Add the different types.
7076 2003-01-05 Havoc Pennington <hp@pobox.com>
7078 * bus/connection.c: implement routines for handling connections,
7079 first thing is keeping a list of owned services on each connection
7080 and setting up watches etc.
7082 * bus/services.c: implement a mapping from service names to lists
7085 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7087 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7088 to use static mutexes for global data
7090 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7091 collection of functions to set/get application-specific data
7092 on the DBusConnection.
7094 2003-01-04 Havoc Pennington <hp@pobox.com>
7096 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7097 (_dbus_poll): new function
7099 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7102 * bus/loop.c: initial code for the daemon main loop
7104 2003-01-04 Havoc Pennington <hp@pobox.com>
7106 * test/watch.c (error_handler): make it safe if the error handler
7107 is called multiple times (if we s/error handler/disconnect
7108 handler/ we should just guarantee it's called only once)
7110 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7111 error handler on disconnect (it's quite possible we should
7112 just change the error handler to a "disconnect handler," I'm
7113 not sure we have any other meaningful errors)
7115 * configure.in: check for getpwnam_r
7117 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7118 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7119 mechanism as in SASL spec, using socket credentials
7121 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7122 (_dbus_send_credentials_unix_socket): new function
7124 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7126 (_dbus_write): only check errno if <0 returned
7127 (_dbus_write_two): ditto
7129 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7131 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7132 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7133 (_dbus_marshal_test):
7134 * dbus/dbus-marshal.h:
7135 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7136 to _dbus_marshal_utf8_string. Also fix some tests.
7138 2002-12-28 Harri Porten <porten@kde.org>
7140 * configure.in: added check for C++ compiler and a very cheesy
7141 check for the Qt integration
7143 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7145 * qt/Makefile.am: added
7147 * qt/.cvsignore: added
7149 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7150 latter, added #ifdef QT_THREAD_SUPPORT guard.
7152 * dbus/Makefile.am: added missing headers for make dist
7154 2002-12-28 Kristian Rietveld <kris@gtk.org>
7156 * dbus/Makefile.am: fixup export-symbols-regex.
7158 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7160 * acinclude.m4: Add this file and put the
7161 PKG_CHECK_MODULE macro in it.
7163 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7165 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7166 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7167 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7168 (_dbus_marshal_test):
7169 Make the demarshalling routines align the pos argument.
7170 Add string marshalling tests and fix the obvious bugs
7173 2002-12-26 Havoc Pennington <hp@pobox.com>
7175 * dbus/dbus-auth.c: fixes fixes fixes
7177 * dbus/dbus-transport-unix.c: wire up support for
7178 encoding/decoding data on the wire
7180 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7181 (_dbus_auth_decode_data): append to target string
7182 instead of nuking it.
7184 2002-12-26 Havoc Pennington <hp@pobox.com>
7186 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7187 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7190 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7191 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7192 now). Main point is because I wanted unpack_uint32 to implement
7194 (_dbus_verbose_bytes): new function
7196 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7198 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7199 mechanism to handle a corrupt message stream
7200 (_dbus_message_loader_new): fix preallocation to only prealloc,
7203 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7204 (_dbus_string_test): enhance tests for copy/move and fix the
7207 * dbus/dbus-transport-unix.c: Hold references in more places to
7208 avoid reentrancy problems
7210 * dbus/dbus-transport.c: ditto
7212 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7213 leak reference count in no-message case
7215 * test/watch.c (do_mainloop): handle adding/removing watches
7216 during iteration over the watches. Also, ref the connection/server
7217 stored on a watch, so we don't try to mangle a destroyed one.
7219 * dbus/dbus-transport-unix.c (do_authentication): perform
7222 * dbus/dbus-auth.c (get_state): add a state
7223 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7224 (_dbus_auth_get_unused_bytes): append the unused bytes
7225 to the passed in string, rather than prepend
7227 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7228 the auth conversation DBusAuth
7230 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7231 (_dbus_transport_new_for_domain_socket): when creating a
7232 transport, pass in whether it's a client-side or server-side
7233 transport so we know which DBusAuth to create
7235 2002-12-03 Havoc Pennington <hp@pobox.com>
7237 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7238 _after_ finalizing the derived members
7239 (unix_connection_set): unref watch if we fail to add it
7241 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7242 transport first, so that the connection owned by the
7243 transport will be valid as the transport finalizes.
7245 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7246 if necessary, and remove watches from the connection.
7248 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7250 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7252 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7253 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7254 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7255 (_dbus_marshal_test):
7256 * dbus/dbus-marshal.h:
7257 Add string marshal functions and have the demarshal functions
7258 return the new position.
7260 2002-12-25 Havoc Pennington <hp@pobox.com>
7262 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7263 it is a simple protocol that just maps directly to SASL.
7265 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7266 initial implementation, not actually used yet.
7268 * dbus/dbus-string.c (_dbus_string_find): new function
7269 (_dbus_string_equal): new function
7270 (_dbus_string_base64_encode): new function
7271 (_dbus_string_base64_decode): new function
7273 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7276 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7277 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7278 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7279 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7280 * dbus/dbus-marshal.h:
7281 * dbus/dbus-protocol.h:
7282 * dbus/dbus-test.c: (main):
7284 Add un-optimized marshalling/demarshalling routines.
7286 2002-12-25 Harri Porten <porten@kde.org>
7288 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7290 2002-12-24 Zack Rusin <zack@kde.org>
7292 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7293 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7296 2002-12-24 Havoc Pennington <hp@pobox.com>
7298 * glib/dbus-gthread.c: fix include
7300 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7301 I think glib API needs to change, though, as you don't
7302 want to use DBusMessageFunction, you want to use the
7303 DBusMessageHandler object. Probably
7304 dbus_connection_open_with_g_main_loop()
7305 and dbus_connection_setup_g_main_loop() or something like that
7306 (but think of better names...) that just create a connection
7307 that has watch/timeout functions etc. already set up.
7309 * dbus/dbus-connection.c
7310 (dbus_connection_send_message_with_reply): new function just to
7311 show how the message handler helps us deal with replies.
7313 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7315 * dbus/dbus-string.c (_dbus_string_test): free a string that
7318 * dbus/dbus-hash.c: use memory pools for the hash entries
7319 (rebuild_table): be more paranoid about overflow, and
7320 shrink table when we can
7321 (_dbus_hash_test): reduce number of sprintfs and write
7322 valid C89. Add tests for case where we grow and then
7323 shrink the hash table.
7325 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7327 * dbus/dbus-connection.c (dbus_connection_register_handler)
7328 (dbus_connection_unregister_handler): new functions
7330 * dbus/dbus-message.c (dbus_message_get_name): new
7332 * dbus/dbus-list.c: fix docs typo
7334 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7335 an object representing a handler for messages.
7337 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7340 * glib/dbus-gthread.c: (dbus_gthread_init):
7341 Don't use the gdbus prefix for public functions.
7343 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7347 Add GLib checks and fixup .pc files
7351 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7352 (gdbus_connection_check), (gdbus_connection_dispatch),
7353 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7354 (dbus_connection_gsource_new):
7355 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7356 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7357 * glib/test-dbus-glib.c: (message_handler), (main):
7360 2002-12-15 Harri Porten <porten@kde.org>
7362 * autogen.sh: check for libtoolize before attempting to use it
7364 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7367 * .cvsignore: ignore more stamp files
7369 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7371 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7372 without make install.
7374 2002-12-15 Havoc Pennington <hp@pobox.com>
7376 * dbus/dbus-threads.c: add thread stubs that a higher library
7377 layer can fill in. e.g. the GLib wrapper might fill them in with
7378 GThread stuff. We still need to use this thread API to
7379 thread-safe-ize the library.
7381 2002-12-12 Havoc Pennington <hp@pobox.com>
7383 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7384 below new interfaces and include fewer system headers.
7386 * dbus/dbus-sysdeps.c (_dbus_read): new function
7387 (_dbus_write): new function
7388 (_dbus_write_two): new function
7389 (_dbus_connect_unix_socket): new function
7390 (_dbus_listen_unix_socket): new function
7392 * dbus/dbus-message-internal.h: change interfaces to use
7395 2002-12-11 Havoc Pennington <hp@pobox.com>
7397 * dbus/dbus-types.h: add dbus_unichar
7399 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7401 * dbus/dbus-connection.c (dbus_connection_send_message): return
7404 * dbus/dbus-transport.c: include dbus-watch.h
7406 * dbus/dbus-connection.c: include dbus-message-internal.h
7408 * HACKING: add file with coding guidelines stuff.
7410 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7411 handling here, for security purposes (as in vsftpd). Not actually
7412 using this class yet.
7414 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7415 system/libc usage here, as in vsftpd, for ease of auditing (and
7416 should also simplify portability). Haven't actually moved all the
7417 system/libc usage into here yet.
7419 2002-11-25 Havoc Pennington <hp@pobox.com>
7421 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7422 always print the first verbose message.
7424 2002-11-24 Havoc Pennington <hp@pobox.com>
7426 * test/echo-client.c, test/echo-server.c: cheesy test
7429 * configure.in (AC_CHECK_FUNCS): check for writev
7431 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7434 * dbus/dbus-list.c (_dbus_list_foreach): new function
7436 * dbus/dbus-internals.c (_dbus_verbose): new function
7438 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7439 representing a server that listens for connections.
7441 * dbus/.cvsignore: create
7443 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7444 public API for reporting errors
7446 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7447 public object representing a connection that
7448 sends/receives messages. (Same object used for
7449 both client and server.)
7451 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7452 Basic abstraction for different kinds of stream
7453 that we might read/write messages from.
7455 2002-11-23 Havoc Pennington <hp@pobox.com>
7457 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7460 * dbus/dbus-test.c (main): add list test, and include
7461 dbus-test.h as intended
7463 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7464 (_dbus_hash_table_remove_int): return value indicates
7465 whether the entry existed to remove
7467 * dbus/dbus-list.c: add linked list utility class,
7470 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7473 2002-11-23 Havoc Pennington <hp@pobox.com>
7475 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7476 DBUS_END_DECLS to nothing, that should fix this once and for all
7478 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7480 * dbus/dbus-message.c, dbus/dbus-hash.c:
7481 add some missing @brief
7483 2002-11-23 Havoc Pennington <hp@pobox.com>
7485 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7486 to avoid confusing Doxygen
7488 * dbus/dbus-hash.c: @} not }@
7490 * dbus/dbus-message.c (struct DBusMessage): split out
7493 2002-11-23 Havoc Pennington <hp@pobox.com>
7495 * configure.in: pile on more warning flags if using gcc
7497 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7498 to document static functions
7500 * configure.in: add summary to end of configure so it
7501 looks nice and attractive
7503 * dbus/dbus-hash.c: finish implementation and write unit
7506 * configure.in: add --enable-tests to enable unit tests
7508 * dbus/dbus-test.c: test program to run unit tests
7509 for all files in dbus/*, initially runs a test for
7512 * dbus/dbus-internals.h: file to hold some internal utility stuff
7514 2002-11-22 Havoc Pennington <hp@redhat.com>
7516 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7517 "ported" away from Tcl
7519 * dbus/dbus-types.h: header for types such as dbus_bool_t
7521 2002-11-22 Havoc Pennington <hp@redhat.com>
7523 * dbus/dbus.h: fixups for doc warnings
7525 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7527 (QUIET): make it quiet so we can see warnings
7529 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7531 2002-11-22 Havoc Pennington <hp@redhat.com>
7533 * Makefile.am: include "Doxyfile" target in all-local
7535 * configure.in: generate the Doxyfile
7537 * Doxyfile.in: move Doxyfile here, so we can use
7538 configure to generate a Doxyfile with the right
7541 2002-11-22 Havoc Pennington <hp@redhat.com>
7543 * dbus/dbus-message.c: move inline docs into .c file
7545 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7546 so all docs are under doc/
7547 (MAN_EXTENSION): generate man pages. Use extension
7548 ".3dbus" which matches ".3qt" on my system,
7549 I guess this is OK, I don't know really.
7550 (FILE_PATTERNS): look for .c files not .h, makes sense
7553 2002-11-22 Havoc Pennington <hp@pobox.com>
7555 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7556 because any app can be a server, and any app can be a client,
7557 the bus is a special kind of server.
7559 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7561 * Doxyfile : adding. Still needs Makefile rules to be generated
7562 automatically (just run "doxygen" in the toplevel dir for now to
7565 * dbus/dbus-message.h : Adding sample docs (javadoc since
7566 resembles gtk-doc a little more)
7568 * dbus/dbus.h : Adding sample docs
7570 2002-11-21 Havoc Pennington <hp@redhat.com>
7572 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7573 so we can allow ourselves to include files directly,
7574 instead of having to use dbus.h
7576 * dbus/dbus.h: fill in
7578 * dbus/dbus-message.h: sketch out a sample header file.
7579 Include griping if you include it directly instead of
7582 * dbus/dbus-macros.h: new file with macros for extern "C",
7583 TRUE/FALSE, NULL, etc.
7585 * doc/file-boilerplate.c: put include guards in here
7587 2002-11-21 Havoc Pennington <hp@redhat.com>
7589 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7591 * COPYING: include the GPL as well, and license code
7592 under both AFL and GPL.
7594 2002-11-21 Havoc Pennington <hp@redhat.com>
7596 * acconfig.h: get rid of this
7598 * autogen.sh (run_configure): add --no-configure option
7600 * configure.in: remove AC_ARG_PROGRAM to make
7601 autoconf complain less. add AC_PREREQ.
7602 add AC_DEFINE third arg.
7604 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7607 Fix references so we can distcheck.
7609 2002-11-21 Havoc Pennington <hp@redhat.com>
7611 * Initial module creation