1 2004-11-09 Colin Walters <walters@verbum.org>
3 * dbus/dbus-string.c (_dbus_string_get_length): New
4 function, writes DBusString to C buffer.
6 * dbus/dbus-string.h: Prototype it.
8 * dbus/dbus-message.c (dbus_message_type_to_string): New
9 function, converts message type into C string.
11 * dbus/dbus-message.h: Prototype it.
13 * bus/selinux.c (bus_selinux_check): Take source pid,
14 target pid, and audit data. Pass audit data to
16 (log_audit_callback): New function, appends extra
18 (bus_selinux_allows_acquire_service): Also take
19 service name, add it to audit data.
20 (bus_selinux_allows_send): Also take message
21 type, interface, method member, error name,
22 and destination, and add them to audit data.
23 (log_cb): Initialize func_audit.
25 * bus/selinux.h (bus_selinux_allows_acquire_service)
26 (bus_selinux_allows_send): Update prototypes
28 * bus/services.c (bus_registry_acquire_service): Pass
29 service name to bus_selinux_allows_acquire_service.
31 * bus/bus.c (bus_context_check_security_policy): Pass
32 additional audit data. Move assignment of dest
35 2004-11-07 Colin Walters <walters@verbum.org>
37 * dbus/dbus-transport-unix.c (do_authentication): Always
38 initialize auth_completed.
40 2004-11-07 Colin Walters <walters@verbum.org>
42 * bus/bus.c (load_config): Break into three
43 separate functions: process_config_first_time_only,
44 process_config_every_time, and process_config_postinit.
45 (process_config_every_time): Move call of
46 bus_registry_set_service_context_table into
47 process_config_postinit.
48 (process_config_postinit): New function, does
49 any processing that needs to happen late
50 in initialization (and also on reload).
51 (bus_context_new): Instead of calling load_config,
52 open config parser here and call process_config_first_time_only
53 and process_config_every_time directly. Later, after
54 we have forked but before changing UID,
55 invoke bus_selinux_full_init, and then call
56 process_config_postinit.
57 (bus_context_reload_config): As in bus_context_new,
58 load parse file inside here, and call process_config_every_time
59 and process_config_postinit.
61 * bus/services.h, bus/services.c
62 (bus_registry_set_service_context_table): Rename
63 from bus_registry_set_sid_table. Take string hash from config
64 parser, and convert them here into SIDs.
66 * bus/config-parser.c (struct BusConfigParser): Have
67 config parser only store a mapping of service->context
69 (merge_service_context_hash): New function.
70 (merge_included): Merge context string hashes instead
71 of using bus_selinux_id_table_union.
72 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
73 simply create a new string hash.
74 (bus_config_parser_unref): Unref it.
75 (start_selinux_child): Simply insert strings into hash,
76 don't call bus_selinux_id_table_copy_over.
78 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
79 (bus_selinux_id_table_copy_over): Delete.
81 2004-11-03 Colin Walters <walters@verbum.org>
83 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
86 2004-11-03 Colin Walters <walters@verbum.org>
88 * bus/test-main.c (test_pre_hook): Fix test logic,
89 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
91 2004-11-02 Colin Walters <walters@redhat.com>
93 * bus/selinux.c (bus_selinux_init): Split into two functions,
94 bus_selinux_pre_init and bus_selinux_post_init.
95 (bus_selinux_pre_init): Just determine whether SELinux is
97 (bus_selinux_post_init): Do everything else.
99 * bus/main.c (main): Call bus_selinux_pre_init before parsing
100 config file, and bus_selinux_post_init after. This ensures that
101 we don't lose the policyreload notification thread that
102 bus_selinux_init created before forking previously.
104 * bus/test-main.c (test_pre_hook): Update for split.
106 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
108 Patch from Johan Fischer <linux@fischaz.com>
110 * mono/doc/Makefile.am (install-data-local): Added directory
113 2004-10-29 Colin Walters <walters@redhat.com>
115 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
116 parameter for fd to write pid to.
118 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
120 * bus/bus.c (bus_context_new): Pass print_pid_fd
121 to _dbus_become_daemon (bug #1720)
123 2004-10-29 Colin Walters <walters@redhat.com>
125 Patch from Ed Catmur <ed@catmur.co.uk>
127 * mono/doc/Makefile.am (install-data-local): Handle
130 2004-10-29 Colin Walters <walters@redhat.com>
132 * bus/.cvsignore, qt/.cvsignore: Update.
134 2004-10-29 Colin Walters <walters@redhat.com>
136 Patch from Kristof Vansant <de_lupus@pandora.be>
138 * configure.in: Detect Slackware.
139 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
140 * bus/rc.messagebus.in: New file.
142 2004-10-29 Colin Walters <walters@redhat.com>
144 * tools/dbus-monitor.c (filter_func): Return
145 DBUS_HANDLER_RESULT_HANDLED in filter function
147 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
149 2004-10-29 Colin Walters <walters@redhat.com>
151 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
153 * bus/services.c (bus_registry_acquire_service):
154 Correctly retrieve service name from DBusString
157 2004-10-29 Colin Walters <walters@redhat.com>
159 * dbus/dbus-glib.h: Update documentation to not
160 refer to internal APIs.
162 2004-10-27 Joe Shaw <joeshaw@novell.com>
164 * mono/Arguments.cs (GetDBusTypeConstructor):
165 type.UnderlyingSystemType will return "System.Byte" if you do it
166 on "byte[]", which is not what we want. So check the type.IsArray
167 property and use System.Array instead.
169 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
171 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
172 the DBusUserInfo structure since this is passed into the function.
173 This would cause a double free when the function that allocated
174 the structure would try to free it when an error occured.
176 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
177 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
178 for service activation to avoid 32bit/64bit parallel install issues
180 2004-10-21 Colin Walters <walters@verbum.org>
182 * AUTHORS: Fix my email address, the @gnu.org one
183 has been bouncing for some time. Also add J5.
185 2004-10-21 Colin Walters <walters@verbum.org>
187 * dbus/dbus-transport-unix.c (do_authentication): Return
188 authentication status to callers.
189 (unix_handle_watch): If we completed authentication this round,
190 don't do another read. Instead wait until the next iteration,
191 after we've read any pending data in the auth buffer.
192 (unix_do_iteration): Ditto.
193 (unix_handle_watch): Updated for new do_authentication prototype.
195 2004-10-18 Colin Walters <walters@verbum.org>
197 * bus/selinux.c (bus_selinux_enabled): Handle
198 --disable-selinux case.
200 2004-10-18 Colin Walters <walters@verbum.org>
202 * bus/selinux.h: Add bus_selinux_enabled.
204 * bus/selinux.c (bus_selinux_enabled): Implement it.
206 * bus/config-parser.c (struct include): Add
207 if_selinux_enabled member.
208 (start_busconfig_child): Parse if_selinux_enabled
209 attribute for include.
210 (bus_config_parser_content): Handle it.
212 * bus/session.conf.in, bus/system.conf.in: Add
213 inclusion of context mapping to default config files;
214 conditional on SELinux being enabled.
216 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
218 * test/data/invalid-config-files/badselinux-1.conf,
219 test/data/invalid-config-files/badselinux-2.conf:
220 Test files for bad syntax.
222 2004-10-17 Colin Walters <walters@verbum.org>
224 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
225 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
226 format specifier mismatches.
228 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
230 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
233 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
234 pointer (bug #1540, Leonardo Boiko).
236 2004-09-28 Jon Trowbridge <trow@ximian.com>
238 * mono/BusDriver.cs: Changed BusDriver struct to remove
239 the ServiceCreated and ServiceDeleted events and replace them
240 with the new ServiceOwnerChanged event.
242 * mono/example/BusListener.cs: Added a new example program,
243 which listens for and reports any ServiceOwnerChanged events
246 * mono/example/Makefile.am (DESTDIR): Build changes for the
247 new BusListener.cs example.
249 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
251 * bus/signals.c (bus_match_rule_parse): validate the components of
252 match rules (bug #1439).
254 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
256 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
258 * doc/dbus-specification.xml: document ServiceOwnerChanged
261 * bus/driver.c, bus/driver.h, bus/services.c: Use
262 ServiceOwnerChanged signal instead of ServiceCreated and
265 * bus/dispatch.c: update testcase for the new signal.
267 2004-09-20 Jon Trowbridge <trow@ximian.com>
269 Patch from Nat Friedman <nat@novell.com>
271 * mono/Makefile.am: A number of small build fixes to allow "make
272 distcheck" to succeed.
274 * mono/example/Makefile.am: "make distcheck" fixes.
276 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
279 * test/Makefile.am: "make distcheck" fixes.
281 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
283 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
285 * doc/busconfig.dtd: update the DTD for the at_console attribute.
287 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
288 messages after the first one (bug #1389).
290 * bus/dispatch.c (check_double_hello_message): add a test case for
291 the double hello message bug.
292 (check_existent_service_activation): fix check of spawning error.
294 2004-09-16 David Zeuthen <david@fubar.dk>
296 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
298 2004-09-12 David Zeuthen <david@fubar.dk>
300 Patch from Kay Sievers <kay.sievers@vrfy.org>
302 * bus/bus.c (bus_context_new):
306 Add commandline option --nofork to override configuration file
309 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
311 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
312 compilers don't like it (bug #974).
314 2004-09-04 Harald Fernengel <harry@kdevelop.org>
316 * qt/connection.*: Applied patch by Jérôme Lodewyck
317 <lodewyck@clipper.ens.fr> to integrate an existing
318 connection into the Qt eventloop
320 2004-08-30 Jon Trowbridge <trow@ximian.com>
322 * mono/BusDriver.cs: Added. This is a class for interacting with
323 the org.freedesktop.DBus service.
325 * mono/Message.cs: Added a mechanism to expose the message that is
326 currently being dispatched via the static Message.Current
327 property. Added Message.Sender and Message.Destination
330 * mono/Handler.cs: Expose the dispatched message via
331 Message.Current when handling method calls.
333 * mono/Service.cs: Expose the dispatched message via
334 Message.Current when handling signal emissions.
336 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
337 Connection.BaseService property.
339 2004-08-28 Havoc Pennington <hp@redhat.com>
341 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
343 More fixes from Steve Grubb
345 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
346 (_dbus_listen_tcp_socket): fix fd leak
348 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
349 EINTR to a bit lower in the code
351 2004-08-26 Jon Trowbridge <trow@ximian.com>
353 * bus/driver.c (bus_driver_handle_service_exists): Respond with
354 TRUE if we are inquiring about the existence of the built-in
355 org.freedesktop.DBus service.
357 2004-08-25 John Palmieri <johnp@redhat.com>
358 * bus/config-parser.c:
359 (struct PolicyType): Add POLICY_CONSOLE
360 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
361 (start_busconfig_child): Sets up console element when
362 <policy at_console=""> is encountered in a policy file
363 (append_rule_from_element): Convert console elements to console
367 (bus_policy_create_client_policy): Add console rules to the client
368 policy based on if the client is at the console
369 (bus_policy_append_console_rule): New function for adding a
370 console rule to a policy
371 (bus_policy_merge): Handle console rule merging
373 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
374 where we check for console user files
376 * dbus/dbus-sysdeps.c:
377 (_dbus_file_exists): New function which checks if the given
379 (_dbus_user_at_console): New function which does the system
380 specific process of checking if the user is at the console
382 * dbus/dbus-userdb.c:
383 (_dbus_is_console_user): New function converts a UID to user name
384 and then calls the system specific _dbus_user_at_console to
385 see if the user is at the console and therefor a console user
387 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
389 * bus/config-parser.c (set_limit):
390 * bus/dbus-daemon-1.1.in:
391 * test/data/valid-config-files/many-rules.conf: set the
392 max_match_rules_per_connection limt from the config file.
394 * doc/busconfig.dtd: update the DTD.
396 * bus/driver.c: remove some unused variables.
398 2004-08-24 Mikael Hallendal <micke@imendio.com>
400 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
401 it's been replaced by dbus_g_bus_get
403 2004-08-23 Colin Walters <walters@redhat.com>
405 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
407 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
409 * bus/selinux.c: Create a thread for policy reload notification.
410 (bus_selinux_get_policy_root): Implement.
412 * bus/config-parser.c (start_busconfig_child)
413 (bus_config_parser_content): Support SELinux-root relative
416 * configure.in <HAVE_SELINUX>: Add -lpthread.
418 * bus/test-main.c (test_pre_hook, test_post_hook): New.
419 (test_post_hook): Move memory checking into here.
420 (test_pre_hook, test_post_hook): Move SELinux checks in
421 here, but conditional on a DBUS_TEST_SELINUX environment
422 variable. Unfortunately we can't run the SELinux checks
423 as a normal user, since they won't have any permissions
424 for /selinux. So this will have to be tested manually
425 for now, until we have virtualization for most of
428 2004-08-23 Havoc Pennington <hp@redhat.com>
430 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
431 drop supplementary groups, suggested by Steve Grubb
433 2004-08-20 Colin Walters <walters@redhat.com>
435 * bus/config-parser.c (start_busconfig_child): Remove some unused
438 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
441 2004-08-17 Joe Shaw <joeshaw@novell.com>
443 * configure.in: If --enable-mono is passed in, if we can't find
446 * mono/Makefile.am: Use /gacutil to install assemblies into the
449 2004-08-12 Havoc Pennington <hp@redhat.com>
451 * NEWS: update for 0.22
453 * configure.in: release 0.22
455 2004-08-11 Colin Walters <walters@redhat.com>
457 * tools/dbus-send.c (main, usage): Add --reply-timeout
460 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
462 * bus/bus.c (process_config_first_time_only): get rid of an unused
463 DBusError that was causing a memoy leak (bug #989).
465 * dbus/dbus-keyring.c, dbus/dbus-message.c:
466 fix compilation on Solaris/Forte C (bug #974)
468 * bus/main.c (main): plug two minuscule memleaks.
470 2004-08-10 Havoc Pennington <hp@redhat.com>
472 * doc/dbus-tutorial.xml: add some more info on GLib bindings
474 2004-08-09 Havoc Pennington <hp@redhat.com>
476 * COPYING: switch to Academic Free License version 2.1 instead of
477 2.0, to resolve complaints about patent termination clause.
479 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
481 * README: added documentation for the --enable-python
484 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
486 * bus/config-parser.c (bus_config_parser_new): fix an invalid
487 _unref in the SELinux support.
489 * doc/busconfig.dtd: update DTD for SELinux support.
491 * bus/config-loader-libxml.c: fix error handler and parser
492 initialisation/cleanup. OOM test now works with libxml2 HEAD.
494 * configure.in: remove the warning about libxml2.
496 * dbus/dbus-bus.c: silence doxygen warning.
498 2004-07-31 Colin Walters <walters@redhat.com>
500 * configure.in: Move #error in SELinux check to its own line.
502 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
504 * dbus/dbus-internals.h (_DBUS_SET_OOM):
505 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
508 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
509 broken by the change in the _SET_OOM macros.
511 2004-07-31 Colin Walters <walters@redhat.com>
513 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
516 2004-07-31 Colin Walters <walters@redhat.com>
518 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
519 to correctly detect DBUS__ACQUIRE_SVC. Also add an
522 2004-07-24 Havoc Pennington <hp@redhat.com>
524 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
526 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
529 * configure.in: add --enable-selinux
531 * bus/policy.c (bus_policy_merge): add FIXME to a comment
533 * bus/main.c (main): initialize and shut down selinux
535 * bus/connection.c: store SELinux ID on each connection, to avoid
536 repeated getting of the string context and converting it into
539 * bus/bus.c (bus_context_get_policy): new accessor, though it
541 (bus_context_check_security_policy): check whether the security
542 context of sender connection can send to the security context of
545 * bus/config-parser.c: add parsing for <selinux> and <associate>
547 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
548 implement dbus_connection_get_unix_fd()
550 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
551 function, used by the selinux stuff
553 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
555 * bus/config-loader-libxml.c: complete the implementation of
556 libxml backend for config file loader. Doesn't work with full OOM
559 * configure.in: change error when selecting libxml into a warning.
561 * test/data/invalid-config-files: add two non-well-formed XML
564 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
566 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
567 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
568 be necessary to read all the buffer. (bug #894)
570 * bus/activation.c (bus_activation_activate_service): fix a
571 potential assertion failure (bug #896). Small optimization in the
572 case of auto-activation messages.
574 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
575 add test case for byte-through-vararg bug (#901). patch by Kimmo
578 2004-07-28 Anders Carlsson <andersca@gnome.org>
581 * python/dbus_bindings.pyx.in:
582 Add dbus.init_gthreads (), allow emit_signal to pass
583 arguments to the signal.
585 2004-07-24 Havoc Pennington <hp@redhat.com>
587 * AUTHORS: add some people, not really comprehensively, let me
590 2004-07-24 Havoc Pennington <hp@redhat.com>
592 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
595 * test/Makefile.am (DIST_SUBDIRS): here also
597 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
599 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
600 breaking build on Solaris, reported by Farhad Saberi on the ML.
602 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
603 va_arg invocation to account for integer promotion in the case of
604 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
606 * bus/services.c (bus_service_remove_owner): fix bug #902, use
607 _dbus_list_get_first_link, not _dbus_list_get_first.
609 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
611 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
612 handler functions so that the asserts in _dbus_object_subtree_unref
615 * dbus/dbus-transport-unix.c (do_reading):
616 _dbus_transport_queue_messages return value is of type
617 dbus_bool_t, not DBusDispatchStatus.
619 2004-07-19 David Zeuthen <david@fubar.dk>
621 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
624 (check_get_connection_unix_user): Debug says GetProperty; but the
625 method is called GetConnectionUnixUser
626 (check_get_connection_unix_process_id): New function
627 (bus_dispatch_test): Actually call check_get_connection_unix_user();
628 also call check_get_connection_unix_process_id()
631 (bus_driver_handle_get_connection_unix_process_id): New function,
632 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
636 (handle_server_data_external_mech): Set pid from the credentials
637 obtained from the socket
639 * dbus/dbus-connection.c:
640 (dbus_connection_get_unix_process_id): New function
642 * dbus/dbus-connection.h:
643 Add prototype for dbus_connection_get_unix_process_id
645 * dbus/dbus-transport.c:
646 (_dbus_transport_get_unix_process_id): New function
648 * dbus/dbus-transport.h:
649 Add prototype for _dbus_transport_get_unix_process_id
651 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
653 * dbus/dbus-message.c: Message counter fix, patch by Christian
654 Hammond <chipx86@gnupdate.org>
656 2004-07-18 Seth Nickell <seth@gnome.org>
659 * python/dbus_bindings.pyx.in:
660 * python/tests/test-client.py:
662 Add dbus.ByteArray and dbus_bindings.ByteArray
663 types so that byte streams can be passed back.
665 Give jdahlin the heaps of credit that are so
668 2004-07-12 Seth Nickell <seth@gnome.org>
672 Add message argument to the default object_method_handler
675 * python/dbus_bindings.pyx.in:
677 Automatically return NIL when passed an empty list
678 (we can't pass back a list since lists are typed
679 and we don't have any idea what type the the client
680 intended the list to be... :-( )
682 2004-07-10 Seth Nickell <seth@gnome.org>
684 * python/examples/Makefile.am:
686 Fix distcheck breakage caused by new examples.
688 2004-07-10 Seth Nickell <seth@gnome.org>
692 Add "message" argument to service-side dbus.Object
693 methods. This will break existing services written
694 using the python bindings, but will allow extraction
695 of all the message information (e.g. who its from).
697 Add improved "object oriented" signal handling/emission.
699 * python/examples/example-service.py:
703 * python/examples/example-signal-emitter.py:
704 * python/examples/example-signal-recipient.py:
706 Two new examples that show how to emit and receive
707 signals using the new APIs.
709 * python/examples/example-signals.py:
710 * python/examples/gconf-proxy-service.py:
711 * python/examples/gconf-proxy-service2.py:
713 Add "message" argument to service methods.
715 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
717 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
718 * dbus/bus.c (dbus_bus_get_unix_user)
719 * doc/dbus-specification.xml: implement GetConnectionUnixUser
720 method of org.freedesktop.DBus interface.
722 * bus/dispatch.c: test case
724 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
726 * python/Makefile.am: switched include directory from glib/ to dbus/
727 since dbus-glib.h moved
729 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
731 * configure.in: prevent building the gcj stuff and libxml loader
732 since they are broken.
734 2004-06-20 Havoc Pennington <hp@redhat.com>
736 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
737 codes from the dbus error names
739 * glib/dbus-glib.h: move to subdir dbus/ since it's included
740 as dbus/dbus-glib.h and that breakage is now visible due to
741 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
743 * glib/dbus-glib.h: s/gproxy/g_proxy/
745 * dbus/dbus-shared.h: new header to hold stuff shared with
748 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
751 * glib/dbus-glib.h (dbus_set_g_error): move to
754 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
755 of stuff to enable this
757 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
759 * a bunch of other changes with the same basic "separate glib
760 bindings from dbus.h" theme
762 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
764 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
766 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
768 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
770 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
771 the reply value of the ServiceExists message.
773 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
775 * python/dbus_bindings.pyx.in: No longer need to parse path
776 elements and pass them as arrays of strings. The C API now
777 accepts plain path strings.
778 (_build_parsed_path): removed
780 2004-06-07 Havoc Pennington <hp@redhat.com>
782 * doc/TODO: remove auto-activation item since it's done; sort
783 items by importance/milestone
785 2004-06-07 Havoc Pennington <hp@redhat.com>
787 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
788 random signature when using REQUIRED_FIELDS (this hack won't work
791 * dbus/dbus-message.c: change the signature to be a header field,
792 instead of message->signature special-case string. Incremental
793 step forward. Then we can fix up code to send the signature in the
794 message, then fix up code to validate said signature, then fix up
795 code to not put the typecodes inline, etc.
796 (load_one_message): don't make up the signature after the fact
797 (decode_header_data): require signature field for the known
800 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
802 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
804 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
806 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
808 * mono/Handler.cs: Updated to follow new path argument for
809 (un-)registering objects.
811 * mono/example/Makefile.am:
813 * configure.in: Bumped required version for mono and use new -pkg
816 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
818 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
819 registration functions take the path argument as char* instead of
822 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
823 split off the path decompostion part of
824 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
827 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
829 2004-06-02 Kristian Høgsberg <krh@redhat.com>
831 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
832 machine approach. A state is implemented as a function that
833 handles incoming events as specified for that state.
835 * doc/dbus-specification.xml: Update auth protocol state machine
836 specification to match implementation. Remove some leftover
839 2004-06-02 Kristian Høgsberg <krh@redhat.com>
841 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
842 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
845 * Doxyfile.in: remove deprecated options.
847 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
848 glib/test-thread.h, glib/test-thread-client.c,
849 glib/test-thread-server.c, glib/test-profile.c,
850 glib/test-dbus-glib.c: remove these unused files.
852 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
854 * dbus/dbus-object-tree.c
855 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
856 non-fallback handlers (bug #684).
857 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
858 (find_subtree_recurse): report wether the returned subtree is an
859 exact match or a "fallback" match higher up in the tree.
860 (object_tree_test_iteration): update test case.
862 2004-06-01 Seth Nickell <seth@gnome.org>
864 * python/dbus_bindings.pyx.in:
865 * python/tests/test-client.py:
867 Round off basic type support. Add dicts (yay!), and
868 remaining array types.
870 Make MessageIter more general so it works for dicts too.
872 Mark all loop variables as C integers.
874 2004-05-31 Havoc Pennington <hp@redhat.com>
876 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
879 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
881 * glib/dbus-glib-tool.c (main): set up to have a --self-test
882 option that runs the tests, and start filling in some code
883 including for starters just dumping the interfaces to stdout
885 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
887 * test/data/valid-introspection-files/lots-of-types.xml: test of
888 an example introspection file
890 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
893 2004-05-31 Seth Nickell <seth@gnome.org>
895 * python/dbus_bindings.pyx.in:
896 * python/tests/test-client.py:
901 Fix string array memory trashing bug... oops...
903 2004-05-30 Seth Nickell <seth@gnome.org>
907 Add a nicer-but-less-flexible alternate API for handling
908 calls to virtual objects in dbus.ObjectTree.
910 Screw up the argument order to the dbus.Object constructor
911 for consistency with dbus.ObjectTree (and to make dbus_methods
912 optional for future extension)
914 * python/examples/Makefile.am:
915 * python/examples/gconf-proxy-service.py:
916 * python/examples/gconf-proxy-service2.py:
918 Alternate implementation of gconf-proxy-service using the
919 nicer dbus.ObjectTree API.
921 * python/examples/example-service.py:
922 * python/tests/test-server.py
924 Reverse the argument order to deal with dbus.Object constructor
927 2004-05-30 Seth Nickell <seth@gnome.org>
929 * python/examples/example-client.py:
930 * python/examples/example-service.py:
932 Take it back. Lists seem to work but they're broken
933 in the test suite. Make the base examples use
936 2004-05-30 Seth Nickell <seth@gnome.org>
938 * python/dbus_bindings.pyx.in:
939 * python/tests/test-client.py:
941 Add some more tests and fix errors that crop up.
942 Unfortunately, currently it seems like marshalling
943 and unmarshalling of lists is completely broken :-(
945 2004-05-30 Seth Nickell <seth@gnome.org>
947 * python/dbus_bindings.pyx.in:
949 Add support for ObjectPath type.
953 Refactor message handling code to a common function.
955 * python/tests/test-client.py:
956 * python/tests/test-server.py:
958 Add tests that check to make sure values of all types
959 can be echoed from a service w/o mangling.
961 2004-05-29 Seth Nickell <seth@gnome.org>
965 Add ObjectTree class which allows implementation
966 of trees of "virtual" objects. Basically the python
967 wrapper for "register_fallback".
969 * python/examples/Makefile.am
970 * python/examples/gconf-proxy-client.py:
971 * python/examples/gconf-proxy-service.py:
973 Implement a simple GConf proxy service that supports
974 get/set on string and int GConf keys using the ObjectTree.
976 2004-05-29 Seth Nickell <seth@gnome.org>
979 * python/examples/example-client.py:
980 * python/examples/example-service.py:
981 * python/examples/list-system-services.py:
983 Add SessionBus, SystemBus and ActivationBus classes
984 so you don't need to know the special little BUS_TYPE
987 2004-05-29 Havoc Pennington <hp@redhat.com>
989 * bus/config-parser.c (process_test_valid_subdir): temporarily
990 stop testing config parser OOM handling, since expat has issues
991 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
993 * bus/dbus-daemon-1.1.in: change requested_reply to
994 send_requested_reply/receive_requested_reply so we can send the
995 replies, not just receive them.
997 * bus/config-parser.c: parse the new
998 send_requested_reply/receive_requested_reply
1000 * bus/policy.c (bus_client_policy_check_can_send): add
1001 requested_reply argument and use it
1003 * bus/bus.c (bus_context_check_security_policy): pass through
1004 requested_reply status to message send check
1006 * bus/system.conf.in: adapt to requested_reply change
1008 2004-05-28 Havoc Pennington <hp@redhat.com>
1010 * test/glib/test-service-glib.c (main): remove unused variable
1012 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
1014 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
1015 from the enum, no longer in use.
1017 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
1020 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
1021 whether error_name passed in is a valid error name.
1023 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
1025 * dbus/dbus-message.c (dbus_message_get_args): Added support for
1026 OBJECT_PATH and OBJECT_PATH_ARRAY
1028 2004-05-28 Seth Nickell <seth@gnome.org>
1030 * python/examples/Makefile.am:
1032 Forget to add Makefile.am. Do not pass go.
1034 2004-05-28 Michael Meeks <michael@ximian.com>
1036 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
1039 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
1041 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
1042 (_dbus_message_iter_get_basic_type_array): impl.
1043 drastically simplify ~all relevant _get methods to use these.
1044 (_dbus_message_iter_append_basic_array),
1045 (dbus_message_iter_append_basic): impl
1046 drastically simplify ~all relevant _append methods to use these.
1048 * dbus/dbus-message-builder.c (parse_basic_type)
1049 (parse_basic_array, lookup_basic_type): impl.
1050 (_dbus_message_data_load): prune scads of duplicate /
1053 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
1054 (_dbus_demarshal_basic_type): implement,
1055 (demarshal_and_validate_len/arg): beef up debug.
1056 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
1058 2004-05-27 Seth Nickell <seth@gnome.org>
1061 * python/Makefile.am:
1063 Include the example python apps in the tarball.
1065 * python/examples/list-system-services.py
1067 Add a python new example that fetches the list of services
1068 from the system bus.
1070 2004-05-27 Seth Nickell <seth@gnome.org>
1073 * python/dbus_bindings.pyx.in:
1075 Fix failure to notify that a signal was not handled,
1076 resulted in hung functions.
1078 2004-05-25 Colin Walters <walters@redhat.com>
1080 * tools/dbus-monitor.c (main): Monitor all types of messages.
1082 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
1084 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1085 which unregisters the object path and disposes the handler.
1087 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1089 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1091 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1092 operands to && so we call dbus_message_iter_next () for the last
1095 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1097 * dbus/dbus-object-tree.c
1098 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1099 children even if the requested path isn't registered.
1100 (object_tree_test_iteration): test object_tree_list_registered.
1102 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1105 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1107 * doc/TODO: Remove resolved items.
1109 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1112 * bus/connection.c (bus_connections_expect_reply): Enforce the
1113 per-connection limit on pending replies.
1115 Patch from Jon Trowbridge <trow@ximian.com>:
1117 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1118 up a watch that triggers a config reload when one end of the pipe
1120 (signal_handler): Instead of doing the config reload in our SIGHUP
1121 handler, just write to the reload pipe and let the associated
1122 watch handle the reload when control returns to the main loop.
1124 * bus/driver.c (bus_driver_handle_reload_config): Added.
1125 Implements a ReloadConfig method for requesting a configuration
1126 file reload via the bus driver.
1128 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1130 * HACKING: Updated release instructions concerning the wiki page.
1132 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1134 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1135 filter against auth->allowed_mechs; we only add allowed mechs in
1136 record_mechanisms().
1138 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1139 ALLOWED_MECHS to auth-script format so we can set the list of
1142 * data/auth/client-out-of-mechanisms.auth-script: New test to
1143 check client disconnects when it is out of mechanisms to try.
1145 * dbus/dbus-auth.c (process_command): Remove check for lines
1146 longer that 1 MB; we only buffer up maximum 16 kB.
1148 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1149 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1150 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1151 assume there might be unused bytes.
1153 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1154 client-out-of-mechs, it is handled in process_reject(). Move check
1155 for max failures to send_rejected(), as it's a server-only thing.
1157 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1158 send_auth(), send_data(), send_rejected(), send_error(),
1159 send_ok(), send_begin() and send_cancel().
1161 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1163 Remove base64 encoding, replace with hex encoding. Original patch
1164 from trow@ximian.com, added error handling.
1166 * dbus/dbus-string.c (_dbus_string_base64_encode)
1167 (_dbus_string_base64_decode): Remove.
1168 (_dbus_string_hex_decode): Add end_return argument so we can
1169 distinguish between OOM and invalid hex encoding.
1170 (_dbus_string_test): Remove base64 tests and add test case for
1173 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1174 Replace base64 with hex.
1176 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1177 for invalid hex encoded data in auth protocol.
1179 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1181 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1184 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1186 * mono/dbus-sharp.dll.config.in: Added for GAC
1187 * mono/dbus-sharp.snk: Added for GAC
1188 * mono/Assembly.cs.in: Added for GAC
1189 * mono/Makefile.am: Changes for GAC installation
1190 * configure.in: Added refs for dbus-sharp.dll.config.in and
1191 Assembly.cs.in. More fixes for mono testing
1192 * mono/example/Makefile.am: Changed var to CSC
1193 * Makefile.am: Changed flag name to DBUS_USE_CSC
1195 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1197 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1198 * mono/doc/*: Added documentation framework
1199 * configure.in: Added monodoc check
1200 * README: Added description of mono configure flags
1202 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1204 * doc/dbus-specification.xml: Added a "Required" column to the
1205 header fields table and changed the "zero or more" verbage in
1206 the above paragraph to read "The header must contain the required
1207 named header fields and zero or more of the optional named header
1209 * test/data/invalid-messages/*.message: Added the required PATH
1210 named header field to the tests so that they don't fail on
1211 'Missing path field'
1213 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1215 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1216 the stack by implicitly defining variable and parameter types and
1217 removing the hack of defining C pointers as python objects and later
1220 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1222 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1224 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1226 * mono/DBusType/Dict.cs: Handle empty dicts
1227 * mono/DBusType/Array.cs: Handle empty arrays
1228 * mono/Arguments.cs: Handle empty arguments
1230 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1232 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1235 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1237 * test/data/valid-messages/standard-*.message: Update message
1238 test scripts to new header field names.
1240 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1242 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1243 overflow to times_we_did_each_thing array which would chop off the
1244 first character of the failure_dir string. Increased the size of
1245 the array to 7 to reflect the number of random mutation functions
1248 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1250 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1251 unix_server->watch here, it is unreffed in disconnect.
1252 (_dbus_server_new_for_tcp_socket): convert NULL host to
1253 "localhost" here so we don't append NULL to address.
1255 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1256 various addresses, including tcp with no explicit host.
1258 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1260 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1261 fix incorrect setting of .name_offset in the HeaderField (it was
1262 off by two bytes, positioned right after the name and typecode)
1264 * bus/bus.c (bus_context_new, bus_context_unref): test before
1265 calling dbus_server_free_data_slot and _dbus_user_database_unref
1266 in case of an error.
1268 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1271 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1273 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1274 _dbus_poll() instead of select().
1276 2004-04-15 Jon Trowbridge <trow@ximian.com>
1278 * bus/main.c (signal_handler): Reload the configuration files
1280 (main): Set up our SIGHUP handler.
1282 * bus/bus.c (struct BusContext): Store the config file, user and
1283 fork flag in the BusContext.
1284 (process_config_first_time_only): Added. Contains the code
1285 (previously in bus_context_new) for setting up the BusContext from
1286 the BusConfigParser that should only be run the first time the
1287 config files are read.
1288 (process_config_every_time): Added. Contains the code (previously
1289 in bus_context_new) for setting up the BusContext from the
1290 BusConfigParser that should be run every time the config files are
1292 (load_config): Added. Builds a BusConfigParser from the config
1293 files and passes the resulting structure off to
1294 process_config_first_time_only (assuming this is the first time)
1295 and process_config_every_time.
1296 (bus_context_new): All of the config-related code has been moved
1297 to process_config_first_time_only and process_config_every_time.
1298 Now this function just does the non-config-related initializations
1299 and calls load_config.
1300 (bus_context_reload_config): Added.
1302 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1304 * bus/driver.c (bus_driver_handle_get_service_owner):
1305 implement a GetServiceOwner method.
1306 * doc/dbus-specification.xml: document it.
1307 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1309 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1310 implement, using the bus GetServiceOwner method.
1312 * test/glib/test-dbus-glib.c:
1313 use dbus_gproxy_new_for_service_owner so that we can receive the
1316 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1318 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1319 dbus/dbus-message.c, dbus/dbus-protocol.h
1320 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1322 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1323 dbus/dbus-message.c, dbus/dbus-protocol.h
1324 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1326 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1327 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1328 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1330 * doc/dbus-specification.xml (Header Fields Table):
1331 s/SERVICE/DESTINATION
1332 s/SENDER_SERVICE/SENDER
1335 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1337 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1340 2004-04-13 Michael Meeks <michael@ximian.com>
1342 * glib/dbus-gobject.c (handle_introspect): split out
1343 (introspect_properties): this.
1344 (handle_introspect): implement this.
1346 * test/glib/Makefile.am: use the absolute path so the bus
1347 daemon's chdir ("/") doesn't kill us dead.
1349 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1351 2004-04-12 Jon Trowbridge <trow@ximian.com>
1353 * bus/config-parser.c (struct BusConfigParser): Added
1354 included_files field.
1355 (seen_include): Added. Checks whether or not a file has already
1356 been included by any parent BusConfigParser.
1357 (bus_config_parser_new): Copy the parent's included_files.
1358 (include_file): Track which files have been included, and fail on
1359 circular inclusions.
1360 (process_test_valid_subdir): Changed printf to report if we are
1361 testing valid or invalid conf files.
1362 (all_are_equiv): Changed printf to be a bit clearer about
1363 what we are actually doing.
1364 (bus_config_parser_test): Test invalid configuration files.
1366 2004-04-09 Jon Trowbridge <trow@ximian.com>
1368 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1369 argument. If non-null, the newly-constructed BusConfigParser will
1370 be initialized with the parent's BusLimits instead of the default
1372 (include_file): When including a config file, pass in
1373 the current parser as the parent and then copy the BusLimits
1374 from the included BusConfigParser pack to the current parser.
1375 (process_test_valid_subdir): Renamed from process_test_subdir.
1376 (process_test_equiv_subdir): Added. Walks through a directory,
1377 descending into each subdirectory and loading the config files
1378 it finds there. If any subdirectory contains two config files
1379 that don't produce identical BusConfigParser structs, fail.
1380 For now, the BusConfigParser's BusPolicies are not compared.
1381 (bus_config_parser_test): Call both process_test_valid_subdir and
1382 process_test_equiv_subdir.
1384 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1385 argument and pass it along to the call to bus_config_parser_new.
1386 Also made a few small changes to allow this code to compile.
1388 * bus/config-loader-expat.c (bus_config_load): Take a parent
1389 argument and pass it along to the call to bus_config_parser_new.
1391 * bus/bus.c (bus_context_new): Load the config file
1392 with a NULL parent argument.
1394 2004-03-29 Michael Meeks <michael@ximian.com>
1396 * glib/dbus-gobject.c (introspect_properties): split
1397 out, fix mangled 'while' flow control.
1398 (introspect_signals): implement.
1399 (handle_introspect): update.
1401 2004-03-29 Michael Meeks <michael@ximian.com>
1403 * glib/dbus-gobject.c (set_object_property): split out /
1404 re-work, use the property type, and not the message type(!)
1405 (get_object_property): ditto.
1407 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1408 (dbus_gvalue_marshal): make this code re-usable, needed
1409 for signals too, also on both proxy and server side.
1410 Re-write for more efficiency / readability.
1412 2004-03-29 Michael Meeks <michael@ximian.com>
1414 * dbus/dbus-message.c
1415 (dbus_message_new_error_printf): impl.
1417 * dbus/dbus-connection.c
1418 (dbus_connection_unregister_object_path): fix warning.
1420 * configure.in: fix no-mono-installed situation.
1422 2004-03-27 Havoc Pennington <hp@redhat.com>
1424 Patch from Timo Teräs:
1426 * tools/dbus-send.c (main): if --print-reply, assume type is
1427 method call; support boolean type args
1429 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1430 bunch of memleak and logic bugs
1432 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1434 * mono/Arguments.cs:
1435 * mono/Introspector.cs:
1437 * mono/InterfaceProxy.cs:
1439 * mono/ProxyBuilder.cs:
1441 Added InterfaceProxy class to avoid building proxies for every
1445 * dbus-message.c (dbus_message_append_args_valist)
1446 (dbus_message_iter_get_object_path)
1447 (dbus_message_iter_get_object_path_array)
1448 (dbus_message_iter_append_object_path)
1449 (dbus_message_iter_append_object_path_array):
1450 Added object_path iter functions to handle OBJECT_PATH arguments
1452 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1454 First checkin of mono bindings.
1457 Build stuff for the bindings
1458 * dbus-sharp.pc.in: Added for pkgconfig
1460 2004-03-21 Havoc Pennington <hp@redhat.com>
1462 * test/test-service.c (main): remove debug spew
1464 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1466 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1469 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1470 (dbus_message_iter_init_array_iterator)
1471 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1472 indicate whether the iterator is empty
1474 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1477 2004-03-19 Havoc Pennington <hp@redhat.com>
1479 * NEWS: 0.21 updates
1481 * configure.in: 0.21
1483 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1485 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1486 you don't need pyrex to make dist
1488 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1491 2004-03-18 Richard Hult <richard@imendio.com>
1493 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1494 (dbus_message_set_auto_activation): Add doxygen docs.
1496 2004-03-16 Richard Hult <richard@imendio.com>
1498 * bus/activation.c: (bus_activation_service_created),
1499 (bus_activation_send_pending_auto_activation_messages),
1500 (bus_activation_activate_service):
1502 * bus/dispatch.c: (bus_dispatch),
1503 (check_nonexistent_service_auto_activation),
1504 (check_service_auto_activated),
1505 (check_segfault_service_auto_activation),
1506 (check_existent_service_auto_activation), (bus_dispatch_test):
1507 * bus/driver.c: (bus_driver_handle_activate_service):
1508 * bus/services.c: (bus_registry_acquire_service):
1509 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1510 (dbus_message_get_auto_activation):
1511 * dbus/dbus-message.h:
1512 * dbus/dbus-protocol.h: Implement auto-activation.
1514 * doc/dbus-specification.xml: Add auto-activation to the spec.
1516 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1518 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1519 fix a bug with CUSTOM types.
1521 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1522 a unit test for this bug (used to fail).
1524 2004-03-12 Mikael Hallendal <micke@imendio.com>
1527 (babysitter_watch_callback): notify all pending activations waiting for
1528 the same exec that the activation failed.
1529 (bus_activation_activate_service): shortcut the activation if we
1530 already waiting for the same executable to start up.
1532 2004-03-12 Mikael Hallendal <micke@imendio.com>
1535 - Added service file reloading.
1536 Each service files directory is kept in an hash table in
1537 BusActivation and each BusActivationEntry knows what .service-file it
1538 was read from. So when you try to activate a service the bus will
1539 check if it's been updated, removed or if new .service-files has
1541 - Test code at the bottom for the service file reloading.
1542 * bus/test-main.c: (main):
1544 - added service reloading test.
1545 * dbus/dbus-sysdeps.c:
1546 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1548 2004-03-08 Michael Meeks <michael@ximian.com>
1550 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1551 bail immediately if disconnected, to avoid busy loop.
1553 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1554 cleanup cut/paste/inefficiency.
1556 2004-03-01 David Zeuthen <david@fubar.dk>
1558 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1559 bug where args were used twice. This bug resulted in a segfault
1560 on a Debian/PPC system when starting the messagebus daemon. Include
1561 dbus-sysdeps.h for DBUS_VA_COPY
1563 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1565 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1566 appropriate va_copy implementation. From GLib
1568 2004-02-24 Joe Shaw <joe@ximian.com>
1570 * bus/services.c (bus_registry_acquire_service): We need to pass
1571 in the service name to dbus_set_error() to prevent a crash.
1573 2003-12-26 Anders Carlsson <andersca@gnome.org>
1575 * AUTHORS: Reveal my True identity.
1577 2003-12-17 Mikael Hallendal <micke@imendio.com>
1579 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1580 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1582 2003-12-13 Mikael Hallendal <micke@imendio.com>
1584 * doc/TODO: Added not about better error check of configuration files.
1586 2003-12-02 Richard Hult <richard@imendio.com>
1588 * Update AFL version to 2.0 throughout the source files to reflect
1589 the update that was done a while ago.
1591 2003-12-02 Richard Hult <richard@imendio.com>
1593 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1594 wrote_dict_key to FALSE on the iter that the dict is appended to,
1595 just like when appending other types. Fixes a bug where a dict
1596 couldn't be put inside a dict.
1597 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1598 (message_iter_test, _dbus_message_test): Add test case for dict
1601 2003-12-01 David Zeuthen <david@fubar.dk>
1603 * python/dbus.py: Add the actual message when calling the reciever
1604 of a signal such that parameters can be inspected. Add the method
1605 remove_signal_receiver
1607 2003-11-26 Mikael Hallendal <micke@imendio.com>
1611 * glib/*.[ch]: Made ref functions return the pointer
1613 2003-11-25 Zack Rusin <zack@kde.org>
1615 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1617 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1620 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1621 the Integrator and to better fit with the server,
1623 2003-11-24 Zack Rusin <zack@kde.org>
1625 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1626 the integrator handles it now
1628 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1629 since QTimer wasn't really meant to be used the way DBusTimeout is
1631 2003-11-24 Zack Rusin <zack@kde.org>
1633 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1634 Integrator class which integrates D-BUS with the Qt event loop,
1636 * qt/connection.h, qt/connection.cpp: Move all the code which
1637 was dealing with D-BUS integration to the Integrator class,
1638 and start using Integrator,
1640 2003-11-23 Zack Rusin <zack@kde.org>
1642 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1645 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1646 switching namespaces to DBusQt, reworking the class,
1648 * Makefile.cvs: switching dependencies so that it matches KDE
1651 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1654 2003-11-19 Havoc Pennington <hp@redhat.com>
1658 * configure.in: bump version to 0.20
1660 * configure.in (have_qt): add yet another place to look for qt
1661 (someone hand trolltech a .pc file...)
1663 2003-11-01 Havoc Pennington <hp@redhat.com>
1665 * doc/dbus-specification.xml: add state machine docs on the auth
1666 protocol; just a first draft, I'm sure it's wrong.
1668 2003-10-28 David Zeuthen <david@fubar.dk>
1670 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1671 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1673 2003-10-28 Havoc Pennington <hp@redhat.com>
1675 * dbus/dbus-message.c (get_next_field): delete unused function
1677 2003-10-28 Havoc Pennington <hp@redhat.com>
1679 * bus/expirelist.c (do_expiration_with_current_time): detect
1680 failure of the expire_func due to OOM
1682 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1684 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1685 NoReply error that's now created by the bus when the service exits
1687 2003-10-28 Havoc Pennington <hp@redhat.com>
1689 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1690 tests for set_path, set_interface, set_member, etc.
1692 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1694 * dbus/dbus-message.c (set_string_field): always just delete and
1695 re-append the field; accept NULL for deletion
1696 (re_align_fields_recurse): reimplement
1698 2003-10-26 Havoc Pennington <hp@redhat.com>
1700 * dbus/dbus-connection.c: fix docs to properly describe the
1701 disconnected message
1702 (_dbus_connection_notify_disconnected): remove this function;
1703 we can't synchronously add the disconnected message, we have to
1704 do it after we've queued any remaining real messages
1705 (_dbus_connection_get_dispatch_status_unlocked): queue the
1706 disconnect message only if the transport has finished queueing all
1707 its real messages and is disconnected.
1708 (dbus_connection_disconnect): update the dispatch status here
1710 2003-10-22 Havoc Pennington <hp@redhat.com>
1712 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1714 * bus/connection.c (bus_transaction_send_from_driver): set the
1715 destination to the connection's base service
1717 2003-10-20 Havoc Pennington <hp@redhat.com>
1719 hmm, make check is currently not passing.
1721 * doc/dbus-specification.xml: add requirement that custom type
1722 names follow the same rules as interface names.
1724 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1725 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1728 * doc/dbus-specification.xml: update type codes to match
1729 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1730 CUSTOM. Add type OBJECT_PATH to the spec.
1732 2003-10-17 Havoc Pennington <hp@redhat.com>
1734 * bus/driver.c (create_unique_client_name): use "." as separator
1735 in base service names instead of '-'
1737 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1738 byte at the end of the string
1740 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1741 optimization macros since string validation seems to be a slow
1744 * doc/dbus-specification.xml: restrict valid
1745 service/interface/member/error names. Add test suite code for the
1748 * dbus/dbus-string.c: limit service/interface/member/error names
1751 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1752 format arg to verbose spew
1754 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1755 memory, return instead of g_error
1757 * test/test-service.c (path_message_func): support emitting a
1760 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1761 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1762 assuming the activation bus was the session bus so that services
1763 started manually will still register.
1764 (init_connections_unlocked): fix so that in OOM situation we get
1765 the same semantics when retrying the function
1767 * test/test-service.c (main): change to use path registration, to
1768 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1769 than DBUS_BUS_SESSION
1771 2003-10-16 Havoc Pennington <hp@redhat.com>
1773 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1775 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1776 coverage of the tests
1777 (coverage-report.txt): don't move the .da and .bbg files around
1779 2003-10-16 Havoc Pennington <hp@redhat.com>
1781 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1784 2003-10-16 Havoc Pennington <hp@redhat.com>
1786 * bus/connection.c (bus_pending_reply_expired): either cancel or
1788 (bus_connections_check_reply): use unlink, not remove_link, as we
1789 don't want to free the link; fixes double free mess
1791 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1792 where no reply was received
1794 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1797 * bus/signals.c (match_rule_matches): add special cases for the
1798 bus driver, so you can match on sender/destination for it.
1800 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1801 DBUS_PRINT_BACKTRACE is set
1803 * dbus/dbus-internals.c: add pid to assertion failure messages
1805 * dbus/dbus-connection.c: add message type code to the debug spew
1807 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1808 sender=foo not service=foo
1810 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1811 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1812 DBUS_ACTIVATION_ADDRESS instead
1814 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1815 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1817 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1820 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1821 (dbus_message_iter_get_object_path_array): new function (half
1822 finished, disabled for the moment)
1824 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1825 DBUS_MESSAGE_TYPE_ERROR
1827 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1828 avoid redirecting stderr to /dev/null
1829 (babysit): close stdin if not doing the "exit_with_session" thing
1831 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1832 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1833 stdout/stdin, so things don't get confused
1835 * bus/system.conf.in: fix to allow replies, I modified .conf
1836 instead of .conf.in again.
1838 2003-10-14 David Zeuthen <david@fubar.dk>
1840 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1841 argtype to arg_type when raising unknown arg type exception.
1842 Changed type list to reflect the changes in dbus-protocol.h so
1843 the bindings actually work.
1845 2003-10-14 Havoc Pennington <hp@redhat.com>
1847 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1848 to have a bug keeping it from outputting the .da files sometimes
1849 (string_get_string): don't append garbage nul bytes to the string.
1851 2003-10-15 Seth Nickell <seth@gnome.org>
1853 * python/Makefile.am:
1855 Include dbus_h_wrapper.h in the dist tarball.
1857 2003-10-14 Havoc Pennington <hp@redhat.com>
1859 * bus/bus.c (bus_context_check_security_policy): revamp this to
1860 work more sanely with new policy-based requested reply setup
1862 * bus/connection.c (bus_transaction_send_from_driver): set bus
1863 driver messages as no reply
1865 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1866 requested_reply attribute on allow/deny rules
1868 * bus/system.conf: add <allow requested_reply="true"/>
1870 * bus/driver.c (bus_driver_handle_message): fix check for replies
1871 sent to the bus driver, which was backward. How did this ever work
1872 at all though? I think I'm missing something.
1874 * dbus/dbus-message.c (decode_header_data): require error and
1875 method return messages to have a reply serial field to be valid
1876 (_dbus_message_loader_queue_messages): break up this function;
1877 validate that reply serial and plain serial are nonzero;
1878 clean up the OOM/error handling.
1879 (get_uint_field): don't return -1 from this
1880 (dbus_message_create_header): fix signed/unsigned bug
1882 * bus/connection.c (bus_connections_expect_reply): save serial of
1883 the incoming message, not reply serial
1885 2003-10-14 Havoc Pennington <hp@redhat.com>
1887 * bus/connection.c: implement pending reply tracking using
1890 * bus/bus.c (bus_context_check_security_policy): verify that a
1891 reply is pending in order to allow a reply to be sent. Deny
1892 messages of unknown type.
1894 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1896 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1897 (bus_context_get_reply_timeout): new
1899 2003-10-13 Seth Nickell <seth@gnome.org>
1901 * python/Makefile.am:
1903 Pass "make distcheck": remove a couple files from DIST_FILES
1904 that weren't included in the final version.
1906 2003-10-12 Havoc Pennington <hp@pobox.com>
1908 Added test code that 1) starts an actual bus daemon and 2) uses
1909 DBusGProxy; fixed bugs that were revealed by the test. Lots
1910 more testing possible, but this is the basic framework.
1912 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1913 empty proxy lists from the proxy list hash
1915 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1916 couple of return_if_fail checks
1918 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1919 to allocate, so everything is cleared to NULL as it should be.
1921 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1922 source as data to dbus_connection_set_timeout_functions() as the
1923 timeout functions expected
1925 * test/glib/run-test.sh: add a little script to start up a message
1926 bus and run tests using it
1928 * tools/dbus-launch.1: updates
1930 * tools/dbus-launch.c (main): add --config-file option
1932 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1933 that could never be reached.
1935 * dbus/dbus-message.c (dbus_message_new_method_return)
1936 (dbus_message_new_error, dbus_message_new_signal): set the
1937 no-reply-expected flag on all these. Redundant, but may
1938 as well be consistent.
1940 2003-10-11 Havoc Pennington <hp@pobox.com>
1942 * test/decode-gcov.c (function_solve_graph): make broken block
1943 graph a nonfatal error since it seems to be broken. Need to debug
1946 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1947 can't just check type > INVALID < LAST anymore
1949 * dbus/dbus-message.c (dbus_message_get_signature): new function
1950 (dbus_message_has_signature): new function
1951 (struct DBusMessage): add signature field (right now it isn't sent
1952 over the wire, just generated on the fly)
1953 (dbus_message_copy): copy the signature, and init strings to
1954 proper length to avoid some reallocs
1955 (dbus_message_iter_init_array_iterator): return void, since it
1957 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1958 (_dbus_message_loader_queue_messages): add silly temporary hack to
1959 fill in message->signature on load
1961 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1962 characters, so they are relatively human-readable.
1964 2003-10-11 Havoc Pennington <hp@pobox.com>
1966 * dbus/dbus-message.c (_dbus_message_test): add more test
1967 coverage, but #if 0 for now since they uncover a bug
1968 not fixed yet; I think in re_align_field_recurse()
1969 (re_align_field_recurse): add FIXME about broken assertion
1971 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1973 * bus/connection.c: share a couple code bits with expirelist.c
1975 * bus/expirelist.h, bus/expirelist.c: implement a generic
1976 expire-items-after-N-seconds facility, was going to share between
1977 expiring connections and replies, decided not to use for expiring
1978 connections for now.
1980 * COPYING: include AFL 2.0 (still need to change all the file headers)
1982 2003-10-09 Havoc Pennington <hp@redhat.com>
1984 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1985 gcc 3.3. Not that we do anything about it yet.
1987 * bus/signals.c (bus_match_rule_parse): impose max length on the
1990 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1992 2003-10-09 Havoc Pennington <hp@redhat.com>
1994 Make matching rules theoretically work (add parser).
1996 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1997 the case where destination is explicitly specified as bus driver
1998 and someone else is eavesdropping.
2000 * bus/policy.c (bus_client_policy_check_can_receive): fix up
2001 definition of eavesdropping and assertion
2003 * tools/dbus-send.c (main): use dbus_message_type_from_string
2005 * bus/signals.c (bus_match_rule_parse): implement
2007 * dbus/dbus-message.c (dbus_message_type_from_string): new
2009 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
2011 2003-10-02 Havoc Pennington <hp@pobox.com>
2013 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
2014 dbus_gproxy_oneway_call
2016 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
2017 (dbus_server_setup_with_g_main): fix to allow calling them more
2018 than once on the same args
2019 (dbus_bus_get_with_g_main): new function
2021 2003-10-02 Havoc Pennington <hp@redhat.com>
2023 * doc/dbus-tutorial.xml: write some stuff
2025 2003-09-29 Havoc Pennington <hp@pobox.com>
2027 * configure.in: split checks for Doxygen from XML docs, check for
2030 * doc/Makefile.am: XML-ify all the docs, and add a blank
2033 2003-09-29 Havoc Pennington <hp@pobox.com>
2035 * Merge dbus-object-names branch. To see the entire patch
2036 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
2037 it's huuuuge though.
2038 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
2040 2003-09-28 Havoc Pennington <hp@pobox.com>
2042 * HACKING: update to reflect new server
2044 2003-09-26 Seth Nickell <seth@gnome.org>
2047 * python/examples/example-signals.py:
2049 Start implementing some notions of signals. The API
2050 is really terrible, but they sort of work (with the
2051 exception of being able to filter by service, and to
2052 transmit signals *as* a particular service). Need to
2053 figure out how to make messages come from the service
2056 * python/dbus_bindings.pyx.in:
2058 Removed duplicate message_handler callbacks.
2060 2003-09-25 Havoc Pennington <hp@redhat.com>
2062 * bus/session.conf.in: fix my mess
2064 2003-09-25 Havoc Pennington <hp@pobox.com>
2066 * bus/session.conf.in: fix security policy, reported by Seth Nickell
2068 2003-09-25 Seth Nickell <seth@gnome.org>
2070 * python/examples/example-service.py:
2072 Johan notices complete wrong code in example-service, but
2073 completely wrong in a way that works exactly the same (!).
2074 Johan is confused, how could this possibly work? Example
2075 code fails to serve purpose of making things clear.
2078 2003-09-25 Mark McLoughlin <mark@skynet.ie>
2080 * doc/dbus-specification.sgml: don't require header fields
2081 to be 4-byte aligned and specify that fields should be
2082 distinguished from padding by the fact that zero is not
2085 * doc/TODO: remove re-alignment item and add item to doc
2086 the OBJECT_PATH type.
2088 * dbus/dbus-message.c:
2089 (HeaderField): rename the original member to value_offset
2090 and introduce a name_offset member to keep track of where
2091 the field actually begins.
2092 (adjust_field_offsets): remove.
2093 (append_int_field), (append_uint_field),
2094 (append_string_field): don't align the start of the header
2095 field to a 4-byte boundary.
2096 (get_next_field): impl finding the next marhsalled field
2097 after a given field.
2098 (re_align_field_recurse): impl re-aligning a number of
2099 already marshalled fields.
2100 (delete_field): impl deleting a field of any type and
2101 re-aligning any following fields.
2102 (delete_int_or_uint_field), (delete_string_field): remove.
2103 (set_int_field), (set_uint_field): no need to re-check
2104 that we have the correct type for the field.
2105 (set_string_field): ditto and impl re-aligning any
2107 (decode_header_data): update to take into account that
2108 the fields aren't 4-byte aligned any more and the new
2109 way to distinguish padding from header fields. Also,
2110 don't exit when there is too much header padding.
2111 (process_test_subdir): print the directory.
2112 (_dbus_message_test): add test to make sure a following
2113 field is re-aligned correctly after field deletion.
2115 * dbus/dbus-string.[ch]:
2116 (_dbus_string_insert_bytes): rename from insert_byte and
2117 allow the insert of multiple bytes.
2118 (_dbus_string_test): test inserting multiple bytes.
2120 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2121 warning note to docs about having to re-align any
2122 marshalled values following the string.
2124 * dbus/dbus-message-builder.c:
2125 (append_string_field), (_dbus_message_data_load):
2126 don't align the header field.
2128 * dbus/dbus-auth.c: (process_test_subdir): print the
2131 * test/break-loader.c: (randomly_add_one_byte): upd. for
2134 * test/data/invalid-messages/bad-header-field-alignment.message:
2137 * test/data/valid-messages/unknown-header-field.message: shove
2138 a dict in the unknown field.
2140 2003-09-25 Seth Nickell <seth@gnome.org>
2143 * python/dbus_bindings.pyx.in:
2145 Handle return values.
2147 * python/examples/example-client.py:
2148 * python/examples/example-service.py:
2150 Pass back return values from the service to the client.
2152 2003-09-24 Seth Nickell <seth@gnome.org>
2156 Connect Object methods (when you are sharing an object) up... pass
2157 in a list of methods to be shared. Sharing all the methods just
2158 worked out too weird. You can now create nice Services over the
2161 * python/dbus_bindings.pyx.in:
2163 Keep references to user_data tuples passed into C functions so
2164 Python doesn't garbage collect on us.
2166 Implement MethodReturn and Error subclasses of Message for creating
2167 DBusMessage's of those types.
2169 * python/examples/example-client.py:
2170 * python/examples/example-service.py:
2172 Simple example code showing both how create DBus services and objects,
2173 and how to use them.
2175 2003-09-23 Havoc Pennington <hp@pobox.com>
2177 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2179 2003-09-23 Havoc Pennington <hp@redhat.com>
2181 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2182 (dbus_gproxy_disconnect_signal): implement
2183 (dbus_gproxy_manager_remove_signal_match): implement
2184 (dbus_gproxy_manager_add_signal_match): implement
2185 (dbus_gproxy_oneway_call): implement
2187 2003-09-23 Havoc Pennington <hp@pobox.com>
2189 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2190 subclass. This means dropping the transparent thread safety of the
2191 proxy; you now need a separate proxy per-thread, or your own
2192 locking on the proxy. Probably right anyway.
2193 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2195 2003-09-22 Havoc Pennington <hp@redhat.com>
2197 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2199 2003-09-21 Seth Nickell <seth@gnome.org>
2201 First checkin of the Python bindings.
2203 * python/.cvsignore:
2204 * python/Makefile.am:
2205 * python/dbus_bindings.pyx.in:
2206 * python/dbus_h_wrapper.h:
2208 Pieces for Pyrex to operate on, building a dbus_bindings.so
2209 python module for low-level access to the DBus APIs.
2213 High-level Python module for accessing DBus objects.
2218 Build stuff for the python bindings.
2222 Extra macro needed for finding the Python C header files.
2224 2003-09-21 Havoc Pennington <hp@pobox.com>
2226 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2227 implementing the proxy manager, didn't get very far.
2229 * dbus/dbus-bus.c (dbus_bus_add_match): new
2230 (dbus_bus_remove_match): new
2232 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2233 path_name argument; adjust the other not-yet-implemented
2234 gproxy constructors to be what I think they should be.
2236 2003-09-21 Havoc Pennington <hp@pobox.com>
2238 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2239 by default for message bus connections.
2241 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2242 exit_on_disconnect flag is set and we process the disconnected
2244 (dbus_connection_set_exit_on_disconnect): new function
2246 2003-09-21 Havoc Pennington <hp@pobox.com>
2248 Get matching rules mostly working in the bus; only actually
2249 parsing the rule text remains. However, the client side of
2250 "signal connections" hasn't been started, this patch is only the
2253 * dbus/dispatch.c: fix for the matching rules changes
2255 * bus/driver.c (bus_driver_handle_remove_match)
2256 (bus_driver_handle_add_match): send an ack reply from these
2259 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2260 arguments, reported by Seth Nickell
2262 * bus/config-parser.c (append_rule_from_element): support
2263 eavesdrop=true|false attribute on policies so match rules
2264 can be prevented from snooping on the system bus.
2266 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2267 and "destination" in attribute names; fix some docs bugs;
2268 add eavesdrop=true|false attribute
2270 * bus/driver.c (bus_driver_handle_add_match)
2271 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2274 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2275 rid of broadcast service concept, signals are just always broadcast
2277 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2278 mostly implement matching rules stuff (currently only exposed as signal
2281 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2283 * doc/dbus-specification.sgml: Change the header field name
2284 to be an enum and update the rest of the spec to reference
2285 the fields using the conventinal name.
2287 * dbus/dbus-protocol.h: update to reflect the spec.
2289 * doc/TODO: add item to remove the 4 byte alignment requirement.
2291 * dbus/dbus-message.c: Remove the code to generalise the
2292 header/body length and serial number header fields as named
2293 header fields so we can reference field names using the
2295 (append_int_field), (append_uint_field), (append_string_field):
2296 Append the field name as a byte rather than four chars.
2297 (delete_int_or_uint_field), (delete_string_field): reflect the
2298 fact that the field name and typecode now occupy 4 bytes instead
2300 (decode_string_field), (decode_header_data): update to reflect
2301 protocol changes and move the field specific encoding from
2302 decode_string_field() back into decode_header_data().
2304 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2305 Add utility to aid debugging.
2307 * dbus/dbus-message-builder.c:
2308 (append_string_field), (_dbus_message_data_load): Update to
2309 reflect protocol changes; Change the FIELD_NAME directive
2310 to HEADER_FIELD and allow it to take the field's conventional
2311 name rather than the actual value.
2313 * test/data/*/*.message: Update to use HEADER_FIELD instead
2314 of FIELD_NAME; Always align the header on an 8 byte boundary
2315 *before* updating the header length.
2317 2003-09-15 Havoc Pennington <hp@pobox.com>
2319 * dbus/dbus-pending-call.c: add the get/set object data
2320 boilerplate as for DBusConnection, etc. Use generic object data
2321 for the notify callback.
2323 * glib/dbus-gparser.c (parse_node): parse child nodes
2325 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2327 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2328 contain functions shared between the convenience lib and the
2331 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2332 -export-symbols-regex to the GLib library
2334 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2335 fix the locking in here, and add a default handler for
2336 Introspect() that just returns sub-nodes.
2338 2003-09-14 Havoc Pennington <hp@pobox.com>
2340 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2341 rather than gfoo consistent
2343 * glib/dbus-gproxy.h: delete for now, move contents to
2344 dbus-glib.h, because the include files don't work right since we
2345 aren't in the dbus/ subdir.
2347 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2348 (dbus_gproxy_end_call): finish
2349 (dbus_gproxy_begin_call): finish
2351 * glib/dbus-gmain.c (dbus_set_g_error): new
2353 * glib/dbus-gobject.c (handle_introspect): include information
2354 about child nodes in the introspection
2356 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2357 function to help in implementation of introspection
2359 * dbus/dbus-object-tree.c
2360 (_dbus_object_tree_list_registered_and_unlock): new function
2362 2003-09-12 Havoc Pennington <hp@pobox.com>
2364 * glib/dbus-gidl.h: add common base class for all the foo_info
2367 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2370 * test/Makefile.am: try test srcdir -ef . in addition to test
2371 srcdir = ., one of them should work (yeah lame)
2373 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2376 * glib/dbus-gparser.h: make description_load routines return
2377 NodeInfo* not Parser*
2379 * Makefile.am (SUBDIRS): build test dir after all library dirs
2381 * configure.in: add GTK+ detection
2383 2003-09-07 Havoc Pennington <hp@pobox.com>
2385 * Make Doxygen contented.
2387 2003-09-07 Havoc Pennington <hp@pobox.com>
2389 * doc/dbus-specification.sgml: more updates
2391 2003-09-06 Havoc Pennington <hp@pobox.com>
2393 * doc/dbus-specification.sgml: partial updates
2395 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2396 zillionth time; hopefully I edited the right file this time.
2398 * bus/config-parser.c (append_rule_from_element): support
2399 send_type, send_path, receive_type, receive_path
2401 * bus/policy.c: add message type and path to the list of things
2402 that can be "firewalled"
2404 2003-09-06 Havoc Pennington <hp@pobox.com>
2406 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2407 (dbus_connection_register_object_path): make this not handle
2408 messages to paths below the given path
2410 2003-09-03 Havoc Pennington <hp@pobox.com>
2412 * test/glib/Makefile.am: add this with random glib-linked test
2415 * glib/Makefile.am: remove the random test programs from here,
2416 leave only the unit tests
2418 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2419 uscore/javacaps conversion, and fix
2420 (get_object_property, set_object_property): change to .NET
2421 convention for mapping props to methods, set_FooBar/get_FooBar,
2422 since one language has such a convention we may as well copy it.
2423 Plus real methods in either getFooBar or get_foo_bar style won't
2424 collide with this convention.
2426 2003-09-01 Havoc Pennington <hp@pobox.com>
2428 * glib/dbus-gparser.c: implement
2430 * glib/dbus-gobject.c: start implementing skeletons support
2432 * configure.in: when disabling checks/assert, also define
2433 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2435 2003-09-01 Havoc Pennington <hp@pobox.com>
2437 * glib/Makefile.am: rearrange a bunch of files and get "make
2438 check" framework set up
2440 2003-08-31 Havoc Pennington <hp@pobox.com>
2442 * fix build with --disable-tests
2444 2003-08-30 Havoc Pennington <hp@pobox.com>
2446 * dbus/dbus-connection.c: purge DBusMessageHandler
2448 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2449 use callbacks everywhere
2451 2003-08-30 Havoc Pennington <hp@pobox.com>
2453 * test/data/valid-config-files/system.d/test.conf: change to
2454 root for the user so warnings don't get printed
2456 * dbus/dbus-message.c: add dbus_message_get_path,
2457 dbus_message_set_path
2459 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2460 dispatching to a path
2462 * dbus/dbus-string.c (_dbus_string_validate_path): add
2464 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2465 (_dbus_marshal_object_path): implement
2467 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2468 to contain the path to the target object
2469 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2470 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2472 2003-08-30 Havoc Pennington <hp@pobox.com>
2474 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2476 2003-08-29 Havoc Pennington <hp@pobox.com>
2478 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2480 (struct DBusObjectSubtree): shrink this
2481 a lot, since we may have a lot of them
2482 (_dbus_object_tree_free_all_unlocked): implement
2483 (_dbus_object_tree_dispatch_and_unlock): implement
2485 2003-08-29 Havoc Pennington <hp@pobox.com>
2487 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2489 2003-08-28 Havoc Pennington <hp@pobox.com>
2493 * dbus/dbus-connection.c: port to no ObjectID, create a
2494 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2496 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2497 everything except UnregisterFunction and MessageFunction
2499 * dbus/dbus-marshal.c: port away from DBusObjectID,
2500 add DBUS_TYPE_OBJECT_PATH
2502 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2503 dbus/dbus-objectid.[hc]: remove these, we are moving to
2504 path-based object IDs
2506 2003-08-25 Havoc Pennington <hp@pobox.com>
2508 Just noticed that dbus_message_test is hosed, I wonder when I
2509 broke that. I thought make check was passing earlier...
2511 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2512 container tree, will replace most of dbus-object-registry
2514 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2517 2003-08-19 Havoc Pennington <hp@pobox.com>
2519 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2520 (dbus_message_is_error): fix this function
2522 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2525 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2526 reflect clarified man page
2527 (bus_client_policy_check_can_send): ditto
2529 * bus/session.conf.in: fixup
2531 * bus/system.conf.in: fixup
2533 2003-08-18 Havoc Pennington <hp@redhat.com>
2535 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2537 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2538 dumb bug created earlier (wrong order of args to
2539 decode_header_data())
2541 * tools/dbus-send.c: port
2543 * tools/dbus-print-message.c (print_message): port
2545 * test/data/*messages: port all messages over
2547 * dbus/dbus-message-builder.c: support including
2550 * bus/driver.c: port over
2552 * bus/dispatch.c: port over to new stuff
2554 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2555 rename disconnect signal to "Disconnected"
2557 2003-08-17 Havoc Pennington <hp@pobox.com>
2559 This doesn't compile yet, but syncing up so I can hack on it from
2560 work. What are branches for if not broken code? ;-)
2562 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2563 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2564 DBUS_HEADER_FIELD_ERROR_NAME
2566 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2567 for the interface+member pairs
2568 (string_hash): change to use g_str_hash algorithm
2569 (find_direct_function, find_string_function): refactor these to
2572 * dbus/dbus-message.c: port all of this over to support
2573 interface/member fields instead of name field
2575 * dbus/dbus-object-registry.c: port over
2577 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2578 from _dbus_string_validate_name
2580 * bus/dbus-daemon-1.1: change file format for the
2581 <deny>/<allow> stuff to match new message naming scheme
2583 * bus/policy.c: port over
2585 * bus/config-parser.c: parse new format
2587 2003-08-16 Havoc Pennington <hp@pobox.com>
2589 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2592 * glib/dbus-gproxy.c: some hacking
2594 2003-08-15 Havoc Pennington <hp@redhat.com>
2596 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2598 * dbus/dbus-connection.c
2599 (dbus_connection_send_with_reply_and_block): factor out internals;
2600 change to convert any error replies to DBusError instead of
2601 returning them as a message
2603 2003-08-15 Havoc Pennington <hp@pobox.com>
2605 * dbus/dbus-connection.c,
2606 dbus/dbus-pending-call.c: Finish the pending call stuff
2608 2003-08-14 Havoc Pennington <hp@redhat.com>
2610 * dbus/dbus-pending-call.c: start on new object that will replace
2611 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2614 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2615 with remote interfaces
2617 * dbus/dbus-gidl.c: do the boring boilerplate in here
2619 2003-08-12 Havoc Pennington <hp@pobox.com>
2621 * bus/dispatch.c (bus_dispatch): make this return proper
2622 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2624 * dbus/dbus-errors.c (dbus_set_error): use
2625 _dbus_string_append_printf_valist
2627 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2628 (_dbus_string_append_printf): new
2630 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2633 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2634 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2635 message is unhandled.
2637 2003-08-11 Havoc Pennington <hp@pobox.com>
2639 * bus/test.c (client_disconnect_handler): change to return
2640 HANDLED (would have been REMOVE_MESSAGE)
2642 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2643 HANDLED/NOT_YET_HANDLED instead of
2644 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2647 2003-08-10 Havoc Pennington <hp@pobox.com>
2649 * tools/dbus-send.c (main): add --type argument, for now
2650 supporting only method_call and signal types.
2652 * tools/dbus-print-message.c: print message type
2654 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2655 init connection->objects
2657 * doc/dbus-specification.sgml: fix sgml
2659 * bus/*.c: port over to object-instance API changes
2661 * test/test-service.c: ditto
2663 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2664 name, we will have to fix up the rest of the code to also handle
2666 (dbus_message_new): generic message-creation call
2667 (set_string_field): allow appending name field
2669 2003-08-06 Havoc Pennington <hp@pobox.com>
2671 * dbus/dbus-object-registry.c: implement signal connection
2674 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2676 * dbus/dbus-internals.c (_dbus_memdup): new function
2678 2003-08-02 Havoc Pennington <hp@pobox.com>
2680 * dbus/dbus-message.c (dbus_message_get_no_reply)
2681 (dbus_message_set_no_reply): add these and remove
2682 set_is_error/get_is_error
2684 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2685 remove the ERROR flag, since there's now an ERROR type
2687 2003-08-01 Havoc Pennington <hp@pobox.com>
2689 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2692 * dbus/dbus-message.c (dbus_message_get_type): new function
2694 * doc/dbus-specification.sgml: add "type" byte to messages
2696 2003-08-01 Havoc Pennington <hp@pobox.com>
2698 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2699 a message type enum to distinguish kinds of message
2700 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2701 that need not be replied to
2703 2003-08-01 Havoc Pennington <hp@pobox.com>
2705 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2706 (unpack_8_octets): fix no-64-bit-int bug
2708 * dbus/dbus-object-registry.c (validate_id): validate the
2709 connection ID bits, not just the instance ID.
2711 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2712 the connection-global 33 bits of the object ID
2714 * dbus/dbus-object-registry.c (info_from_entry): fill in
2715 object ID in the new way
2717 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2718 define server/client/instance bits.
2720 2003-07-30 Havoc Pennington <hp@pobox.com>
2722 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2725 2003-07-13 Havoc Pennington <hp@pobox.com>
2727 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2728 fields to DBusObjectVTable and DBusObjectInfo
2730 2003-07-12 Havoc Pennington <hp@pobox.com>
2732 * dbus/dbus-object-registry.c: implement unit test,
2733 fix bugs discovered in process
2735 * dbus/dbus-connection.c: remove handler_table and
2736 register_handler(), add DBusObjectRegistry usage
2738 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2739 (dbus_object_id_set_null): new functions
2741 2003-07-08 Havoc Pennington <hp@pobox.com>
2743 * dbus/dbus-object.c: implement some of this
2745 * dbus/dbus-object-registry.c
2746 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2748 (_dbus_object_registry_new): handle OOM
2750 2003-07-08 Havoc Pennington <hp@pobox.com>
2752 * dbus/dbus-object.h: sketch out an API for registering objects
2753 with a connection, that allows us to use as little as 24 bytes
2754 per object and lets application code represent an object in
2755 any conceivable way.
2757 * dbus/dbus-object-registry.c: implement the hard bits of the
2758 DBusConnection aspect of object API. Not yet wired up.
2760 2003-07-06 Havoc Pennington <hp@pobox.com>
2762 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2763 (_dbus_marshal_object_id): new
2764 (_dbus_demarshal_object_id): new
2765 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2766 consolidate identical switch cases. Don't conditionalize handling
2767 of DBUS_TYPE_UINT64, need to handle the type always.
2768 (_dbus_marshal_validate_arg): consolidate identical cases, and
2769 handle DBUS_TYPE_OBJECT_ID
2771 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2773 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2775 2003-09-28 Havoc Pennington <hp@pobox.com>
2779 2003-09-28 Havoc Pennington <hp@pobox.com>
2781 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2782 to work with Debian db2html
2784 2003-09-28 Havoc Pennington <hp@pobox.com>
2786 * configure.in: 0.13
2788 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2789 stylesheet-images for benefit of Debian
2791 Change back to using filesystem-linked sockets for the system
2792 bus, so only root can create the default system bus address.
2794 * bus/system.conf.in: change to use
2795 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2797 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2800 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2801 here, and AC_DEFINE DBUS_SYSTEM_PATH
2803 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2806 * doc/busconfig.dtd:
2809 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2811 * doc/dbus-specification.sgml:
2812 Add activation reply values.
2814 2003-08-05 Havoc Pennington <hp@redhat.com>
2816 * configure.in: 0.12
2818 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2820 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2821 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2822 (add_watch), (remove_watch), (create_source):
2823 Refcount fds, fixes some reentrancy issues.
2825 2003-07-30 Havoc Pennington <hp@redhat.com>
2827 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2828 bus address to be abstract if we have abstract sockets
2832 2003-07-28 Havoc Pennington <hp@redhat.com>
2834 * bus/messagebus.in: fix to avoid processname/servicename
2835 confusion, from Michael Kearey
2836 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2838 2003-07-23 Havoc Pennington <hp@pobox.com>
2840 * dbus/dbus-message.c (dbus_message_iter_get_named):
2841 fix from Andy Hanton to remove broken "+1"
2843 2003-07-16 Havoc Pennington <hp@pobox.com>
2845 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2846 babysitter process, as suggested by Thomas Leonard, so
2847 an "eval `dbus-launch --exit-with-session`" will actually
2850 2003-07-16 Havoc Pennington <hp@pobox.com>
2852 * configure.in: print out EXPANDED_* variables in the summary at
2853 the end; clean up the code that computes EXPANDED_ variables and
2854 get the ones using exec_prefix right. Should make things work
2855 when you build without --prefix
2857 2003-06-29 Havoc Pennington <hp@pobox.com>
2859 * mono/Test.cs (class Test): fire up a main loop and run it
2861 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2862 done once, the app has to do it
2864 2003-06-26 Havoc Pennington <hp@pobox.com>
2866 * mono/Connection.cs: set up connection with the glib main loop
2868 2003-07-01 Havoc Pennington <hp@redhat.com>
2870 * doc/dbus-specification.sgml: clarify the format of a type code,
2871 change suggested by Jim Blandy
2873 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2876 * tools/Makefile.am: Don't assume srcdir == builddir.
2878 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2879 the allocated block.
2880 (_dbus_memory_test): New function.
2881 * dbus/dbus-test.h: Add _dbus_memory_test ().
2882 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2884 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2886 (dbus_message_new): Remove obsolete @todo.
2888 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2889 (_dbus_marshal_set_uint64): Fix comment.
2891 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2892 hardcode FIELD_REPLY_SERIAL.
2894 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2895 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2897 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2898 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2900 2003-06-24 Havoc Pennington <hp@pobox.com>
2902 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2904 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2910 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2911 * gcj/org/.cvsignore:
2912 * gcj/org/Makefile.am:
2913 * gcj/org/freedesktop/.cvsignore:
2914 * gcj/org/freedesktop/Makefile.am:
2915 * gcj/org/freedesktop/dbus/.cvsignore:
2916 * gcj/org/freedesktop/dbus/Makefile.am:
2917 * gcj/org/freedesktop/dbus/Message.java: (Message),
2919 * gcj/org/freedesktop/dbus/natMessage.cc:
2920 Fix the build system.
2922 2003-06-22 Havoc Pennington <hp@pobox.com>
2924 * mono/Connection.cs: add more bindings
2926 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2929 2003-06-22 Havoc Pennington <hp@pobox.com>
2931 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2932 Start wrapping more stuff.
2934 2003-06-22 Havoc Pennington <hp@pobox.com>
2936 * mono/Message.cs: implement Message.Wrap() that ensures we only
2937 have a single C# wrapper per DBusMessage, assuming it works which
2938 it probably doesn't.
2940 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2941 (dbus_message_free_data_slot): new
2942 (dbus_message_set_data): new
2943 (dbus_message_get_data): new
2945 2003-06-22 Havoc Pennington <hp@pobox.com>
2947 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2948 (_dbus_data_slot_allocator_alloc): rework these to keep a
2949 reference count on each slot and automatically manage a global
2950 slot ID variable passed in by address
2952 * bus/bus.c: convert to new dataslot API
2954 * dbus/dbus-bus.c: convert to new dataslot API
2956 * dbus/dbus-connection.c: convert to new dataslot API
2958 * dbus/dbus-server.c: convert to new dataslot API
2960 * glib/dbus-gmain.c: ditto
2964 * bus/connection.c: ditto
2966 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2968 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2969 after the gcj checks so that the correct configuration tags
2970 will be added to libtool.
2972 * dbus-glib-1.pc.in: No need to specify any includes since
2973 dbus-1.pc.in has those.
2975 2003-06-22 Havoc Pennington <hp@pobox.com>
2977 * mono/*, gcj/*, configure.in, Makefile.am:
2978 Check in makefiles and subdirs for mono and gcj bindings.
2979 Neither binding actually exists, just trying to get through
2980 all the build and other boring bits.
2982 2003-06-21 Philip Blundell <philb@gnu.org>
2984 * tools/dbus-monitor.1: Updated.
2986 * tools/dbus-send.1: Likewise.
2988 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2990 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2991 for hangup and error after checking read so we won't discard
2992 pending data if both hangup and read are set.
2994 2003-06-19 Philip Blundell <philb@gnu.org>
2996 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2998 * tools/dbus-send.c: Accept both --system and --session.
3000 * tools/dbus-monitor.c: Same here.
3002 2003-06-19 Anders Carlsson <andersca@codefactory.se>
3004 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
3005 from C++ (Patch by Miloslav Trmac).
3007 2003-06-15 Joe Shaw <joe@assbarn.com>
3009 * configure.in: Check for socklen_t.
3011 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
3013 * test/test-segfault.c: Add #include <sys/time.h>
3015 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
3016 dbus-launch needs it.
3018 2003-06-09 Havoc Pennington <hp@redhat.com>
3020 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
3021 SUN_LEN, it breaks abstract socket usage
3023 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
3026 2003-06-04 Havoc Pennington <hp@pobox.com>
3028 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
3029 using unix:abstract=/foo, and when listening in a tmpdir
3030 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
3032 * dbus/dbus-transport.c (_dbus_transport_open): support
3035 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3036 support abstract sockets
3038 * dbus/dbus-transport-unix.c
3039 (_dbus_transport_new_for_domain_socket): support abstract sockets
3041 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
3042 toggle as an argument, implement abstract namespace support
3043 (_dbus_listen_unix_socket): ditto
3045 * configure.in: add --enable-abstract-sockets and implement
3046 a configure check for autodetection of the right value.
3048 2003-06-01 Havoc Pennington <hp@pobox.com>
3050 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
3051 in /tmp (though on Linux this will end up being useless,
3052 when we add abstract namespace support)
3054 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
3057 2003-05-28 Colin Walters <walters@verbum.org>
3059 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
3061 2003-05-18 Anders Carlsson <andersca@codefactory.se>
3063 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
3065 2003-05-17 Colin Walters <walters@gnu.org>
3067 * tools/dbus-send.c: Don't exit with an error code if --help was
3068 passed. Default to using the session bus instead of the system
3071 * tools/dbus-launch.c: Ditto.
3073 * tools/dbus-monitor.c: Ditto.
3075 * tools/dbus-send.1: Update with new arguments.
3077 * tools/dbus-launch.c: Emit code to export variables. New
3078 arguments -s and -c to specify shell syntax, and a bit of code to
3079 autodetect syntax. Also, allow specifying a program to run.
3081 * tools/dbus-launch.1: Update with new arguments.
3083 * tools/dbus-send.1: Ditto.
3085 * tools/dbus-monitor.1: Ditto.
3087 2003-05-17 Havoc Pennington <hp@pobox.com>
3089 * bus/config-parser.c (merge_included): merge in policies from
3090 child configuration file.
3092 * bus/policy.c (bus_policy_merge): function to merge two policies
3095 2003-05-16 Havoc Pennington <hp@redhat.com>
3097 * dbus/dbus-connection.c: disable verbose lock spew
3099 * tools/dbus-send.c: add --print-reply command line option
3101 * tools/dbus-print-message.h (print_message): new util function
3102 shared by dbus-send and dbus-monitor
3104 * tools/dbus-monitor.c (handler_func): exit on disconnect
3106 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3107 disconnected, don't try to use the read_watch
3109 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3110 so we can find this bug more easily
3112 2003-05-16 Havoc Pennington <hp@redhat.com>
3114 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3115 NULL as DBusHashTable is annoyingly likely to do.
3117 2003-05-16 Colin Walters <walters@verbum.org>
3119 * tools/dbus-monitor.c: Add --session argument and usage()
3122 * tools/dbus-monitor.1: Update with new --session arg.
3124 * bus/Makefile.am (install-data-hook): Create
3125 $(libdir)/dbus-1.0/services so that the session bus is happy.
3127 2003-05-15 Havoc Pennington <hp@redhat.com>
3129 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3130 on non-x86. ifdef's are evil.
3132 2003-05-15 Havoc Pennington <hp@redhat.com>
3134 * configure.in: 0.11
3138 * bus/Makefile.am (initddir): apparently we are supposed to put
3139 init scripts in /etc/rc.d/init.d not /etc/init.d
3141 * bus/Makefile.am: remove the "you must --enable-tests to make
3142 check" as it broke distcheck
3144 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3146 2003-05-13 James Willcox <jwillcox@gnome.org>
3149 * bus/activation.c: (bus_activation_service_created),
3150 (bus_activation_activate_service):
3151 * bus/driver.c: (bus_driver_send_service_deleted),
3152 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3153 (bus_driver_send_service_acquired),
3154 (bus_driver_send_welcome_message),
3155 (bus_driver_handle_list_services):
3156 * bus/session.conf.in:
3157 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3158 (dbus_bus_service_exists), (dbus_bus_activate_service):
3161 Add some convenience API which lets you activate a service, and did a
3162 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3163 and dbus_message_get_args()
3165 2003-05-11 Havoc Pennington <hp@pobox.com>
3167 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3168 calling _dbus_marshal_validate_arg() for every byte in a byte
3171 * dbus/dbus-message-handler.c: use atomic reference counting to
3172 reduce number of locks slightly; the global lock in here sucks
3174 * dbus/dbus-connection.c
3175 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3176 update_dispatch_status that can be called with lock held; then use
3177 in a couple places to reduce locking/unlocking
3178 (dbus_connection_send): hold the lock over the whole function
3179 instead of acquiring it twice.
3181 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3183 * bus/connection.c (bus_connections_setup_connection): fix access
3184 to already-freed memory.
3186 * dbus/dbus-connection.c: keep a little cache of linked list
3187 nodes, to avoid using the global linked list alloc lock in the
3188 normal send-message case. Instead we just use the connection lock
3189 that we already have to take.
3191 * dbus/dbus-list.c (_dbus_list_find_last): new function
3193 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3194 change to use a struct for the atomic type; fix docs,
3195 they return value before increment, not after increment.
3197 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3198 (_dbus_string_append_8_aligned): new functions to try to
3199 microoptimize this operation.
3200 (reallocate_for_length): break this out of set_length(), to
3201 improve profile info, and also so we can consider inlining the
3204 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3205 strings with some preallocation, cuts down on our calls to realloc
3206 a fair bit. Though if we can get the "move entire string to empty
3207 string" optimization below to kick in here, it would be better.
3209 * dbus/dbus-string.c (_dbus_string_move): just call
3210 _dbus_string_move_len
3211 (_dbus_string_move_len): add a special case for moving
3212 an entire string into an empty string; we can just
3213 swap the string data instead of doing any reallocs.
3214 (_dbus_string_init_preallocated): new function
3216 2003-05-11 Havoc Pennington <hp@pobox.com>
3218 Write a "test-profile" that does echo client-server with threads;
3219 profile reveals lock contention, memcpy/realloc of buffers, and
3220 UTF-8 validation as hot spots. 20% of lock contention eliminated
3221 with dbus_atomic_inc/dec implementation on x86. Much remaining
3222 contention is global mempool locks for GList and DBusList.
3224 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3227 * dbus/dbus-connection.c (struct DBusConnection): use
3228 dbus_atomic_t for the reference count
3230 * dbus/dbus-message.c (struct DBusMessage): declare
3231 dbus_atomic_t values as volatile
3233 * configure.in: code to detect ability to use atomic integer
3234 operations in assembly, from GLib patch
3236 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3237 time, tired of it being wrong in threads and forked processes
3239 * glib/test-profile.c: a little program to bounce messages back
3240 and forth between threads and eat CPU
3242 * dbus/dbus-connection.c: add debug spew macros for debugging
3243 thread locks; include config.h at top; fix deadlock in
3244 dbus_connection_flush()
3246 2003-05-08 Havoc Pennington <hp@pobox.com>
3248 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3249 data from getting written, and there wasn't a good reason to
3252 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3253 dbus_verbose lines in test coverage
3254 (main): add list of functions sorted by # of untested blocks
3255 to the coverage report
3257 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3259 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3261 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3262 extend test coverage
3264 * test/data/auth/cancel.auth-script: test canceling an
3267 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3268 aren't used. in CVS history if we end up needing them.
3270 2003-05-04 Havoc Pennington <hp@pobox.com>
3272 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3275 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3276 function, which assumed length was in # of strings, not bytes
3278 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3281 * dbus/dbus-connection.c
3282 (_dbus_connection_queue_received_message): disable function for
3283 now, we are only using it in test mode
3285 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3286 remove a mistaken FIXME
3288 2003-05-04 Havoc Pennington <hp@pobox.com>
3290 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3291 unlock mutex on successful return, patch from Anders Gustafsson
3293 2003-05-04 Havoc Pennington <hp@pobox.com>
3295 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3298 2003-05-04 Havoc Pennington <hp@pobox.com>
3300 * tools/dbus-launch.c: implement
3302 * bus/main.c (main), bus/bus.c (bus_context_new):
3303 implement --print-pid and --fork
3305 2003-05-03 Havoc Pennington <hp@redhat.com>
3307 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3308 the address had no value, and add to test suite. Fix and
3309 regression test from Miloslav Trmac
3311 2003-05-03 Havoc Pennington <hp@pobox.com>
3313 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3314 watch is invalid when handled
3316 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3317 dbus-launch utility to launch the bus from a shell script. Didn't
3318 actually implement dbus-launch yet, it's just a placeholder still.
3320 2003-05-03 Havoc Pennington <hp@pobox.com>
3322 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3323 daemon; also documents daemon config file, so replaces
3324 doc/config-file.txt. Corrected some stuff from config-file.txt in
3325 the process of moving it.
3327 2003-05-03 Havoc Pennington <hp@pobox.com>
3329 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3332 2003-05-03 Colin Walters <walters@verbum.org>
3334 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3335 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3337 * Makefile.am: Update to use new .pc versioning scheme.
3339 2003-05-02 Havoc Pennington <hp@redhat.com>
3341 * bus/system.conf.in: allow send/receive to/from message bus
3344 2003-04-30 Havoc Pennington <hp@redhat.com>
3346 * configure.in: print a note when building with unit tests and
3349 2003-04-30 Havoc Pennington <hp@redhat.com>
3351 * Makefile.am: add a check-local that complains if you didn't
3352 configure with --enable-tests
3354 2003-04-29 Havoc Pennington <hp@redhat.com>
3356 * glib/dbus-gmain.c: docs cleanups
3358 * dbus/dbus-types.h: add docs on int64 types
3360 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3361 public API docs section
3363 2003-04-29 Havoc Pennington <hp@redhat.com>
3365 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3366 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3367 parallel install API version, not with the D-BUS package version.
3369 * HACKING: move some of README over here
3371 * README: updates, and document API/ABI policy
3373 * configure.in: reindentation
3375 2003-04-29 Havoc Pennington <hp@redhat.com>
3377 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3378 to use this library" to be sure people have the right
3381 2003-04-28 Havoc Pennington <hp@redhat.com>
3383 * configure.in: add --enable-docs which by default is auto yes if
3384 doxygen and db2html found, no otherwise; but can be forced on/off
3386 * doc/Makefile.am: conditionalize whether to build docs on
3389 2003-04-28 Havoc Pennington <hp@redhat.com>
3391 * configure.in: 0.10
3395 * bus/system.conf.in: add <includedir>system.d</includedir>
3397 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3398 username was provided but not uid
3400 * bus/config-parser.c (struct BusConfigParser): keep track of
3401 whether the parser is toplevel or was included; change some
3402 of the error handling if it's included.
3404 2003-04-27 Havoc Pennington <hp@pobox.com>
3408 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3409 report correct status if we finish processing authentication
3410 inside this function.
3412 * bus/activation.c (try_send_activation_failure): use
3413 bus_transaction_send_error_reply
3415 * bus/connection.c (bus_connection_get_groups): return an error
3416 explaining the problem
3418 * bus/bus.c (bus_context_check_security_policy): implement
3419 restriction here that inactive connections can only send the
3420 hello message. Also, allow bus driver to send anything to
3423 * bus/connection.c (bus_connection_complete): create the
3424 BusClientPolicy here instead of on-demand.
3425 (bus_connection_get_policy): don't return an error
3427 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3428 sender field in message being replied to
3430 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3431 causing it to return FALSE always
3433 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3434 we checked sender rather than destination
3436 2003-04-25 Havoc Pennington <hp@redhat.com>
3438 test suite is slightly hosed at the moment, will fix soon
3440 * bus/connection.c (bus_connections_expire_incomplete): fix to
3441 properly disable the timeout when required
3442 (bus_connection_set_name): check whether we can remove incomplete
3443 connections timeout after we complete each connection.
3445 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3446 probably still broken.
3448 * bus/services.c (bus_registry_acquire_service): implement max
3449 number of services owned, and honor allow/deny rules on which
3450 services a connection can own.
3452 * bus/connection.c (bus_connection_get_policy): report errors here
3454 * bus/activation.c: implement limit on number of pending
3457 2003-04-25 Havoc Pennington <hp@redhat.com>
3459 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3460 where we used >= 0 instead of != DBUS_UID_UNSET.
3462 2003-04-25 Havoc Pennington <hp@redhat.com>
3464 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3465 were toggled without add/remove, fix from Anders Gustafsson
3467 2003-04-24 Havoc Pennington <hp@redhat.com>
3469 * test/data/valid-config-files/basic.conf: add <limit> tags to
3472 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3473 <limit> tag in configuration file.
3475 2003-04-24 Havoc Pennington <hp@redhat.com>
3477 * bus/dispatch.c: somehow missed some name_is
3479 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3480 (_dbus_timeout_set_interval): new
3482 * bus/connection.c (bus_connections_setup_connection): record time
3483 when each connection is first set up, and expire them after the
3484 auth timeout passes.
3486 2003-04-24 Havoc Pennington <hp@redhat.com>
3488 * dbus/dbus-message.c (dbus_message_name_is): rename
3489 (dbus_message_service_is): rename
3490 (dbus_message_sender_is): rename
3491 (dbus_message_get_service): rename
3493 2003-04-24 Havoc Pennington <hp@redhat.com>
3495 * configure.in: add --enable-checks
3497 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3499 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3500 to use thread locks.
3501 (_dbus_connection_handler_destroyed_locked): move some private
3502 functions into proper docs group
3504 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3505 _dbus_return_val_if_fail
3507 Throughout: use dbus_return_if_fail
3509 2003-04-23 James Willcox <jwillcox@gnome.org>
3512 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3513 (dbus_connection_setup_with_g_main),
3514 (dbus_server_setup_with_g_main):
3515 * glib/test-dbus-glib.c: (main):
3516 * glib/test-thread-client.c: (main):
3517 * glib/test-thread-server.c: (new_connection_callback), (main):
3518 * tools/dbus-monitor.c: (main):
3520 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3521 and dbus_server_setup_with_g_main().
3523 2003-04-20 Havoc Pennington <hp@pobox.com>
3525 * doc/dbus-specification.sgml: document the restrictions on
3526 message and service names
3528 2003-04-22 Havoc Pennington <hp@redhat.com>
3530 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3531 support, and do some code cleanups to share more code and
3532 speed up array marshal/demarshal.
3534 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3536 * configure.in: generate dbus-arch-deps.h
3538 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3541 2003-04-22 Havoc Pennington <hp@redhat.com>
3543 * test/data/valid-messages/opposite-endian.message: fix test
3544 to use proper type for rply field
3546 * test/data/invalid-messages: add tests for below validation
3548 * dbus/dbus-message.c (decode_header_data): validate field types,
3549 and validate that named fields are valid names
3550 (decode_name_field): consider messages in the
3551 org.freedesktop.Local. namespace to be invalid.
3553 * dbus/dbus-string.c (_dbus_string_validate_name): new
3555 2003-04-19 Havoc Pennington <hp@pobox.com>
3557 * bus/driver.c (bus_driver_handle_hello): check limits and
3558 return an error if they are exceeded.
3560 * bus/connection.c: maintain separate lists of active and inactive
3561 connections, and a count of each. Maintain count of completed
3562 connections per user. Implement code to check connection limits.
3564 * dbus/dbus-list.c (_dbus_list_unlink): export
3566 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3567 number of bytes in the message queue for a connection
3569 2003-04-18 Havoc Pennington <hp@pobox.com>
3571 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3573 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3576 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3577 on realloc be sure to update the pointer in the keyring
3579 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3580 offset to avoid writing to unallocated memory
3582 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3583 try the next mechanism, so we properly handle OOM
3585 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3587 (_dbus_keyring_new): fix OOM bug
3588 (_dbus_keyring_new_homedir): always set error; impose a maximum
3589 number of keys we'll load from the file, mostly to speed up the
3590 test suite and make its OOM checks more useful, but also for
3593 * dbus/dbus-auth.c (process_error_server): reject authentication
3594 if we get an error from the client
3595 (process_cancel): on cancel, send REJECTED, per the spec
3596 (process_error_client): send CANCEL if we get an error from the
3599 2003-04-18 Havoc Pennington <hp@pobox.com>
3601 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3604 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3607 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3608 about DBUS_TEST_HOMEDIR once
3610 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3613 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3614 config file so we test the right thing
3616 Throughout: assorted docs improvements
3618 2003-04-18 Havoc Pennington <hp@pobox.com>
3620 * glib/dbus-gmain.c: adapt to watch changes
3622 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3624 * dbus/dbus-server.h: remove dbus_server_handle_watch
3626 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3628 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3629 like DBusTimeout, so we don't need dbus_connection_handle_watch
3632 2003-04-17 Havoc Pennington <hp@redhat.com>
3634 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3635 database usage so it all goes via the DBusUserDatabase cache.
3637 2003-04-17 Havoc Pennington <hp@redhat.com>
3639 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3640 there was an OOM watch we skipped, we always return TRUE so we
3641 iterate again to have a look at it again. Fixes test suite hang.
3642 Code rearrangement also lets us lose some memset and only iterate
3643 over callbacks once.
3645 * bus/driver.c (bus_driver_handle_message): sense of test for
3648 2003-04-16 Havoc Pennington <hp@pobox.com>
3650 * doc/dbus-specification.sgml: make spec say serials are unsigned
3652 * dbus/dbus-message.h: change message serials to unsigned
3654 * dbus/dbus-connection.c: adapt to message serials being unsigned
3656 2003-04-15 Havoc Pennington <hp@pobox.com>
3658 * bus/bus.c: create and keep around a shared DBusUserDatabase
3661 * bus/connection.c (bus_connection_get_groups): don't cache
3662 groups for user in the connection object, since user database
3663 object now does that.
3665 2003-04-16 Havoc Pennington <hp@redhat.com>
3667 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3668 list of size counters
3669 (_dbus_message_loader_putback_message_link): put back a popped link
3671 * dbus/dbus-connection.c
3672 (dbus_connection_set_max_live_messages_size): rename
3674 (dbus_connection_get_outgoing_size): get size of outgoing
3676 (_dbus_connection_set_connection_counter): remove this cruft
3678 2003-04-14 Havoc Pennington <hp@redhat.com>
3680 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3681 caching, but at some point we might want to be able to use a
3684 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3685 SHA1 conf file to test the sha1 auth mechanism, since the regular
3686 test always uses EXTERNAL when available.
3689 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3690 add conf file that requires use of sha1 auth
3692 2003-04-13 Havoc Pennington <hp@pobox.com>
3694 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3695 from Philip Blundell to send messages and monitor them.
3697 2003-04-13 Havoc Pennington <hp@pobox.com>
3699 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3702 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3705 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3706 fix to only recover unused bytes if we're already authenticated
3707 (_dbus_transport_get_is_authenticated): fix to still mark us
3708 authenticated if there are unused bytes.
3710 * bus/dispatch.c: implement security policy checking
3712 * bus/connection.c (bus_transaction_send_from_driver): new
3714 * bus/bus.c (bus_context_check_security_policy): new
3716 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3717 now we just set the DBusError and it gets converted to an error
3720 * bus/connection.c (allow_user_function): enable code using actual
3721 data from the config file
3723 * bus/policy.c (list_allows_user): handle wildcard rules for
3724 user/group connection perms
3726 2003-04-13 Havoc Pennington <hp@pobox.com>
3728 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3730 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3732 * bus/policy.c (bus_policy_append_mandatory_rule)
3733 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3734 (bus_policy_append_group_rule): new functions
3736 2003-04-12 Havoc Pennington <hp@pobox.com>
3738 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3740 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3741 the pid/gid/uid, just for paranoia.
3743 * test/break-loader.c (randomly_do_n_things): find a byte
3744 containing a type code, and randomly change it to a different
3747 2003-04-12 Havoc Pennington <hp@pobox.com>
3749 * bus/policy.h: change BusPolicy to be the thing from the config
3750 file, and rename old BusPolicy to BusClientPolicy
3752 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3753 match change in how policy works
3755 * dbus/dbus-internals.h: mark assert_not_reached as
3756 __attribute((noreturn))__
3758 2003-04-11 Havoc Pennington <hp@redhat.com>
3760 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3761 the broadcast service. Use boolean return for ServiceExists.
3763 2003-04-11 Havoc Pennington <hp@redhat.com>
3765 * configure.in: add another directory to look for qt in.
3767 2003-04-11 Havoc Pennington <hp@redhat.com>
3769 * AUTHORS: add Colin Walters
3771 2003-04-11 Havoc Pennington <hp@redhat.com>
3777 2003-04-11 Havoc Pennington <hp@redhat.com>
3779 * bus/messagebus.in: remove pid file when stopping the
3780 message bus, since the bus won't have privileges to remove it
3783 2003-04-11 Havoc Pennington <hp@redhat.com>
3785 * bus/bus.c (bus_context_new): move credentials change after
3788 2003-04-11 Havoc Pennington <hp@pobox.com>
3790 * test/decode-gcov.c: add "below average functions" to the
3791 coverage report, and change how some of the code works.
3793 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3794 not in the coverage stats.
3796 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3797 couple places so running the test suite doesn't result in megaspam.
3799 2003-04-11 Havoc Pennington <hp@pobox.com>
3801 * bus/dispatch.c (check_existent_service_activation): accept a no
3802 memory error in a place we didn't before
3804 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3805 in case the first one failed," since the test suite is less
3808 2003-04-10 Havoc Pennington <hp@pobox.com>
3810 * bus/dispatch.c (check_segfault_service_activation): add test
3811 for launching an executable that just crashes.
3813 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3814 don't leave a million cores. We'll see how portable this is.
3816 2003-04-10 Havoc Pennington <hp@pobox.com>
3818 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3819 the possible parent failures before we fork, so that we don't
3820 fail to create a babysitter after creating the child.
3822 * bus/activation.c (bus_activation_activate_service): kill child
3823 if we don't successfully complete the activation.
3825 2003-04-10 Havoc Pennington <hp@redhat.com>
3827 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3828 the connection if it's disconnected
3830 * bus/activation.c (bus_activation_service_created): use new
3831 transaction features to roll back removal of pending activation if
3832 we don't successfully create the service after all. Don't remove
3833 pending activation if the function fails.
3835 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3836 (_dbus_list_insert_after_link): new code to facilitate
3839 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3840 new functionality, so we can preallocate the ability to insert
3843 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3844 allowing us to put custom hooks in a transaction to be used for
3845 cancelling said transaction
3847 * doc/dbus-specification.sgml: add some discussion of secondary
3848 service owners, and disallow zero-length service names
3850 * bus/services.c (bus_registry_acquire_service): new function,
3851 splits out part of bus_driver_handle_acquire_service() and fixes
3852 a bug where we didn't remove the service doing the acquiring
3853 from the secondary queue if we failed to remove the current owner
3854 from the front of the queue.
3856 2003-04-10 Alexander Larsson <alexl@redhat.com>
3858 * doc/dbus-specification.sgml:
3859 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3861 2003-04-10 Alexander Larsson <alexl@redhat.com>
3866 Added files to cvsignore
3868 * dbus/dbus-message.h:
3869 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3870 Make get_named() take two out argument and return a boolean.
3871 (dbus_message_iter_get_args_valist):
3872 Update usage of get_named().
3873 (dbus_message_iter_append_byte):
3875 (dbus_message_iter_append_named)
3877 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3880 2003-04-10 Alexander Larsson <alexl@redhat.com>
3882 * dbus/dbus-marshal.[ch]:
3883 Add array_type_pos argument to _dbus_marshal_validate_arg.
3884 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3886 * dbus/dbus-message.[ch]:
3887 Multi-dimensional arrays have full type specification in the
3888 outermost array. Iter code re-arranged to handle this.
3889 Added some more iter tests.
3891 * doc/dbus-specification.sgml:
3894 Update new array encoding description.
3895 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3897 * test/data/invalid-messages/array-with-mixed-types.message:
3898 * test/data/valid-messages/array-of-array-of-uint32.message:
3899 Change to the new array format.
3901 * test/data/invalid-messages/too-short-dict.message:
3904 * test/data/valid-messages/recursive-types.message:
3905 Fix up and extend test.
3907 2003-04-10 Havoc Pennington <hp@pobox.com>
3909 * bus/dispatch.c: lots of fixes
3911 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3912 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3913 that was crack, broke the test service.
3915 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3916 handling to avoid piling up errors if we get a failure on the
3919 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3920 pid in assertion failures.
3922 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3923 to some fixed size of file descriptor array. Don't return TRUE
3924 anytime a timeout exists, that led to lots of busy loop silliness
3927 2003-04-09 Havoc Pennington <hp@redhat.com>
3929 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3930 I'd checked this in earlier but hadn't.
3932 2003-04-09 Havoc Pennington <hp@redhat.com>
3934 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3935 the activation test (man this is getting old!)
3937 2003-04-09 Havoc Pennington <hp@redhat.com>
3939 * test/test-utils.c: use dispatch status function to fix this up
3941 * bus/connection.c (connection_watch_callback): don't dispatch
3943 (connection_timeout_callback): don't dispatch from here
3944 (bus_connections_setup_connection): set the dispatch status function
3945 (bus_connection_disconnected): unset it
3947 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3948 used to add a connection to be dispatched
3949 (_dbus_loop_iterate): do the dispatching at the end of each
3952 * dbus/dbus-connection.c
3953 (dbus_connection_set_dispatch_status_function): new function
3954 allowing us to fix up main loop usage
3955 (_dbus_connection_last_unref): free all the various function
3957 (dbus_connection_dispatch): call the DispatchStatusFunction
3958 whenever this function returns
3959 (dbus_connection_handle_watch): call DispatchStatusFunction
3960 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3961 (reply_handler_timeout): call DispatchStatusFunction
3962 (dbus_connection_flush): call DispatchStatusFunction
3964 2003-04-09 Havoc Pennington <hp@redhat.com>
3966 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3969 * bus/dispatch.c (check_service_activated): fix bug in test
3971 * dbus/dbus-mainloop.c (check_timeout): fix this up
3973 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3974 verbose output so we can sort out output from different processes,
3975 e.g. in the activation case.
3977 2003-04-08 Colin Walters <walters@gnu.org>
3979 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3981 (bus_context_new): Set it.
3982 (bus_context_unref): Use it to delete the pid file.
3984 2003-04-08 Havoc Pennington <hp@redhat.com>
3986 * test/data/invalid-messages/array-with-mixed-types.message:
3987 regression test that fails for the moment
3989 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3990 tests for convenience
3992 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3993 array of nil, it broke things.
3995 * test/data/invalid-messages/array-of-nil.message: regression test
3997 * test/data/valid-messages/array-of-array-of-uint32.message:
3998 happened to write this so added it to suite
4000 2003-04-08 Havoc Pennington <hp@redhat.com>
4002 * bus/driver.c (bus_driver_handle_acquire_service): init
4003 retval/reply before checking name
4005 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
4006 recursion depth argument
4008 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
4009 in the public struct for future extension
4011 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
4014 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
4017 * doc/dbus-specification.sgml: fix typo
4019 2003-04-08 Alexander Larsson <alexl@redhat.com>
4021 Implemented recursive types, named types and new-style iters
4024 * glib/test-thread-client.c: (thread_func):
4025 * glib/test-thread-server.c: (handle_test_message):
4026 * test/test-service.c: (handle_echo):
4035 * dbus/dbus-internals.c: (_dbus_type_to_string):
4036 Update for new types.
4038 * dbus/dbus-marshal.[ch]:
4039 Implement recursive types and the new marshalling format.
4040 Remove hardcoded dict marshalling.
4041 Marshal named types.
4043 * dbus/dbus-message-builder.c:
4045 Remove references to old types
4047 * dbus/dbus-message.[ch]:
4048 New non-refcounted iter API that supports recursive iters.
4049 Use iters for appending, including support for recursive
4051 Add byte and named type support.
4052 Update everything to new marshalling formats.
4053 Add tests for new API.
4055 * dbus/dbus-protocol.h:
4056 Remove old array types.
4057 Add types: BYTE, ARRAY, DICT, NAMED
4059 * dbus/dbus-string.c:
4060 * dbus/dbus-sysdeps.c:
4061 Make parse_double locale safe.
4063 * dbus/dbus-test-main.c:
4069 * doc/dbus-specification.sgml:
4072 * test/data/incomplete-messages/missing-body.message:
4073 * test/data/invalid-messages/bad-boolean.message:
4074 * test/data/invalid-messages/bad-boolean-array.message:
4075 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
4076 * test/data/invalid-messages/boolean-has-no-value.message-raw:
4077 * test/data/invalid-messages/too-short-dict.message:
4078 * test/data/valid-messages/dict-simple.message:
4079 * test/data/valid-messages/dict.message:
4080 * test/data/valid-messages/emptiness.message:
4081 * test/data/valid-messages/lots-of-arguments.message:
4082 * test/data/valid-messages/no-padding.message:
4083 * test/data/valid-messages/recursive-types.message:
4084 Add missing NAME fields
4085 Fix up dicts & arrays
4087 * test/data/invalid-messages/dict-with-nil-value.message:
4088 Removed, this is not invalid anymore.
4090 * test/data/valid-messages/recursive-types.message:
4091 Add new test for deeply recursive types.
4093 2003-04-07 Havoc Pennington <hp@pobox.com>
4095 * bus/driver.c (bus_driver_handle_acquire_service): return an
4096 error if you try to acquire a service that starts with ':'
4098 2003-04-07 Havoc Pennington <hp@redhat.com>
4100 * doc/dbus-specification.sgml: require that base service names
4101 start with ':' and that the base service is created/deleted
4102 as first and last things a connection does on the bus
4104 * bus/dispatch.c (check_existent_service_activation): lots more
4105 work on the activation test; it doesn't fully pass yet...
4107 * test/test-service.c (main): fix so we don't memleak the
4108 connection to the message bus
4109 (filter_func): accept a message asking us to exit
4111 2003-04-06 Havoc Pennington <hp@pobox.com>
4113 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4116 * configure.in: fixes to Qt detection from Colin Walters
4118 * doc/Makefile.am: Only remove generated docbook dirs if they
4119 exist, from Colin Walters
4121 * dbus/dbus-bus.c: change how we set well-known connections to
4122 NULL, so that it works if a single connection is stored in
4123 two well-known array slots.
4125 * test/Makefile.am: remove a lot of stuff that isn't immediately
4126 useful, it's in CVS history if we want it.
4128 * test/test-service.c: use dbus-mainloop instead of that
4131 2003-04-06 Havoc Pennington <hp@pobox.com>
4133 * dbus/Makefile.am: split lists of sources into stuff that goes in
4134 the library, util functions that go in the lib and are also used
4135 elsewhere, and util functions that are used in tests/daemon but
4136 don't go in the lib.
4138 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4139 here so it can be used in test binaries also
4141 2003-04-06 Havoc Pennington <hp@pobox.com>
4143 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4144 here in the parent process, so we can return an error if it
4145 fails. Also, move some of the code into the child so the parent
4146 is less hosed if we fail midway through.
4148 * bus/bus.c (bus_context_new): move pidfile detection further up
4149 in the function, before we start overwriting sockets and such.
4151 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4153 * configure.in: add --with-system-pid-file and --with-system-socket
4155 2003-04-06 Colin Walters <walters@verbum.org>
4157 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4159 * bus/system.conf.in: Declare a pidfile.
4161 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4162 create one (if appropriate).
4164 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4165 (struct BusConfigParser) [pidfile]: New.
4166 (element_type_to_name, merge_included, start_busconfig_child)
4167 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4168 (bus_config_parser_unref): Free it.
4169 (bus_config_parser_get_pidfile): New function.
4171 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4173 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4175 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4177 * dbus/dbus-sysdeps.h: Prototype it.
4179 2003-04-06 Havoc Pennington <hp@pobox.com>
4181 * bus/bus.c (bus_context_new): print the address in here, rather
4182 than in main(), because we need to do it before forking the daemon
4184 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4185 on the service nonexistent error
4187 * bus/driver.c (bus_driver_handle_acquire_service): set the
4188 sender on the AcquireService reply
4190 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4191 server also listen on a UNIX socket so services can connect to it.
4193 2003-04-06 Havoc Pennington <hp@pobox.com>
4195 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4196 so it detects deadlocks and also we actually init threads when
4199 2003-04-06 Havoc Pennington <hp@pobox.com>
4201 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4202 save the domain socket name, and unlink it when we disconnect the
4203 server. Means that at least when we exit normally, we won't leave
4204 a bunch of junk in /tmp
4206 * dbus/dbus-transport-unix.c
4207 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4208 memory management). (I was making a real change here but then
4211 2003-04-06 Havoc Pennington <hp@pobox.com>
4213 * bus/bus.c (bus_context_new): fix wrong handling of
4214 server_data_slot_unref() in the error case.
4216 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4217 "(condition) != 0" to _dbus_real_assert so that
4218 "_dbus_assert (pointer)" doesn't cause a warning
4220 * bus/main.c (main): accept --print-address option to print out
4221 the message bus address
4223 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4225 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4226 "tmpdir" option to unix: address on client side
4228 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4231 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4232 we can use to create sockets in the test suite.
4234 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4235 cleanly. To be used for testing.
4237 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4239 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4241 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4242 handle trying to call this when there's no servers active
4244 2003-04-05 Havoc Pennington <hp@pobox.com>
4250 2003-04-05 Havoc Pennington <hp@pobox.com>
4252 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4253 crash on startup. Need to get "try starting the daemon"
4254 in the test suite I guess. ;-)
4256 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4257 tracked the number of open connections; it's better done in
4258 application-specific code as you want it to span all servers etc.
4260 2003-04-05 Havoc Pennington <hp@pobox.com>
4262 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4263 patch from Colin Walters
4265 2003-04-05 Havoc Pennington <hp@pobox.com>
4267 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4268 reality; in fact multiple mechanisms are allowed.
4270 * dbus/dbus-internals.c (_dbus_real_assert)
4271 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4272 _dbus_assert_not_reached() into functions, so that they don't show
4273 up in basic block counts for test coverage, and don't use up as
4274 much disk space. Does mean slower execution speed though, so
4275 assumes --disable-asserts is the normal production case.
4277 2003-04-05 Havoc Pennington <hp@pobox.com>
4279 * test/Makefile.am (dist-hook): also dist *.in files
4285 2003-04-05 Havoc Pennington <hp@pobox.com>
4287 * dbus/dbus-string.c: docs warning
4289 * dbus/dbus-spawn.c: missing docs
4291 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4293 2003-04-05 Havoc Pennington <hp@pobox.com>
4295 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4298 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4299 to -1 once we've reaped the babysitter
4300 (_dbus_babysitter_handle_watch): do as much work as we can, not
4303 * bus/activation.c: add code using DBusBabysitter so that we
4304 handle it when a service fails to start up properly.
4305 (bus_activation_service_created): don't remove the activation
4306 entries as we go, just let them get removed when we free the pending
4307 activation. Unref reply messages after sending them.
4309 2003-04-05 Havoc Pennington <hp@pobox.com>
4311 * test/decode-gcov.c (main): print per-directory stats in the report
4313 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4315 2003-04-05 Havoc Pennington <hp@pobox.com>
4317 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4319 * test/decode-gcov.c: hack up a little program to suck data
4320 out of gcov files. Yes this is sort of silly.
4322 * configure.in: define something in config.h and do an
4323 AM_CONDITIONAL when gcov is enabled
4325 2003-04-04 Havoc Pennington <hp@redhat.com>
4327 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4328 return a "babysitter" object that is used to monitor the status of
4329 the spawned process and reap it when required.
4331 * test/test-segfault.c, test/test-exit.c,
4332 test/test-sleep-forever.c: binaries that do various lame things,
4333 used in the test suite.
4335 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4337 2003-04-03 Havoc Pennington <hp@pobox.com>
4339 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4340 in preparation for modifying it, dbus-sysdeps is getting
4343 2003-04-03 Havoc Pennington <hp@redhat.com>
4345 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4348 * bus/*.[hc]: adapt to mainloop change
4350 2003-04-03 Havoc Pennington <hp@redhat.com>
4352 * bus/activation.c (load_directory): fix up memleaks
4353 (bus_activation_entry_free): free the entry
4355 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4356 we get one from the message bus; fix memleaks.
4358 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4360 2003-04-03 Havoc Pennington <hp@pobox.com>
4362 * bus/config-parser.c (bus_config_parser_unref): free
4363 list of mechanisms, bug discovered by test suite enhancements
4364 (putting system.conf and session.conf into suite)
4366 * test/Makefile.am, test/test-service.c: add placeholder for a
4367 test service that we'll activate as part of test suite. Doesn't
4370 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4371 setting NULL value, and use system malloc not dbus_malloc()
4372 when we have unavoidable memleakage.
4374 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4375 didn't work, and support DBUS_BUS_ACTIVATION.
4377 * bus/activation.c (child_setup): pass our well-known bus type to
4380 * bus/config-parser.c: support <type> to specify well-known type
4382 * doc/dbus-specification.sgml: document the env variables to
4383 locate well-known buses and find service activator
4385 2003-04-02 Havoc Pennington <hp@redhat.com>
4387 * test/Makefile.am (all-local): add a rule to copy tests to
4388 builddir, so we can have generated tests. Use this to remove the
4389 silly hack for testing system.conf and session.conf. Will use this
4390 shortly to generate .service files pointing to test binaries.
4392 2003-04-02 Havoc Pennington <hp@redhat.com>
4394 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4395 current alloc and needed new length, not max of the doubled
4396 allocation and needed new length. Also, when building tests,
4397 don't do the double-allocation stuff, just realloc every time.
4399 2003-04-02 Havoc Pennington <hp@redhat.com>
4401 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4403 (_dbus_string_get_dirname): new
4404 (_dbus_sysdeps_test): new
4405 (_dbus_directory_open): include dirnames in error messages
4407 * bus/config-parser.c: interpret <include> and <includedir> and
4408 <servicedir> relative to config file location if the given
4409 filename is not absolute.
4411 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4413 2003-04-02 Havoc Pennington <hp@redhat.com>
4415 * bus/connection.c (bus_transaction_send_error_reply): set sender
4416 service for the error, and unref the reply on success
4418 * bus/activation.c: convert to use BusTransaction so OOM can be
4420 (bus_activation_service_created): set sender of the message
4422 2003-04-01 Havoc Pennington <hp@redhat.com>
4424 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4425 <includedir> (at least mostly)
4427 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4428 first, then the user ID
4430 2003-04-01 Havoc Pennington <hp@pobox.com>
4432 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4435 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4437 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4439 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4440 socket 0777, and unlink any existing socket.
4442 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4443 the configuration file so specifies; set up auth mechanism
4446 * bus/config-parser.c (bus_config_parser_content): add support
4447 for <fork> option and fill in code for <auth>
4449 * bus/system.conf.in: add <fork/> to default configuration,
4450 and limit auth mechanisms to EXTERNAL
4452 * doc/config-file.txt (Elements): add <fork>
4454 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4455 (_dbus_change_identity): new function
4457 2003-03-31 Havoc Pennington <hp@redhat.com>
4459 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4460 (_dbus_listen_unix_socket): fix off-by-one error in null
4461 termination spotted by Nalin
4463 2003-03-31 Havoc Pennington <hp@redhat.com>
4465 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4466 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4467 having a real home directory available.
4469 2003-03-31 Havoc Pennington <hp@redhat.com>
4471 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4473 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4475 * configure.in: add support for specifying a style of init script
4478 2003-03-31 Havoc Pennington <hp@redhat.com>
4480 Fix some annoying DBusString API and fix all affected code.
4482 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4484 (_dbus_string_get_data): change to return string instead of using
4486 (_dbus_string_get_const_data): ditto
4487 (_dbus_string_get_data_len): ditto
4488 (_dbus_string_get_const_data_len): ditto
4490 2003-03-31 Havoc Pennington <hp@redhat.com>
4492 * bus/main.c (main): fix up the command line arguments to be nicer
4494 2003-03-31 Havoc Pennington <hp@redhat.com>
4496 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4497 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4498 final location that lands in the config file
4500 * bus/config-loader-expat.c (bus_config_load): fix type of
4503 * doc/TODO: remove TODO item for dbus_bus_get()
4505 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4507 2003-03-31 Havoc Pennington <hp@pobox.com>
4509 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4510 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4511 argument since they are always client side
4513 * dbus/dbus-server.c (dbus_server_get_address): new function
4515 * bus/main.c (main): take the configuration file as an argument.
4517 * test/data/valid-config-files/debug-allow-all.conf: new file to
4518 use with dispatch.c tests for example
4520 * bus/test-main.c (main): require test data dir
4522 * bus/bus.c (bus_context_new): change this to take a
4523 configuration file name as argument
4525 * doc/config-file.txt (Elements): add <servicedir>
4527 * bus/system.conf, bus/session.conf: new files
4529 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4530 well-known socket if none set
4532 * configure.in: create system.conf and session.conf
4534 2003-03-30 Havoc Pennington <hp@pobox.com>
4536 * bus/config-parser.c: hacking
4538 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4539 to shut down, since it could cause weirdness with the DBusList
4542 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4543 link-oriented stack routines
4544 (alloc_link): free the mempool if the first alloc from it fails
4546 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4548 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4550 (_dbus_string_skip_white): new
4552 * doc/config-file.txt (Elements): add <includedir>
4554 2003-03-28 Havoc Pennington <hp@pobox.com>
4556 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4557 (_dbus_string_copy_data): new functions
4559 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4561 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4565 * dbus/dbus-memory.c:
4568 2003-03-28 Havoc Pennington <hp@pobox.com>
4570 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4571 I think it may have just been superstition. Not sure.
4573 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4574 failures that were not being handled.
4576 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4578 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4579 row that will fail on out-of-memory.
4581 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4582 function for testing out-of-memory handling.
4584 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4585 allocation functions, they do map exactly to the expat ones.
4587 2003-03-27 Havoc Pennington <hp@redhat.com>
4589 * bus/config-loader-libxml.c (bus_config_load): add another error
4592 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4595 Add note about automatic service activation.
4597 * doc/dbus-specification.sgml:
4598 Rename the specification and clarify a few things.
4600 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4603 * dbus/dbus-address.c:
4605 * dbus/dbus-marshal.c:
4606 * dbus/dbus-server-debug-pipe.c:
4607 * dbus/dbus-transport-unix.c:
4608 Fix documentation warnings.
4610 2003-03-26 Havoc Pennington <hp@pobox.com>
4612 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4613 after every test so it's quick and easy to see which leaked, and
4614 so we test multiple dbus_shutdown() calls
4616 * configure.in: change configure.in XML stuff to also support
4619 * config-loader-libxml.c: some hacking
4621 * config-loader-expat.c: some hacking
4623 * config-parser.c: some hacking, plus tests
4625 2003-03-25 Havoc Pennington <hp@redhat.com>
4627 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4629 * configure.in: add --with-xml option to specify XML library,
4630 right now only libxml is supported.
4632 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4633 nonworking code between home and work, still just stubs
4635 2003-03-24 Havoc Pennington <hp@redhat.com>
4637 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4640 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4641 NULL argument for "message" if the error is a well-known one,
4642 fill in a generic message in this case.
4644 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4647 * bus/test.c (bus_test_flush_bus): add
4649 * bus/policy.c (bus_policy_test): test code stub
4651 2003-03-24 Havoc Pennington <hp@pobox.com>
4653 * bus/connection.c (bus_connections_setup_connection): set up
4654 the "can this user connect" function, but it always returns
4655 TRUE until we have a config file parser so we can have a config
4656 file that allows connections.
4658 2003-03-23 Havoc Pennington <hp@pobox.com>
4660 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4661 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4662 the mutex, so we can check for proper memory management
4665 * dbus/dbus-dataslot.c: remove the mutex from
4666 DBusDataSlotAllocator and lock it manually when using it,
4667 to simplify fitting it into the global slots framework.
4669 * dbus/dbus-threads.c (init_static_locks): rework how we're
4670 handling global locks so they are easily shut down.
4672 * bus/policy.c (bus_policy_append_rule): fix
4674 * bus/test-main.c (main): check for memleaks
4676 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4677 test suite check for memleaks
4679 * dbus/dbus-memory.c: add support in test mode for tracking
4680 number of outstanding blocks
4682 2003-03-23 Havoc Pennington <hp@pobox.com>
4684 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4687 * dbus/dbus-hash.h: add ULONG hash keys
4689 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4690 (_dbus_get_group_id): new function
4692 2003-03-20 Havoc Pennington <hp@redhat.com>
4694 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4696 (dbus_connection_get_unix_user): new function
4698 2003-03-20 Havoc Pennington <hp@pobox.com>
4700 * bus/connection.c (bus_connection_send_oom_error): assert that
4701 message has a sender
4702 (connection_execute_transaction): ditto
4703 (bus_connection_preallocate_oom_error): fix to set the sender, and
4704 set recipient to the destination service, not the bus driver
4706 * bus/policy.c: hacking
4708 * dbus/dbus-message.c (dbus_message_service_is): new function
4709 (dbus_message_sender_is): new
4711 2003-03-19 Havoc Pennington <hp@redhat.com>
4713 * bus/policy.c: start sketching code for policy restrictions on
4714 what connections can do.
4716 2003-03-18 Havoc Pennington <hp@redhat.com>
4718 * doc/TODO: some notes on high-level todo items. Little nitpick
4719 stuff is all in @todo, so no need to add it here.
4721 * doc/config-file.txt: some notes on how config file might look
4723 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4729 2003-03-17 Havoc Pennington <hp@redhat.com>
4731 * dbus/dbus-internals.h: add gcc attributes so that
4732 our printf-style functions warn on bad arguments to
4735 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4738 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4741 2003-03-17 Havoc Pennington <hp@redhat.com>
4743 * bus/test-main.c (main): make it print something as it runs
4744 so make check doesn't look stuck
4746 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4747 from CVS, now obsolete
4749 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4751 * bus/dispatch.c: (bus_dispatch):
4752 Refetch the service name since it may have been reallocated
4753 when dbus_message_set_sender was called.
4755 * dbus/dbus-sysdeps.c: (_dbus_accept):
4756 Add address and address length variables and use them to stop
4757 valgrind from complaining.
4759 2003-03-17 Havoc Pennington <hp@pobox.com>
4761 All tests pass, no memleaks, no valgrind complaints.
4763 * bus/test.c: refcount handler_slot
4765 * bus/connection.c (bus_connections_new): refcount
4766 connection_data_slot
4768 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4769 bytes so that auth scripts pass.
4771 * bus/dispatch.c: init message_handler_slot so it gets allocated
4774 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4776 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4777 dealloc server_pipe_hash when no longer used for benefit of
4780 * dbus/dbus-auth.c (process_command): memleak fix
4782 * bus/dispatch.c (check_hello_message): memleak fix
4784 2003-03-16 Havoc Pennington <hp@pobox.com>
4786 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4788 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4790 * bus/activation.c (bus_activation_activate_service): Append
4791 the pending activation entry to the list of pending activations.
4793 2003-03-16 Havoc Pennington <hp@pobox.com>
4795 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4798 * dbus/dbus-address.c (create_entry): fix OOM handling when
4799 failing to alloc entry->method
4801 2003-03-16 Havoc Pennington <hp@pobox.com>
4803 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4806 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4807 add some missing dbus_set_result
4809 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4810 alloc the DBusMessageHandler
4812 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4813 the transport here, since we call this from the finalizer; it
4814 resulted in a double-finalize.
4816 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4817 where we tried to use transport->connection that was NULL,
4818 happened when transport was disconnected early on due to OOM
4820 * bus/*.c: adapt to handle OOM for watches/timeouts
4822 * dbus/dbus-transport-unix.c: port to handle OOM during
4825 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4826 reference to unused bytes instead of a copy
4828 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4831 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4834 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4837 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4839 * doc/dbus-specification.sgml:
4840 Document reply message for ActivateService.
4842 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4844 * bus/activation.c: (bus_pending_activation_entry_free),
4845 (bus_pending_activation_free), (bus_activation_new),
4846 (bus_activation_unref), (bus_activation_service_created),
4847 (bus_activation_activate_service):
4849 * bus/bus.c: (bus_context_new):
4850 * bus/desktop-file.c: (new_section):
4851 * bus/driver.c: (bus_driver_send_service_deleted),
4852 (bus_driver_handle_activate_service):
4853 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4855 * dbus/dbus-connection.c:
4856 (dbus_connection_send_with_reply_and_block):
4857 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4858 * dbus/dbus-protocol.h:
4859 Make activation work better. Now pending activations will be queued
4860 and the daemon won't try to activate services that are already registered.
4862 2003-03-16 Havoc Pennington <hp@pobox.com>
4864 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4867 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4868 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4870 2003-03-16 Havoc Pennington <hp@pobox.com>
4872 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4873 this. always run the test suite before commit...
4875 * bus/*: adapt to DBusConnection API changes
4877 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4878 requires renaming stuff to avoid dbus_connection_dispatch name
4881 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4884 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4885 separate from _dbus_message_loader_return_buffer()
4887 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4888 this, because it's now always broken to use; the number of
4889 messages in queue vs. the number still buffered by the message
4890 loader is undefined/meaningless. Should use
4891 dbus_connection_get_dispatch_state().
4892 (dbus_connection_dispatch): rename from
4893 dbus_connection_dispatch_message
4895 2003-03-16 Havoc Pennington <hp@pobox.com>
4897 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4900 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4902 * dbus/dbus-connection.c:
4903 (dbus_connection_send_with_reply_and_block):
4904 Decrease connection->n_incoming when removing an entry
4906 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4907 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4908 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4909 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4910 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4911 (dbus_dict_get_byte_array):
4912 Handle NULL arrays and strings. Also add support for byte arrays.
4914 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4915 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4916 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4917 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4918 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4919 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4920 * dbus/dbus-marshal.h:
4921 Add support for marshalling and demarshalling empty arrays and strings.
4923 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4924 (dbus_message_append_string_array),
4925 (dbus_message_iter_get_boolean),
4926 (dbus_message_iter_get_boolean_array),
4927 (dbus_message_iter_get_int32_array),
4928 (dbus_message_iter_get_uint32_array),
4929 (dbus_message_iter_get_double_array),
4930 (dbus_message_iter_get_byte_array),
4931 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4932 (check_message_handling):
4933 Add support for getting empty arrays and dicts.
4935 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4936 Don't do any validation at all for now, that's better than just checking
4939 * test/data/valid-messages/emptiness.message:
4940 New test message with lots of empty arrays.
4942 2003-03-16 Havoc Pennington <hp@pobox.com>
4944 * dbus/dbus-connection.c
4945 (_dbus_connection_queue_received_message_link): new function that
4946 can't fail due to OOM
4948 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4949 new function pops a message together with a list link
4952 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4953 message queuing functions to avoid needing to alloc memory
4955 2003-03-16 Havoc Pennington <hp@pobox.com>
4957 Oops - test code was only testing failure of around 30 of the
4958 mallocs in the test path, but it turns out there are 500+
4959 mallocs. I believe this was due to misguided linking setup such
4960 that there was one copy of dbus_malloc etc. in the daemon and one
4961 in the shared lib, and only daemon mallocs were tested. In any
4962 case, the test case now tests all 500+ mallocs, and doesn't pass
4963 yet, though there are lots of fixes in this patch.
4965 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4966 this so that it doesn't need to allocate memory, since it
4967 has no way of indicating failure due to OOM (and would be
4968 annoying if it did).
4970 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4972 * bus/Makefile.am: rearrange to create two self-contained
4973 libraries, to avoid having libraries with overlapping symbols.
4974 that was resulting in weirdness, e.g. I'm pretty sure there
4975 were two copies of global static variables.
4977 * dbus/dbus-internals.c: move the malloc debug stuff to
4980 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4983 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4985 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4988 * bus/dispatch.c (bus_dispatch_add_connection): free
4989 message_handler_slot when no longer using it, so
4990 memory leak checkers are happy for the test suite.
4992 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4994 * bus/bus.c (new_connection_callback): disconnect in here if
4995 bus_connections_setup_connection fails.
4997 * bus/connection.c (bus_connections_unref): fix to free the
4999 (bus_connections_setup_connection): if this fails, don't
5000 disconnect the connection, just be sure there are no side
5003 * dbus/dbus-string.c (undo_alignment): unbreak this
5005 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
5007 (_dbus_auth_new): fix the order in which we free strings
5010 * bus/connection.c (bus_connection_disconnected): fix to
5011 not send ServiceDeleted multiple times in case of memory
5014 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
5015 get the base service name
5016 (dbus_bus_register_client): don't return base service name,
5017 instead store it on the DBusConnection and have an accessor
5019 (dbus_bus_register_client): rename dbus_bus_register()
5021 * bus/dispatch.c (check_hello_message): verify that other
5022 connections on the bus also got the correct results, not
5023 just the one sending hello
5025 2003-03-15 Havoc Pennington <hp@pobox.com>
5027 Make it pass the Hello handling test including all OOM codepaths.
5028 Now to do other messages...
5030 * bus/services.c (bus_service_remove_owner): fix crash when
5031 removing owner from an empty list of owners
5032 (bus_registry_ensure): don't leave service in the list of
5033 a connection's owned services if we fail to put the service
5036 * bus/connection.c (bus_connection_preallocate_oom_error): set
5037 error flag on the OOM error.
5039 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5040 handle _dbus_transport_set_connection failure
5042 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
5043 to create watches up front and simply enable/disable them as
5045 (unix_connection_set): this can now fail on OOM
5047 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
5048 of enabling/disabling a watch or timeout.
5050 * bus/loop.c (bus_loop_iterate): don't touch disabled
5053 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
5055 2003-03-15 Havoc Pennington <hp@pobox.com>
5057 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
5058 write useful test code, after all that futzing around ;-)
5060 Test does not yet pass because we can't handle OOM in
5061 _dbus_transport_messages_pending (basically,
5062 dbus_connection_preallocate_send() does not prealloc the write
5063 watch). To fix this, I think we need to add new stuff to
5064 set_watch_functions, namely a SetEnabled function so we can alloc
5065 the watch earlier, then enable it later.
5067 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
5068 dbus-memory.c to the convenience lib
5070 * bus/test.c: rename some static functions to keep them clearly
5071 distinct from stuff in connection.c. Handle client disconnection.
5073 2003-03-14 Havoc Pennington <hp@pobox.com>
5075 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
5076 transport, tests more of the real codepath. Set up clients
5077 with bus_setup_debug_client.
5079 * bus/test.c (bus_setup_debug_client): function to set up debug
5080 "clients" on the main loop
5082 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5085 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5088 * dbus/dbus-server-debug.c: support a debug server based on pipes
5090 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5091 (_dbus_close): new function
5093 * configure.in: check for socketpair
5095 2003-03-14 Havoc Pennington <hp@redhat.com>
5097 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5100 * dbus/dbus-transport-debug.c: rework this a good bit to be
5101 less complicated. hopefully still works.
5103 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5106 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5109 * dbus/dbus-message.c (dbus_message_copy): rename from
5110 dbus_message_new_from_message, fix it up to copy
5111 all the message fields, add test case
5113 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5114 not quite passing yet
5116 2003-03-14 Havoc Pennington <hp@pobox.com>
5118 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5119 until no work remains" in test code. (the large diff here
5120 is just code movement, no actual changes)
5122 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5123 1, no point waiting around for test code.
5124 (_dbus_server_debug_accept_transport): unref the timeout
5125 after adding it (right?)
5127 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5129 2003-03-13 Havoc Pennington <hp@redhat.com>
5131 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5134 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5137 * dbus/dbus-connection.h: Make AddWatchFunction and
5138 AddTimeoutFunction return a bool so they can fail on out-of-memory
5140 * bus/bus.c (bus_context_new): set up timeout handlers
5142 * bus/connection.c (bus_connections_setup_connection): set up
5145 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5148 * bus/bus.c (bus_context_new): adapt to changes
5150 * bus/connection.c: adapt to changes
5152 * test/watch.c: adapt to DBusWatch changes
5154 * bus/dispatch.c (bus_dispatch_test): started adding this but
5157 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5159 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5161 2003-03-13 Havoc Pennington <hp@pobox.com>
5163 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5164 set up a test framework as for the library
5166 2003-03-12 Havoc Pennington <hp@pobox.com>
5168 Throughout: purge global variables, introduce BusActivation,
5169 BusConnections, BusRegistry, etc. objects instead.
5171 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5174 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5175 going to redo this a bit differently I think
5177 2003-03-12 Havoc Pennington <hp@redhat.com>
5179 Mega-patch that gets the message bus daemon initially handling
5180 out-of-memory. Work still needed. Also lots of random
5181 moving stuff to DBusError instead of ResultCode.
5183 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5185 * dbus/dbus-connection.c
5186 (dbus_connection_send_with_reply_and_block): use DBusError
5188 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5191 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5192 code here, as the only failure possible is OOM.
5194 * bus/connection.c (bus_connection_disconnect):
5195 rename bus_connection_disconnected as it's a notification only
5197 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5198 "name" on get_args failure, should be done by get_args;
5199 don't disconnect client for bad args, just return an error.
5200 (bus_driver_handle_service_exists): ditto
5202 * bus/services.c (bus_services_list): NULL-terminate returned array
5204 * bus/driver.c (bus_driver_send_service_lost)
5205 (bus_driver_send_service_acquired): send messages from driver to a
5206 specific client to the client's unique name, not to the broadcast
5209 * dbus/dbus-message.c (decode_header_data): reject messages that
5210 contain no name field
5211 (_dbus_message_get_client_serial): rename to
5212 dbus_message_get_serial and make public
5213 (_dbus_message_set_serial): rename from set_client_serial
5214 (_dbus_message_set_reply_serial): make public
5215 (_dbus_message_get_reply_serial): make public
5217 * bus/connection.c (bus_connection_foreach): allow stopping
5218 iteration by returning FALSE from foreach function.
5220 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5221 (dbus_connection_free_preallocated_send)
5222 (dbus_connection_preallocate_send): new API for sending a message
5223 without possibility of malloc failure.
5224 (dbus_connection_send_message): rename to just
5225 dbus_connection_send (and same for whole function family)
5227 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5229 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5231 * bus/activation.c: handle/return errors
5233 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5235 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5236 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5237 (_dbus_result_from_errno): move to this file
5239 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5241 * dbus/dbus-marshal.c:
5242 (_dbus_marshal_set_string):
5243 Take a length argument so we can marshal the correct string
5246 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5247 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5248 (_dbus_marshal_test):
5249 * dbus/dbus-marshal.h:
5250 Add support for marshalling and demarshalling dicts.
5252 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5253 Add support for TYPE DICT.
5255 * dbus/dbus-message.c: (set_string_field):
5256 Adjust header padding.
5258 (dbus_message_append_args_valist), (dbus_message_append_dict),
5259 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5260 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5261 (check_message_handling), (check_have_valid_message):
5262 * dbus/dbus-message.h:
5263 Add functions for setting and getting dicts.
5265 * dbus/dbus-protocol.h:
5271 * doc/dbus-specification.sgml:
5272 Add information about how dicts are marshalled.
5274 * test/data/invalid-messages/dict-with-nil-value.message:
5275 * test/data/invalid-messages/too-short-dict.message:
5276 * test/data/valid-messages/dict-simple.message:
5277 * test/data/valid-messages/dict.message:
5278 Add sample messages containing dicts.
5280 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5282 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5284 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5287 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5288 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5289 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5290 (dbus_dict_set_double), (dbus_dict_set_string),
5291 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5292 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5293 (dbus_dict_set_string_array), (_dbus_dict_test):
5295 Fix according to comments from Havoc.
5297 2003-03-06 Michael Meeks <michael@server.home>
5299 * configure.in: if we don't have kde-config, disable have_qt.
5301 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5306 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5307 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5308 (dbus_dict_remove), (dbus_dict_get_value_type),
5309 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5310 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5311 (dbus_dict_put_double), (dbus_dict_put_string),
5312 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5313 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5314 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5315 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5316 (dbus_dict_get_double), (dbus_dict_get_string),
5317 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5318 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5319 (dbus_dict_get_string_array), (_dbus_dict_test):
5321 Add DBusDict implementation
5323 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5327 2003-03-04 Havoc Pennington <hp@pobox.com>
5329 * test/data/auth/*: adapt to changes
5331 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5332 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5335 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5336 more stuff from being in a context name, to make the protocol
5337 simpler to deal with
5339 * dbus/dbus-errors.c (dbus_error_has_name): new function
5340 (dbus_error_is_set): new function
5342 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5343 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5345 * dbus/dbus-connection.c (dbus_connection_flush): also read
5346 messages during a flush operation
5348 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5350 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5352 * configure.in: Check for gethostbyname on Solaris.
5354 * dbus/dbus-transport.c: (_dbus_transport_open):
5355 Remove duplicate "tcp" entry.
5357 * doc/dbus-specification.sgml:
5358 Clarify some things.
5360 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5362 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5363 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5364 (_dbus_keyring_test):
5365 * dbus/dbus-md5.c: (_dbus_md5_compute):
5366 * dbus/dbus-sha.c: (_dbus_sha_compute):
5369 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5371 * README: Add some things.
5373 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5375 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5376 after case DBUS_TYPE_BOOELAN.
5378 2003-03-02 Havoc Pennington <hp@pobox.com>
5380 * test/break-loader.c (randomly_set_extreme_ints): add test that
5381 sets really huge and small integers
5383 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5384 that length of boolean array fits in the string, and that
5385 string has room for boolean value in single-bool case.
5387 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5388 optional value to "ALIGN" command which is what to fill the
5391 * test/data/valid-messages/no-padding.message: add regression
5392 test for the message padding problem
5394 2003-03-02 Havoc Pennington <hp@pobox.com>
5396 * dbus/dbus-message.c (decode_header_data): fix to always init
5397 message_padding, from Benjamin Dauvergne
5399 2003-03-02 Havoc Pennington <hp@pobox.com>
5405 2003-03-01 Joe Shaw <joe@assbarn.com>
5407 * configure.in: Check for "struct cmsgcred" and try to access its
5408 members for BSD-like unices.
5410 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5411 _dbus_read_credentials_unix_socket().
5412 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5413 read() for reading the credential byte off the unix socket. Use
5414 struct cmsgcred on systems that support it.
5416 2003-02-27 Alexander Larsson <alexl@redhat.com>
5420 Make gthreads-2.0 dependency optional. Don't build thread test if
5423 2003-02-27 Havoc Pennington <hp@pobox.com>
5425 * dbus/dbus-connection.c
5426 (dbus_connection_send_message_with_reply_and_block): fix doh!
5427 doh! doh! bug that resulted in never removing a reply from the
5428 queue, no wonder we called get_reply_serial so much ;-)
5430 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5431 and client serial instead of demarshaling them every time
5433 2003-02-27 Havoc Pennington <hp@pobox.com>
5435 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5436 more inlined, using dbus-string-private.h, speeds things up
5439 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5440 when freeing the string
5441 (_dbus_string_steal_data): fix for align offset
5442 (undo_alignment): new function
5444 2003-02-26 Havoc Pennington <hp@redhat.com>
5446 All kinds of audit fixes from Owen, plus initial attempt to
5447 handle unaligned memory returned from malloc.
5449 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5450 leave room for align_offset and nul byte
5451 (fixup_alignment): function to track an align_offset and
5452 ensure real->str is aligned
5453 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5454 to allow a nul byte plus align offset
5455 (_dbus_string_lock): fix overflow issue
5456 (_dbus_string_init_const_len): add assertions on sanity of len,
5457 assign allocated to be ALLOCATION_PADDING larger than len
5458 (set_length): fixup the overflow handling
5459 (_dbus_string_get_data_len): fix overflow in assertion
5460 (open_gap): detect overflow in size of gap to be opened
5461 (_dbus_string_lengthen): add overflow check
5462 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5463 (_dbus_string_append): add overflow check
5464 (_dbus_string_append_unichar): overflow
5465 (_dbus_string_delete): fix overflow in assertion
5466 (_dbus_string_copy_len): overflow in assertion
5467 (_dbus_string_replace_len): overflows in assertions
5468 (_dbus_string_find): change to implement in terms of
5469 _dbus_string_find_to
5470 (_dbus_string_find_to): assorted fixage
5471 (_dbus_string_equal_c_str): assert c_str != NULL,
5472 fix logic so the function works
5473 (_dbus_string_ends_with_c_str): fix overflow thingy
5474 (_dbus_string_base64_encode): overflow fix
5475 (_dbus_string_validate_ascii): overflow
5476 (_dbus_string_validate_nul): overflow
5478 2003-02-26 Havoc Pennington <hp@redhat.com>
5480 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5482 2003-02-26 Alexander Larsson <alexl@redhat.com>
5485 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5487 * dbus/dbus-connection.c:
5488 * dbus/dbus-connection.h:
5489 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5490 Add dbus_connection_set_wakeup_main_function and use it when queueing
5491 incoming and outgoing messages.
5494 * dbus/dbus-dataslot.c:
5495 Threadsafe usage of DBusDataSlotAllocator
5497 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5500 * dbus/dbus-server-unix.c:
5503 * glib/dbus-gmain.c:
5504 Implement the new wakeup functions for glib.
5507 * glib/test-thread-client.c:
5508 * glib/test-thread-server.c:
5509 * glib/test-thread.h:
5510 Initial cut at some thread test code. Not really done yet.
5512 2003-02-26 Havoc Pennington <hp@pobox.com>
5514 * dbus/dbus-connection.c
5515 (dbus_connection_send_message_with_reply_and_block): fix crash
5516 where we ref'd the outgoing message instead of the returned reply
5518 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5519 at the end of this function, so if we didn't need to read for
5520 authentication, we reinstall it for receiving messages
5522 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5523 a NULL sender for peer-to-peer case
5525 * dbus/dbus-transport-unix.c (check_read_watch): handle
5526 !authenticated case correctly
5528 * glib/dbus-gmain.c: add support for DBusServer
5530 * dbus/dbus-server.c: add data slot support
5532 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5533 return values and handle errors
5535 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5538 * Doxyfile.in (INPUT): add glib subdir
5540 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5541 setup_with_g_main instead of hookup_with_g_main; write docs
5543 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5545 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5546 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5547 * dbus/dbus-message.c: (dbus_message_append_boolean),
5548 (dbus_message_append_boolean_array),
5549 (dbus_message_get_args_valist), (_dbus_message_test):
5550 * dbus/dbus-message.h:
5551 * doc/dbus-specification.sgml:
5552 Various fixes as pointed out by Havoc.
5554 * test/data/invalid-messages/bad-boolean-array.message:
5555 * test/data/invalid-messages/bad-boolean.message:
5556 Add invalid boolean value test cases.
5558 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5560 * dbus/dbus-internals.c: (_dbus_type_to_string):
5561 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5562 (_dbus_marshal_validate_arg):
5563 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5564 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5565 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5566 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5567 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5568 (dbus_message_iter_get_double),
5569 (dbus_message_iter_get_boolean_array), (message_iter_test):
5570 * dbus/dbus-message.h:
5571 * dbus/dbus-protocol.h:
5572 * doc/dbus-specification.sgml:
5573 * test/data/valid-messages/lots-of-arguments.message:
5574 Add support for boolean and boolean array types.
5576 2003-02-23 Havoc Pennington <hp@pobox.com>
5578 * dbus/dbus-keyring.c: finish most of this implementation and
5581 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5582 these barf if the error isn't cleared to NULL
5584 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5585 (_dbus_create_directory): new function
5587 * dbus/dbus-errors.c (dbus_set_error): fix warning
5589 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5590 (_dbus_string_hex_decode): new function
5591 (test_hex_roundtrip): test code
5593 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5595 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5597 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5598 the save-to-temp/rename trick to atomically write the new file
5599 (_dbus_string_parse_uint): new function
5601 2003-02-22 Havoc Pennington <hp@pobox.com>
5603 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5605 2003-02-22 Havoc Pennington <hp@pobox.com>
5607 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5608 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5610 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5612 * dbus/test/data/sha-1: add US government test suite for SHA-1
5614 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5616 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5617 Make string arrays NULL-terminated.
5619 * dbus/dbus-memory.c: (dbus_free_string_array):
5620 * dbus/dbus-memory.h:
5621 New function for freeing NULL-terminated string arrays.
5623 * dbus/dbus-message-builder.c: (append_quoted_string),
5624 (_dbus_message_data_load):
5625 Add support for array types.
5627 * dbus/dbus-message.c: (check_message_handling):
5628 Add more types as test cases.
5630 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5631 (_dbus_string_parse_double):
5632 Add the start offset to the end offset.
5634 * test/data/valid-messages/lots-of-arguments.message:
5635 New test message with lots of arguments.
5637 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5639 * dbus/dbus-message.c: (dbus_message_append_nil),
5640 (dbus_message_append_int32), (dbus_message_append_uint32),
5641 (dbus_message_append_double), (dbus_message_append_string),
5642 (dbus_message_append_int32_array),
5643 (dbus_message_append_uint32_array),
5644 (dbus_message_append_double_array),
5645 (dbus_message_append_byte_array),
5646 (dbus_message_append_string_array):
5647 Fix all out-of-memory handling in these functions.
5649 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5651 * dbus/dbus-message.c: (dbus_message_append_nil):
5654 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5656 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5657 (dbus_message_append_nil), (dbus_message_append_int32_array),
5658 (dbus_message_append_uint32_array),
5659 (dbus_message_append_double_array),
5660 (dbus_message_append_byte_array),
5661 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5662 (dbus_message_iter_get_int32_array),
5663 (dbus_message_iter_get_uint32_array),
5664 (dbus_message_iter_get_double_array),
5665 (dbus_message_iter_get_byte_array),
5666 (dbus_message_iter_get_string_array):
5668 * dbus/dbus-message.h:
5669 Add functions for appending and getting arrays.
5671 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5673 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5674 element size at least 8 bytes, fixes mempool tests on
5677 2003-02-20 Alexander Larsson <alexl@redhat.com>
5679 * dbus/dbus-transport-unix.c (unix_do_iteration):
5680 Unlock the connection mutex during a blocking select call.
5681 Add todo about how we need a way to wake up the select.
5683 * dbus/dbus-connection-internal.h:
5684 * dbus/dbus-connection.c:
5685 Add _dbus_connection_lock and _dbus_connection_unlock.
5687 2003-02-19 Havoc Pennington <hp@pobox.com>
5689 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5690 Doxyfile.in, not Doxyfile
5692 * dbus/dbus-keyring.c: do some hacking on this
5694 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5696 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5698 (dbus_set_error): remove dbus_error_init, check for message ==
5699 NULL *before* we sprintf into it, and add @todo about including
5700 system headers in this file
5702 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5704 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5706 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5707 get various bits of user information based on either username
5709 (_dbus_homedir_from_username): new function
5711 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5714 Add check for nonposix getpwnam_r
5716 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5717 Align the pool element size to a sizeof (void *) boundary.
5719 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5720 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5721 General Solaris fixes.
5723 * test/data/valid-messages/simplest-manual.message:
5724 Explicitly state that we want little-endian packing.
5726 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5728 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5730 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5731 Added to create a transport connecting using a tcp/ip socket.
5733 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5734 to a tcp socket at given host and port.
5735 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5738 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5740 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5741 Added to create a server listening on a TCP/IP socket.
5743 2003-02-19 Havoc Pennington <hp@pobox.com>
5745 Throughout: mop up all the Doxygen warnings and undocumented
5748 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5749 to search any paths.
5751 * dbus/dbus-threads.c: move global mutex initializers to
5752 dbus-internals.h, multiple prototypes was confusing doxygen
5753 besides being kind of ugly
5755 * Doxyfile (PREDEFINED): have Doxygen define
5756 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5757 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5758 (do not abuse the feature! it's for stuff like the autogenerated
5759 macros in dbus-md5.c, not just for things you don't feel like
5762 2003-02-18 Havoc Pennington <hp@pobox.com>
5764 * dbus/dbus-string.c (_dbus_string_zero): new function
5766 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5767 wrap it in some dbus-friendly API
5769 * dbus/dbus-types.h: add 16-bit types
5771 2003-02-18 Joe Shaw <joe@assbarn.com>
5773 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5774 credentials from our currently running process.
5775 (get_word): Fix a buglet where we were copying the entire length
5776 instead of relative to our position.
5778 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5779 keys on the stack... it's 640k of data.
5781 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5782 read the credentials byte off the socket, even if we don't have
5784 (_dbus_poll): Implement poll() using select() for systems which
5787 * glib/test-dbus-glib.c (main): Print out an error if no
5788 parameters are given.
5790 * test/data/auth/fallback.auth-script: Added. Tests that a client
5791 can fallback to a secondary auth mechanism if the first fails.
5793 2003-02-18 Havoc Pennington <hp@pobox.com>
5797 2003-02-17 Havoc Pennington <hp@pobox.com>
5799 * doc/dbus-specification.sgml: lots of cosmetic
5800 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5801 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5802 s/server/bus/ (except in authentication section). Add a section
5803 "Message Bus Message Routing"
5805 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5811 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5813 * doc/dbus-specification.sgml:
5814 Specification updates.
5816 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5818 * bus/activation.c: (bus_activation_init), (child_setup),
5819 (bus_activation_activate_service):
5821 * bus/main.c: (main):
5822 Set DBUS_ADDRESS environment variable.
5824 * dbus/dbus-errors.c: (dbus_set_error):
5825 Don't use va_copy since that's a C99 feature.
5827 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5828 (_dbus_spawn_async):
5829 * dbus/dbus-sysdeps.h:
5830 Add child_setup_func to _dbus_spawn_async.
5832 * doc/dbus-specification.sgml:
5833 Update specification.
5835 * test/spawn-test.c: (setup_func), (main):
5838 2003-02-17 Alexander Larsson <alexl@redhat.com>
5840 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5843 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5847 * doc/dbus-test-plan.sgml:
5848 Add test plan document.
5853 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5855 * dbus/dbus-message.c: (decode_header_data),
5856 (_dbus_message_loader_return_buffer):
5857 Set the header padding amount when loading a message.
5859 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5861 * bus/dispatch.c: (send_one_message):
5862 Only send broadcast messages to registered connections.
5864 * dbus/dbus-message.c: (dbus_message_name_is):
5865 * dbus/dbus-message.h:
5866 New convenience function.
5868 * dbus/dbus-transport-debug.c: (do_reading):
5869 Only dispatch one message per run.
5872 * test/bus-test.c: (new_connection_callback), (die),
5873 (test_hello_client1_handler), (test_hello_client2_handler),
5874 (test_hello_replies), (main):
5876 * test/bus-test-loop.[ch]:
5879 2003-02-16 Havoc Pennington <hp@pobox.com>
5881 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5882 backward conditional
5884 2003-02-16 Alexander Larsson <alexl@redhat.com>
5886 * dbus/dbus-connection.c:
5887 Implement sent_message_with_reply. (with_reply_and block is still
5889 Made dispatch_message not lose message if OOM.
5891 * dbus/dbus-errors.h:
5892 Add NoReply error (for reply timeouts).
5894 2003-02-16 Alexander Larsson <alexl@redhat.com>
5896 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5897 Actually free keys and values when destroying hashtable.
5899 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5901 * dbus/dbus-auth.c: (client_try_next_mechanism):
5904 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5905 Return TRUE if there's no thread implementation around.
5907 * glib/dbus-gmain.c: (free_source),
5908 (dbus_connection_hookup_with_g_main):
5909 Make sure to remove the GSource when the connection is finalized.
5911 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5913 * bus/dispatch.c: (bus_dispatch_message_handler):
5914 * dbus/dbus-errors.h:
5915 Return an error if someone tries to send a message to a service
5918 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5920 * bus/activation.c: (load_directory), (bus_activation_init),
5921 (bus_activation_activate_service):
5924 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5925 More work on the activation handling.
5927 * dbus/dbus-errors.h:
5928 Add some error messages
5930 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5931 * dbus/dbus-message.h:
5932 New function that creates an error message.
5934 * dbus/dbus-protocol.h:
5935 Add ACTIVATE_SERVER message.
5937 * dbus/dbus-server-unix.c: (unix_handle_watch),
5938 (_dbus_server_new_for_domain_socket):
5939 Call _dbus_fd_set_close_on_exec.
5941 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5942 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5943 (_dbus_fd_set_close_on_exec):
5944 * dbus/dbus-sysdeps.h:
5945 Add _dbus_fd_set_close_on exec function. Also add function that checks
5946 that all open fds are set to close-on-exec and warns otherwise.
5948 * dbus/dbus-transport-unix.c:
5949 (_dbus_transport_new_for_domain_socket):
5950 Call _dbus_fd_set_close_on_exec.
5952 2003-02-16 Havoc Pennington <hp@pobox.com>
5954 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5955 allow people to avoid setting SIGPIPE to SIG_IGN
5956 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5957 we've been asked not to
5959 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5961 * dbus/dbus-list.c: (_dbus_list_append_link),
5962 (_dbus_list_prepend_link):
5963 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5967 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5970 * bus/activation.c: (bus_activation_entry_free),
5971 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5973 * bus/main.c: (main):
5974 Add simple activation support, doesn't work yet though.
5976 2003-02-15 Zack Rusin <zack@kde.org>
5978 * qt/dbus-qthread.cpp: small casting fix
5980 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5982 * dbus/dbus-errors.c: (dbus_set_error):
5983 * dbus/dbus-errors.h:
5984 Add a few errors and make dbus_set_error void.
5986 * dbus/dbus-sysdeps.c:
5987 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5988 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5989 * dbus/dbus-sysdeps.h:
5990 Add _dbus_spawn_async.
5992 * test/spawn-test.c: (main):
5993 Test for _dbus_spawn_async.
5995 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5997 * dbus/dbus-internals.h:
5998 Fix build without tests.
6000 * dbus/dbus-list.c: (alloc_link):
6001 Fix a segfault when a malloc fails.
6003 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
6004 (dbus_malloc0), (dbus_realloc):
6005 Add support for malloc debugging.
6007 2003-02-15 Alexander Larsson <alexl@redhat.com>
6009 * dbus/dbus-threads.c:
6010 * dbus/dbus-threads.h:
6011 Add condvars. Remove static mutext from API.
6012 Implement static mutexes by initializing them from threads_init.
6014 * glib/dbus-gthread.c:
6015 * qt/dbus-qthread.cpp:
6016 Update with the thread api changes.
6021 Turn StaticMutex into normal mutex + init function.
6022 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
6023 _dbus_list_append_link, _dbus_list_prepend_link
6026 * dbus/dbus-sysdeps.c:
6027 * dbus/dbus-sysdeps.h:
6028 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
6029 _dbus_atomic_dec. Only slow fallback implementation at the moment.
6031 * dbus/dbus-protocol.h:
6032 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
6034 * dbus/dbus-message.c:
6035 Make ref/unref atomic.
6038 * dbus/dbus-connection-internal.h:
6039 * dbus/dbus-connection.c:
6040 * dbus/dbus-connection.h:
6042 Change _peek to _borrow,_return & _steal_borrowed.
6043 Change disconnect callback to event.
6044 Make dbus_connection_dispatch_messages reentrant.
6046 * dbus/dbus-transport.c:
6047 Don't ref the connection on calls to the transport
6050 * dbus/dbus-message-handler.c:
6053 * glib/dbus-gmain.c:
6054 Don't use peek_message anymore
6057 * test/debug-thread.c:
6058 * test/debug-thread.h:
6059 Simple thread implementation that asserts() on deadlocks in
6060 single-threaded code.
6063 (main) Call debug_threads_init.
6066 Use disconnect message instead of disconnect callback.
6070 Don't call dbus_connection_set_disconnect_function. Instead export
6071 bus_connection_disconnect.
6074 Call bus_connection_disconnect when we get a disconnected message.
6076 2003-02-15 Havoc Pennington <hp@pobox.com>
6078 * dbus/dbus-message.c (dbus_message_new): fool around with the
6081 2003-02-14 Havoc Pennington <hp@pobox.com>
6083 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6085 * dbus/dbus-memory.c: fail if the debug functions indicate we
6088 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6089 (_dbus_decrement_fail_alloc_counter): debug functions to
6090 simulate memory allocation failures
6092 2003-02-14 Havoc Pennington <hp@pobox.com>
6094 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6097 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6099 * bus/driver.c: (bus_driver_handle_hello):
6101 * bus/services.c: (bus_service_lookup):
6102 Reorder message sending so we get a more sane order.
6104 * test/bus-test.c: (message_handler):
6107 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6109 * bus/driver.c: (bus_driver_send_service_deleted),
6110 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6111 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6112 (bus_driver_send_welcome_message),
6113 (bus_driver_handle_list_services),
6114 (bus_driver_handle_acquire_service),
6115 (bus_driver_handle_service_exists):
6116 * dbus/dbus-bus.c: (dbus_bus_register_client),
6117 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6118 * dbus/dbus-errors.c: (dbus_result_to_string):
6119 * dbus/dbus-errors.h:
6120 * dbus/dbus-message.c: (dbus_message_append_args),
6121 (dbus_message_append_args_valist), (dbus_message_get_args),
6122 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6123 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6124 (dbus_message_iter_get_byte_array),
6125 (dbus_message_iter_get_string_array), (message_iter_test),
6126 (check_message_handling), (_dbus_message_test):
6127 * dbus/dbus-message.h:
6128 * test/bus-test.c: (main):
6129 Change fields to arguments in messages, so that they won't be
6130 confused with header fields.
6132 * glib/test-dbus-glib.c: (main):
6133 Remove append_fields from hello message.
6135 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6137 * dbus/dbus-errors.c:
6138 * dbus/dbus-message.c:
6139 * dbus/dbus-string.c:
6140 Documentation fixes.
6142 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6144 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6146 Implement support for timeouts in dbus-glib.
6148 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6150 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6151 * dbus/dbus-message.c: (process_test_subdir):
6152 * test/break-loader.c: (find_breaks_based_on):
6153 Plug some memory leaks.
6155 2003-02-13 Richard Hult <rhult@codefactory.se>
6157 * bus/main.c: Fix build.
6159 * dbus/dbus-errors.h:
6160 * dbus/dbus-errors.c: Fix copyright for Anders.
6162 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6167 * bus/connection.c: (bus_connection_foreach):
6170 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6171 (unescape_string), (new_section), (parse_section_start),
6172 (parse_key_value), (report_error), (bus_desktop_file_load),
6173 (bus_desktop_file_get_string):
6174 * bus/desktop-file.h:
6175 Use DBusError for error reporting.
6177 * bus/dispatch.c: (send_one_message),
6178 (bus_dispatch_message_handler):
6179 * bus/driver.c: (bus_driver_send_service_deleted),
6180 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6181 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6182 (bus_driver_send_welcome_message),
6183 (bus_driver_handle_list_services),
6184 (bus_driver_handle_acquire_service),
6185 (bus_driver_handle_service_exists):
6186 * bus/loop.c: (bus_loop_run):
6188 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6190 * bus/utils.c: (bus_wait_for_memory):
6192 New files with general utility functions.
6194 * dbus/dbus-internals.h:
6195 Remove _DBUS_HANDLE_OOM.
6197 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6199 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6200 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6201 * dbus/dbus-errors.h:
6202 Add DBusError structure.
6204 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6206 * test/data/valid-messages/standard-acquire-service.message:
6207 * test/data/valid-messages/standard-hello.message:
6208 * test/data/valid-messages/standard-list-services.message:
6209 * test/data/valid-messages/standard-service-exists.message:
6210 Add some standard messages.
6212 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6214 * bus/driver.c: (bus_driver_send_welcome_message),
6215 (bus_driver_handle_list_services),
6216 (bus_driver_handle_acquire_service),
6217 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6218 Update for API changes in libdbus.
6220 * dbus/dbus-message.c: (dbus_message_new_reply):
6221 * dbus/dbus-message.h:
6222 Remove the name argument. The spec states that replies shouldn't
6225 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6227 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6228 (report_error), (bus_desktop_file_load), (lookup_section),
6229 (lookup_line), (bus_desktop_file_get_raw),
6230 (bus_desktop_file_get_string):
6231 * bus/desktop-file.h:
6232 Some fixes, and new functions for getting a key value from a section.
6234 2003-02-13 Havoc Pennington <hp@pobox.com>
6236 * test/data/auth/fail-after-n-attempts.auth-script: new test
6238 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6241 2003-02-13 Havoc Pennington <hp@pobox.com>
6243 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6244 dbus_credentials_match were backward
6246 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6247 NO_CREDENTIALS and ROOT_CREDENTIALS
6249 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6250 into here. Never process more commands after we've reached an
6251 end state; store further data as unused bytes.
6253 * test/data/auth/*: add more auth tests
6255 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6256 command to match exact string and EXPECT_UNUSED to match unused
6259 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6261 2003-02-12 Havoc Pennington <hp@pobox.com>
6263 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6264 \r off of popped lines
6266 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6269 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6272 2003-02-12 Havoc Pennington <hp@pobox.com>
6274 * dbus/Makefile.am: remove break-loader from the build, since it
6277 * configure.in: add --enable-gcov to turn on coverage profiling
6278 flags and disable optimization
6280 2003-02-10 Havoc Pennington <hp@pobox.com>
6282 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6283 initial cut at test framework for DBusAuth from laptop.
6284 Doesn't quite work yet but it compiles and I need to get
6285 it off the 266mhz laptop. ;-)
6287 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6288 fix a memleak in error case
6290 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6293 * bus/desktop-file.c:
6294 * bus/desktop-file.h:
6295 Add a desktop file parser.
6297 2003-02-11 Zack Rusin <zack@kde.org>
6299 * qt/message.[h|cpp]: sample implementation
6300 of the KDE wrapper for DBusMessage
6302 2003-02-09 Zack Rusin <zack@kde.org>
6304 * test/bus-test.c: make_it_compile
6305 * doc/dbus-specification.sgml: minimal semantic fix
6307 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6313 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6316 * dbus/dbus-break-loader.c:
6318 * test/break-loader.c:
6319 Move dbus-break-loader to test/ and rename it to break-loader.
6321 2003-02-02 Havoc Pennington <hp@pobox.com>
6323 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6324 for code to manage cookies in your home directory
6326 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6328 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6329 to authenticate, then disconnect the client.
6331 2003-02-03 Alexander Larsson <alexl@redhat.com>
6333 * dbus/dbus-message.c (dbus_message_append_fields):
6336 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6338 * doc/dbus-specification.sgml:
6339 Update address format section.
6341 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6344 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6345 (message_handler), (new_connection_callback), (loop_quit),
6349 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6351 * bus/driver.c: (bus_driver_handle_service_exists):
6352 Simplify the code a bit.
6354 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6357 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6360 Add libdbus-daemon.la and link to it.
6362 2003-02-01 James Willcox <jwillcox@gnome.org>
6364 * bus/driver.c: (bus_driver_handle_own_service):
6365 Actually include the service reply code in the message.
6367 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6369 * bus/driver.c: (bus_driver_handle_service_exists):
6370 Don't unref the incoming message.
6372 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6374 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6376 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6378 * dbus/dbus-server.c: (dbus_server_listen):
6379 * dbus/dbus-transport.c: (_dbus_transport_open):
6380 ifdef out the calls to the debug transport and server.
6382 2003-02-02 Alexander Larsson <alexl@redhat.com>
6384 * dbus/dbus-watch.c (dbus_watch_get_flags):
6385 Add note in the docs that ERROR or HANGUP won't be returned
6386 and are assumed always on.
6388 * glib/dbus-gmain.c (add_watch):
6389 Always add IO_ERR | IO_HUP
6391 * dbus/dbus-message.h:
6392 Add semicolon after dbus_message_iter_get_string_array().
6393 Makes qt code build again
6395 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6397 * bus/driver.c: (create_unique_client_name),
6398 (bus_driver_handle_hello):
6399 Don't take a name, just use a numeric id to identify
6403 * dbus/dbus-bus.c: (dbus_bus_register_client),
6404 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6406 Add new convenience functions for communicating with the bus.
6408 * dbus/dbus-message.h:
6410 * dbus/dbus-protocol.h:
6413 2003-02-01 Alexander Larsson <alexl@redhat.com>
6415 * dbus/dbus-message.c (dbus_message_append_fields):
6416 Add some more doc comments.
6418 2003-02-01 Havoc Pennington <hp@pobox.com>
6420 * dbus/dbus-break-loader.c (randomly_modify_length): change
6421 a 4-byte value in the message as if it were a length
6423 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6424 execute bit on saved files
6426 2003-02-01 Havoc Pennington <hp@pobox.com>
6428 * dbus/dbus-break-loader.c (main): new program to find messages
6429 that break the loader.
6431 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6432 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6434 * dbus/dbus-string.c (_dbus_string_set_byte): new
6436 2003-01-31 Havoc Pennington <hp@pobox.com>
6438 * dbus/dbus-message.c: refactor the test code to be more general,
6439 in preparation for writing a "randomly permute test cases to
6440 try to break the loader" program.
6442 2003-01-31 Havoc Pennington <hp@pobox.com>
6444 * doc/dbus-specification.sgml: work on the specification
6446 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6447 the protocol version of the message.
6449 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6450 no longer specifies that.
6451 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6454 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6455 "break" for DBUS_TYPE_NIL, remove @todo
6457 2003-01-31 Havoc Pennington <hp@pobox.com>
6459 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6460 just set_is_error/get_is_error as this is a commonly-used
6461 function, and write docs.
6463 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6465 * dbus/dbus-address.c: (dbus_address_entry_free):
6466 Free key and value lists.
6468 * dbus/dbus-internals.c: (_dbus_type_to_string):
6469 Add the types we didn't have.
6471 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6472 (_dbus_marshal_validate_arg):
6475 * dbus/dbus-message.c: (dbus_message_set_sender):
6476 Remove todo about being able to set sender to NULL.
6478 (dbus_message_set_is_error_reply),
6479 (dbus_message_get_is_error_reply):
6480 * dbus/dbus-message.h:
6483 * dbus/dbus-protocol.h:
6484 Add error reply flag.
6486 * test/data/valid-messages/opposite-endian.message:
6487 Add NIL type to test.
6489 2003-01-31 Havoc Pennington <hp@pobox.com>
6491 * doc/dbus-specification.sgml: fully specify the header. Add
6492 flags and major protocol version, and change header/body len to
6495 * dbus/dbus-message-builder.c (append_saved_length): append length
6498 * dbus/dbus-message.c (dbus_message_create_header): change header
6499 length and body length to unsigned. Add the new fields from the
6501 (_dbus_message_loader_return_buffer): unsigned header/body len
6503 2003-01-30 Havoc Pennington <hp@pobox.com>
6505 * dbus/dbus-auth.c: rework to use only REJECTED, no
6508 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6509 use REJECTED, suggested by Mark McLoughlin
6511 2003-01-30 Havoc Pennington <hp@pobox.com>
6513 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6514 a better way to report errors here. e.g. "unix address lacks
6515 path" or something. also "no such file" when the path doesn't
6518 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6520 (dbus_parse_address): add @todo about documenting address format,
6521 and allowing , and ; to be escaped
6523 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6526 Add dbus-address.[ch]
6528 * dbus/dbus-address.c: (dbus_address_entry_free),
6529 (dbus_address_entries_free), (create_entry),
6530 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6531 (dbus_parse_address), (_dbus_address_test):
6532 * dbus/dbus-address.h:
6533 New files for dealing with address parsing.
6535 * dbus/dbus-connection.c:
6536 Document timeout functions.
6538 * dbus/dbus-message.c:
6539 Document dbus_message_new_from_message.
6541 * dbus/dbus-server-debug.c:
6544 * dbus/dbus-server.c: (dbus_server_listen):
6545 Parse address and use correct server implementation.
6547 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6548 * dbus/dbus-string.h:
6549 New function with test.
6551 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6555 * dbus/dbus-transport-debug.c:
6558 * dbus/dbus-transport.c: (_dbus_transport_open):
6559 Parse address and use correct transport implementation.
6561 2003-01-30 Havoc Pennington <hp@pobox.com>
6563 * dbus/dbus-message.c: use message->byte_order instead of
6564 DBUS_COMPILER_BYTE_ORDER throughout.
6565 (dbus_message_create_header): pad header to align the
6566 start of the body of the message to 8-byte boundary
6568 * dbus/dbus-marshal.h: make all the demarshalers take const
6569 DBusString arguments.
6571 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6572 validate message args here, so we don't have to do slow validation
6573 later, and so we catch bad messages as they are incoming. Also add
6574 better checks on header_len and body_len. Also fill in
6577 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6578 implemented properly)
6579 (_dbus_string_validate_nul): new function to check all-nul
6581 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6582 get_arg_end_pos and remove all validation
6583 (_dbus_marshal_validate_arg): actually do validation here.
6585 2003-01-29 Havoc Pennington <hp@pobox.com>
6587 * dbus/dbus-message.c (check_message_handling): fix assertion
6588 failure on set_client_serial
6590 2003-01-28 Havoc Pennington <hp@pobox.com>
6592 * dbus/dbus-server-debug.c: Add doc section comments
6594 * dbus/dbus-transport-debug.c: add doc section comments
6596 2003-01-28 Havoc Pennington <hp@redhat.com>
6598 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6599 the reverse order from how I had it
6600 (_dbus_string_base64_encode): reverse encoding order. I was
6601 basically byteswapping everything during encoding.
6603 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6605 * dbus/dbus-connection-internal.h:
6606 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6607 (_dbus_connection_remove_timeout):
6608 Add functions for adding and removing timeouts.
6610 * dbus/dbus-message.c: (dbus_message_new_from_message):
6611 Add new function that takes a message and creates an exact
6612 copy of it, but with the refcount set to 1.
6613 (check_message_handling):
6616 * dbus/dbus-server-protected.h:
6617 * dbus/dbus-server.c: (_dbus_server_init_base),
6618 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6619 (dbus_server_set_timeout_functions):
6620 (_dbus_server_remove_timeout):
6621 New functions so that a server can add and remove timeouts.
6623 (dbus_server_listen):
6624 Add commented out call to dbus_server_debug_new.
6626 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6627 Actually set the handler, doh.
6629 * dbus/dbus-transport.c: (_dbus_transport_open):
6630 Add commented out call to dbus_transport_debug_client_new.
6633 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6635 2003-01-28 Havoc Pennington <hp@pobox.com>
6637 * dbus/dbus-message.c (check_message_handling): function to check
6638 on the loaded message, iterates over it etc.
6640 2003-01-28 Havoc Pennington <hp@pobox.com>
6642 * test/Makefile.am (dist-hook): fix make distdir
6644 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6646 2003-01-27 Havoc Pennington <hp@pobox.com>
6648 * dbus/dbus-mempool.c (time_for_size): replace printf with
6651 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6652 empty lines; fix the SAVE_LENGTH stuff to be
6653 START_LENGTH/END_LENGTH so it actually works; couple other
6656 * test/Makefile.am (dist-hook): add dist-hook for .message files
6658 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6659 can be constant or locked.
6660 (_dbus_string_free): allow freeing a const string as
6663 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6665 * dbus/dbus-test-main.c (main): take an argument which is the
6666 directory containing test data
6668 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6669 argument to this and load all the messages in test/data/
6670 checking that they can be loaded or not loaded as appropriate.
6672 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6674 * bus/dispatch.c: (bus_dispatch_message_handler):
6675 Dispatch messages sent to services.
6677 * bus/driver.c: (bus_driver_send_service_deleted),
6678 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6679 (bus_driver_send_service_acquired):
6680 Add helper functions for sending service related messages.
6682 (bus_driver_send_welcome_message):
6683 Send HELLO_REPLY instead of WELCOME.
6685 (bus_driver_handle_list_services):
6686 Send LIST_SERVICES_REPLY instead of SERVICES.
6688 (bus_driver_handle_own_service),
6689 (bus_driver_handle_service_exists):
6690 New message handlers.
6692 (bus_driver_handle_message):
6693 Invoke new message handlers.
6695 (bus_driver_remove_connection):
6696 Don't remove any services here since that's done automatically
6697 by bus_service_remove_owner now.
6700 New function signatures.
6702 * bus/services.c: (bus_service_add_owner):
6703 Send ServiceAcquired message if we're the only primary owner.
6705 (bus_service_remove_owner):
6706 Send ServiceAcquired/ServiceLost messages.
6708 (bus_service_set_prohibit_replacement),
6709 (bus_service_get_prohibit_replacement):
6710 Functions for setting prohibit replacement.
6712 (bus_service_has_owner):
6713 New function that checks if a connection is in the owner queue of
6717 Add new function signatures.
6719 * dbus/dbus-list.c: (_dbus_list_test):
6720 Add tests for _dbus_list_remove_last and traversing the list backwards.
6723 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6724 go any further, so return NULL then.
6726 * dbus/dbus-protocol.h:
6727 Add new messages, service flags and service replies.
6729 2003-01-26 Havoc Pennington <hp@pobox.com>
6731 * dbus/dbus-message-builder.c: implement, completely untested.
6733 * test/data/*: add data to be used in testing.
6734 ".message" files are our simple loadable text format.
6735 ".message-raw" will be binary dumps of messages.
6737 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6739 2003-01-26 Havoc Pennington <hp@pobox.com>
6741 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6743 * dbus/dbus-errors.c (dbus_result_to_string): add
6746 * dbus/dbus-message-builder.c: new file, will contain code to load
6747 up messages from files. Not implemented yet.
6749 2003-01-26 Havoc Pennington <hp@pobox.com>
6751 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6752 the sender by setting to NULL
6754 2003-01-26 Havoc Pennington <hp@pobox.com>
6756 The unit tests pass, but otherwise untested. If it breaks, the
6757 tests should have been better. ;-)
6759 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6762 * dbus/dbus-message.c: redo everything so we maintain
6763 message->header as the only copy of the various fields.
6764 This avoids the possibility of out-of-memory in some cases,
6765 for example dbus_message_lock() can't run out of memory anymore,
6766 and avoids extra copying. Figured I may as well go ahead and do
6767 this since it was busted for dbus_message_lock to not return
6768 failure on OOM, and dbus_message_write_header was totally
6769 unchecked for OOM. Also fixed some random other bugs.
6771 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6772 that strings are nul-terminated. Also, end_pos can be equal
6773 to string length just not greater than, I think.
6774 (_dbus_marshal_set_int32): new function
6775 (_dbus_marshal_set_uint32): new function
6776 (_dbus_marshal_set_string): new function
6778 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6779 a warning, init timeout_list to NULL
6780 (dbus_connection_send_message): don't use uninitialized variable
6783 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6785 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6787 * bus/driver.c: (bus_driver_handle_hello),
6788 (bus_driver_send_welcome_message):
6791 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6793 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6794 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6795 (dbus_connection_unref):
6796 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6797 * dbus/dbus-message.c: (dbus_message_unref),
6800 (dbus_message_get_fields):
6801 Remove debugging printout.
6803 (_dbus_message_loader_return_buffer):
6804 Don't store the header string.
6806 (_dbus_message_test):
6809 2003-01-26 Richard Hult <rhult@codefactory.se>
6811 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6812 the file descriptor list, since it can change under us.
6814 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6816 * glib/dbus-gmain.c: (dbus_connection_prepare),
6817 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6818 (remove_watch), (dbus_connection_hookup_with_g_main):
6819 Rewrite the glib handling to use its own GSource instead of a
6820 GIOChannel so we can catch messages put in the queue while waiting
6823 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6826 * bus/connection.c: (connection_disconnect_handler),
6827 (connection_watch_callback), (bus_connection_setup):
6828 * bus/dispatch.c: (send_one_message),
6829 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6830 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6832 * bus/driver.c: (bus_driver_send_service_deleted),
6833 (bus_driver_send_service_created), (bus_driver_handle_hello),
6834 (bus_driver_send_welcome_message),
6835 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6836 (bus_driver_handle_message):
6838 Refactor code, put the message dispatching in its own file. Use
6839 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6842 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6844 * dbus/dbus-internals.h:
6845 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6847 * dbus/dbus-message.c: (dbus_message_get_sender):
6848 * dbus/dbus-message.h:
6849 Implement dbus_message_get_sender.
6851 * dbus/dbus-protocol.h:
6852 Add message and service defines.
6854 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6856 * dbus/dbus-connection.c: (dbus_connection_send_message):
6857 * dbus/dbus-message-internal.h:
6858 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6859 (dbus_message_write_header):
6860 Remove _dbus_messag_unlock and don't set the client serial on a
6861 message if one already exists.
6863 2003-01-24 Havoc Pennington <hp@pobox.com>
6865 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6868 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6871 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6873 * dbus/dbus-list.c: (alloc_link), (free_link):
6874 Use a memory pool for the links.
6876 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6878 * bus/connection.c: (bus_connection_foreach):
6880 Add new bus_connection_foreach function.
6882 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6883 Add function that broadcasts a message to all clients.
6885 (bus_driver_send_service_created), (bus_driver_handle_hello),
6886 (bus_driver_send_welcome_message),
6887 (bus_driver_handle_list_services), (bus_driver_message_handler):
6888 Implement functions that take care of listing services, and notifying
6889 clients when new services are created.
6891 * bus/services.c: (bus_services_list):
6893 Add new function that returns an array of strings with the currently
6894 registered services.
6897 * glib/dbus-gmain.c:
6898 Update copyright year.
6900 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6902 * dbus/dbus-connection.c: (dbus_connection_send_message):
6903 Unlock the message in case it was sent earlier.
6905 (dbus_connection_send_message_with_reply_and_block):
6906 Remove the reply message from the list.
6908 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6909 Set array_len and new_pos correctly.
6911 (_dbus_marshal_test):
6912 Remove debug output.
6914 * dbus/dbus-message-internal.h:
6915 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6916 New function that returns the reply serial.
6918 (_dbus_message_unlock):
6919 New function that unlocks a message and resets its header.
6921 (dbus_message_append_string_array),
6922 (dbus_message_get_fields_valist),
6923 (dbus_message_iter_get_field_type),
6924 (dbus_message_iter_get_string_array),
6925 (dbus_message_get_fields),
6926 (dbus_message_append_fields_valist):
6927 Handle string arrays.
6929 (dbus_message_set_sender):
6930 Make this function public since the bus daemon needs it.
6932 (decode_header_data):
6933 Set the reply serial to -1 initially.
6935 * dbus/dbus-message.h:
6936 Add dbus_message_set_sender.
6938 2003-01-24 Havoc Pennington <hp@pobox.com>
6940 * doc/dbus-specification.sgml: add some stuff
6942 2003-01-22 Havoc Pennington <hp@pobox.com>
6944 * doc/dbus-specification.sgml: Start to document the protocol.
6946 2003-01-22 Havoc Pennington <hp@pobox.com>
6948 * dbus/dbus-connection.c
6949 (dbus_connection_send_message_with_reply_and_block): add some @todo
6951 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6953 2003-01-21 Havoc Pennington <hp@pobox.com>
6955 (patch untested because can't compile)
6957 * bus/driver.c (create_unique_client_name): make this function
6958 never recycle client names. Also, caller should initialize
6961 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6963 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6965 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6966 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6967 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6968 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6969 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6970 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6971 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6972 * dbus/dbus-marshal.h:
6973 * dbus/dbus-protocol.h:
6974 Add support for marshalling and demarshalling integer, double
6977 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6982 * bus/connection.c: (connection_disconnect_handler):
6983 Remove the connection from the bus driver's list.
6985 (connection_watch_callback): Dispatch messages.
6987 (free_connection_data): Free connection name.
6989 (bus_connection_setup): Add connection to the bus driver's list.
6990 (bus_connection_remove_owned_service):
6991 (bus_connection_set_name), (bus_connection_get_name):
6992 Add functions for setting and getting the connection's name.
6995 Add function headers.
6997 * bus/driver.c: (create_unique_client_name),
6998 (bus_driver_handle_hello_message),
6999 (bus_driver_send_welcome_message), (bus_driver_message_handler),
7000 (bus_driver_add_connection), (bus_driver_remove_connection):
7003 * bus/services.c: (bus_service_free):
7005 New file that handles communication and registreation with the bus
7008 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7010 * dbus/dbus-connection.c: (dbus_connection_send_message):
7011 Add a new client_serial parameter.
7013 (dbus_connection_send_message_with_reply):
7014 Remove a @todo since we've implemented the blocking function.
7016 (dbus_connection_send_message_with_reply_and_block):
7017 New function that sends a message and waits for a reply and
7018 then returns the reply.
7020 * dbus/dbus-connection.h:
7023 * dbus/dbus-errors.c: (dbus_result_to_string):
7024 * dbus/dbus-errors.h:
7025 Add new DBUS_RESULT.
7027 * dbus/dbus-message-internal.h:
7028 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
7029 (_dbus_message_set_sender), (dbus_message_write_header),
7030 (dbus_message_new_reply), (decode_header_data),
7031 (_dbus_message_loader_return_buffer), (_dbus_message_test):
7032 * dbus/dbus-message.h:
7033 Add new functions that set the reply serial and sender.
7034 Also marshal and demarshal them correctly and add test.
7036 * dbus/dbus-protocol.h:
7037 Add new DBUS_MESSAGE_TYPE_SENDER.
7040 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
7041 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
7042 (dbus_connection_hookup_with_g_main):
7043 * glib/test-dbus-glib.c: (main):
7044 Rewrite to use GIOChannel and remove the GSource crack.
7046 * test/echo-client.c: (main):
7047 * test/watch.c: (check_messages):
7048 Update for changed APIs
7050 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7052 * dbus/Makefile.am: Add dbus-timeout.[cħ]
7054 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
7055 Create a DBusTimeoutList.
7056 (dbus_connection_set_timeout_functions): Add new function to
7057 set timeout callbacks
7059 * dbus/dbus-connection.h: Add public DBusTimeout API.
7061 * dbus/dbus-message.c: (dbus_message_get_service):
7062 * dbus/dbus-message.h: New function.
7064 * dbus/dbus-server.c: Fix small doc typo.
7066 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
7068 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7070 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
7071 of the string, just as long as specified.
7073 2003-01-19 Havoc Pennington <hp@pobox.com>
7075 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
7078 * dbus/dbus-server.c (dbus_server_set_max_connections)
7079 (dbus_server_get_max_connections, dbus_server_get_n_connections):
7080 keep track of current number of connections, and add API for
7081 setting a max (but haven't implemented enforcing the max yet)
7083 2003-01-18 Havoc Pennington <hp@pobox.com>
7085 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7086 reading/writing if read_watch != NULL or write_watch != NULL.
7088 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7089 the message loader code to actually load message->header and
7090 message->body into the newly-created message.
7092 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7095 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7096 (dbus_connection_get_max_message_size)
7097 (dbus_connection_set_max_live_messages_size)
7098 (dbus_connection_get_max_live_messages_size): implement some
7099 resource limitation functions
7101 * dbus/dbus-resources.c: new file implementing some of the
7102 resource limits stuff
7104 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7105 missing docs, add @todo to handle OOM etc.
7107 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7110 2003-01-18 Havoc Pennington <hp@pobox.com>
7112 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7113 connection if it hasn't been already.
7115 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7116 replace with DisconnectFunction.
7118 2003-01-18 Havoc Pennington <hp@pobox.com>
7120 Building --disable-verbose-mode --disable-asserts --disable-tests
7121 cuts the library from 112K to 45K or so
7123 * configure.in: check for varargs macro support,
7124 add --enable-verbose-mode, --enable-asserts.
7126 * dbus/dbus-internals.h (_dbus_assert): support
7128 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7130 2003-01-18 Havoc Pennington <hp@pobox.com>
7132 * dbus/dbus-test.c: include config.h so that tests actually run
7134 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7135 so the failure mode when that assumption fails will be plenty
7138 2003-01-18 Havoc Pennington <hp@pobox.com>
7140 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7142 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7145 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7146 since we don't want to use those in make check
7148 2003-01-15 Havoc Pennington <hp@redhat.com>
7154 2003-01-15 Havoc Pennington <hp@redhat.com>
7156 * test/Makefile.am: fix so that test source code ends up in the
7157 distribution on make distcheck
7159 2003-01-15 Havoc Pennington <hp@redhat.com>
7165 2003-01-15 Havoc Pennington <hp@redhat.com>
7167 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7168 fix build when --disable-tests
7170 * Makefile.am (EXTRA_DIST): put HACKING in here
7172 * HACKING: document procedure for making a tarball release.
7174 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7176 * bus/connection.c: (connection_error_handler),
7177 (bus_connection_setup):
7178 * bus/main.c: (main):
7179 Make sure that the DBusConnectionData struct is NULLed
7180 out to prevent a segfault.
7182 * dbus/dbus-errors.c: (dbus_result_to_string):
7183 * dbus/dbus-errors.h:
7184 * dbus/dbus-message.c: (dbus_message_get_fields),
7185 (dbus_message_get_fields_valist), (_dbus_message_test):
7186 * dbus/dbus-message.h:
7187 Make dbus_message_get_fields return a result code so we can
7188 track invalid fields as well as oom.
7190 2003-01-11 Havoc Pennington <hp@pobox.com>
7192 * configure.in: change --enable-test/--enable-ansi action-if-given
7193 to enable_foo=$enableval instead of enable_foo=yes
7195 2003-01-08 Havoc Pennington <hp@pobox.com>
7197 * dbus/dbus-string.c (_dbus_string_align_length): new function
7199 * dbus/dbus-test-main.c: move main() for test app here
7201 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7202 symbol to run tests, because dbus-test isn't in the main
7205 Code review nitpicks.
7207 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7208 for people with narrow emacs ;-). Assert client_serial was filled
7209 in. Assert message->name != NULL.
7210 (dbus_message_append_fields): have "first_field_type" arg separate
7211 from va list, needed for C++ binding that also uses varargs IIRC
7212 and helps with type safety
7213 (dbus_message_new): add @todo about using DBusString to store
7214 service/name internally
7215 (dbus_message_new): don't leak ->service and ->name on OOM later
7217 (dbus_message_unref): free the service name
7218 (dbus_message_get_fields): same change to varargs
7219 i.e. first_field_type
7220 (_dbus_message_loader_return_buffer): assert that the message data
7221 is aligned (if not it's a bug in our code). Put in verbose griping
7222 about why we set corrupted = TRUE.
7223 (decode_header_data): add FIXME that char* is evil. Was going to
7224 add FIXME about evil locale-specific string.h strncmp, but just
7225 switched to wacky string-as-uint32 optimization. Move check for
7226 "no room for field name" above get_const_data_len() to avoid
7227 assertion failure in get_const_data_len if we have trailing 2
7228 bytes or the like. Check for service and name fields being
7229 provided twice. Don't leak service/name on error. Require field
7230 names to be aligned to 4 bytes.
7232 * dbus/dbus-marshal.c: move byte swap stuff to header
7233 (_dbus_pack_int32): uscore-prefix
7234 (_dbus_unpack_int32): uscore-prefix
7235 (_dbus_unpack_uint32): export
7236 (_dbus_demarshal_string): add @todo complaining about use of
7238 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7239 handling allowing corrupt data to go unchecked
7241 2003-01-08 Havoc Pennington <hp@redhat.com>
7243 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7244 to the select() as needed for authentication. (should be using
7245 _dbus_poll() not select, but for another day)
7247 * dbus/dbus.h: include dbus/dbus-protocol.h
7249 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7251 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7254 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7256 * dbus/dbus-internals.c: (_dbus_type_to_string):
7257 New function that returns a string describing a type.
7259 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7260 * dbus/dbus-marshal.h:
7261 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7262 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7263 (dbus_message_iter_get_byte_array):
7264 * dbus/dbus-message.h:
7265 Add new convenience functions for appending and getting message fields.
7266 Also add demarshalling routines for byte arrays.
7268 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7270 * dbus/dbus-connection-internal.h:
7271 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7272 (_dbus_connection_get_next_client_serial),
7273 (dbus_connection_send_message):
7274 * dbus/dbus-internals.h:
7275 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7276 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7277 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7278 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7279 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7280 (_dbus_verbose_bytes), (_dbus_marshal_test):
7281 * dbus/dbus-marshal.h:
7282 * dbus/dbus-message-internal.h:
7283 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7284 (dbus_message_write_header), (_dbus_message_lock),
7285 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7286 (dbus_message_get_name), (dbus_message_append_int32),
7287 (dbus_message_append_uint32), (dbus_message_append_double),
7288 (dbus_message_append_string), (dbus_message_append_byte_array),
7289 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7290 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7291 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7292 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7293 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7294 (decode_header_data), (_dbus_message_loader_return_buffer),
7295 (message_iter_test), (_dbus_message_test):
7296 * dbus/dbus-message.h:
7297 * dbus/dbus-protocol.h:
7298 * dbus/dbus-test.c: (main):
7300 * glib/test-dbus-glib.c: (message_handler), (main):
7301 * test/echo-client.c: (main):
7302 * test/watch.c: (check_messages):
7303 Make messages sendable and receivable for real.
7305 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7307 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7308 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7309 * dbus/dbus-message.c: (dbus_message_append_int32),
7310 (dbus_message_append_uint32), (dbus_message_append_double),
7311 (dbus_message_append_string), (dbus_message_append_byte_array):
7312 Handle OOM restoration.
7314 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7316 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7317 (_dbus_demarshal_string), (_dbus_marshal_test):
7318 * dbus/dbus-marshal.h:
7319 * dbus/dbus-message.c: (dbus_message_get_name),
7320 Document these functions.
7322 (dbus_message_append_int32), (dbus_message_append_uint32),
7323 (dbus_message_append_double), (dbus_message_append_string),
7324 (dbus_message_append_byte_array):
7325 * dbus/dbus-message.h:
7326 Add functions for adding message fields of different types.
7328 * dbus/dbus-protocol.h:
7329 Add the different types.
7331 2003-01-05 Havoc Pennington <hp@pobox.com>
7333 * bus/connection.c: implement routines for handling connections,
7334 first thing is keeping a list of owned services on each connection
7335 and setting up watches etc.
7337 * bus/services.c: implement a mapping from service names to lists
7340 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7342 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7343 to use static mutexes for global data
7345 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7346 collection of functions to set/get application-specific data
7347 on the DBusConnection.
7349 2003-01-04 Havoc Pennington <hp@pobox.com>
7351 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7352 (_dbus_poll): new function
7354 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7357 * bus/loop.c: initial code for the daemon main loop
7359 2003-01-04 Havoc Pennington <hp@pobox.com>
7361 * test/watch.c (error_handler): make it safe if the error handler
7362 is called multiple times (if we s/error handler/disconnect
7363 handler/ we should just guarantee it's called only once)
7365 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7366 error handler on disconnect (it's quite possible we should
7367 just change the error handler to a "disconnect handler," I'm
7368 not sure we have any other meaningful errors)
7370 * configure.in: check for getpwnam_r
7372 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7373 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7374 mechanism as in SASL spec, using socket credentials
7376 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7377 (_dbus_send_credentials_unix_socket): new function
7379 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7381 (_dbus_write): only check errno if <0 returned
7382 (_dbus_write_two): ditto
7384 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7386 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7387 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7388 (_dbus_marshal_test):
7389 * dbus/dbus-marshal.h:
7390 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7391 to _dbus_marshal_utf8_string. Also fix some tests.
7393 2002-12-28 Harri Porten <porten@kde.org>
7395 * configure.in: added check for C++ compiler and a very cheesy
7396 check for the Qt integration
7398 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7400 * qt/Makefile.am: added
7402 * qt/.cvsignore: added
7404 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7405 latter, added #ifdef QT_THREAD_SUPPORT guard.
7407 * dbus/Makefile.am: added missing headers for make dist
7409 2002-12-28 Kristian Rietveld <kris@gtk.org>
7411 * dbus/Makefile.am: fixup export-symbols-regex.
7413 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7415 * acinclude.m4: Add this file and put the
7416 PKG_CHECK_MODULE macro in it.
7418 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7420 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7421 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7422 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7423 (_dbus_marshal_test):
7424 Make the demarshalling routines align the pos argument.
7425 Add string marshalling tests and fix the obvious bugs
7428 2002-12-26 Havoc Pennington <hp@pobox.com>
7430 * dbus/dbus-auth.c: fixes fixes fixes
7432 * dbus/dbus-transport-unix.c: wire up support for
7433 encoding/decoding data on the wire
7435 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7436 (_dbus_auth_decode_data): append to target string
7437 instead of nuking it.
7439 2002-12-26 Havoc Pennington <hp@pobox.com>
7441 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7442 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7445 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7446 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7447 now). Main point is because I wanted unpack_uint32 to implement
7449 (_dbus_verbose_bytes): new function
7451 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7453 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7454 mechanism to handle a corrupt message stream
7455 (_dbus_message_loader_new): fix preallocation to only prealloc,
7458 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7459 (_dbus_string_test): enhance tests for copy/move and fix the
7462 * dbus/dbus-transport-unix.c: Hold references in more places to
7463 avoid reentrancy problems
7465 * dbus/dbus-transport.c: ditto
7467 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7468 leak reference count in no-message case
7470 * test/watch.c (do_mainloop): handle adding/removing watches
7471 during iteration over the watches. Also, ref the connection/server
7472 stored on a watch, so we don't try to mangle a destroyed one.
7474 * dbus/dbus-transport-unix.c (do_authentication): perform
7477 * dbus/dbus-auth.c (get_state): add a state
7478 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7479 (_dbus_auth_get_unused_bytes): append the unused bytes
7480 to the passed in string, rather than prepend
7482 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7483 the auth conversation DBusAuth
7485 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7486 (_dbus_transport_new_for_domain_socket): when creating a
7487 transport, pass in whether it's a client-side or server-side
7488 transport so we know which DBusAuth to create
7490 2002-12-03 Havoc Pennington <hp@pobox.com>
7492 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7493 _after_ finalizing the derived members
7494 (unix_connection_set): unref watch if we fail to add it
7496 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7497 transport first, so that the connection owned by the
7498 transport will be valid as the transport finalizes.
7500 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7501 if necessary, and remove watches from the connection.
7503 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7505 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7507 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7508 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7509 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7510 (_dbus_marshal_test):
7511 * dbus/dbus-marshal.h:
7512 Add string marshal functions and have the demarshal functions
7513 return the new position.
7515 2002-12-25 Havoc Pennington <hp@pobox.com>
7517 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7518 it is a simple protocol that just maps directly to SASL.
7520 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7521 initial implementation, not actually used yet.
7523 * dbus/dbus-string.c (_dbus_string_find): new function
7524 (_dbus_string_equal): new function
7525 (_dbus_string_base64_encode): new function
7526 (_dbus_string_base64_decode): new function
7528 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7531 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7532 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7533 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7534 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7535 * dbus/dbus-marshal.h:
7536 * dbus/dbus-protocol.h:
7537 * dbus/dbus-test.c: (main):
7539 Add un-optimized marshalling/demarshalling routines.
7541 2002-12-25 Harri Porten <porten@kde.org>
7543 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7545 2002-12-24 Zack Rusin <zack@kde.org>
7547 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7548 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7551 2002-12-24 Havoc Pennington <hp@pobox.com>
7553 * glib/dbus-gthread.c: fix include
7555 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7556 I think glib API needs to change, though, as you don't
7557 want to use DBusMessageFunction, you want to use the
7558 DBusMessageHandler object. Probably
7559 dbus_connection_open_with_g_main_loop()
7560 and dbus_connection_setup_g_main_loop() or something like that
7561 (but think of better names...) that just create a connection
7562 that has watch/timeout functions etc. already set up.
7564 * dbus/dbus-connection.c
7565 (dbus_connection_send_message_with_reply): new function just to
7566 show how the message handler helps us deal with replies.
7568 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7570 * dbus/dbus-string.c (_dbus_string_test): free a string that
7573 * dbus/dbus-hash.c: use memory pools for the hash entries
7574 (rebuild_table): be more paranoid about overflow, and
7575 shrink table when we can
7576 (_dbus_hash_test): reduce number of sprintfs and write
7577 valid C89. Add tests for case where we grow and then
7578 shrink the hash table.
7580 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7582 * dbus/dbus-connection.c (dbus_connection_register_handler)
7583 (dbus_connection_unregister_handler): new functions
7585 * dbus/dbus-message.c (dbus_message_get_name): new
7587 * dbus/dbus-list.c: fix docs typo
7589 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7590 an object representing a handler for messages.
7592 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7595 * glib/dbus-gthread.c: (dbus_gthread_init):
7596 Don't use the gdbus prefix for public functions.
7598 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7602 Add GLib checks and fixup .pc files
7606 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7607 (gdbus_connection_check), (gdbus_connection_dispatch),
7608 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7609 (dbus_connection_gsource_new):
7610 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7611 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7612 * glib/test-dbus-glib.c: (message_handler), (main):
7615 2002-12-15 Harri Porten <porten@kde.org>
7617 * autogen.sh: check for libtoolize before attempting to use it
7619 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7622 * .cvsignore: ignore more stamp files
7624 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7626 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7627 without make install.
7629 2002-12-15 Havoc Pennington <hp@pobox.com>
7631 * dbus/dbus-threads.c: add thread stubs that a higher library
7632 layer can fill in. e.g. the GLib wrapper might fill them in with
7633 GThread stuff. We still need to use this thread API to
7634 thread-safe-ize the library.
7636 2002-12-12 Havoc Pennington <hp@pobox.com>
7638 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7639 below new interfaces and include fewer system headers.
7641 * dbus/dbus-sysdeps.c (_dbus_read): new function
7642 (_dbus_write): new function
7643 (_dbus_write_two): new function
7644 (_dbus_connect_unix_socket): new function
7645 (_dbus_listen_unix_socket): new function
7647 * dbus/dbus-message-internal.h: change interfaces to use
7650 2002-12-11 Havoc Pennington <hp@pobox.com>
7652 * dbus/dbus-types.h: add dbus_unichar
7654 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7656 * dbus/dbus-connection.c (dbus_connection_send_message): return
7659 * dbus/dbus-transport.c: include dbus-watch.h
7661 * dbus/dbus-connection.c: include dbus-message-internal.h
7663 * HACKING: add file with coding guidelines stuff.
7665 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7666 handling here, for security purposes (as in vsftpd). Not actually
7667 using this class yet.
7669 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7670 system/libc usage here, as in vsftpd, for ease of auditing (and
7671 should also simplify portability). Haven't actually moved all the
7672 system/libc usage into here yet.
7674 2002-11-25 Havoc Pennington <hp@pobox.com>
7676 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7677 always print the first verbose message.
7679 2002-11-24 Havoc Pennington <hp@pobox.com>
7681 * test/echo-client.c, test/echo-server.c: cheesy test
7684 * configure.in (AC_CHECK_FUNCS): check for writev
7686 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7689 * dbus/dbus-list.c (_dbus_list_foreach): new function
7691 * dbus/dbus-internals.c (_dbus_verbose): new function
7693 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7694 representing a server that listens for connections.
7696 * dbus/.cvsignore: create
7698 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7699 public API for reporting errors
7701 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7702 public object representing a connection that
7703 sends/receives messages. (Same object used for
7704 both client and server.)
7706 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7707 Basic abstraction for different kinds of stream
7708 that we might read/write messages from.
7710 2002-11-23 Havoc Pennington <hp@pobox.com>
7712 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7715 * dbus/dbus-test.c (main): add list test, and include
7716 dbus-test.h as intended
7718 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7719 (_dbus_hash_table_remove_int): return value indicates
7720 whether the entry existed to remove
7722 * dbus/dbus-list.c: add linked list utility class,
7725 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7728 2002-11-23 Havoc Pennington <hp@pobox.com>
7730 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7731 DBUS_END_DECLS to nothing, that should fix this once and for all
7733 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7735 * dbus/dbus-message.c, dbus/dbus-hash.c:
7736 add some missing @brief
7738 2002-11-23 Havoc Pennington <hp@pobox.com>
7740 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7741 to avoid confusing Doxygen
7743 * dbus/dbus-hash.c: @} not }@
7745 * dbus/dbus-message.c (struct DBusMessage): split out
7748 2002-11-23 Havoc Pennington <hp@pobox.com>
7750 * configure.in: pile on more warning flags if using gcc
7752 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7753 to document static functions
7755 * configure.in: add summary to end of configure so it
7756 looks nice and attractive
7758 * dbus/dbus-hash.c: finish implementation and write unit
7761 * configure.in: add --enable-tests to enable unit tests
7763 * dbus/dbus-test.c: test program to run unit tests
7764 for all files in dbus/*, initially runs a test for
7767 * dbus/dbus-internals.h: file to hold some internal utility stuff
7769 2002-11-22 Havoc Pennington <hp@redhat.com>
7771 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7772 "ported" away from Tcl
7774 * dbus/dbus-types.h: header for types such as dbus_bool_t
7776 2002-11-22 Havoc Pennington <hp@redhat.com>
7778 * dbus/dbus.h: fixups for doc warnings
7780 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7782 (QUIET): make it quiet so we can see warnings
7784 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7786 2002-11-22 Havoc Pennington <hp@redhat.com>
7788 * Makefile.am: include "Doxyfile" target in all-local
7790 * configure.in: generate the Doxyfile
7792 * Doxyfile.in: move Doxyfile here, so we can use
7793 configure to generate a Doxyfile with the right
7796 2002-11-22 Havoc Pennington <hp@redhat.com>
7798 * dbus/dbus-message.c: move inline docs into .c file
7800 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7801 so all docs are under doc/
7802 (MAN_EXTENSION): generate man pages. Use extension
7803 ".3dbus" which matches ".3qt" on my system,
7804 I guess this is OK, I don't know really.
7805 (FILE_PATTERNS): look for .c files not .h, makes sense
7808 2002-11-22 Havoc Pennington <hp@pobox.com>
7810 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7811 because any app can be a server, and any app can be a client,
7812 the bus is a special kind of server.
7814 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7816 * Doxyfile : adding. Still needs Makefile rules to be generated
7817 automatically (just run "doxygen" in the toplevel dir for now to
7820 * dbus/dbus-message.h : Adding sample docs (javadoc since
7821 resembles gtk-doc a little more)
7823 * dbus/dbus.h : Adding sample docs
7825 2002-11-21 Havoc Pennington <hp@redhat.com>
7827 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7828 so we can allow ourselves to include files directly,
7829 instead of having to use dbus.h
7831 * dbus/dbus.h: fill in
7833 * dbus/dbus-message.h: sketch out a sample header file.
7834 Include griping if you include it directly instead of
7837 * dbus/dbus-macros.h: new file with macros for extern "C",
7838 TRUE/FALSE, NULL, etc.
7840 * doc/file-boilerplate.c: put include guards in here
7842 2002-11-21 Havoc Pennington <hp@redhat.com>
7844 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7846 * COPYING: include the GPL as well, and license code
7847 under both AFL and GPL.
7849 2002-11-21 Havoc Pennington <hp@redhat.com>
7851 * acconfig.h: get rid of this
7853 * autogen.sh (run_configure): add --no-configure option
7855 * configure.in: remove AC_ARG_PROGRAM to make
7856 autoconf complain less. add AC_PREREQ.
7857 add AC_DEFINE third arg.
7859 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7862 Fix references so we can distcheck.
7864 2002-11-21 Havoc Pennington <hp@redhat.com>
7866 * Initial module creation