1 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
3 Patch from Johan Fischer <linux@fischaz.com>
5 * mono/doc/Makefile.am (install-data-local): Added directory
8 2004-10-29 Colin Walters <walters@redhat.com>
10 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
11 parameter for fd to write pid to.
13 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
15 * bus/bus.c (bus_context_new): Pass print_pid_fd
16 to _dbus_become_daemon (bug #1720)
18 2004-10-29 Colin Walters <walters@redhat.com>
20 Patch from Ed Catmur <ed@catmur.co.uk>
22 * mono/doc/Makefile.am (install-data-local): Handle
25 2004-10-29 Colin Walters <walters@redhat.com>
27 * bus/.cvsignore, qt/.cvsignore: Update.
29 2004-10-29 Colin Walters <walters@redhat.com>
31 Patch from Kristof Vansant <de_lupus@pandora.be>
33 * configure.in: Detect Slackware.
34 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
35 * bus/rc.messagebus.in: New file.
37 2004-10-29 Colin Walters <walters@redhat.com>
39 * tools/dbus-monitor.c (filter_func): Return
40 DBUS_HANDLER_RESULT_HANDLED in filter function
42 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
44 2004-10-29 Colin Walters <walters@redhat.com>
46 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
48 * bus/services.c (bus_registry_acquire_service):
49 Correctly retrieve service name from DBusString
52 2004-10-29 Colin Walters <walters@redhat.com>
54 * dbus/dbus-glib.h: Update documentation to not
55 refer to internal APIs.
57 2004-10-27 Joe Shaw <joeshaw@novell.com>
59 * mono/Arguments.cs (GetDBusTypeConstructor):
60 type.UnderlyingSystemType will return "System.Byte" if you do it
61 on "byte[]", which is not what we want. So check the type.IsArray
62 property and use System.Array instead.
64 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
66 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
67 the DBusUserInfo structure since this is passed into the function.
68 This would cause a double free when the function that allocated
69 the structure would try to free it when an error occured.
71 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
72 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
73 for service activation to avoid 32bit/64bit parallel install issues
75 2004-10-21 Colin Walters <walters@verbum.org>
77 * AUTHORS: Fix my email address, the @gnu.org one
78 has been bouncing for some time. Also add J5.
80 2004-10-21 Colin Walters <walters@verbum.org>
82 * dbus/dbus-transport-unix.c (do_authentication): Return
83 authentication status to callers.
84 (unix_handle_watch): If we completed authentication this round,
85 don't do another read. Instead wait until the next iteration,
86 after we've read any pending data in the auth buffer.
87 (unix_do_iteration): Ditto.
88 (unix_handle_watch): Updated for new do_authentication prototype.
90 2004-10-18 Colin Walters <walters@verbum.org>
92 * bus/selinux.c (bus_selinux_enabled): Handle
93 --disable-selinux case.
95 2004-10-18 Colin Walters <walters@verbum.org>
97 * bus/selinux.h: Add bus_selinux_enabled.
99 * bus/selinux.c (bus_selinux_enabled): Implement it.
101 * bus/config-parser.c (struct include): Add
102 if_selinux_enabled member.
103 (start_busconfig_child): Parse if_selinux_enabled
104 attribute for include.
105 (bus_config_parser_content): Handle it.
107 * bus/session.conf.in, bus/system.conf.in: Add
108 inclusion of context mapping to default config files;
109 conditional on SELinux being enabled.
111 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
113 * test/data/invalid-config-files/badselinux-1.conf,
114 test/data/invalid-config-files/badselinux-2.conf:
115 Test files for bad syntax.
117 2004-10-17 Colin Walters <walters@verbum.org>
119 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
120 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
121 format specifier mismatches.
123 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
125 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
128 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
129 pointer (bug #1540, Leonardo Boiko).
131 2004-09-28 Jon Trowbridge <trow@ximian.com>
133 * mono/BusDriver.cs: Changed BusDriver struct to remove
134 the ServiceCreated and ServiceDeleted events and replace them
135 with the new ServiceOwnerChanged event.
137 * mono/example/BusListener.cs: Added a new example program,
138 which listens for and reports any ServiceOwnerChanged events
141 * mono/example/Makefile.am (DESTDIR): Build changes for the
142 new BusListener.cs example.
144 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
146 * bus/signals.c (bus_match_rule_parse): validate the components of
147 match rules (bug #1439).
149 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
151 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
153 * doc/dbus-specification.xml: document ServiceOwnerChanged
156 * bus/driver.c, bus/driver.h, bus/services.c: Use
157 ServiceOwnerChanged signal instead of ServiceCreated and
160 * bus/dispatch.c: update testcase for the new signal.
162 2004-09-20 Jon Trowbridge <trow@ximian.com>
164 Patch from Nat Friedman <nat@novell.com>
166 * mono/Makefile.am: A number of small build fixes to allow "make
167 distcheck" to succeed.
169 * mono/example/Makefile.am: "make distcheck" fixes.
171 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
174 * test/Makefile.am: "make distcheck" fixes.
176 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
178 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
180 * doc/busconfig.dtd: update the DTD for the at_console attribute.
182 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
183 messages after the first one (bug #1389).
185 * bus/dispatch.c (check_double_hello_message): add a test case for
186 the double hello message bug.
187 (check_existent_service_activation): fix check of spawning error.
189 2004-09-16 David Zeuthen <david@fubar.dk>
191 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
193 2004-09-12 David Zeuthen <david@fubar.dk>
195 Patch from Kay Sievers <kay.sievers@vrfy.org>
197 * bus/bus.c (bus_context_new):
201 Add commandline option --nofork to override configuration file
204 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
206 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
207 compilers don't like it (bug #974).
209 2004-09-04 Harald Fernengel <harry@kdevelop.org>
211 * qt/connection.*: Applied patch by Jérôme Lodewyck
212 <lodewyck@clipper.ens.fr> to integrate an existing
213 connection into the Qt eventloop
215 2004-08-30 Jon Trowbridge <trow@ximian.com>
217 * mono/BusDriver.cs: Added. This is a class for interacting with
218 the org.freedesktop.DBus service.
220 * mono/Message.cs: Added a mechanism to expose the message that is
221 currently being dispatched via the static Message.Current
222 property. Added Message.Sender and Message.Destination
225 * mono/Handler.cs: Expose the dispatched message via
226 Message.Current when handling method calls.
228 * mono/Service.cs: Expose the dispatched message via
229 Message.Current when handling signal emissions.
231 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
232 Connection.BaseService property.
234 2004-08-28 Havoc Pennington <hp@redhat.com>
236 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
238 More fixes from Steve Grubb
240 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
241 (_dbus_listen_tcp_socket): fix fd leak
243 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
244 EINTR to a bit lower in the code
246 2004-08-26 Jon Trowbridge <trow@ximian.com>
248 * bus/driver.c (bus_driver_handle_service_exists): Respond with
249 TRUE if we are inquiring about the existence of the built-in
250 org.freedesktop.DBus service.
252 2004-08-25 John Palmieri <johnp@redhat.com>
253 * bus/config-parser.c:
254 (struct PolicyType): Add POLICY_CONSOLE
255 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
256 (start_busconfig_child): Sets up console element when
257 <policy at_console=""> is encountered in a policy file
258 (append_rule_from_element): Convert console elements to console
262 (bus_policy_create_client_policy): Add console rules to the client
263 policy based on if the client is at the console
264 (bus_policy_append_console_rule): New function for adding a
265 console rule to a policy
266 (bus_policy_merge): Handle console rule merging
268 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
269 where we check for console user files
271 * dbus/dbus-sysdeps.c:
272 (_dbus_file_exists): New function which checks if the given
274 (_dbus_user_at_console): New function which does the system
275 specific process of checking if the user is at the console
277 * dbus/dbus-userdb.c:
278 (_dbus_is_console_user): New function converts a UID to user name
279 and then calls the system specific _dbus_user_at_console to
280 see if the user is at the console and therefor a console user
282 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
284 * bus/config-parser.c (set_limit):
285 * bus/dbus-daemon-1.1.in:
286 * test/data/valid-config-files/many-rules.conf: set the
287 max_match_rules_per_connection limt from the config file.
289 * doc/busconfig.dtd: update the DTD.
291 * bus/driver.c: remove some unused variables.
293 2004-08-24 Mikael Hallendal <micke@imendio.com>
295 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
296 it's been replaced by dbus_g_bus_get
298 2004-08-23 Colin Walters <walters@redhat.com>
300 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
302 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
304 * bus/selinux.c: Create a thread for policy reload notification.
305 (bus_selinux_get_policy_root): Implement.
307 * bus/config-parser.c (start_busconfig_child)
308 (bus_config_parser_content): Support SELinux-root relative
311 * configure.in <HAVE_SELINUX>: Add -lpthread.
313 * bus/test-main.c (test_pre_hook, test_post_hook): New.
314 (test_post_hook): Move memory checking into here.
315 (test_pre_hook, test_post_hook): Move SELinux checks in
316 here, but conditional on a DBUS_TEST_SELINUX environment
317 variable. Unfortunately we can't run the SELinux checks
318 as a normal user, since they won't have any permissions
319 for /selinux. So this will have to be tested manually
320 for now, until we have virtualization for most of
323 2004-08-23 Havoc Pennington <hp@redhat.com>
325 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
326 drop supplementary groups, suggested by Steve Grubb
328 2004-08-20 Colin Walters <walters@redhat.com>
330 * bus/config-parser.c (start_busconfig_child): Remove some unused
333 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
336 2004-08-17 Joe Shaw <joeshaw@novell.com>
338 * configure.in: If --enable-mono is passed in, if we can't find
341 * mono/Makefile.am: Use /gacutil to install assemblies into the
344 2004-08-12 Havoc Pennington <hp@redhat.com>
346 * NEWS: update for 0.22
348 * configure.in: release 0.22
350 2004-08-11 Colin Walters <walters@redhat.com>
352 * tools/dbus-send.c (main, usage): Add --reply-timeout
355 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
357 * bus/bus.c (process_config_first_time_only): get rid of an unused
358 DBusError that was causing a memoy leak (bug #989).
360 * dbus/dbus-keyring.c, dbus/dbus-message.c:
361 fix compilation on Solaris/Forte C (bug #974)
363 * bus/main.c (main): plug two minuscule memleaks.
365 2004-08-10 Havoc Pennington <hp@redhat.com>
367 * doc/dbus-tutorial.xml: add some more info on GLib bindings
369 2004-08-09 Havoc Pennington <hp@redhat.com>
371 * COPYING: switch to Academic Free License version 2.1 instead of
372 2.0, to resolve complaints about patent termination clause.
374 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
376 * README: added documentation for the --enable-python
379 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
381 * bus/config-parser.c (bus_config_parser_new): fix an invalid
382 _unref in the SELinux support.
384 * doc/busconfig.dtd: update DTD for SELinux support.
386 * bus/config-loader-libxml.c: fix error handler and parser
387 initialisation/cleanup. OOM test now works with libxml2 HEAD.
389 * configure.in: remove the warning about libxml2.
391 * dbus/dbus-bus.c: silence doxygen warning.
393 2004-07-31 Colin Walters <walters@redhat.com>
395 * configure.in: Move #error in SELinux check to its own line.
397 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
399 * dbus/dbus-internals.h (_DBUS_SET_OOM):
400 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
403 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
404 broken by the change in the _SET_OOM macros.
406 2004-07-31 Colin Walters <walters@redhat.com>
408 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
411 2004-07-31 Colin Walters <walters@redhat.com>
413 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
414 to correctly detect DBUS__ACQUIRE_SVC. Also add an
417 2004-07-24 Havoc Pennington <hp@redhat.com>
419 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
421 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
424 * configure.in: add --enable-selinux
426 * bus/policy.c (bus_policy_merge): add FIXME to a comment
428 * bus/main.c (main): initialize and shut down selinux
430 * bus/connection.c: store SELinux ID on each connection, to avoid
431 repeated getting of the string context and converting it into
434 * bus/bus.c (bus_context_get_policy): new accessor, though it
436 (bus_context_check_security_policy): check whether the security
437 context of sender connection can send to the security context of
440 * bus/config-parser.c: add parsing for <selinux> and <associate>
442 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
443 implement dbus_connection_get_unix_fd()
445 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
446 function, used by the selinux stuff
448 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
450 * bus/config-loader-libxml.c: complete the implementation of
451 libxml backend for config file loader. Doesn't work with full OOM
454 * configure.in: change error when selecting libxml into a warning.
456 * test/data/invalid-config-files: add two non-well-formed XML
459 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
461 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
462 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
463 be necessary to read all the buffer. (bug #894)
465 * bus/activation.c (bus_activation_activate_service): fix a
466 potential assertion failure (bug #896). Small optimization in the
467 case of auto-activation messages.
469 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
470 add test case for byte-through-vararg bug (#901). patch by Kimmo
473 2004-07-28 Anders Carlsson <andersca@gnome.org>
476 * python/dbus_bindings.pyx.in:
477 Add dbus.init_gthreads (), allow emit_signal to pass
478 arguments to the signal.
480 2004-07-24 Havoc Pennington <hp@redhat.com>
482 * AUTHORS: add some people, not really comprehensively, let me
485 2004-07-24 Havoc Pennington <hp@redhat.com>
487 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
490 * test/Makefile.am (DIST_SUBDIRS): here also
492 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
494 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
495 breaking build on Solaris, reported by Farhad Saberi on the ML.
497 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
498 va_arg invocation to account for integer promotion in the case of
499 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
501 * bus/services.c (bus_service_remove_owner): fix bug #902, use
502 _dbus_list_get_first_link, not _dbus_list_get_first.
504 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
506 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
507 handler functions so that the asserts in _dbus_object_subtree_unref
510 * dbus/dbus-transport-unix.c (do_reading):
511 _dbus_transport_queue_messages return value is of type
512 dbus_bool_t, not DBusDispatchStatus.
514 2004-07-19 David Zeuthen <david@fubar.dk>
516 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
519 (check_get_connection_unix_user): Debug says GetProperty; but the
520 method is called GetConnectionUnixUser
521 (check_get_connection_unix_process_id): New function
522 (bus_dispatch_test): Actually call check_get_connection_unix_user();
523 also call check_get_connection_unix_process_id()
526 (bus_driver_handle_get_connection_unix_process_id): New function,
527 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
531 (handle_server_data_external_mech): Set pid from the credentials
532 obtained from the socket
534 * dbus/dbus-connection.c:
535 (dbus_connection_get_unix_process_id): New function
537 * dbus/dbus-connection.h:
538 Add prototype for dbus_connection_get_unix_process_id
540 * dbus/dbus-transport.c:
541 (_dbus_transport_get_unix_process_id): New function
543 * dbus/dbus-transport.h:
544 Add prototype for _dbus_transport_get_unix_process_id
546 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
548 * dbus/dbus-message.c: Message counter fix, patch by Christian
549 Hammond <chipx86@gnupdate.org>
551 2004-07-18 Seth Nickell <seth@gnome.org>
554 * python/dbus_bindings.pyx.in:
555 * python/tests/test-client.py:
557 Add dbus.ByteArray and dbus_bindings.ByteArray
558 types so that byte streams can be passed back.
560 Give jdahlin the heaps of credit that are so
563 2004-07-12 Seth Nickell <seth@gnome.org>
567 Add message argument to the default object_method_handler
570 * python/dbus_bindings.pyx.in:
572 Automatically return NIL when passed an empty list
573 (we can't pass back a list since lists are typed
574 and we don't have any idea what type the the client
575 intended the list to be... :-( )
577 2004-07-10 Seth Nickell <seth@gnome.org>
579 * python/examples/Makefile.am:
581 Fix distcheck breakage caused by new examples.
583 2004-07-10 Seth Nickell <seth@gnome.org>
587 Add "message" argument to service-side dbus.Object
588 methods. This will break existing services written
589 using the python bindings, but will allow extraction
590 of all the message information (e.g. who its from).
592 Add improved "object oriented" signal handling/emission.
594 * python/examples/example-service.py:
598 * python/examples/example-signal-emitter.py:
599 * python/examples/example-signal-recipient.py:
601 Two new examples that show how to emit and receive
602 signals using the new APIs.
604 * python/examples/example-signals.py:
605 * python/examples/gconf-proxy-service.py:
606 * python/examples/gconf-proxy-service2.py:
608 Add "message" argument to service methods.
610 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
612 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
613 * dbus/bus.c (dbus_bus_get_unix_user)
614 * doc/dbus-specification.xml: implement GetConnectionUnixUser
615 method of org.freedesktop.DBus interface.
617 * bus/dispatch.c: test case
619 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
621 * python/Makefile.am: switched include directory from glib/ to dbus/
622 since dbus-glib.h moved
624 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
626 * configure.in: prevent building the gcj stuff and libxml loader
627 since they are broken.
629 2004-06-20 Havoc Pennington <hp@redhat.com>
631 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
632 codes from the dbus error names
634 * glib/dbus-glib.h: move to subdir dbus/ since it's included
635 as dbus/dbus-glib.h and that breakage is now visible due to
636 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
638 * glib/dbus-glib.h: s/gproxy/g_proxy/
640 * dbus/dbus-shared.h: new header to hold stuff shared with
643 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
646 * glib/dbus-glib.h (dbus_set_g_error): move to
649 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
650 of stuff to enable this
652 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
654 * a bunch of other changes with the same basic "separate glib
655 bindings from dbus.h" theme
657 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
659 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
661 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
663 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
665 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
666 the reply value of the ServiceExists message.
668 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
670 * python/dbus_bindings.pyx.in: No longer need to parse path
671 elements and pass them as arrays of strings. The C API now
672 accepts plain path strings.
673 (_build_parsed_path): removed
675 2004-06-07 Havoc Pennington <hp@redhat.com>
677 * doc/TODO: remove auto-activation item since it's done; sort
678 items by importance/milestone
680 2004-06-07 Havoc Pennington <hp@redhat.com>
682 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
683 random signature when using REQUIRED_FIELDS (this hack won't work
686 * dbus/dbus-message.c: change the signature to be a header field,
687 instead of message->signature special-case string. Incremental
688 step forward. Then we can fix up code to send the signature in the
689 message, then fix up code to validate said signature, then fix up
690 code to not put the typecodes inline, etc.
691 (load_one_message): don't make up the signature after the fact
692 (decode_header_data): require signature field for the known
695 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
697 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
699 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
701 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
703 * mono/Handler.cs: Updated to follow new path argument for
704 (un-)registering objects.
706 * mono/example/Makefile.am:
708 * configure.in: Bumped required version for mono and use new -pkg
711 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
713 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
714 registration functions take the path argument as char* instead of
717 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
718 split off the path decompostion part of
719 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
722 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
724 2004-06-02 Kristian Høgsberg <krh@redhat.com>
726 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
727 machine approach. A state is implemented as a function that
728 handles incoming events as specified for that state.
730 * doc/dbus-specification.xml: Update auth protocol state machine
731 specification to match implementation. Remove some leftover
734 2004-06-02 Kristian Høgsberg <krh@redhat.com>
736 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
737 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
740 * Doxyfile.in: remove deprecated options.
742 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
743 glib/test-thread.h, glib/test-thread-client.c,
744 glib/test-thread-server.c, glib/test-profile.c,
745 glib/test-dbus-glib.c: remove these unused files.
747 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
749 * dbus/dbus-object-tree.c
750 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
751 non-fallback handlers (bug #684).
752 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
753 (find_subtree_recurse): report wether the returned subtree is an
754 exact match or a "fallback" match higher up in the tree.
755 (object_tree_test_iteration): update test case.
757 2004-06-01 Seth Nickell <seth@gnome.org>
759 * python/dbus_bindings.pyx.in:
760 * python/tests/test-client.py:
762 Round off basic type support. Add dicts (yay!), and
763 remaining array types.
765 Make MessageIter more general so it works for dicts too.
767 Mark all loop variables as C integers.
769 2004-05-31 Havoc Pennington <hp@redhat.com>
771 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
774 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
776 * glib/dbus-glib-tool.c (main): set up to have a --self-test
777 option that runs the tests, and start filling in some code
778 including for starters just dumping the interfaces to stdout
780 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
782 * test/data/valid-introspection-files/lots-of-types.xml: test of
783 an example introspection file
785 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
788 2004-05-31 Seth Nickell <seth@gnome.org>
790 * python/dbus_bindings.pyx.in:
791 * python/tests/test-client.py:
796 Fix string array memory trashing bug... oops...
798 2004-05-30 Seth Nickell <seth@gnome.org>
802 Add a nicer-but-less-flexible alternate API for handling
803 calls to virtual objects in dbus.ObjectTree.
805 Screw up the argument order to the dbus.Object constructor
806 for consistency with dbus.ObjectTree (and to make dbus_methods
807 optional for future extension)
809 * python/examples/Makefile.am:
810 * python/examples/gconf-proxy-service.py:
811 * python/examples/gconf-proxy-service2.py:
813 Alternate implementation of gconf-proxy-service using the
814 nicer dbus.ObjectTree API.
816 * python/examples/example-service.py:
817 * python/tests/test-server.py
819 Reverse the argument order to deal with dbus.Object constructor
822 2004-05-30 Seth Nickell <seth@gnome.org>
824 * python/examples/example-client.py:
825 * python/examples/example-service.py:
827 Take it back. Lists seem to work but they're broken
828 in the test suite. Make the base examples use
831 2004-05-30 Seth Nickell <seth@gnome.org>
833 * python/dbus_bindings.pyx.in:
834 * python/tests/test-client.py:
836 Add some more tests and fix errors that crop up.
837 Unfortunately, currently it seems like marshalling
838 and unmarshalling of lists is completely broken :-(
840 2004-05-30 Seth Nickell <seth@gnome.org>
842 * python/dbus_bindings.pyx.in:
844 Add support for ObjectPath type.
848 Refactor message handling code to a common function.
850 * python/tests/test-client.py:
851 * python/tests/test-server.py:
853 Add tests that check to make sure values of all types
854 can be echoed from a service w/o mangling.
856 2004-05-29 Seth Nickell <seth@gnome.org>
860 Add ObjectTree class which allows implementation
861 of trees of "virtual" objects. Basically the python
862 wrapper for "register_fallback".
864 * python/examples/Makefile.am
865 * python/examples/gconf-proxy-client.py:
866 * python/examples/gconf-proxy-service.py:
868 Implement a simple GConf proxy service that supports
869 get/set on string and int GConf keys using the ObjectTree.
871 2004-05-29 Seth Nickell <seth@gnome.org>
874 * python/examples/example-client.py:
875 * python/examples/example-service.py:
876 * python/examples/list-system-services.py:
878 Add SessionBus, SystemBus and ActivationBus classes
879 so you don't need to know the special little BUS_TYPE
882 2004-05-29 Havoc Pennington <hp@redhat.com>
884 * bus/config-parser.c (process_test_valid_subdir): temporarily
885 stop testing config parser OOM handling, since expat has issues
886 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
888 * bus/dbus-daemon-1.1.in: change requested_reply to
889 send_requested_reply/receive_requested_reply so we can send the
890 replies, not just receive them.
892 * bus/config-parser.c: parse the new
893 send_requested_reply/receive_requested_reply
895 * bus/policy.c (bus_client_policy_check_can_send): add
896 requested_reply argument and use it
898 * bus/bus.c (bus_context_check_security_policy): pass through
899 requested_reply status to message send check
901 * bus/system.conf.in: adapt to requested_reply change
903 2004-05-28 Havoc Pennington <hp@redhat.com>
905 * test/glib/test-service-glib.c (main): remove unused variable
907 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
909 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
910 from the enum, no longer in use.
912 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
915 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
916 whether error_name passed in is a valid error name.
918 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
920 * dbus/dbus-message.c (dbus_message_get_args): Added support for
921 OBJECT_PATH and OBJECT_PATH_ARRAY
923 2004-05-28 Seth Nickell <seth@gnome.org>
925 * python/examples/Makefile.am:
927 Forget to add Makefile.am. Do not pass go.
929 2004-05-28 Michael Meeks <michael@ximian.com>
931 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
934 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
936 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
937 (_dbus_message_iter_get_basic_type_array): impl.
938 drastically simplify ~all relevant _get methods to use these.
939 (_dbus_message_iter_append_basic_array),
940 (dbus_message_iter_append_basic): impl
941 drastically simplify ~all relevant _append methods to use these.
943 * dbus/dbus-message-builder.c (parse_basic_type)
944 (parse_basic_array, lookup_basic_type): impl.
945 (_dbus_message_data_load): prune scads of duplicate /
948 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
949 (_dbus_demarshal_basic_type): implement,
950 (demarshal_and_validate_len/arg): beef up debug.
951 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
953 2004-05-27 Seth Nickell <seth@gnome.org>
956 * python/Makefile.am:
958 Include the example python apps in the tarball.
960 * python/examples/list-system-services.py
962 Add a python new example that fetches the list of services
965 2004-05-27 Seth Nickell <seth@gnome.org>
968 * python/dbus_bindings.pyx.in:
970 Fix failure to notify that a signal was not handled,
971 resulted in hung functions.
973 2004-05-25 Colin Walters <walters@redhat.com>
975 * tools/dbus-monitor.c (main): Monitor all types of messages.
977 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
979 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
980 which unregisters the object path and disposes the handler.
982 2004-05-23 Kristian Høgsberg <krh@redhat.com>
984 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
986 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
987 operands to && so we call dbus_message_iter_next () for the last
990 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
992 * dbus/dbus-object-tree.c
993 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
994 children even if the requested path isn't registered.
995 (object_tree_test_iteration): test object_tree_list_registered.
997 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1000 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1002 * doc/TODO: Remove resolved items.
1004 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1007 * bus/connection.c (bus_connections_expect_reply): Enforce the
1008 per-connection limit on pending replies.
1010 Patch from Jon Trowbridge <trow@ximian.com>:
1012 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1013 up a watch that triggers a config reload when one end of the pipe
1015 (signal_handler): Instead of doing the config reload in our SIGHUP
1016 handler, just write to the reload pipe and let the associated
1017 watch handle the reload when control returns to the main loop.
1019 * bus/driver.c (bus_driver_handle_reload_config): Added.
1020 Implements a ReloadConfig method for requesting a configuration
1021 file reload via the bus driver.
1023 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1025 * HACKING: Updated release instructions concerning the wiki page.
1027 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1029 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1030 filter against auth->allowed_mechs; we only add allowed mechs in
1031 record_mechanisms().
1033 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1034 ALLOWED_MECHS to auth-script format so we can set the list of
1037 * data/auth/client-out-of-mechanisms.auth-script: New test to
1038 check client disconnects when it is out of mechanisms to try.
1040 * dbus/dbus-auth.c (process_command): Remove check for lines
1041 longer that 1 MB; we only buffer up maximum 16 kB.
1043 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1044 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1045 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1046 assume there might be unused bytes.
1048 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1049 client-out-of-mechs, it is handled in process_reject(). Move check
1050 for max failures to send_rejected(), as it's a server-only thing.
1052 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1053 send_auth(), send_data(), send_rejected(), send_error(),
1054 send_ok(), send_begin() and send_cancel().
1056 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1058 Remove base64 encoding, replace with hex encoding. Original patch
1059 from trow@ximian.com, added error handling.
1061 * dbus/dbus-string.c (_dbus_string_base64_encode)
1062 (_dbus_string_base64_decode): Remove.
1063 (_dbus_string_hex_decode): Add end_return argument so we can
1064 distinguish between OOM and invalid hex encoding.
1065 (_dbus_string_test): Remove base64 tests and add test case for
1068 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1069 Replace base64 with hex.
1071 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1072 for invalid hex encoded data in auth protocol.
1074 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1076 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1079 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1081 * mono/dbus-sharp.dll.config.in: Added for GAC
1082 * mono/dbus-sharp.snk: Added for GAC
1083 * mono/Assembly.cs.in: Added for GAC
1084 * mono/Makefile.am: Changes for GAC installation
1085 * configure.in: Added refs for dbus-sharp.dll.config.in and
1086 Assembly.cs.in. More fixes for mono testing
1087 * mono/example/Makefile.am: Changed var to CSC
1088 * Makefile.am: Changed flag name to DBUS_USE_CSC
1090 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1092 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1093 * mono/doc/*: Added documentation framework
1094 * configure.in: Added monodoc check
1095 * README: Added description of mono configure flags
1097 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1099 * doc/dbus-specification.xml: Added a "Required" column to the
1100 header fields table and changed the "zero or more" verbage in
1101 the above paragraph to read "The header must contain the required
1102 named header fields and zero or more of the optional named header
1104 * test/data/invalid-messages/*.message: Added the required PATH
1105 named header field to the tests so that they don't fail on
1106 'Missing path field'
1108 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1110 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1111 the stack by implicitly defining variable and parameter types and
1112 removing the hack of defining C pointers as python objects and later
1115 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1117 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1119 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1121 * mono/DBusType/Dict.cs: Handle empty dicts
1122 * mono/DBusType/Array.cs: Handle empty arrays
1123 * mono/Arguments.cs: Handle empty arguments
1125 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1127 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1130 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1132 * test/data/valid-messages/standard-*.message: Update message
1133 test scripts to new header field names.
1135 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1137 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1138 overflow to times_we_did_each_thing array which would chop off the
1139 first character of the failure_dir string. Increased the size of
1140 the array to 7 to reflect the number of random mutation functions
1143 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1145 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1146 unix_server->watch here, it is unreffed in disconnect.
1147 (_dbus_server_new_for_tcp_socket): convert NULL host to
1148 "localhost" here so we don't append NULL to address.
1150 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1151 various addresses, including tcp with no explicit host.
1153 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1155 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1156 fix incorrect setting of .name_offset in the HeaderField (it was
1157 off by two bytes, positioned right after the name and typecode)
1159 * bus/bus.c (bus_context_new, bus_context_unref): test before
1160 calling dbus_server_free_data_slot and _dbus_user_database_unref
1161 in case of an error.
1163 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1166 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1168 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1169 _dbus_poll() instead of select().
1171 2004-04-15 Jon Trowbridge <trow@ximian.com>
1173 * bus/main.c (signal_handler): Reload the configuration files
1175 (main): Set up our SIGHUP handler.
1177 * bus/bus.c (struct BusContext): Store the config file, user and
1178 fork flag in the BusContext.
1179 (process_config_first_time_only): Added. Contains the code
1180 (previously in bus_context_new) for setting up the BusContext from
1181 the BusConfigParser that should only be run the first time the
1182 config files are read.
1183 (process_config_every_time): Added. Contains the code (previously
1184 in bus_context_new) for setting up the BusContext from the
1185 BusConfigParser that should be run every time the config files are
1187 (load_config): Added. Builds a BusConfigParser from the config
1188 files and passes the resulting structure off to
1189 process_config_first_time_only (assuming this is the first time)
1190 and process_config_every_time.
1191 (bus_context_new): All of the config-related code has been moved
1192 to process_config_first_time_only and process_config_every_time.
1193 Now this function just does the non-config-related initializations
1194 and calls load_config.
1195 (bus_context_reload_config): Added.
1197 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1199 * bus/driver.c (bus_driver_handle_get_service_owner):
1200 implement a GetServiceOwner method.
1201 * doc/dbus-specification.xml: document it.
1202 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1204 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1205 implement, using the bus GetServiceOwner method.
1207 * test/glib/test-dbus-glib.c:
1208 use dbus_gproxy_new_for_service_owner so that we can receive the
1211 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1213 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1214 dbus/dbus-message.c, dbus/dbus-protocol.h
1215 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1217 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1218 dbus/dbus-message.c, dbus/dbus-protocol.h
1219 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1221 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1222 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1223 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1225 * doc/dbus-specification.xml (Header Fields Table):
1226 s/SERVICE/DESTINATION
1227 s/SENDER_SERVICE/SENDER
1230 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1232 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1235 2004-04-13 Michael Meeks <michael@ximian.com>
1237 * glib/dbus-gobject.c (handle_introspect): split out
1238 (introspect_properties): this.
1239 (handle_introspect): implement this.
1241 * test/glib/Makefile.am: use the absolute path so the bus
1242 daemon's chdir ("/") doesn't kill us dead.
1244 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1246 2004-04-12 Jon Trowbridge <trow@ximian.com>
1248 * bus/config-parser.c (struct BusConfigParser): Added
1249 included_files field.
1250 (seen_include): Added. Checks whether or not a file has already
1251 been included by any parent BusConfigParser.
1252 (bus_config_parser_new): Copy the parent's included_files.
1253 (include_file): Track which files have been included, and fail on
1254 circular inclusions.
1255 (process_test_valid_subdir): Changed printf to report if we are
1256 testing valid or invalid conf files.
1257 (all_are_equiv): Changed printf to be a bit clearer about
1258 what we are actually doing.
1259 (bus_config_parser_test): Test invalid configuration files.
1261 2004-04-09 Jon Trowbridge <trow@ximian.com>
1263 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1264 argument. If non-null, the newly-constructed BusConfigParser will
1265 be initialized with the parent's BusLimits instead of the default
1267 (include_file): When including a config file, pass in
1268 the current parser as the parent and then copy the BusLimits
1269 from the included BusConfigParser pack to the current parser.
1270 (process_test_valid_subdir): Renamed from process_test_subdir.
1271 (process_test_equiv_subdir): Added. Walks through a directory,
1272 descending into each subdirectory and loading the config files
1273 it finds there. If any subdirectory contains two config files
1274 that don't produce identical BusConfigParser structs, fail.
1275 For now, the BusConfigParser's BusPolicies are not compared.
1276 (bus_config_parser_test): Call both process_test_valid_subdir and
1277 process_test_equiv_subdir.
1279 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1280 argument and pass it along to the call to bus_config_parser_new.
1281 Also made a few small changes to allow this code to compile.
1283 * bus/config-loader-expat.c (bus_config_load): Take a parent
1284 argument and pass it along to the call to bus_config_parser_new.
1286 * bus/bus.c (bus_context_new): Load the config file
1287 with a NULL parent argument.
1289 2004-03-29 Michael Meeks <michael@ximian.com>
1291 * glib/dbus-gobject.c (introspect_properties): split
1292 out, fix mangled 'while' flow control.
1293 (introspect_signals): implement.
1294 (handle_introspect): update.
1296 2004-03-29 Michael Meeks <michael@ximian.com>
1298 * glib/dbus-gobject.c (set_object_property): split out /
1299 re-work, use the property type, and not the message type(!)
1300 (get_object_property): ditto.
1302 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1303 (dbus_gvalue_marshal): make this code re-usable, needed
1304 for signals too, also on both proxy and server side.
1305 Re-write for more efficiency / readability.
1307 2004-03-29 Michael Meeks <michael@ximian.com>
1309 * dbus/dbus-message.c
1310 (dbus_message_new_error_printf): impl.
1312 * dbus/dbus-connection.c
1313 (dbus_connection_unregister_object_path): fix warning.
1315 * configure.in: fix no-mono-installed situation.
1317 2004-03-27 Havoc Pennington <hp@redhat.com>
1319 Patch from Timo Teräs:
1321 * tools/dbus-send.c (main): if --print-reply, assume type is
1322 method call; support boolean type args
1324 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1325 bunch of memleak and logic bugs
1327 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1329 * mono/Arguments.cs:
1330 * mono/Introspector.cs:
1332 * mono/InterfaceProxy.cs:
1334 * mono/ProxyBuilder.cs:
1336 Added InterfaceProxy class to avoid building proxies for every
1340 * dbus-message.c (dbus_message_append_args_valist)
1341 (dbus_message_iter_get_object_path)
1342 (dbus_message_iter_get_object_path_array)
1343 (dbus_message_iter_append_object_path)
1344 (dbus_message_iter_append_object_path_array):
1345 Added object_path iter functions to handle OBJECT_PATH arguments
1347 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1349 First checkin of mono bindings.
1352 Build stuff for the bindings
1353 * dbus-sharp.pc.in: Added for pkgconfig
1355 2004-03-21 Havoc Pennington <hp@redhat.com>
1357 * test/test-service.c (main): remove debug spew
1359 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1361 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1364 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1365 (dbus_message_iter_init_array_iterator)
1366 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1367 indicate whether the iterator is empty
1369 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1372 2004-03-19 Havoc Pennington <hp@redhat.com>
1374 * NEWS: 0.21 updates
1376 * configure.in: 0.21
1378 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1380 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1381 you don't need pyrex to make dist
1383 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1386 2004-03-18 Richard Hult <richard@imendio.com>
1388 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1389 (dbus_message_set_auto_activation): Add doxygen docs.
1391 2004-03-16 Richard Hult <richard@imendio.com>
1393 * bus/activation.c: (bus_activation_service_created),
1394 (bus_activation_send_pending_auto_activation_messages),
1395 (bus_activation_activate_service):
1397 * bus/dispatch.c: (bus_dispatch),
1398 (check_nonexistent_service_auto_activation),
1399 (check_service_auto_activated),
1400 (check_segfault_service_auto_activation),
1401 (check_existent_service_auto_activation), (bus_dispatch_test):
1402 * bus/driver.c: (bus_driver_handle_activate_service):
1403 * bus/services.c: (bus_registry_acquire_service):
1404 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1405 (dbus_message_get_auto_activation):
1406 * dbus/dbus-message.h:
1407 * dbus/dbus-protocol.h: Implement auto-activation.
1409 * doc/dbus-specification.xml: Add auto-activation to the spec.
1411 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1413 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1414 fix a bug with CUSTOM types.
1416 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1417 a unit test for this bug (used to fail).
1419 2004-03-12 Mikael Hallendal <micke@imendio.com>
1422 (babysitter_watch_callback): notify all pending activations waiting for
1423 the same exec that the activation failed.
1424 (bus_activation_activate_service): shortcut the activation if we
1425 already waiting for the same executable to start up.
1427 2004-03-12 Mikael Hallendal <micke@imendio.com>
1430 - Added service file reloading.
1431 Each service files directory is kept in an hash table in
1432 BusActivation and each BusActivationEntry knows what .service-file it
1433 was read from. So when you try to activate a service the bus will
1434 check if it's been updated, removed or if new .service-files has
1436 - Test code at the bottom for the service file reloading.
1437 * bus/test-main.c: (main):
1439 - added service reloading test.
1440 * dbus/dbus-sysdeps.c:
1441 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1443 2004-03-08 Michael Meeks <michael@ximian.com>
1445 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1446 bail immediately if disconnected, to avoid busy loop.
1448 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1449 cleanup cut/paste/inefficiency.
1451 2004-03-01 David Zeuthen <david@fubar.dk>
1453 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1454 bug where args were used twice. This bug resulted in a segfault
1455 on a Debian/PPC system when starting the messagebus daemon. Include
1456 dbus-sysdeps.h for DBUS_VA_COPY
1458 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1460 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1461 appropriate va_copy implementation. From GLib
1463 2004-02-24 Joe Shaw <joe@ximian.com>
1465 * bus/services.c (bus_registry_acquire_service): We need to pass
1466 in the service name to dbus_set_error() to prevent a crash.
1468 2003-12-26 Anders Carlsson <andersca@gnome.org>
1470 * AUTHORS: Reveal my True identity.
1472 2003-12-17 Mikael Hallendal <micke@imendio.com>
1474 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1475 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1477 2003-12-13 Mikael Hallendal <micke@imendio.com>
1479 * doc/TODO: Added not about better error check of configuration files.
1481 2003-12-02 Richard Hult <richard@imendio.com>
1483 * Update AFL version to 2.0 throughout the source files to reflect
1484 the update that was done a while ago.
1486 2003-12-02 Richard Hult <richard@imendio.com>
1488 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1489 wrote_dict_key to FALSE on the iter that the dict is appended to,
1490 just like when appending other types. Fixes a bug where a dict
1491 couldn't be put inside a dict.
1492 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1493 (message_iter_test, _dbus_message_test): Add test case for dict
1496 2003-12-01 David Zeuthen <david@fubar.dk>
1498 * python/dbus.py: Add the actual message when calling the reciever
1499 of a signal such that parameters can be inspected. Add the method
1500 remove_signal_receiver
1502 2003-11-26 Mikael Hallendal <micke@imendio.com>
1506 * glib/*.[ch]: Made ref functions return the pointer
1508 2003-11-25 Zack Rusin <zack@kde.org>
1510 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1512 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1515 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1516 the Integrator and to better fit with the server,
1518 2003-11-24 Zack Rusin <zack@kde.org>
1520 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1521 the integrator handles it now
1523 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1524 since QTimer wasn't really meant to be used the way DBusTimeout is
1526 2003-11-24 Zack Rusin <zack@kde.org>
1528 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1529 Integrator class which integrates D-BUS with the Qt event loop,
1531 * qt/connection.h, qt/connection.cpp: Move all the code which
1532 was dealing with D-BUS integration to the Integrator class,
1533 and start using Integrator,
1535 2003-11-23 Zack Rusin <zack@kde.org>
1537 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1540 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1541 switching namespaces to DBusQt, reworking the class,
1543 * Makefile.cvs: switching dependencies so that it matches KDE
1546 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1549 2003-11-19 Havoc Pennington <hp@redhat.com>
1553 * configure.in: bump version to 0.20
1555 * configure.in (have_qt): add yet another place to look for qt
1556 (someone hand trolltech a .pc file...)
1558 2003-11-01 Havoc Pennington <hp@redhat.com>
1560 * doc/dbus-specification.xml: add state machine docs on the auth
1561 protocol; just a first draft, I'm sure it's wrong.
1563 2003-10-28 David Zeuthen <david@fubar.dk>
1565 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1566 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1568 2003-10-28 Havoc Pennington <hp@redhat.com>
1570 * dbus/dbus-message.c (get_next_field): delete unused function
1572 2003-10-28 Havoc Pennington <hp@redhat.com>
1574 * bus/expirelist.c (do_expiration_with_current_time): detect
1575 failure of the expire_func due to OOM
1577 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1579 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1580 NoReply error that's now created by the bus when the service exits
1582 2003-10-28 Havoc Pennington <hp@redhat.com>
1584 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1585 tests for set_path, set_interface, set_member, etc.
1587 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1589 * dbus/dbus-message.c (set_string_field): always just delete and
1590 re-append the field; accept NULL for deletion
1591 (re_align_fields_recurse): reimplement
1593 2003-10-26 Havoc Pennington <hp@redhat.com>
1595 * dbus/dbus-connection.c: fix docs to properly describe the
1596 disconnected message
1597 (_dbus_connection_notify_disconnected): remove this function;
1598 we can't synchronously add the disconnected message, we have to
1599 do it after we've queued any remaining real messages
1600 (_dbus_connection_get_dispatch_status_unlocked): queue the
1601 disconnect message only if the transport has finished queueing all
1602 its real messages and is disconnected.
1603 (dbus_connection_disconnect): update the dispatch status here
1605 2003-10-22 Havoc Pennington <hp@redhat.com>
1607 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1609 * bus/connection.c (bus_transaction_send_from_driver): set the
1610 destination to the connection's base service
1612 2003-10-20 Havoc Pennington <hp@redhat.com>
1614 hmm, make check is currently not passing.
1616 * doc/dbus-specification.xml: add requirement that custom type
1617 names follow the same rules as interface names.
1619 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1620 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1623 * doc/dbus-specification.xml: update type codes to match
1624 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1625 CUSTOM. Add type OBJECT_PATH to the spec.
1627 2003-10-17 Havoc Pennington <hp@redhat.com>
1629 * bus/driver.c (create_unique_client_name): use "." as separator
1630 in base service names instead of '-'
1632 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1633 byte at the end of the string
1635 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1636 optimization macros since string validation seems to be a slow
1639 * doc/dbus-specification.xml: restrict valid
1640 service/interface/member/error names. Add test suite code for the
1643 * dbus/dbus-string.c: limit service/interface/member/error names
1646 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1647 format arg to verbose spew
1649 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1650 memory, return instead of g_error
1652 * test/test-service.c (path_message_func): support emitting a
1655 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1656 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1657 assuming the activation bus was the session bus so that services
1658 started manually will still register.
1659 (init_connections_unlocked): fix so that in OOM situation we get
1660 the same semantics when retrying the function
1662 * test/test-service.c (main): change to use path registration, to
1663 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1664 than DBUS_BUS_SESSION
1666 2003-10-16 Havoc Pennington <hp@redhat.com>
1668 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1670 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1671 coverage of the tests
1672 (coverage-report.txt): don't move the .da and .bbg files around
1674 2003-10-16 Havoc Pennington <hp@redhat.com>
1676 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1679 2003-10-16 Havoc Pennington <hp@redhat.com>
1681 * bus/connection.c (bus_pending_reply_expired): either cancel or
1683 (bus_connections_check_reply): use unlink, not remove_link, as we
1684 don't want to free the link; fixes double free mess
1686 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1687 where no reply was received
1689 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1692 * bus/signals.c (match_rule_matches): add special cases for the
1693 bus driver, so you can match on sender/destination for it.
1695 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1696 DBUS_PRINT_BACKTRACE is set
1698 * dbus/dbus-internals.c: add pid to assertion failure messages
1700 * dbus/dbus-connection.c: add message type code to the debug spew
1702 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1703 sender=foo not service=foo
1705 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1706 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1707 DBUS_ACTIVATION_ADDRESS instead
1709 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1710 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1712 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1715 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1716 (dbus_message_iter_get_object_path_array): new function (half
1717 finished, disabled for the moment)
1719 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1720 DBUS_MESSAGE_TYPE_ERROR
1722 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1723 avoid redirecting stderr to /dev/null
1724 (babysit): close stdin if not doing the "exit_with_session" thing
1726 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1727 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1728 stdout/stdin, so things don't get confused
1730 * bus/system.conf.in: fix to allow replies, I modified .conf
1731 instead of .conf.in again.
1733 2003-10-14 David Zeuthen <david@fubar.dk>
1735 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1736 argtype to arg_type when raising unknown arg type exception.
1737 Changed type list to reflect the changes in dbus-protocol.h so
1738 the bindings actually work.
1740 2003-10-14 Havoc Pennington <hp@redhat.com>
1742 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1743 to have a bug keeping it from outputting the .da files sometimes
1744 (string_get_string): don't append garbage nul bytes to the string.
1746 2003-10-15 Seth Nickell <seth@gnome.org>
1748 * python/Makefile.am:
1750 Include dbus_h_wrapper.h in the dist tarball.
1752 2003-10-14 Havoc Pennington <hp@redhat.com>
1754 * bus/bus.c (bus_context_check_security_policy): revamp this to
1755 work more sanely with new policy-based requested reply setup
1757 * bus/connection.c (bus_transaction_send_from_driver): set bus
1758 driver messages as no reply
1760 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1761 requested_reply attribute on allow/deny rules
1763 * bus/system.conf: add <allow requested_reply="true"/>
1765 * bus/driver.c (bus_driver_handle_message): fix check for replies
1766 sent to the bus driver, which was backward. How did this ever work
1767 at all though? I think I'm missing something.
1769 * dbus/dbus-message.c (decode_header_data): require error and
1770 method return messages to have a reply serial field to be valid
1771 (_dbus_message_loader_queue_messages): break up this function;
1772 validate that reply serial and plain serial are nonzero;
1773 clean up the OOM/error handling.
1774 (get_uint_field): don't return -1 from this
1775 (dbus_message_create_header): fix signed/unsigned bug
1777 * bus/connection.c (bus_connections_expect_reply): save serial of
1778 the incoming message, not reply serial
1780 2003-10-14 Havoc Pennington <hp@redhat.com>
1782 * bus/connection.c: implement pending reply tracking using
1785 * bus/bus.c (bus_context_check_security_policy): verify that a
1786 reply is pending in order to allow a reply to be sent. Deny
1787 messages of unknown type.
1789 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1791 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1792 (bus_context_get_reply_timeout): new
1794 2003-10-13 Seth Nickell <seth@gnome.org>
1796 * python/Makefile.am:
1798 Pass "make distcheck": remove a couple files from DIST_FILES
1799 that weren't included in the final version.
1801 2003-10-12 Havoc Pennington <hp@pobox.com>
1803 Added test code that 1) starts an actual bus daemon and 2) uses
1804 DBusGProxy; fixed bugs that were revealed by the test. Lots
1805 more testing possible, but this is the basic framework.
1807 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1808 empty proxy lists from the proxy list hash
1810 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1811 couple of return_if_fail checks
1813 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1814 to allocate, so everything is cleared to NULL as it should be.
1816 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1817 source as data to dbus_connection_set_timeout_functions() as the
1818 timeout functions expected
1820 * test/glib/run-test.sh: add a little script to start up a message
1821 bus and run tests using it
1823 * tools/dbus-launch.1: updates
1825 * tools/dbus-launch.c (main): add --config-file option
1827 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1828 that could never be reached.
1830 * dbus/dbus-message.c (dbus_message_new_method_return)
1831 (dbus_message_new_error, dbus_message_new_signal): set the
1832 no-reply-expected flag on all these. Redundant, but may
1833 as well be consistent.
1835 2003-10-11 Havoc Pennington <hp@pobox.com>
1837 * test/decode-gcov.c (function_solve_graph): make broken block
1838 graph a nonfatal error since it seems to be broken. Need to debug
1841 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1842 can't just check type > INVALID < LAST anymore
1844 * dbus/dbus-message.c (dbus_message_get_signature): new function
1845 (dbus_message_has_signature): new function
1846 (struct DBusMessage): add signature field (right now it isn't sent
1847 over the wire, just generated on the fly)
1848 (dbus_message_copy): copy the signature, and init strings to
1849 proper length to avoid some reallocs
1850 (dbus_message_iter_init_array_iterator): return void, since it
1852 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1853 (_dbus_message_loader_queue_messages): add silly temporary hack to
1854 fill in message->signature on load
1856 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1857 characters, so they are relatively human-readable.
1859 2003-10-11 Havoc Pennington <hp@pobox.com>
1861 * dbus/dbus-message.c (_dbus_message_test): add more test
1862 coverage, but #if 0 for now since they uncover a bug
1863 not fixed yet; I think in re_align_field_recurse()
1864 (re_align_field_recurse): add FIXME about broken assertion
1866 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1868 * bus/connection.c: share a couple code bits with expirelist.c
1870 * bus/expirelist.h, bus/expirelist.c: implement a generic
1871 expire-items-after-N-seconds facility, was going to share between
1872 expiring connections and replies, decided not to use for expiring
1873 connections for now.
1875 * COPYING: include AFL 2.0 (still need to change all the file headers)
1877 2003-10-09 Havoc Pennington <hp@redhat.com>
1879 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1880 gcc 3.3. Not that we do anything about it yet.
1882 * bus/signals.c (bus_match_rule_parse): impose max length on the
1885 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1887 2003-10-09 Havoc Pennington <hp@redhat.com>
1889 Make matching rules theoretically work (add parser).
1891 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1892 the case where destination is explicitly specified as bus driver
1893 and someone else is eavesdropping.
1895 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1896 definition of eavesdropping and assertion
1898 * tools/dbus-send.c (main): use dbus_message_type_from_string
1900 * bus/signals.c (bus_match_rule_parse): implement
1902 * dbus/dbus-message.c (dbus_message_type_from_string): new
1904 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1906 2003-10-02 Havoc Pennington <hp@pobox.com>
1908 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1909 dbus_gproxy_oneway_call
1911 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1912 (dbus_server_setup_with_g_main): fix to allow calling them more
1913 than once on the same args
1914 (dbus_bus_get_with_g_main): new function
1916 2003-10-02 Havoc Pennington <hp@redhat.com>
1918 * doc/dbus-tutorial.xml: write some stuff
1920 2003-09-29 Havoc Pennington <hp@pobox.com>
1922 * configure.in: split checks for Doxygen from XML docs, check for
1925 * doc/Makefile.am: XML-ify all the docs, and add a blank
1928 2003-09-29 Havoc Pennington <hp@pobox.com>
1930 * Merge dbus-object-names branch. To see the entire patch
1931 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1932 it's huuuuge though.
1933 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1935 2003-09-28 Havoc Pennington <hp@pobox.com>
1937 * HACKING: update to reflect new server
1939 2003-09-26 Seth Nickell <seth@gnome.org>
1942 * python/examples/example-signals.py:
1944 Start implementing some notions of signals. The API
1945 is really terrible, but they sort of work (with the
1946 exception of being able to filter by service, and to
1947 transmit signals *as* a particular service). Need to
1948 figure out how to make messages come from the service
1951 * python/dbus_bindings.pyx.in:
1953 Removed duplicate message_handler callbacks.
1955 2003-09-25 Havoc Pennington <hp@redhat.com>
1957 * bus/session.conf.in: fix my mess
1959 2003-09-25 Havoc Pennington <hp@pobox.com>
1961 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1963 2003-09-25 Seth Nickell <seth@gnome.org>
1965 * python/examples/example-service.py:
1967 Johan notices complete wrong code in example-service, but
1968 completely wrong in a way that works exactly the same (!).
1969 Johan is confused, how could this possibly work? Example
1970 code fails to serve purpose of making things clear.
1973 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1975 * doc/dbus-specification.sgml: don't require header fields
1976 to be 4-byte aligned and specify that fields should be
1977 distinguished from padding by the fact that zero is not
1980 * doc/TODO: remove re-alignment item and add item to doc
1981 the OBJECT_PATH type.
1983 * dbus/dbus-message.c:
1984 (HeaderField): rename the original member to value_offset
1985 and introduce a name_offset member to keep track of where
1986 the field actually begins.
1987 (adjust_field_offsets): remove.
1988 (append_int_field), (append_uint_field),
1989 (append_string_field): don't align the start of the header
1990 field to a 4-byte boundary.
1991 (get_next_field): impl finding the next marhsalled field
1992 after a given field.
1993 (re_align_field_recurse): impl re-aligning a number of
1994 already marshalled fields.
1995 (delete_field): impl deleting a field of any type and
1996 re-aligning any following fields.
1997 (delete_int_or_uint_field), (delete_string_field): remove.
1998 (set_int_field), (set_uint_field): no need to re-check
1999 that we have the correct type for the field.
2000 (set_string_field): ditto and impl re-aligning any
2002 (decode_header_data): update to take into account that
2003 the fields aren't 4-byte aligned any more and the new
2004 way to distinguish padding from header fields. Also,
2005 don't exit when there is too much header padding.
2006 (process_test_subdir): print the directory.
2007 (_dbus_message_test): add test to make sure a following
2008 field is re-aligned correctly after field deletion.
2010 * dbus/dbus-string.[ch]:
2011 (_dbus_string_insert_bytes): rename from insert_byte and
2012 allow the insert of multiple bytes.
2013 (_dbus_string_test): test inserting multiple bytes.
2015 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2016 warning note to docs about having to re-align any
2017 marshalled values following the string.
2019 * dbus/dbus-message-builder.c:
2020 (append_string_field), (_dbus_message_data_load):
2021 don't align the header field.
2023 * dbus/dbus-auth.c: (process_test_subdir): print the
2026 * test/break-loader.c: (randomly_add_one_byte): upd. for
2029 * test/data/invalid-messages/bad-header-field-alignment.message:
2032 * test/data/valid-messages/unknown-header-field.message: shove
2033 a dict in the unknown field.
2035 2003-09-25 Seth Nickell <seth@gnome.org>
2038 * python/dbus_bindings.pyx.in:
2040 Handle return values.
2042 * python/examples/example-client.py:
2043 * python/examples/example-service.py:
2045 Pass back return values from the service to the client.
2047 2003-09-24 Seth Nickell <seth@gnome.org>
2051 Connect Object methods (when you are sharing an object) up... pass
2052 in a list of methods to be shared. Sharing all the methods just
2053 worked out too weird. You can now create nice Services over the
2056 * python/dbus_bindings.pyx.in:
2058 Keep references to user_data tuples passed into C functions so
2059 Python doesn't garbage collect on us.
2061 Implement MethodReturn and Error subclasses of Message for creating
2062 DBusMessage's of those types.
2064 * python/examples/example-client.py:
2065 * python/examples/example-service.py:
2067 Simple example code showing both how create DBus services and objects,
2068 and how to use them.
2070 2003-09-23 Havoc Pennington <hp@pobox.com>
2072 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2074 2003-09-23 Havoc Pennington <hp@redhat.com>
2076 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2077 (dbus_gproxy_disconnect_signal): implement
2078 (dbus_gproxy_manager_remove_signal_match): implement
2079 (dbus_gproxy_manager_add_signal_match): implement
2080 (dbus_gproxy_oneway_call): implement
2082 2003-09-23 Havoc Pennington <hp@pobox.com>
2084 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2085 subclass. This means dropping the transparent thread safety of the
2086 proxy; you now need a separate proxy per-thread, or your own
2087 locking on the proxy. Probably right anyway.
2088 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2090 2003-09-22 Havoc Pennington <hp@redhat.com>
2092 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2094 2003-09-21 Seth Nickell <seth@gnome.org>
2096 First checkin of the Python bindings.
2098 * python/.cvsignore:
2099 * python/Makefile.am:
2100 * python/dbus_bindings.pyx.in:
2101 * python/dbus_h_wrapper.h:
2103 Pieces for Pyrex to operate on, building a dbus_bindings.so
2104 python module for low-level access to the DBus APIs.
2108 High-level Python module for accessing DBus objects.
2113 Build stuff for the python bindings.
2117 Extra macro needed for finding the Python C header files.
2119 2003-09-21 Havoc Pennington <hp@pobox.com>
2121 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2122 implementing the proxy manager, didn't get very far.
2124 * dbus/dbus-bus.c (dbus_bus_add_match): new
2125 (dbus_bus_remove_match): new
2127 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2128 path_name argument; adjust the other not-yet-implemented
2129 gproxy constructors to be what I think they should be.
2131 2003-09-21 Havoc Pennington <hp@pobox.com>
2133 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2134 by default for message bus connections.
2136 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2137 exit_on_disconnect flag is set and we process the disconnected
2139 (dbus_connection_set_exit_on_disconnect): new function
2141 2003-09-21 Havoc Pennington <hp@pobox.com>
2143 Get matching rules mostly working in the bus; only actually
2144 parsing the rule text remains. However, the client side of
2145 "signal connections" hasn't been started, this patch is only the
2148 * dbus/dispatch.c: fix for the matching rules changes
2150 * bus/driver.c (bus_driver_handle_remove_match)
2151 (bus_driver_handle_add_match): send an ack reply from these
2154 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2155 arguments, reported by Seth Nickell
2157 * bus/config-parser.c (append_rule_from_element): support
2158 eavesdrop=true|false attribute on policies so match rules
2159 can be prevented from snooping on the system bus.
2161 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2162 and "destination" in attribute names; fix some docs bugs;
2163 add eavesdrop=true|false attribute
2165 * bus/driver.c (bus_driver_handle_add_match)
2166 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2169 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2170 rid of broadcast service concept, signals are just always broadcast
2172 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2173 mostly implement matching rules stuff (currently only exposed as signal
2176 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2178 * doc/dbus-specification.sgml: Change the header field name
2179 to be an enum and update the rest of the spec to reference
2180 the fields using the conventinal name.
2182 * dbus/dbus-protocol.h: update to reflect the spec.
2184 * doc/TODO: add item to remove the 4 byte alignment requirement.
2186 * dbus/dbus-message.c: Remove the code to generalise the
2187 header/body length and serial number header fields as named
2188 header fields so we can reference field names using the
2190 (append_int_field), (append_uint_field), (append_string_field):
2191 Append the field name as a byte rather than four chars.
2192 (delete_int_or_uint_field), (delete_string_field): reflect the
2193 fact that the field name and typecode now occupy 4 bytes instead
2195 (decode_string_field), (decode_header_data): update to reflect
2196 protocol changes and move the field specific encoding from
2197 decode_string_field() back into decode_header_data().
2199 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2200 Add utility to aid debugging.
2202 * dbus/dbus-message-builder.c:
2203 (append_string_field), (_dbus_message_data_load): Update to
2204 reflect protocol changes; Change the FIELD_NAME directive
2205 to HEADER_FIELD and allow it to take the field's conventional
2206 name rather than the actual value.
2208 * test/data/*/*.message: Update to use HEADER_FIELD instead
2209 of FIELD_NAME; Always align the header on an 8 byte boundary
2210 *before* updating the header length.
2212 2003-09-15 Havoc Pennington <hp@pobox.com>
2214 * dbus/dbus-pending-call.c: add the get/set object data
2215 boilerplate as for DBusConnection, etc. Use generic object data
2216 for the notify callback.
2218 * glib/dbus-gparser.c (parse_node): parse child nodes
2220 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2222 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2223 contain functions shared between the convenience lib and the
2226 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2227 -export-symbols-regex to the GLib library
2229 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2230 fix the locking in here, and add a default handler for
2231 Introspect() that just returns sub-nodes.
2233 2003-09-14 Havoc Pennington <hp@pobox.com>
2235 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2236 rather than gfoo consistent
2238 * glib/dbus-gproxy.h: delete for now, move contents to
2239 dbus-glib.h, because the include files don't work right since we
2240 aren't in the dbus/ subdir.
2242 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2243 (dbus_gproxy_end_call): finish
2244 (dbus_gproxy_begin_call): finish
2246 * glib/dbus-gmain.c (dbus_set_g_error): new
2248 * glib/dbus-gobject.c (handle_introspect): include information
2249 about child nodes in the introspection
2251 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2252 function to help in implementation of introspection
2254 * dbus/dbus-object-tree.c
2255 (_dbus_object_tree_list_registered_and_unlock): new function
2257 2003-09-12 Havoc Pennington <hp@pobox.com>
2259 * glib/dbus-gidl.h: add common base class for all the foo_info
2262 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2265 * test/Makefile.am: try test srcdir -ef . in addition to test
2266 srcdir = ., one of them should work (yeah lame)
2268 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2271 * glib/dbus-gparser.h: make description_load routines return
2272 NodeInfo* not Parser*
2274 * Makefile.am (SUBDIRS): build test dir after all library dirs
2276 * configure.in: add GTK+ detection
2278 2003-09-07 Havoc Pennington <hp@pobox.com>
2280 * Make Doxygen contented.
2282 2003-09-07 Havoc Pennington <hp@pobox.com>
2284 * doc/dbus-specification.sgml: more updates
2286 2003-09-06 Havoc Pennington <hp@pobox.com>
2288 * doc/dbus-specification.sgml: partial updates
2290 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2291 zillionth time; hopefully I edited the right file this time.
2293 * bus/config-parser.c (append_rule_from_element): support
2294 send_type, send_path, receive_type, receive_path
2296 * bus/policy.c: add message type and path to the list of things
2297 that can be "firewalled"
2299 2003-09-06 Havoc Pennington <hp@pobox.com>
2301 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2302 (dbus_connection_register_object_path): make this not handle
2303 messages to paths below the given path
2305 2003-09-03 Havoc Pennington <hp@pobox.com>
2307 * test/glib/Makefile.am: add this with random glib-linked test
2310 * glib/Makefile.am: remove the random test programs from here,
2311 leave only the unit tests
2313 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2314 uscore/javacaps conversion, and fix
2315 (get_object_property, set_object_property): change to .NET
2316 convention for mapping props to methods, set_FooBar/get_FooBar,
2317 since one language has such a convention we may as well copy it.
2318 Plus real methods in either getFooBar or get_foo_bar style won't
2319 collide with this convention.
2321 2003-09-01 Havoc Pennington <hp@pobox.com>
2323 * glib/dbus-gparser.c: implement
2325 * glib/dbus-gobject.c: start implementing skeletons support
2327 * configure.in: when disabling checks/assert, also define
2328 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2330 2003-09-01 Havoc Pennington <hp@pobox.com>
2332 * glib/Makefile.am: rearrange a bunch of files and get "make
2333 check" framework set up
2335 2003-08-31 Havoc Pennington <hp@pobox.com>
2337 * fix build with --disable-tests
2339 2003-08-30 Havoc Pennington <hp@pobox.com>
2341 * dbus/dbus-connection.c: purge DBusMessageHandler
2343 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2344 use callbacks everywhere
2346 2003-08-30 Havoc Pennington <hp@pobox.com>
2348 * test/data/valid-config-files/system.d/test.conf: change to
2349 root for the user so warnings don't get printed
2351 * dbus/dbus-message.c: add dbus_message_get_path,
2352 dbus_message_set_path
2354 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2355 dispatching to a path
2357 * dbus/dbus-string.c (_dbus_string_validate_path): add
2359 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2360 (_dbus_marshal_object_path): implement
2362 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2363 to contain the path to the target object
2364 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2365 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2367 2003-08-30 Havoc Pennington <hp@pobox.com>
2369 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2371 2003-08-29 Havoc Pennington <hp@pobox.com>
2373 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2375 (struct DBusObjectSubtree): shrink this
2376 a lot, since we may have a lot of them
2377 (_dbus_object_tree_free_all_unlocked): implement
2378 (_dbus_object_tree_dispatch_and_unlock): implement
2380 2003-08-29 Havoc Pennington <hp@pobox.com>
2382 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2384 2003-08-28 Havoc Pennington <hp@pobox.com>
2388 * dbus/dbus-connection.c: port to no ObjectID, create a
2389 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2391 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2392 everything except UnregisterFunction and MessageFunction
2394 * dbus/dbus-marshal.c: port away from DBusObjectID,
2395 add DBUS_TYPE_OBJECT_PATH
2397 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2398 dbus/dbus-objectid.[hc]: remove these, we are moving to
2399 path-based object IDs
2401 2003-08-25 Havoc Pennington <hp@pobox.com>
2403 Just noticed that dbus_message_test is hosed, I wonder when I
2404 broke that. I thought make check was passing earlier...
2406 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2407 container tree, will replace most of dbus-object-registry
2409 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2412 2003-08-19 Havoc Pennington <hp@pobox.com>
2414 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2415 (dbus_message_is_error): fix this function
2417 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2420 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2421 reflect clarified man page
2422 (bus_client_policy_check_can_send): ditto
2424 * bus/session.conf.in: fixup
2426 * bus/system.conf.in: fixup
2428 2003-08-18 Havoc Pennington <hp@redhat.com>
2430 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2432 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2433 dumb bug created earlier (wrong order of args to
2434 decode_header_data())
2436 * tools/dbus-send.c: port
2438 * tools/dbus-print-message.c (print_message): port
2440 * test/data/*messages: port all messages over
2442 * dbus/dbus-message-builder.c: support including
2445 * bus/driver.c: port over
2447 * bus/dispatch.c: port over to new stuff
2449 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2450 rename disconnect signal to "Disconnected"
2452 2003-08-17 Havoc Pennington <hp@pobox.com>
2454 This doesn't compile yet, but syncing up so I can hack on it from
2455 work. What are branches for if not broken code? ;-)
2457 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2458 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2459 DBUS_HEADER_FIELD_ERROR_NAME
2461 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2462 for the interface+member pairs
2463 (string_hash): change to use g_str_hash algorithm
2464 (find_direct_function, find_string_function): refactor these to
2467 * dbus/dbus-message.c: port all of this over to support
2468 interface/member fields instead of name field
2470 * dbus/dbus-object-registry.c: port over
2472 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2473 from _dbus_string_validate_name
2475 * bus/dbus-daemon-1.1: change file format for the
2476 <deny>/<allow> stuff to match new message naming scheme
2478 * bus/policy.c: port over
2480 * bus/config-parser.c: parse new format
2482 2003-08-16 Havoc Pennington <hp@pobox.com>
2484 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2487 * glib/dbus-gproxy.c: some hacking
2489 2003-08-15 Havoc Pennington <hp@redhat.com>
2491 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2493 * dbus/dbus-connection.c
2494 (dbus_connection_send_with_reply_and_block): factor out internals;
2495 change to convert any error replies to DBusError instead of
2496 returning them as a message
2498 2003-08-15 Havoc Pennington <hp@pobox.com>
2500 * dbus/dbus-connection.c,
2501 dbus/dbus-pending-call.c: Finish the pending call stuff
2503 2003-08-14 Havoc Pennington <hp@redhat.com>
2505 * dbus/dbus-pending-call.c: start on new object that will replace
2506 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2509 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2510 with remote interfaces
2512 * dbus/dbus-gidl.c: do the boring boilerplate in here
2514 2003-08-12 Havoc Pennington <hp@pobox.com>
2516 * bus/dispatch.c (bus_dispatch): make this return proper
2517 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2519 * dbus/dbus-errors.c (dbus_set_error): use
2520 _dbus_string_append_printf_valist
2522 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2523 (_dbus_string_append_printf): new
2525 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2528 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2529 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2530 message is unhandled.
2532 2003-08-11 Havoc Pennington <hp@pobox.com>
2534 * bus/test.c (client_disconnect_handler): change to return
2535 HANDLED (would have been REMOVE_MESSAGE)
2537 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2538 HANDLED/NOT_YET_HANDLED instead of
2539 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2542 2003-08-10 Havoc Pennington <hp@pobox.com>
2544 * tools/dbus-send.c (main): add --type argument, for now
2545 supporting only method_call and signal types.
2547 * tools/dbus-print-message.c: print message type
2549 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2550 init connection->objects
2552 * doc/dbus-specification.sgml: fix sgml
2554 * bus/*.c: port over to object-instance API changes
2556 * test/test-service.c: ditto
2558 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2559 name, we will have to fix up the rest of the code to also handle
2561 (dbus_message_new): generic message-creation call
2562 (set_string_field): allow appending name field
2564 2003-08-06 Havoc Pennington <hp@pobox.com>
2566 * dbus/dbus-object-registry.c: implement signal connection
2569 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2571 * dbus/dbus-internals.c (_dbus_memdup): new function
2573 2003-08-02 Havoc Pennington <hp@pobox.com>
2575 * dbus/dbus-message.c (dbus_message_get_no_reply)
2576 (dbus_message_set_no_reply): add these and remove
2577 set_is_error/get_is_error
2579 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2580 remove the ERROR flag, since there's now an ERROR type
2582 2003-08-01 Havoc Pennington <hp@pobox.com>
2584 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2587 * dbus/dbus-message.c (dbus_message_get_type): new function
2589 * doc/dbus-specification.sgml: add "type" byte to messages
2591 2003-08-01 Havoc Pennington <hp@pobox.com>
2593 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2594 a message type enum to distinguish kinds of message
2595 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2596 that need not be replied to
2598 2003-08-01 Havoc Pennington <hp@pobox.com>
2600 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2601 (unpack_8_octets): fix no-64-bit-int bug
2603 * dbus/dbus-object-registry.c (validate_id): validate the
2604 connection ID bits, not just the instance ID.
2606 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2607 the connection-global 33 bits of the object ID
2609 * dbus/dbus-object-registry.c (info_from_entry): fill in
2610 object ID in the new way
2612 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2613 define server/client/instance bits.
2615 2003-07-30 Havoc Pennington <hp@pobox.com>
2617 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2620 2003-07-13 Havoc Pennington <hp@pobox.com>
2622 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2623 fields to DBusObjectVTable and DBusObjectInfo
2625 2003-07-12 Havoc Pennington <hp@pobox.com>
2627 * dbus/dbus-object-registry.c: implement unit test,
2628 fix bugs discovered in process
2630 * dbus/dbus-connection.c: remove handler_table and
2631 register_handler(), add DBusObjectRegistry usage
2633 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2634 (dbus_object_id_set_null): new functions
2636 2003-07-08 Havoc Pennington <hp@pobox.com>
2638 * dbus/dbus-object.c: implement some of this
2640 * dbus/dbus-object-registry.c
2641 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2643 (_dbus_object_registry_new): handle OOM
2645 2003-07-08 Havoc Pennington <hp@pobox.com>
2647 * dbus/dbus-object.h: sketch out an API for registering objects
2648 with a connection, that allows us to use as little as 24 bytes
2649 per object and lets application code represent an object in
2650 any conceivable way.
2652 * dbus/dbus-object-registry.c: implement the hard bits of the
2653 DBusConnection aspect of object API. Not yet wired up.
2655 2003-07-06 Havoc Pennington <hp@pobox.com>
2657 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2658 (_dbus_marshal_object_id): new
2659 (_dbus_demarshal_object_id): new
2660 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2661 consolidate identical switch cases. Don't conditionalize handling
2662 of DBUS_TYPE_UINT64, need to handle the type always.
2663 (_dbus_marshal_validate_arg): consolidate identical cases, and
2664 handle DBUS_TYPE_OBJECT_ID
2666 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2668 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2670 2003-09-28 Havoc Pennington <hp@pobox.com>
2674 2003-09-28 Havoc Pennington <hp@pobox.com>
2676 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2677 to work with Debian db2html
2679 2003-09-28 Havoc Pennington <hp@pobox.com>
2681 * configure.in: 0.13
2683 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2684 stylesheet-images for benefit of Debian
2686 Change back to using filesystem-linked sockets for the system
2687 bus, so only root can create the default system bus address.
2689 * bus/system.conf.in: change to use
2690 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2692 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2695 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2696 here, and AC_DEFINE DBUS_SYSTEM_PATH
2698 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2701 * doc/busconfig.dtd:
2704 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2706 * doc/dbus-specification.sgml:
2707 Add activation reply values.
2709 2003-08-05 Havoc Pennington <hp@redhat.com>
2711 * configure.in: 0.12
2713 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2715 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2716 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2717 (add_watch), (remove_watch), (create_source):
2718 Refcount fds, fixes some reentrancy issues.
2720 2003-07-30 Havoc Pennington <hp@redhat.com>
2722 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2723 bus address to be abstract if we have abstract sockets
2727 2003-07-28 Havoc Pennington <hp@redhat.com>
2729 * bus/messagebus.in: fix to avoid processname/servicename
2730 confusion, from Michael Kearey
2731 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2733 2003-07-23 Havoc Pennington <hp@pobox.com>
2735 * dbus/dbus-message.c (dbus_message_iter_get_named):
2736 fix from Andy Hanton to remove broken "+1"
2738 2003-07-16 Havoc Pennington <hp@pobox.com>
2740 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2741 babysitter process, as suggested by Thomas Leonard, so
2742 an "eval `dbus-launch --exit-with-session`" will actually
2745 2003-07-16 Havoc Pennington <hp@pobox.com>
2747 * configure.in: print out EXPANDED_* variables in the summary at
2748 the end; clean up the code that computes EXPANDED_ variables and
2749 get the ones using exec_prefix right. Should make things work
2750 when you build without --prefix
2752 2003-06-29 Havoc Pennington <hp@pobox.com>
2754 * mono/Test.cs (class Test): fire up a main loop and run it
2756 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2757 done once, the app has to do it
2759 2003-06-26 Havoc Pennington <hp@pobox.com>
2761 * mono/Connection.cs: set up connection with the glib main loop
2763 2003-07-01 Havoc Pennington <hp@redhat.com>
2765 * doc/dbus-specification.sgml: clarify the format of a type code,
2766 change suggested by Jim Blandy
2768 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2771 * tools/Makefile.am: Don't assume srcdir == builddir.
2773 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2774 the allocated block.
2775 (_dbus_memory_test): New function.
2776 * dbus/dbus-test.h: Add _dbus_memory_test ().
2777 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2779 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2781 (dbus_message_new): Remove obsolete @todo.
2783 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2784 (_dbus_marshal_set_uint64): Fix comment.
2786 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2787 hardcode FIELD_REPLY_SERIAL.
2789 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2790 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2792 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2793 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2795 2003-06-24 Havoc Pennington <hp@pobox.com>
2797 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2799 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2805 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2806 * gcj/org/.cvsignore:
2807 * gcj/org/Makefile.am:
2808 * gcj/org/freedesktop/.cvsignore:
2809 * gcj/org/freedesktop/Makefile.am:
2810 * gcj/org/freedesktop/dbus/.cvsignore:
2811 * gcj/org/freedesktop/dbus/Makefile.am:
2812 * gcj/org/freedesktop/dbus/Message.java: (Message),
2814 * gcj/org/freedesktop/dbus/natMessage.cc:
2815 Fix the build system.
2817 2003-06-22 Havoc Pennington <hp@pobox.com>
2819 * mono/Connection.cs: add more bindings
2821 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2824 2003-06-22 Havoc Pennington <hp@pobox.com>
2826 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2827 Start wrapping more stuff.
2829 2003-06-22 Havoc Pennington <hp@pobox.com>
2831 * mono/Message.cs: implement Message.Wrap() that ensures we only
2832 have a single C# wrapper per DBusMessage, assuming it works which
2833 it probably doesn't.
2835 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2836 (dbus_message_free_data_slot): new
2837 (dbus_message_set_data): new
2838 (dbus_message_get_data): new
2840 2003-06-22 Havoc Pennington <hp@pobox.com>
2842 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2843 (_dbus_data_slot_allocator_alloc): rework these to keep a
2844 reference count on each slot and automatically manage a global
2845 slot ID variable passed in by address
2847 * bus/bus.c: convert to new dataslot API
2849 * dbus/dbus-bus.c: convert to new dataslot API
2851 * dbus/dbus-connection.c: convert to new dataslot API
2853 * dbus/dbus-server.c: convert to new dataslot API
2855 * glib/dbus-gmain.c: ditto
2859 * bus/connection.c: ditto
2861 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2863 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2864 after the gcj checks so that the correct configuration tags
2865 will be added to libtool.
2867 * dbus-glib-1.pc.in: No need to specify any includes since
2868 dbus-1.pc.in has those.
2870 2003-06-22 Havoc Pennington <hp@pobox.com>
2872 * mono/*, gcj/*, configure.in, Makefile.am:
2873 Check in makefiles and subdirs for mono and gcj bindings.
2874 Neither binding actually exists, just trying to get through
2875 all the build and other boring bits.
2877 2003-06-21 Philip Blundell <philb@gnu.org>
2879 * tools/dbus-monitor.1: Updated.
2881 * tools/dbus-send.1: Likewise.
2883 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2885 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2886 for hangup and error after checking read so we won't discard
2887 pending data if both hangup and read are set.
2889 2003-06-19 Philip Blundell <philb@gnu.org>
2891 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2893 * tools/dbus-send.c: Accept both --system and --session.
2895 * tools/dbus-monitor.c: Same here.
2897 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2899 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2900 from C++ (Patch by Miloslav Trmac).
2902 2003-06-15 Joe Shaw <joe@assbarn.com>
2904 * configure.in: Check for socklen_t.
2906 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2908 * test/test-segfault.c: Add #include <sys/time.h>
2910 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2911 dbus-launch needs it.
2913 2003-06-09 Havoc Pennington <hp@redhat.com>
2915 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2916 SUN_LEN, it breaks abstract socket usage
2918 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2921 2003-06-04 Havoc Pennington <hp@pobox.com>
2923 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2924 using unix:abstract=/foo, and when listening in a tmpdir
2925 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2927 * dbus/dbus-transport.c (_dbus_transport_open): support
2930 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2931 support abstract sockets
2933 * dbus/dbus-transport-unix.c
2934 (_dbus_transport_new_for_domain_socket): support abstract sockets
2936 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2937 toggle as an argument, implement abstract namespace support
2938 (_dbus_listen_unix_socket): ditto
2940 * configure.in: add --enable-abstract-sockets and implement
2941 a configure check for autodetection of the right value.
2943 2003-06-01 Havoc Pennington <hp@pobox.com>
2945 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2946 in /tmp (though on Linux this will end up being useless,
2947 when we add abstract namespace support)
2949 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2952 2003-05-28 Colin Walters <walters@verbum.org>
2954 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2956 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2958 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2960 2003-05-17 Colin Walters <walters@gnu.org>
2962 * tools/dbus-send.c: Don't exit with an error code if --help was
2963 passed. Default to using the session bus instead of the system
2966 * tools/dbus-launch.c: Ditto.
2968 * tools/dbus-monitor.c: Ditto.
2970 * tools/dbus-send.1: Update with new arguments.
2972 * tools/dbus-launch.c: Emit code to export variables. New
2973 arguments -s and -c to specify shell syntax, and a bit of code to
2974 autodetect syntax. Also, allow specifying a program to run.
2976 * tools/dbus-launch.1: Update with new arguments.
2978 * tools/dbus-send.1: Ditto.
2980 * tools/dbus-monitor.1: Ditto.
2982 2003-05-17 Havoc Pennington <hp@pobox.com>
2984 * bus/config-parser.c (merge_included): merge in policies from
2985 child configuration file.
2987 * bus/policy.c (bus_policy_merge): function to merge two policies
2990 2003-05-16 Havoc Pennington <hp@redhat.com>
2992 * dbus/dbus-connection.c: disable verbose lock spew
2994 * tools/dbus-send.c: add --print-reply command line option
2996 * tools/dbus-print-message.h (print_message): new util function
2997 shared by dbus-send and dbus-monitor
2999 * tools/dbus-monitor.c (handler_func): exit on disconnect
3001 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3002 disconnected, don't try to use the read_watch
3004 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3005 so we can find this bug more easily
3007 2003-05-16 Havoc Pennington <hp@redhat.com>
3009 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3010 NULL as DBusHashTable is annoyingly likely to do.
3012 2003-05-16 Colin Walters <walters@verbum.org>
3014 * tools/dbus-monitor.c: Add --session argument and usage()
3017 * tools/dbus-monitor.1: Update with new --session arg.
3019 * bus/Makefile.am (install-data-hook): Create
3020 $(libdir)/dbus-1.0/services so that the session bus is happy.
3022 2003-05-15 Havoc Pennington <hp@redhat.com>
3024 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3025 on non-x86. ifdef's are evil.
3027 2003-05-15 Havoc Pennington <hp@redhat.com>
3029 * configure.in: 0.11
3033 * bus/Makefile.am (initddir): apparently we are supposed to put
3034 init scripts in /etc/rc.d/init.d not /etc/init.d
3036 * bus/Makefile.am: remove the "you must --enable-tests to make
3037 check" as it broke distcheck
3039 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3041 2003-05-13 James Willcox <jwillcox@gnome.org>
3044 * bus/activation.c: (bus_activation_service_created),
3045 (bus_activation_activate_service):
3046 * bus/driver.c: (bus_driver_send_service_deleted),
3047 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3048 (bus_driver_send_service_acquired),
3049 (bus_driver_send_welcome_message),
3050 (bus_driver_handle_list_services):
3051 * bus/session.conf.in:
3052 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3053 (dbus_bus_service_exists), (dbus_bus_activate_service):
3056 Add some convenience API which lets you activate a service, and did a
3057 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3058 and dbus_message_get_args()
3060 2003-05-11 Havoc Pennington <hp@pobox.com>
3062 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3063 calling _dbus_marshal_validate_arg() for every byte in a byte
3066 * dbus/dbus-message-handler.c: use atomic reference counting to
3067 reduce number of locks slightly; the global lock in here sucks
3069 * dbus/dbus-connection.c
3070 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3071 update_dispatch_status that can be called with lock held; then use
3072 in a couple places to reduce locking/unlocking
3073 (dbus_connection_send): hold the lock over the whole function
3074 instead of acquiring it twice.
3076 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3078 * bus/connection.c (bus_connections_setup_connection): fix access
3079 to already-freed memory.
3081 * dbus/dbus-connection.c: keep a little cache of linked list
3082 nodes, to avoid using the global linked list alloc lock in the
3083 normal send-message case. Instead we just use the connection lock
3084 that we already have to take.
3086 * dbus/dbus-list.c (_dbus_list_find_last): new function
3088 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3089 change to use a struct for the atomic type; fix docs,
3090 they return value before increment, not after increment.
3092 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3093 (_dbus_string_append_8_aligned): new functions to try to
3094 microoptimize this operation.
3095 (reallocate_for_length): break this out of set_length(), to
3096 improve profile info, and also so we can consider inlining the
3099 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3100 strings with some preallocation, cuts down on our calls to realloc
3101 a fair bit. Though if we can get the "move entire string to empty
3102 string" optimization below to kick in here, it would be better.
3104 * dbus/dbus-string.c (_dbus_string_move): just call
3105 _dbus_string_move_len
3106 (_dbus_string_move_len): add a special case for moving
3107 an entire string into an empty string; we can just
3108 swap the string data instead of doing any reallocs.
3109 (_dbus_string_init_preallocated): new function
3111 2003-05-11 Havoc Pennington <hp@pobox.com>
3113 Write a "test-profile" that does echo client-server with threads;
3114 profile reveals lock contention, memcpy/realloc of buffers, and
3115 UTF-8 validation as hot spots. 20% of lock contention eliminated
3116 with dbus_atomic_inc/dec implementation on x86. Much remaining
3117 contention is global mempool locks for GList and DBusList.
3119 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3122 * dbus/dbus-connection.c (struct DBusConnection): use
3123 dbus_atomic_t for the reference count
3125 * dbus/dbus-message.c (struct DBusMessage): declare
3126 dbus_atomic_t values as volatile
3128 * configure.in: code to detect ability to use atomic integer
3129 operations in assembly, from GLib patch
3131 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3132 time, tired of it being wrong in threads and forked processes
3134 * glib/test-profile.c: a little program to bounce messages back
3135 and forth between threads and eat CPU
3137 * dbus/dbus-connection.c: add debug spew macros for debugging
3138 thread locks; include config.h at top; fix deadlock in
3139 dbus_connection_flush()
3141 2003-05-08 Havoc Pennington <hp@pobox.com>
3143 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3144 data from getting written, and there wasn't a good reason to
3147 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3148 dbus_verbose lines in test coverage
3149 (main): add list of functions sorted by # of untested blocks
3150 to the coverage report
3152 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3154 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3156 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3157 extend test coverage
3159 * test/data/auth/cancel.auth-script: test canceling an
3162 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3163 aren't used. in CVS history if we end up needing them.
3165 2003-05-04 Havoc Pennington <hp@pobox.com>
3167 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3170 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3171 function, which assumed length was in # of strings, not bytes
3173 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3176 * dbus/dbus-connection.c
3177 (_dbus_connection_queue_received_message): disable function for
3178 now, we are only using it in test mode
3180 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3181 remove a mistaken FIXME
3183 2003-05-04 Havoc Pennington <hp@pobox.com>
3185 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3186 unlock mutex on successful return, patch from Anders Gustafsson
3188 2003-05-04 Havoc Pennington <hp@pobox.com>
3190 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3193 2003-05-04 Havoc Pennington <hp@pobox.com>
3195 * tools/dbus-launch.c: implement
3197 * bus/main.c (main), bus/bus.c (bus_context_new):
3198 implement --print-pid and --fork
3200 2003-05-03 Havoc Pennington <hp@redhat.com>
3202 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3203 the address had no value, and add to test suite. Fix and
3204 regression test from Miloslav Trmac
3206 2003-05-03 Havoc Pennington <hp@pobox.com>
3208 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3209 watch is invalid when handled
3211 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3212 dbus-launch utility to launch the bus from a shell script. Didn't
3213 actually implement dbus-launch yet, it's just a placeholder still.
3215 2003-05-03 Havoc Pennington <hp@pobox.com>
3217 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3218 daemon; also documents daemon config file, so replaces
3219 doc/config-file.txt. Corrected some stuff from config-file.txt in
3220 the process of moving it.
3222 2003-05-03 Havoc Pennington <hp@pobox.com>
3224 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3227 2003-05-03 Colin Walters <walters@verbum.org>
3229 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3230 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3232 * Makefile.am: Update to use new .pc versioning scheme.
3234 2003-05-02 Havoc Pennington <hp@redhat.com>
3236 * bus/system.conf.in: allow send/receive to/from message bus
3239 2003-04-30 Havoc Pennington <hp@redhat.com>
3241 * configure.in: print a note when building with unit tests and
3244 2003-04-30 Havoc Pennington <hp@redhat.com>
3246 * Makefile.am: add a check-local that complains if you didn't
3247 configure with --enable-tests
3249 2003-04-29 Havoc Pennington <hp@redhat.com>
3251 * glib/dbus-gmain.c: docs cleanups
3253 * dbus/dbus-types.h: add docs on int64 types
3255 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3256 public API docs section
3258 2003-04-29 Havoc Pennington <hp@redhat.com>
3260 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3261 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3262 parallel install API version, not with the D-BUS package version.
3264 * HACKING: move some of README over here
3266 * README: updates, and document API/ABI policy
3268 * configure.in: reindentation
3270 2003-04-29 Havoc Pennington <hp@redhat.com>
3272 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3273 to use this library" to be sure people have the right
3276 2003-04-28 Havoc Pennington <hp@redhat.com>
3278 * configure.in: add --enable-docs which by default is auto yes if
3279 doxygen and db2html found, no otherwise; but can be forced on/off
3281 * doc/Makefile.am: conditionalize whether to build docs on
3284 2003-04-28 Havoc Pennington <hp@redhat.com>
3286 * configure.in: 0.10
3290 * bus/system.conf.in: add <includedir>system.d</includedir>
3292 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3293 username was provided but not uid
3295 * bus/config-parser.c (struct BusConfigParser): keep track of
3296 whether the parser is toplevel or was included; change some
3297 of the error handling if it's included.
3299 2003-04-27 Havoc Pennington <hp@pobox.com>
3303 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3304 report correct status if we finish processing authentication
3305 inside this function.
3307 * bus/activation.c (try_send_activation_failure): use
3308 bus_transaction_send_error_reply
3310 * bus/connection.c (bus_connection_get_groups): return an error
3311 explaining the problem
3313 * bus/bus.c (bus_context_check_security_policy): implement
3314 restriction here that inactive connections can only send the
3315 hello message. Also, allow bus driver to send anything to
3318 * bus/connection.c (bus_connection_complete): create the
3319 BusClientPolicy here instead of on-demand.
3320 (bus_connection_get_policy): don't return an error
3322 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3323 sender field in message being replied to
3325 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3326 causing it to return FALSE always
3328 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3329 we checked sender rather than destination
3331 2003-04-25 Havoc Pennington <hp@redhat.com>
3333 test suite is slightly hosed at the moment, will fix soon
3335 * bus/connection.c (bus_connections_expire_incomplete): fix to
3336 properly disable the timeout when required
3337 (bus_connection_set_name): check whether we can remove incomplete
3338 connections timeout after we complete each connection.
3340 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3341 probably still broken.
3343 * bus/services.c (bus_registry_acquire_service): implement max
3344 number of services owned, and honor allow/deny rules on which
3345 services a connection can own.
3347 * bus/connection.c (bus_connection_get_policy): report errors here
3349 * bus/activation.c: implement limit on number of pending
3352 2003-04-25 Havoc Pennington <hp@redhat.com>
3354 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3355 where we used >= 0 instead of != DBUS_UID_UNSET.
3357 2003-04-25 Havoc Pennington <hp@redhat.com>
3359 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3360 were toggled without add/remove, fix from Anders Gustafsson
3362 2003-04-24 Havoc Pennington <hp@redhat.com>
3364 * test/data/valid-config-files/basic.conf: add <limit> tags to
3367 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3368 <limit> tag in configuration file.
3370 2003-04-24 Havoc Pennington <hp@redhat.com>
3372 * bus/dispatch.c: somehow missed some name_is
3374 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3375 (_dbus_timeout_set_interval): new
3377 * bus/connection.c (bus_connections_setup_connection): record time
3378 when each connection is first set up, and expire them after the
3379 auth timeout passes.
3381 2003-04-24 Havoc Pennington <hp@redhat.com>
3383 * dbus/dbus-message.c (dbus_message_name_is): rename
3384 (dbus_message_service_is): rename
3385 (dbus_message_sender_is): rename
3386 (dbus_message_get_service): rename
3388 2003-04-24 Havoc Pennington <hp@redhat.com>
3390 * configure.in: add --enable-checks
3392 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3394 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3395 to use thread locks.
3396 (_dbus_connection_handler_destroyed_locked): move some private
3397 functions into proper docs group
3399 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3400 _dbus_return_val_if_fail
3402 Throughout: use dbus_return_if_fail
3404 2003-04-23 James Willcox <jwillcox@gnome.org>
3407 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3408 (dbus_connection_setup_with_g_main),
3409 (dbus_server_setup_with_g_main):
3410 * glib/test-dbus-glib.c: (main):
3411 * glib/test-thread-client.c: (main):
3412 * glib/test-thread-server.c: (new_connection_callback), (main):
3413 * tools/dbus-monitor.c: (main):
3415 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3416 and dbus_server_setup_with_g_main().
3418 2003-04-20 Havoc Pennington <hp@pobox.com>
3420 * doc/dbus-specification.sgml: document the restrictions on
3421 message and service names
3423 2003-04-22 Havoc Pennington <hp@redhat.com>
3425 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3426 support, and do some code cleanups to share more code and
3427 speed up array marshal/demarshal.
3429 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3431 * configure.in: generate dbus-arch-deps.h
3433 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3436 2003-04-22 Havoc Pennington <hp@redhat.com>
3438 * test/data/valid-messages/opposite-endian.message: fix test
3439 to use proper type for rply field
3441 * test/data/invalid-messages: add tests for below validation
3443 * dbus/dbus-message.c (decode_header_data): validate field types,
3444 and validate that named fields are valid names
3445 (decode_name_field): consider messages in the
3446 org.freedesktop.Local. namespace to be invalid.
3448 * dbus/dbus-string.c (_dbus_string_validate_name): new
3450 2003-04-19 Havoc Pennington <hp@pobox.com>
3452 * bus/driver.c (bus_driver_handle_hello): check limits and
3453 return an error if they are exceeded.
3455 * bus/connection.c: maintain separate lists of active and inactive
3456 connections, and a count of each. Maintain count of completed
3457 connections per user. Implement code to check connection limits.
3459 * dbus/dbus-list.c (_dbus_list_unlink): export
3461 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3462 number of bytes in the message queue for a connection
3464 2003-04-18 Havoc Pennington <hp@pobox.com>
3466 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3468 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3471 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3472 on realloc be sure to update the pointer in the keyring
3474 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3475 offset to avoid writing to unallocated memory
3477 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3478 try the next mechanism, so we properly handle OOM
3480 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3482 (_dbus_keyring_new): fix OOM bug
3483 (_dbus_keyring_new_homedir): always set error; impose a maximum
3484 number of keys we'll load from the file, mostly to speed up the
3485 test suite and make its OOM checks more useful, but also for
3488 * dbus/dbus-auth.c (process_error_server): reject authentication
3489 if we get an error from the client
3490 (process_cancel): on cancel, send REJECTED, per the spec
3491 (process_error_client): send CANCEL if we get an error from the
3494 2003-04-18 Havoc Pennington <hp@pobox.com>
3496 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3499 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3502 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3503 about DBUS_TEST_HOMEDIR once
3505 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3508 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3509 config file so we test the right thing
3511 Throughout: assorted docs improvements
3513 2003-04-18 Havoc Pennington <hp@pobox.com>
3515 * glib/dbus-gmain.c: adapt to watch changes
3517 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3519 * dbus/dbus-server.h: remove dbus_server_handle_watch
3521 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3523 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3524 like DBusTimeout, so we don't need dbus_connection_handle_watch
3527 2003-04-17 Havoc Pennington <hp@redhat.com>
3529 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3530 database usage so it all goes via the DBusUserDatabase cache.
3532 2003-04-17 Havoc Pennington <hp@redhat.com>
3534 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3535 there was an OOM watch we skipped, we always return TRUE so we
3536 iterate again to have a look at it again. Fixes test suite hang.
3537 Code rearrangement also lets us lose some memset and only iterate
3538 over callbacks once.
3540 * bus/driver.c (bus_driver_handle_message): sense of test for
3543 2003-04-16 Havoc Pennington <hp@pobox.com>
3545 * doc/dbus-specification.sgml: make spec say serials are unsigned
3547 * dbus/dbus-message.h: change message serials to unsigned
3549 * dbus/dbus-connection.c: adapt to message serials being unsigned
3551 2003-04-15 Havoc Pennington <hp@pobox.com>
3553 * bus/bus.c: create and keep around a shared DBusUserDatabase
3556 * bus/connection.c (bus_connection_get_groups): don't cache
3557 groups for user in the connection object, since user database
3558 object now does that.
3560 2003-04-16 Havoc Pennington <hp@redhat.com>
3562 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3563 list of size counters
3564 (_dbus_message_loader_putback_message_link): put back a popped link
3566 * dbus/dbus-connection.c
3567 (dbus_connection_set_max_live_messages_size): rename
3569 (dbus_connection_get_outgoing_size): get size of outgoing
3571 (_dbus_connection_set_connection_counter): remove this cruft
3573 2003-04-14 Havoc Pennington <hp@redhat.com>
3575 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3576 caching, but at some point we might want to be able to use a
3579 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3580 SHA1 conf file to test the sha1 auth mechanism, since the regular
3581 test always uses EXTERNAL when available.
3584 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3585 add conf file that requires use of sha1 auth
3587 2003-04-13 Havoc Pennington <hp@pobox.com>
3589 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3590 from Philip Blundell to send messages and monitor them.
3592 2003-04-13 Havoc Pennington <hp@pobox.com>
3594 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3597 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3600 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3601 fix to only recover unused bytes if we're already authenticated
3602 (_dbus_transport_get_is_authenticated): fix to still mark us
3603 authenticated if there are unused bytes.
3605 * bus/dispatch.c: implement security policy checking
3607 * bus/connection.c (bus_transaction_send_from_driver): new
3609 * bus/bus.c (bus_context_check_security_policy): new
3611 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3612 now we just set the DBusError and it gets converted to an error
3615 * bus/connection.c (allow_user_function): enable code using actual
3616 data from the config file
3618 * bus/policy.c (list_allows_user): handle wildcard rules for
3619 user/group connection perms
3621 2003-04-13 Havoc Pennington <hp@pobox.com>
3623 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3625 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3627 * bus/policy.c (bus_policy_append_mandatory_rule)
3628 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3629 (bus_policy_append_group_rule): new functions
3631 2003-04-12 Havoc Pennington <hp@pobox.com>
3633 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3635 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3636 the pid/gid/uid, just for paranoia.
3638 * test/break-loader.c (randomly_do_n_things): find a byte
3639 containing a type code, and randomly change it to a different
3642 2003-04-12 Havoc Pennington <hp@pobox.com>
3644 * bus/policy.h: change BusPolicy to be the thing from the config
3645 file, and rename old BusPolicy to BusClientPolicy
3647 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3648 match change in how policy works
3650 * dbus/dbus-internals.h: mark assert_not_reached as
3651 __attribute((noreturn))__
3653 2003-04-11 Havoc Pennington <hp@redhat.com>
3655 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3656 the broadcast service. Use boolean return for ServiceExists.
3658 2003-04-11 Havoc Pennington <hp@redhat.com>
3660 * configure.in: add another directory to look for qt in.
3662 2003-04-11 Havoc Pennington <hp@redhat.com>
3664 * AUTHORS: add Colin Walters
3666 2003-04-11 Havoc Pennington <hp@redhat.com>
3672 2003-04-11 Havoc Pennington <hp@redhat.com>
3674 * bus/messagebus.in: remove pid file when stopping the
3675 message bus, since the bus won't have privileges to remove it
3678 2003-04-11 Havoc Pennington <hp@redhat.com>
3680 * bus/bus.c (bus_context_new): move credentials change after
3683 2003-04-11 Havoc Pennington <hp@pobox.com>
3685 * test/decode-gcov.c: add "below average functions" to the
3686 coverage report, and change how some of the code works.
3688 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3689 not in the coverage stats.
3691 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3692 couple places so running the test suite doesn't result in megaspam.
3694 2003-04-11 Havoc Pennington <hp@pobox.com>
3696 * bus/dispatch.c (check_existent_service_activation): accept a no
3697 memory error in a place we didn't before
3699 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3700 in case the first one failed," since the test suite is less
3703 2003-04-10 Havoc Pennington <hp@pobox.com>
3705 * bus/dispatch.c (check_segfault_service_activation): add test
3706 for launching an executable that just crashes.
3708 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3709 don't leave a million cores. We'll see how portable this is.
3711 2003-04-10 Havoc Pennington <hp@pobox.com>
3713 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3714 the possible parent failures before we fork, so that we don't
3715 fail to create a babysitter after creating the child.
3717 * bus/activation.c (bus_activation_activate_service): kill child
3718 if we don't successfully complete the activation.
3720 2003-04-10 Havoc Pennington <hp@redhat.com>
3722 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3723 the connection if it's disconnected
3725 * bus/activation.c (bus_activation_service_created): use new
3726 transaction features to roll back removal of pending activation if
3727 we don't successfully create the service after all. Don't remove
3728 pending activation if the function fails.
3730 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3731 (_dbus_list_insert_after_link): new code to facilitate
3734 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3735 new functionality, so we can preallocate the ability to insert
3738 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3739 allowing us to put custom hooks in a transaction to be used for
3740 cancelling said transaction
3742 * doc/dbus-specification.sgml: add some discussion of secondary
3743 service owners, and disallow zero-length service names
3745 * bus/services.c (bus_registry_acquire_service): new function,
3746 splits out part of bus_driver_handle_acquire_service() and fixes
3747 a bug where we didn't remove the service doing the acquiring
3748 from the secondary queue if we failed to remove the current owner
3749 from the front of the queue.
3751 2003-04-10 Alexander Larsson <alexl@redhat.com>
3753 * doc/dbus-specification.sgml:
3754 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3756 2003-04-10 Alexander Larsson <alexl@redhat.com>
3761 Added files to cvsignore
3763 * dbus/dbus-message.h:
3764 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3765 Make get_named() take two out argument and return a boolean.
3766 (dbus_message_iter_get_args_valist):
3767 Update usage of get_named().
3768 (dbus_message_iter_append_byte):
3770 (dbus_message_iter_append_named)
3772 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3775 2003-04-10 Alexander Larsson <alexl@redhat.com>
3777 * dbus/dbus-marshal.[ch]:
3778 Add array_type_pos argument to _dbus_marshal_validate_arg.
3779 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3781 * dbus/dbus-message.[ch]:
3782 Multi-dimensional arrays have full type specification in the
3783 outermost array. Iter code re-arranged to handle this.
3784 Added some more iter tests.
3786 * doc/dbus-specification.sgml:
3789 Update new array encoding description.
3790 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3792 * test/data/invalid-messages/array-with-mixed-types.message:
3793 * test/data/valid-messages/array-of-array-of-uint32.message:
3794 Change to the new array format.
3796 * test/data/invalid-messages/too-short-dict.message:
3799 * test/data/valid-messages/recursive-types.message:
3800 Fix up and extend test.
3802 2003-04-10 Havoc Pennington <hp@pobox.com>
3804 * bus/dispatch.c: lots of fixes
3806 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3807 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3808 that was crack, broke the test service.
3810 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3811 handling to avoid piling up errors if we get a failure on the
3814 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3815 pid in assertion failures.
3817 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3818 to some fixed size of file descriptor array. Don't return TRUE
3819 anytime a timeout exists, that led to lots of busy loop silliness
3822 2003-04-09 Havoc Pennington <hp@redhat.com>
3824 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3825 I'd checked this in earlier but hadn't.
3827 2003-04-09 Havoc Pennington <hp@redhat.com>
3829 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3830 the activation test (man this is getting old!)
3832 2003-04-09 Havoc Pennington <hp@redhat.com>
3834 * test/test-utils.c: use dispatch status function to fix this up
3836 * bus/connection.c (connection_watch_callback): don't dispatch
3838 (connection_timeout_callback): don't dispatch from here
3839 (bus_connections_setup_connection): set the dispatch status function
3840 (bus_connection_disconnected): unset it
3842 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3843 used to add a connection to be dispatched
3844 (_dbus_loop_iterate): do the dispatching at the end of each
3847 * dbus/dbus-connection.c
3848 (dbus_connection_set_dispatch_status_function): new function
3849 allowing us to fix up main loop usage
3850 (_dbus_connection_last_unref): free all the various function
3852 (dbus_connection_dispatch): call the DispatchStatusFunction
3853 whenever this function returns
3854 (dbus_connection_handle_watch): call DispatchStatusFunction
3855 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3856 (reply_handler_timeout): call DispatchStatusFunction
3857 (dbus_connection_flush): call DispatchStatusFunction
3859 2003-04-09 Havoc Pennington <hp@redhat.com>
3861 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3864 * bus/dispatch.c (check_service_activated): fix bug in test
3866 * dbus/dbus-mainloop.c (check_timeout): fix this up
3868 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3869 verbose output so we can sort out output from different processes,
3870 e.g. in the activation case.
3872 2003-04-08 Colin Walters <walters@gnu.org>
3874 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3876 (bus_context_new): Set it.
3877 (bus_context_unref): Use it to delete the pid file.
3879 2003-04-08 Havoc Pennington <hp@redhat.com>
3881 * test/data/invalid-messages/array-with-mixed-types.message:
3882 regression test that fails for the moment
3884 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3885 tests for convenience
3887 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3888 array of nil, it broke things.
3890 * test/data/invalid-messages/array-of-nil.message: regression test
3892 * test/data/valid-messages/array-of-array-of-uint32.message:
3893 happened to write this so added it to suite
3895 2003-04-08 Havoc Pennington <hp@redhat.com>
3897 * bus/driver.c (bus_driver_handle_acquire_service): init
3898 retval/reply before checking name
3900 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3901 recursion depth argument
3903 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3904 in the public struct for future extension
3906 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3909 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3912 * doc/dbus-specification.sgml: fix typo
3914 2003-04-08 Alexander Larsson <alexl@redhat.com>
3916 Implemented recursive types, named types and new-style iters
3919 * glib/test-thread-client.c: (thread_func):
3920 * glib/test-thread-server.c: (handle_test_message):
3921 * test/test-service.c: (handle_echo):
3930 * dbus/dbus-internals.c: (_dbus_type_to_string):
3931 Update for new types.
3933 * dbus/dbus-marshal.[ch]:
3934 Implement recursive types and the new marshalling format.
3935 Remove hardcoded dict marshalling.
3936 Marshal named types.
3938 * dbus/dbus-message-builder.c:
3940 Remove references to old types
3942 * dbus/dbus-message.[ch]:
3943 New non-refcounted iter API that supports recursive iters.
3944 Use iters for appending, including support for recursive
3946 Add byte and named type support.
3947 Update everything to new marshalling formats.
3948 Add tests for new API.
3950 * dbus/dbus-protocol.h:
3951 Remove old array types.
3952 Add types: BYTE, ARRAY, DICT, NAMED
3954 * dbus/dbus-string.c:
3955 * dbus/dbus-sysdeps.c:
3956 Make parse_double locale safe.
3958 * dbus/dbus-test-main.c:
3964 * doc/dbus-specification.sgml:
3967 * test/data/incomplete-messages/missing-body.message:
3968 * test/data/invalid-messages/bad-boolean.message:
3969 * test/data/invalid-messages/bad-boolean-array.message:
3970 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3971 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3972 * test/data/invalid-messages/too-short-dict.message:
3973 * test/data/valid-messages/dict-simple.message:
3974 * test/data/valid-messages/dict.message:
3975 * test/data/valid-messages/emptiness.message:
3976 * test/data/valid-messages/lots-of-arguments.message:
3977 * test/data/valid-messages/no-padding.message:
3978 * test/data/valid-messages/recursive-types.message:
3979 Add missing NAME fields
3980 Fix up dicts & arrays
3982 * test/data/invalid-messages/dict-with-nil-value.message:
3983 Removed, this is not invalid anymore.
3985 * test/data/valid-messages/recursive-types.message:
3986 Add new test for deeply recursive types.
3988 2003-04-07 Havoc Pennington <hp@pobox.com>
3990 * bus/driver.c (bus_driver_handle_acquire_service): return an
3991 error if you try to acquire a service that starts with ':'
3993 2003-04-07 Havoc Pennington <hp@redhat.com>
3995 * doc/dbus-specification.sgml: require that base service names
3996 start with ':' and that the base service is created/deleted
3997 as first and last things a connection does on the bus
3999 * bus/dispatch.c (check_existent_service_activation): lots more
4000 work on the activation test; it doesn't fully pass yet...
4002 * test/test-service.c (main): fix so we don't memleak the
4003 connection to the message bus
4004 (filter_func): accept a message asking us to exit
4006 2003-04-06 Havoc Pennington <hp@pobox.com>
4008 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4011 * configure.in: fixes to Qt detection from Colin Walters
4013 * doc/Makefile.am: Only remove generated docbook dirs if they
4014 exist, from Colin Walters
4016 * dbus/dbus-bus.c: change how we set well-known connections to
4017 NULL, so that it works if a single connection is stored in
4018 two well-known array slots.
4020 * test/Makefile.am: remove a lot of stuff that isn't immediately
4021 useful, it's in CVS history if we want it.
4023 * test/test-service.c: use dbus-mainloop instead of that
4026 2003-04-06 Havoc Pennington <hp@pobox.com>
4028 * dbus/Makefile.am: split lists of sources into stuff that goes in
4029 the library, util functions that go in the lib and are also used
4030 elsewhere, and util functions that are used in tests/daemon but
4031 don't go in the lib.
4033 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4034 here so it can be used in test binaries also
4036 2003-04-06 Havoc Pennington <hp@pobox.com>
4038 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4039 here in the parent process, so we can return an error if it
4040 fails. Also, move some of the code into the child so the parent
4041 is less hosed if we fail midway through.
4043 * bus/bus.c (bus_context_new): move pidfile detection further up
4044 in the function, before we start overwriting sockets and such.
4046 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4048 * configure.in: add --with-system-pid-file and --with-system-socket
4050 2003-04-06 Colin Walters <walters@verbum.org>
4052 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4054 * bus/system.conf.in: Declare a pidfile.
4056 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4057 create one (if appropriate).
4059 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4060 (struct BusConfigParser) [pidfile]: New.
4061 (element_type_to_name, merge_included, start_busconfig_child)
4062 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4063 (bus_config_parser_unref): Free it.
4064 (bus_config_parser_get_pidfile): New function.
4066 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4068 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4070 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4072 * dbus/dbus-sysdeps.h: Prototype it.
4074 2003-04-06 Havoc Pennington <hp@pobox.com>
4076 * bus/bus.c (bus_context_new): print the address in here, rather
4077 than in main(), because we need to do it before forking the daemon
4079 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4080 on the service nonexistent error
4082 * bus/driver.c (bus_driver_handle_acquire_service): set the
4083 sender on the AcquireService reply
4085 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4086 server also listen on a UNIX socket so services can connect to it.
4088 2003-04-06 Havoc Pennington <hp@pobox.com>
4090 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4091 so it detects deadlocks and also we actually init threads when
4094 2003-04-06 Havoc Pennington <hp@pobox.com>
4096 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4097 save the domain socket name, and unlink it when we disconnect the
4098 server. Means that at least when we exit normally, we won't leave
4099 a bunch of junk in /tmp
4101 * dbus/dbus-transport-unix.c
4102 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4103 memory management). (I was making a real change here but then
4106 2003-04-06 Havoc Pennington <hp@pobox.com>
4108 * bus/bus.c (bus_context_new): fix wrong handling of
4109 server_data_slot_unref() in the error case.
4111 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4112 "(condition) != 0" to _dbus_real_assert so that
4113 "_dbus_assert (pointer)" doesn't cause a warning
4115 * bus/main.c (main): accept --print-address option to print out
4116 the message bus address
4118 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4120 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4121 "tmpdir" option to unix: address on client side
4123 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4126 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4127 we can use to create sockets in the test suite.
4129 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4130 cleanly. To be used for testing.
4132 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4134 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4136 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4137 handle trying to call this when there's no servers active
4139 2003-04-05 Havoc Pennington <hp@pobox.com>
4145 2003-04-05 Havoc Pennington <hp@pobox.com>
4147 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4148 crash on startup. Need to get "try starting the daemon"
4149 in the test suite I guess. ;-)
4151 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4152 tracked the number of open connections; it's better done in
4153 application-specific code as you want it to span all servers etc.
4155 2003-04-05 Havoc Pennington <hp@pobox.com>
4157 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4158 patch from Colin Walters
4160 2003-04-05 Havoc Pennington <hp@pobox.com>
4162 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4163 reality; in fact multiple mechanisms are allowed.
4165 * dbus/dbus-internals.c (_dbus_real_assert)
4166 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4167 _dbus_assert_not_reached() into functions, so that they don't show
4168 up in basic block counts for test coverage, and don't use up as
4169 much disk space. Does mean slower execution speed though, so
4170 assumes --disable-asserts is the normal production case.
4172 2003-04-05 Havoc Pennington <hp@pobox.com>
4174 * test/Makefile.am (dist-hook): also dist *.in files
4180 2003-04-05 Havoc Pennington <hp@pobox.com>
4182 * dbus/dbus-string.c: docs warning
4184 * dbus/dbus-spawn.c: missing docs
4186 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4188 2003-04-05 Havoc Pennington <hp@pobox.com>
4190 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4193 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4194 to -1 once we've reaped the babysitter
4195 (_dbus_babysitter_handle_watch): do as much work as we can, not
4198 * bus/activation.c: add code using DBusBabysitter so that we
4199 handle it when a service fails to start up properly.
4200 (bus_activation_service_created): don't remove the activation
4201 entries as we go, just let them get removed when we free the pending
4202 activation. Unref reply messages after sending them.
4204 2003-04-05 Havoc Pennington <hp@pobox.com>
4206 * test/decode-gcov.c (main): print per-directory stats in the report
4208 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4210 2003-04-05 Havoc Pennington <hp@pobox.com>
4212 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4214 * test/decode-gcov.c: hack up a little program to suck data
4215 out of gcov files. Yes this is sort of silly.
4217 * configure.in: define something in config.h and do an
4218 AM_CONDITIONAL when gcov is enabled
4220 2003-04-04 Havoc Pennington <hp@redhat.com>
4222 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4223 return a "babysitter" object that is used to monitor the status of
4224 the spawned process and reap it when required.
4226 * test/test-segfault.c, test/test-exit.c,
4227 test/test-sleep-forever.c: binaries that do various lame things,
4228 used in the test suite.
4230 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4232 2003-04-03 Havoc Pennington <hp@pobox.com>
4234 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4235 in preparation for modifying it, dbus-sysdeps is getting
4238 2003-04-03 Havoc Pennington <hp@redhat.com>
4240 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4243 * bus/*.[hc]: adapt to mainloop change
4245 2003-04-03 Havoc Pennington <hp@redhat.com>
4247 * bus/activation.c (load_directory): fix up memleaks
4248 (bus_activation_entry_free): free the entry
4250 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4251 we get one from the message bus; fix memleaks.
4253 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4255 2003-04-03 Havoc Pennington <hp@pobox.com>
4257 * bus/config-parser.c (bus_config_parser_unref): free
4258 list of mechanisms, bug discovered by test suite enhancements
4259 (putting system.conf and session.conf into suite)
4261 * test/Makefile.am, test/test-service.c: add placeholder for a
4262 test service that we'll activate as part of test suite. Doesn't
4265 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4266 setting NULL value, and use system malloc not dbus_malloc()
4267 when we have unavoidable memleakage.
4269 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4270 didn't work, and support DBUS_BUS_ACTIVATION.
4272 * bus/activation.c (child_setup): pass our well-known bus type to
4275 * bus/config-parser.c: support <type> to specify well-known type
4277 * doc/dbus-specification.sgml: document the env variables to
4278 locate well-known buses and find service activator
4280 2003-04-02 Havoc Pennington <hp@redhat.com>
4282 * test/Makefile.am (all-local): add a rule to copy tests to
4283 builddir, so we can have generated tests. Use this to remove the
4284 silly hack for testing system.conf and session.conf. Will use this
4285 shortly to generate .service files pointing to test binaries.
4287 2003-04-02 Havoc Pennington <hp@redhat.com>
4289 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4290 current alloc and needed new length, not max of the doubled
4291 allocation and needed new length. Also, when building tests,
4292 don't do the double-allocation stuff, just realloc every time.
4294 2003-04-02 Havoc Pennington <hp@redhat.com>
4296 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4298 (_dbus_string_get_dirname): new
4299 (_dbus_sysdeps_test): new
4300 (_dbus_directory_open): include dirnames in error messages
4302 * bus/config-parser.c: interpret <include> and <includedir> and
4303 <servicedir> relative to config file location if the given
4304 filename is not absolute.
4306 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4308 2003-04-02 Havoc Pennington <hp@redhat.com>
4310 * bus/connection.c (bus_transaction_send_error_reply): set sender
4311 service for the error, and unref the reply on success
4313 * bus/activation.c: convert to use BusTransaction so OOM can be
4315 (bus_activation_service_created): set sender of the message
4317 2003-04-01 Havoc Pennington <hp@redhat.com>
4319 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4320 <includedir> (at least mostly)
4322 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4323 first, then the user ID
4325 2003-04-01 Havoc Pennington <hp@pobox.com>
4327 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4330 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4332 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4334 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4335 socket 0777, and unlink any existing socket.
4337 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4338 the configuration file so specifies; set up auth mechanism
4341 * bus/config-parser.c (bus_config_parser_content): add support
4342 for <fork> option and fill in code for <auth>
4344 * bus/system.conf.in: add <fork/> to default configuration,
4345 and limit auth mechanisms to EXTERNAL
4347 * doc/config-file.txt (Elements): add <fork>
4349 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4350 (_dbus_change_identity): new function
4352 2003-03-31 Havoc Pennington <hp@redhat.com>
4354 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4355 (_dbus_listen_unix_socket): fix off-by-one error in null
4356 termination spotted by Nalin
4358 2003-03-31 Havoc Pennington <hp@redhat.com>
4360 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4361 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4362 having a real home directory available.
4364 2003-03-31 Havoc Pennington <hp@redhat.com>
4366 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4368 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4370 * configure.in: add support for specifying a style of init script
4373 2003-03-31 Havoc Pennington <hp@redhat.com>
4375 Fix some annoying DBusString API and fix all affected code.
4377 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4379 (_dbus_string_get_data): change to return string instead of using
4381 (_dbus_string_get_const_data): ditto
4382 (_dbus_string_get_data_len): ditto
4383 (_dbus_string_get_const_data_len): ditto
4385 2003-03-31 Havoc Pennington <hp@redhat.com>
4387 * bus/main.c (main): fix up the command line arguments to be nicer
4389 2003-03-31 Havoc Pennington <hp@redhat.com>
4391 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4392 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4393 final location that lands in the config file
4395 * bus/config-loader-expat.c (bus_config_load): fix type of
4398 * doc/TODO: remove TODO item for dbus_bus_get()
4400 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4402 2003-03-31 Havoc Pennington <hp@pobox.com>
4404 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4405 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4406 argument since they are always client side
4408 * dbus/dbus-server.c (dbus_server_get_address): new function
4410 * bus/main.c (main): take the configuration file as an argument.
4412 * test/data/valid-config-files/debug-allow-all.conf: new file to
4413 use with dispatch.c tests for example
4415 * bus/test-main.c (main): require test data dir
4417 * bus/bus.c (bus_context_new): change this to take a
4418 configuration file name as argument
4420 * doc/config-file.txt (Elements): add <servicedir>
4422 * bus/system.conf, bus/session.conf: new files
4424 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4425 well-known socket if none set
4427 * configure.in: create system.conf and session.conf
4429 2003-03-30 Havoc Pennington <hp@pobox.com>
4431 * bus/config-parser.c: hacking
4433 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4434 to shut down, since it could cause weirdness with the DBusList
4437 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4438 link-oriented stack routines
4439 (alloc_link): free the mempool if the first alloc from it fails
4441 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4443 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4445 (_dbus_string_skip_white): new
4447 * doc/config-file.txt (Elements): add <includedir>
4449 2003-03-28 Havoc Pennington <hp@pobox.com>
4451 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4452 (_dbus_string_copy_data): new functions
4454 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4456 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4460 * dbus/dbus-memory.c:
4463 2003-03-28 Havoc Pennington <hp@pobox.com>
4465 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4466 I think it may have just been superstition. Not sure.
4468 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4469 failures that were not being handled.
4471 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4473 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4474 row that will fail on out-of-memory.
4476 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4477 function for testing out-of-memory handling.
4479 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4480 allocation functions, they do map exactly to the expat ones.
4482 2003-03-27 Havoc Pennington <hp@redhat.com>
4484 * bus/config-loader-libxml.c (bus_config_load): add another error
4487 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4490 Add note about automatic service activation.
4492 * doc/dbus-specification.sgml:
4493 Rename the specification and clarify a few things.
4495 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4498 * dbus/dbus-address.c:
4500 * dbus/dbus-marshal.c:
4501 * dbus/dbus-server-debug-pipe.c:
4502 * dbus/dbus-transport-unix.c:
4503 Fix documentation warnings.
4505 2003-03-26 Havoc Pennington <hp@pobox.com>
4507 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4508 after every test so it's quick and easy to see which leaked, and
4509 so we test multiple dbus_shutdown() calls
4511 * configure.in: change configure.in XML stuff to also support
4514 * config-loader-libxml.c: some hacking
4516 * config-loader-expat.c: some hacking
4518 * config-parser.c: some hacking, plus tests
4520 2003-03-25 Havoc Pennington <hp@redhat.com>
4522 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4524 * configure.in: add --with-xml option to specify XML library,
4525 right now only libxml is supported.
4527 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4528 nonworking code between home and work, still just stubs
4530 2003-03-24 Havoc Pennington <hp@redhat.com>
4532 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4535 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4536 NULL argument for "message" if the error is a well-known one,
4537 fill in a generic message in this case.
4539 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4542 * bus/test.c (bus_test_flush_bus): add
4544 * bus/policy.c (bus_policy_test): test code stub
4546 2003-03-24 Havoc Pennington <hp@pobox.com>
4548 * bus/connection.c (bus_connections_setup_connection): set up
4549 the "can this user connect" function, but it always returns
4550 TRUE until we have a config file parser so we can have a config
4551 file that allows connections.
4553 2003-03-23 Havoc Pennington <hp@pobox.com>
4555 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4556 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4557 the mutex, so we can check for proper memory management
4560 * dbus/dbus-dataslot.c: remove the mutex from
4561 DBusDataSlotAllocator and lock it manually when using it,
4562 to simplify fitting it into the global slots framework.
4564 * dbus/dbus-threads.c (init_static_locks): rework how we're
4565 handling global locks so they are easily shut down.
4567 * bus/policy.c (bus_policy_append_rule): fix
4569 * bus/test-main.c (main): check for memleaks
4571 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4572 test suite check for memleaks
4574 * dbus/dbus-memory.c: add support in test mode for tracking
4575 number of outstanding blocks
4577 2003-03-23 Havoc Pennington <hp@pobox.com>
4579 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4582 * dbus/dbus-hash.h: add ULONG hash keys
4584 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4585 (_dbus_get_group_id): new function
4587 2003-03-20 Havoc Pennington <hp@redhat.com>
4589 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4591 (dbus_connection_get_unix_user): new function
4593 2003-03-20 Havoc Pennington <hp@pobox.com>
4595 * bus/connection.c (bus_connection_send_oom_error): assert that
4596 message has a sender
4597 (connection_execute_transaction): ditto
4598 (bus_connection_preallocate_oom_error): fix to set the sender, and
4599 set recipient to the destination service, not the bus driver
4601 * bus/policy.c: hacking
4603 * dbus/dbus-message.c (dbus_message_service_is): new function
4604 (dbus_message_sender_is): new
4606 2003-03-19 Havoc Pennington <hp@redhat.com>
4608 * bus/policy.c: start sketching code for policy restrictions on
4609 what connections can do.
4611 2003-03-18 Havoc Pennington <hp@redhat.com>
4613 * doc/TODO: some notes on high-level todo items. Little nitpick
4614 stuff is all in @todo, so no need to add it here.
4616 * doc/config-file.txt: some notes on how config file might look
4618 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4624 2003-03-17 Havoc Pennington <hp@redhat.com>
4626 * dbus/dbus-internals.h: add gcc attributes so that
4627 our printf-style functions warn on bad arguments to
4630 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4633 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4636 2003-03-17 Havoc Pennington <hp@redhat.com>
4638 * bus/test-main.c (main): make it print something as it runs
4639 so make check doesn't look stuck
4641 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4642 from CVS, now obsolete
4644 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4646 * bus/dispatch.c: (bus_dispatch):
4647 Refetch the service name since it may have been reallocated
4648 when dbus_message_set_sender was called.
4650 * dbus/dbus-sysdeps.c: (_dbus_accept):
4651 Add address and address length variables and use them to stop
4652 valgrind from complaining.
4654 2003-03-17 Havoc Pennington <hp@pobox.com>
4656 All tests pass, no memleaks, no valgrind complaints.
4658 * bus/test.c: refcount handler_slot
4660 * bus/connection.c (bus_connections_new): refcount
4661 connection_data_slot
4663 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4664 bytes so that auth scripts pass.
4666 * bus/dispatch.c: init message_handler_slot so it gets allocated
4669 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4671 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4672 dealloc server_pipe_hash when no longer used for benefit of
4675 * dbus/dbus-auth.c (process_command): memleak fix
4677 * bus/dispatch.c (check_hello_message): memleak fix
4679 2003-03-16 Havoc Pennington <hp@pobox.com>
4681 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4683 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4685 * bus/activation.c (bus_activation_activate_service): Append
4686 the pending activation entry to the list of pending activations.
4688 2003-03-16 Havoc Pennington <hp@pobox.com>
4690 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4693 * dbus/dbus-address.c (create_entry): fix OOM handling when
4694 failing to alloc entry->method
4696 2003-03-16 Havoc Pennington <hp@pobox.com>
4698 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4701 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4702 add some missing dbus_set_result
4704 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4705 alloc the DBusMessageHandler
4707 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4708 the transport here, since we call this from the finalizer; it
4709 resulted in a double-finalize.
4711 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4712 where we tried to use transport->connection that was NULL,
4713 happened when transport was disconnected early on due to OOM
4715 * bus/*.c: adapt to handle OOM for watches/timeouts
4717 * dbus/dbus-transport-unix.c: port to handle OOM during
4720 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4721 reference to unused bytes instead of a copy
4723 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4726 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4729 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4732 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4734 * doc/dbus-specification.sgml:
4735 Document reply message for ActivateService.
4737 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4739 * bus/activation.c: (bus_pending_activation_entry_free),
4740 (bus_pending_activation_free), (bus_activation_new),
4741 (bus_activation_unref), (bus_activation_service_created),
4742 (bus_activation_activate_service):
4744 * bus/bus.c: (bus_context_new):
4745 * bus/desktop-file.c: (new_section):
4746 * bus/driver.c: (bus_driver_send_service_deleted),
4747 (bus_driver_handle_activate_service):
4748 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4750 * dbus/dbus-connection.c:
4751 (dbus_connection_send_with_reply_and_block):
4752 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4753 * dbus/dbus-protocol.h:
4754 Make activation work better. Now pending activations will be queued
4755 and the daemon won't try to activate services that are already registered.
4757 2003-03-16 Havoc Pennington <hp@pobox.com>
4759 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4762 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4763 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4765 2003-03-16 Havoc Pennington <hp@pobox.com>
4767 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4768 this. always run the test suite before commit...
4770 * bus/*: adapt to DBusConnection API changes
4772 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4773 requires renaming stuff to avoid dbus_connection_dispatch name
4776 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4779 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4780 separate from _dbus_message_loader_return_buffer()
4782 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4783 this, because it's now always broken to use; the number of
4784 messages in queue vs. the number still buffered by the message
4785 loader is undefined/meaningless. Should use
4786 dbus_connection_get_dispatch_state().
4787 (dbus_connection_dispatch): rename from
4788 dbus_connection_dispatch_message
4790 2003-03-16 Havoc Pennington <hp@pobox.com>
4792 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4795 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4797 * dbus/dbus-connection.c:
4798 (dbus_connection_send_with_reply_and_block):
4799 Decrease connection->n_incoming when removing an entry
4801 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4802 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4803 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4804 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4805 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4806 (dbus_dict_get_byte_array):
4807 Handle NULL arrays and strings. Also add support for byte arrays.
4809 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4810 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4811 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4812 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4813 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4814 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4815 * dbus/dbus-marshal.h:
4816 Add support for marshalling and demarshalling empty arrays and strings.
4818 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4819 (dbus_message_append_string_array),
4820 (dbus_message_iter_get_boolean),
4821 (dbus_message_iter_get_boolean_array),
4822 (dbus_message_iter_get_int32_array),
4823 (dbus_message_iter_get_uint32_array),
4824 (dbus_message_iter_get_double_array),
4825 (dbus_message_iter_get_byte_array),
4826 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4827 (check_message_handling):
4828 Add support for getting empty arrays and dicts.
4830 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4831 Don't do any validation at all for now, that's better than just checking
4834 * test/data/valid-messages/emptiness.message:
4835 New test message with lots of empty arrays.
4837 2003-03-16 Havoc Pennington <hp@pobox.com>
4839 * dbus/dbus-connection.c
4840 (_dbus_connection_queue_received_message_link): new function that
4841 can't fail due to OOM
4843 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4844 new function pops a message together with a list link
4847 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4848 message queuing functions to avoid needing to alloc memory
4850 2003-03-16 Havoc Pennington <hp@pobox.com>
4852 Oops - test code was only testing failure of around 30 of the
4853 mallocs in the test path, but it turns out there are 500+
4854 mallocs. I believe this was due to misguided linking setup such
4855 that there was one copy of dbus_malloc etc. in the daemon and one
4856 in the shared lib, and only daemon mallocs were tested. In any
4857 case, the test case now tests all 500+ mallocs, and doesn't pass
4858 yet, though there are lots of fixes in this patch.
4860 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4861 this so that it doesn't need to allocate memory, since it
4862 has no way of indicating failure due to OOM (and would be
4863 annoying if it did).
4865 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4867 * bus/Makefile.am: rearrange to create two self-contained
4868 libraries, to avoid having libraries with overlapping symbols.
4869 that was resulting in weirdness, e.g. I'm pretty sure there
4870 were two copies of global static variables.
4872 * dbus/dbus-internals.c: move the malloc debug stuff to
4875 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4878 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4880 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4883 * bus/dispatch.c (bus_dispatch_add_connection): free
4884 message_handler_slot when no longer using it, so
4885 memory leak checkers are happy for the test suite.
4887 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4889 * bus/bus.c (new_connection_callback): disconnect in here if
4890 bus_connections_setup_connection fails.
4892 * bus/connection.c (bus_connections_unref): fix to free the
4894 (bus_connections_setup_connection): if this fails, don't
4895 disconnect the connection, just be sure there are no side
4898 * dbus/dbus-string.c (undo_alignment): unbreak this
4900 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4902 (_dbus_auth_new): fix the order in which we free strings
4905 * bus/connection.c (bus_connection_disconnected): fix to
4906 not send ServiceDeleted multiple times in case of memory
4909 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4910 get the base service name
4911 (dbus_bus_register_client): don't return base service name,
4912 instead store it on the DBusConnection and have an accessor
4914 (dbus_bus_register_client): rename dbus_bus_register()
4916 * bus/dispatch.c (check_hello_message): verify that other
4917 connections on the bus also got the correct results, not
4918 just the one sending hello
4920 2003-03-15 Havoc Pennington <hp@pobox.com>
4922 Make it pass the Hello handling test including all OOM codepaths.
4923 Now to do other messages...
4925 * bus/services.c (bus_service_remove_owner): fix crash when
4926 removing owner from an empty list of owners
4927 (bus_registry_ensure): don't leave service in the list of
4928 a connection's owned services if we fail to put the service
4931 * bus/connection.c (bus_connection_preallocate_oom_error): set
4932 error flag on the OOM error.
4934 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4935 handle _dbus_transport_set_connection failure
4937 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4938 to create watches up front and simply enable/disable them as
4940 (unix_connection_set): this can now fail on OOM
4942 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4943 of enabling/disabling a watch or timeout.
4945 * bus/loop.c (bus_loop_iterate): don't touch disabled
4948 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4950 2003-03-15 Havoc Pennington <hp@pobox.com>
4952 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4953 write useful test code, after all that futzing around ;-)
4955 Test does not yet pass because we can't handle OOM in
4956 _dbus_transport_messages_pending (basically,
4957 dbus_connection_preallocate_send() does not prealloc the write
4958 watch). To fix this, I think we need to add new stuff to
4959 set_watch_functions, namely a SetEnabled function so we can alloc
4960 the watch earlier, then enable it later.
4962 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4963 dbus-memory.c to the convenience lib
4965 * bus/test.c: rename some static functions to keep them clearly
4966 distinct from stuff in connection.c. Handle client disconnection.
4968 2003-03-14 Havoc Pennington <hp@pobox.com>
4970 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4971 transport, tests more of the real codepath. Set up clients
4972 with bus_setup_debug_client.
4974 * bus/test.c (bus_setup_debug_client): function to set up debug
4975 "clients" on the main loop
4977 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4980 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4983 * dbus/dbus-server-debug.c: support a debug server based on pipes
4985 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4986 (_dbus_close): new function
4988 * configure.in: check for socketpair
4990 2003-03-14 Havoc Pennington <hp@redhat.com>
4992 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4995 * dbus/dbus-transport-debug.c: rework this a good bit to be
4996 less complicated. hopefully still works.
4998 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5001 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5004 * dbus/dbus-message.c (dbus_message_copy): rename from
5005 dbus_message_new_from_message, fix it up to copy
5006 all the message fields, add test case
5008 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5009 not quite passing yet
5011 2003-03-14 Havoc Pennington <hp@pobox.com>
5013 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5014 until no work remains" in test code. (the large diff here
5015 is just code movement, no actual changes)
5017 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5018 1, no point waiting around for test code.
5019 (_dbus_server_debug_accept_transport): unref the timeout
5020 after adding it (right?)
5022 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5024 2003-03-13 Havoc Pennington <hp@redhat.com>
5026 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5029 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5032 * dbus/dbus-connection.h: Make AddWatchFunction and
5033 AddTimeoutFunction return a bool so they can fail on out-of-memory
5035 * bus/bus.c (bus_context_new): set up timeout handlers
5037 * bus/connection.c (bus_connections_setup_connection): set up
5040 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5043 * bus/bus.c (bus_context_new): adapt to changes
5045 * bus/connection.c: adapt to changes
5047 * test/watch.c: adapt to DBusWatch changes
5049 * bus/dispatch.c (bus_dispatch_test): started adding this but
5052 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5054 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5056 2003-03-13 Havoc Pennington <hp@pobox.com>
5058 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5059 set up a test framework as for the library
5061 2003-03-12 Havoc Pennington <hp@pobox.com>
5063 Throughout: purge global variables, introduce BusActivation,
5064 BusConnections, BusRegistry, etc. objects instead.
5066 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5069 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5070 going to redo this a bit differently I think
5072 2003-03-12 Havoc Pennington <hp@redhat.com>
5074 Mega-patch that gets the message bus daemon initially handling
5075 out-of-memory. Work still needed. Also lots of random
5076 moving stuff to DBusError instead of ResultCode.
5078 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5080 * dbus/dbus-connection.c
5081 (dbus_connection_send_with_reply_and_block): use DBusError
5083 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5086 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5087 code here, as the only failure possible is OOM.
5089 * bus/connection.c (bus_connection_disconnect):
5090 rename bus_connection_disconnected as it's a notification only
5092 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5093 "name" on get_args failure, should be done by get_args;
5094 don't disconnect client for bad args, just return an error.
5095 (bus_driver_handle_service_exists): ditto
5097 * bus/services.c (bus_services_list): NULL-terminate returned array
5099 * bus/driver.c (bus_driver_send_service_lost)
5100 (bus_driver_send_service_acquired): send messages from driver to a
5101 specific client to the client's unique name, not to the broadcast
5104 * dbus/dbus-message.c (decode_header_data): reject messages that
5105 contain no name field
5106 (_dbus_message_get_client_serial): rename to
5107 dbus_message_get_serial and make public
5108 (_dbus_message_set_serial): rename from set_client_serial
5109 (_dbus_message_set_reply_serial): make public
5110 (_dbus_message_get_reply_serial): make public
5112 * bus/connection.c (bus_connection_foreach): allow stopping
5113 iteration by returning FALSE from foreach function.
5115 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5116 (dbus_connection_free_preallocated_send)
5117 (dbus_connection_preallocate_send): new API for sending a message
5118 without possibility of malloc failure.
5119 (dbus_connection_send_message): rename to just
5120 dbus_connection_send (and same for whole function family)
5122 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5124 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5126 * bus/activation.c: handle/return errors
5128 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5130 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5131 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5132 (_dbus_result_from_errno): move to this file
5134 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5136 * dbus/dbus-marshal.c:
5137 (_dbus_marshal_set_string):
5138 Take a length argument so we can marshal the correct string
5141 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5142 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5143 (_dbus_marshal_test):
5144 * dbus/dbus-marshal.h:
5145 Add support for marshalling and demarshalling dicts.
5147 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5148 Add support for TYPE DICT.
5150 * dbus/dbus-message.c: (set_string_field):
5151 Adjust header padding.
5153 (dbus_message_append_args_valist), (dbus_message_append_dict),
5154 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5155 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5156 (check_message_handling), (check_have_valid_message):
5157 * dbus/dbus-message.h:
5158 Add functions for setting and getting dicts.
5160 * dbus/dbus-protocol.h:
5166 * doc/dbus-specification.sgml:
5167 Add information about how dicts are marshalled.
5169 * test/data/invalid-messages/dict-with-nil-value.message:
5170 * test/data/invalid-messages/too-short-dict.message:
5171 * test/data/valid-messages/dict-simple.message:
5172 * test/data/valid-messages/dict.message:
5173 Add sample messages containing dicts.
5175 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5177 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5179 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5182 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5183 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5184 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5185 (dbus_dict_set_double), (dbus_dict_set_string),
5186 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5187 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5188 (dbus_dict_set_string_array), (_dbus_dict_test):
5190 Fix according to comments from Havoc.
5192 2003-03-06 Michael Meeks <michael@server.home>
5194 * configure.in: if we don't have kde-config, disable have_qt.
5196 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5201 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5202 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5203 (dbus_dict_remove), (dbus_dict_get_value_type),
5204 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5205 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5206 (dbus_dict_put_double), (dbus_dict_put_string),
5207 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5208 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5209 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5210 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5211 (dbus_dict_get_double), (dbus_dict_get_string),
5212 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5213 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5214 (dbus_dict_get_string_array), (_dbus_dict_test):
5216 Add DBusDict implementation
5218 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5222 2003-03-04 Havoc Pennington <hp@pobox.com>
5224 * test/data/auth/*: adapt to changes
5226 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5227 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5230 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5231 more stuff from being in a context name, to make the protocol
5232 simpler to deal with
5234 * dbus/dbus-errors.c (dbus_error_has_name): new function
5235 (dbus_error_is_set): new function
5237 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5238 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5240 * dbus/dbus-connection.c (dbus_connection_flush): also read
5241 messages during a flush operation
5243 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5245 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5247 * configure.in: Check for gethostbyname on Solaris.
5249 * dbus/dbus-transport.c: (_dbus_transport_open):
5250 Remove duplicate "tcp" entry.
5252 * doc/dbus-specification.sgml:
5253 Clarify some things.
5255 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5257 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5258 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5259 (_dbus_keyring_test):
5260 * dbus/dbus-md5.c: (_dbus_md5_compute):
5261 * dbus/dbus-sha.c: (_dbus_sha_compute):
5264 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5266 * README: Add some things.
5268 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5270 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5271 after case DBUS_TYPE_BOOELAN.
5273 2003-03-02 Havoc Pennington <hp@pobox.com>
5275 * test/break-loader.c (randomly_set_extreme_ints): add test that
5276 sets really huge and small integers
5278 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5279 that length of boolean array fits in the string, and that
5280 string has room for boolean value in single-bool case.
5282 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5283 optional value to "ALIGN" command which is what to fill the
5286 * test/data/valid-messages/no-padding.message: add regression
5287 test for the message padding problem
5289 2003-03-02 Havoc Pennington <hp@pobox.com>
5291 * dbus/dbus-message.c (decode_header_data): fix to always init
5292 message_padding, from Benjamin Dauvergne
5294 2003-03-02 Havoc Pennington <hp@pobox.com>
5300 2003-03-01 Joe Shaw <joe@assbarn.com>
5302 * configure.in: Check for "struct cmsgcred" and try to access its
5303 members for BSD-like unices.
5305 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5306 _dbus_read_credentials_unix_socket().
5307 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5308 read() for reading the credential byte off the unix socket. Use
5309 struct cmsgcred on systems that support it.
5311 2003-02-27 Alexander Larsson <alexl@redhat.com>
5315 Make gthreads-2.0 dependency optional. Don't build thread test if
5318 2003-02-27 Havoc Pennington <hp@pobox.com>
5320 * dbus/dbus-connection.c
5321 (dbus_connection_send_message_with_reply_and_block): fix doh!
5322 doh! doh! bug that resulted in never removing a reply from the
5323 queue, no wonder we called get_reply_serial so much ;-)
5325 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5326 and client serial instead of demarshaling them every time
5328 2003-02-27 Havoc Pennington <hp@pobox.com>
5330 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5331 more inlined, using dbus-string-private.h, speeds things up
5334 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5335 when freeing the string
5336 (_dbus_string_steal_data): fix for align offset
5337 (undo_alignment): new function
5339 2003-02-26 Havoc Pennington <hp@redhat.com>
5341 All kinds of audit fixes from Owen, plus initial attempt to
5342 handle unaligned memory returned from malloc.
5344 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5345 leave room for align_offset and nul byte
5346 (fixup_alignment): function to track an align_offset and
5347 ensure real->str is aligned
5348 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5349 to allow a nul byte plus align offset
5350 (_dbus_string_lock): fix overflow issue
5351 (_dbus_string_init_const_len): add assertions on sanity of len,
5352 assign allocated to be ALLOCATION_PADDING larger than len
5353 (set_length): fixup the overflow handling
5354 (_dbus_string_get_data_len): fix overflow in assertion
5355 (open_gap): detect overflow in size of gap to be opened
5356 (_dbus_string_lengthen): add overflow check
5357 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5358 (_dbus_string_append): add overflow check
5359 (_dbus_string_append_unichar): overflow
5360 (_dbus_string_delete): fix overflow in assertion
5361 (_dbus_string_copy_len): overflow in assertion
5362 (_dbus_string_replace_len): overflows in assertions
5363 (_dbus_string_find): change to implement in terms of
5364 _dbus_string_find_to
5365 (_dbus_string_find_to): assorted fixage
5366 (_dbus_string_equal_c_str): assert c_str != NULL,
5367 fix logic so the function works
5368 (_dbus_string_ends_with_c_str): fix overflow thingy
5369 (_dbus_string_base64_encode): overflow fix
5370 (_dbus_string_validate_ascii): overflow
5371 (_dbus_string_validate_nul): overflow
5373 2003-02-26 Havoc Pennington <hp@redhat.com>
5375 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5377 2003-02-26 Alexander Larsson <alexl@redhat.com>
5380 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5382 * dbus/dbus-connection.c:
5383 * dbus/dbus-connection.h:
5384 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5385 Add dbus_connection_set_wakeup_main_function and use it when queueing
5386 incoming and outgoing messages.
5389 * dbus/dbus-dataslot.c:
5390 Threadsafe usage of DBusDataSlotAllocator
5392 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5395 * dbus/dbus-server-unix.c:
5398 * glib/dbus-gmain.c:
5399 Implement the new wakeup functions for glib.
5402 * glib/test-thread-client.c:
5403 * glib/test-thread-server.c:
5404 * glib/test-thread.h:
5405 Initial cut at some thread test code. Not really done yet.
5407 2003-02-26 Havoc Pennington <hp@pobox.com>
5409 * dbus/dbus-connection.c
5410 (dbus_connection_send_message_with_reply_and_block): fix crash
5411 where we ref'd the outgoing message instead of the returned reply
5413 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5414 at the end of this function, so if we didn't need to read for
5415 authentication, we reinstall it for receiving messages
5417 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5418 a NULL sender for peer-to-peer case
5420 * dbus/dbus-transport-unix.c (check_read_watch): handle
5421 !authenticated case correctly
5423 * glib/dbus-gmain.c: add support for DBusServer
5425 * dbus/dbus-server.c: add data slot support
5427 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5428 return values and handle errors
5430 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5433 * Doxyfile.in (INPUT): add glib subdir
5435 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5436 setup_with_g_main instead of hookup_with_g_main; write docs
5438 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5440 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5441 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5442 * dbus/dbus-message.c: (dbus_message_append_boolean),
5443 (dbus_message_append_boolean_array),
5444 (dbus_message_get_args_valist), (_dbus_message_test):
5445 * dbus/dbus-message.h:
5446 * doc/dbus-specification.sgml:
5447 Various fixes as pointed out by Havoc.
5449 * test/data/invalid-messages/bad-boolean-array.message:
5450 * test/data/invalid-messages/bad-boolean.message:
5451 Add invalid boolean value test cases.
5453 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5455 * dbus/dbus-internals.c: (_dbus_type_to_string):
5456 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5457 (_dbus_marshal_validate_arg):
5458 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5459 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5460 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5461 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5462 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5463 (dbus_message_iter_get_double),
5464 (dbus_message_iter_get_boolean_array), (message_iter_test):
5465 * dbus/dbus-message.h:
5466 * dbus/dbus-protocol.h:
5467 * doc/dbus-specification.sgml:
5468 * test/data/valid-messages/lots-of-arguments.message:
5469 Add support for boolean and boolean array types.
5471 2003-02-23 Havoc Pennington <hp@pobox.com>
5473 * dbus/dbus-keyring.c: finish most of this implementation and
5476 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5477 these barf if the error isn't cleared to NULL
5479 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5480 (_dbus_create_directory): new function
5482 * dbus/dbus-errors.c (dbus_set_error): fix warning
5484 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5485 (_dbus_string_hex_decode): new function
5486 (test_hex_roundtrip): test code
5488 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5490 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5492 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5493 the save-to-temp/rename trick to atomically write the new file
5494 (_dbus_string_parse_uint): new function
5496 2003-02-22 Havoc Pennington <hp@pobox.com>
5498 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5500 2003-02-22 Havoc Pennington <hp@pobox.com>
5502 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5503 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5505 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5507 * dbus/test/data/sha-1: add US government test suite for SHA-1
5509 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5511 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5512 Make string arrays NULL-terminated.
5514 * dbus/dbus-memory.c: (dbus_free_string_array):
5515 * dbus/dbus-memory.h:
5516 New function for freeing NULL-terminated string arrays.
5518 * dbus/dbus-message-builder.c: (append_quoted_string),
5519 (_dbus_message_data_load):
5520 Add support for array types.
5522 * dbus/dbus-message.c: (check_message_handling):
5523 Add more types as test cases.
5525 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5526 (_dbus_string_parse_double):
5527 Add the start offset to the end offset.
5529 * test/data/valid-messages/lots-of-arguments.message:
5530 New test message with lots of arguments.
5532 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5534 * dbus/dbus-message.c: (dbus_message_append_nil),
5535 (dbus_message_append_int32), (dbus_message_append_uint32),
5536 (dbus_message_append_double), (dbus_message_append_string),
5537 (dbus_message_append_int32_array),
5538 (dbus_message_append_uint32_array),
5539 (dbus_message_append_double_array),
5540 (dbus_message_append_byte_array),
5541 (dbus_message_append_string_array):
5542 Fix all out-of-memory handling in these functions.
5544 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5546 * dbus/dbus-message.c: (dbus_message_append_nil):
5549 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5551 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5552 (dbus_message_append_nil), (dbus_message_append_int32_array),
5553 (dbus_message_append_uint32_array),
5554 (dbus_message_append_double_array),
5555 (dbus_message_append_byte_array),
5556 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5557 (dbus_message_iter_get_int32_array),
5558 (dbus_message_iter_get_uint32_array),
5559 (dbus_message_iter_get_double_array),
5560 (dbus_message_iter_get_byte_array),
5561 (dbus_message_iter_get_string_array):
5563 * dbus/dbus-message.h:
5564 Add functions for appending and getting arrays.
5566 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5568 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5569 element size at least 8 bytes, fixes mempool tests on
5572 2003-02-20 Alexander Larsson <alexl@redhat.com>
5574 * dbus/dbus-transport-unix.c (unix_do_iteration):
5575 Unlock the connection mutex during a blocking select call.
5576 Add todo about how we need a way to wake up the select.
5578 * dbus/dbus-connection-internal.h:
5579 * dbus/dbus-connection.c:
5580 Add _dbus_connection_lock and _dbus_connection_unlock.
5582 2003-02-19 Havoc Pennington <hp@pobox.com>
5584 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5585 Doxyfile.in, not Doxyfile
5587 * dbus/dbus-keyring.c: do some hacking on this
5589 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5591 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5593 (dbus_set_error): remove dbus_error_init, check for message ==
5594 NULL *before* we sprintf into it, and add @todo about including
5595 system headers in this file
5597 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5599 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5601 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5602 get various bits of user information based on either username
5604 (_dbus_homedir_from_username): new function
5606 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5609 Add check for nonposix getpwnam_r
5611 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5612 Align the pool element size to a sizeof (void *) boundary.
5614 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5615 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5616 General Solaris fixes.
5618 * test/data/valid-messages/simplest-manual.message:
5619 Explicitly state that we want little-endian packing.
5621 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5623 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5625 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5626 Added to create a transport connecting using a tcp/ip socket.
5628 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5629 to a tcp socket at given host and port.
5630 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5633 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5635 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5636 Added to create a server listening on a TCP/IP socket.
5638 2003-02-19 Havoc Pennington <hp@pobox.com>
5640 Throughout: mop up all the Doxygen warnings and undocumented
5643 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5644 to search any paths.
5646 * dbus/dbus-threads.c: move global mutex initializers to
5647 dbus-internals.h, multiple prototypes was confusing doxygen
5648 besides being kind of ugly
5650 * Doxyfile (PREDEFINED): have Doxygen define
5651 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5652 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5653 (do not abuse the feature! it's for stuff like the autogenerated
5654 macros in dbus-md5.c, not just for things you don't feel like
5657 2003-02-18 Havoc Pennington <hp@pobox.com>
5659 * dbus/dbus-string.c (_dbus_string_zero): new function
5661 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5662 wrap it in some dbus-friendly API
5664 * dbus/dbus-types.h: add 16-bit types
5666 2003-02-18 Joe Shaw <joe@assbarn.com>
5668 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5669 credentials from our currently running process.
5670 (get_word): Fix a buglet where we were copying the entire length
5671 instead of relative to our position.
5673 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5674 keys on the stack... it's 640k of data.
5676 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5677 read the credentials byte off the socket, even if we don't have
5679 (_dbus_poll): Implement poll() using select() for systems which
5682 * glib/test-dbus-glib.c (main): Print out an error if no
5683 parameters are given.
5685 * test/data/auth/fallback.auth-script: Added. Tests that a client
5686 can fallback to a secondary auth mechanism if the first fails.
5688 2003-02-18 Havoc Pennington <hp@pobox.com>
5692 2003-02-17 Havoc Pennington <hp@pobox.com>
5694 * doc/dbus-specification.sgml: lots of cosmetic
5695 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5696 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5697 s/server/bus/ (except in authentication section). Add a section
5698 "Message Bus Message Routing"
5700 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5706 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5708 * doc/dbus-specification.sgml:
5709 Specification updates.
5711 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5713 * bus/activation.c: (bus_activation_init), (child_setup),
5714 (bus_activation_activate_service):
5716 * bus/main.c: (main):
5717 Set DBUS_ADDRESS environment variable.
5719 * dbus/dbus-errors.c: (dbus_set_error):
5720 Don't use va_copy since that's a C99 feature.
5722 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5723 (_dbus_spawn_async):
5724 * dbus/dbus-sysdeps.h:
5725 Add child_setup_func to _dbus_spawn_async.
5727 * doc/dbus-specification.sgml:
5728 Update specification.
5730 * test/spawn-test.c: (setup_func), (main):
5733 2003-02-17 Alexander Larsson <alexl@redhat.com>
5735 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5738 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5742 * doc/dbus-test-plan.sgml:
5743 Add test plan document.
5748 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5750 * dbus/dbus-message.c: (decode_header_data),
5751 (_dbus_message_loader_return_buffer):
5752 Set the header padding amount when loading a message.
5754 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5756 * bus/dispatch.c: (send_one_message):
5757 Only send broadcast messages to registered connections.
5759 * dbus/dbus-message.c: (dbus_message_name_is):
5760 * dbus/dbus-message.h:
5761 New convenience function.
5763 * dbus/dbus-transport-debug.c: (do_reading):
5764 Only dispatch one message per run.
5767 * test/bus-test.c: (new_connection_callback), (die),
5768 (test_hello_client1_handler), (test_hello_client2_handler),
5769 (test_hello_replies), (main):
5771 * test/bus-test-loop.[ch]:
5774 2003-02-16 Havoc Pennington <hp@pobox.com>
5776 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5777 backward conditional
5779 2003-02-16 Alexander Larsson <alexl@redhat.com>
5781 * dbus/dbus-connection.c:
5782 Implement sent_message_with_reply. (with_reply_and block is still
5784 Made dispatch_message not lose message if OOM.
5786 * dbus/dbus-errors.h:
5787 Add NoReply error (for reply timeouts).
5789 2003-02-16 Alexander Larsson <alexl@redhat.com>
5791 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5792 Actually free keys and values when destroying hashtable.
5794 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5796 * dbus/dbus-auth.c: (client_try_next_mechanism):
5799 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5800 Return TRUE if there's no thread implementation around.
5802 * glib/dbus-gmain.c: (free_source),
5803 (dbus_connection_hookup_with_g_main):
5804 Make sure to remove the GSource when the connection is finalized.
5806 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5808 * bus/dispatch.c: (bus_dispatch_message_handler):
5809 * dbus/dbus-errors.h:
5810 Return an error if someone tries to send a message to a service
5813 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5815 * bus/activation.c: (load_directory), (bus_activation_init),
5816 (bus_activation_activate_service):
5819 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5820 More work on the activation handling.
5822 * dbus/dbus-errors.h:
5823 Add some error messages
5825 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5826 * dbus/dbus-message.h:
5827 New function that creates an error message.
5829 * dbus/dbus-protocol.h:
5830 Add ACTIVATE_SERVER message.
5832 * dbus/dbus-server-unix.c: (unix_handle_watch),
5833 (_dbus_server_new_for_domain_socket):
5834 Call _dbus_fd_set_close_on_exec.
5836 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5837 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5838 (_dbus_fd_set_close_on_exec):
5839 * dbus/dbus-sysdeps.h:
5840 Add _dbus_fd_set_close_on exec function. Also add function that checks
5841 that all open fds are set to close-on-exec and warns otherwise.
5843 * dbus/dbus-transport-unix.c:
5844 (_dbus_transport_new_for_domain_socket):
5845 Call _dbus_fd_set_close_on_exec.
5847 2003-02-16 Havoc Pennington <hp@pobox.com>
5849 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5850 allow people to avoid setting SIGPIPE to SIG_IGN
5851 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5852 we've been asked not to
5854 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5856 * dbus/dbus-list.c: (_dbus_list_append_link),
5857 (_dbus_list_prepend_link):
5858 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5862 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5865 * bus/activation.c: (bus_activation_entry_free),
5866 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5868 * bus/main.c: (main):
5869 Add simple activation support, doesn't work yet though.
5871 2003-02-15 Zack Rusin <zack@kde.org>
5873 * qt/dbus-qthread.cpp: small casting fix
5875 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5877 * dbus/dbus-errors.c: (dbus_set_error):
5878 * dbus/dbus-errors.h:
5879 Add a few errors and make dbus_set_error void.
5881 * dbus/dbus-sysdeps.c:
5882 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5883 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5884 * dbus/dbus-sysdeps.h:
5885 Add _dbus_spawn_async.
5887 * test/spawn-test.c: (main):
5888 Test for _dbus_spawn_async.
5890 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5892 * dbus/dbus-internals.h:
5893 Fix build without tests.
5895 * dbus/dbus-list.c: (alloc_link):
5896 Fix a segfault when a malloc fails.
5898 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5899 (dbus_malloc0), (dbus_realloc):
5900 Add support for malloc debugging.
5902 2003-02-15 Alexander Larsson <alexl@redhat.com>
5904 * dbus/dbus-threads.c:
5905 * dbus/dbus-threads.h:
5906 Add condvars. Remove static mutext from API.
5907 Implement static mutexes by initializing them from threads_init.
5909 * glib/dbus-gthread.c:
5910 * qt/dbus-qthread.cpp:
5911 Update with the thread api changes.
5916 Turn StaticMutex into normal mutex + init function.
5917 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5918 _dbus_list_append_link, _dbus_list_prepend_link
5921 * dbus/dbus-sysdeps.c:
5922 * dbus/dbus-sysdeps.h:
5923 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5924 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5926 * dbus/dbus-protocol.h:
5927 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5929 * dbus/dbus-message.c:
5930 Make ref/unref atomic.
5933 * dbus/dbus-connection-internal.h:
5934 * dbus/dbus-connection.c:
5935 * dbus/dbus-connection.h:
5937 Change _peek to _borrow,_return & _steal_borrowed.
5938 Change disconnect callback to event.
5939 Make dbus_connection_dispatch_messages reentrant.
5941 * dbus/dbus-transport.c:
5942 Don't ref the connection on calls to the transport
5945 * dbus/dbus-message-handler.c:
5948 * glib/dbus-gmain.c:
5949 Don't use peek_message anymore
5952 * test/debug-thread.c:
5953 * test/debug-thread.h:
5954 Simple thread implementation that asserts() on deadlocks in
5955 single-threaded code.
5958 (main) Call debug_threads_init.
5961 Use disconnect message instead of disconnect callback.
5965 Don't call dbus_connection_set_disconnect_function. Instead export
5966 bus_connection_disconnect.
5969 Call bus_connection_disconnect when we get a disconnected message.
5971 2003-02-15 Havoc Pennington <hp@pobox.com>
5973 * dbus/dbus-message.c (dbus_message_new): fool around with the
5976 2003-02-14 Havoc Pennington <hp@pobox.com>
5978 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5980 * dbus/dbus-memory.c: fail if the debug functions indicate we
5983 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5984 (_dbus_decrement_fail_alloc_counter): debug functions to
5985 simulate memory allocation failures
5987 2003-02-14 Havoc Pennington <hp@pobox.com>
5989 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5992 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5994 * bus/driver.c: (bus_driver_handle_hello):
5996 * bus/services.c: (bus_service_lookup):
5997 Reorder message sending so we get a more sane order.
5999 * test/bus-test.c: (message_handler):
6002 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6004 * bus/driver.c: (bus_driver_send_service_deleted),
6005 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6006 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6007 (bus_driver_send_welcome_message),
6008 (bus_driver_handle_list_services),
6009 (bus_driver_handle_acquire_service),
6010 (bus_driver_handle_service_exists):
6011 * dbus/dbus-bus.c: (dbus_bus_register_client),
6012 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6013 * dbus/dbus-errors.c: (dbus_result_to_string):
6014 * dbus/dbus-errors.h:
6015 * dbus/dbus-message.c: (dbus_message_append_args),
6016 (dbus_message_append_args_valist), (dbus_message_get_args),
6017 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6018 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6019 (dbus_message_iter_get_byte_array),
6020 (dbus_message_iter_get_string_array), (message_iter_test),
6021 (check_message_handling), (_dbus_message_test):
6022 * dbus/dbus-message.h:
6023 * test/bus-test.c: (main):
6024 Change fields to arguments in messages, so that they won't be
6025 confused with header fields.
6027 * glib/test-dbus-glib.c: (main):
6028 Remove append_fields from hello message.
6030 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6032 * dbus/dbus-errors.c:
6033 * dbus/dbus-message.c:
6034 * dbus/dbus-string.c:
6035 Documentation fixes.
6037 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6039 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6041 Implement support for timeouts in dbus-glib.
6043 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6045 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6046 * dbus/dbus-message.c: (process_test_subdir):
6047 * test/break-loader.c: (find_breaks_based_on):
6048 Plug some memory leaks.
6050 2003-02-13 Richard Hult <rhult@codefactory.se>
6052 * bus/main.c: Fix build.
6054 * dbus/dbus-errors.h:
6055 * dbus/dbus-errors.c: Fix copyright for Anders.
6057 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6062 * bus/connection.c: (bus_connection_foreach):
6065 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6066 (unescape_string), (new_section), (parse_section_start),
6067 (parse_key_value), (report_error), (bus_desktop_file_load),
6068 (bus_desktop_file_get_string):
6069 * bus/desktop-file.h:
6070 Use DBusError for error reporting.
6072 * bus/dispatch.c: (send_one_message),
6073 (bus_dispatch_message_handler):
6074 * bus/driver.c: (bus_driver_send_service_deleted),
6075 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6076 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6077 (bus_driver_send_welcome_message),
6078 (bus_driver_handle_list_services),
6079 (bus_driver_handle_acquire_service),
6080 (bus_driver_handle_service_exists):
6081 * bus/loop.c: (bus_loop_run):
6083 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6085 * bus/utils.c: (bus_wait_for_memory):
6087 New files with general utility functions.
6089 * dbus/dbus-internals.h:
6090 Remove _DBUS_HANDLE_OOM.
6092 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6094 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6095 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6096 * dbus/dbus-errors.h:
6097 Add DBusError structure.
6099 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6101 * test/data/valid-messages/standard-acquire-service.message:
6102 * test/data/valid-messages/standard-hello.message:
6103 * test/data/valid-messages/standard-list-services.message:
6104 * test/data/valid-messages/standard-service-exists.message:
6105 Add some standard messages.
6107 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6109 * bus/driver.c: (bus_driver_send_welcome_message),
6110 (bus_driver_handle_list_services),
6111 (bus_driver_handle_acquire_service),
6112 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6113 Update for API changes in libdbus.
6115 * dbus/dbus-message.c: (dbus_message_new_reply):
6116 * dbus/dbus-message.h:
6117 Remove the name argument. The spec states that replies shouldn't
6120 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6122 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6123 (report_error), (bus_desktop_file_load), (lookup_section),
6124 (lookup_line), (bus_desktop_file_get_raw),
6125 (bus_desktop_file_get_string):
6126 * bus/desktop-file.h:
6127 Some fixes, and new functions for getting a key value from a section.
6129 2003-02-13 Havoc Pennington <hp@pobox.com>
6131 * test/data/auth/fail-after-n-attempts.auth-script: new test
6133 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6136 2003-02-13 Havoc Pennington <hp@pobox.com>
6138 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6139 dbus_credentials_match were backward
6141 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6142 NO_CREDENTIALS and ROOT_CREDENTIALS
6144 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6145 into here. Never process more commands after we've reached an
6146 end state; store further data as unused bytes.
6148 * test/data/auth/*: add more auth tests
6150 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6151 command to match exact string and EXPECT_UNUSED to match unused
6154 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6156 2003-02-12 Havoc Pennington <hp@pobox.com>
6158 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6159 \r off of popped lines
6161 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6164 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6167 2003-02-12 Havoc Pennington <hp@pobox.com>
6169 * dbus/Makefile.am: remove break-loader from the build, since it
6172 * configure.in: add --enable-gcov to turn on coverage profiling
6173 flags and disable optimization
6175 2003-02-10 Havoc Pennington <hp@pobox.com>
6177 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6178 initial cut at test framework for DBusAuth from laptop.
6179 Doesn't quite work yet but it compiles and I need to get
6180 it off the 266mhz laptop. ;-)
6182 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6183 fix a memleak in error case
6185 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6188 * bus/desktop-file.c:
6189 * bus/desktop-file.h:
6190 Add a desktop file parser.
6192 2003-02-11 Zack Rusin <zack@kde.org>
6194 * qt/message.[h|cpp]: sample implementation
6195 of the KDE wrapper for DBusMessage
6197 2003-02-09 Zack Rusin <zack@kde.org>
6199 * test/bus-test.c: make_it_compile
6200 * doc/dbus-specification.sgml: minimal semantic fix
6202 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6208 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6211 * dbus/dbus-break-loader.c:
6213 * test/break-loader.c:
6214 Move dbus-break-loader to test/ and rename it to break-loader.
6216 2003-02-02 Havoc Pennington <hp@pobox.com>
6218 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6219 for code to manage cookies in your home directory
6221 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6223 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6224 to authenticate, then disconnect the client.
6226 2003-02-03 Alexander Larsson <alexl@redhat.com>
6228 * dbus/dbus-message.c (dbus_message_append_fields):
6231 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6233 * doc/dbus-specification.sgml:
6234 Update address format section.
6236 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6239 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6240 (message_handler), (new_connection_callback), (loop_quit),
6244 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6246 * bus/driver.c: (bus_driver_handle_service_exists):
6247 Simplify the code a bit.
6249 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6252 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6255 Add libdbus-daemon.la and link to it.
6257 2003-02-01 James Willcox <jwillcox@gnome.org>
6259 * bus/driver.c: (bus_driver_handle_own_service):
6260 Actually include the service reply code in the message.
6262 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6264 * bus/driver.c: (bus_driver_handle_service_exists):
6265 Don't unref the incoming message.
6267 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6269 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6271 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6273 * dbus/dbus-server.c: (dbus_server_listen):
6274 * dbus/dbus-transport.c: (_dbus_transport_open):
6275 ifdef out the calls to the debug transport and server.
6277 2003-02-02 Alexander Larsson <alexl@redhat.com>
6279 * dbus/dbus-watch.c (dbus_watch_get_flags):
6280 Add note in the docs that ERROR or HANGUP won't be returned
6281 and are assumed always on.
6283 * glib/dbus-gmain.c (add_watch):
6284 Always add IO_ERR | IO_HUP
6286 * dbus/dbus-message.h:
6287 Add semicolon after dbus_message_iter_get_string_array().
6288 Makes qt code build again
6290 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6292 * bus/driver.c: (create_unique_client_name),
6293 (bus_driver_handle_hello):
6294 Don't take a name, just use a numeric id to identify
6298 * dbus/dbus-bus.c: (dbus_bus_register_client),
6299 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6301 Add new convenience functions for communicating with the bus.
6303 * dbus/dbus-message.h:
6305 * dbus/dbus-protocol.h:
6308 2003-02-01 Alexander Larsson <alexl@redhat.com>
6310 * dbus/dbus-message.c (dbus_message_append_fields):
6311 Add some more doc comments.
6313 2003-02-01 Havoc Pennington <hp@pobox.com>
6315 * dbus/dbus-break-loader.c (randomly_modify_length): change
6316 a 4-byte value in the message as if it were a length
6318 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6319 execute bit on saved files
6321 2003-02-01 Havoc Pennington <hp@pobox.com>
6323 * dbus/dbus-break-loader.c (main): new program to find messages
6324 that break the loader.
6326 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6327 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6329 * dbus/dbus-string.c (_dbus_string_set_byte): new
6331 2003-01-31 Havoc Pennington <hp@pobox.com>
6333 * dbus/dbus-message.c: refactor the test code to be more general,
6334 in preparation for writing a "randomly permute test cases to
6335 try to break the loader" program.
6337 2003-01-31 Havoc Pennington <hp@pobox.com>
6339 * doc/dbus-specification.sgml: work on the specification
6341 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6342 the protocol version of the message.
6344 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6345 no longer specifies that.
6346 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6349 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6350 "break" for DBUS_TYPE_NIL, remove @todo
6352 2003-01-31 Havoc Pennington <hp@pobox.com>
6354 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6355 just set_is_error/get_is_error as this is a commonly-used
6356 function, and write docs.
6358 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6360 * dbus/dbus-address.c: (dbus_address_entry_free):
6361 Free key and value lists.
6363 * dbus/dbus-internals.c: (_dbus_type_to_string):
6364 Add the types we didn't have.
6366 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6367 (_dbus_marshal_validate_arg):
6370 * dbus/dbus-message.c: (dbus_message_set_sender):
6371 Remove todo about being able to set sender to NULL.
6373 (dbus_message_set_is_error_reply),
6374 (dbus_message_get_is_error_reply):
6375 * dbus/dbus-message.h:
6378 * dbus/dbus-protocol.h:
6379 Add error reply flag.
6381 * test/data/valid-messages/opposite-endian.message:
6382 Add NIL type to test.
6384 2003-01-31 Havoc Pennington <hp@pobox.com>
6386 * doc/dbus-specification.sgml: fully specify the header. Add
6387 flags and major protocol version, and change header/body len to
6390 * dbus/dbus-message-builder.c (append_saved_length): append length
6393 * dbus/dbus-message.c (dbus_message_create_header): change header
6394 length and body length to unsigned. Add the new fields from the
6396 (_dbus_message_loader_return_buffer): unsigned header/body len
6398 2003-01-30 Havoc Pennington <hp@pobox.com>
6400 * dbus/dbus-auth.c: rework to use only REJECTED, no
6403 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6404 use REJECTED, suggested by Mark McLoughlin
6406 2003-01-30 Havoc Pennington <hp@pobox.com>
6408 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6409 a better way to report errors here. e.g. "unix address lacks
6410 path" or something. also "no such file" when the path doesn't
6413 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6415 (dbus_parse_address): add @todo about documenting address format,
6416 and allowing , and ; to be escaped
6418 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6421 Add dbus-address.[ch]
6423 * dbus/dbus-address.c: (dbus_address_entry_free),
6424 (dbus_address_entries_free), (create_entry),
6425 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6426 (dbus_parse_address), (_dbus_address_test):
6427 * dbus/dbus-address.h:
6428 New files for dealing with address parsing.
6430 * dbus/dbus-connection.c:
6431 Document timeout functions.
6433 * dbus/dbus-message.c:
6434 Document dbus_message_new_from_message.
6436 * dbus/dbus-server-debug.c:
6439 * dbus/dbus-server.c: (dbus_server_listen):
6440 Parse address and use correct server implementation.
6442 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6443 * dbus/dbus-string.h:
6444 New function with test.
6446 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6450 * dbus/dbus-transport-debug.c:
6453 * dbus/dbus-transport.c: (_dbus_transport_open):
6454 Parse address and use correct transport implementation.
6456 2003-01-30 Havoc Pennington <hp@pobox.com>
6458 * dbus/dbus-message.c: use message->byte_order instead of
6459 DBUS_COMPILER_BYTE_ORDER throughout.
6460 (dbus_message_create_header): pad header to align the
6461 start of the body of the message to 8-byte boundary
6463 * dbus/dbus-marshal.h: make all the demarshalers take const
6464 DBusString arguments.
6466 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6467 validate message args here, so we don't have to do slow validation
6468 later, and so we catch bad messages as they are incoming. Also add
6469 better checks on header_len and body_len. Also fill in
6472 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6473 implemented properly)
6474 (_dbus_string_validate_nul): new function to check all-nul
6476 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6477 get_arg_end_pos and remove all validation
6478 (_dbus_marshal_validate_arg): actually do validation here.
6480 2003-01-29 Havoc Pennington <hp@pobox.com>
6482 * dbus/dbus-message.c (check_message_handling): fix assertion
6483 failure on set_client_serial
6485 2003-01-28 Havoc Pennington <hp@pobox.com>
6487 * dbus/dbus-server-debug.c: Add doc section comments
6489 * dbus/dbus-transport-debug.c: add doc section comments
6491 2003-01-28 Havoc Pennington <hp@redhat.com>
6493 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6494 the reverse order from how I had it
6495 (_dbus_string_base64_encode): reverse encoding order. I was
6496 basically byteswapping everything during encoding.
6498 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6500 * dbus/dbus-connection-internal.h:
6501 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6502 (_dbus_connection_remove_timeout):
6503 Add functions for adding and removing timeouts.
6505 * dbus/dbus-message.c: (dbus_message_new_from_message):
6506 Add new function that takes a message and creates an exact
6507 copy of it, but with the refcount set to 1.
6508 (check_message_handling):
6511 * dbus/dbus-server-protected.h:
6512 * dbus/dbus-server.c: (_dbus_server_init_base),
6513 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6514 (dbus_server_set_timeout_functions):
6515 (_dbus_server_remove_timeout):
6516 New functions so that a server can add and remove timeouts.
6518 (dbus_server_listen):
6519 Add commented out call to dbus_server_debug_new.
6521 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6522 Actually set the handler, doh.
6524 * dbus/dbus-transport.c: (_dbus_transport_open):
6525 Add commented out call to dbus_transport_debug_client_new.
6528 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6530 2003-01-28 Havoc Pennington <hp@pobox.com>
6532 * dbus/dbus-message.c (check_message_handling): function to check
6533 on the loaded message, iterates over it etc.
6535 2003-01-28 Havoc Pennington <hp@pobox.com>
6537 * test/Makefile.am (dist-hook): fix make distdir
6539 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6541 2003-01-27 Havoc Pennington <hp@pobox.com>
6543 * dbus/dbus-mempool.c (time_for_size): replace printf with
6546 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6547 empty lines; fix the SAVE_LENGTH stuff to be
6548 START_LENGTH/END_LENGTH so it actually works; couple other
6551 * test/Makefile.am (dist-hook): add dist-hook for .message files
6553 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6554 can be constant or locked.
6555 (_dbus_string_free): allow freeing a const string as
6558 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6560 * dbus/dbus-test-main.c (main): take an argument which is the
6561 directory containing test data
6563 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6564 argument to this and load all the messages in test/data/
6565 checking that they can be loaded or not loaded as appropriate.
6567 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6569 * bus/dispatch.c: (bus_dispatch_message_handler):
6570 Dispatch messages sent to services.
6572 * bus/driver.c: (bus_driver_send_service_deleted),
6573 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6574 (bus_driver_send_service_acquired):
6575 Add helper functions for sending service related messages.
6577 (bus_driver_send_welcome_message):
6578 Send HELLO_REPLY instead of WELCOME.
6580 (bus_driver_handle_list_services):
6581 Send LIST_SERVICES_REPLY instead of SERVICES.
6583 (bus_driver_handle_own_service),
6584 (bus_driver_handle_service_exists):
6585 New message handlers.
6587 (bus_driver_handle_message):
6588 Invoke new message handlers.
6590 (bus_driver_remove_connection):
6591 Don't remove any services here since that's done automatically
6592 by bus_service_remove_owner now.
6595 New function signatures.
6597 * bus/services.c: (bus_service_add_owner):
6598 Send ServiceAcquired message if we're the only primary owner.
6600 (bus_service_remove_owner):
6601 Send ServiceAcquired/ServiceLost messages.
6603 (bus_service_set_prohibit_replacement),
6604 (bus_service_get_prohibit_replacement):
6605 Functions for setting prohibit replacement.
6607 (bus_service_has_owner):
6608 New function that checks if a connection is in the owner queue of
6612 Add new function signatures.
6614 * dbus/dbus-list.c: (_dbus_list_test):
6615 Add tests for _dbus_list_remove_last and traversing the list backwards.
6618 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6619 go any further, so return NULL then.
6621 * dbus/dbus-protocol.h:
6622 Add new messages, service flags and service replies.
6624 2003-01-26 Havoc Pennington <hp@pobox.com>
6626 * dbus/dbus-message-builder.c: implement, completely untested.
6628 * test/data/*: add data to be used in testing.
6629 ".message" files are our simple loadable text format.
6630 ".message-raw" will be binary dumps of messages.
6632 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6634 2003-01-26 Havoc Pennington <hp@pobox.com>
6636 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6638 * dbus/dbus-errors.c (dbus_result_to_string): add
6641 * dbus/dbus-message-builder.c: new file, will contain code to load
6642 up messages from files. Not implemented yet.
6644 2003-01-26 Havoc Pennington <hp@pobox.com>
6646 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6647 the sender by setting to NULL
6649 2003-01-26 Havoc Pennington <hp@pobox.com>
6651 The unit tests pass, but otherwise untested. If it breaks, the
6652 tests should have been better. ;-)
6654 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6657 * dbus/dbus-message.c: redo everything so we maintain
6658 message->header as the only copy of the various fields.
6659 This avoids the possibility of out-of-memory in some cases,
6660 for example dbus_message_lock() can't run out of memory anymore,
6661 and avoids extra copying. Figured I may as well go ahead and do
6662 this since it was busted for dbus_message_lock to not return
6663 failure on OOM, and dbus_message_write_header was totally
6664 unchecked for OOM. Also fixed some random other bugs.
6666 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6667 that strings are nul-terminated. Also, end_pos can be equal
6668 to string length just not greater than, I think.
6669 (_dbus_marshal_set_int32): new function
6670 (_dbus_marshal_set_uint32): new function
6671 (_dbus_marshal_set_string): new function
6673 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6674 a warning, init timeout_list to NULL
6675 (dbus_connection_send_message): don't use uninitialized variable
6678 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6680 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6682 * bus/driver.c: (bus_driver_handle_hello),
6683 (bus_driver_send_welcome_message):
6686 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6688 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6689 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6690 (dbus_connection_unref):
6691 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6692 * dbus/dbus-message.c: (dbus_message_unref),
6695 (dbus_message_get_fields):
6696 Remove debugging printout.
6698 (_dbus_message_loader_return_buffer):
6699 Don't store the header string.
6701 (_dbus_message_test):
6704 2003-01-26 Richard Hult <rhult@codefactory.se>
6706 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6707 the file descriptor list, since it can change under us.
6709 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6711 * glib/dbus-gmain.c: (dbus_connection_prepare),
6712 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6713 (remove_watch), (dbus_connection_hookup_with_g_main):
6714 Rewrite the glib handling to use its own GSource instead of a
6715 GIOChannel so we can catch messages put in the queue while waiting
6718 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6721 * bus/connection.c: (connection_disconnect_handler),
6722 (connection_watch_callback), (bus_connection_setup):
6723 * bus/dispatch.c: (send_one_message),
6724 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6725 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6727 * bus/driver.c: (bus_driver_send_service_deleted),
6728 (bus_driver_send_service_created), (bus_driver_handle_hello),
6729 (bus_driver_send_welcome_message),
6730 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6731 (bus_driver_handle_message):
6733 Refactor code, put the message dispatching in its own file. Use
6734 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6737 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6739 * dbus/dbus-internals.h:
6740 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6742 * dbus/dbus-message.c: (dbus_message_get_sender):
6743 * dbus/dbus-message.h:
6744 Implement dbus_message_get_sender.
6746 * dbus/dbus-protocol.h:
6747 Add message and service defines.
6749 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6751 * dbus/dbus-connection.c: (dbus_connection_send_message):
6752 * dbus/dbus-message-internal.h:
6753 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6754 (dbus_message_write_header):
6755 Remove _dbus_messag_unlock and don't set the client serial on a
6756 message if one already exists.
6758 2003-01-24 Havoc Pennington <hp@pobox.com>
6760 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6763 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6766 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6768 * dbus/dbus-list.c: (alloc_link), (free_link):
6769 Use a memory pool for the links.
6771 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6773 * bus/connection.c: (bus_connection_foreach):
6775 Add new bus_connection_foreach function.
6777 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6778 Add function that broadcasts a message to all clients.
6780 (bus_driver_send_service_created), (bus_driver_handle_hello),
6781 (bus_driver_send_welcome_message),
6782 (bus_driver_handle_list_services), (bus_driver_message_handler):
6783 Implement functions that take care of listing services, and notifying
6784 clients when new services are created.
6786 * bus/services.c: (bus_services_list):
6788 Add new function that returns an array of strings with the currently
6789 registered services.
6792 * glib/dbus-gmain.c:
6793 Update copyright year.
6795 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6797 * dbus/dbus-connection.c: (dbus_connection_send_message):
6798 Unlock the message in case it was sent earlier.
6800 (dbus_connection_send_message_with_reply_and_block):
6801 Remove the reply message from the list.
6803 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6804 Set array_len and new_pos correctly.
6806 (_dbus_marshal_test):
6807 Remove debug output.
6809 * dbus/dbus-message-internal.h:
6810 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6811 New function that returns the reply serial.
6813 (_dbus_message_unlock):
6814 New function that unlocks a message and resets its header.
6816 (dbus_message_append_string_array),
6817 (dbus_message_get_fields_valist),
6818 (dbus_message_iter_get_field_type),
6819 (dbus_message_iter_get_string_array),
6820 (dbus_message_get_fields),
6821 (dbus_message_append_fields_valist):
6822 Handle string arrays.
6824 (dbus_message_set_sender):
6825 Make this function public since the bus daemon needs it.
6827 (decode_header_data):
6828 Set the reply serial to -1 initially.
6830 * dbus/dbus-message.h:
6831 Add dbus_message_set_sender.
6833 2003-01-24 Havoc Pennington <hp@pobox.com>
6835 * doc/dbus-specification.sgml: add some stuff
6837 2003-01-22 Havoc Pennington <hp@pobox.com>
6839 * doc/dbus-specification.sgml: Start to document the protocol.
6841 2003-01-22 Havoc Pennington <hp@pobox.com>
6843 * dbus/dbus-connection.c
6844 (dbus_connection_send_message_with_reply_and_block): add some @todo
6846 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6848 2003-01-21 Havoc Pennington <hp@pobox.com>
6850 (patch untested because can't compile)
6852 * bus/driver.c (create_unique_client_name): make this function
6853 never recycle client names. Also, caller should initialize
6856 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6858 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6860 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6861 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6862 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6863 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6864 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6865 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6866 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6867 * dbus/dbus-marshal.h:
6868 * dbus/dbus-protocol.h:
6869 Add support for marshalling and demarshalling integer, double
6872 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6877 * bus/connection.c: (connection_disconnect_handler):
6878 Remove the connection from the bus driver's list.
6880 (connection_watch_callback): Dispatch messages.
6882 (free_connection_data): Free connection name.
6884 (bus_connection_setup): Add connection to the bus driver's list.
6885 (bus_connection_remove_owned_service):
6886 (bus_connection_set_name), (bus_connection_get_name):
6887 Add functions for setting and getting the connection's name.
6890 Add function headers.
6892 * bus/driver.c: (create_unique_client_name),
6893 (bus_driver_handle_hello_message),
6894 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6895 (bus_driver_add_connection), (bus_driver_remove_connection):
6898 * bus/services.c: (bus_service_free):
6900 New file that handles communication and registreation with the bus
6903 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6905 * dbus/dbus-connection.c: (dbus_connection_send_message):
6906 Add a new client_serial parameter.
6908 (dbus_connection_send_message_with_reply):
6909 Remove a @todo since we've implemented the blocking function.
6911 (dbus_connection_send_message_with_reply_and_block):
6912 New function that sends a message and waits for a reply and
6913 then returns the reply.
6915 * dbus/dbus-connection.h:
6918 * dbus/dbus-errors.c: (dbus_result_to_string):
6919 * dbus/dbus-errors.h:
6920 Add new DBUS_RESULT.
6922 * dbus/dbus-message-internal.h:
6923 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6924 (_dbus_message_set_sender), (dbus_message_write_header),
6925 (dbus_message_new_reply), (decode_header_data),
6926 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6927 * dbus/dbus-message.h:
6928 Add new functions that set the reply serial and sender.
6929 Also marshal and demarshal them correctly and add test.
6931 * dbus/dbus-protocol.h:
6932 Add new DBUS_MESSAGE_TYPE_SENDER.
6935 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6936 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6937 (dbus_connection_hookup_with_g_main):
6938 * glib/test-dbus-glib.c: (main):
6939 Rewrite to use GIOChannel and remove the GSource crack.
6941 * test/echo-client.c: (main):
6942 * test/watch.c: (check_messages):
6943 Update for changed APIs
6945 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6947 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6949 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6950 Create a DBusTimeoutList.
6951 (dbus_connection_set_timeout_functions): Add new function to
6952 set timeout callbacks
6954 * dbus/dbus-connection.h: Add public DBusTimeout API.
6956 * dbus/dbus-message.c: (dbus_message_get_service):
6957 * dbus/dbus-message.h: New function.
6959 * dbus/dbus-server.c: Fix small doc typo.
6961 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6963 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6965 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6966 of the string, just as long as specified.
6968 2003-01-19 Havoc Pennington <hp@pobox.com>
6970 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6973 * dbus/dbus-server.c (dbus_server_set_max_connections)
6974 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6975 keep track of current number of connections, and add API for
6976 setting a max (but haven't implemented enforcing the max yet)
6978 2003-01-18 Havoc Pennington <hp@pobox.com>
6980 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6981 reading/writing if read_watch != NULL or write_watch != NULL.
6983 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6984 the message loader code to actually load message->header and
6985 message->body into the newly-created message.
6987 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6990 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6991 (dbus_connection_get_max_message_size)
6992 (dbus_connection_set_max_live_messages_size)
6993 (dbus_connection_get_max_live_messages_size): implement some
6994 resource limitation functions
6996 * dbus/dbus-resources.c: new file implementing some of the
6997 resource limits stuff
6999 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7000 missing docs, add @todo to handle OOM etc.
7002 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7005 2003-01-18 Havoc Pennington <hp@pobox.com>
7007 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7008 connection if it hasn't been already.
7010 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7011 replace with DisconnectFunction.
7013 2003-01-18 Havoc Pennington <hp@pobox.com>
7015 Building --disable-verbose-mode --disable-asserts --disable-tests
7016 cuts the library from 112K to 45K or so
7018 * configure.in: check for varargs macro support,
7019 add --enable-verbose-mode, --enable-asserts.
7021 * dbus/dbus-internals.h (_dbus_assert): support
7023 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7025 2003-01-18 Havoc Pennington <hp@pobox.com>
7027 * dbus/dbus-test.c: include config.h so that tests actually run
7029 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7030 so the failure mode when that assumption fails will be plenty
7033 2003-01-18 Havoc Pennington <hp@pobox.com>
7035 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7037 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7040 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7041 since we don't want to use those in make check
7043 2003-01-15 Havoc Pennington <hp@redhat.com>
7049 2003-01-15 Havoc Pennington <hp@redhat.com>
7051 * test/Makefile.am: fix so that test source code ends up in the
7052 distribution on make distcheck
7054 2003-01-15 Havoc Pennington <hp@redhat.com>
7060 2003-01-15 Havoc Pennington <hp@redhat.com>
7062 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7063 fix build when --disable-tests
7065 * Makefile.am (EXTRA_DIST): put HACKING in here
7067 * HACKING: document procedure for making a tarball release.
7069 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7071 * bus/connection.c: (connection_error_handler),
7072 (bus_connection_setup):
7073 * bus/main.c: (main):
7074 Make sure that the DBusConnectionData struct is NULLed
7075 out to prevent a segfault.
7077 * dbus/dbus-errors.c: (dbus_result_to_string):
7078 * dbus/dbus-errors.h:
7079 * dbus/dbus-message.c: (dbus_message_get_fields),
7080 (dbus_message_get_fields_valist), (_dbus_message_test):
7081 * dbus/dbus-message.h:
7082 Make dbus_message_get_fields return a result code so we can
7083 track invalid fields as well as oom.
7085 2003-01-11 Havoc Pennington <hp@pobox.com>
7087 * configure.in: change --enable-test/--enable-ansi action-if-given
7088 to enable_foo=$enableval instead of enable_foo=yes
7090 2003-01-08 Havoc Pennington <hp@pobox.com>
7092 * dbus/dbus-string.c (_dbus_string_align_length): new function
7094 * dbus/dbus-test-main.c: move main() for test app here
7096 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7097 symbol to run tests, because dbus-test isn't in the main
7100 Code review nitpicks.
7102 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7103 for people with narrow emacs ;-). Assert client_serial was filled
7104 in. Assert message->name != NULL.
7105 (dbus_message_append_fields): have "first_field_type" arg separate
7106 from va list, needed for C++ binding that also uses varargs IIRC
7107 and helps with type safety
7108 (dbus_message_new): add @todo about using DBusString to store
7109 service/name internally
7110 (dbus_message_new): don't leak ->service and ->name on OOM later
7112 (dbus_message_unref): free the service name
7113 (dbus_message_get_fields): same change to varargs
7114 i.e. first_field_type
7115 (_dbus_message_loader_return_buffer): assert that the message data
7116 is aligned (if not it's a bug in our code). Put in verbose griping
7117 about why we set corrupted = TRUE.
7118 (decode_header_data): add FIXME that char* is evil. Was going to
7119 add FIXME about evil locale-specific string.h strncmp, but just
7120 switched to wacky string-as-uint32 optimization. Move check for
7121 "no room for field name" above get_const_data_len() to avoid
7122 assertion failure in get_const_data_len if we have trailing 2
7123 bytes or the like. Check for service and name fields being
7124 provided twice. Don't leak service/name on error. Require field
7125 names to be aligned to 4 bytes.
7127 * dbus/dbus-marshal.c: move byte swap stuff to header
7128 (_dbus_pack_int32): uscore-prefix
7129 (_dbus_unpack_int32): uscore-prefix
7130 (_dbus_unpack_uint32): export
7131 (_dbus_demarshal_string): add @todo complaining about use of
7133 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7134 handling allowing corrupt data to go unchecked
7136 2003-01-08 Havoc Pennington <hp@redhat.com>
7138 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7139 to the select() as needed for authentication. (should be using
7140 _dbus_poll() not select, but for another day)
7142 * dbus/dbus.h: include dbus/dbus-protocol.h
7144 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7146 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7149 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7151 * dbus/dbus-internals.c: (_dbus_type_to_string):
7152 New function that returns a string describing a type.
7154 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7155 * dbus/dbus-marshal.h:
7156 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7157 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7158 (dbus_message_iter_get_byte_array):
7159 * dbus/dbus-message.h:
7160 Add new convenience functions for appending and getting message fields.
7161 Also add demarshalling routines for byte arrays.
7163 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7165 * dbus/dbus-connection-internal.h:
7166 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7167 (_dbus_connection_get_next_client_serial),
7168 (dbus_connection_send_message):
7169 * dbus/dbus-internals.h:
7170 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7171 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7172 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7173 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7174 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7175 (_dbus_verbose_bytes), (_dbus_marshal_test):
7176 * dbus/dbus-marshal.h:
7177 * dbus/dbus-message-internal.h:
7178 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7179 (dbus_message_write_header), (_dbus_message_lock),
7180 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7181 (dbus_message_get_name), (dbus_message_append_int32),
7182 (dbus_message_append_uint32), (dbus_message_append_double),
7183 (dbus_message_append_string), (dbus_message_append_byte_array),
7184 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7185 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7186 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7187 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7188 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7189 (decode_header_data), (_dbus_message_loader_return_buffer),
7190 (message_iter_test), (_dbus_message_test):
7191 * dbus/dbus-message.h:
7192 * dbus/dbus-protocol.h:
7193 * dbus/dbus-test.c: (main):
7195 * glib/test-dbus-glib.c: (message_handler), (main):
7196 * test/echo-client.c: (main):
7197 * test/watch.c: (check_messages):
7198 Make messages sendable and receivable for real.
7200 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7202 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7203 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7204 * dbus/dbus-message.c: (dbus_message_append_int32),
7205 (dbus_message_append_uint32), (dbus_message_append_double),
7206 (dbus_message_append_string), (dbus_message_append_byte_array):
7207 Handle OOM restoration.
7209 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7211 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7212 (_dbus_demarshal_string), (_dbus_marshal_test):
7213 * dbus/dbus-marshal.h:
7214 * dbus/dbus-message.c: (dbus_message_get_name),
7215 Document these functions.
7217 (dbus_message_append_int32), (dbus_message_append_uint32),
7218 (dbus_message_append_double), (dbus_message_append_string),
7219 (dbus_message_append_byte_array):
7220 * dbus/dbus-message.h:
7221 Add functions for adding message fields of different types.
7223 * dbus/dbus-protocol.h:
7224 Add the different types.
7226 2003-01-05 Havoc Pennington <hp@pobox.com>
7228 * bus/connection.c: implement routines for handling connections,
7229 first thing is keeping a list of owned services on each connection
7230 and setting up watches etc.
7232 * bus/services.c: implement a mapping from service names to lists
7235 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7237 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7238 to use static mutexes for global data
7240 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7241 collection of functions to set/get application-specific data
7242 on the DBusConnection.
7244 2003-01-04 Havoc Pennington <hp@pobox.com>
7246 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7247 (_dbus_poll): new function
7249 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7252 * bus/loop.c: initial code for the daemon main loop
7254 2003-01-04 Havoc Pennington <hp@pobox.com>
7256 * test/watch.c (error_handler): make it safe if the error handler
7257 is called multiple times (if we s/error handler/disconnect
7258 handler/ we should just guarantee it's called only once)
7260 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7261 error handler on disconnect (it's quite possible we should
7262 just change the error handler to a "disconnect handler," I'm
7263 not sure we have any other meaningful errors)
7265 * configure.in: check for getpwnam_r
7267 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7268 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7269 mechanism as in SASL spec, using socket credentials
7271 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7272 (_dbus_send_credentials_unix_socket): new function
7274 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7276 (_dbus_write): only check errno if <0 returned
7277 (_dbus_write_two): ditto
7279 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7281 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7282 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7283 (_dbus_marshal_test):
7284 * dbus/dbus-marshal.h:
7285 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7286 to _dbus_marshal_utf8_string. Also fix some tests.
7288 2002-12-28 Harri Porten <porten@kde.org>
7290 * configure.in: added check for C++ compiler and a very cheesy
7291 check for the Qt integration
7293 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7295 * qt/Makefile.am: added
7297 * qt/.cvsignore: added
7299 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7300 latter, added #ifdef QT_THREAD_SUPPORT guard.
7302 * dbus/Makefile.am: added missing headers for make dist
7304 2002-12-28 Kristian Rietveld <kris@gtk.org>
7306 * dbus/Makefile.am: fixup export-symbols-regex.
7308 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7310 * acinclude.m4: Add this file and put the
7311 PKG_CHECK_MODULE macro in it.
7313 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7315 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7316 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7317 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7318 (_dbus_marshal_test):
7319 Make the demarshalling routines align the pos argument.
7320 Add string marshalling tests and fix the obvious bugs
7323 2002-12-26 Havoc Pennington <hp@pobox.com>
7325 * dbus/dbus-auth.c: fixes fixes fixes
7327 * dbus/dbus-transport-unix.c: wire up support for
7328 encoding/decoding data on the wire
7330 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7331 (_dbus_auth_decode_data): append to target string
7332 instead of nuking it.
7334 2002-12-26 Havoc Pennington <hp@pobox.com>
7336 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7337 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7340 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7341 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7342 now). Main point is because I wanted unpack_uint32 to implement
7344 (_dbus_verbose_bytes): new function
7346 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7348 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7349 mechanism to handle a corrupt message stream
7350 (_dbus_message_loader_new): fix preallocation to only prealloc,
7353 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7354 (_dbus_string_test): enhance tests for copy/move and fix the
7357 * dbus/dbus-transport-unix.c: Hold references in more places to
7358 avoid reentrancy problems
7360 * dbus/dbus-transport.c: ditto
7362 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7363 leak reference count in no-message case
7365 * test/watch.c (do_mainloop): handle adding/removing watches
7366 during iteration over the watches. Also, ref the connection/server
7367 stored on a watch, so we don't try to mangle a destroyed one.
7369 * dbus/dbus-transport-unix.c (do_authentication): perform
7372 * dbus/dbus-auth.c (get_state): add a state
7373 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7374 (_dbus_auth_get_unused_bytes): append the unused bytes
7375 to the passed in string, rather than prepend
7377 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7378 the auth conversation DBusAuth
7380 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7381 (_dbus_transport_new_for_domain_socket): when creating a
7382 transport, pass in whether it's a client-side or server-side
7383 transport so we know which DBusAuth to create
7385 2002-12-03 Havoc Pennington <hp@pobox.com>
7387 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7388 _after_ finalizing the derived members
7389 (unix_connection_set): unref watch if we fail to add it
7391 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7392 transport first, so that the connection owned by the
7393 transport will be valid as the transport finalizes.
7395 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7396 if necessary, and remove watches from the connection.
7398 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7400 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7402 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7403 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7404 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7405 (_dbus_marshal_test):
7406 * dbus/dbus-marshal.h:
7407 Add string marshal functions and have the demarshal functions
7408 return the new position.
7410 2002-12-25 Havoc Pennington <hp@pobox.com>
7412 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7413 it is a simple protocol that just maps directly to SASL.
7415 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7416 initial implementation, not actually used yet.
7418 * dbus/dbus-string.c (_dbus_string_find): new function
7419 (_dbus_string_equal): new function
7420 (_dbus_string_base64_encode): new function
7421 (_dbus_string_base64_decode): new function
7423 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7426 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7427 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7428 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7429 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7430 * dbus/dbus-marshal.h:
7431 * dbus/dbus-protocol.h:
7432 * dbus/dbus-test.c: (main):
7434 Add un-optimized marshalling/demarshalling routines.
7436 2002-12-25 Harri Porten <porten@kde.org>
7438 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7440 2002-12-24 Zack Rusin <zack@kde.org>
7442 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7443 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7446 2002-12-24 Havoc Pennington <hp@pobox.com>
7448 * glib/dbus-gthread.c: fix include
7450 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7451 I think glib API needs to change, though, as you don't
7452 want to use DBusMessageFunction, you want to use the
7453 DBusMessageHandler object. Probably
7454 dbus_connection_open_with_g_main_loop()
7455 and dbus_connection_setup_g_main_loop() or something like that
7456 (but think of better names...) that just create a connection
7457 that has watch/timeout functions etc. already set up.
7459 * dbus/dbus-connection.c
7460 (dbus_connection_send_message_with_reply): new function just to
7461 show how the message handler helps us deal with replies.
7463 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7465 * dbus/dbus-string.c (_dbus_string_test): free a string that
7468 * dbus/dbus-hash.c: use memory pools for the hash entries
7469 (rebuild_table): be more paranoid about overflow, and
7470 shrink table when we can
7471 (_dbus_hash_test): reduce number of sprintfs and write
7472 valid C89. Add tests for case where we grow and then
7473 shrink the hash table.
7475 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7477 * dbus/dbus-connection.c (dbus_connection_register_handler)
7478 (dbus_connection_unregister_handler): new functions
7480 * dbus/dbus-message.c (dbus_message_get_name): new
7482 * dbus/dbus-list.c: fix docs typo
7484 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7485 an object representing a handler for messages.
7487 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7490 * glib/dbus-gthread.c: (dbus_gthread_init):
7491 Don't use the gdbus prefix for public functions.
7493 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7497 Add GLib checks and fixup .pc files
7501 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7502 (gdbus_connection_check), (gdbus_connection_dispatch),
7503 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7504 (dbus_connection_gsource_new):
7505 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7506 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7507 * glib/test-dbus-glib.c: (message_handler), (main):
7510 2002-12-15 Harri Porten <porten@kde.org>
7512 * autogen.sh: check for libtoolize before attempting to use it
7514 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7517 * .cvsignore: ignore more stamp files
7519 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7521 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7522 without make install.
7524 2002-12-15 Havoc Pennington <hp@pobox.com>
7526 * dbus/dbus-threads.c: add thread stubs that a higher library
7527 layer can fill in. e.g. the GLib wrapper might fill them in with
7528 GThread stuff. We still need to use this thread API to
7529 thread-safe-ize the library.
7531 2002-12-12 Havoc Pennington <hp@pobox.com>
7533 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7534 below new interfaces and include fewer system headers.
7536 * dbus/dbus-sysdeps.c (_dbus_read): new function
7537 (_dbus_write): new function
7538 (_dbus_write_two): new function
7539 (_dbus_connect_unix_socket): new function
7540 (_dbus_listen_unix_socket): new function
7542 * dbus/dbus-message-internal.h: change interfaces to use
7545 2002-12-11 Havoc Pennington <hp@pobox.com>
7547 * dbus/dbus-types.h: add dbus_unichar
7549 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7551 * dbus/dbus-connection.c (dbus_connection_send_message): return
7554 * dbus/dbus-transport.c: include dbus-watch.h
7556 * dbus/dbus-connection.c: include dbus-message-internal.h
7558 * HACKING: add file with coding guidelines stuff.
7560 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7561 handling here, for security purposes (as in vsftpd). Not actually
7562 using this class yet.
7564 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7565 system/libc usage here, as in vsftpd, for ease of auditing (and
7566 should also simplify portability). Haven't actually moved all the
7567 system/libc usage into here yet.
7569 2002-11-25 Havoc Pennington <hp@pobox.com>
7571 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7572 always print the first verbose message.
7574 2002-11-24 Havoc Pennington <hp@pobox.com>
7576 * test/echo-client.c, test/echo-server.c: cheesy test
7579 * configure.in (AC_CHECK_FUNCS): check for writev
7581 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7584 * dbus/dbus-list.c (_dbus_list_foreach): new function
7586 * dbus/dbus-internals.c (_dbus_verbose): new function
7588 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7589 representing a server that listens for connections.
7591 * dbus/.cvsignore: create
7593 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7594 public API for reporting errors
7596 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7597 public object representing a connection that
7598 sends/receives messages. (Same object used for
7599 both client and server.)
7601 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7602 Basic abstraction for different kinds of stream
7603 that we might read/write messages from.
7605 2002-11-23 Havoc Pennington <hp@pobox.com>
7607 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7610 * dbus/dbus-test.c (main): add list test, and include
7611 dbus-test.h as intended
7613 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7614 (_dbus_hash_table_remove_int): return value indicates
7615 whether the entry existed to remove
7617 * dbus/dbus-list.c: add linked list utility class,
7620 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7623 2002-11-23 Havoc Pennington <hp@pobox.com>
7625 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7626 DBUS_END_DECLS to nothing, that should fix this once and for all
7628 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7630 * dbus/dbus-message.c, dbus/dbus-hash.c:
7631 add some missing @brief
7633 2002-11-23 Havoc Pennington <hp@pobox.com>
7635 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7636 to avoid confusing Doxygen
7638 * dbus/dbus-hash.c: @} not }@
7640 * dbus/dbus-message.c (struct DBusMessage): split out
7643 2002-11-23 Havoc Pennington <hp@pobox.com>
7645 * configure.in: pile on more warning flags if using gcc
7647 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7648 to document static functions
7650 * configure.in: add summary to end of configure so it
7651 looks nice and attractive
7653 * dbus/dbus-hash.c: finish implementation and write unit
7656 * configure.in: add --enable-tests to enable unit tests
7658 * dbus/dbus-test.c: test program to run unit tests
7659 for all files in dbus/*, initially runs a test for
7662 * dbus/dbus-internals.h: file to hold some internal utility stuff
7664 2002-11-22 Havoc Pennington <hp@redhat.com>
7666 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7667 "ported" away from Tcl
7669 * dbus/dbus-types.h: header for types such as dbus_bool_t
7671 2002-11-22 Havoc Pennington <hp@redhat.com>
7673 * dbus/dbus.h: fixups for doc warnings
7675 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7677 (QUIET): make it quiet so we can see warnings
7679 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7681 2002-11-22 Havoc Pennington <hp@redhat.com>
7683 * Makefile.am: include "Doxyfile" target in all-local
7685 * configure.in: generate the Doxyfile
7687 * Doxyfile.in: move Doxyfile here, so we can use
7688 configure to generate a Doxyfile with the right
7691 2002-11-22 Havoc Pennington <hp@redhat.com>
7693 * dbus/dbus-message.c: move inline docs into .c file
7695 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7696 so all docs are under doc/
7697 (MAN_EXTENSION): generate man pages. Use extension
7698 ".3dbus" which matches ".3qt" on my system,
7699 I guess this is OK, I don't know really.
7700 (FILE_PATTERNS): look for .c files not .h, makes sense
7703 2002-11-22 Havoc Pennington <hp@pobox.com>
7705 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7706 because any app can be a server, and any app can be a client,
7707 the bus is a special kind of server.
7709 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7711 * Doxyfile : adding. Still needs Makefile rules to be generated
7712 automatically (just run "doxygen" in the toplevel dir for now to
7715 * dbus/dbus-message.h : Adding sample docs (javadoc since
7716 resembles gtk-doc a little more)
7718 * dbus/dbus.h : Adding sample docs
7720 2002-11-21 Havoc Pennington <hp@redhat.com>
7722 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7723 so we can allow ourselves to include files directly,
7724 instead of having to use dbus.h
7726 * dbus/dbus.h: fill in
7728 * dbus/dbus-message.h: sketch out a sample header file.
7729 Include griping if you include it directly instead of
7732 * dbus/dbus-macros.h: new file with macros for extern "C",
7733 TRUE/FALSE, NULL, etc.
7735 * doc/file-boilerplate.c: put include guards in here
7737 2002-11-21 Havoc Pennington <hp@redhat.com>
7739 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7741 * COPYING: include the GPL as well, and license code
7742 under both AFL and GPL.
7744 2002-11-21 Havoc Pennington <hp@redhat.com>
7746 * acconfig.h: get rid of this
7748 * autogen.sh (run_configure): add --no-configure option
7750 * configure.in: remove AC_ARG_PROGRAM to make
7751 autoconf complain less. add AC_PREREQ.
7752 add AC_DEFINE third arg.
7754 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7757 Fix references so we can distcheck.
7759 2002-11-21 Havoc Pennington <hp@redhat.com>
7761 * Initial module creation