1 2004-11-03 Colin Walters <walters@verbum.org>
3 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
6 2004-11-03 Colin Walters <walters@verbum.org>
8 * bus/test-main.c (test_pre_hook): Fix test logic,
9 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
11 2004-11-02 Colin Walters <walters@redhat.com>
13 * bus/selinux.c (bus_selinux_init): Split into two functions,
14 bus_selinux_pre_init and bus_selinux_post_init.
15 (bus_selinux_pre_init): Just determine whether SELinux is
17 (bus_selinux_post_init): Do everything else.
19 * bus/main.c (main): Call bus_selinux_pre_init before parsing
20 config file, and bus_selinux_post_init after. This ensures that
21 we don't lose the policyreload notification thread that
22 bus_selinux_init created before forking previously.
24 * bus/test-main.c (test_pre_hook): Update for split.
26 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
28 Patch from Johan Fischer <linux@fischaz.com>
30 * mono/doc/Makefile.am (install-data-local): Added directory
33 2004-10-29 Colin Walters <walters@redhat.com>
35 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
36 parameter for fd to write pid to.
38 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
40 * bus/bus.c (bus_context_new): Pass print_pid_fd
41 to _dbus_become_daemon (bug #1720)
43 2004-10-29 Colin Walters <walters@redhat.com>
45 Patch from Ed Catmur <ed@catmur.co.uk>
47 * mono/doc/Makefile.am (install-data-local): Handle
50 2004-10-29 Colin Walters <walters@redhat.com>
52 * bus/.cvsignore, qt/.cvsignore: Update.
54 2004-10-29 Colin Walters <walters@redhat.com>
56 Patch from Kristof Vansant <de_lupus@pandora.be>
58 * configure.in: Detect Slackware.
59 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
60 * bus/rc.messagebus.in: New file.
62 2004-10-29 Colin Walters <walters@redhat.com>
64 * tools/dbus-monitor.c (filter_func): Return
65 DBUS_HANDLER_RESULT_HANDLED in filter function
67 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
69 2004-10-29 Colin Walters <walters@redhat.com>
71 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
73 * bus/services.c (bus_registry_acquire_service):
74 Correctly retrieve service name from DBusString
77 2004-10-29 Colin Walters <walters@redhat.com>
79 * dbus/dbus-glib.h: Update documentation to not
80 refer to internal APIs.
82 2004-10-27 Joe Shaw <joeshaw@novell.com>
84 * mono/Arguments.cs (GetDBusTypeConstructor):
85 type.UnderlyingSystemType will return "System.Byte" if you do it
86 on "byte[]", which is not what we want. So check the type.IsArray
87 property and use System.Array instead.
89 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
91 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
92 the DBusUserInfo structure since this is passed into the function.
93 This would cause a double free when the function that allocated
94 the structure would try to free it when an error occured.
96 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
97 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
98 for service activation to avoid 32bit/64bit parallel install issues
100 2004-10-21 Colin Walters <walters@verbum.org>
102 * AUTHORS: Fix my email address, the @gnu.org one
103 has been bouncing for some time. Also add J5.
105 2004-10-21 Colin Walters <walters@verbum.org>
107 * dbus/dbus-transport-unix.c (do_authentication): Return
108 authentication status to callers.
109 (unix_handle_watch): If we completed authentication this round,
110 don't do another read. Instead wait until the next iteration,
111 after we've read any pending data in the auth buffer.
112 (unix_do_iteration): Ditto.
113 (unix_handle_watch): Updated for new do_authentication prototype.
115 2004-10-18 Colin Walters <walters@verbum.org>
117 * bus/selinux.c (bus_selinux_enabled): Handle
118 --disable-selinux case.
120 2004-10-18 Colin Walters <walters@verbum.org>
122 * bus/selinux.h: Add bus_selinux_enabled.
124 * bus/selinux.c (bus_selinux_enabled): Implement it.
126 * bus/config-parser.c (struct include): Add
127 if_selinux_enabled member.
128 (start_busconfig_child): Parse if_selinux_enabled
129 attribute for include.
130 (bus_config_parser_content): Handle it.
132 * bus/session.conf.in, bus/system.conf.in: Add
133 inclusion of context mapping to default config files;
134 conditional on SELinux being enabled.
136 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
138 * test/data/invalid-config-files/badselinux-1.conf,
139 test/data/invalid-config-files/badselinux-2.conf:
140 Test files for bad syntax.
142 2004-10-17 Colin Walters <walters@verbum.org>
144 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
145 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
146 format specifier mismatches.
148 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
150 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
153 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
154 pointer (bug #1540, Leonardo Boiko).
156 2004-09-28 Jon Trowbridge <trow@ximian.com>
158 * mono/BusDriver.cs: Changed BusDriver struct to remove
159 the ServiceCreated and ServiceDeleted events and replace them
160 with the new ServiceOwnerChanged event.
162 * mono/example/BusListener.cs: Added a new example program,
163 which listens for and reports any ServiceOwnerChanged events
166 * mono/example/Makefile.am (DESTDIR): Build changes for the
167 new BusListener.cs example.
169 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
171 * bus/signals.c (bus_match_rule_parse): validate the components of
172 match rules (bug #1439).
174 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
176 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
178 * doc/dbus-specification.xml: document ServiceOwnerChanged
181 * bus/driver.c, bus/driver.h, bus/services.c: Use
182 ServiceOwnerChanged signal instead of ServiceCreated and
185 * bus/dispatch.c: update testcase for the new signal.
187 2004-09-20 Jon Trowbridge <trow@ximian.com>
189 Patch from Nat Friedman <nat@novell.com>
191 * mono/Makefile.am: A number of small build fixes to allow "make
192 distcheck" to succeed.
194 * mono/example/Makefile.am: "make distcheck" fixes.
196 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
199 * test/Makefile.am: "make distcheck" fixes.
201 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
203 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
205 * doc/busconfig.dtd: update the DTD for the at_console attribute.
207 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
208 messages after the first one (bug #1389).
210 * bus/dispatch.c (check_double_hello_message): add a test case for
211 the double hello message bug.
212 (check_existent_service_activation): fix check of spawning error.
214 2004-09-16 David Zeuthen <david@fubar.dk>
216 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
218 2004-09-12 David Zeuthen <david@fubar.dk>
220 Patch from Kay Sievers <kay.sievers@vrfy.org>
222 * bus/bus.c (bus_context_new):
226 Add commandline option --nofork to override configuration file
229 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
231 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
232 compilers don't like it (bug #974).
234 2004-09-04 Harald Fernengel <harry@kdevelop.org>
236 * qt/connection.*: Applied patch by Jérôme Lodewyck
237 <lodewyck@clipper.ens.fr> to integrate an existing
238 connection into the Qt eventloop
240 2004-08-30 Jon Trowbridge <trow@ximian.com>
242 * mono/BusDriver.cs: Added. This is a class for interacting with
243 the org.freedesktop.DBus service.
245 * mono/Message.cs: Added a mechanism to expose the message that is
246 currently being dispatched via the static Message.Current
247 property. Added Message.Sender and Message.Destination
250 * mono/Handler.cs: Expose the dispatched message via
251 Message.Current when handling method calls.
253 * mono/Service.cs: Expose the dispatched message via
254 Message.Current when handling signal emissions.
256 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
257 Connection.BaseService property.
259 2004-08-28 Havoc Pennington <hp@redhat.com>
261 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
263 More fixes from Steve Grubb
265 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
266 (_dbus_listen_tcp_socket): fix fd leak
268 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
269 EINTR to a bit lower in the code
271 2004-08-26 Jon Trowbridge <trow@ximian.com>
273 * bus/driver.c (bus_driver_handle_service_exists): Respond with
274 TRUE if we are inquiring about the existence of the built-in
275 org.freedesktop.DBus service.
277 2004-08-25 John Palmieri <johnp@redhat.com>
278 * bus/config-parser.c:
279 (struct PolicyType): Add POLICY_CONSOLE
280 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
281 (start_busconfig_child): Sets up console element when
282 <policy at_console=""> is encountered in a policy file
283 (append_rule_from_element): Convert console elements to console
287 (bus_policy_create_client_policy): Add console rules to the client
288 policy based on if the client is at the console
289 (bus_policy_append_console_rule): New function for adding a
290 console rule to a policy
291 (bus_policy_merge): Handle console rule merging
293 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
294 where we check for console user files
296 * dbus/dbus-sysdeps.c:
297 (_dbus_file_exists): New function which checks if the given
299 (_dbus_user_at_console): New function which does the system
300 specific process of checking if the user is at the console
302 * dbus/dbus-userdb.c:
303 (_dbus_is_console_user): New function converts a UID to user name
304 and then calls the system specific _dbus_user_at_console to
305 see if the user is at the console and therefor a console user
307 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
309 * bus/config-parser.c (set_limit):
310 * bus/dbus-daemon-1.1.in:
311 * test/data/valid-config-files/many-rules.conf: set the
312 max_match_rules_per_connection limt from the config file.
314 * doc/busconfig.dtd: update the DTD.
316 * bus/driver.c: remove some unused variables.
318 2004-08-24 Mikael Hallendal <micke@imendio.com>
320 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
321 it's been replaced by dbus_g_bus_get
323 2004-08-23 Colin Walters <walters@redhat.com>
325 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
327 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
329 * bus/selinux.c: Create a thread for policy reload notification.
330 (bus_selinux_get_policy_root): Implement.
332 * bus/config-parser.c (start_busconfig_child)
333 (bus_config_parser_content): Support SELinux-root relative
336 * configure.in <HAVE_SELINUX>: Add -lpthread.
338 * bus/test-main.c (test_pre_hook, test_post_hook): New.
339 (test_post_hook): Move memory checking into here.
340 (test_pre_hook, test_post_hook): Move SELinux checks in
341 here, but conditional on a DBUS_TEST_SELINUX environment
342 variable. Unfortunately we can't run the SELinux checks
343 as a normal user, since they won't have any permissions
344 for /selinux. So this will have to be tested manually
345 for now, until we have virtualization for most of
348 2004-08-23 Havoc Pennington <hp@redhat.com>
350 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
351 drop supplementary groups, suggested by Steve Grubb
353 2004-08-20 Colin Walters <walters@redhat.com>
355 * bus/config-parser.c (start_busconfig_child): Remove some unused
358 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
361 2004-08-17 Joe Shaw <joeshaw@novell.com>
363 * configure.in: If --enable-mono is passed in, if we can't find
366 * mono/Makefile.am: Use /gacutil to install assemblies into the
369 2004-08-12 Havoc Pennington <hp@redhat.com>
371 * NEWS: update for 0.22
373 * configure.in: release 0.22
375 2004-08-11 Colin Walters <walters@redhat.com>
377 * tools/dbus-send.c (main, usage): Add --reply-timeout
380 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
382 * bus/bus.c (process_config_first_time_only): get rid of an unused
383 DBusError that was causing a memoy leak (bug #989).
385 * dbus/dbus-keyring.c, dbus/dbus-message.c:
386 fix compilation on Solaris/Forte C (bug #974)
388 * bus/main.c (main): plug two minuscule memleaks.
390 2004-08-10 Havoc Pennington <hp@redhat.com>
392 * doc/dbus-tutorial.xml: add some more info on GLib bindings
394 2004-08-09 Havoc Pennington <hp@redhat.com>
396 * COPYING: switch to Academic Free License version 2.1 instead of
397 2.0, to resolve complaints about patent termination clause.
399 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
401 * README: added documentation for the --enable-python
404 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
406 * bus/config-parser.c (bus_config_parser_new): fix an invalid
407 _unref in the SELinux support.
409 * doc/busconfig.dtd: update DTD for SELinux support.
411 * bus/config-loader-libxml.c: fix error handler and parser
412 initialisation/cleanup. OOM test now works with libxml2 HEAD.
414 * configure.in: remove the warning about libxml2.
416 * dbus/dbus-bus.c: silence doxygen warning.
418 2004-07-31 Colin Walters <walters@redhat.com>
420 * configure.in: Move #error in SELinux check to its own line.
422 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
424 * dbus/dbus-internals.h (_DBUS_SET_OOM):
425 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
428 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
429 broken by the change in the _SET_OOM macros.
431 2004-07-31 Colin Walters <walters@redhat.com>
433 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
436 2004-07-31 Colin Walters <walters@redhat.com>
438 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
439 to correctly detect DBUS__ACQUIRE_SVC. Also add an
442 2004-07-24 Havoc Pennington <hp@redhat.com>
444 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
446 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
449 * configure.in: add --enable-selinux
451 * bus/policy.c (bus_policy_merge): add FIXME to a comment
453 * bus/main.c (main): initialize and shut down selinux
455 * bus/connection.c: store SELinux ID on each connection, to avoid
456 repeated getting of the string context and converting it into
459 * bus/bus.c (bus_context_get_policy): new accessor, though it
461 (bus_context_check_security_policy): check whether the security
462 context of sender connection can send to the security context of
465 * bus/config-parser.c: add parsing for <selinux> and <associate>
467 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
468 implement dbus_connection_get_unix_fd()
470 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
471 function, used by the selinux stuff
473 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
475 * bus/config-loader-libxml.c: complete the implementation of
476 libxml backend for config file loader. Doesn't work with full OOM
479 * configure.in: change error when selecting libxml into a warning.
481 * test/data/invalid-config-files: add two non-well-formed XML
484 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
486 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
487 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
488 be necessary to read all the buffer. (bug #894)
490 * bus/activation.c (bus_activation_activate_service): fix a
491 potential assertion failure (bug #896). Small optimization in the
492 case of auto-activation messages.
494 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
495 add test case for byte-through-vararg bug (#901). patch by Kimmo
498 2004-07-28 Anders Carlsson <andersca@gnome.org>
501 * python/dbus_bindings.pyx.in:
502 Add dbus.init_gthreads (), allow emit_signal to pass
503 arguments to the signal.
505 2004-07-24 Havoc Pennington <hp@redhat.com>
507 * AUTHORS: add some people, not really comprehensively, let me
510 2004-07-24 Havoc Pennington <hp@redhat.com>
512 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
515 * test/Makefile.am (DIST_SUBDIRS): here also
517 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
519 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
520 breaking build on Solaris, reported by Farhad Saberi on the ML.
522 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
523 va_arg invocation to account for integer promotion in the case of
524 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
526 * bus/services.c (bus_service_remove_owner): fix bug #902, use
527 _dbus_list_get_first_link, not _dbus_list_get_first.
529 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
531 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
532 handler functions so that the asserts in _dbus_object_subtree_unref
535 * dbus/dbus-transport-unix.c (do_reading):
536 _dbus_transport_queue_messages return value is of type
537 dbus_bool_t, not DBusDispatchStatus.
539 2004-07-19 David Zeuthen <david@fubar.dk>
541 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
544 (check_get_connection_unix_user): Debug says GetProperty; but the
545 method is called GetConnectionUnixUser
546 (check_get_connection_unix_process_id): New function
547 (bus_dispatch_test): Actually call check_get_connection_unix_user();
548 also call check_get_connection_unix_process_id()
551 (bus_driver_handle_get_connection_unix_process_id): New function,
552 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
556 (handle_server_data_external_mech): Set pid from the credentials
557 obtained from the socket
559 * dbus/dbus-connection.c:
560 (dbus_connection_get_unix_process_id): New function
562 * dbus/dbus-connection.h:
563 Add prototype for dbus_connection_get_unix_process_id
565 * dbus/dbus-transport.c:
566 (_dbus_transport_get_unix_process_id): New function
568 * dbus/dbus-transport.h:
569 Add prototype for _dbus_transport_get_unix_process_id
571 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
573 * dbus/dbus-message.c: Message counter fix, patch by Christian
574 Hammond <chipx86@gnupdate.org>
576 2004-07-18 Seth Nickell <seth@gnome.org>
579 * python/dbus_bindings.pyx.in:
580 * python/tests/test-client.py:
582 Add dbus.ByteArray and dbus_bindings.ByteArray
583 types so that byte streams can be passed back.
585 Give jdahlin the heaps of credit that are so
588 2004-07-12 Seth Nickell <seth@gnome.org>
592 Add message argument to the default object_method_handler
595 * python/dbus_bindings.pyx.in:
597 Automatically return NIL when passed an empty list
598 (we can't pass back a list since lists are typed
599 and we don't have any idea what type the the client
600 intended the list to be... :-( )
602 2004-07-10 Seth Nickell <seth@gnome.org>
604 * python/examples/Makefile.am:
606 Fix distcheck breakage caused by new examples.
608 2004-07-10 Seth Nickell <seth@gnome.org>
612 Add "message" argument to service-side dbus.Object
613 methods. This will break existing services written
614 using the python bindings, but will allow extraction
615 of all the message information (e.g. who its from).
617 Add improved "object oriented" signal handling/emission.
619 * python/examples/example-service.py:
623 * python/examples/example-signal-emitter.py:
624 * python/examples/example-signal-recipient.py:
626 Two new examples that show how to emit and receive
627 signals using the new APIs.
629 * python/examples/example-signals.py:
630 * python/examples/gconf-proxy-service.py:
631 * python/examples/gconf-proxy-service2.py:
633 Add "message" argument to service methods.
635 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
637 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
638 * dbus/bus.c (dbus_bus_get_unix_user)
639 * doc/dbus-specification.xml: implement GetConnectionUnixUser
640 method of org.freedesktop.DBus interface.
642 * bus/dispatch.c: test case
644 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
646 * python/Makefile.am: switched include directory from glib/ to dbus/
647 since dbus-glib.h moved
649 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
651 * configure.in: prevent building the gcj stuff and libxml loader
652 since they are broken.
654 2004-06-20 Havoc Pennington <hp@redhat.com>
656 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
657 codes from the dbus error names
659 * glib/dbus-glib.h: move to subdir dbus/ since it's included
660 as dbus/dbus-glib.h and that breakage is now visible due to
661 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
663 * glib/dbus-glib.h: s/gproxy/g_proxy/
665 * dbus/dbus-shared.h: new header to hold stuff shared with
668 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
671 * glib/dbus-glib.h (dbus_set_g_error): move to
674 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
675 of stuff to enable this
677 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
679 * a bunch of other changes with the same basic "separate glib
680 bindings from dbus.h" theme
682 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
684 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
686 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
688 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
690 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
691 the reply value of the ServiceExists message.
693 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
695 * python/dbus_bindings.pyx.in: No longer need to parse path
696 elements and pass them as arrays of strings. The C API now
697 accepts plain path strings.
698 (_build_parsed_path): removed
700 2004-06-07 Havoc Pennington <hp@redhat.com>
702 * doc/TODO: remove auto-activation item since it's done; sort
703 items by importance/milestone
705 2004-06-07 Havoc Pennington <hp@redhat.com>
707 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
708 random signature when using REQUIRED_FIELDS (this hack won't work
711 * dbus/dbus-message.c: change the signature to be a header field,
712 instead of message->signature special-case string. Incremental
713 step forward. Then we can fix up code to send the signature in the
714 message, then fix up code to validate said signature, then fix up
715 code to not put the typecodes inline, etc.
716 (load_one_message): don't make up the signature after the fact
717 (decode_header_data): require signature field for the known
720 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
722 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
724 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
726 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
728 * mono/Handler.cs: Updated to follow new path argument for
729 (un-)registering objects.
731 * mono/example/Makefile.am:
733 * configure.in: Bumped required version for mono and use new -pkg
736 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
738 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
739 registration functions take the path argument as char* instead of
742 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
743 split off the path decompostion part of
744 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
747 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
749 2004-06-02 Kristian Høgsberg <krh@redhat.com>
751 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
752 machine approach. A state is implemented as a function that
753 handles incoming events as specified for that state.
755 * doc/dbus-specification.xml: Update auth protocol state machine
756 specification to match implementation. Remove some leftover
759 2004-06-02 Kristian Høgsberg <krh@redhat.com>
761 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
762 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
765 * Doxyfile.in: remove deprecated options.
767 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
768 glib/test-thread.h, glib/test-thread-client.c,
769 glib/test-thread-server.c, glib/test-profile.c,
770 glib/test-dbus-glib.c: remove these unused files.
772 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
774 * dbus/dbus-object-tree.c
775 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
776 non-fallback handlers (bug #684).
777 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
778 (find_subtree_recurse): report wether the returned subtree is an
779 exact match or a "fallback" match higher up in the tree.
780 (object_tree_test_iteration): update test case.
782 2004-06-01 Seth Nickell <seth@gnome.org>
784 * python/dbus_bindings.pyx.in:
785 * python/tests/test-client.py:
787 Round off basic type support. Add dicts (yay!), and
788 remaining array types.
790 Make MessageIter more general so it works for dicts too.
792 Mark all loop variables as C integers.
794 2004-05-31 Havoc Pennington <hp@redhat.com>
796 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
799 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
801 * glib/dbus-glib-tool.c (main): set up to have a --self-test
802 option that runs the tests, and start filling in some code
803 including for starters just dumping the interfaces to stdout
805 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
807 * test/data/valid-introspection-files/lots-of-types.xml: test of
808 an example introspection file
810 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
813 2004-05-31 Seth Nickell <seth@gnome.org>
815 * python/dbus_bindings.pyx.in:
816 * python/tests/test-client.py:
821 Fix string array memory trashing bug... oops...
823 2004-05-30 Seth Nickell <seth@gnome.org>
827 Add a nicer-but-less-flexible alternate API for handling
828 calls to virtual objects in dbus.ObjectTree.
830 Screw up the argument order to the dbus.Object constructor
831 for consistency with dbus.ObjectTree (and to make dbus_methods
832 optional for future extension)
834 * python/examples/Makefile.am:
835 * python/examples/gconf-proxy-service.py:
836 * python/examples/gconf-proxy-service2.py:
838 Alternate implementation of gconf-proxy-service using the
839 nicer dbus.ObjectTree API.
841 * python/examples/example-service.py:
842 * python/tests/test-server.py
844 Reverse the argument order to deal with dbus.Object constructor
847 2004-05-30 Seth Nickell <seth@gnome.org>
849 * python/examples/example-client.py:
850 * python/examples/example-service.py:
852 Take it back. Lists seem to work but they're broken
853 in the test suite. Make the base examples use
856 2004-05-30 Seth Nickell <seth@gnome.org>
858 * python/dbus_bindings.pyx.in:
859 * python/tests/test-client.py:
861 Add some more tests and fix errors that crop up.
862 Unfortunately, currently it seems like marshalling
863 and unmarshalling of lists is completely broken :-(
865 2004-05-30 Seth Nickell <seth@gnome.org>
867 * python/dbus_bindings.pyx.in:
869 Add support for ObjectPath type.
873 Refactor message handling code to a common function.
875 * python/tests/test-client.py:
876 * python/tests/test-server.py:
878 Add tests that check to make sure values of all types
879 can be echoed from a service w/o mangling.
881 2004-05-29 Seth Nickell <seth@gnome.org>
885 Add ObjectTree class which allows implementation
886 of trees of "virtual" objects. Basically the python
887 wrapper for "register_fallback".
889 * python/examples/Makefile.am
890 * python/examples/gconf-proxy-client.py:
891 * python/examples/gconf-proxy-service.py:
893 Implement a simple GConf proxy service that supports
894 get/set on string and int GConf keys using the ObjectTree.
896 2004-05-29 Seth Nickell <seth@gnome.org>
899 * python/examples/example-client.py:
900 * python/examples/example-service.py:
901 * python/examples/list-system-services.py:
903 Add SessionBus, SystemBus and ActivationBus classes
904 so you don't need to know the special little BUS_TYPE
907 2004-05-29 Havoc Pennington <hp@redhat.com>
909 * bus/config-parser.c (process_test_valid_subdir): temporarily
910 stop testing config parser OOM handling, since expat has issues
911 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
913 * bus/dbus-daemon-1.1.in: change requested_reply to
914 send_requested_reply/receive_requested_reply so we can send the
915 replies, not just receive them.
917 * bus/config-parser.c: parse the new
918 send_requested_reply/receive_requested_reply
920 * bus/policy.c (bus_client_policy_check_can_send): add
921 requested_reply argument and use it
923 * bus/bus.c (bus_context_check_security_policy): pass through
924 requested_reply status to message send check
926 * bus/system.conf.in: adapt to requested_reply change
928 2004-05-28 Havoc Pennington <hp@redhat.com>
930 * test/glib/test-service-glib.c (main): remove unused variable
932 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
934 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
935 from the enum, no longer in use.
937 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
940 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
941 whether error_name passed in is a valid error name.
943 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
945 * dbus/dbus-message.c (dbus_message_get_args): Added support for
946 OBJECT_PATH and OBJECT_PATH_ARRAY
948 2004-05-28 Seth Nickell <seth@gnome.org>
950 * python/examples/Makefile.am:
952 Forget to add Makefile.am. Do not pass go.
954 2004-05-28 Michael Meeks <michael@ximian.com>
956 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
959 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
961 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
962 (_dbus_message_iter_get_basic_type_array): impl.
963 drastically simplify ~all relevant _get methods to use these.
964 (_dbus_message_iter_append_basic_array),
965 (dbus_message_iter_append_basic): impl
966 drastically simplify ~all relevant _append methods to use these.
968 * dbus/dbus-message-builder.c (parse_basic_type)
969 (parse_basic_array, lookup_basic_type): impl.
970 (_dbus_message_data_load): prune scads of duplicate /
973 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
974 (_dbus_demarshal_basic_type): implement,
975 (demarshal_and_validate_len/arg): beef up debug.
976 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
978 2004-05-27 Seth Nickell <seth@gnome.org>
981 * python/Makefile.am:
983 Include the example python apps in the tarball.
985 * python/examples/list-system-services.py
987 Add a python new example that fetches the list of services
990 2004-05-27 Seth Nickell <seth@gnome.org>
993 * python/dbus_bindings.pyx.in:
995 Fix failure to notify that a signal was not handled,
996 resulted in hung functions.
998 2004-05-25 Colin Walters <walters@redhat.com>
1000 * tools/dbus-monitor.c (main): Monitor all types of messages.
1002 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
1004 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1005 which unregisters the object path and disposes the handler.
1007 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1009 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1011 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1012 operands to && so we call dbus_message_iter_next () for the last
1015 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1017 * dbus/dbus-object-tree.c
1018 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1019 children even if the requested path isn't registered.
1020 (object_tree_test_iteration): test object_tree_list_registered.
1022 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1025 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1027 * doc/TODO: Remove resolved items.
1029 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1032 * bus/connection.c (bus_connections_expect_reply): Enforce the
1033 per-connection limit on pending replies.
1035 Patch from Jon Trowbridge <trow@ximian.com>:
1037 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1038 up a watch that triggers a config reload when one end of the pipe
1040 (signal_handler): Instead of doing the config reload in our SIGHUP
1041 handler, just write to the reload pipe and let the associated
1042 watch handle the reload when control returns to the main loop.
1044 * bus/driver.c (bus_driver_handle_reload_config): Added.
1045 Implements a ReloadConfig method for requesting a configuration
1046 file reload via the bus driver.
1048 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1050 * HACKING: Updated release instructions concerning the wiki page.
1052 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1054 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1055 filter against auth->allowed_mechs; we only add allowed mechs in
1056 record_mechanisms().
1058 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1059 ALLOWED_MECHS to auth-script format so we can set the list of
1062 * data/auth/client-out-of-mechanisms.auth-script: New test to
1063 check client disconnects when it is out of mechanisms to try.
1065 * dbus/dbus-auth.c (process_command): Remove check for lines
1066 longer that 1 MB; we only buffer up maximum 16 kB.
1068 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1069 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1070 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1071 assume there might be unused bytes.
1073 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1074 client-out-of-mechs, it is handled in process_reject(). Move check
1075 for max failures to send_rejected(), as it's a server-only thing.
1077 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1078 send_auth(), send_data(), send_rejected(), send_error(),
1079 send_ok(), send_begin() and send_cancel().
1081 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1083 Remove base64 encoding, replace with hex encoding. Original patch
1084 from trow@ximian.com, added error handling.
1086 * dbus/dbus-string.c (_dbus_string_base64_encode)
1087 (_dbus_string_base64_decode): Remove.
1088 (_dbus_string_hex_decode): Add end_return argument so we can
1089 distinguish between OOM and invalid hex encoding.
1090 (_dbus_string_test): Remove base64 tests and add test case for
1093 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1094 Replace base64 with hex.
1096 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1097 for invalid hex encoded data in auth protocol.
1099 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1101 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1104 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1106 * mono/dbus-sharp.dll.config.in: Added for GAC
1107 * mono/dbus-sharp.snk: Added for GAC
1108 * mono/Assembly.cs.in: Added for GAC
1109 * mono/Makefile.am: Changes for GAC installation
1110 * configure.in: Added refs for dbus-sharp.dll.config.in and
1111 Assembly.cs.in. More fixes for mono testing
1112 * mono/example/Makefile.am: Changed var to CSC
1113 * Makefile.am: Changed flag name to DBUS_USE_CSC
1115 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1117 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1118 * mono/doc/*: Added documentation framework
1119 * configure.in: Added monodoc check
1120 * README: Added description of mono configure flags
1122 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1124 * doc/dbus-specification.xml: Added a "Required" column to the
1125 header fields table and changed the "zero or more" verbage in
1126 the above paragraph to read "The header must contain the required
1127 named header fields and zero or more of the optional named header
1129 * test/data/invalid-messages/*.message: Added the required PATH
1130 named header field to the tests so that they don't fail on
1131 'Missing path field'
1133 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1135 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1136 the stack by implicitly defining variable and parameter types and
1137 removing the hack of defining C pointers as python objects and later
1140 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1142 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1144 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1146 * mono/DBusType/Dict.cs: Handle empty dicts
1147 * mono/DBusType/Array.cs: Handle empty arrays
1148 * mono/Arguments.cs: Handle empty arguments
1150 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1152 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1155 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1157 * test/data/valid-messages/standard-*.message: Update message
1158 test scripts to new header field names.
1160 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1162 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1163 overflow to times_we_did_each_thing array which would chop off the
1164 first character of the failure_dir string. Increased the size of
1165 the array to 7 to reflect the number of random mutation functions
1168 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1170 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1171 unix_server->watch here, it is unreffed in disconnect.
1172 (_dbus_server_new_for_tcp_socket): convert NULL host to
1173 "localhost" here so we don't append NULL to address.
1175 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1176 various addresses, including tcp with no explicit host.
1178 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1180 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1181 fix incorrect setting of .name_offset in the HeaderField (it was
1182 off by two bytes, positioned right after the name and typecode)
1184 * bus/bus.c (bus_context_new, bus_context_unref): test before
1185 calling dbus_server_free_data_slot and _dbus_user_database_unref
1186 in case of an error.
1188 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1191 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1193 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1194 _dbus_poll() instead of select().
1196 2004-04-15 Jon Trowbridge <trow@ximian.com>
1198 * bus/main.c (signal_handler): Reload the configuration files
1200 (main): Set up our SIGHUP handler.
1202 * bus/bus.c (struct BusContext): Store the config file, user and
1203 fork flag in the BusContext.
1204 (process_config_first_time_only): Added. Contains the code
1205 (previously in bus_context_new) for setting up the BusContext from
1206 the BusConfigParser that should only be run the first time the
1207 config files are read.
1208 (process_config_every_time): Added. Contains the code (previously
1209 in bus_context_new) for setting up the BusContext from the
1210 BusConfigParser that should be run every time the config files are
1212 (load_config): Added. Builds a BusConfigParser from the config
1213 files and passes the resulting structure off to
1214 process_config_first_time_only (assuming this is the first time)
1215 and process_config_every_time.
1216 (bus_context_new): All of the config-related code has been moved
1217 to process_config_first_time_only and process_config_every_time.
1218 Now this function just does the non-config-related initializations
1219 and calls load_config.
1220 (bus_context_reload_config): Added.
1222 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1224 * bus/driver.c (bus_driver_handle_get_service_owner):
1225 implement a GetServiceOwner method.
1226 * doc/dbus-specification.xml: document it.
1227 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1229 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1230 implement, using the bus GetServiceOwner method.
1232 * test/glib/test-dbus-glib.c:
1233 use dbus_gproxy_new_for_service_owner so that we can receive the
1236 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1238 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1239 dbus/dbus-message.c, dbus/dbus-protocol.h
1240 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1242 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1243 dbus/dbus-message.c, dbus/dbus-protocol.h
1244 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1246 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1247 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1248 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1250 * doc/dbus-specification.xml (Header Fields Table):
1251 s/SERVICE/DESTINATION
1252 s/SENDER_SERVICE/SENDER
1255 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1257 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1260 2004-04-13 Michael Meeks <michael@ximian.com>
1262 * glib/dbus-gobject.c (handle_introspect): split out
1263 (introspect_properties): this.
1264 (handle_introspect): implement this.
1266 * test/glib/Makefile.am: use the absolute path so the bus
1267 daemon's chdir ("/") doesn't kill us dead.
1269 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1271 2004-04-12 Jon Trowbridge <trow@ximian.com>
1273 * bus/config-parser.c (struct BusConfigParser): Added
1274 included_files field.
1275 (seen_include): Added. Checks whether or not a file has already
1276 been included by any parent BusConfigParser.
1277 (bus_config_parser_new): Copy the parent's included_files.
1278 (include_file): Track which files have been included, and fail on
1279 circular inclusions.
1280 (process_test_valid_subdir): Changed printf to report if we are
1281 testing valid or invalid conf files.
1282 (all_are_equiv): Changed printf to be a bit clearer about
1283 what we are actually doing.
1284 (bus_config_parser_test): Test invalid configuration files.
1286 2004-04-09 Jon Trowbridge <trow@ximian.com>
1288 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1289 argument. If non-null, the newly-constructed BusConfigParser will
1290 be initialized with the parent's BusLimits instead of the default
1292 (include_file): When including a config file, pass in
1293 the current parser as the parent and then copy the BusLimits
1294 from the included BusConfigParser pack to the current parser.
1295 (process_test_valid_subdir): Renamed from process_test_subdir.
1296 (process_test_equiv_subdir): Added. Walks through a directory,
1297 descending into each subdirectory and loading the config files
1298 it finds there. If any subdirectory contains two config files
1299 that don't produce identical BusConfigParser structs, fail.
1300 For now, the BusConfigParser's BusPolicies are not compared.
1301 (bus_config_parser_test): Call both process_test_valid_subdir and
1302 process_test_equiv_subdir.
1304 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1305 argument and pass it along to the call to bus_config_parser_new.
1306 Also made a few small changes to allow this code to compile.
1308 * bus/config-loader-expat.c (bus_config_load): Take a parent
1309 argument and pass it along to the call to bus_config_parser_new.
1311 * bus/bus.c (bus_context_new): Load the config file
1312 with a NULL parent argument.
1314 2004-03-29 Michael Meeks <michael@ximian.com>
1316 * glib/dbus-gobject.c (introspect_properties): split
1317 out, fix mangled 'while' flow control.
1318 (introspect_signals): implement.
1319 (handle_introspect): update.
1321 2004-03-29 Michael Meeks <michael@ximian.com>
1323 * glib/dbus-gobject.c (set_object_property): split out /
1324 re-work, use the property type, and not the message type(!)
1325 (get_object_property): ditto.
1327 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1328 (dbus_gvalue_marshal): make this code re-usable, needed
1329 for signals too, also on both proxy and server side.
1330 Re-write for more efficiency / readability.
1332 2004-03-29 Michael Meeks <michael@ximian.com>
1334 * dbus/dbus-message.c
1335 (dbus_message_new_error_printf): impl.
1337 * dbus/dbus-connection.c
1338 (dbus_connection_unregister_object_path): fix warning.
1340 * configure.in: fix no-mono-installed situation.
1342 2004-03-27 Havoc Pennington <hp@redhat.com>
1344 Patch from Timo Teräs:
1346 * tools/dbus-send.c (main): if --print-reply, assume type is
1347 method call; support boolean type args
1349 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1350 bunch of memleak and logic bugs
1352 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1354 * mono/Arguments.cs:
1355 * mono/Introspector.cs:
1357 * mono/InterfaceProxy.cs:
1359 * mono/ProxyBuilder.cs:
1361 Added InterfaceProxy class to avoid building proxies for every
1365 * dbus-message.c (dbus_message_append_args_valist)
1366 (dbus_message_iter_get_object_path)
1367 (dbus_message_iter_get_object_path_array)
1368 (dbus_message_iter_append_object_path)
1369 (dbus_message_iter_append_object_path_array):
1370 Added object_path iter functions to handle OBJECT_PATH arguments
1372 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1374 First checkin of mono bindings.
1377 Build stuff for the bindings
1378 * dbus-sharp.pc.in: Added for pkgconfig
1380 2004-03-21 Havoc Pennington <hp@redhat.com>
1382 * test/test-service.c (main): remove debug spew
1384 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1386 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1389 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1390 (dbus_message_iter_init_array_iterator)
1391 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1392 indicate whether the iterator is empty
1394 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1397 2004-03-19 Havoc Pennington <hp@redhat.com>
1399 * NEWS: 0.21 updates
1401 * configure.in: 0.21
1403 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1405 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1406 you don't need pyrex to make dist
1408 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1411 2004-03-18 Richard Hult <richard@imendio.com>
1413 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1414 (dbus_message_set_auto_activation): Add doxygen docs.
1416 2004-03-16 Richard Hult <richard@imendio.com>
1418 * bus/activation.c: (bus_activation_service_created),
1419 (bus_activation_send_pending_auto_activation_messages),
1420 (bus_activation_activate_service):
1422 * bus/dispatch.c: (bus_dispatch),
1423 (check_nonexistent_service_auto_activation),
1424 (check_service_auto_activated),
1425 (check_segfault_service_auto_activation),
1426 (check_existent_service_auto_activation), (bus_dispatch_test):
1427 * bus/driver.c: (bus_driver_handle_activate_service):
1428 * bus/services.c: (bus_registry_acquire_service):
1429 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1430 (dbus_message_get_auto_activation):
1431 * dbus/dbus-message.h:
1432 * dbus/dbus-protocol.h: Implement auto-activation.
1434 * doc/dbus-specification.xml: Add auto-activation to the spec.
1436 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1438 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1439 fix a bug with CUSTOM types.
1441 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1442 a unit test for this bug (used to fail).
1444 2004-03-12 Mikael Hallendal <micke@imendio.com>
1447 (babysitter_watch_callback): notify all pending activations waiting for
1448 the same exec that the activation failed.
1449 (bus_activation_activate_service): shortcut the activation if we
1450 already waiting for the same executable to start up.
1452 2004-03-12 Mikael Hallendal <micke@imendio.com>
1455 - Added service file reloading.
1456 Each service files directory is kept in an hash table in
1457 BusActivation and each BusActivationEntry knows what .service-file it
1458 was read from. So when you try to activate a service the bus will
1459 check if it's been updated, removed or if new .service-files has
1461 - Test code at the bottom for the service file reloading.
1462 * bus/test-main.c: (main):
1464 - added service reloading test.
1465 * dbus/dbus-sysdeps.c:
1466 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1468 2004-03-08 Michael Meeks <michael@ximian.com>
1470 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1471 bail immediately if disconnected, to avoid busy loop.
1473 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1474 cleanup cut/paste/inefficiency.
1476 2004-03-01 David Zeuthen <david@fubar.dk>
1478 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1479 bug where args were used twice. This bug resulted in a segfault
1480 on a Debian/PPC system when starting the messagebus daemon. Include
1481 dbus-sysdeps.h for DBUS_VA_COPY
1483 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1485 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1486 appropriate va_copy implementation. From GLib
1488 2004-02-24 Joe Shaw <joe@ximian.com>
1490 * bus/services.c (bus_registry_acquire_service): We need to pass
1491 in the service name to dbus_set_error() to prevent a crash.
1493 2003-12-26 Anders Carlsson <andersca@gnome.org>
1495 * AUTHORS: Reveal my True identity.
1497 2003-12-17 Mikael Hallendal <micke@imendio.com>
1499 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1500 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1502 2003-12-13 Mikael Hallendal <micke@imendio.com>
1504 * doc/TODO: Added not about better error check of configuration files.
1506 2003-12-02 Richard Hult <richard@imendio.com>
1508 * Update AFL version to 2.0 throughout the source files to reflect
1509 the update that was done a while ago.
1511 2003-12-02 Richard Hult <richard@imendio.com>
1513 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1514 wrote_dict_key to FALSE on the iter that the dict is appended to,
1515 just like when appending other types. Fixes a bug where a dict
1516 couldn't be put inside a dict.
1517 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1518 (message_iter_test, _dbus_message_test): Add test case for dict
1521 2003-12-01 David Zeuthen <david@fubar.dk>
1523 * python/dbus.py: Add the actual message when calling the reciever
1524 of a signal such that parameters can be inspected. Add the method
1525 remove_signal_receiver
1527 2003-11-26 Mikael Hallendal <micke@imendio.com>
1531 * glib/*.[ch]: Made ref functions return the pointer
1533 2003-11-25 Zack Rusin <zack@kde.org>
1535 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1537 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1540 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1541 the Integrator and to better fit with the server,
1543 2003-11-24 Zack Rusin <zack@kde.org>
1545 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1546 the integrator handles it now
1548 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1549 since QTimer wasn't really meant to be used the way DBusTimeout is
1551 2003-11-24 Zack Rusin <zack@kde.org>
1553 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1554 Integrator class which integrates D-BUS with the Qt event loop,
1556 * qt/connection.h, qt/connection.cpp: Move all the code which
1557 was dealing with D-BUS integration to the Integrator class,
1558 and start using Integrator,
1560 2003-11-23 Zack Rusin <zack@kde.org>
1562 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1565 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1566 switching namespaces to DBusQt, reworking the class,
1568 * Makefile.cvs: switching dependencies so that it matches KDE
1571 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1574 2003-11-19 Havoc Pennington <hp@redhat.com>
1578 * configure.in: bump version to 0.20
1580 * configure.in (have_qt): add yet another place to look for qt
1581 (someone hand trolltech a .pc file...)
1583 2003-11-01 Havoc Pennington <hp@redhat.com>
1585 * doc/dbus-specification.xml: add state machine docs on the auth
1586 protocol; just a first draft, I'm sure it's wrong.
1588 2003-10-28 David Zeuthen <david@fubar.dk>
1590 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1591 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1593 2003-10-28 Havoc Pennington <hp@redhat.com>
1595 * dbus/dbus-message.c (get_next_field): delete unused function
1597 2003-10-28 Havoc Pennington <hp@redhat.com>
1599 * bus/expirelist.c (do_expiration_with_current_time): detect
1600 failure of the expire_func due to OOM
1602 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1604 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1605 NoReply error that's now created by the bus when the service exits
1607 2003-10-28 Havoc Pennington <hp@redhat.com>
1609 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1610 tests for set_path, set_interface, set_member, etc.
1612 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1614 * dbus/dbus-message.c (set_string_field): always just delete and
1615 re-append the field; accept NULL for deletion
1616 (re_align_fields_recurse): reimplement
1618 2003-10-26 Havoc Pennington <hp@redhat.com>
1620 * dbus/dbus-connection.c: fix docs to properly describe the
1621 disconnected message
1622 (_dbus_connection_notify_disconnected): remove this function;
1623 we can't synchronously add the disconnected message, we have to
1624 do it after we've queued any remaining real messages
1625 (_dbus_connection_get_dispatch_status_unlocked): queue the
1626 disconnect message only if the transport has finished queueing all
1627 its real messages and is disconnected.
1628 (dbus_connection_disconnect): update the dispatch status here
1630 2003-10-22 Havoc Pennington <hp@redhat.com>
1632 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1634 * bus/connection.c (bus_transaction_send_from_driver): set the
1635 destination to the connection's base service
1637 2003-10-20 Havoc Pennington <hp@redhat.com>
1639 hmm, make check is currently not passing.
1641 * doc/dbus-specification.xml: add requirement that custom type
1642 names follow the same rules as interface names.
1644 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1645 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1648 * doc/dbus-specification.xml: update type codes to match
1649 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1650 CUSTOM. Add type OBJECT_PATH to the spec.
1652 2003-10-17 Havoc Pennington <hp@redhat.com>
1654 * bus/driver.c (create_unique_client_name): use "." as separator
1655 in base service names instead of '-'
1657 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1658 byte at the end of the string
1660 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1661 optimization macros since string validation seems to be a slow
1664 * doc/dbus-specification.xml: restrict valid
1665 service/interface/member/error names. Add test suite code for the
1668 * dbus/dbus-string.c: limit service/interface/member/error names
1671 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1672 format arg to verbose spew
1674 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1675 memory, return instead of g_error
1677 * test/test-service.c (path_message_func): support emitting a
1680 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1681 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1682 assuming the activation bus was the session bus so that services
1683 started manually will still register.
1684 (init_connections_unlocked): fix so that in OOM situation we get
1685 the same semantics when retrying the function
1687 * test/test-service.c (main): change to use path registration, to
1688 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1689 than DBUS_BUS_SESSION
1691 2003-10-16 Havoc Pennington <hp@redhat.com>
1693 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1695 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1696 coverage of the tests
1697 (coverage-report.txt): don't move the .da and .bbg files around
1699 2003-10-16 Havoc Pennington <hp@redhat.com>
1701 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1704 2003-10-16 Havoc Pennington <hp@redhat.com>
1706 * bus/connection.c (bus_pending_reply_expired): either cancel or
1708 (bus_connections_check_reply): use unlink, not remove_link, as we
1709 don't want to free the link; fixes double free mess
1711 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1712 where no reply was received
1714 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1717 * bus/signals.c (match_rule_matches): add special cases for the
1718 bus driver, so you can match on sender/destination for it.
1720 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1721 DBUS_PRINT_BACKTRACE is set
1723 * dbus/dbus-internals.c: add pid to assertion failure messages
1725 * dbus/dbus-connection.c: add message type code to the debug spew
1727 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1728 sender=foo not service=foo
1730 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1731 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1732 DBUS_ACTIVATION_ADDRESS instead
1734 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1735 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1737 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1740 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1741 (dbus_message_iter_get_object_path_array): new function (half
1742 finished, disabled for the moment)
1744 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1745 DBUS_MESSAGE_TYPE_ERROR
1747 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1748 avoid redirecting stderr to /dev/null
1749 (babysit): close stdin if not doing the "exit_with_session" thing
1751 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1752 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1753 stdout/stdin, so things don't get confused
1755 * bus/system.conf.in: fix to allow replies, I modified .conf
1756 instead of .conf.in again.
1758 2003-10-14 David Zeuthen <david@fubar.dk>
1760 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1761 argtype to arg_type when raising unknown arg type exception.
1762 Changed type list to reflect the changes in dbus-protocol.h so
1763 the bindings actually work.
1765 2003-10-14 Havoc Pennington <hp@redhat.com>
1767 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1768 to have a bug keeping it from outputting the .da files sometimes
1769 (string_get_string): don't append garbage nul bytes to the string.
1771 2003-10-15 Seth Nickell <seth@gnome.org>
1773 * python/Makefile.am:
1775 Include dbus_h_wrapper.h in the dist tarball.
1777 2003-10-14 Havoc Pennington <hp@redhat.com>
1779 * bus/bus.c (bus_context_check_security_policy): revamp this to
1780 work more sanely with new policy-based requested reply setup
1782 * bus/connection.c (bus_transaction_send_from_driver): set bus
1783 driver messages as no reply
1785 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1786 requested_reply attribute on allow/deny rules
1788 * bus/system.conf: add <allow requested_reply="true"/>
1790 * bus/driver.c (bus_driver_handle_message): fix check for replies
1791 sent to the bus driver, which was backward. How did this ever work
1792 at all though? I think I'm missing something.
1794 * dbus/dbus-message.c (decode_header_data): require error and
1795 method return messages to have a reply serial field to be valid
1796 (_dbus_message_loader_queue_messages): break up this function;
1797 validate that reply serial and plain serial are nonzero;
1798 clean up the OOM/error handling.
1799 (get_uint_field): don't return -1 from this
1800 (dbus_message_create_header): fix signed/unsigned bug
1802 * bus/connection.c (bus_connections_expect_reply): save serial of
1803 the incoming message, not reply serial
1805 2003-10-14 Havoc Pennington <hp@redhat.com>
1807 * bus/connection.c: implement pending reply tracking using
1810 * bus/bus.c (bus_context_check_security_policy): verify that a
1811 reply is pending in order to allow a reply to be sent. Deny
1812 messages of unknown type.
1814 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1816 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1817 (bus_context_get_reply_timeout): new
1819 2003-10-13 Seth Nickell <seth@gnome.org>
1821 * python/Makefile.am:
1823 Pass "make distcheck": remove a couple files from DIST_FILES
1824 that weren't included in the final version.
1826 2003-10-12 Havoc Pennington <hp@pobox.com>
1828 Added test code that 1) starts an actual bus daemon and 2) uses
1829 DBusGProxy; fixed bugs that were revealed by the test. Lots
1830 more testing possible, but this is the basic framework.
1832 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1833 empty proxy lists from the proxy list hash
1835 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1836 couple of return_if_fail checks
1838 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1839 to allocate, so everything is cleared to NULL as it should be.
1841 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1842 source as data to dbus_connection_set_timeout_functions() as the
1843 timeout functions expected
1845 * test/glib/run-test.sh: add a little script to start up a message
1846 bus and run tests using it
1848 * tools/dbus-launch.1: updates
1850 * tools/dbus-launch.c (main): add --config-file option
1852 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1853 that could never be reached.
1855 * dbus/dbus-message.c (dbus_message_new_method_return)
1856 (dbus_message_new_error, dbus_message_new_signal): set the
1857 no-reply-expected flag on all these. Redundant, but may
1858 as well be consistent.
1860 2003-10-11 Havoc Pennington <hp@pobox.com>
1862 * test/decode-gcov.c (function_solve_graph): make broken block
1863 graph a nonfatal error since it seems to be broken. Need to debug
1866 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1867 can't just check type > INVALID < LAST anymore
1869 * dbus/dbus-message.c (dbus_message_get_signature): new function
1870 (dbus_message_has_signature): new function
1871 (struct DBusMessage): add signature field (right now it isn't sent
1872 over the wire, just generated on the fly)
1873 (dbus_message_copy): copy the signature, and init strings to
1874 proper length to avoid some reallocs
1875 (dbus_message_iter_init_array_iterator): return void, since it
1877 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1878 (_dbus_message_loader_queue_messages): add silly temporary hack to
1879 fill in message->signature on load
1881 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1882 characters, so they are relatively human-readable.
1884 2003-10-11 Havoc Pennington <hp@pobox.com>
1886 * dbus/dbus-message.c (_dbus_message_test): add more test
1887 coverage, but #if 0 for now since they uncover a bug
1888 not fixed yet; I think in re_align_field_recurse()
1889 (re_align_field_recurse): add FIXME about broken assertion
1891 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1893 * bus/connection.c: share a couple code bits with expirelist.c
1895 * bus/expirelist.h, bus/expirelist.c: implement a generic
1896 expire-items-after-N-seconds facility, was going to share between
1897 expiring connections and replies, decided not to use for expiring
1898 connections for now.
1900 * COPYING: include AFL 2.0 (still need to change all the file headers)
1902 2003-10-09 Havoc Pennington <hp@redhat.com>
1904 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1905 gcc 3.3. Not that we do anything about it yet.
1907 * bus/signals.c (bus_match_rule_parse): impose max length on the
1910 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1912 2003-10-09 Havoc Pennington <hp@redhat.com>
1914 Make matching rules theoretically work (add parser).
1916 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1917 the case where destination is explicitly specified as bus driver
1918 and someone else is eavesdropping.
1920 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1921 definition of eavesdropping and assertion
1923 * tools/dbus-send.c (main): use dbus_message_type_from_string
1925 * bus/signals.c (bus_match_rule_parse): implement
1927 * dbus/dbus-message.c (dbus_message_type_from_string): new
1929 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1931 2003-10-02 Havoc Pennington <hp@pobox.com>
1933 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1934 dbus_gproxy_oneway_call
1936 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1937 (dbus_server_setup_with_g_main): fix to allow calling them more
1938 than once on the same args
1939 (dbus_bus_get_with_g_main): new function
1941 2003-10-02 Havoc Pennington <hp@redhat.com>
1943 * doc/dbus-tutorial.xml: write some stuff
1945 2003-09-29 Havoc Pennington <hp@pobox.com>
1947 * configure.in: split checks for Doxygen from XML docs, check for
1950 * doc/Makefile.am: XML-ify all the docs, and add a blank
1953 2003-09-29 Havoc Pennington <hp@pobox.com>
1955 * Merge dbus-object-names branch. To see the entire patch
1956 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1957 it's huuuuge though.
1958 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1960 2003-09-28 Havoc Pennington <hp@pobox.com>
1962 * HACKING: update to reflect new server
1964 2003-09-26 Seth Nickell <seth@gnome.org>
1967 * python/examples/example-signals.py:
1969 Start implementing some notions of signals. The API
1970 is really terrible, but they sort of work (with the
1971 exception of being able to filter by service, and to
1972 transmit signals *as* a particular service). Need to
1973 figure out how to make messages come from the service
1976 * python/dbus_bindings.pyx.in:
1978 Removed duplicate message_handler callbacks.
1980 2003-09-25 Havoc Pennington <hp@redhat.com>
1982 * bus/session.conf.in: fix my mess
1984 2003-09-25 Havoc Pennington <hp@pobox.com>
1986 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1988 2003-09-25 Seth Nickell <seth@gnome.org>
1990 * python/examples/example-service.py:
1992 Johan notices complete wrong code in example-service, but
1993 completely wrong in a way that works exactly the same (!).
1994 Johan is confused, how could this possibly work? Example
1995 code fails to serve purpose of making things clear.
1998 2003-09-25 Mark McLoughlin <mark@skynet.ie>
2000 * doc/dbus-specification.sgml: don't require header fields
2001 to be 4-byte aligned and specify that fields should be
2002 distinguished from padding by the fact that zero is not
2005 * doc/TODO: remove re-alignment item and add item to doc
2006 the OBJECT_PATH type.
2008 * dbus/dbus-message.c:
2009 (HeaderField): rename the original member to value_offset
2010 and introduce a name_offset member to keep track of where
2011 the field actually begins.
2012 (adjust_field_offsets): remove.
2013 (append_int_field), (append_uint_field),
2014 (append_string_field): don't align the start of the header
2015 field to a 4-byte boundary.
2016 (get_next_field): impl finding the next marhsalled field
2017 after a given field.
2018 (re_align_field_recurse): impl re-aligning a number of
2019 already marshalled fields.
2020 (delete_field): impl deleting a field of any type and
2021 re-aligning any following fields.
2022 (delete_int_or_uint_field), (delete_string_field): remove.
2023 (set_int_field), (set_uint_field): no need to re-check
2024 that we have the correct type for the field.
2025 (set_string_field): ditto and impl re-aligning any
2027 (decode_header_data): update to take into account that
2028 the fields aren't 4-byte aligned any more and the new
2029 way to distinguish padding from header fields. Also,
2030 don't exit when there is too much header padding.
2031 (process_test_subdir): print the directory.
2032 (_dbus_message_test): add test to make sure a following
2033 field is re-aligned correctly after field deletion.
2035 * dbus/dbus-string.[ch]:
2036 (_dbus_string_insert_bytes): rename from insert_byte and
2037 allow the insert of multiple bytes.
2038 (_dbus_string_test): test inserting multiple bytes.
2040 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2041 warning note to docs about having to re-align any
2042 marshalled values following the string.
2044 * dbus/dbus-message-builder.c:
2045 (append_string_field), (_dbus_message_data_load):
2046 don't align the header field.
2048 * dbus/dbus-auth.c: (process_test_subdir): print the
2051 * test/break-loader.c: (randomly_add_one_byte): upd. for
2054 * test/data/invalid-messages/bad-header-field-alignment.message:
2057 * test/data/valid-messages/unknown-header-field.message: shove
2058 a dict in the unknown field.
2060 2003-09-25 Seth Nickell <seth@gnome.org>
2063 * python/dbus_bindings.pyx.in:
2065 Handle return values.
2067 * python/examples/example-client.py:
2068 * python/examples/example-service.py:
2070 Pass back return values from the service to the client.
2072 2003-09-24 Seth Nickell <seth@gnome.org>
2076 Connect Object methods (when you are sharing an object) up... pass
2077 in a list of methods to be shared. Sharing all the methods just
2078 worked out too weird. You can now create nice Services over the
2081 * python/dbus_bindings.pyx.in:
2083 Keep references to user_data tuples passed into C functions so
2084 Python doesn't garbage collect on us.
2086 Implement MethodReturn and Error subclasses of Message for creating
2087 DBusMessage's of those types.
2089 * python/examples/example-client.py:
2090 * python/examples/example-service.py:
2092 Simple example code showing both how create DBus services and objects,
2093 and how to use them.
2095 2003-09-23 Havoc Pennington <hp@pobox.com>
2097 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2099 2003-09-23 Havoc Pennington <hp@redhat.com>
2101 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2102 (dbus_gproxy_disconnect_signal): implement
2103 (dbus_gproxy_manager_remove_signal_match): implement
2104 (dbus_gproxy_manager_add_signal_match): implement
2105 (dbus_gproxy_oneway_call): implement
2107 2003-09-23 Havoc Pennington <hp@pobox.com>
2109 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2110 subclass. This means dropping the transparent thread safety of the
2111 proxy; you now need a separate proxy per-thread, or your own
2112 locking on the proxy. Probably right anyway.
2113 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2115 2003-09-22 Havoc Pennington <hp@redhat.com>
2117 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2119 2003-09-21 Seth Nickell <seth@gnome.org>
2121 First checkin of the Python bindings.
2123 * python/.cvsignore:
2124 * python/Makefile.am:
2125 * python/dbus_bindings.pyx.in:
2126 * python/dbus_h_wrapper.h:
2128 Pieces for Pyrex to operate on, building a dbus_bindings.so
2129 python module for low-level access to the DBus APIs.
2133 High-level Python module for accessing DBus objects.
2138 Build stuff for the python bindings.
2142 Extra macro needed for finding the Python C header files.
2144 2003-09-21 Havoc Pennington <hp@pobox.com>
2146 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2147 implementing the proxy manager, didn't get very far.
2149 * dbus/dbus-bus.c (dbus_bus_add_match): new
2150 (dbus_bus_remove_match): new
2152 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2153 path_name argument; adjust the other not-yet-implemented
2154 gproxy constructors to be what I think they should be.
2156 2003-09-21 Havoc Pennington <hp@pobox.com>
2158 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2159 by default for message bus connections.
2161 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2162 exit_on_disconnect flag is set and we process the disconnected
2164 (dbus_connection_set_exit_on_disconnect): new function
2166 2003-09-21 Havoc Pennington <hp@pobox.com>
2168 Get matching rules mostly working in the bus; only actually
2169 parsing the rule text remains. However, the client side of
2170 "signal connections" hasn't been started, this patch is only the
2173 * dbus/dispatch.c: fix for the matching rules changes
2175 * bus/driver.c (bus_driver_handle_remove_match)
2176 (bus_driver_handle_add_match): send an ack reply from these
2179 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2180 arguments, reported by Seth Nickell
2182 * bus/config-parser.c (append_rule_from_element): support
2183 eavesdrop=true|false attribute on policies so match rules
2184 can be prevented from snooping on the system bus.
2186 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2187 and "destination" in attribute names; fix some docs bugs;
2188 add eavesdrop=true|false attribute
2190 * bus/driver.c (bus_driver_handle_add_match)
2191 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2194 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2195 rid of broadcast service concept, signals are just always broadcast
2197 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2198 mostly implement matching rules stuff (currently only exposed as signal
2201 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2203 * doc/dbus-specification.sgml: Change the header field name
2204 to be an enum and update the rest of the spec to reference
2205 the fields using the conventinal name.
2207 * dbus/dbus-protocol.h: update to reflect the spec.
2209 * doc/TODO: add item to remove the 4 byte alignment requirement.
2211 * dbus/dbus-message.c: Remove the code to generalise the
2212 header/body length and serial number header fields as named
2213 header fields so we can reference field names using the
2215 (append_int_field), (append_uint_field), (append_string_field):
2216 Append the field name as a byte rather than four chars.
2217 (delete_int_or_uint_field), (delete_string_field): reflect the
2218 fact that the field name and typecode now occupy 4 bytes instead
2220 (decode_string_field), (decode_header_data): update to reflect
2221 protocol changes and move the field specific encoding from
2222 decode_string_field() back into decode_header_data().
2224 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2225 Add utility to aid debugging.
2227 * dbus/dbus-message-builder.c:
2228 (append_string_field), (_dbus_message_data_load): Update to
2229 reflect protocol changes; Change the FIELD_NAME directive
2230 to HEADER_FIELD and allow it to take the field's conventional
2231 name rather than the actual value.
2233 * test/data/*/*.message: Update to use HEADER_FIELD instead
2234 of FIELD_NAME; Always align the header on an 8 byte boundary
2235 *before* updating the header length.
2237 2003-09-15 Havoc Pennington <hp@pobox.com>
2239 * dbus/dbus-pending-call.c: add the get/set object data
2240 boilerplate as for DBusConnection, etc. Use generic object data
2241 for the notify callback.
2243 * glib/dbus-gparser.c (parse_node): parse child nodes
2245 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2247 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2248 contain functions shared between the convenience lib and the
2251 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2252 -export-symbols-regex to the GLib library
2254 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2255 fix the locking in here, and add a default handler for
2256 Introspect() that just returns sub-nodes.
2258 2003-09-14 Havoc Pennington <hp@pobox.com>
2260 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2261 rather than gfoo consistent
2263 * glib/dbus-gproxy.h: delete for now, move contents to
2264 dbus-glib.h, because the include files don't work right since we
2265 aren't in the dbus/ subdir.
2267 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2268 (dbus_gproxy_end_call): finish
2269 (dbus_gproxy_begin_call): finish
2271 * glib/dbus-gmain.c (dbus_set_g_error): new
2273 * glib/dbus-gobject.c (handle_introspect): include information
2274 about child nodes in the introspection
2276 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2277 function to help in implementation of introspection
2279 * dbus/dbus-object-tree.c
2280 (_dbus_object_tree_list_registered_and_unlock): new function
2282 2003-09-12 Havoc Pennington <hp@pobox.com>
2284 * glib/dbus-gidl.h: add common base class for all the foo_info
2287 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2290 * test/Makefile.am: try test srcdir -ef . in addition to test
2291 srcdir = ., one of them should work (yeah lame)
2293 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2296 * glib/dbus-gparser.h: make description_load routines return
2297 NodeInfo* not Parser*
2299 * Makefile.am (SUBDIRS): build test dir after all library dirs
2301 * configure.in: add GTK+ detection
2303 2003-09-07 Havoc Pennington <hp@pobox.com>
2305 * Make Doxygen contented.
2307 2003-09-07 Havoc Pennington <hp@pobox.com>
2309 * doc/dbus-specification.sgml: more updates
2311 2003-09-06 Havoc Pennington <hp@pobox.com>
2313 * doc/dbus-specification.sgml: partial updates
2315 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2316 zillionth time; hopefully I edited the right file this time.
2318 * bus/config-parser.c (append_rule_from_element): support
2319 send_type, send_path, receive_type, receive_path
2321 * bus/policy.c: add message type and path to the list of things
2322 that can be "firewalled"
2324 2003-09-06 Havoc Pennington <hp@pobox.com>
2326 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2327 (dbus_connection_register_object_path): make this not handle
2328 messages to paths below the given path
2330 2003-09-03 Havoc Pennington <hp@pobox.com>
2332 * test/glib/Makefile.am: add this with random glib-linked test
2335 * glib/Makefile.am: remove the random test programs from here,
2336 leave only the unit tests
2338 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2339 uscore/javacaps conversion, and fix
2340 (get_object_property, set_object_property): change to .NET
2341 convention for mapping props to methods, set_FooBar/get_FooBar,
2342 since one language has such a convention we may as well copy it.
2343 Plus real methods in either getFooBar or get_foo_bar style won't
2344 collide with this convention.
2346 2003-09-01 Havoc Pennington <hp@pobox.com>
2348 * glib/dbus-gparser.c: implement
2350 * glib/dbus-gobject.c: start implementing skeletons support
2352 * configure.in: when disabling checks/assert, also define
2353 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2355 2003-09-01 Havoc Pennington <hp@pobox.com>
2357 * glib/Makefile.am: rearrange a bunch of files and get "make
2358 check" framework set up
2360 2003-08-31 Havoc Pennington <hp@pobox.com>
2362 * fix build with --disable-tests
2364 2003-08-30 Havoc Pennington <hp@pobox.com>
2366 * dbus/dbus-connection.c: purge DBusMessageHandler
2368 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2369 use callbacks everywhere
2371 2003-08-30 Havoc Pennington <hp@pobox.com>
2373 * test/data/valid-config-files/system.d/test.conf: change to
2374 root for the user so warnings don't get printed
2376 * dbus/dbus-message.c: add dbus_message_get_path,
2377 dbus_message_set_path
2379 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2380 dispatching to a path
2382 * dbus/dbus-string.c (_dbus_string_validate_path): add
2384 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2385 (_dbus_marshal_object_path): implement
2387 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2388 to contain the path to the target object
2389 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2390 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2392 2003-08-30 Havoc Pennington <hp@pobox.com>
2394 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2396 2003-08-29 Havoc Pennington <hp@pobox.com>
2398 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2400 (struct DBusObjectSubtree): shrink this
2401 a lot, since we may have a lot of them
2402 (_dbus_object_tree_free_all_unlocked): implement
2403 (_dbus_object_tree_dispatch_and_unlock): implement
2405 2003-08-29 Havoc Pennington <hp@pobox.com>
2407 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2409 2003-08-28 Havoc Pennington <hp@pobox.com>
2413 * dbus/dbus-connection.c: port to no ObjectID, create a
2414 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2416 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2417 everything except UnregisterFunction and MessageFunction
2419 * dbus/dbus-marshal.c: port away from DBusObjectID,
2420 add DBUS_TYPE_OBJECT_PATH
2422 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2423 dbus/dbus-objectid.[hc]: remove these, we are moving to
2424 path-based object IDs
2426 2003-08-25 Havoc Pennington <hp@pobox.com>
2428 Just noticed that dbus_message_test is hosed, I wonder when I
2429 broke that. I thought make check was passing earlier...
2431 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2432 container tree, will replace most of dbus-object-registry
2434 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2437 2003-08-19 Havoc Pennington <hp@pobox.com>
2439 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2440 (dbus_message_is_error): fix this function
2442 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2445 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2446 reflect clarified man page
2447 (bus_client_policy_check_can_send): ditto
2449 * bus/session.conf.in: fixup
2451 * bus/system.conf.in: fixup
2453 2003-08-18 Havoc Pennington <hp@redhat.com>
2455 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2457 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2458 dumb bug created earlier (wrong order of args to
2459 decode_header_data())
2461 * tools/dbus-send.c: port
2463 * tools/dbus-print-message.c (print_message): port
2465 * test/data/*messages: port all messages over
2467 * dbus/dbus-message-builder.c: support including
2470 * bus/driver.c: port over
2472 * bus/dispatch.c: port over to new stuff
2474 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2475 rename disconnect signal to "Disconnected"
2477 2003-08-17 Havoc Pennington <hp@pobox.com>
2479 This doesn't compile yet, but syncing up so I can hack on it from
2480 work. What are branches for if not broken code? ;-)
2482 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2483 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2484 DBUS_HEADER_FIELD_ERROR_NAME
2486 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2487 for the interface+member pairs
2488 (string_hash): change to use g_str_hash algorithm
2489 (find_direct_function, find_string_function): refactor these to
2492 * dbus/dbus-message.c: port all of this over to support
2493 interface/member fields instead of name field
2495 * dbus/dbus-object-registry.c: port over
2497 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2498 from _dbus_string_validate_name
2500 * bus/dbus-daemon-1.1: change file format for the
2501 <deny>/<allow> stuff to match new message naming scheme
2503 * bus/policy.c: port over
2505 * bus/config-parser.c: parse new format
2507 2003-08-16 Havoc Pennington <hp@pobox.com>
2509 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2512 * glib/dbus-gproxy.c: some hacking
2514 2003-08-15 Havoc Pennington <hp@redhat.com>
2516 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2518 * dbus/dbus-connection.c
2519 (dbus_connection_send_with_reply_and_block): factor out internals;
2520 change to convert any error replies to DBusError instead of
2521 returning them as a message
2523 2003-08-15 Havoc Pennington <hp@pobox.com>
2525 * dbus/dbus-connection.c,
2526 dbus/dbus-pending-call.c: Finish the pending call stuff
2528 2003-08-14 Havoc Pennington <hp@redhat.com>
2530 * dbus/dbus-pending-call.c: start on new object that will replace
2531 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2534 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2535 with remote interfaces
2537 * dbus/dbus-gidl.c: do the boring boilerplate in here
2539 2003-08-12 Havoc Pennington <hp@pobox.com>
2541 * bus/dispatch.c (bus_dispatch): make this return proper
2542 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2544 * dbus/dbus-errors.c (dbus_set_error): use
2545 _dbus_string_append_printf_valist
2547 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2548 (_dbus_string_append_printf): new
2550 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2553 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2554 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2555 message is unhandled.
2557 2003-08-11 Havoc Pennington <hp@pobox.com>
2559 * bus/test.c (client_disconnect_handler): change to return
2560 HANDLED (would have been REMOVE_MESSAGE)
2562 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2563 HANDLED/NOT_YET_HANDLED instead of
2564 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2567 2003-08-10 Havoc Pennington <hp@pobox.com>
2569 * tools/dbus-send.c (main): add --type argument, for now
2570 supporting only method_call and signal types.
2572 * tools/dbus-print-message.c: print message type
2574 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2575 init connection->objects
2577 * doc/dbus-specification.sgml: fix sgml
2579 * bus/*.c: port over to object-instance API changes
2581 * test/test-service.c: ditto
2583 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2584 name, we will have to fix up the rest of the code to also handle
2586 (dbus_message_new): generic message-creation call
2587 (set_string_field): allow appending name field
2589 2003-08-06 Havoc Pennington <hp@pobox.com>
2591 * dbus/dbus-object-registry.c: implement signal connection
2594 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2596 * dbus/dbus-internals.c (_dbus_memdup): new function
2598 2003-08-02 Havoc Pennington <hp@pobox.com>
2600 * dbus/dbus-message.c (dbus_message_get_no_reply)
2601 (dbus_message_set_no_reply): add these and remove
2602 set_is_error/get_is_error
2604 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2605 remove the ERROR flag, since there's now an ERROR type
2607 2003-08-01 Havoc Pennington <hp@pobox.com>
2609 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2612 * dbus/dbus-message.c (dbus_message_get_type): new function
2614 * doc/dbus-specification.sgml: add "type" byte to messages
2616 2003-08-01 Havoc Pennington <hp@pobox.com>
2618 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2619 a message type enum to distinguish kinds of message
2620 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2621 that need not be replied to
2623 2003-08-01 Havoc Pennington <hp@pobox.com>
2625 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2626 (unpack_8_octets): fix no-64-bit-int bug
2628 * dbus/dbus-object-registry.c (validate_id): validate the
2629 connection ID bits, not just the instance ID.
2631 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2632 the connection-global 33 bits of the object ID
2634 * dbus/dbus-object-registry.c (info_from_entry): fill in
2635 object ID in the new way
2637 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2638 define server/client/instance bits.
2640 2003-07-30 Havoc Pennington <hp@pobox.com>
2642 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2645 2003-07-13 Havoc Pennington <hp@pobox.com>
2647 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2648 fields to DBusObjectVTable and DBusObjectInfo
2650 2003-07-12 Havoc Pennington <hp@pobox.com>
2652 * dbus/dbus-object-registry.c: implement unit test,
2653 fix bugs discovered in process
2655 * dbus/dbus-connection.c: remove handler_table and
2656 register_handler(), add DBusObjectRegistry usage
2658 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2659 (dbus_object_id_set_null): new functions
2661 2003-07-08 Havoc Pennington <hp@pobox.com>
2663 * dbus/dbus-object.c: implement some of this
2665 * dbus/dbus-object-registry.c
2666 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2668 (_dbus_object_registry_new): handle OOM
2670 2003-07-08 Havoc Pennington <hp@pobox.com>
2672 * dbus/dbus-object.h: sketch out an API for registering objects
2673 with a connection, that allows us to use as little as 24 bytes
2674 per object and lets application code represent an object in
2675 any conceivable way.
2677 * dbus/dbus-object-registry.c: implement the hard bits of the
2678 DBusConnection aspect of object API. Not yet wired up.
2680 2003-07-06 Havoc Pennington <hp@pobox.com>
2682 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2683 (_dbus_marshal_object_id): new
2684 (_dbus_demarshal_object_id): new
2685 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2686 consolidate identical switch cases. Don't conditionalize handling
2687 of DBUS_TYPE_UINT64, need to handle the type always.
2688 (_dbus_marshal_validate_arg): consolidate identical cases, and
2689 handle DBUS_TYPE_OBJECT_ID
2691 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2693 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2695 2003-09-28 Havoc Pennington <hp@pobox.com>
2699 2003-09-28 Havoc Pennington <hp@pobox.com>
2701 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2702 to work with Debian db2html
2704 2003-09-28 Havoc Pennington <hp@pobox.com>
2706 * configure.in: 0.13
2708 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2709 stylesheet-images for benefit of Debian
2711 Change back to using filesystem-linked sockets for the system
2712 bus, so only root can create the default system bus address.
2714 * bus/system.conf.in: change to use
2715 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2717 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2720 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2721 here, and AC_DEFINE DBUS_SYSTEM_PATH
2723 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2726 * doc/busconfig.dtd:
2729 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2731 * doc/dbus-specification.sgml:
2732 Add activation reply values.
2734 2003-08-05 Havoc Pennington <hp@redhat.com>
2736 * configure.in: 0.12
2738 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2740 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2741 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2742 (add_watch), (remove_watch), (create_source):
2743 Refcount fds, fixes some reentrancy issues.
2745 2003-07-30 Havoc Pennington <hp@redhat.com>
2747 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2748 bus address to be abstract if we have abstract sockets
2752 2003-07-28 Havoc Pennington <hp@redhat.com>
2754 * bus/messagebus.in: fix to avoid processname/servicename
2755 confusion, from Michael Kearey
2756 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2758 2003-07-23 Havoc Pennington <hp@pobox.com>
2760 * dbus/dbus-message.c (dbus_message_iter_get_named):
2761 fix from Andy Hanton to remove broken "+1"
2763 2003-07-16 Havoc Pennington <hp@pobox.com>
2765 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2766 babysitter process, as suggested by Thomas Leonard, so
2767 an "eval `dbus-launch --exit-with-session`" will actually
2770 2003-07-16 Havoc Pennington <hp@pobox.com>
2772 * configure.in: print out EXPANDED_* variables in the summary at
2773 the end; clean up the code that computes EXPANDED_ variables and
2774 get the ones using exec_prefix right. Should make things work
2775 when you build without --prefix
2777 2003-06-29 Havoc Pennington <hp@pobox.com>
2779 * mono/Test.cs (class Test): fire up a main loop and run it
2781 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2782 done once, the app has to do it
2784 2003-06-26 Havoc Pennington <hp@pobox.com>
2786 * mono/Connection.cs: set up connection with the glib main loop
2788 2003-07-01 Havoc Pennington <hp@redhat.com>
2790 * doc/dbus-specification.sgml: clarify the format of a type code,
2791 change suggested by Jim Blandy
2793 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2796 * tools/Makefile.am: Don't assume srcdir == builddir.
2798 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2799 the allocated block.
2800 (_dbus_memory_test): New function.
2801 * dbus/dbus-test.h: Add _dbus_memory_test ().
2802 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2804 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2806 (dbus_message_new): Remove obsolete @todo.
2808 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2809 (_dbus_marshal_set_uint64): Fix comment.
2811 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2812 hardcode FIELD_REPLY_SERIAL.
2814 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2815 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2817 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2818 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2820 2003-06-24 Havoc Pennington <hp@pobox.com>
2822 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2824 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2830 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2831 * gcj/org/.cvsignore:
2832 * gcj/org/Makefile.am:
2833 * gcj/org/freedesktop/.cvsignore:
2834 * gcj/org/freedesktop/Makefile.am:
2835 * gcj/org/freedesktop/dbus/.cvsignore:
2836 * gcj/org/freedesktop/dbus/Makefile.am:
2837 * gcj/org/freedesktop/dbus/Message.java: (Message),
2839 * gcj/org/freedesktop/dbus/natMessage.cc:
2840 Fix the build system.
2842 2003-06-22 Havoc Pennington <hp@pobox.com>
2844 * mono/Connection.cs: add more bindings
2846 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2849 2003-06-22 Havoc Pennington <hp@pobox.com>
2851 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2852 Start wrapping more stuff.
2854 2003-06-22 Havoc Pennington <hp@pobox.com>
2856 * mono/Message.cs: implement Message.Wrap() that ensures we only
2857 have a single C# wrapper per DBusMessage, assuming it works which
2858 it probably doesn't.
2860 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2861 (dbus_message_free_data_slot): new
2862 (dbus_message_set_data): new
2863 (dbus_message_get_data): new
2865 2003-06-22 Havoc Pennington <hp@pobox.com>
2867 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2868 (_dbus_data_slot_allocator_alloc): rework these to keep a
2869 reference count on each slot and automatically manage a global
2870 slot ID variable passed in by address
2872 * bus/bus.c: convert to new dataslot API
2874 * dbus/dbus-bus.c: convert to new dataslot API
2876 * dbus/dbus-connection.c: convert to new dataslot API
2878 * dbus/dbus-server.c: convert to new dataslot API
2880 * glib/dbus-gmain.c: ditto
2884 * bus/connection.c: ditto
2886 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2888 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2889 after the gcj checks so that the correct configuration tags
2890 will be added to libtool.
2892 * dbus-glib-1.pc.in: No need to specify any includes since
2893 dbus-1.pc.in has those.
2895 2003-06-22 Havoc Pennington <hp@pobox.com>
2897 * mono/*, gcj/*, configure.in, Makefile.am:
2898 Check in makefiles and subdirs for mono and gcj bindings.
2899 Neither binding actually exists, just trying to get through
2900 all the build and other boring bits.
2902 2003-06-21 Philip Blundell <philb@gnu.org>
2904 * tools/dbus-monitor.1: Updated.
2906 * tools/dbus-send.1: Likewise.
2908 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2910 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2911 for hangup and error after checking read so we won't discard
2912 pending data if both hangup and read are set.
2914 2003-06-19 Philip Blundell <philb@gnu.org>
2916 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2918 * tools/dbus-send.c: Accept both --system and --session.
2920 * tools/dbus-monitor.c: Same here.
2922 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2924 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2925 from C++ (Patch by Miloslav Trmac).
2927 2003-06-15 Joe Shaw <joe@assbarn.com>
2929 * configure.in: Check for socklen_t.
2931 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2933 * test/test-segfault.c: Add #include <sys/time.h>
2935 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2936 dbus-launch needs it.
2938 2003-06-09 Havoc Pennington <hp@redhat.com>
2940 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2941 SUN_LEN, it breaks abstract socket usage
2943 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2946 2003-06-04 Havoc Pennington <hp@pobox.com>
2948 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2949 using unix:abstract=/foo, and when listening in a tmpdir
2950 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2952 * dbus/dbus-transport.c (_dbus_transport_open): support
2955 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2956 support abstract sockets
2958 * dbus/dbus-transport-unix.c
2959 (_dbus_transport_new_for_domain_socket): support abstract sockets
2961 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2962 toggle as an argument, implement abstract namespace support
2963 (_dbus_listen_unix_socket): ditto
2965 * configure.in: add --enable-abstract-sockets and implement
2966 a configure check for autodetection of the right value.
2968 2003-06-01 Havoc Pennington <hp@pobox.com>
2970 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2971 in /tmp (though on Linux this will end up being useless,
2972 when we add abstract namespace support)
2974 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2977 2003-05-28 Colin Walters <walters@verbum.org>
2979 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2981 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2983 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2985 2003-05-17 Colin Walters <walters@gnu.org>
2987 * tools/dbus-send.c: Don't exit with an error code if --help was
2988 passed. Default to using the session bus instead of the system
2991 * tools/dbus-launch.c: Ditto.
2993 * tools/dbus-monitor.c: Ditto.
2995 * tools/dbus-send.1: Update with new arguments.
2997 * tools/dbus-launch.c: Emit code to export variables. New
2998 arguments -s and -c to specify shell syntax, and a bit of code to
2999 autodetect syntax. Also, allow specifying a program to run.
3001 * tools/dbus-launch.1: Update with new arguments.
3003 * tools/dbus-send.1: Ditto.
3005 * tools/dbus-monitor.1: Ditto.
3007 2003-05-17 Havoc Pennington <hp@pobox.com>
3009 * bus/config-parser.c (merge_included): merge in policies from
3010 child configuration file.
3012 * bus/policy.c (bus_policy_merge): function to merge two policies
3015 2003-05-16 Havoc Pennington <hp@redhat.com>
3017 * dbus/dbus-connection.c: disable verbose lock spew
3019 * tools/dbus-send.c: add --print-reply command line option
3021 * tools/dbus-print-message.h (print_message): new util function
3022 shared by dbus-send and dbus-monitor
3024 * tools/dbus-monitor.c (handler_func): exit on disconnect
3026 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3027 disconnected, don't try to use the read_watch
3029 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3030 so we can find this bug more easily
3032 2003-05-16 Havoc Pennington <hp@redhat.com>
3034 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3035 NULL as DBusHashTable is annoyingly likely to do.
3037 2003-05-16 Colin Walters <walters@verbum.org>
3039 * tools/dbus-monitor.c: Add --session argument and usage()
3042 * tools/dbus-monitor.1: Update with new --session arg.
3044 * bus/Makefile.am (install-data-hook): Create
3045 $(libdir)/dbus-1.0/services so that the session bus is happy.
3047 2003-05-15 Havoc Pennington <hp@redhat.com>
3049 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3050 on non-x86. ifdef's are evil.
3052 2003-05-15 Havoc Pennington <hp@redhat.com>
3054 * configure.in: 0.11
3058 * bus/Makefile.am (initddir): apparently we are supposed to put
3059 init scripts in /etc/rc.d/init.d not /etc/init.d
3061 * bus/Makefile.am: remove the "you must --enable-tests to make
3062 check" as it broke distcheck
3064 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3066 2003-05-13 James Willcox <jwillcox@gnome.org>
3069 * bus/activation.c: (bus_activation_service_created),
3070 (bus_activation_activate_service):
3071 * bus/driver.c: (bus_driver_send_service_deleted),
3072 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3073 (bus_driver_send_service_acquired),
3074 (bus_driver_send_welcome_message),
3075 (bus_driver_handle_list_services):
3076 * bus/session.conf.in:
3077 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3078 (dbus_bus_service_exists), (dbus_bus_activate_service):
3081 Add some convenience API which lets you activate a service, and did a
3082 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3083 and dbus_message_get_args()
3085 2003-05-11 Havoc Pennington <hp@pobox.com>
3087 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3088 calling _dbus_marshal_validate_arg() for every byte in a byte
3091 * dbus/dbus-message-handler.c: use atomic reference counting to
3092 reduce number of locks slightly; the global lock in here sucks
3094 * dbus/dbus-connection.c
3095 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3096 update_dispatch_status that can be called with lock held; then use
3097 in a couple places to reduce locking/unlocking
3098 (dbus_connection_send): hold the lock over the whole function
3099 instead of acquiring it twice.
3101 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3103 * bus/connection.c (bus_connections_setup_connection): fix access
3104 to already-freed memory.
3106 * dbus/dbus-connection.c: keep a little cache of linked list
3107 nodes, to avoid using the global linked list alloc lock in the
3108 normal send-message case. Instead we just use the connection lock
3109 that we already have to take.
3111 * dbus/dbus-list.c (_dbus_list_find_last): new function
3113 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3114 change to use a struct for the atomic type; fix docs,
3115 they return value before increment, not after increment.
3117 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3118 (_dbus_string_append_8_aligned): new functions to try to
3119 microoptimize this operation.
3120 (reallocate_for_length): break this out of set_length(), to
3121 improve profile info, and also so we can consider inlining the
3124 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3125 strings with some preallocation, cuts down on our calls to realloc
3126 a fair bit. Though if we can get the "move entire string to empty
3127 string" optimization below to kick in here, it would be better.
3129 * dbus/dbus-string.c (_dbus_string_move): just call
3130 _dbus_string_move_len
3131 (_dbus_string_move_len): add a special case for moving
3132 an entire string into an empty string; we can just
3133 swap the string data instead of doing any reallocs.
3134 (_dbus_string_init_preallocated): new function
3136 2003-05-11 Havoc Pennington <hp@pobox.com>
3138 Write a "test-profile" that does echo client-server with threads;
3139 profile reveals lock contention, memcpy/realloc of buffers, and
3140 UTF-8 validation as hot spots. 20% of lock contention eliminated
3141 with dbus_atomic_inc/dec implementation on x86. Much remaining
3142 contention is global mempool locks for GList and DBusList.
3144 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3147 * dbus/dbus-connection.c (struct DBusConnection): use
3148 dbus_atomic_t for the reference count
3150 * dbus/dbus-message.c (struct DBusMessage): declare
3151 dbus_atomic_t values as volatile
3153 * configure.in: code to detect ability to use atomic integer
3154 operations in assembly, from GLib patch
3156 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3157 time, tired of it being wrong in threads and forked processes
3159 * glib/test-profile.c: a little program to bounce messages back
3160 and forth between threads and eat CPU
3162 * dbus/dbus-connection.c: add debug spew macros for debugging
3163 thread locks; include config.h at top; fix deadlock in
3164 dbus_connection_flush()
3166 2003-05-08 Havoc Pennington <hp@pobox.com>
3168 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3169 data from getting written, and there wasn't a good reason to
3172 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3173 dbus_verbose lines in test coverage
3174 (main): add list of functions sorted by # of untested blocks
3175 to the coverage report
3177 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3179 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3181 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3182 extend test coverage
3184 * test/data/auth/cancel.auth-script: test canceling an
3187 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3188 aren't used. in CVS history if we end up needing them.
3190 2003-05-04 Havoc Pennington <hp@pobox.com>
3192 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3195 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3196 function, which assumed length was in # of strings, not bytes
3198 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3201 * dbus/dbus-connection.c
3202 (_dbus_connection_queue_received_message): disable function for
3203 now, we are only using it in test mode
3205 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3206 remove a mistaken FIXME
3208 2003-05-04 Havoc Pennington <hp@pobox.com>
3210 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3211 unlock mutex on successful return, patch from Anders Gustafsson
3213 2003-05-04 Havoc Pennington <hp@pobox.com>
3215 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3218 2003-05-04 Havoc Pennington <hp@pobox.com>
3220 * tools/dbus-launch.c: implement
3222 * bus/main.c (main), bus/bus.c (bus_context_new):
3223 implement --print-pid and --fork
3225 2003-05-03 Havoc Pennington <hp@redhat.com>
3227 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3228 the address had no value, and add to test suite. Fix and
3229 regression test from Miloslav Trmac
3231 2003-05-03 Havoc Pennington <hp@pobox.com>
3233 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3234 watch is invalid when handled
3236 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3237 dbus-launch utility to launch the bus from a shell script. Didn't
3238 actually implement dbus-launch yet, it's just a placeholder still.
3240 2003-05-03 Havoc Pennington <hp@pobox.com>
3242 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3243 daemon; also documents daemon config file, so replaces
3244 doc/config-file.txt. Corrected some stuff from config-file.txt in
3245 the process of moving it.
3247 2003-05-03 Havoc Pennington <hp@pobox.com>
3249 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3252 2003-05-03 Colin Walters <walters@verbum.org>
3254 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3255 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3257 * Makefile.am: Update to use new .pc versioning scheme.
3259 2003-05-02 Havoc Pennington <hp@redhat.com>
3261 * bus/system.conf.in: allow send/receive to/from message bus
3264 2003-04-30 Havoc Pennington <hp@redhat.com>
3266 * configure.in: print a note when building with unit tests and
3269 2003-04-30 Havoc Pennington <hp@redhat.com>
3271 * Makefile.am: add a check-local that complains if you didn't
3272 configure with --enable-tests
3274 2003-04-29 Havoc Pennington <hp@redhat.com>
3276 * glib/dbus-gmain.c: docs cleanups
3278 * dbus/dbus-types.h: add docs on int64 types
3280 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3281 public API docs section
3283 2003-04-29 Havoc Pennington <hp@redhat.com>
3285 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3286 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3287 parallel install API version, not with the D-BUS package version.
3289 * HACKING: move some of README over here
3291 * README: updates, and document API/ABI policy
3293 * configure.in: reindentation
3295 2003-04-29 Havoc Pennington <hp@redhat.com>
3297 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3298 to use this library" to be sure people have the right
3301 2003-04-28 Havoc Pennington <hp@redhat.com>
3303 * configure.in: add --enable-docs which by default is auto yes if
3304 doxygen and db2html found, no otherwise; but can be forced on/off
3306 * doc/Makefile.am: conditionalize whether to build docs on
3309 2003-04-28 Havoc Pennington <hp@redhat.com>
3311 * configure.in: 0.10
3315 * bus/system.conf.in: add <includedir>system.d</includedir>
3317 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3318 username was provided but not uid
3320 * bus/config-parser.c (struct BusConfigParser): keep track of
3321 whether the parser is toplevel or was included; change some
3322 of the error handling if it's included.
3324 2003-04-27 Havoc Pennington <hp@pobox.com>
3328 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3329 report correct status if we finish processing authentication
3330 inside this function.
3332 * bus/activation.c (try_send_activation_failure): use
3333 bus_transaction_send_error_reply
3335 * bus/connection.c (bus_connection_get_groups): return an error
3336 explaining the problem
3338 * bus/bus.c (bus_context_check_security_policy): implement
3339 restriction here that inactive connections can only send the
3340 hello message. Also, allow bus driver to send anything to
3343 * bus/connection.c (bus_connection_complete): create the
3344 BusClientPolicy here instead of on-demand.
3345 (bus_connection_get_policy): don't return an error
3347 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3348 sender field in message being replied to
3350 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3351 causing it to return FALSE always
3353 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3354 we checked sender rather than destination
3356 2003-04-25 Havoc Pennington <hp@redhat.com>
3358 test suite is slightly hosed at the moment, will fix soon
3360 * bus/connection.c (bus_connections_expire_incomplete): fix to
3361 properly disable the timeout when required
3362 (bus_connection_set_name): check whether we can remove incomplete
3363 connections timeout after we complete each connection.
3365 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3366 probably still broken.
3368 * bus/services.c (bus_registry_acquire_service): implement max
3369 number of services owned, and honor allow/deny rules on which
3370 services a connection can own.
3372 * bus/connection.c (bus_connection_get_policy): report errors here
3374 * bus/activation.c: implement limit on number of pending
3377 2003-04-25 Havoc Pennington <hp@redhat.com>
3379 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3380 where we used >= 0 instead of != DBUS_UID_UNSET.
3382 2003-04-25 Havoc Pennington <hp@redhat.com>
3384 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3385 were toggled without add/remove, fix from Anders Gustafsson
3387 2003-04-24 Havoc Pennington <hp@redhat.com>
3389 * test/data/valid-config-files/basic.conf: add <limit> tags to
3392 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3393 <limit> tag in configuration file.
3395 2003-04-24 Havoc Pennington <hp@redhat.com>
3397 * bus/dispatch.c: somehow missed some name_is
3399 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3400 (_dbus_timeout_set_interval): new
3402 * bus/connection.c (bus_connections_setup_connection): record time
3403 when each connection is first set up, and expire them after the
3404 auth timeout passes.
3406 2003-04-24 Havoc Pennington <hp@redhat.com>
3408 * dbus/dbus-message.c (dbus_message_name_is): rename
3409 (dbus_message_service_is): rename
3410 (dbus_message_sender_is): rename
3411 (dbus_message_get_service): rename
3413 2003-04-24 Havoc Pennington <hp@redhat.com>
3415 * configure.in: add --enable-checks
3417 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3419 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3420 to use thread locks.
3421 (_dbus_connection_handler_destroyed_locked): move some private
3422 functions into proper docs group
3424 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3425 _dbus_return_val_if_fail
3427 Throughout: use dbus_return_if_fail
3429 2003-04-23 James Willcox <jwillcox@gnome.org>
3432 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3433 (dbus_connection_setup_with_g_main),
3434 (dbus_server_setup_with_g_main):
3435 * glib/test-dbus-glib.c: (main):
3436 * glib/test-thread-client.c: (main):
3437 * glib/test-thread-server.c: (new_connection_callback), (main):
3438 * tools/dbus-monitor.c: (main):
3440 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3441 and dbus_server_setup_with_g_main().
3443 2003-04-20 Havoc Pennington <hp@pobox.com>
3445 * doc/dbus-specification.sgml: document the restrictions on
3446 message and service names
3448 2003-04-22 Havoc Pennington <hp@redhat.com>
3450 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3451 support, and do some code cleanups to share more code and
3452 speed up array marshal/demarshal.
3454 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3456 * configure.in: generate dbus-arch-deps.h
3458 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3461 2003-04-22 Havoc Pennington <hp@redhat.com>
3463 * test/data/valid-messages/opposite-endian.message: fix test
3464 to use proper type for rply field
3466 * test/data/invalid-messages: add tests for below validation
3468 * dbus/dbus-message.c (decode_header_data): validate field types,
3469 and validate that named fields are valid names
3470 (decode_name_field): consider messages in the
3471 org.freedesktop.Local. namespace to be invalid.
3473 * dbus/dbus-string.c (_dbus_string_validate_name): new
3475 2003-04-19 Havoc Pennington <hp@pobox.com>
3477 * bus/driver.c (bus_driver_handle_hello): check limits and
3478 return an error if they are exceeded.
3480 * bus/connection.c: maintain separate lists of active and inactive
3481 connections, and a count of each. Maintain count of completed
3482 connections per user. Implement code to check connection limits.
3484 * dbus/dbus-list.c (_dbus_list_unlink): export
3486 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3487 number of bytes in the message queue for a connection
3489 2003-04-18 Havoc Pennington <hp@pobox.com>
3491 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3493 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3496 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3497 on realloc be sure to update the pointer in the keyring
3499 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3500 offset to avoid writing to unallocated memory
3502 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3503 try the next mechanism, so we properly handle OOM
3505 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3507 (_dbus_keyring_new): fix OOM bug
3508 (_dbus_keyring_new_homedir): always set error; impose a maximum
3509 number of keys we'll load from the file, mostly to speed up the
3510 test suite and make its OOM checks more useful, but also for
3513 * dbus/dbus-auth.c (process_error_server): reject authentication
3514 if we get an error from the client
3515 (process_cancel): on cancel, send REJECTED, per the spec
3516 (process_error_client): send CANCEL if we get an error from the
3519 2003-04-18 Havoc Pennington <hp@pobox.com>
3521 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3524 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3527 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3528 about DBUS_TEST_HOMEDIR once
3530 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3533 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3534 config file so we test the right thing
3536 Throughout: assorted docs improvements
3538 2003-04-18 Havoc Pennington <hp@pobox.com>
3540 * glib/dbus-gmain.c: adapt to watch changes
3542 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3544 * dbus/dbus-server.h: remove dbus_server_handle_watch
3546 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3548 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3549 like DBusTimeout, so we don't need dbus_connection_handle_watch
3552 2003-04-17 Havoc Pennington <hp@redhat.com>
3554 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3555 database usage so it all goes via the DBusUserDatabase cache.
3557 2003-04-17 Havoc Pennington <hp@redhat.com>
3559 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3560 there was an OOM watch we skipped, we always return TRUE so we
3561 iterate again to have a look at it again. Fixes test suite hang.
3562 Code rearrangement also lets us lose some memset and only iterate
3563 over callbacks once.
3565 * bus/driver.c (bus_driver_handle_message): sense of test for
3568 2003-04-16 Havoc Pennington <hp@pobox.com>
3570 * doc/dbus-specification.sgml: make spec say serials are unsigned
3572 * dbus/dbus-message.h: change message serials to unsigned
3574 * dbus/dbus-connection.c: adapt to message serials being unsigned
3576 2003-04-15 Havoc Pennington <hp@pobox.com>
3578 * bus/bus.c: create and keep around a shared DBusUserDatabase
3581 * bus/connection.c (bus_connection_get_groups): don't cache
3582 groups for user in the connection object, since user database
3583 object now does that.
3585 2003-04-16 Havoc Pennington <hp@redhat.com>
3587 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3588 list of size counters
3589 (_dbus_message_loader_putback_message_link): put back a popped link
3591 * dbus/dbus-connection.c
3592 (dbus_connection_set_max_live_messages_size): rename
3594 (dbus_connection_get_outgoing_size): get size of outgoing
3596 (_dbus_connection_set_connection_counter): remove this cruft
3598 2003-04-14 Havoc Pennington <hp@redhat.com>
3600 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3601 caching, but at some point we might want to be able to use a
3604 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3605 SHA1 conf file to test the sha1 auth mechanism, since the regular
3606 test always uses EXTERNAL when available.
3609 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3610 add conf file that requires use of sha1 auth
3612 2003-04-13 Havoc Pennington <hp@pobox.com>
3614 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3615 from Philip Blundell to send messages and monitor them.
3617 2003-04-13 Havoc Pennington <hp@pobox.com>
3619 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3622 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3625 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3626 fix to only recover unused bytes if we're already authenticated
3627 (_dbus_transport_get_is_authenticated): fix to still mark us
3628 authenticated if there are unused bytes.
3630 * bus/dispatch.c: implement security policy checking
3632 * bus/connection.c (bus_transaction_send_from_driver): new
3634 * bus/bus.c (bus_context_check_security_policy): new
3636 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3637 now we just set the DBusError and it gets converted to an error
3640 * bus/connection.c (allow_user_function): enable code using actual
3641 data from the config file
3643 * bus/policy.c (list_allows_user): handle wildcard rules for
3644 user/group connection perms
3646 2003-04-13 Havoc Pennington <hp@pobox.com>
3648 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3650 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3652 * bus/policy.c (bus_policy_append_mandatory_rule)
3653 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3654 (bus_policy_append_group_rule): new functions
3656 2003-04-12 Havoc Pennington <hp@pobox.com>
3658 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3660 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3661 the pid/gid/uid, just for paranoia.
3663 * test/break-loader.c (randomly_do_n_things): find a byte
3664 containing a type code, and randomly change it to a different
3667 2003-04-12 Havoc Pennington <hp@pobox.com>
3669 * bus/policy.h: change BusPolicy to be the thing from the config
3670 file, and rename old BusPolicy to BusClientPolicy
3672 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3673 match change in how policy works
3675 * dbus/dbus-internals.h: mark assert_not_reached as
3676 __attribute((noreturn))__
3678 2003-04-11 Havoc Pennington <hp@redhat.com>
3680 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3681 the broadcast service. Use boolean return for ServiceExists.
3683 2003-04-11 Havoc Pennington <hp@redhat.com>
3685 * configure.in: add another directory to look for qt in.
3687 2003-04-11 Havoc Pennington <hp@redhat.com>
3689 * AUTHORS: add Colin Walters
3691 2003-04-11 Havoc Pennington <hp@redhat.com>
3697 2003-04-11 Havoc Pennington <hp@redhat.com>
3699 * bus/messagebus.in: remove pid file when stopping the
3700 message bus, since the bus won't have privileges to remove it
3703 2003-04-11 Havoc Pennington <hp@redhat.com>
3705 * bus/bus.c (bus_context_new): move credentials change after
3708 2003-04-11 Havoc Pennington <hp@pobox.com>
3710 * test/decode-gcov.c: add "below average functions" to the
3711 coverage report, and change how some of the code works.
3713 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3714 not in the coverage stats.
3716 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3717 couple places so running the test suite doesn't result in megaspam.
3719 2003-04-11 Havoc Pennington <hp@pobox.com>
3721 * bus/dispatch.c (check_existent_service_activation): accept a no
3722 memory error in a place we didn't before
3724 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3725 in case the first one failed," since the test suite is less
3728 2003-04-10 Havoc Pennington <hp@pobox.com>
3730 * bus/dispatch.c (check_segfault_service_activation): add test
3731 for launching an executable that just crashes.
3733 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3734 don't leave a million cores. We'll see how portable this is.
3736 2003-04-10 Havoc Pennington <hp@pobox.com>
3738 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3739 the possible parent failures before we fork, so that we don't
3740 fail to create a babysitter after creating the child.
3742 * bus/activation.c (bus_activation_activate_service): kill child
3743 if we don't successfully complete the activation.
3745 2003-04-10 Havoc Pennington <hp@redhat.com>
3747 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3748 the connection if it's disconnected
3750 * bus/activation.c (bus_activation_service_created): use new
3751 transaction features to roll back removal of pending activation if
3752 we don't successfully create the service after all. Don't remove
3753 pending activation if the function fails.
3755 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3756 (_dbus_list_insert_after_link): new code to facilitate
3759 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3760 new functionality, so we can preallocate the ability to insert
3763 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3764 allowing us to put custom hooks in a transaction to be used for
3765 cancelling said transaction
3767 * doc/dbus-specification.sgml: add some discussion of secondary
3768 service owners, and disallow zero-length service names
3770 * bus/services.c (bus_registry_acquire_service): new function,
3771 splits out part of bus_driver_handle_acquire_service() and fixes
3772 a bug where we didn't remove the service doing the acquiring
3773 from the secondary queue if we failed to remove the current owner
3774 from the front of the queue.
3776 2003-04-10 Alexander Larsson <alexl@redhat.com>
3778 * doc/dbus-specification.sgml:
3779 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3781 2003-04-10 Alexander Larsson <alexl@redhat.com>
3786 Added files to cvsignore
3788 * dbus/dbus-message.h:
3789 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3790 Make get_named() take two out argument and return a boolean.
3791 (dbus_message_iter_get_args_valist):
3792 Update usage of get_named().
3793 (dbus_message_iter_append_byte):
3795 (dbus_message_iter_append_named)
3797 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3800 2003-04-10 Alexander Larsson <alexl@redhat.com>
3802 * dbus/dbus-marshal.[ch]:
3803 Add array_type_pos argument to _dbus_marshal_validate_arg.
3804 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3806 * dbus/dbus-message.[ch]:
3807 Multi-dimensional arrays have full type specification in the
3808 outermost array. Iter code re-arranged to handle this.
3809 Added some more iter tests.
3811 * doc/dbus-specification.sgml:
3814 Update new array encoding description.
3815 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3817 * test/data/invalid-messages/array-with-mixed-types.message:
3818 * test/data/valid-messages/array-of-array-of-uint32.message:
3819 Change to the new array format.
3821 * test/data/invalid-messages/too-short-dict.message:
3824 * test/data/valid-messages/recursive-types.message:
3825 Fix up and extend test.
3827 2003-04-10 Havoc Pennington <hp@pobox.com>
3829 * bus/dispatch.c: lots of fixes
3831 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3832 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3833 that was crack, broke the test service.
3835 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3836 handling to avoid piling up errors if we get a failure on the
3839 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3840 pid in assertion failures.
3842 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3843 to some fixed size of file descriptor array. Don't return TRUE
3844 anytime a timeout exists, that led to lots of busy loop silliness
3847 2003-04-09 Havoc Pennington <hp@redhat.com>
3849 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3850 I'd checked this in earlier but hadn't.
3852 2003-04-09 Havoc Pennington <hp@redhat.com>
3854 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3855 the activation test (man this is getting old!)
3857 2003-04-09 Havoc Pennington <hp@redhat.com>
3859 * test/test-utils.c: use dispatch status function to fix this up
3861 * bus/connection.c (connection_watch_callback): don't dispatch
3863 (connection_timeout_callback): don't dispatch from here
3864 (bus_connections_setup_connection): set the dispatch status function
3865 (bus_connection_disconnected): unset it
3867 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3868 used to add a connection to be dispatched
3869 (_dbus_loop_iterate): do the dispatching at the end of each
3872 * dbus/dbus-connection.c
3873 (dbus_connection_set_dispatch_status_function): new function
3874 allowing us to fix up main loop usage
3875 (_dbus_connection_last_unref): free all the various function
3877 (dbus_connection_dispatch): call the DispatchStatusFunction
3878 whenever this function returns
3879 (dbus_connection_handle_watch): call DispatchStatusFunction
3880 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3881 (reply_handler_timeout): call DispatchStatusFunction
3882 (dbus_connection_flush): call DispatchStatusFunction
3884 2003-04-09 Havoc Pennington <hp@redhat.com>
3886 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3889 * bus/dispatch.c (check_service_activated): fix bug in test
3891 * dbus/dbus-mainloop.c (check_timeout): fix this up
3893 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3894 verbose output so we can sort out output from different processes,
3895 e.g. in the activation case.
3897 2003-04-08 Colin Walters <walters@gnu.org>
3899 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3901 (bus_context_new): Set it.
3902 (bus_context_unref): Use it to delete the pid file.
3904 2003-04-08 Havoc Pennington <hp@redhat.com>
3906 * test/data/invalid-messages/array-with-mixed-types.message:
3907 regression test that fails for the moment
3909 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3910 tests for convenience
3912 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3913 array of nil, it broke things.
3915 * test/data/invalid-messages/array-of-nil.message: regression test
3917 * test/data/valid-messages/array-of-array-of-uint32.message:
3918 happened to write this so added it to suite
3920 2003-04-08 Havoc Pennington <hp@redhat.com>
3922 * bus/driver.c (bus_driver_handle_acquire_service): init
3923 retval/reply before checking name
3925 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3926 recursion depth argument
3928 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3929 in the public struct for future extension
3931 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3934 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3937 * doc/dbus-specification.sgml: fix typo
3939 2003-04-08 Alexander Larsson <alexl@redhat.com>
3941 Implemented recursive types, named types and new-style iters
3944 * glib/test-thread-client.c: (thread_func):
3945 * glib/test-thread-server.c: (handle_test_message):
3946 * test/test-service.c: (handle_echo):
3955 * dbus/dbus-internals.c: (_dbus_type_to_string):
3956 Update for new types.
3958 * dbus/dbus-marshal.[ch]:
3959 Implement recursive types and the new marshalling format.
3960 Remove hardcoded dict marshalling.
3961 Marshal named types.
3963 * dbus/dbus-message-builder.c:
3965 Remove references to old types
3967 * dbus/dbus-message.[ch]:
3968 New non-refcounted iter API that supports recursive iters.
3969 Use iters for appending, including support for recursive
3971 Add byte and named type support.
3972 Update everything to new marshalling formats.
3973 Add tests for new API.
3975 * dbus/dbus-protocol.h:
3976 Remove old array types.
3977 Add types: BYTE, ARRAY, DICT, NAMED
3979 * dbus/dbus-string.c:
3980 * dbus/dbus-sysdeps.c:
3981 Make parse_double locale safe.
3983 * dbus/dbus-test-main.c:
3989 * doc/dbus-specification.sgml:
3992 * test/data/incomplete-messages/missing-body.message:
3993 * test/data/invalid-messages/bad-boolean.message:
3994 * test/data/invalid-messages/bad-boolean-array.message:
3995 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3996 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3997 * test/data/invalid-messages/too-short-dict.message:
3998 * test/data/valid-messages/dict-simple.message:
3999 * test/data/valid-messages/dict.message:
4000 * test/data/valid-messages/emptiness.message:
4001 * test/data/valid-messages/lots-of-arguments.message:
4002 * test/data/valid-messages/no-padding.message:
4003 * test/data/valid-messages/recursive-types.message:
4004 Add missing NAME fields
4005 Fix up dicts & arrays
4007 * test/data/invalid-messages/dict-with-nil-value.message:
4008 Removed, this is not invalid anymore.
4010 * test/data/valid-messages/recursive-types.message:
4011 Add new test for deeply recursive types.
4013 2003-04-07 Havoc Pennington <hp@pobox.com>
4015 * bus/driver.c (bus_driver_handle_acquire_service): return an
4016 error if you try to acquire a service that starts with ':'
4018 2003-04-07 Havoc Pennington <hp@redhat.com>
4020 * doc/dbus-specification.sgml: require that base service names
4021 start with ':' and that the base service is created/deleted
4022 as first and last things a connection does on the bus
4024 * bus/dispatch.c (check_existent_service_activation): lots more
4025 work on the activation test; it doesn't fully pass yet...
4027 * test/test-service.c (main): fix so we don't memleak the
4028 connection to the message bus
4029 (filter_func): accept a message asking us to exit
4031 2003-04-06 Havoc Pennington <hp@pobox.com>
4033 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4036 * configure.in: fixes to Qt detection from Colin Walters
4038 * doc/Makefile.am: Only remove generated docbook dirs if they
4039 exist, from Colin Walters
4041 * dbus/dbus-bus.c: change how we set well-known connections to
4042 NULL, so that it works if a single connection is stored in
4043 two well-known array slots.
4045 * test/Makefile.am: remove a lot of stuff that isn't immediately
4046 useful, it's in CVS history if we want it.
4048 * test/test-service.c: use dbus-mainloop instead of that
4051 2003-04-06 Havoc Pennington <hp@pobox.com>
4053 * dbus/Makefile.am: split lists of sources into stuff that goes in
4054 the library, util functions that go in the lib and are also used
4055 elsewhere, and util functions that are used in tests/daemon but
4056 don't go in the lib.
4058 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4059 here so it can be used in test binaries also
4061 2003-04-06 Havoc Pennington <hp@pobox.com>
4063 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4064 here in the parent process, so we can return an error if it
4065 fails. Also, move some of the code into the child so the parent
4066 is less hosed if we fail midway through.
4068 * bus/bus.c (bus_context_new): move pidfile detection further up
4069 in the function, before we start overwriting sockets and such.
4071 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4073 * configure.in: add --with-system-pid-file and --with-system-socket
4075 2003-04-06 Colin Walters <walters@verbum.org>
4077 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4079 * bus/system.conf.in: Declare a pidfile.
4081 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4082 create one (if appropriate).
4084 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4085 (struct BusConfigParser) [pidfile]: New.
4086 (element_type_to_name, merge_included, start_busconfig_child)
4087 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4088 (bus_config_parser_unref): Free it.
4089 (bus_config_parser_get_pidfile): New function.
4091 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4093 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4095 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4097 * dbus/dbus-sysdeps.h: Prototype it.
4099 2003-04-06 Havoc Pennington <hp@pobox.com>
4101 * bus/bus.c (bus_context_new): print the address in here, rather
4102 than in main(), because we need to do it before forking the daemon
4104 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4105 on the service nonexistent error
4107 * bus/driver.c (bus_driver_handle_acquire_service): set the
4108 sender on the AcquireService reply
4110 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4111 server also listen on a UNIX socket so services can connect to it.
4113 2003-04-06 Havoc Pennington <hp@pobox.com>
4115 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4116 so it detects deadlocks and also we actually init threads when
4119 2003-04-06 Havoc Pennington <hp@pobox.com>
4121 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4122 save the domain socket name, and unlink it when we disconnect the
4123 server. Means that at least when we exit normally, we won't leave
4124 a bunch of junk in /tmp
4126 * dbus/dbus-transport-unix.c
4127 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4128 memory management). (I was making a real change here but then
4131 2003-04-06 Havoc Pennington <hp@pobox.com>
4133 * bus/bus.c (bus_context_new): fix wrong handling of
4134 server_data_slot_unref() in the error case.
4136 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4137 "(condition) != 0" to _dbus_real_assert so that
4138 "_dbus_assert (pointer)" doesn't cause a warning
4140 * bus/main.c (main): accept --print-address option to print out
4141 the message bus address
4143 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4145 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4146 "tmpdir" option to unix: address on client side
4148 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4151 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4152 we can use to create sockets in the test suite.
4154 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4155 cleanly. To be used for testing.
4157 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4159 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4161 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4162 handle trying to call this when there's no servers active
4164 2003-04-05 Havoc Pennington <hp@pobox.com>
4170 2003-04-05 Havoc Pennington <hp@pobox.com>
4172 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4173 crash on startup. Need to get "try starting the daemon"
4174 in the test suite I guess. ;-)
4176 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4177 tracked the number of open connections; it's better done in
4178 application-specific code as you want it to span all servers etc.
4180 2003-04-05 Havoc Pennington <hp@pobox.com>
4182 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4183 patch from Colin Walters
4185 2003-04-05 Havoc Pennington <hp@pobox.com>
4187 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4188 reality; in fact multiple mechanisms are allowed.
4190 * dbus/dbus-internals.c (_dbus_real_assert)
4191 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4192 _dbus_assert_not_reached() into functions, so that they don't show
4193 up in basic block counts for test coverage, and don't use up as
4194 much disk space. Does mean slower execution speed though, so
4195 assumes --disable-asserts is the normal production case.
4197 2003-04-05 Havoc Pennington <hp@pobox.com>
4199 * test/Makefile.am (dist-hook): also dist *.in files
4205 2003-04-05 Havoc Pennington <hp@pobox.com>
4207 * dbus/dbus-string.c: docs warning
4209 * dbus/dbus-spawn.c: missing docs
4211 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4213 2003-04-05 Havoc Pennington <hp@pobox.com>
4215 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4218 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4219 to -1 once we've reaped the babysitter
4220 (_dbus_babysitter_handle_watch): do as much work as we can, not
4223 * bus/activation.c: add code using DBusBabysitter so that we
4224 handle it when a service fails to start up properly.
4225 (bus_activation_service_created): don't remove the activation
4226 entries as we go, just let them get removed when we free the pending
4227 activation. Unref reply messages after sending them.
4229 2003-04-05 Havoc Pennington <hp@pobox.com>
4231 * test/decode-gcov.c (main): print per-directory stats in the report
4233 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4235 2003-04-05 Havoc Pennington <hp@pobox.com>
4237 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4239 * test/decode-gcov.c: hack up a little program to suck data
4240 out of gcov files. Yes this is sort of silly.
4242 * configure.in: define something in config.h and do an
4243 AM_CONDITIONAL when gcov is enabled
4245 2003-04-04 Havoc Pennington <hp@redhat.com>
4247 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4248 return a "babysitter" object that is used to monitor the status of
4249 the spawned process and reap it when required.
4251 * test/test-segfault.c, test/test-exit.c,
4252 test/test-sleep-forever.c: binaries that do various lame things,
4253 used in the test suite.
4255 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4257 2003-04-03 Havoc Pennington <hp@pobox.com>
4259 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4260 in preparation for modifying it, dbus-sysdeps is getting
4263 2003-04-03 Havoc Pennington <hp@redhat.com>
4265 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4268 * bus/*.[hc]: adapt to mainloop change
4270 2003-04-03 Havoc Pennington <hp@redhat.com>
4272 * bus/activation.c (load_directory): fix up memleaks
4273 (bus_activation_entry_free): free the entry
4275 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4276 we get one from the message bus; fix memleaks.
4278 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4280 2003-04-03 Havoc Pennington <hp@pobox.com>
4282 * bus/config-parser.c (bus_config_parser_unref): free
4283 list of mechanisms, bug discovered by test suite enhancements
4284 (putting system.conf and session.conf into suite)
4286 * test/Makefile.am, test/test-service.c: add placeholder for a
4287 test service that we'll activate as part of test suite. Doesn't
4290 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4291 setting NULL value, and use system malloc not dbus_malloc()
4292 when we have unavoidable memleakage.
4294 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4295 didn't work, and support DBUS_BUS_ACTIVATION.
4297 * bus/activation.c (child_setup): pass our well-known bus type to
4300 * bus/config-parser.c: support <type> to specify well-known type
4302 * doc/dbus-specification.sgml: document the env variables to
4303 locate well-known buses and find service activator
4305 2003-04-02 Havoc Pennington <hp@redhat.com>
4307 * test/Makefile.am (all-local): add a rule to copy tests to
4308 builddir, so we can have generated tests. Use this to remove the
4309 silly hack for testing system.conf and session.conf. Will use this
4310 shortly to generate .service files pointing to test binaries.
4312 2003-04-02 Havoc Pennington <hp@redhat.com>
4314 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4315 current alloc and needed new length, not max of the doubled
4316 allocation and needed new length. Also, when building tests,
4317 don't do the double-allocation stuff, just realloc every time.
4319 2003-04-02 Havoc Pennington <hp@redhat.com>
4321 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4323 (_dbus_string_get_dirname): new
4324 (_dbus_sysdeps_test): new
4325 (_dbus_directory_open): include dirnames in error messages
4327 * bus/config-parser.c: interpret <include> and <includedir> and
4328 <servicedir> relative to config file location if the given
4329 filename is not absolute.
4331 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4333 2003-04-02 Havoc Pennington <hp@redhat.com>
4335 * bus/connection.c (bus_transaction_send_error_reply): set sender
4336 service for the error, and unref the reply on success
4338 * bus/activation.c: convert to use BusTransaction so OOM can be
4340 (bus_activation_service_created): set sender of the message
4342 2003-04-01 Havoc Pennington <hp@redhat.com>
4344 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4345 <includedir> (at least mostly)
4347 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4348 first, then the user ID
4350 2003-04-01 Havoc Pennington <hp@pobox.com>
4352 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4355 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4357 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4359 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4360 socket 0777, and unlink any existing socket.
4362 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4363 the configuration file so specifies; set up auth mechanism
4366 * bus/config-parser.c (bus_config_parser_content): add support
4367 for <fork> option and fill in code for <auth>
4369 * bus/system.conf.in: add <fork/> to default configuration,
4370 and limit auth mechanisms to EXTERNAL
4372 * doc/config-file.txt (Elements): add <fork>
4374 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4375 (_dbus_change_identity): new function
4377 2003-03-31 Havoc Pennington <hp@redhat.com>
4379 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4380 (_dbus_listen_unix_socket): fix off-by-one error in null
4381 termination spotted by Nalin
4383 2003-03-31 Havoc Pennington <hp@redhat.com>
4385 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4386 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4387 having a real home directory available.
4389 2003-03-31 Havoc Pennington <hp@redhat.com>
4391 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4393 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4395 * configure.in: add support for specifying a style of init script
4398 2003-03-31 Havoc Pennington <hp@redhat.com>
4400 Fix some annoying DBusString API and fix all affected code.
4402 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4404 (_dbus_string_get_data): change to return string instead of using
4406 (_dbus_string_get_const_data): ditto
4407 (_dbus_string_get_data_len): ditto
4408 (_dbus_string_get_const_data_len): ditto
4410 2003-03-31 Havoc Pennington <hp@redhat.com>
4412 * bus/main.c (main): fix up the command line arguments to be nicer
4414 2003-03-31 Havoc Pennington <hp@redhat.com>
4416 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4417 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4418 final location that lands in the config file
4420 * bus/config-loader-expat.c (bus_config_load): fix type of
4423 * doc/TODO: remove TODO item for dbus_bus_get()
4425 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4427 2003-03-31 Havoc Pennington <hp@pobox.com>
4429 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4430 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4431 argument since they are always client side
4433 * dbus/dbus-server.c (dbus_server_get_address): new function
4435 * bus/main.c (main): take the configuration file as an argument.
4437 * test/data/valid-config-files/debug-allow-all.conf: new file to
4438 use with dispatch.c tests for example
4440 * bus/test-main.c (main): require test data dir
4442 * bus/bus.c (bus_context_new): change this to take a
4443 configuration file name as argument
4445 * doc/config-file.txt (Elements): add <servicedir>
4447 * bus/system.conf, bus/session.conf: new files
4449 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4450 well-known socket if none set
4452 * configure.in: create system.conf and session.conf
4454 2003-03-30 Havoc Pennington <hp@pobox.com>
4456 * bus/config-parser.c: hacking
4458 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4459 to shut down, since it could cause weirdness with the DBusList
4462 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4463 link-oriented stack routines
4464 (alloc_link): free the mempool if the first alloc from it fails
4466 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4468 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4470 (_dbus_string_skip_white): new
4472 * doc/config-file.txt (Elements): add <includedir>
4474 2003-03-28 Havoc Pennington <hp@pobox.com>
4476 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4477 (_dbus_string_copy_data): new functions
4479 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4481 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4485 * dbus/dbus-memory.c:
4488 2003-03-28 Havoc Pennington <hp@pobox.com>
4490 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4491 I think it may have just been superstition. Not sure.
4493 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4494 failures that were not being handled.
4496 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4498 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4499 row that will fail on out-of-memory.
4501 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4502 function for testing out-of-memory handling.
4504 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4505 allocation functions, they do map exactly to the expat ones.
4507 2003-03-27 Havoc Pennington <hp@redhat.com>
4509 * bus/config-loader-libxml.c (bus_config_load): add another error
4512 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4515 Add note about automatic service activation.
4517 * doc/dbus-specification.sgml:
4518 Rename the specification and clarify a few things.
4520 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4523 * dbus/dbus-address.c:
4525 * dbus/dbus-marshal.c:
4526 * dbus/dbus-server-debug-pipe.c:
4527 * dbus/dbus-transport-unix.c:
4528 Fix documentation warnings.
4530 2003-03-26 Havoc Pennington <hp@pobox.com>
4532 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4533 after every test so it's quick and easy to see which leaked, and
4534 so we test multiple dbus_shutdown() calls
4536 * configure.in: change configure.in XML stuff to also support
4539 * config-loader-libxml.c: some hacking
4541 * config-loader-expat.c: some hacking
4543 * config-parser.c: some hacking, plus tests
4545 2003-03-25 Havoc Pennington <hp@redhat.com>
4547 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4549 * configure.in: add --with-xml option to specify XML library,
4550 right now only libxml is supported.
4552 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4553 nonworking code between home and work, still just stubs
4555 2003-03-24 Havoc Pennington <hp@redhat.com>
4557 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4560 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4561 NULL argument for "message" if the error is a well-known one,
4562 fill in a generic message in this case.
4564 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4567 * bus/test.c (bus_test_flush_bus): add
4569 * bus/policy.c (bus_policy_test): test code stub
4571 2003-03-24 Havoc Pennington <hp@pobox.com>
4573 * bus/connection.c (bus_connections_setup_connection): set up
4574 the "can this user connect" function, but it always returns
4575 TRUE until we have a config file parser so we can have a config
4576 file that allows connections.
4578 2003-03-23 Havoc Pennington <hp@pobox.com>
4580 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4581 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4582 the mutex, so we can check for proper memory management
4585 * dbus/dbus-dataslot.c: remove the mutex from
4586 DBusDataSlotAllocator and lock it manually when using it,
4587 to simplify fitting it into the global slots framework.
4589 * dbus/dbus-threads.c (init_static_locks): rework how we're
4590 handling global locks so they are easily shut down.
4592 * bus/policy.c (bus_policy_append_rule): fix
4594 * bus/test-main.c (main): check for memleaks
4596 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4597 test suite check for memleaks
4599 * dbus/dbus-memory.c: add support in test mode for tracking
4600 number of outstanding blocks
4602 2003-03-23 Havoc Pennington <hp@pobox.com>
4604 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4607 * dbus/dbus-hash.h: add ULONG hash keys
4609 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4610 (_dbus_get_group_id): new function
4612 2003-03-20 Havoc Pennington <hp@redhat.com>
4614 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4616 (dbus_connection_get_unix_user): new function
4618 2003-03-20 Havoc Pennington <hp@pobox.com>
4620 * bus/connection.c (bus_connection_send_oom_error): assert that
4621 message has a sender
4622 (connection_execute_transaction): ditto
4623 (bus_connection_preallocate_oom_error): fix to set the sender, and
4624 set recipient to the destination service, not the bus driver
4626 * bus/policy.c: hacking
4628 * dbus/dbus-message.c (dbus_message_service_is): new function
4629 (dbus_message_sender_is): new
4631 2003-03-19 Havoc Pennington <hp@redhat.com>
4633 * bus/policy.c: start sketching code for policy restrictions on
4634 what connections can do.
4636 2003-03-18 Havoc Pennington <hp@redhat.com>
4638 * doc/TODO: some notes on high-level todo items. Little nitpick
4639 stuff is all in @todo, so no need to add it here.
4641 * doc/config-file.txt: some notes on how config file might look
4643 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4649 2003-03-17 Havoc Pennington <hp@redhat.com>
4651 * dbus/dbus-internals.h: add gcc attributes so that
4652 our printf-style functions warn on bad arguments to
4655 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4658 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4661 2003-03-17 Havoc Pennington <hp@redhat.com>
4663 * bus/test-main.c (main): make it print something as it runs
4664 so make check doesn't look stuck
4666 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4667 from CVS, now obsolete
4669 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4671 * bus/dispatch.c: (bus_dispatch):
4672 Refetch the service name since it may have been reallocated
4673 when dbus_message_set_sender was called.
4675 * dbus/dbus-sysdeps.c: (_dbus_accept):
4676 Add address and address length variables and use them to stop
4677 valgrind from complaining.
4679 2003-03-17 Havoc Pennington <hp@pobox.com>
4681 All tests pass, no memleaks, no valgrind complaints.
4683 * bus/test.c: refcount handler_slot
4685 * bus/connection.c (bus_connections_new): refcount
4686 connection_data_slot
4688 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4689 bytes so that auth scripts pass.
4691 * bus/dispatch.c: init message_handler_slot so it gets allocated
4694 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4696 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4697 dealloc server_pipe_hash when no longer used for benefit of
4700 * dbus/dbus-auth.c (process_command): memleak fix
4702 * bus/dispatch.c (check_hello_message): memleak fix
4704 2003-03-16 Havoc Pennington <hp@pobox.com>
4706 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4708 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4710 * bus/activation.c (bus_activation_activate_service): Append
4711 the pending activation entry to the list of pending activations.
4713 2003-03-16 Havoc Pennington <hp@pobox.com>
4715 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4718 * dbus/dbus-address.c (create_entry): fix OOM handling when
4719 failing to alloc entry->method
4721 2003-03-16 Havoc Pennington <hp@pobox.com>
4723 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4726 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4727 add some missing dbus_set_result
4729 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4730 alloc the DBusMessageHandler
4732 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4733 the transport here, since we call this from the finalizer; it
4734 resulted in a double-finalize.
4736 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4737 where we tried to use transport->connection that was NULL,
4738 happened when transport was disconnected early on due to OOM
4740 * bus/*.c: adapt to handle OOM for watches/timeouts
4742 * dbus/dbus-transport-unix.c: port to handle OOM during
4745 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4746 reference to unused bytes instead of a copy
4748 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4751 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4754 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4757 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4759 * doc/dbus-specification.sgml:
4760 Document reply message for ActivateService.
4762 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4764 * bus/activation.c: (bus_pending_activation_entry_free),
4765 (bus_pending_activation_free), (bus_activation_new),
4766 (bus_activation_unref), (bus_activation_service_created),
4767 (bus_activation_activate_service):
4769 * bus/bus.c: (bus_context_new):
4770 * bus/desktop-file.c: (new_section):
4771 * bus/driver.c: (bus_driver_send_service_deleted),
4772 (bus_driver_handle_activate_service):
4773 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4775 * dbus/dbus-connection.c:
4776 (dbus_connection_send_with_reply_and_block):
4777 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4778 * dbus/dbus-protocol.h:
4779 Make activation work better. Now pending activations will be queued
4780 and the daemon won't try to activate services that are already registered.
4782 2003-03-16 Havoc Pennington <hp@pobox.com>
4784 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4787 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4788 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4790 2003-03-16 Havoc Pennington <hp@pobox.com>
4792 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4793 this. always run the test suite before commit...
4795 * bus/*: adapt to DBusConnection API changes
4797 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4798 requires renaming stuff to avoid dbus_connection_dispatch name
4801 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4804 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4805 separate from _dbus_message_loader_return_buffer()
4807 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4808 this, because it's now always broken to use; the number of
4809 messages in queue vs. the number still buffered by the message
4810 loader is undefined/meaningless. Should use
4811 dbus_connection_get_dispatch_state().
4812 (dbus_connection_dispatch): rename from
4813 dbus_connection_dispatch_message
4815 2003-03-16 Havoc Pennington <hp@pobox.com>
4817 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4820 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4822 * dbus/dbus-connection.c:
4823 (dbus_connection_send_with_reply_and_block):
4824 Decrease connection->n_incoming when removing an entry
4826 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4827 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4828 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4829 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4830 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4831 (dbus_dict_get_byte_array):
4832 Handle NULL arrays and strings. Also add support for byte arrays.
4834 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4835 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4836 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4837 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4838 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4839 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4840 * dbus/dbus-marshal.h:
4841 Add support for marshalling and demarshalling empty arrays and strings.
4843 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4844 (dbus_message_append_string_array),
4845 (dbus_message_iter_get_boolean),
4846 (dbus_message_iter_get_boolean_array),
4847 (dbus_message_iter_get_int32_array),
4848 (dbus_message_iter_get_uint32_array),
4849 (dbus_message_iter_get_double_array),
4850 (dbus_message_iter_get_byte_array),
4851 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4852 (check_message_handling):
4853 Add support for getting empty arrays and dicts.
4855 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4856 Don't do any validation at all for now, that's better than just checking
4859 * test/data/valid-messages/emptiness.message:
4860 New test message with lots of empty arrays.
4862 2003-03-16 Havoc Pennington <hp@pobox.com>
4864 * dbus/dbus-connection.c
4865 (_dbus_connection_queue_received_message_link): new function that
4866 can't fail due to OOM
4868 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4869 new function pops a message together with a list link
4872 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4873 message queuing functions to avoid needing to alloc memory
4875 2003-03-16 Havoc Pennington <hp@pobox.com>
4877 Oops - test code was only testing failure of around 30 of the
4878 mallocs in the test path, but it turns out there are 500+
4879 mallocs. I believe this was due to misguided linking setup such
4880 that there was one copy of dbus_malloc etc. in the daemon and one
4881 in the shared lib, and only daemon mallocs were tested. In any
4882 case, the test case now tests all 500+ mallocs, and doesn't pass
4883 yet, though there are lots of fixes in this patch.
4885 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4886 this so that it doesn't need to allocate memory, since it
4887 has no way of indicating failure due to OOM (and would be
4888 annoying if it did).
4890 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4892 * bus/Makefile.am: rearrange to create two self-contained
4893 libraries, to avoid having libraries with overlapping symbols.
4894 that was resulting in weirdness, e.g. I'm pretty sure there
4895 were two copies of global static variables.
4897 * dbus/dbus-internals.c: move the malloc debug stuff to
4900 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4903 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4905 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4908 * bus/dispatch.c (bus_dispatch_add_connection): free
4909 message_handler_slot when no longer using it, so
4910 memory leak checkers are happy for the test suite.
4912 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4914 * bus/bus.c (new_connection_callback): disconnect in here if
4915 bus_connections_setup_connection fails.
4917 * bus/connection.c (bus_connections_unref): fix to free the
4919 (bus_connections_setup_connection): if this fails, don't
4920 disconnect the connection, just be sure there are no side
4923 * dbus/dbus-string.c (undo_alignment): unbreak this
4925 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4927 (_dbus_auth_new): fix the order in which we free strings
4930 * bus/connection.c (bus_connection_disconnected): fix to
4931 not send ServiceDeleted multiple times in case of memory
4934 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4935 get the base service name
4936 (dbus_bus_register_client): don't return base service name,
4937 instead store it on the DBusConnection and have an accessor
4939 (dbus_bus_register_client): rename dbus_bus_register()
4941 * bus/dispatch.c (check_hello_message): verify that other
4942 connections on the bus also got the correct results, not
4943 just the one sending hello
4945 2003-03-15 Havoc Pennington <hp@pobox.com>
4947 Make it pass the Hello handling test including all OOM codepaths.
4948 Now to do other messages...
4950 * bus/services.c (bus_service_remove_owner): fix crash when
4951 removing owner from an empty list of owners
4952 (bus_registry_ensure): don't leave service in the list of
4953 a connection's owned services if we fail to put the service
4956 * bus/connection.c (bus_connection_preallocate_oom_error): set
4957 error flag on the OOM error.
4959 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4960 handle _dbus_transport_set_connection failure
4962 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4963 to create watches up front and simply enable/disable them as
4965 (unix_connection_set): this can now fail on OOM
4967 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4968 of enabling/disabling a watch or timeout.
4970 * bus/loop.c (bus_loop_iterate): don't touch disabled
4973 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4975 2003-03-15 Havoc Pennington <hp@pobox.com>
4977 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4978 write useful test code, after all that futzing around ;-)
4980 Test does not yet pass because we can't handle OOM in
4981 _dbus_transport_messages_pending (basically,
4982 dbus_connection_preallocate_send() does not prealloc the write
4983 watch). To fix this, I think we need to add new stuff to
4984 set_watch_functions, namely a SetEnabled function so we can alloc
4985 the watch earlier, then enable it later.
4987 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4988 dbus-memory.c to the convenience lib
4990 * bus/test.c: rename some static functions to keep them clearly
4991 distinct from stuff in connection.c. Handle client disconnection.
4993 2003-03-14 Havoc Pennington <hp@pobox.com>
4995 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4996 transport, tests more of the real codepath. Set up clients
4997 with bus_setup_debug_client.
4999 * bus/test.c (bus_setup_debug_client): function to set up debug
5000 "clients" on the main loop
5002 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5005 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5008 * dbus/dbus-server-debug.c: support a debug server based on pipes
5010 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5011 (_dbus_close): new function
5013 * configure.in: check for socketpair
5015 2003-03-14 Havoc Pennington <hp@redhat.com>
5017 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5020 * dbus/dbus-transport-debug.c: rework this a good bit to be
5021 less complicated. hopefully still works.
5023 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5026 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5029 * dbus/dbus-message.c (dbus_message_copy): rename from
5030 dbus_message_new_from_message, fix it up to copy
5031 all the message fields, add test case
5033 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5034 not quite passing yet
5036 2003-03-14 Havoc Pennington <hp@pobox.com>
5038 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5039 until no work remains" in test code. (the large diff here
5040 is just code movement, no actual changes)
5042 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5043 1, no point waiting around for test code.
5044 (_dbus_server_debug_accept_transport): unref the timeout
5045 after adding it (right?)
5047 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5049 2003-03-13 Havoc Pennington <hp@redhat.com>
5051 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5054 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5057 * dbus/dbus-connection.h: Make AddWatchFunction and
5058 AddTimeoutFunction return a bool so they can fail on out-of-memory
5060 * bus/bus.c (bus_context_new): set up timeout handlers
5062 * bus/connection.c (bus_connections_setup_connection): set up
5065 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5068 * bus/bus.c (bus_context_new): adapt to changes
5070 * bus/connection.c: adapt to changes
5072 * test/watch.c: adapt to DBusWatch changes
5074 * bus/dispatch.c (bus_dispatch_test): started adding this but
5077 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5079 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5081 2003-03-13 Havoc Pennington <hp@pobox.com>
5083 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5084 set up a test framework as for the library
5086 2003-03-12 Havoc Pennington <hp@pobox.com>
5088 Throughout: purge global variables, introduce BusActivation,
5089 BusConnections, BusRegistry, etc. objects instead.
5091 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5094 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5095 going to redo this a bit differently I think
5097 2003-03-12 Havoc Pennington <hp@redhat.com>
5099 Mega-patch that gets the message bus daemon initially handling
5100 out-of-memory. Work still needed. Also lots of random
5101 moving stuff to DBusError instead of ResultCode.
5103 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5105 * dbus/dbus-connection.c
5106 (dbus_connection_send_with_reply_and_block): use DBusError
5108 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5111 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5112 code here, as the only failure possible is OOM.
5114 * bus/connection.c (bus_connection_disconnect):
5115 rename bus_connection_disconnected as it's a notification only
5117 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5118 "name" on get_args failure, should be done by get_args;
5119 don't disconnect client for bad args, just return an error.
5120 (bus_driver_handle_service_exists): ditto
5122 * bus/services.c (bus_services_list): NULL-terminate returned array
5124 * bus/driver.c (bus_driver_send_service_lost)
5125 (bus_driver_send_service_acquired): send messages from driver to a
5126 specific client to the client's unique name, not to the broadcast
5129 * dbus/dbus-message.c (decode_header_data): reject messages that
5130 contain no name field
5131 (_dbus_message_get_client_serial): rename to
5132 dbus_message_get_serial and make public
5133 (_dbus_message_set_serial): rename from set_client_serial
5134 (_dbus_message_set_reply_serial): make public
5135 (_dbus_message_get_reply_serial): make public
5137 * bus/connection.c (bus_connection_foreach): allow stopping
5138 iteration by returning FALSE from foreach function.
5140 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5141 (dbus_connection_free_preallocated_send)
5142 (dbus_connection_preallocate_send): new API for sending a message
5143 without possibility of malloc failure.
5144 (dbus_connection_send_message): rename to just
5145 dbus_connection_send (and same for whole function family)
5147 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5149 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5151 * bus/activation.c: handle/return errors
5153 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5155 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5156 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5157 (_dbus_result_from_errno): move to this file
5159 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5161 * dbus/dbus-marshal.c:
5162 (_dbus_marshal_set_string):
5163 Take a length argument so we can marshal the correct string
5166 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5167 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5168 (_dbus_marshal_test):
5169 * dbus/dbus-marshal.h:
5170 Add support for marshalling and demarshalling dicts.
5172 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5173 Add support for TYPE DICT.
5175 * dbus/dbus-message.c: (set_string_field):
5176 Adjust header padding.
5178 (dbus_message_append_args_valist), (dbus_message_append_dict),
5179 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5180 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5181 (check_message_handling), (check_have_valid_message):
5182 * dbus/dbus-message.h:
5183 Add functions for setting and getting dicts.
5185 * dbus/dbus-protocol.h:
5191 * doc/dbus-specification.sgml:
5192 Add information about how dicts are marshalled.
5194 * test/data/invalid-messages/dict-with-nil-value.message:
5195 * test/data/invalid-messages/too-short-dict.message:
5196 * test/data/valid-messages/dict-simple.message:
5197 * test/data/valid-messages/dict.message:
5198 Add sample messages containing dicts.
5200 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5202 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5204 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5207 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5208 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5209 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5210 (dbus_dict_set_double), (dbus_dict_set_string),
5211 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5212 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5213 (dbus_dict_set_string_array), (_dbus_dict_test):
5215 Fix according to comments from Havoc.
5217 2003-03-06 Michael Meeks <michael@server.home>
5219 * configure.in: if we don't have kde-config, disable have_qt.
5221 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5226 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5227 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5228 (dbus_dict_remove), (dbus_dict_get_value_type),
5229 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5230 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5231 (dbus_dict_put_double), (dbus_dict_put_string),
5232 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5233 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5234 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5235 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5236 (dbus_dict_get_double), (dbus_dict_get_string),
5237 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5238 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5239 (dbus_dict_get_string_array), (_dbus_dict_test):
5241 Add DBusDict implementation
5243 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5247 2003-03-04 Havoc Pennington <hp@pobox.com>
5249 * test/data/auth/*: adapt to changes
5251 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5252 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5255 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5256 more stuff from being in a context name, to make the protocol
5257 simpler to deal with
5259 * dbus/dbus-errors.c (dbus_error_has_name): new function
5260 (dbus_error_is_set): new function
5262 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5263 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5265 * dbus/dbus-connection.c (dbus_connection_flush): also read
5266 messages during a flush operation
5268 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5270 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5272 * configure.in: Check for gethostbyname on Solaris.
5274 * dbus/dbus-transport.c: (_dbus_transport_open):
5275 Remove duplicate "tcp" entry.
5277 * doc/dbus-specification.sgml:
5278 Clarify some things.
5280 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5282 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5283 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5284 (_dbus_keyring_test):
5285 * dbus/dbus-md5.c: (_dbus_md5_compute):
5286 * dbus/dbus-sha.c: (_dbus_sha_compute):
5289 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5291 * README: Add some things.
5293 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5295 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5296 after case DBUS_TYPE_BOOELAN.
5298 2003-03-02 Havoc Pennington <hp@pobox.com>
5300 * test/break-loader.c (randomly_set_extreme_ints): add test that
5301 sets really huge and small integers
5303 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5304 that length of boolean array fits in the string, and that
5305 string has room for boolean value in single-bool case.
5307 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5308 optional value to "ALIGN" command which is what to fill the
5311 * test/data/valid-messages/no-padding.message: add regression
5312 test for the message padding problem
5314 2003-03-02 Havoc Pennington <hp@pobox.com>
5316 * dbus/dbus-message.c (decode_header_data): fix to always init
5317 message_padding, from Benjamin Dauvergne
5319 2003-03-02 Havoc Pennington <hp@pobox.com>
5325 2003-03-01 Joe Shaw <joe@assbarn.com>
5327 * configure.in: Check for "struct cmsgcred" and try to access its
5328 members for BSD-like unices.
5330 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5331 _dbus_read_credentials_unix_socket().
5332 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5333 read() for reading the credential byte off the unix socket. Use
5334 struct cmsgcred on systems that support it.
5336 2003-02-27 Alexander Larsson <alexl@redhat.com>
5340 Make gthreads-2.0 dependency optional. Don't build thread test if
5343 2003-02-27 Havoc Pennington <hp@pobox.com>
5345 * dbus/dbus-connection.c
5346 (dbus_connection_send_message_with_reply_and_block): fix doh!
5347 doh! doh! bug that resulted in never removing a reply from the
5348 queue, no wonder we called get_reply_serial so much ;-)
5350 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5351 and client serial instead of demarshaling them every time
5353 2003-02-27 Havoc Pennington <hp@pobox.com>
5355 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5356 more inlined, using dbus-string-private.h, speeds things up
5359 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5360 when freeing the string
5361 (_dbus_string_steal_data): fix for align offset
5362 (undo_alignment): new function
5364 2003-02-26 Havoc Pennington <hp@redhat.com>
5366 All kinds of audit fixes from Owen, plus initial attempt to
5367 handle unaligned memory returned from malloc.
5369 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5370 leave room for align_offset and nul byte
5371 (fixup_alignment): function to track an align_offset and
5372 ensure real->str is aligned
5373 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5374 to allow a nul byte plus align offset
5375 (_dbus_string_lock): fix overflow issue
5376 (_dbus_string_init_const_len): add assertions on sanity of len,
5377 assign allocated to be ALLOCATION_PADDING larger than len
5378 (set_length): fixup the overflow handling
5379 (_dbus_string_get_data_len): fix overflow in assertion
5380 (open_gap): detect overflow in size of gap to be opened
5381 (_dbus_string_lengthen): add overflow check
5382 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5383 (_dbus_string_append): add overflow check
5384 (_dbus_string_append_unichar): overflow
5385 (_dbus_string_delete): fix overflow in assertion
5386 (_dbus_string_copy_len): overflow in assertion
5387 (_dbus_string_replace_len): overflows in assertions
5388 (_dbus_string_find): change to implement in terms of
5389 _dbus_string_find_to
5390 (_dbus_string_find_to): assorted fixage
5391 (_dbus_string_equal_c_str): assert c_str != NULL,
5392 fix logic so the function works
5393 (_dbus_string_ends_with_c_str): fix overflow thingy
5394 (_dbus_string_base64_encode): overflow fix
5395 (_dbus_string_validate_ascii): overflow
5396 (_dbus_string_validate_nul): overflow
5398 2003-02-26 Havoc Pennington <hp@redhat.com>
5400 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5402 2003-02-26 Alexander Larsson <alexl@redhat.com>
5405 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5407 * dbus/dbus-connection.c:
5408 * dbus/dbus-connection.h:
5409 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5410 Add dbus_connection_set_wakeup_main_function and use it when queueing
5411 incoming and outgoing messages.
5414 * dbus/dbus-dataslot.c:
5415 Threadsafe usage of DBusDataSlotAllocator
5417 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5420 * dbus/dbus-server-unix.c:
5423 * glib/dbus-gmain.c:
5424 Implement the new wakeup functions for glib.
5427 * glib/test-thread-client.c:
5428 * glib/test-thread-server.c:
5429 * glib/test-thread.h:
5430 Initial cut at some thread test code. Not really done yet.
5432 2003-02-26 Havoc Pennington <hp@pobox.com>
5434 * dbus/dbus-connection.c
5435 (dbus_connection_send_message_with_reply_and_block): fix crash
5436 where we ref'd the outgoing message instead of the returned reply
5438 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5439 at the end of this function, so if we didn't need to read for
5440 authentication, we reinstall it for receiving messages
5442 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5443 a NULL sender for peer-to-peer case
5445 * dbus/dbus-transport-unix.c (check_read_watch): handle
5446 !authenticated case correctly
5448 * glib/dbus-gmain.c: add support for DBusServer
5450 * dbus/dbus-server.c: add data slot support
5452 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5453 return values and handle errors
5455 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5458 * Doxyfile.in (INPUT): add glib subdir
5460 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5461 setup_with_g_main instead of hookup_with_g_main; write docs
5463 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5465 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5466 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5467 * dbus/dbus-message.c: (dbus_message_append_boolean),
5468 (dbus_message_append_boolean_array),
5469 (dbus_message_get_args_valist), (_dbus_message_test):
5470 * dbus/dbus-message.h:
5471 * doc/dbus-specification.sgml:
5472 Various fixes as pointed out by Havoc.
5474 * test/data/invalid-messages/bad-boolean-array.message:
5475 * test/data/invalid-messages/bad-boolean.message:
5476 Add invalid boolean value test cases.
5478 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5480 * dbus/dbus-internals.c: (_dbus_type_to_string):
5481 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5482 (_dbus_marshal_validate_arg):
5483 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5484 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5485 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5486 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5487 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5488 (dbus_message_iter_get_double),
5489 (dbus_message_iter_get_boolean_array), (message_iter_test):
5490 * dbus/dbus-message.h:
5491 * dbus/dbus-protocol.h:
5492 * doc/dbus-specification.sgml:
5493 * test/data/valid-messages/lots-of-arguments.message:
5494 Add support for boolean and boolean array types.
5496 2003-02-23 Havoc Pennington <hp@pobox.com>
5498 * dbus/dbus-keyring.c: finish most of this implementation and
5501 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5502 these barf if the error isn't cleared to NULL
5504 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5505 (_dbus_create_directory): new function
5507 * dbus/dbus-errors.c (dbus_set_error): fix warning
5509 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5510 (_dbus_string_hex_decode): new function
5511 (test_hex_roundtrip): test code
5513 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5515 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5517 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5518 the save-to-temp/rename trick to atomically write the new file
5519 (_dbus_string_parse_uint): new function
5521 2003-02-22 Havoc Pennington <hp@pobox.com>
5523 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5525 2003-02-22 Havoc Pennington <hp@pobox.com>
5527 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5528 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5530 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5532 * dbus/test/data/sha-1: add US government test suite for SHA-1
5534 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5536 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5537 Make string arrays NULL-terminated.
5539 * dbus/dbus-memory.c: (dbus_free_string_array):
5540 * dbus/dbus-memory.h:
5541 New function for freeing NULL-terminated string arrays.
5543 * dbus/dbus-message-builder.c: (append_quoted_string),
5544 (_dbus_message_data_load):
5545 Add support for array types.
5547 * dbus/dbus-message.c: (check_message_handling):
5548 Add more types as test cases.
5550 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5551 (_dbus_string_parse_double):
5552 Add the start offset to the end offset.
5554 * test/data/valid-messages/lots-of-arguments.message:
5555 New test message with lots of arguments.
5557 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5559 * dbus/dbus-message.c: (dbus_message_append_nil),
5560 (dbus_message_append_int32), (dbus_message_append_uint32),
5561 (dbus_message_append_double), (dbus_message_append_string),
5562 (dbus_message_append_int32_array),
5563 (dbus_message_append_uint32_array),
5564 (dbus_message_append_double_array),
5565 (dbus_message_append_byte_array),
5566 (dbus_message_append_string_array):
5567 Fix all out-of-memory handling in these functions.
5569 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5571 * dbus/dbus-message.c: (dbus_message_append_nil):
5574 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5576 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5577 (dbus_message_append_nil), (dbus_message_append_int32_array),
5578 (dbus_message_append_uint32_array),
5579 (dbus_message_append_double_array),
5580 (dbus_message_append_byte_array),
5581 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5582 (dbus_message_iter_get_int32_array),
5583 (dbus_message_iter_get_uint32_array),
5584 (dbus_message_iter_get_double_array),
5585 (dbus_message_iter_get_byte_array),
5586 (dbus_message_iter_get_string_array):
5588 * dbus/dbus-message.h:
5589 Add functions for appending and getting arrays.
5591 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5593 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5594 element size at least 8 bytes, fixes mempool tests on
5597 2003-02-20 Alexander Larsson <alexl@redhat.com>
5599 * dbus/dbus-transport-unix.c (unix_do_iteration):
5600 Unlock the connection mutex during a blocking select call.
5601 Add todo about how we need a way to wake up the select.
5603 * dbus/dbus-connection-internal.h:
5604 * dbus/dbus-connection.c:
5605 Add _dbus_connection_lock and _dbus_connection_unlock.
5607 2003-02-19 Havoc Pennington <hp@pobox.com>
5609 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5610 Doxyfile.in, not Doxyfile
5612 * dbus/dbus-keyring.c: do some hacking on this
5614 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5616 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5618 (dbus_set_error): remove dbus_error_init, check for message ==
5619 NULL *before* we sprintf into it, and add @todo about including
5620 system headers in this file
5622 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5624 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5626 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5627 get various bits of user information based on either username
5629 (_dbus_homedir_from_username): new function
5631 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5634 Add check for nonposix getpwnam_r
5636 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5637 Align the pool element size to a sizeof (void *) boundary.
5639 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5640 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5641 General Solaris fixes.
5643 * test/data/valid-messages/simplest-manual.message:
5644 Explicitly state that we want little-endian packing.
5646 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5648 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5650 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5651 Added to create a transport connecting using a tcp/ip socket.
5653 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5654 to a tcp socket at given host and port.
5655 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5658 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5660 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5661 Added to create a server listening on a TCP/IP socket.
5663 2003-02-19 Havoc Pennington <hp@pobox.com>
5665 Throughout: mop up all the Doxygen warnings and undocumented
5668 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5669 to search any paths.
5671 * dbus/dbus-threads.c: move global mutex initializers to
5672 dbus-internals.h, multiple prototypes was confusing doxygen
5673 besides being kind of ugly
5675 * Doxyfile (PREDEFINED): have Doxygen define
5676 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5677 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5678 (do not abuse the feature! it's for stuff like the autogenerated
5679 macros in dbus-md5.c, not just for things you don't feel like
5682 2003-02-18 Havoc Pennington <hp@pobox.com>
5684 * dbus/dbus-string.c (_dbus_string_zero): new function
5686 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5687 wrap it in some dbus-friendly API
5689 * dbus/dbus-types.h: add 16-bit types
5691 2003-02-18 Joe Shaw <joe@assbarn.com>
5693 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5694 credentials from our currently running process.
5695 (get_word): Fix a buglet where we were copying the entire length
5696 instead of relative to our position.
5698 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5699 keys on the stack... it's 640k of data.
5701 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5702 read the credentials byte off the socket, even if we don't have
5704 (_dbus_poll): Implement poll() using select() for systems which
5707 * glib/test-dbus-glib.c (main): Print out an error if no
5708 parameters are given.
5710 * test/data/auth/fallback.auth-script: Added. Tests that a client
5711 can fallback to a secondary auth mechanism if the first fails.
5713 2003-02-18 Havoc Pennington <hp@pobox.com>
5717 2003-02-17 Havoc Pennington <hp@pobox.com>
5719 * doc/dbus-specification.sgml: lots of cosmetic
5720 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5721 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5722 s/server/bus/ (except in authentication section). Add a section
5723 "Message Bus Message Routing"
5725 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5731 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5733 * doc/dbus-specification.sgml:
5734 Specification updates.
5736 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5738 * bus/activation.c: (bus_activation_init), (child_setup),
5739 (bus_activation_activate_service):
5741 * bus/main.c: (main):
5742 Set DBUS_ADDRESS environment variable.
5744 * dbus/dbus-errors.c: (dbus_set_error):
5745 Don't use va_copy since that's a C99 feature.
5747 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5748 (_dbus_spawn_async):
5749 * dbus/dbus-sysdeps.h:
5750 Add child_setup_func to _dbus_spawn_async.
5752 * doc/dbus-specification.sgml:
5753 Update specification.
5755 * test/spawn-test.c: (setup_func), (main):
5758 2003-02-17 Alexander Larsson <alexl@redhat.com>
5760 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5763 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5767 * doc/dbus-test-plan.sgml:
5768 Add test plan document.
5773 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5775 * dbus/dbus-message.c: (decode_header_data),
5776 (_dbus_message_loader_return_buffer):
5777 Set the header padding amount when loading a message.
5779 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5781 * bus/dispatch.c: (send_one_message):
5782 Only send broadcast messages to registered connections.
5784 * dbus/dbus-message.c: (dbus_message_name_is):
5785 * dbus/dbus-message.h:
5786 New convenience function.
5788 * dbus/dbus-transport-debug.c: (do_reading):
5789 Only dispatch one message per run.
5792 * test/bus-test.c: (new_connection_callback), (die),
5793 (test_hello_client1_handler), (test_hello_client2_handler),
5794 (test_hello_replies), (main):
5796 * test/bus-test-loop.[ch]:
5799 2003-02-16 Havoc Pennington <hp@pobox.com>
5801 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5802 backward conditional
5804 2003-02-16 Alexander Larsson <alexl@redhat.com>
5806 * dbus/dbus-connection.c:
5807 Implement sent_message_with_reply. (with_reply_and block is still
5809 Made dispatch_message not lose message if OOM.
5811 * dbus/dbus-errors.h:
5812 Add NoReply error (for reply timeouts).
5814 2003-02-16 Alexander Larsson <alexl@redhat.com>
5816 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5817 Actually free keys and values when destroying hashtable.
5819 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5821 * dbus/dbus-auth.c: (client_try_next_mechanism):
5824 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5825 Return TRUE if there's no thread implementation around.
5827 * glib/dbus-gmain.c: (free_source),
5828 (dbus_connection_hookup_with_g_main):
5829 Make sure to remove the GSource when the connection is finalized.
5831 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5833 * bus/dispatch.c: (bus_dispatch_message_handler):
5834 * dbus/dbus-errors.h:
5835 Return an error if someone tries to send a message to a service
5838 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5840 * bus/activation.c: (load_directory), (bus_activation_init),
5841 (bus_activation_activate_service):
5844 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5845 More work on the activation handling.
5847 * dbus/dbus-errors.h:
5848 Add some error messages
5850 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5851 * dbus/dbus-message.h:
5852 New function that creates an error message.
5854 * dbus/dbus-protocol.h:
5855 Add ACTIVATE_SERVER message.
5857 * dbus/dbus-server-unix.c: (unix_handle_watch),
5858 (_dbus_server_new_for_domain_socket):
5859 Call _dbus_fd_set_close_on_exec.
5861 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5862 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5863 (_dbus_fd_set_close_on_exec):
5864 * dbus/dbus-sysdeps.h:
5865 Add _dbus_fd_set_close_on exec function. Also add function that checks
5866 that all open fds are set to close-on-exec and warns otherwise.
5868 * dbus/dbus-transport-unix.c:
5869 (_dbus_transport_new_for_domain_socket):
5870 Call _dbus_fd_set_close_on_exec.
5872 2003-02-16 Havoc Pennington <hp@pobox.com>
5874 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5875 allow people to avoid setting SIGPIPE to SIG_IGN
5876 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5877 we've been asked not to
5879 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5881 * dbus/dbus-list.c: (_dbus_list_append_link),
5882 (_dbus_list_prepend_link):
5883 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5887 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5890 * bus/activation.c: (bus_activation_entry_free),
5891 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5893 * bus/main.c: (main):
5894 Add simple activation support, doesn't work yet though.
5896 2003-02-15 Zack Rusin <zack@kde.org>
5898 * qt/dbus-qthread.cpp: small casting fix
5900 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5902 * dbus/dbus-errors.c: (dbus_set_error):
5903 * dbus/dbus-errors.h:
5904 Add a few errors and make dbus_set_error void.
5906 * dbus/dbus-sysdeps.c:
5907 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5908 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5909 * dbus/dbus-sysdeps.h:
5910 Add _dbus_spawn_async.
5912 * test/spawn-test.c: (main):
5913 Test for _dbus_spawn_async.
5915 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5917 * dbus/dbus-internals.h:
5918 Fix build without tests.
5920 * dbus/dbus-list.c: (alloc_link):
5921 Fix a segfault when a malloc fails.
5923 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5924 (dbus_malloc0), (dbus_realloc):
5925 Add support for malloc debugging.
5927 2003-02-15 Alexander Larsson <alexl@redhat.com>
5929 * dbus/dbus-threads.c:
5930 * dbus/dbus-threads.h:
5931 Add condvars. Remove static mutext from API.
5932 Implement static mutexes by initializing them from threads_init.
5934 * glib/dbus-gthread.c:
5935 * qt/dbus-qthread.cpp:
5936 Update with the thread api changes.
5941 Turn StaticMutex into normal mutex + init function.
5942 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5943 _dbus_list_append_link, _dbus_list_prepend_link
5946 * dbus/dbus-sysdeps.c:
5947 * dbus/dbus-sysdeps.h:
5948 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5949 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5951 * dbus/dbus-protocol.h:
5952 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5954 * dbus/dbus-message.c:
5955 Make ref/unref atomic.
5958 * dbus/dbus-connection-internal.h:
5959 * dbus/dbus-connection.c:
5960 * dbus/dbus-connection.h:
5962 Change _peek to _borrow,_return & _steal_borrowed.
5963 Change disconnect callback to event.
5964 Make dbus_connection_dispatch_messages reentrant.
5966 * dbus/dbus-transport.c:
5967 Don't ref the connection on calls to the transport
5970 * dbus/dbus-message-handler.c:
5973 * glib/dbus-gmain.c:
5974 Don't use peek_message anymore
5977 * test/debug-thread.c:
5978 * test/debug-thread.h:
5979 Simple thread implementation that asserts() on deadlocks in
5980 single-threaded code.
5983 (main) Call debug_threads_init.
5986 Use disconnect message instead of disconnect callback.
5990 Don't call dbus_connection_set_disconnect_function. Instead export
5991 bus_connection_disconnect.
5994 Call bus_connection_disconnect when we get a disconnected message.
5996 2003-02-15 Havoc Pennington <hp@pobox.com>
5998 * dbus/dbus-message.c (dbus_message_new): fool around with the
6001 2003-02-14 Havoc Pennington <hp@pobox.com>
6003 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6005 * dbus/dbus-memory.c: fail if the debug functions indicate we
6008 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6009 (_dbus_decrement_fail_alloc_counter): debug functions to
6010 simulate memory allocation failures
6012 2003-02-14 Havoc Pennington <hp@pobox.com>
6014 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6017 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6019 * bus/driver.c: (bus_driver_handle_hello):
6021 * bus/services.c: (bus_service_lookup):
6022 Reorder message sending so we get a more sane order.
6024 * test/bus-test.c: (message_handler):
6027 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6029 * bus/driver.c: (bus_driver_send_service_deleted),
6030 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6031 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6032 (bus_driver_send_welcome_message),
6033 (bus_driver_handle_list_services),
6034 (bus_driver_handle_acquire_service),
6035 (bus_driver_handle_service_exists):
6036 * dbus/dbus-bus.c: (dbus_bus_register_client),
6037 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6038 * dbus/dbus-errors.c: (dbus_result_to_string):
6039 * dbus/dbus-errors.h:
6040 * dbus/dbus-message.c: (dbus_message_append_args),
6041 (dbus_message_append_args_valist), (dbus_message_get_args),
6042 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6043 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6044 (dbus_message_iter_get_byte_array),
6045 (dbus_message_iter_get_string_array), (message_iter_test),
6046 (check_message_handling), (_dbus_message_test):
6047 * dbus/dbus-message.h:
6048 * test/bus-test.c: (main):
6049 Change fields to arguments in messages, so that they won't be
6050 confused with header fields.
6052 * glib/test-dbus-glib.c: (main):
6053 Remove append_fields from hello message.
6055 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6057 * dbus/dbus-errors.c:
6058 * dbus/dbus-message.c:
6059 * dbus/dbus-string.c:
6060 Documentation fixes.
6062 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6064 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6066 Implement support for timeouts in dbus-glib.
6068 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6070 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6071 * dbus/dbus-message.c: (process_test_subdir):
6072 * test/break-loader.c: (find_breaks_based_on):
6073 Plug some memory leaks.
6075 2003-02-13 Richard Hult <rhult@codefactory.se>
6077 * bus/main.c: Fix build.
6079 * dbus/dbus-errors.h:
6080 * dbus/dbus-errors.c: Fix copyright for Anders.
6082 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6087 * bus/connection.c: (bus_connection_foreach):
6090 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6091 (unescape_string), (new_section), (parse_section_start),
6092 (parse_key_value), (report_error), (bus_desktop_file_load),
6093 (bus_desktop_file_get_string):
6094 * bus/desktop-file.h:
6095 Use DBusError for error reporting.
6097 * bus/dispatch.c: (send_one_message),
6098 (bus_dispatch_message_handler):
6099 * bus/driver.c: (bus_driver_send_service_deleted),
6100 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6101 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6102 (bus_driver_send_welcome_message),
6103 (bus_driver_handle_list_services),
6104 (bus_driver_handle_acquire_service),
6105 (bus_driver_handle_service_exists):
6106 * bus/loop.c: (bus_loop_run):
6108 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6110 * bus/utils.c: (bus_wait_for_memory):
6112 New files with general utility functions.
6114 * dbus/dbus-internals.h:
6115 Remove _DBUS_HANDLE_OOM.
6117 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6119 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6120 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6121 * dbus/dbus-errors.h:
6122 Add DBusError structure.
6124 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6126 * test/data/valid-messages/standard-acquire-service.message:
6127 * test/data/valid-messages/standard-hello.message:
6128 * test/data/valid-messages/standard-list-services.message:
6129 * test/data/valid-messages/standard-service-exists.message:
6130 Add some standard messages.
6132 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6134 * bus/driver.c: (bus_driver_send_welcome_message),
6135 (bus_driver_handle_list_services),
6136 (bus_driver_handle_acquire_service),
6137 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6138 Update for API changes in libdbus.
6140 * dbus/dbus-message.c: (dbus_message_new_reply):
6141 * dbus/dbus-message.h:
6142 Remove the name argument. The spec states that replies shouldn't
6145 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6147 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6148 (report_error), (bus_desktop_file_load), (lookup_section),
6149 (lookup_line), (bus_desktop_file_get_raw),
6150 (bus_desktop_file_get_string):
6151 * bus/desktop-file.h:
6152 Some fixes, and new functions for getting a key value from a section.
6154 2003-02-13 Havoc Pennington <hp@pobox.com>
6156 * test/data/auth/fail-after-n-attempts.auth-script: new test
6158 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6161 2003-02-13 Havoc Pennington <hp@pobox.com>
6163 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6164 dbus_credentials_match were backward
6166 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6167 NO_CREDENTIALS and ROOT_CREDENTIALS
6169 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6170 into here. Never process more commands after we've reached an
6171 end state; store further data as unused bytes.
6173 * test/data/auth/*: add more auth tests
6175 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6176 command to match exact string and EXPECT_UNUSED to match unused
6179 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6181 2003-02-12 Havoc Pennington <hp@pobox.com>
6183 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6184 \r off of popped lines
6186 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6189 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6192 2003-02-12 Havoc Pennington <hp@pobox.com>
6194 * dbus/Makefile.am: remove break-loader from the build, since it
6197 * configure.in: add --enable-gcov to turn on coverage profiling
6198 flags and disable optimization
6200 2003-02-10 Havoc Pennington <hp@pobox.com>
6202 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6203 initial cut at test framework for DBusAuth from laptop.
6204 Doesn't quite work yet but it compiles and I need to get
6205 it off the 266mhz laptop. ;-)
6207 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6208 fix a memleak in error case
6210 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6213 * bus/desktop-file.c:
6214 * bus/desktop-file.h:
6215 Add a desktop file parser.
6217 2003-02-11 Zack Rusin <zack@kde.org>
6219 * qt/message.[h|cpp]: sample implementation
6220 of the KDE wrapper for DBusMessage
6222 2003-02-09 Zack Rusin <zack@kde.org>
6224 * test/bus-test.c: make_it_compile
6225 * doc/dbus-specification.sgml: minimal semantic fix
6227 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6233 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6236 * dbus/dbus-break-loader.c:
6238 * test/break-loader.c:
6239 Move dbus-break-loader to test/ and rename it to break-loader.
6241 2003-02-02 Havoc Pennington <hp@pobox.com>
6243 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6244 for code to manage cookies in your home directory
6246 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6248 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6249 to authenticate, then disconnect the client.
6251 2003-02-03 Alexander Larsson <alexl@redhat.com>
6253 * dbus/dbus-message.c (dbus_message_append_fields):
6256 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6258 * doc/dbus-specification.sgml:
6259 Update address format section.
6261 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6264 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6265 (message_handler), (new_connection_callback), (loop_quit),
6269 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6271 * bus/driver.c: (bus_driver_handle_service_exists):
6272 Simplify the code a bit.
6274 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6277 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6280 Add libdbus-daemon.la and link to it.
6282 2003-02-01 James Willcox <jwillcox@gnome.org>
6284 * bus/driver.c: (bus_driver_handle_own_service):
6285 Actually include the service reply code in the message.
6287 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6289 * bus/driver.c: (bus_driver_handle_service_exists):
6290 Don't unref the incoming message.
6292 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6294 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6296 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6298 * dbus/dbus-server.c: (dbus_server_listen):
6299 * dbus/dbus-transport.c: (_dbus_transport_open):
6300 ifdef out the calls to the debug transport and server.
6302 2003-02-02 Alexander Larsson <alexl@redhat.com>
6304 * dbus/dbus-watch.c (dbus_watch_get_flags):
6305 Add note in the docs that ERROR or HANGUP won't be returned
6306 and are assumed always on.
6308 * glib/dbus-gmain.c (add_watch):
6309 Always add IO_ERR | IO_HUP
6311 * dbus/dbus-message.h:
6312 Add semicolon after dbus_message_iter_get_string_array().
6313 Makes qt code build again
6315 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6317 * bus/driver.c: (create_unique_client_name),
6318 (bus_driver_handle_hello):
6319 Don't take a name, just use a numeric id to identify
6323 * dbus/dbus-bus.c: (dbus_bus_register_client),
6324 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6326 Add new convenience functions for communicating with the bus.
6328 * dbus/dbus-message.h:
6330 * dbus/dbus-protocol.h:
6333 2003-02-01 Alexander Larsson <alexl@redhat.com>
6335 * dbus/dbus-message.c (dbus_message_append_fields):
6336 Add some more doc comments.
6338 2003-02-01 Havoc Pennington <hp@pobox.com>
6340 * dbus/dbus-break-loader.c (randomly_modify_length): change
6341 a 4-byte value in the message as if it were a length
6343 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6344 execute bit on saved files
6346 2003-02-01 Havoc Pennington <hp@pobox.com>
6348 * dbus/dbus-break-loader.c (main): new program to find messages
6349 that break the loader.
6351 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6352 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6354 * dbus/dbus-string.c (_dbus_string_set_byte): new
6356 2003-01-31 Havoc Pennington <hp@pobox.com>
6358 * dbus/dbus-message.c: refactor the test code to be more general,
6359 in preparation for writing a "randomly permute test cases to
6360 try to break the loader" program.
6362 2003-01-31 Havoc Pennington <hp@pobox.com>
6364 * doc/dbus-specification.sgml: work on the specification
6366 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6367 the protocol version of the message.
6369 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6370 no longer specifies that.
6371 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6374 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6375 "break" for DBUS_TYPE_NIL, remove @todo
6377 2003-01-31 Havoc Pennington <hp@pobox.com>
6379 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6380 just set_is_error/get_is_error as this is a commonly-used
6381 function, and write docs.
6383 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6385 * dbus/dbus-address.c: (dbus_address_entry_free):
6386 Free key and value lists.
6388 * dbus/dbus-internals.c: (_dbus_type_to_string):
6389 Add the types we didn't have.
6391 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6392 (_dbus_marshal_validate_arg):
6395 * dbus/dbus-message.c: (dbus_message_set_sender):
6396 Remove todo about being able to set sender to NULL.
6398 (dbus_message_set_is_error_reply),
6399 (dbus_message_get_is_error_reply):
6400 * dbus/dbus-message.h:
6403 * dbus/dbus-protocol.h:
6404 Add error reply flag.
6406 * test/data/valid-messages/opposite-endian.message:
6407 Add NIL type to test.
6409 2003-01-31 Havoc Pennington <hp@pobox.com>
6411 * doc/dbus-specification.sgml: fully specify the header. Add
6412 flags and major protocol version, and change header/body len to
6415 * dbus/dbus-message-builder.c (append_saved_length): append length
6418 * dbus/dbus-message.c (dbus_message_create_header): change header
6419 length and body length to unsigned. Add the new fields from the
6421 (_dbus_message_loader_return_buffer): unsigned header/body len
6423 2003-01-30 Havoc Pennington <hp@pobox.com>
6425 * dbus/dbus-auth.c: rework to use only REJECTED, no
6428 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6429 use REJECTED, suggested by Mark McLoughlin
6431 2003-01-30 Havoc Pennington <hp@pobox.com>
6433 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6434 a better way to report errors here. e.g. "unix address lacks
6435 path" or something. also "no such file" when the path doesn't
6438 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6440 (dbus_parse_address): add @todo about documenting address format,
6441 and allowing , and ; to be escaped
6443 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6446 Add dbus-address.[ch]
6448 * dbus/dbus-address.c: (dbus_address_entry_free),
6449 (dbus_address_entries_free), (create_entry),
6450 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6451 (dbus_parse_address), (_dbus_address_test):
6452 * dbus/dbus-address.h:
6453 New files for dealing with address parsing.
6455 * dbus/dbus-connection.c:
6456 Document timeout functions.
6458 * dbus/dbus-message.c:
6459 Document dbus_message_new_from_message.
6461 * dbus/dbus-server-debug.c:
6464 * dbus/dbus-server.c: (dbus_server_listen):
6465 Parse address and use correct server implementation.
6467 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6468 * dbus/dbus-string.h:
6469 New function with test.
6471 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6475 * dbus/dbus-transport-debug.c:
6478 * dbus/dbus-transport.c: (_dbus_transport_open):
6479 Parse address and use correct transport implementation.
6481 2003-01-30 Havoc Pennington <hp@pobox.com>
6483 * dbus/dbus-message.c: use message->byte_order instead of
6484 DBUS_COMPILER_BYTE_ORDER throughout.
6485 (dbus_message_create_header): pad header to align the
6486 start of the body of the message to 8-byte boundary
6488 * dbus/dbus-marshal.h: make all the demarshalers take const
6489 DBusString arguments.
6491 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6492 validate message args here, so we don't have to do slow validation
6493 later, and so we catch bad messages as they are incoming. Also add
6494 better checks on header_len and body_len. Also fill in
6497 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6498 implemented properly)
6499 (_dbus_string_validate_nul): new function to check all-nul
6501 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6502 get_arg_end_pos and remove all validation
6503 (_dbus_marshal_validate_arg): actually do validation here.
6505 2003-01-29 Havoc Pennington <hp@pobox.com>
6507 * dbus/dbus-message.c (check_message_handling): fix assertion
6508 failure on set_client_serial
6510 2003-01-28 Havoc Pennington <hp@pobox.com>
6512 * dbus/dbus-server-debug.c: Add doc section comments
6514 * dbus/dbus-transport-debug.c: add doc section comments
6516 2003-01-28 Havoc Pennington <hp@redhat.com>
6518 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6519 the reverse order from how I had it
6520 (_dbus_string_base64_encode): reverse encoding order. I was
6521 basically byteswapping everything during encoding.
6523 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6525 * dbus/dbus-connection-internal.h:
6526 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6527 (_dbus_connection_remove_timeout):
6528 Add functions for adding and removing timeouts.
6530 * dbus/dbus-message.c: (dbus_message_new_from_message):
6531 Add new function that takes a message and creates an exact
6532 copy of it, but with the refcount set to 1.
6533 (check_message_handling):
6536 * dbus/dbus-server-protected.h:
6537 * dbus/dbus-server.c: (_dbus_server_init_base),
6538 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6539 (dbus_server_set_timeout_functions):
6540 (_dbus_server_remove_timeout):
6541 New functions so that a server can add and remove timeouts.
6543 (dbus_server_listen):
6544 Add commented out call to dbus_server_debug_new.
6546 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6547 Actually set the handler, doh.
6549 * dbus/dbus-transport.c: (_dbus_transport_open):
6550 Add commented out call to dbus_transport_debug_client_new.
6553 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6555 2003-01-28 Havoc Pennington <hp@pobox.com>
6557 * dbus/dbus-message.c (check_message_handling): function to check
6558 on the loaded message, iterates over it etc.
6560 2003-01-28 Havoc Pennington <hp@pobox.com>
6562 * test/Makefile.am (dist-hook): fix make distdir
6564 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6566 2003-01-27 Havoc Pennington <hp@pobox.com>
6568 * dbus/dbus-mempool.c (time_for_size): replace printf with
6571 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6572 empty lines; fix the SAVE_LENGTH stuff to be
6573 START_LENGTH/END_LENGTH so it actually works; couple other
6576 * test/Makefile.am (dist-hook): add dist-hook for .message files
6578 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6579 can be constant or locked.
6580 (_dbus_string_free): allow freeing a const string as
6583 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6585 * dbus/dbus-test-main.c (main): take an argument which is the
6586 directory containing test data
6588 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6589 argument to this and load all the messages in test/data/
6590 checking that they can be loaded or not loaded as appropriate.
6592 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6594 * bus/dispatch.c: (bus_dispatch_message_handler):
6595 Dispatch messages sent to services.
6597 * bus/driver.c: (bus_driver_send_service_deleted),
6598 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6599 (bus_driver_send_service_acquired):
6600 Add helper functions for sending service related messages.
6602 (bus_driver_send_welcome_message):
6603 Send HELLO_REPLY instead of WELCOME.
6605 (bus_driver_handle_list_services):
6606 Send LIST_SERVICES_REPLY instead of SERVICES.
6608 (bus_driver_handle_own_service),
6609 (bus_driver_handle_service_exists):
6610 New message handlers.
6612 (bus_driver_handle_message):
6613 Invoke new message handlers.
6615 (bus_driver_remove_connection):
6616 Don't remove any services here since that's done automatically
6617 by bus_service_remove_owner now.
6620 New function signatures.
6622 * bus/services.c: (bus_service_add_owner):
6623 Send ServiceAcquired message if we're the only primary owner.
6625 (bus_service_remove_owner):
6626 Send ServiceAcquired/ServiceLost messages.
6628 (bus_service_set_prohibit_replacement),
6629 (bus_service_get_prohibit_replacement):
6630 Functions for setting prohibit replacement.
6632 (bus_service_has_owner):
6633 New function that checks if a connection is in the owner queue of
6637 Add new function signatures.
6639 * dbus/dbus-list.c: (_dbus_list_test):
6640 Add tests for _dbus_list_remove_last and traversing the list backwards.
6643 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6644 go any further, so return NULL then.
6646 * dbus/dbus-protocol.h:
6647 Add new messages, service flags and service replies.
6649 2003-01-26 Havoc Pennington <hp@pobox.com>
6651 * dbus/dbus-message-builder.c: implement, completely untested.
6653 * test/data/*: add data to be used in testing.
6654 ".message" files are our simple loadable text format.
6655 ".message-raw" will be binary dumps of messages.
6657 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6659 2003-01-26 Havoc Pennington <hp@pobox.com>
6661 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6663 * dbus/dbus-errors.c (dbus_result_to_string): add
6666 * dbus/dbus-message-builder.c: new file, will contain code to load
6667 up messages from files. Not implemented yet.
6669 2003-01-26 Havoc Pennington <hp@pobox.com>
6671 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6672 the sender by setting to NULL
6674 2003-01-26 Havoc Pennington <hp@pobox.com>
6676 The unit tests pass, but otherwise untested. If it breaks, the
6677 tests should have been better. ;-)
6679 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6682 * dbus/dbus-message.c: redo everything so we maintain
6683 message->header as the only copy of the various fields.
6684 This avoids the possibility of out-of-memory in some cases,
6685 for example dbus_message_lock() can't run out of memory anymore,
6686 and avoids extra copying. Figured I may as well go ahead and do
6687 this since it was busted for dbus_message_lock to not return
6688 failure on OOM, and dbus_message_write_header was totally
6689 unchecked for OOM. Also fixed some random other bugs.
6691 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6692 that strings are nul-terminated. Also, end_pos can be equal
6693 to string length just not greater than, I think.
6694 (_dbus_marshal_set_int32): new function
6695 (_dbus_marshal_set_uint32): new function
6696 (_dbus_marshal_set_string): new function
6698 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6699 a warning, init timeout_list to NULL
6700 (dbus_connection_send_message): don't use uninitialized variable
6703 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6705 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6707 * bus/driver.c: (bus_driver_handle_hello),
6708 (bus_driver_send_welcome_message):
6711 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6713 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6714 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6715 (dbus_connection_unref):
6716 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6717 * dbus/dbus-message.c: (dbus_message_unref),
6720 (dbus_message_get_fields):
6721 Remove debugging printout.
6723 (_dbus_message_loader_return_buffer):
6724 Don't store the header string.
6726 (_dbus_message_test):
6729 2003-01-26 Richard Hult <rhult@codefactory.se>
6731 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6732 the file descriptor list, since it can change under us.
6734 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6736 * glib/dbus-gmain.c: (dbus_connection_prepare),
6737 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6738 (remove_watch), (dbus_connection_hookup_with_g_main):
6739 Rewrite the glib handling to use its own GSource instead of a
6740 GIOChannel so we can catch messages put in the queue while waiting
6743 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6746 * bus/connection.c: (connection_disconnect_handler),
6747 (connection_watch_callback), (bus_connection_setup):
6748 * bus/dispatch.c: (send_one_message),
6749 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6750 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6752 * bus/driver.c: (bus_driver_send_service_deleted),
6753 (bus_driver_send_service_created), (bus_driver_handle_hello),
6754 (bus_driver_send_welcome_message),
6755 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6756 (bus_driver_handle_message):
6758 Refactor code, put the message dispatching in its own file. Use
6759 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6762 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6764 * dbus/dbus-internals.h:
6765 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6767 * dbus/dbus-message.c: (dbus_message_get_sender):
6768 * dbus/dbus-message.h:
6769 Implement dbus_message_get_sender.
6771 * dbus/dbus-protocol.h:
6772 Add message and service defines.
6774 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6776 * dbus/dbus-connection.c: (dbus_connection_send_message):
6777 * dbus/dbus-message-internal.h:
6778 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6779 (dbus_message_write_header):
6780 Remove _dbus_messag_unlock and don't set the client serial on a
6781 message if one already exists.
6783 2003-01-24 Havoc Pennington <hp@pobox.com>
6785 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6788 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6791 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6793 * dbus/dbus-list.c: (alloc_link), (free_link):
6794 Use a memory pool for the links.
6796 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6798 * bus/connection.c: (bus_connection_foreach):
6800 Add new bus_connection_foreach function.
6802 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6803 Add function that broadcasts a message to all clients.
6805 (bus_driver_send_service_created), (bus_driver_handle_hello),
6806 (bus_driver_send_welcome_message),
6807 (bus_driver_handle_list_services), (bus_driver_message_handler):
6808 Implement functions that take care of listing services, and notifying
6809 clients when new services are created.
6811 * bus/services.c: (bus_services_list):
6813 Add new function that returns an array of strings with the currently
6814 registered services.
6817 * glib/dbus-gmain.c:
6818 Update copyright year.
6820 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6822 * dbus/dbus-connection.c: (dbus_connection_send_message):
6823 Unlock the message in case it was sent earlier.
6825 (dbus_connection_send_message_with_reply_and_block):
6826 Remove the reply message from the list.
6828 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6829 Set array_len and new_pos correctly.
6831 (_dbus_marshal_test):
6832 Remove debug output.
6834 * dbus/dbus-message-internal.h:
6835 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6836 New function that returns the reply serial.
6838 (_dbus_message_unlock):
6839 New function that unlocks a message and resets its header.
6841 (dbus_message_append_string_array),
6842 (dbus_message_get_fields_valist),
6843 (dbus_message_iter_get_field_type),
6844 (dbus_message_iter_get_string_array),
6845 (dbus_message_get_fields),
6846 (dbus_message_append_fields_valist):
6847 Handle string arrays.
6849 (dbus_message_set_sender):
6850 Make this function public since the bus daemon needs it.
6852 (decode_header_data):
6853 Set the reply serial to -1 initially.
6855 * dbus/dbus-message.h:
6856 Add dbus_message_set_sender.
6858 2003-01-24 Havoc Pennington <hp@pobox.com>
6860 * doc/dbus-specification.sgml: add some stuff
6862 2003-01-22 Havoc Pennington <hp@pobox.com>
6864 * doc/dbus-specification.sgml: Start to document the protocol.
6866 2003-01-22 Havoc Pennington <hp@pobox.com>
6868 * dbus/dbus-connection.c
6869 (dbus_connection_send_message_with_reply_and_block): add some @todo
6871 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6873 2003-01-21 Havoc Pennington <hp@pobox.com>
6875 (patch untested because can't compile)
6877 * bus/driver.c (create_unique_client_name): make this function
6878 never recycle client names. Also, caller should initialize
6881 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6883 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6885 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6886 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6887 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6888 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6889 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6890 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6891 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6892 * dbus/dbus-marshal.h:
6893 * dbus/dbus-protocol.h:
6894 Add support for marshalling and demarshalling integer, double
6897 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6902 * bus/connection.c: (connection_disconnect_handler):
6903 Remove the connection from the bus driver's list.
6905 (connection_watch_callback): Dispatch messages.
6907 (free_connection_data): Free connection name.
6909 (bus_connection_setup): Add connection to the bus driver's list.
6910 (bus_connection_remove_owned_service):
6911 (bus_connection_set_name), (bus_connection_get_name):
6912 Add functions for setting and getting the connection's name.
6915 Add function headers.
6917 * bus/driver.c: (create_unique_client_name),
6918 (bus_driver_handle_hello_message),
6919 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6920 (bus_driver_add_connection), (bus_driver_remove_connection):
6923 * bus/services.c: (bus_service_free):
6925 New file that handles communication and registreation with the bus
6928 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6930 * dbus/dbus-connection.c: (dbus_connection_send_message):
6931 Add a new client_serial parameter.
6933 (dbus_connection_send_message_with_reply):
6934 Remove a @todo since we've implemented the blocking function.
6936 (dbus_connection_send_message_with_reply_and_block):
6937 New function that sends a message and waits for a reply and
6938 then returns the reply.
6940 * dbus/dbus-connection.h:
6943 * dbus/dbus-errors.c: (dbus_result_to_string):
6944 * dbus/dbus-errors.h:
6945 Add new DBUS_RESULT.
6947 * dbus/dbus-message-internal.h:
6948 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6949 (_dbus_message_set_sender), (dbus_message_write_header),
6950 (dbus_message_new_reply), (decode_header_data),
6951 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6952 * dbus/dbus-message.h:
6953 Add new functions that set the reply serial and sender.
6954 Also marshal and demarshal them correctly and add test.
6956 * dbus/dbus-protocol.h:
6957 Add new DBUS_MESSAGE_TYPE_SENDER.
6960 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6961 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6962 (dbus_connection_hookup_with_g_main):
6963 * glib/test-dbus-glib.c: (main):
6964 Rewrite to use GIOChannel and remove the GSource crack.
6966 * test/echo-client.c: (main):
6967 * test/watch.c: (check_messages):
6968 Update for changed APIs
6970 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6972 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6974 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6975 Create a DBusTimeoutList.
6976 (dbus_connection_set_timeout_functions): Add new function to
6977 set timeout callbacks
6979 * dbus/dbus-connection.h: Add public DBusTimeout API.
6981 * dbus/dbus-message.c: (dbus_message_get_service):
6982 * dbus/dbus-message.h: New function.
6984 * dbus/dbus-server.c: Fix small doc typo.
6986 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6988 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6990 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6991 of the string, just as long as specified.
6993 2003-01-19 Havoc Pennington <hp@pobox.com>
6995 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6998 * dbus/dbus-server.c (dbus_server_set_max_connections)
6999 (dbus_server_get_max_connections, dbus_server_get_n_connections):
7000 keep track of current number of connections, and add API for
7001 setting a max (but haven't implemented enforcing the max yet)
7003 2003-01-18 Havoc Pennington <hp@pobox.com>
7005 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7006 reading/writing if read_watch != NULL or write_watch != NULL.
7008 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7009 the message loader code to actually load message->header and
7010 message->body into the newly-created message.
7012 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7015 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7016 (dbus_connection_get_max_message_size)
7017 (dbus_connection_set_max_live_messages_size)
7018 (dbus_connection_get_max_live_messages_size): implement some
7019 resource limitation functions
7021 * dbus/dbus-resources.c: new file implementing some of the
7022 resource limits stuff
7024 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7025 missing docs, add @todo to handle OOM etc.
7027 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7030 2003-01-18 Havoc Pennington <hp@pobox.com>
7032 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7033 connection if it hasn't been already.
7035 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7036 replace with DisconnectFunction.
7038 2003-01-18 Havoc Pennington <hp@pobox.com>
7040 Building --disable-verbose-mode --disable-asserts --disable-tests
7041 cuts the library from 112K to 45K or so
7043 * configure.in: check for varargs macro support,
7044 add --enable-verbose-mode, --enable-asserts.
7046 * dbus/dbus-internals.h (_dbus_assert): support
7048 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7050 2003-01-18 Havoc Pennington <hp@pobox.com>
7052 * dbus/dbus-test.c: include config.h so that tests actually run
7054 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7055 so the failure mode when that assumption fails will be plenty
7058 2003-01-18 Havoc Pennington <hp@pobox.com>
7060 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7062 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7065 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7066 since we don't want to use those in make check
7068 2003-01-15 Havoc Pennington <hp@redhat.com>
7074 2003-01-15 Havoc Pennington <hp@redhat.com>
7076 * test/Makefile.am: fix so that test source code ends up in the
7077 distribution on make distcheck
7079 2003-01-15 Havoc Pennington <hp@redhat.com>
7085 2003-01-15 Havoc Pennington <hp@redhat.com>
7087 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7088 fix build when --disable-tests
7090 * Makefile.am (EXTRA_DIST): put HACKING in here
7092 * HACKING: document procedure for making a tarball release.
7094 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7096 * bus/connection.c: (connection_error_handler),
7097 (bus_connection_setup):
7098 * bus/main.c: (main):
7099 Make sure that the DBusConnectionData struct is NULLed
7100 out to prevent a segfault.
7102 * dbus/dbus-errors.c: (dbus_result_to_string):
7103 * dbus/dbus-errors.h:
7104 * dbus/dbus-message.c: (dbus_message_get_fields),
7105 (dbus_message_get_fields_valist), (_dbus_message_test):
7106 * dbus/dbus-message.h:
7107 Make dbus_message_get_fields return a result code so we can
7108 track invalid fields as well as oom.
7110 2003-01-11 Havoc Pennington <hp@pobox.com>
7112 * configure.in: change --enable-test/--enable-ansi action-if-given
7113 to enable_foo=$enableval instead of enable_foo=yes
7115 2003-01-08 Havoc Pennington <hp@pobox.com>
7117 * dbus/dbus-string.c (_dbus_string_align_length): new function
7119 * dbus/dbus-test-main.c: move main() for test app here
7121 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7122 symbol to run tests, because dbus-test isn't in the main
7125 Code review nitpicks.
7127 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7128 for people with narrow emacs ;-). Assert client_serial was filled
7129 in. Assert message->name != NULL.
7130 (dbus_message_append_fields): have "first_field_type" arg separate
7131 from va list, needed for C++ binding that also uses varargs IIRC
7132 and helps with type safety
7133 (dbus_message_new): add @todo about using DBusString to store
7134 service/name internally
7135 (dbus_message_new): don't leak ->service and ->name on OOM later
7137 (dbus_message_unref): free the service name
7138 (dbus_message_get_fields): same change to varargs
7139 i.e. first_field_type
7140 (_dbus_message_loader_return_buffer): assert that the message data
7141 is aligned (if not it's a bug in our code). Put in verbose griping
7142 about why we set corrupted = TRUE.
7143 (decode_header_data): add FIXME that char* is evil. Was going to
7144 add FIXME about evil locale-specific string.h strncmp, but just
7145 switched to wacky string-as-uint32 optimization. Move check for
7146 "no room for field name" above get_const_data_len() to avoid
7147 assertion failure in get_const_data_len if we have trailing 2
7148 bytes or the like. Check for service and name fields being
7149 provided twice. Don't leak service/name on error. Require field
7150 names to be aligned to 4 bytes.
7152 * dbus/dbus-marshal.c: move byte swap stuff to header
7153 (_dbus_pack_int32): uscore-prefix
7154 (_dbus_unpack_int32): uscore-prefix
7155 (_dbus_unpack_uint32): export
7156 (_dbus_demarshal_string): add @todo complaining about use of
7158 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7159 handling allowing corrupt data to go unchecked
7161 2003-01-08 Havoc Pennington <hp@redhat.com>
7163 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7164 to the select() as needed for authentication. (should be using
7165 _dbus_poll() not select, but for another day)
7167 * dbus/dbus.h: include dbus/dbus-protocol.h
7169 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7171 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7174 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7176 * dbus/dbus-internals.c: (_dbus_type_to_string):
7177 New function that returns a string describing a type.
7179 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7180 * dbus/dbus-marshal.h:
7181 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7182 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7183 (dbus_message_iter_get_byte_array):
7184 * dbus/dbus-message.h:
7185 Add new convenience functions for appending and getting message fields.
7186 Also add demarshalling routines for byte arrays.
7188 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7190 * dbus/dbus-connection-internal.h:
7191 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7192 (_dbus_connection_get_next_client_serial),
7193 (dbus_connection_send_message):
7194 * dbus/dbus-internals.h:
7195 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7196 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7197 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7198 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7199 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7200 (_dbus_verbose_bytes), (_dbus_marshal_test):
7201 * dbus/dbus-marshal.h:
7202 * dbus/dbus-message-internal.h:
7203 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7204 (dbus_message_write_header), (_dbus_message_lock),
7205 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7206 (dbus_message_get_name), (dbus_message_append_int32),
7207 (dbus_message_append_uint32), (dbus_message_append_double),
7208 (dbus_message_append_string), (dbus_message_append_byte_array),
7209 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7210 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7211 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7212 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7213 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7214 (decode_header_data), (_dbus_message_loader_return_buffer),
7215 (message_iter_test), (_dbus_message_test):
7216 * dbus/dbus-message.h:
7217 * dbus/dbus-protocol.h:
7218 * dbus/dbus-test.c: (main):
7220 * glib/test-dbus-glib.c: (message_handler), (main):
7221 * test/echo-client.c: (main):
7222 * test/watch.c: (check_messages):
7223 Make messages sendable and receivable for real.
7225 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7227 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7228 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7229 * dbus/dbus-message.c: (dbus_message_append_int32),
7230 (dbus_message_append_uint32), (dbus_message_append_double),
7231 (dbus_message_append_string), (dbus_message_append_byte_array):
7232 Handle OOM restoration.
7234 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7236 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7237 (_dbus_demarshal_string), (_dbus_marshal_test):
7238 * dbus/dbus-marshal.h:
7239 * dbus/dbus-message.c: (dbus_message_get_name),
7240 Document these functions.
7242 (dbus_message_append_int32), (dbus_message_append_uint32),
7243 (dbus_message_append_double), (dbus_message_append_string),
7244 (dbus_message_append_byte_array):
7245 * dbus/dbus-message.h:
7246 Add functions for adding message fields of different types.
7248 * dbus/dbus-protocol.h:
7249 Add the different types.
7251 2003-01-05 Havoc Pennington <hp@pobox.com>
7253 * bus/connection.c: implement routines for handling connections,
7254 first thing is keeping a list of owned services on each connection
7255 and setting up watches etc.
7257 * bus/services.c: implement a mapping from service names to lists
7260 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7262 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7263 to use static mutexes for global data
7265 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7266 collection of functions to set/get application-specific data
7267 on the DBusConnection.
7269 2003-01-04 Havoc Pennington <hp@pobox.com>
7271 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7272 (_dbus_poll): new function
7274 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7277 * bus/loop.c: initial code for the daemon main loop
7279 2003-01-04 Havoc Pennington <hp@pobox.com>
7281 * test/watch.c (error_handler): make it safe if the error handler
7282 is called multiple times (if we s/error handler/disconnect
7283 handler/ we should just guarantee it's called only once)
7285 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7286 error handler on disconnect (it's quite possible we should
7287 just change the error handler to a "disconnect handler," I'm
7288 not sure we have any other meaningful errors)
7290 * configure.in: check for getpwnam_r
7292 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7293 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7294 mechanism as in SASL spec, using socket credentials
7296 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7297 (_dbus_send_credentials_unix_socket): new function
7299 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7301 (_dbus_write): only check errno if <0 returned
7302 (_dbus_write_two): ditto
7304 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7306 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7307 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7308 (_dbus_marshal_test):
7309 * dbus/dbus-marshal.h:
7310 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7311 to _dbus_marshal_utf8_string. Also fix some tests.
7313 2002-12-28 Harri Porten <porten@kde.org>
7315 * configure.in: added check for C++ compiler and a very cheesy
7316 check for the Qt integration
7318 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7320 * qt/Makefile.am: added
7322 * qt/.cvsignore: added
7324 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7325 latter, added #ifdef QT_THREAD_SUPPORT guard.
7327 * dbus/Makefile.am: added missing headers for make dist
7329 2002-12-28 Kristian Rietveld <kris@gtk.org>
7331 * dbus/Makefile.am: fixup export-symbols-regex.
7333 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7335 * acinclude.m4: Add this file and put the
7336 PKG_CHECK_MODULE macro in it.
7338 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7340 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7341 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7342 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7343 (_dbus_marshal_test):
7344 Make the demarshalling routines align the pos argument.
7345 Add string marshalling tests and fix the obvious bugs
7348 2002-12-26 Havoc Pennington <hp@pobox.com>
7350 * dbus/dbus-auth.c: fixes fixes fixes
7352 * dbus/dbus-transport-unix.c: wire up support for
7353 encoding/decoding data on the wire
7355 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7356 (_dbus_auth_decode_data): append to target string
7357 instead of nuking it.
7359 2002-12-26 Havoc Pennington <hp@pobox.com>
7361 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7362 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7365 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7366 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7367 now). Main point is because I wanted unpack_uint32 to implement
7369 (_dbus_verbose_bytes): new function
7371 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7373 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7374 mechanism to handle a corrupt message stream
7375 (_dbus_message_loader_new): fix preallocation to only prealloc,
7378 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7379 (_dbus_string_test): enhance tests for copy/move and fix the
7382 * dbus/dbus-transport-unix.c: Hold references in more places to
7383 avoid reentrancy problems
7385 * dbus/dbus-transport.c: ditto
7387 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7388 leak reference count in no-message case
7390 * test/watch.c (do_mainloop): handle adding/removing watches
7391 during iteration over the watches. Also, ref the connection/server
7392 stored on a watch, so we don't try to mangle a destroyed one.
7394 * dbus/dbus-transport-unix.c (do_authentication): perform
7397 * dbus/dbus-auth.c (get_state): add a state
7398 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7399 (_dbus_auth_get_unused_bytes): append the unused bytes
7400 to the passed in string, rather than prepend
7402 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7403 the auth conversation DBusAuth
7405 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7406 (_dbus_transport_new_for_domain_socket): when creating a
7407 transport, pass in whether it's a client-side or server-side
7408 transport so we know which DBusAuth to create
7410 2002-12-03 Havoc Pennington <hp@pobox.com>
7412 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7413 _after_ finalizing the derived members
7414 (unix_connection_set): unref watch if we fail to add it
7416 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7417 transport first, so that the connection owned by the
7418 transport will be valid as the transport finalizes.
7420 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7421 if necessary, and remove watches from the connection.
7423 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7425 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7427 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7428 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7429 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7430 (_dbus_marshal_test):
7431 * dbus/dbus-marshal.h:
7432 Add string marshal functions and have the demarshal functions
7433 return the new position.
7435 2002-12-25 Havoc Pennington <hp@pobox.com>
7437 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7438 it is a simple protocol that just maps directly to SASL.
7440 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7441 initial implementation, not actually used yet.
7443 * dbus/dbus-string.c (_dbus_string_find): new function
7444 (_dbus_string_equal): new function
7445 (_dbus_string_base64_encode): new function
7446 (_dbus_string_base64_decode): new function
7448 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7451 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7452 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7453 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7454 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7455 * dbus/dbus-marshal.h:
7456 * dbus/dbus-protocol.h:
7457 * dbus/dbus-test.c: (main):
7459 Add un-optimized marshalling/demarshalling routines.
7461 2002-12-25 Harri Porten <porten@kde.org>
7463 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7465 2002-12-24 Zack Rusin <zack@kde.org>
7467 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7468 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7471 2002-12-24 Havoc Pennington <hp@pobox.com>
7473 * glib/dbus-gthread.c: fix include
7475 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7476 I think glib API needs to change, though, as you don't
7477 want to use DBusMessageFunction, you want to use the
7478 DBusMessageHandler object. Probably
7479 dbus_connection_open_with_g_main_loop()
7480 and dbus_connection_setup_g_main_loop() or something like that
7481 (but think of better names...) that just create a connection
7482 that has watch/timeout functions etc. already set up.
7484 * dbus/dbus-connection.c
7485 (dbus_connection_send_message_with_reply): new function just to
7486 show how the message handler helps us deal with replies.
7488 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7490 * dbus/dbus-string.c (_dbus_string_test): free a string that
7493 * dbus/dbus-hash.c: use memory pools for the hash entries
7494 (rebuild_table): be more paranoid about overflow, and
7495 shrink table when we can
7496 (_dbus_hash_test): reduce number of sprintfs and write
7497 valid C89. Add tests for case where we grow and then
7498 shrink the hash table.
7500 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7502 * dbus/dbus-connection.c (dbus_connection_register_handler)
7503 (dbus_connection_unregister_handler): new functions
7505 * dbus/dbus-message.c (dbus_message_get_name): new
7507 * dbus/dbus-list.c: fix docs typo
7509 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7510 an object representing a handler for messages.
7512 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7515 * glib/dbus-gthread.c: (dbus_gthread_init):
7516 Don't use the gdbus prefix for public functions.
7518 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7522 Add GLib checks and fixup .pc files
7526 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7527 (gdbus_connection_check), (gdbus_connection_dispatch),
7528 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7529 (dbus_connection_gsource_new):
7530 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7531 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7532 * glib/test-dbus-glib.c: (message_handler), (main):
7535 2002-12-15 Harri Porten <porten@kde.org>
7537 * autogen.sh: check for libtoolize before attempting to use it
7539 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7542 * .cvsignore: ignore more stamp files
7544 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7546 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7547 without make install.
7549 2002-12-15 Havoc Pennington <hp@pobox.com>
7551 * dbus/dbus-threads.c: add thread stubs that a higher library
7552 layer can fill in. e.g. the GLib wrapper might fill them in with
7553 GThread stuff. We still need to use this thread API to
7554 thread-safe-ize the library.
7556 2002-12-12 Havoc Pennington <hp@pobox.com>
7558 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7559 below new interfaces and include fewer system headers.
7561 * dbus/dbus-sysdeps.c (_dbus_read): new function
7562 (_dbus_write): new function
7563 (_dbus_write_two): new function
7564 (_dbus_connect_unix_socket): new function
7565 (_dbus_listen_unix_socket): new function
7567 * dbus/dbus-message-internal.h: change interfaces to use
7570 2002-12-11 Havoc Pennington <hp@pobox.com>
7572 * dbus/dbus-types.h: add dbus_unichar
7574 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7576 * dbus/dbus-connection.c (dbus_connection_send_message): return
7579 * dbus/dbus-transport.c: include dbus-watch.h
7581 * dbus/dbus-connection.c: include dbus-message-internal.h
7583 * HACKING: add file with coding guidelines stuff.
7585 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7586 handling here, for security purposes (as in vsftpd). Not actually
7587 using this class yet.
7589 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7590 system/libc usage here, as in vsftpd, for ease of auditing (and
7591 should also simplify portability). Haven't actually moved all the
7592 system/libc usage into here yet.
7594 2002-11-25 Havoc Pennington <hp@pobox.com>
7596 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7597 always print the first verbose message.
7599 2002-11-24 Havoc Pennington <hp@pobox.com>
7601 * test/echo-client.c, test/echo-server.c: cheesy test
7604 * configure.in (AC_CHECK_FUNCS): check for writev
7606 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7609 * dbus/dbus-list.c (_dbus_list_foreach): new function
7611 * dbus/dbus-internals.c (_dbus_verbose): new function
7613 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7614 representing a server that listens for connections.
7616 * dbus/.cvsignore: create
7618 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7619 public API for reporting errors
7621 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7622 public object representing a connection that
7623 sends/receives messages. (Same object used for
7624 both client and server.)
7626 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7627 Basic abstraction for different kinds of stream
7628 that we might read/write messages from.
7630 2002-11-23 Havoc Pennington <hp@pobox.com>
7632 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7635 * dbus/dbus-test.c (main): add list test, and include
7636 dbus-test.h as intended
7638 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7639 (_dbus_hash_table_remove_int): return value indicates
7640 whether the entry existed to remove
7642 * dbus/dbus-list.c: add linked list utility class,
7645 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7648 2002-11-23 Havoc Pennington <hp@pobox.com>
7650 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7651 DBUS_END_DECLS to nothing, that should fix this once and for all
7653 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7655 * dbus/dbus-message.c, dbus/dbus-hash.c:
7656 add some missing @brief
7658 2002-11-23 Havoc Pennington <hp@pobox.com>
7660 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7661 to avoid confusing Doxygen
7663 * dbus/dbus-hash.c: @} not }@
7665 * dbus/dbus-message.c (struct DBusMessage): split out
7668 2002-11-23 Havoc Pennington <hp@pobox.com>
7670 * configure.in: pile on more warning flags if using gcc
7672 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7673 to document static functions
7675 * configure.in: add summary to end of configure so it
7676 looks nice and attractive
7678 * dbus/dbus-hash.c: finish implementation and write unit
7681 * configure.in: add --enable-tests to enable unit tests
7683 * dbus/dbus-test.c: test program to run unit tests
7684 for all files in dbus/*, initially runs a test for
7687 * dbus/dbus-internals.h: file to hold some internal utility stuff
7689 2002-11-22 Havoc Pennington <hp@redhat.com>
7691 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7692 "ported" away from Tcl
7694 * dbus/dbus-types.h: header for types such as dbus_bool_t
7696 2002-11-22 Havoc Pennington <hp@redhat.com>
7698 * dbus/dbus.h: fixups for doc warnings
7700 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7702 (QUIET): make it quiet so we can see warnings
7704 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7706 2002-11-22 Havoc Pennington <hp@redhat.com>
7708 * Makefile.am: include "Doxyfile" target in all-local
7710 * configure.in: generate the Doxyfile
7712 * Doxyfile.in: move Doxyfile here, so we can use
7713 configure to generate a Doxyfile with the right
7716 2002-11-22 Havoc Pennington <hp@redhat.com>
7718 * dbus/dbus-message.c: move inline docs into .c file
7720 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7721 so all docs are under doc/
7722 (MAN_EXTENSION): generate man pages. Use extension
7723 ".3dbus" which matches ".3qt" on my system,
7724 I guess this is OK, I don't know really.
7725 (FILE_PATTERNS): look for .c files not .h, makes sense
7728 2002-11-22 Havoc Pennington <hp@pobox.com>
7730 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7731 because any app can be a server, and any app can be a client,
7732 the bus is a special kind of server.
7734 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7736 * Doxyfile : adding. Still needs Makefile rules to be generated
7737 automatically (just run "doxygen" in the toplevel dir for now to
7740 * dbus/dbus-message.h : Adding sample docs (javadoc since
7741 resembles gtk-doc a little more)
7743 * dbus/dbus.h : Adding sample docs
7745 2002-11-21 Havoc Pennington <hp@redhat.com>
7747 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7748 so we can allow ourselves to include files directly,
7749 instead of having to use dbus.h
7751 * dbus/dbus.h: fill in
7753 * dbus/dbus-message.h: sketch out a sample header file.
7754 Include griping if you include it directly instead of
7757 * dbus/dbus-macros.h: new file with macros for extern "C",
7758 TRUE/FALSE, NULL, etc.
7760 * doc/file-boilerplate.c: put include guards in here
7762 2002-11-21 Havoc Pennington <hp@redhat.com>
7764 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7766 * COPYING: include the GPL as well, and license code
7767 under both AFL and GPL.
7769 2002-11-21 Havoc Pennington <hp@redhat.com>
7771 * acconfig.h: get rid of this
7773 * autogen.sh (run_configure): add --no-configure option
7775 * configure.in: remove AC_ARG_PROGRAM to make
7776 autoconf complain less. add AC_PREREQ.
7777 add AC_DEFINE third arg.
7779 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7782 Fix references so we can distcheck.
7784 2002-11-21 Havoc Pennington <hp@redhat.com>
7786 * Initial module creation