1 2004-11-03 Colin Walters <walters@verbum.org>
3 * bus/test-main.c (test_pre_hook): Fix test logic,
4 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
6 2004-11-02 Colin Walters <walters@redhat.com>
8 * bus/selinux.c (bus_selinux_init): Split into two functions,
9 bus_selinux_pre_init and bus_selinux_post_init.
10 (bus_selinux_pre_init): Just determine whether SELinux is
12 (bus_selinux_post_init): Do everything else.
14 * bus/main.c (main): Call bus_selinux_pre_init before parsing
15 config file, and bus_selinux_post_init after. This ensures that
16 we don't lose the policyreload notification thread that
17 bus_selinux_init created before forking previously.
19 * bus/test-main.c (test_pre_hook): Update for split.
21 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
23 Patch from Johan Fischer <linux@fischaz.com>
25 * mono/doc/Makefile.am (install-data-local): Added directory
28 2004-10-29 Colin Walters <walters@redhat.com>
30 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
31 parameter for fd to write pid to.
33 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
35 * bus/bus.c (bus_context_new): Pass print_pid_fd
36 to _dbus_become_daemon (bug #1720)
38 2004-10-29 Colin Walters <walters@redhat.com>
40 Patch from Ed Catmur <ed@catmur.co.uk>
42 * mono/doc/Makefile.am (install-data-local): Handle
45 2004-10-29 Colin Walters <walters@redhat.com>
47 * bus/.cvsignore, qt/.cvsignore: Update.
49 2004-10-29 Colin Walters <walters@redhat.com>
51 Patch from Kristof Vansant <de_lupus@pandora.be>
53 * configure.in: Detect Slackware.
54 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
55 * bus/rc.messagebus.in: New file.
57 2004-10-29 Colin Walters <walters@redhat.com>
59 * tools/dbus-monitor.c (filter_func): Return
60 DBUS_HANDLER_RESULT_HANDLED in filter function
62 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
64 2004-10-29 Colin Walters <walters@redhat.com>
66 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
68 * bus/services.c (bus_registry_acquire_service):
69 Correctly retrieve service name from DBusString
72 2004-10-29 Colin Walters <walters@redhat.com>
74 * dbus/dbus-glib.h: Update documentation to not
75 refer to internal APIs.
77 2004-10-27 Joe Shaw <joeshaw@novell.com>
79 * mono/Arguments.cs (GetDBusTypeConstructor):
80 type.UnderlyingSystemType will return "System.Byte" if you do it
81 on "byte[]", which is not what we want. So check the type.IsArray
82 property and use System.Array instead.
84 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
86 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
87 the DBusUserInfo structure since this is passed into the function.
88 This would cause a double free when the function that allocated
89 the structure would try to free it when an error occured.
91 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
92 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
93 for service activation to avoid 32bit/64bit parallel install issues
95 2004-10-21 Colin Walters <walters@verbum.org>
97 * AUTHORS: Fix my email address, the @gnu.org one
98 has been bouncing for some time. Also add J5.
100 2004-10-21 Colin Walters <walters@verbum.org>
102 * dbus/dbus-transport-unix.c (do_authentication): Return
103 authentication status to callers.
104 (unix_handle_watch): If we completed authentication this round,
105 don't do another read. Instead wait until the next iteration,
106 after we've read any pending data in the auth buffer.
107 (unix_do_iteration): Ditto.
108 (unix_handle_watch): Updated for new do_authentication prototype.
110 2004-10-18 Colin Walters <walters@verbum.org>
112 * bus/selinux.c (bus_selinux_enabled): Handle
113 --disable-selinux case.
115 2004-10-18 Colin Walters <walters@verbum.org>
117 * bus/selinux.h: Add bus_selinux_enabled.
119 * bus/selinux.c (bus_selinux_enabled): Implement it.
121 * bus/config-parser.c (struct include): Add
122 if_selinux_enabled member.
123 (start_busconfig_child): Parse if_selinux_enabled
124 attribute for include.
125 (bus_config_parser_content): Handle it.
127 * bus/session.conf.in, bus/system.conf.in: Add
128 inclusion of context mapping to default config files;
129 conditional on SELinux being enabled.
131 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
133 * test/data/invalid-config-files/badselinux-1.conf,
134 test/data/invalid-config-files/badselinux-2.conf:
135 Test files for bad syntax.
137 2004-10-17 Colin Walters <walters@verbum.org>
139 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
140 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
141 format specifier mismatches.
143 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
145 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
148 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
149 pointer (bug #1540, Leonardo Boiko).
151 2004-09-28 Jon Trowbridge <trow@ximian.com>
153 * mono/BusDriver.cs: Changed BusDriver struct to remove
154 the ServiceCreated and ServiceDeleted events and replace them
155 with the new ServiceOwnerChanged event.
157 * mono/example/BusListener.cs: Added a new example program,
158 which listens for and reports any ServiceOwnerChanged events
161 * mono/example/Makefile.am (DESTDIR): Build changes for the
162 new BusListener.cs example.
164 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
166 * bus/signals.c (bus_match_rule_parse): validate the components of
167 match rules (bug #1439).
169 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
171 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
173 * doc/dbus-specification.xml: document ServiceOwnerChanged
176 * bus/driver.c, bus/driver.h, bus/services.c: Use
177 ServiceOwnerChanged signal instead of ServiceCreated and
180 * bus/dispatch.c: update testcase for the new signal.
182 2004-09-20 Jon Trowbridge <trow@ximian.com>
184 Patch from Nat Friedman <nat@novell.com>
186 * mono/Makefile.am: A number of small build fixes to allow "make
187 distcheck" to succeed.
189 * mono/example/Makefile.am: "make distcheck" fixes.
191 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
194 * test/Makefile.am: "make distcheck" fixes.
196 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
198 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
200 * doc/busconfig.dtd: update the DTD for the at_console attribute.
202 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
203 messages after the first one (bug #1389).
205 * bus/dispatch.c (check_double_hello_message): add a test case for
206 the double hello message bug.
207 (check_existent_service_activation): fix check of spawning error.
209 2004-09-16 David Zeuthen <david@fubar.dk>
211 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
213 2004-09-12 David Zeuthen <david@fubar.dk>
215 Patch from Kay Sievers <kay.sievers@vrfy.org>
217 * bus/bus.c (bus_context_new):
221 Add commandline option --nofork to override configuration file
224 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
226 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
227 compilers don't like it (bug #974).
229 2004-09-04 Harald Fernengel <harry@kdevelop.org>
231 * qt/connection.*: Applied patch by Jérôme Lodewyck
232 <lodewyck@clipper.ens.fr> to integrate an existing
233 connection into the Qt eventloop
235 2004-08-30 Jon Trowbridge <trow@ximian.com>
237 * mono/BusDriver.cs: Added. This is a class for interacting with
238 the org.freedesktop.DBus service.
240 * mono/Message.cs: Added a mechanism to expose the message that is
241 currently being dispatched via the static Message.Current
242 property. Added Message.Sender and Message.Destination
245 * mono/Handler.cs: Expose the dispatched message via
246 Message.Current when handling method calls.
248 * mono/Service.cs: Expose the dispatched message via
249 Message.Current when handling signal emissions.
251 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
252 Connection.BaseService property.
254 2004-08-28 Havoc Pennington <hp@redhat.com>
256 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
258 More fixes from Steve Grubb
260 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
261 (_dbus_listen_tcp_socket): fix fd leak
263 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
264 EINTR to a bit lower in the code
266 2004-08-26 Jon Trowbridge <trow@ximian.com>
268 * bus/driver.c (bus_driver_handle_service_exists): Respond with
269 TRUE if we are inquiring about the existence of the built-in
270 org.freedesktop.DBus service.
272 2004-08-25 John Palmieri <johnp@redhat.com>
273 * bus/config-parser.c:
274 (struct PolicyType): Add POLICY_CONSOLE
275 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
276 (start_busconfig_child): Sets up console element when
277 <policy at_console=""> is encountered in a policy file
278 (append_rule_from_element): Convert console elements to console
282 (bus_policy_create_client_policy): Add console rules to the client
283 policy based on if the client is at the console
284 (bus_policy_append_console_rule): New function for adding a
285 console rule to a policy
286 (bus_policy_merge): Handle console rule merging
288 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
289 where we check for console user files
291 * dbus/dbus-sysdeps.c:
292 (_dbus_file_exists): New function which checks if the given
294 (_dbus_user_at_console): New function which does the system
295 specific process of checking if the user is at the console
297 * dbus/dbus-userdb.c:
298 (_dbus_is_console_user): New function converts a UID to user name
299 and then calls the system specific _dbus_user_at_console to
300 see if the user is at the console and therefor a console user
302 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
304 * bus/config-parser.c (set_limit):
305 * bus/dbus-daemon-1.1.in:
306 * test/data/valid-config-files/many-rules.conf: set the
307 max_match_rules_per_connection limt from the config file.
309 * doc/busconfig.dtd: update the DTD.
311 * bus/driver.c: remove some unused variables.
313 2004-08-24 Mikael Hallendal <micke@imendio.com>
315 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
316 it's been replaced by dbus_g_bus_get
318 2004-08-23 Colin Walters <walters@redhat.com>
320 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
322 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
324 * bus/selinux.c: Create a thread for policy reload notification.
325 (bus_selinux_get_policy_root): Implement.
327 * bus/config-parser.c (start_busconfig_child)
328 (bus_config_parser_content): Support SELinux-root relative
331 * configure.in <HAVE_SELINUX>: Add -lpthread.
333 * bus/test-main.c (test_pre_hook, test_post_hook): New.
334 (test_post_hook): Move memory checking into here.
335 (test_pre_hook, test_post_hook): Move SELinux checks in
336 here, but conditional on a DBUS_TEST_SELINUX environment
337 variable. Unfortunately we can't run the SELinux checks
338 as a normal user, since they won't have any permissions
339 for /selinux. So this will have to be tested manually
340 for now, until we have virtualization for most of
343 2004-08-23 Havoc Pennington <hp@redhat.com>
345 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
346 drop supplementary groups, suggested by Steve Grubb
348 2004-08-20 Colin Walters <walters@redhat.com>
350 * bus/config-parser.c (start_busconfig_child): Remove some unused
353 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
356 2004-08-17 Joe Shaw <joeshaw@novell.com>
358 * configure.in: If --enable-mono is passed in, if we can't find
361 * mono/Makefile.am: Use /gacutil to install assemblies into the
364 2004-08-12 Havoc Pennington <hp@redhat.com>
366 * NEWS: update for 0.22
368 * configure.in: release 0.22
370 2004-08-11 Colin Walters <walters@redhat.com>
372 * tools/dbus-send.c (main, usage): Add --reply-timeout
375 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
377 * bus/bus.c (process_config_first_time_only): get rid of an unused
378 DBusError that was causing a memoy leak (bug #989).
380 * dbus/dbus-keyring.c, dbus/dbus-message.c:
381 fix compilation on Solaris/Forte C (bug #974)
383 * bus/main.c (main): plug two minuscule memleaks.
385 2004-08-10 Havoc Pennington <hp@redhat.com>
387 * doc/dbus-tutorial.xml: add some more info on GLib bindings
389 2004-08-09 Havoc Pennington <hp@redhat.com>
391 * COPYING: switch to Academic Free License version 2.1 instead of
392 2.0, to resolve complaints about patent termination clause.
394 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
396 * README: added documentation for the --enable-python
399 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
401 * bus/config-parser.c (bus_config_parser_new): fix an invalid
402 _unref in the SELinux support.
404 * doc/busconfig.dtd: update DTD for SELinux support.
406 * bus/config-loader-libxml.c: fix error handler and parser
407 initialisation/cleanup. OOM test now works with libxml2 HEAD.
409 * configure.in: remove the warning about libxml2.
411 * dbus/dbus-bus.c: silence doxygen warning.
413 2004-07-31 Colin Walters <walters@redhat.com>
415 * configure.in: Move #error in SELinux check to its own line.
417 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
419 * dbus/dbus-internals.h (_DBUS_SET_OOM):
420 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
423 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
424 broken by the change in the _SET_OOM macros.
426 2004-07-31 Colin Walters <walters@redhat.com>
428 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
431 2004-07-31 Colin Walters <walters@redhat.com>
433 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
434 to correctly detect DBUS__ACQUIRE_SVC. Also add an
437 2004-07-24 Havoc Pennington <hp@redhat.com>
439 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
441 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
444 * configure.in: add --enable-selinux
446 * bus/policy.c (bus_policy_merge): add FIXME to a comment
448 * bus/main.c (main): initialize and shut down selinux
450 * bus/connection.c: store SELinux ID on each connection, to avoid
451 repeated getting of the string context and converting it into
454 * bus/bus.c (bus_context_get_policy): new accessor, though it
456 (bus_context_check_security_policy): check whether the security
457 context of sender connection can send to the security context of
460 * bus/config-parser.c: add parsing for <selinux> and <associate>
462 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
463 implement dbus_connection_get_unix_fd()
465 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
466 function, used by the selinux stuff
468 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
470 * bus/config-loader-libxml.c: complete the implementation of
471 libxml backend for config file loader. Doesn't work with full OOM
474 * configure.in: change error when selecting libxml into a warning.
476 * test/data/invalid-config-files: add two non-well-formed XML
479 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
481 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
482 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
483 be necessary to read all the buffer. (bug #894)
485 * bus/activation.c (bus_activation_activate_service): fix a
486 potential assertion failure (bug #896). Small optimization in the
487 case of auto-activation messages.
489 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
490 add test case for byte-through-vararg bug (#901). patch by Kimmo
493 2004-07-28 Anders Carlsson <andersca@gnome.org>
496 * python/dbus_bindings.pyx.in:
497 Add dbus.init_gthreads (), allow emit_signal to pass
498 arguments to the signal.
500 2004-07-24 Havoc Pennington <hp@redhat.com>
502 * AUTHORS: add some people, not really comprehensively, let me
505 2004-07-24 Havoc Pennington <hp@redhat.com>
507 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
510 * test/Makefile.am (DIST_SUBDIRS): here also
512 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
514 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
515 breaking build on Solaris, reported by Farhad Saberi on the ML.
517 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
518 va_arg invocation to account for integer promotion in the case of
519 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
521 * bus/services.c (bus_service_remove_owner): fix bug #902, use
522 _dbus_list_get_first_link, not _dbus_list_get_first.
524 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
526 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
527 handler functions so that the asserts in _dbus_object_subtree_unref
530 * dbus/dbus-transport-unix.c (do_reading):
531 _dbus_transport_queue_messages return value is of type
532 dbus_bool_t, not DBusDispatchStatus.
534 2004-07-19 David Zeuthen <david@fubar.dk>
536 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
539 (check_get_connection_unix_user): Debug says GetProperty; but the
540 method is called GetConnectionUnixUser
541 (check_get_connection_unix_process_id): New function
542 (bus_dispatch_test): Actually call check_get_connection_unix_user();
543 also call check_get_connection_unix_process_id()
546 (bus_driver_handle_get_connection_unix_process_id): New function,
547 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
551 (handle_server_data_external_mech): Set pid from the credentials
552 obtained from the socket
554 * dbus/dbus-connection.c:
555 (dbus_connection_get_unix_process_id): New function
557 * dbus/dbus-connection.h:
558 Add prototype for dbus_connection_get_unix_process_id
560 * dbus/dbus-transport.c:
561 (_dbus_transport_get_unix_process_id): New function
563 * dbus/dbus-transport.h:
564 Add prototype for _dbus_transport_get_unix_process_id
566 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
568 * dbus/dbus-message.c: Message counter fix, patch by Christian
569 Hammond <chipx86@gnupdate.org>
571 2004-07-18 Seth Nickell <seth@gnome.org>
574 * python/dbus_bindings.pyx.in:
575 * python/tests/test-client.py:
577 Add dbus.ByteArray and dbus_bindings.ByteArray
578 types so that byte streams can be passed back.
580 Give jdahlin the heaps of credit that are so
583 2004-07-12 Seth Nickell <seth@gnome.org>
587 Add message argument to the default object_method_handler
590 * python/dbus_bindings.pyx.in:
592 Automatically return NIL when passed an empty list
593 (we can't pass back a list since lists are typed
594 and we don't have any idea what type the the client
595 intended the list to be... :-( )
597 2004-07-10 Seth Nickell <seth@gnome.org>
599 * python/examples/Makefile.am:
601 Fix distcheck breakage caused by new examples.
603 2004-07-10 Seth Nickell <seth@gnome.org>
607 Add "message" argument to service-side dbus.Object
608 methods. This will break existing services written
609 using the python bindings, but will allow extraction
610 of all the message information (e.g. who its from).
612 Add improved "object oriented" signal handling/emission.
614 * python/examples/example-service.py:
618 * python/examples/example-signal-emitter.py:
619 * python/examples/example-signal-recipient.py:
621 Two new examples that show how to emit and receive
622 signals using the new APIs.
624 * python/examples/example-signals.py:
625 * python/examples/gconf-proxy-service.py:
626 * python/examples/gconf-proxy-service2.py:
628 Add "message" argument to service methods.
630 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
632 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
633 * dbus/bus.c (dbus_bus_get_unix_user)
634 * doc/dbus-specification.xml: implement GetConnectionUnixUser
635 method of org.freedesktop.DBus interface.
637 * bus/dispatch.c: test case
639 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
641 * python/Makefile.am: switched include directory from glib/ to dbus/
642 since dbus-glib.h moved
644 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
646 * configure.in: prevent building the gcj stuff and libxml loader
647 since they are broken.
649 2004-06-20 Havoc Pennington <hp@redhat.com>
651 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
652 codes from the dbus error names
654 * glib/dbus-glib.h: move to subdir dbus/ since it's included
655 as dbus/dbus-glib.h and that breakage is now visible due to
656 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
658 * glib/dbus-glib.h: s/gproxy/g_proxy/
660 * dbus/dbus-shared.h: new header to hold stuff shared with
663 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
666 * glib/dbus-glib.h (dbus_set_g_error): move to
669 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
670 of stuff to enable this
672 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
674 * a bunch of other changes with the same basic "separate glib
675 bindings from dbus.h" theme
677 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
679 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
681 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
683 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
685 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
686 the reply value of the ServiceExists message.
688 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
690 * python/dbus_bindings.pyx.in: No longer need to parse path
691 elements and pass them as arrays of strings. The C API now
692 accepts plain path strings.
693 (_build_parsed_path): removed
695 2004-06-07 Havoc Pennington <hp@redhat.com>
697 * doc/TODO: remove auto-activation item since it's done; sort
698 items by importance/milestone
700 2004-06-07 Havoc Pennington <hp@redhat.com>
702 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
703 random signature when using REQUIRED_FIELDS (this hack won't work
706 * dbus/dbus-message.c: change the signature to be a header field,
707 instead of message->signature special-case string. Incremental
708 step forward. Then we can fix up code to send the signature in the
709 message, then fix up code to validate said signature, then fix up
710 code to not put the typecodes inline, etc.
711 (load_one_message): don't make up the signature after the fact
712 (decode_header_data): require signature field for the known
715 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
717 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
719 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
721 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
723 * mono/Handler.cs: Updated to follow new path argument for
724 (un-)registering objects.
726 * mono/example/Makefile.am:
728 * configure.in: Bumped required version for mono and use new -pkg
731 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
733 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
734 registration functions take the path argument as char* instead of
737 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
738 split off the path decompostion part of
739 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
742 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
744 2004-06-02 Kristian Høgsberg <krh@redhat.com>
746 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
747 machine approach. A state is implemented as a function that
748 handles incoming events as specified for that state.
750 * doc/dbus-specification.xml: Update auth protocol state machine
751 specification to match implementation. Remove some leftover
754 2004-06-02 Kristian Høgsberg <krh@redhat.com>
756 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
757 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
760 * Doxyfile.in: remove deprecated options.
762 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
763 glib/test-thread.h, glib/test-thread-client.c,
764 glib/test-thread-server.c, glib/test-profile.c,
765 glib/test-dbus-glib.c: remove these unused files.
767 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
769 * dbus/dbus-object-tree.c
770 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
771 non-fallback handlers (bug #684).
772 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
773 (find_subtree_recurse): report wether the returned subtree is an
774 exact match or a "fallback" match higher up in the tree.
775 (object_tree_test_iteration): update test case.
777 2004-06-01 Seth Nickell <seth@gnome.org>
779 * python/dbus_bindings.pyx.in:
780 * python/tests/test-client.py:
782 Round off basic type support. Add dicts (yay!), and
783 remaining array types.
785 Make MessageIter more general so it works for dicts too.
787 Mark all loop variables as C integers.
789 2004-05-31 Havoc Pennington <hp@redhat.com>
791 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
794 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
796 * glib/dbus-glib-tool.c (main): set up to have a --self-test
797 option that runs the tests, and start filling in some code
798 including for starters just dumping the interfaces to stdout
800 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
802 * test/data/valid-introspection-files/lots-of-types.xml: test of
803 an example introspection file
805 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
808 2004-05-31 Seth Nickell <seth@gnome.org>
810 * python/dbus_bindings.pyx.in:
811 * python/tests/test-client.py:
816 Fix string array memory trashing bug... oops...
818 2004-05-30 Seth Nickell <seth@gnome.org>
822 Add a nicer-but-less-flexible alternate API for handling
823 calls to virtual objects in dbus.ObjectTree.
825 Screw up the argument order to the dbus.Object constructor
826 for consistency with dbus.ObjectTree (and to make dbus_methods
827 optional for future extension)
829 * python/examples/Makefile.am:
830 * python/examples/gconf-proxy-service.py:
831 * python/examples/gconf-proxy-service2.py:
833 Alternate implementation of gconf-proxy-service using the
834 nicer dbus.ObjectTree API.
836 * python/examples/example-service.py:
837 * python/tests/test-server.py
839 Reverse the argument order to deal with dbus.Object constructor
842 2004-05-30 Seth Nickell <seth@gnome.org>
844 * python/examples/example-client.py:
845 * python/examples/example-service.py:
847 Take it back. Lists seem to work but they're broken
848 in the test suite. Make the base examples use
851 2004-05-30 Seth Nickell <seth@gnome.org>
853 * python/dbus_bindings.pyx.in:
854 * python/tests/test-client.py:
856 Add some more tests and fix errors that crop up.
857 Unfortunately, currently it seems like marshalling
858 and unmarshalling of lists is completely broken :-(
860 2004-05-30 Seth Nickell <seth@gnome.org>
862 * python/dbus_bindings.pyx.in:
864 Add support for ObjectPath type.
868 Refactor message handling code to a common function.
870 * python/tests/test-client.py:
871 * python/tests/test-server.py:
873 Add tests that check to make sure values of all types
874 can be echoed from a service w/o mangling.
876 2004-05-29 Seth Nickell <seth@gnome.org>
880 Add ObjectTree class which allows implementation
881 of trees of "virtual" objects. Basically the python
882 wrapper for "register_fallback".
884 * python/examples/Makefile.am
885 * python/examples/gconf-proxy-client.py:
886 * python/examples/gconf-proxy-service.py:
888 Implement a simple GConf proxy service that supports
889 get/set on string and int GConf keys using the ObjectTree.
891 2004-05-29 Seth Nickell <seth@gnome.org>
894 * python/examples/example-client.py:
895 * python/examples/example-service.py:
896 * python/examples/list-system-services.py:
898 Add SessionBus, SystemBus and ActivationBus classes
899 so you don't need to know the special little BUS_TYPE
902 2004-05-29 Havoc Pennington <hp@redhat.com>
904 * bus/config-parser.c (process_test_valid_subdir): temporarily
905 stop testing config parser OOM handling, since expat has issues
906 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
908 * bus/dbus-daemon-1.1.in: change requested_reply to
909 send_requested_reply/receive_requested_reply so we can send the
910 replies, not just receive them.
912 * bus/config-parser.c: parse the new
913 send_requested_reply/receive_requested_reply
915 * bus/policy.c (bus_client_policy_check_can_send): add
916 requested_reply argument and use it
918 * bus/bus.c (bus_context_check_security_policy): pass through
919 requested_reply status to message send check
921 * bus/system.conf.in: adapt to requested_reply change
923 2004-05-28 Havoc Pennington <hp@redhat.com>
925 * test/glib/test-service-glib.c (main): remove unused variable
927 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
929 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
930 from the enum, no longer in use.
932 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
935 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
936 whether error_name passed in is a valid error name.
938 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
940 * dbus/dbus-message.c (dbus_message_get_args): Added support for
941 OBJECT_PATH and OBJECT_PATH_ARRAY
943 2004-05-28 Seth Nickell <seth@gnome.org>
945 * python/examples/Makefile.am:
947 Forget to add Makefile.am. Do not pass go.
949 2004-05-28 Michael Meeks <michael@ximian.com>
951 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
954 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
956 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
957 (_dbus_message_iter_get_basic_type_array): impl.
958 drastically simplify ~all relevant _get methods to use these.
959 (_dbus_message_iter_append_basic_array),
960 (dbus_message_iter_append_basic): impl
961 drastically simplify ~all relevant _append methods to use these.
963 * dbus/dbus-message-builder.c (parse_basic_type)
964 (parse_basic_array, lookup_basic_type): impl.
965 (_dbus_message_data_load): prune scads of duplicate /
968 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
969 (_dbus_demarshal_basic_type): implement,
970 (demarshal_and_validate_len/arg): beef up debug.
971 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
973 2004-05-27 Seth Nickell <seth@gnome.org>
976 * python/Makefile.am:
978 Include the example python apps in the tarball.
980 * python/examples/list-system-services.py
982 Add a python new example that fetches the list of services
985 2004-05-27 Seth Nickell <seth@gnome.org>
988 * python/dbus_bindings.pyx.in:
990 Fix failure to notify that a signal was not handled,
991 resulted in hung functions.
993 2004-05-25 Colin Walters <walters@redhat.com>
995 * tools/dbus-monitor.c (main): Monitor all types of messages.
997 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
999 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1000 which unregisters the object path and disposes the handler.
1002 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1004 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1006 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1007 operands to && so we call dbus_message_iter_next () for the last
1010 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1012 * dbus/dbus-object-tree.c
1013 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1014 children even if the requested path isn't registered.
1015 (object_tree_test_iteration): test object_tree_list_registered.
1017 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1020 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1022 * doc/TODO: Remove resolved items.
1024 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1027 * bus/connection.c (bus_connections_expect_reply): Enforce the
1028 per-connection limit on pending replies.
1030 Patch from Jon Trowbridge <trow@ximian.com>:
1032 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1033 up a watch that triggers a config reload when one end of the pipe
1035 (signal_handler): Instead of doing the config reload in our SIGHUP
1036 handler, just write to the reload pipe and let the associated
1037 watch handle the reload when control returns to the main loop.
1039 * bus/driver.c (bus_driver_handle_reload_config): Added.
1040 Implements a ReloadConfig method for requesting a configuration
1041 file reload via the bus driver.
1043 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1045 * HACKING: Updated release instructions concerning the wiki page.
1047 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1049 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1050 filter against auth->allowed_mechs; we only add allowed mechs in
1051 record_mechanisms().
1053 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1054 ALLOWED_MECHS to auth-script format so we can set the list of
1057 * data/auth/client-out-of-mechanisms.auth-script: New test to
1058 check client disconnects when it is out of mechanisms to try.
1060 * dbus/dbus-auth.c (process_command): Remove check for lines
1061 longer that 1 MB; we only buffer up maximum 16 kB.
1063 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1064 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1065 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1066 assume there might be unused bytes.
1068 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1069 client-out-of-mechs, it is handled in process_reject(). Move check
1070 for max failures to send_rejected(), as it's a server-only thing.
1072 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1073 send_auth(), send_data(), send_rejected(), send_error(),
1074 send_ok(), send_begin() and send_cancel().
1076 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1078 Remove base64 encoding, replace with hex encoding. Original patch
1079 from trow@ximian.com, added error handling.
1081 * dbus/dbus-string.c (_dbus_string_base64_encode)
1082 (_dbus_string_base64_decode): Remove.
1083 (_dbus_string_hex_decode): Add end_return argument so we can
1084 distinguish between OOM and invalid hex encoding.
1085 (_dbus_string_test): Remove base64 tests and add test case for
1088 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1089 Replace base64 with hex.
1091 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1092 for invalid hex encoded data in auth protocol.
1094 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1096 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1099 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1101 * mono/dbus-sharp.dll.config.in: Added for GAC
1102 * mono/dbus-sharp.snk: Added for GAC
1103 * mono/Assembly.cs.in: Added for GAC
1104 * mono/Makefile.am: Changes for GAC installation
1105 * configure.in: Added refs for dbus-sharp.dll.config.in and
1106 Assembly.cs.in. More fixes for mono testing
1107 * mono/example/Makefile.am: Changed var to CSC
1108 * Makefile.am: Changed flag name to DBUS_USE_CSC
1110 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1112 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1113 * mono/doc/*: Added documentation framework
1114 * configure.in: Added monodoc check
1115 * README: Added description of mono configure flags
1117 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1119 * doc/dbus-specification.xml: Added a "Required" column to the
1120 header fields table and changed the "zero or more" verbage in
1121 the above paragraph to read "The header must contain the required
1122 named header fields and zero or more of the optional named header
1124 * test/data/invalid-messages/*.message: Added the required PATH
1125 named header field to the tests so that they don't fail on
1126 'Missing path field'
1128 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1130 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1131 the stack by implicitly defining variable and parameter types and
1132 removing the hack of defining C pointers as python objects and later
1135 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1137 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1139 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1141 * mono/DBusType/Dict.cs: Handle empty dicts
1142 * mono/DBusType/Array.cs: Handle empty arrays
1143 * mono/Arguments.cs: Handle empty arguments
1145 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1147 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1150 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1152 * test/data/valid-messages/standard-*.message: Update message
1153 test scripts to new header field names.
1155 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1157 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1158 overflow to times_we_did_each_thing array which would chop off the
1159 first character of the failure_dir string. Increased the size of
1160 the array to 7 to reflect the number of random mutation functions
1163 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1165 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1166 unix_server->watch here, it is unreffed in disconnect.
1167 (_dbus_server_new_for_tcp_socket): convert NULL host to
1168 "localhost" here so we don't append NULL to address.
1170 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1171 various addresses, including tcp with no explicit host.
1173 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1175 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1176 fix incorrect setting of .name_offset in the HeaderField (it was
1177 off by two bytes, positioned right after the name and typecode)
1179 * bus/bus.c (bus_context_new, bus_context_unref): test before
1180 calling dbus_server_free_data_slot and _dbus_user_database_unref
1181 in case of an error.
1183 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1186 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1188 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1189 _dbus_poll() instead of select().
1191 2004-04-15 Jon Trowbridge <trow@ximian.com>
1193 * bus/main.c (signal_handler): Reload the configuration files
1195 (main): Set up our SIGHUP handler.
1197 * bus/bus.c (struct BusContext): Store the config file, user and
1198 fork flag in the BusContext.
1199 (process_config_first_time_only): Added. Contains the code
1200 (previously in bus_context_new) for setting up the BusContext from
1201 the BusConfigParser that should only be run the first time the
1202 config files are read.
1203 (process_config_every_time): Added. Contains the code (previously
1204 in bus_context_new) for setting up the BusContext from the
1205 BusConfigParser that should be run every time the config files are
1207 (load_config): Added. Builds a BusConfigParser from the config
1208 files and passes the resulting structure off to
1209 process_config_first_time_only (assuming this is the first time)
1210 and process_config_every_time.
1211 (bus_context_new): All of the config-related code has been moved
1212 to process_config_first_time_only and process_config_every_time.
1213 Now this function just does the non-config-related initializations
1214 and calls load_config.
1215 (bus_context_reload_config): Added.
1217 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1219 * bus/driver.c (bus_driver_handle_get_service_owner):
1220 implement a GetServiceOwner method.
1221 * doc/dbus-specification.xml: document it.
1222 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1224 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1225 implement, using the bus GetServiceOwner method.
1227 * test/glib/test-dbus-glib.c:
1228 use dbus_gproxy_new_for_service_owner so that we can receive the
1231 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1233 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1234 dbus/dbus-message.c, dbus/dbus-protocol.h
1235 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1237 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1238 dbus/dbus-message.c, dbus/dbus-protocol.h
1239 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1241 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1242 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1243 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1245 * doc/dbus-specification.xml (Header Fields Table):
1246 s/SERVICE/DESTINATION
1247 s/SENDER_SERVICE/SENDER
1250 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1252 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1255 2004-04-13 Michael Meeks <michael@ximian.com>
1257 * glib/dbus-gobject.c (handle_introspect): split out
1258 (introspect_properties): this.
1259 (handle_introspect): implement this.
1261 * test/glib/Makefile.am: use the absolute path so the bus
1262 daemon's chdir ("/") doesn't kill us dead.
1264 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1266 2004-04-12 Jon Trowbridge <trow@ximian.com>
1268 * bus/config-parser.c (struct BusConfigParser): Added
1269 included_files field.
1270 (seen_include): Added. Checks whether or not a file has already
1271 been included by any parent BusConfigParser.
1272 (bus_config_parser_new): Copy the parent's included_files.
1273 (include_file): Track which files have been included, and fail on
1274 circular inclusions.
1275 (process_test_valid_subdir): Changed printf to report if we are
1276 testing valid or invalid conf files.
1277 (all_are_equiv): Changed printf to be a bit clearer about
1278 what we are actually doing.
1279 (bus_config_parser_test): Test invalid configuration files.
1281 2004-04-09 Jon Trowbridge <trow@ximian.com>
1283 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1284 argument. If non-null, the newly-constructed BusConfigParser will
1285 be initialized with the parent's BusLimits instead of the default
1287 (include_file): When including a config file, pass in
1288 the current parser as the parent and then copy the BusLimits
1289 from the included BusConfigParser pack to the current parser.
1290 (process_test_valid_subdir): Renamed from process_test_subdir.
1291 (process_test_equiv_subdir): Added. Walks through a directory,
1292 descending into each subdirectory and loading the config files
1293 it finds there. If any subdirectory contains two config files
1294 that don't produce identical BusConfigParser structs, fail.
1295 For now, the BusConfigParser's BusPolicies are not compared.
1296 (bus_config_parser_test): Call both process_test_valid_subdir and
1297 process_test_equiv_subdir.
1299 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1300 argument and pass it along to the call to bus_config_parser_new.
1301 Also made a few small changes to allow this code to compile.
1303 * bus/config-loader-expat.c (bus_config_load): Take a parent
1304 argument and pass it along to the call to bus_config_parser_new.
1306 * bus/bus.c (bus_context_new): Load the config file
1307 with a NULL parent argument.
1309 2004-03-29 Michael Meeks <michael@ximian.com>
1311 * glib/dbus-gobject.c (introspect_properties): split
1312 out, fix mangled 'while' flow control.
1313 (introspect_signals): implement.
1314 (handle_introspect): update.
1316 2004-03-29 Michael Meeks <michael@ximian.com>
1318 * glib/dbus-gobject.c (set_object_property): split out /
1319 re-work, use the property type, and not the message type(!)
1320 (get_object_property): ditto.
1322 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1323 (dbus_gvalue_marshal): make this code re-usable, needed
1324 for signals too, also on both proxy and server side.
1325 Re-write for more efficiency / readability.
1327 2004-03-29 Michael Meeks <michael@ximian.com>
1329 * dbus/dbus-message.c
1330 (dbus_message_new_error_printf): impl.
1332 * dbus/dbus-connection.c
1333 (dbus_connection_unregister_object_path): fix warning.
1335 * configure.in: fix no-mono-installed situation.
1337 2004-03-27 Havoc Pennington <hp@redhat.com>
1339 Patch from Timo Teräs:
1341 * tools/dbus-send.c (main): if --print-reply, assume type is
1342 method call; support boolean type args
1344 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1345 bunch of memleak and logic bugs
1347 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1349 * mono/Arguments.cs:
1350 * mono/Introspector.cs:
1352 * mono/InterfaceProxy.cs:
1354 * mono/ProxyBuilder.cs:
1356 Added InterfaceProxy class to avoid building proxies for every
1360 * dbus-message.c (dbus_message_append_args_valist)
1361 (dbus_message_iter_get_object_path)
1362 (dbus_message_iter_get_object_path_array)
1363 (dbus_message_iter_append_object_path)
1364 (dbus_message_iter_append_object_path_array):
1365 Added object_path iter functions to handle OBJECT_PATH arguments
1367 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1369 First checkin of mono bindings.
1372 Build stuff for the bindings
1373 * dbus-sharp.pc.in: Added for pkgconfig
1375 2004-03-21 Havoc Pennington <hp@redhat.com>
1377 * test/test-service.c (main): remove debug spew
1379 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1381 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1384 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1385 (dbus_message_iter_init_array_iterator)
1386 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1387 indicate whether the iterator is empty
1389 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1392 2004-03-19 Havoc Pennington <hp@redhat.com>
1394 * NEWS: 0.21 updates
1396 * configure.in: 0.21
1398 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1400 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1401 you don't need pyrex to make dist
1403 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1406 2004-03-18 Richard Hult <richard@imendio.com>
1408 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1409 (dbus_message_set_auto_activation): Add doxygen docs.
1411 2004-03-16 Richard Hult <richard@imendio.com>
1413 * bus/activation.c: (bus_activation_service_created),
1414 (bus_activation_send_pending_auto_activation_messages),
1415 (bus_activation_activate_service):
1417 * bus/dispatch.c: (bus_dispatch),
1418 (check_nonexistent_service_auto_activation),
1419 (check_service_auto_activated),
1420 (check_segfault_service_auto_activation),
1421 (check_existent_service_auto_activation), (bus_dispatch_test):
1422 * bus/driver.c: (bus_driver_handle_activate_service):
1423 * bus/services.c: (bus_registry_acquire_service):
1424 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1425 (dbus_message_get_auto_activation):
1426 * dbus/dbus-message.h:
1427 * dbus/dbus-protocol.h: Implement auto-activation.
1429 * doc/dbus-specification.xml: Add auto-activation to the spec.
1431 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1433 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1434 fix a bug with CUSTOM types.
1436 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1437 a unit test for this bug (used to fail).
1439 2004-03-12 Mikael Hallendal <micke@imendio.com>
1442 (babysitter_watch_callback): notify all pending activations waiting for
1443 the same exec that the activation failed.
1444 (bus_activation_activate_service): shortcut the activation if we
1445 already waiting for the same executable to start up.
1447 2004-03-12 Mikael Hallendal <micke@imendio.com>
1450 - Added service file reloading.
1451 Each service files directory is kept in an hash table in
1452 BusActivation and each BusActivationEntry knows what .service-file it
1453 was read from. So when you try to activate a service the bus will
1454 check if it's been updated, removed or if new .service-files has
1456 - Test code at the bottom for the service file reloading.
1457 * bus/test-main.c: (main):
1459 - added service reloading test.
1460 * dbus/dbus-sysdeps.c:
1461 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1463 2004-03-08 Michael Meeks <michael@ximian.com>
1465 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1466 bail immediately if disconnected, to avoid busy loop.
1468 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1469 cleanup cut/paste/inefficiency.
1471 2004-03-01 David Zeuthen <david@fubar.dk>
1473 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1474 bug where args were used twice. This bug resulted in a segfault
1475 on a Debian/PPC system when starting the messagebus daemon. Include
1476 dbus-sysdeps.h for DBUS_VA_COPY
1478 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1480 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1481 appropriate va_copy implementation. From GLib
1483 2004-02-24 Joe Shaw <joe@ximian.com>
1485 * bus/services.c (bus_registry_acquire_service): We need to pass
1486 in the service name to dbus_set_error() to prevent a crash.
1488 2003-12-26 Anders Carlsson <andersca@gnome.org>
1490 * AUTHORS: Reveal my True identity.
1492 2003-12-17 Mikael Hallendal <micke@imendio.com>
1494 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1495 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1497 2003-12-13 Mikael Hallendal <micke@imendio.com>
1499 * doc/TODO: Added not about better error check of configuration files.
1501 2003-12-02 Richard Hult <richard@imendio.com>
1503 * Update AFL version to 2.0 throughout the source files to reflect
1504 the update that was done a while ago.
1506 2003-12-02 Richard Hult <richard@imendio.com>
1508 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1509 wrote_dict_key to FALSE on the iter that the dict is appended to,
1510 just like when appending other types. Fixes a bug where a dict
1511 couldn't be put inside a dict.
1512 (dbus_message_iter_append_dict_key): Fix typo in warning message.
1513 (message_iter_test, _dbus_message_test): Add test case for dict
1516 2003-12-01 David Zeuthen <david@fubar.dk>
1518 * python/dbus.py: Add the actual message when calling the reciever
1519 of a signal such that parameters can be inspected. Add the method
1520 remove_signal_receiver
1522 2003-11-26 Mikael Hallendal <micke@imendio.com>
1526 * glib/*.[ch]: Made ref functions return the pointer
1528 2003-11-25 Zack Rusin <zack@kde.org>
1530 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1532 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
1535 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
1536 the Integrator and to better fit with the server,
1538 2003-11-24 Zack Rusin <zack@kde.org>
1540 * qt/connection.h, qt/connection.cpp: removing initDbus method since
1541 the integrator handles it now
1543 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1544 since QTimer wasn't really meant to be used the way DBusTimeout is
1546 2003-11-24 Zack Rusin <zack@kde.org>
1548 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
1549 Integrator class which integrates D-BUS with the Qt event loop,
1551 * qt/connection.h, qt/connection.cpp: Move all the code which
1552 was dealing with D-BUS integration to the Integrator class,
1553 and start using Integrator,
1555 2003-11-23 Zack Rusin <zack@kde.org>
1557 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
1560 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1561 switching namespaces to DBusQt, reworking the class,
1563 * Makefile.cvs: switching dependencies so that it matches KDE
1566 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
1569 2003-11-19 Havoc Pennington <hp@redhat.com>
1573 * configure.in: bump version to 0.20
1575 * configure.in (have_qt): add yet another place to look for qt
1576 (someone hand trolltech a .pc file...)
1578 2003-11-01 Havoc Pennington <hp@redhat.com>
1580 * doc/dbus-specification.xml: add state machine docs on the auth
1581 protocol; just a first draft, I'm sure it's wrong.
1583 2003-10-28 David Zeuthen <david@fubar.dk>
1585 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1586 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1588 2003-10-28 Havoc Pennington <hp@redhat.com>
1590 * dbus/dbus-message.c (get_next_field): delete unused function
1592 2003-10-28 Havoc Pennington <hp@redhat.com>
1594 * bus/expirelist.c (do_expiration_with_current_time): detect
1595 failure of the expire_func due to OOM
1597 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1599 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1600 NoReply error that's now created by the bus when the service exits
1602 2003-10-28 Havoc Pennington <hp@redhat.com>
1604 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1605 tests for set_path, set_interface, set_member, etc.
1607 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1609 * dbus/dbus-message.c (set_string_field): always just delete and
1610 re-append the field; accept NULL for deletion
1611 (re_align_fields_recurse): reimplement
1613 2003-10-26 Havoc Pennington <hp@redhat.com>
1615 * dbus/dbus-connection.c: fix docs to properly describe the
1616 disconnected message
1617 (_dbus_connection_notify_disconnected): remove this function;
1618 we can't synchronously add the disconnected message, we have to
1619 do it after we've queued any remaining real messages
1620 (_dbus_connection_get_dispatch_status_unlocked): queue the
1621 disconnect message only if the transport has finished queueing all
1622 its real messages and is disconnected.
1623 (dbus_connection_disconnect): update the dispatch status here
1625 2003-10-22 Havoc Pennington <hp@redhat.com>
1627 * bus/bus.c (bus_context_check_security_policy): fix up assertion
1629 * bus/connection.c (bus_transaction_send_from_driver): set the
1630 destination to the connection's base service
1632 2003-10-20 Havoc Pennington <hp@redhat.com>
1634 hmm, make check is currently not passing.
1636 * doc/dbus-specification.xml: add requirement that custom type
1637 names follow the same rules as interface names.
1639 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1640 duplication and allow 'c' to be 'custom'; dict is now 'm' for
1643 * doc/dbus-specification.xml: update type codes to match
1644 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1645 CUSTOM. Add type OBJECT_PATH to the spec.
1647 2003-10-17 Havoc Pennington <hp@redhat.com>
1649 * bus/driver.c (create_unique_client_name): use "." as separator
1650 in base service names instead of '-'
1652 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1653 byte at the end of the string
1655 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1656 optimization macros since string validation seems to be a slow
1659 * doc/dbus-specification.xml: restrict valid
1660 service/interface/member/error names. Add test suite code for the
1663 * dbus/dbus-string.c: limit service/interface/member/error names
1666 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1667 format arg to verbose spew
1669 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1670 memory, return instead of g_error
1672 * test/test-service.c (path_message_func): support emitting a
1675 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1676 activation bus type if DBUS_BUS_ACTIVATION was set; default to
1677 assuming the activation bus was the session bus so that services
1678 started manually will still register.
1679 (init_connections_unlocked): fix so that in OOM situation we get
1680 the same semantics when retrying the function
1682 * test/test-service.c (main): change to use path registration, to
1683 test those codepaths; register with DBUS_BUS_ACTIVATION rather
1684 than DBUS_BUS_SESSION
1686 2003-10-16 Havoc Pennington <hp@redhat.com>
1688 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1690 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1691 coverage of the tests
1692 (coverage-report.txt): don't move the .da and .bbg files around
1694 2003-10-16 Havoc Pennington <hp@redhat.com>
1696 * bus/bus.c (struct BusContext): remove struct field I didn't mean
1699 2003-10-16 Havoc Pennington <hp@redhat.com>
1701 * bus/connection.c (bus_pending_reply_expired): either cancel or
1703 (bus_connections_check_reply): use unlink, not remove_link, as we
1704 don't want to free the link; fixes double free mess
1706 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1707 where no reply was received
1709 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1712 * bus/signals.c (match_rule_matches): add special cases for the
1713 bus driver, so you can match on sender/destination for it.
1715 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1716 DBUS_PRINT_BACKTRACE is set
1718 * dbus/dbus-internals.c: add pid to assertion failure messages
1720 * dbus/dbus-connection.c: add message type code to the debug spew
1722 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1723 sender=foo not service=foo
1725 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1726 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
1727 DBUS_ACTIVATION_ADDRESS instead
1729 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1730 DBUS_SYSTEM_BUS_ADDRESS if appropriate
1732 * bus/bus.c (bus_context_new): handle OOM copying bus type into
1735 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1736 (dbus_message_iter_get_object_path_array): new function (half
1737 finished, disabled for the moment)
1739 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1740 DBUS_MESSAGE_TYPE_ERROR
1742 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1743 avoid redirecting stderr to /dev/null
1744 (babysit): close stdin if not doing the "exit_with_session" thing
1746 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1747 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1748 stdout/stdin, so things don't get confused
1750 * bus/system.conf.in: fix to allow replies, I modified .conf
1751 instead of .conf.in again.
1753 2003-10-14 David Zeuthen <david@fubar.dk>
1755 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1756 argtype to arg_type when raising unknown arg type exception.
1757 Changed type list to reflect the changes in dbus-protocol.h so
1758 the bindings actually work.
1760 2003-10-14 Havoc Pennington <hp@redhat.com>
1762 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1763 to have a bug keeping it from outputting the .da files sometimes
1764 (string_get_string): don't append garbage nul bytes to the string.
1766 2003-10-15 Seth Nickell <seth@gnome.org>
1768 * python/Makefile.am:
1770 Include dbus_h_wrapper.h in the dist tarball.
1772 2003-10-14 Havoc Pennington <hp@redhat.com>
1774 * bus/bus.c (bus_context_check_security_policy): revamp this to
1775 work more sanely with new policy-based requested reply setup
1777 * bus/connection.c (bus_transaction_send_from_driver): set bus
1778 driver messages as no reply
1780 * bus/policy.c (bus_client_policy_check_can_receive): handle a
1781 requested_reply attribute on allow/deny rules
1783 * bus/system.conf: add <allow requested_reply="true"/>
1785 * bus/driver.c (bus_driver_handle_message): fix check for replies
1786 sent to the bus driver, which was backward. How did this ever work
1787 at all though? I think I'm missing something.
1789 * dbus/dbus-message.c (decode_header_data): require error and
1790 method return messages to have a reply serial field to be valid
1791 (_dbus_message_loader_queue_messages): break up this function;
1792 validate that reply serial and plain serial are nonzero;
1793 clean up the OOM/error handling.
1794 (get_uint_field): don't return -1 from this
1795 (dbus_message_create_header): fix signed/unsigned bug
1797 * bus/connection.c (bus_connections_expect_reply): save serial of
1798 the incoming message, not reply serial
1800 2003-10-14 Havoc Pennington <hp@redhat.com>
1802 * bus/connection.c: implement pending reply tracking using
1805 * bus/bus.c (bus_context_check_security_policy): verify that a
1806 reply is pending in order to allow a reply to be sent. Deny
1807 messages of unknown type.
1809 * bus/dbus-daemon-1.1.in: update to mention new resource limits
1811 * bus/bus.c (bus_context_get_max_replies_per_connection): new
1812 (bus_context_get_reply_timeout): new
1814 2003-10-13 Seth Nickell <seth@gnome.org>
1816 * python/Makefile.am:
1818 Pass "make distcheck": remove a couple files from DIST_FILES
1819 that weren't included in the final version.
1821 2003-10-12 Havoc Pennington <hp@pobox.com>
1823 Added test code that 1) starts an actual bus daemon and 2) uses
1824 DBusGProxy; fixed bugs that were revealed by the test. Lots
1825 more testing possible, but this is the basic framework.
1827 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1828 empty proxy lists from the proxy list hash
1830 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1831 couple of return_if_fail checks
1833 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1834 to allocate, so everything is cleared to NULL as it should be.
1836 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1837 source as data to dbus_connection_set_timeout_functions() as the
1838 timeout functions expected
1840 * test/glib/run-test.sh: add a little script to start up a message
1841 bus and run tests using it
1843 * tools/dbus-launch.1: updates
1845 * tools/dbus-launch.c (main): add --config-file option
1847 * tools/dbus-launch.c (main): remove confusing else if (runprog)
1848 that could never be reached.
1850 * dbus/dbus-message.c (dbus_message_new_method_return)
1851 (dbus_message_new_error, dbus_message_new_signal): set the
1852 no-reply-expected flag on all these. Redundant, but may
1853 as well be consistent.
1855 2003-10-11 Havoc Pennington <hp@pobox.com>
1857 * test/decode-gcov.c (function_solve_graph): make broken block
1858 graph a nonfatal error since it seems to be broken. Need to debug
1861 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1862 can't just check type > INVALID < LAST anymore
1864 * dbus/dbus-message.c (dbus_message_get_signature): new function
1865 (dbus_message_has_signature): new function
1866 (struct DBusMessage): add signature field (right now it isn't sent
1867 over the wire, just generated on the fly)
1868 (dbus_message_copy): copy the signature, and init strings to
1869 proper length to avoid some reallocs
1870 (dbus_message_iter_init_array_iterator): return void, since it
1872 (dbus_message_iter_init_dict_iterator): return void since it can't fail
1873 (_dbus_message_loader_queue_messages): add silly temporary hack to
1874 fill in message->signature on load
1876 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1877 characters, so they are relatively human-readable.
1879 2003-10-11 Havoc Pennington <hp@pobox.com>
1881 * dbus/dbus-message.c (_dbus_message_test): add more test
1882 coverage, but #if 0 for now since they uncover a bug
1883 not fixed yet; I think in re_align_field_recurse()
1884 (re_align_field_recurse): add FIXME about broken assertion
1886 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1888 * bus/connection.c: share a couple code bits with expirelist.c
1890 * bus/expirelist.h, bus/expirelist.c: implement a generic
1891 expire-items-after-N-seconds facility, was going to share between
1892 expiring connections and replies, decided not to use for expiring
1893 connections for now.
1895 * COPYING: include AFL 2.0 (still need to change all the file headers)
1897 2003-10-09 Havoc Pennington <hp@redhat.com>
1899 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1900 gcc 3.3. Not that we do anything about it yet.
1902 * bus/signals.c (bus_match_rule_parse): impose max length on the
1905 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1907 2003-10-09 Havoc Pennington <hp@redhat.com>
1909 Make matching rules theoretically work (add parser).
1911 * bus/bus.c (bus_context_check_security_policy): fix up to handle
1912 the case where destination is explicitly specified as bus driver
1913 and someone else is eavesdropping.
1915 * bus/policy.c (bus_client_policy_check_can_receive): fix up
1916 definition of eavesdropping and assertion
1918 * tools/dbus-send.c (main): use dbus_message_type_from_string
1920 * bus/signals.c (bus_match_rule_parse): implement
1922 * dbus/dbus-message.c (dbus_message_type_from_string): new
1924 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1926 2003-10-02 Havoc Pennington <hp@pobox.com>
1928 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1929 dbus_gproxy_oneway_call
1931 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
1932 (dbus_server_setup_with_g_main): fix to allow calling them more
1933 than once on the same args
1934 (dbus_bus_get_with_g_main): new function
1936 2003-10-02 Havoc Pennington <hp@redhat.com>
1938 * doc/dbus-tutorial.xml: write some stuff
1940 2003-09-29 Havoc Pennington <hp@pobox.com>
1942 * configure.in: split checks for Doxygen from XML docs, check for
1945 * doc/Makefile.am: XML-ify all the docs, and add a blank
1948 2003-09-29 Havoc Pennington <hp@pobox.com>
1950 * Merge dbus-object-names branch. To see the entire patch
1951 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1952 it's huuuuge though.
1953 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1955 2003-09-28 Havoc Pennington <hp@pobox.com>
1957 * HACKING: update to reflect new server
1959 2003-09-26 Seth Nickell <seth@gnome.org>
1962 * python/examples/example-signals.py:
1964 Start implementing some notions of signals. The API
1965 is really terrible, but they sort of work (with the
1966 exception of being able to filter by service, and to
1967 transmit signals *as* a particular service). Need to
1968 figure out how to make messages come from the service
1971 * python/dbus_bindings.pyx.in:
1973 Removed duplicate message_handler callbacks.
1975 2003-09-25 Havoc Pennington <hp@redhat.com>
1977 * bus/session.conf.in: fix my mess
1979 2003-09-25 Havoc Pennington <hp@pobox.com>
1981 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1983 2003-09-25 Seth Nickell <seth@gnome.org>
1985 * python/examples/example-service.py:
1987 Johan notices complete wrong code in example-service, but
1988 completely wrong in a way that works exactly the same (!).
1989 Johan is confused, how could this possibly work? Example
1990 code fails to serve purpose of making things clear.
1993 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1995 * doc/dbus-specification.sgml: don't require header fields
1996 to be 4-byte aligned and specify that fields should be
1997 distinguished from padding by the fact that zero is not
2000 * doc/TODO: remove re-alignment item and add item to doc
2001 the OBJECT_PATH type.
2003 * dbus/dbus-message.c:
2004 (HeaderField): rename the original member to value_offset
2005 and introduce a name_offset member to keep track of where
2006 the field actually begins.
2007 (adjust_field_offsets): remove.
2008 (append_int_field), (append_uint_field),
2009 (append_string_field): don't align the start of the header
2010 field to a 4-byte boundary.
2011 (get_next_field): impl finding the next marhsalled field
2012 after a given field.
2013 (re_align_field_recurse): impl re-aligning a number of
2014 already marshalled fields.
2015 (delete_field): impl deleting a field of any type and
2016 re-aligning any following fields.
2017 (delete_int_or_uint_field), (delete_string_field): remove.
2018 (set_int_field), (set_uint_field): no need to re-check
2019 that we have the correct type for the field.
2020 (set_string_field): ditto and impl re-aligning any
2022 (decode_header_data): update to take into account that
2023 the fields aren't 4-byte aligned any more and the new
2024 way to distinguish padding from header fields. Also,
2025 don't exit when there is too much header padding.
2026 (process_test_subdir): print the directory.
2027 (_dbus_message_test): add test to make sure a following
2028 field is re-aligned correctly after field deletion.
2030 * dbus/dbus-string.[ch]:
2031 (_dbus_string_insert_bytes): rename from insert_byte and
2032 allow the insert of multiple bytes.
2033 (_dbus_string_test): test inserting multiple bytes.
2035 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2036 warning note to docs about having to re-align any
2037 marshalled values following the string.
2039 * dbus/dbus-message-builder.c:
2040 (append_string_field), (_dbus_message_data_load):
2041 don't align the header field.
2043 * dbus/dbus-auth.c: (process_test_subdir): print the
2046 * test/break-loader.c: (randomly_add_one_byte): upd. for
2049 * test/data/invalid-messages/bad-header-field-alignment.message:
2052 * test/data/valid-messages/unknown-header-field.message: shove
2053 a dict in the unknown field.
2055 2003-09-25 Seth Nickell <seth@gnome.org>
2058 * python/dbus_bindings.pyx.in:
2060 Handle return values.
2062 * python/examples/example-client.py:
2063 * python/examples/example-service.py:
2065 Pass back return values from the service to the client.
2067 2003-09-24 Seth Nickell <seth@gnome.org>
2071 Connect Object methods (when you are sharing an object) up... pass
2072 in a list of methods to be shared. Sharing all the methods just
2073 worked out too weird. You can now create nice Services over the
2076 * python/dbus_bindings.pyx.in:
2078 Keep references to user_data tuples passed into C functions so
2079 Python doesn't garbage collect on us.
2081 Implement MethodReturn and Error subclasses of Message for creating
2082 DBusMessage's of those types.
2084 * python/examples/example-client.py:
2085 * python/examples/example-service.py:
2087 Simple example code showing both how create DBus services and objects,
2088 and how to use them.
2090 2003-09-23 Havoc Pennington <hp@pobox.com>
2092 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2094 2003-09-23 Havoc Pennington <hp@redhat.com>
2096 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2097 (dbus_gproxy_disconnect_signal): implement
2098 (dbus_gproxy_manager_remove_signal_match): implement
2099 (dbus_gproxy_manager_add_signal_match): implement
2100 (dbus_gproxy_oneway_call): implement
2102 2003-09-23 Havoc Pennington <hp@pobox.com>
2104 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2105 subclass. This means dropping the transparent thread safety of the
2106 proxy; you now need a separate proxy per-thread, or your own
2107 locking on the proxy. Probably right anyway.
2108 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2110 2003-09-22 Havoc Pennington <hp@redhat.com>
2112 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2114 2003-09-21 Seth Nickell <seth@gnome.org>
2116 First checkin of the Python bindings.
2118 * python/.cvsignore:
2119 * python/Makefile.am:
2120 * python/dbus_bindings.pyx.in:
2121 * python/dbus_h_wrapper.h:
2123 Pieces for Pyrex to operate on, building a dbus_bindings.so
2124 python module for low-level access to the DBus APIs.
2128 High-level Python module for accessing DBus objects.
2133 Build stuff for the python bindings.
2137 Extra macro needed for finding the Python C header files.
2139 2003-09-21 Havoc Pennington <hp@pobox.com>
2141 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2142 implementing the proxy manager, didn't get very far.
2144 * dbus/dbus-bus.c (dbus_bus_add_match): new
2145 (dbus_bus_remove_match): new
2147 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2148 path_name argument; adjust the other not-yet-implemented
2149 gproxy constructors to be what I think they should be.
2151 2003-09-21 Havoc Pennington <hp@pobox.com>
2153 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2154 by default for message bus connections.
2156 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2157 exit_on_disconnect flag is set and we process the disconnected
2159 (dbus_connection_set_exit_on_disconnect): new function
2161 2003-09-21 Havoc Pennington <hp@pobox.com>
2163 Get matching rules mostly working in the bus; only actually
2164 parsing the rule text remains. However, the client side of
2165 "signal connections" hasn't been started, this patch is only the
2168 * dbus/dispatch.c: fix for the matching rules changes
2170 * bus/driver.c (bus_driver_handle_remove_match)
2171 (bus_driver_handle_add_match): send an ack reply from these
2174 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2175 arguments, reported by Seth Nickell
2177 * bus/config-parser.c (append_rule_from_element): support
2178 eavesdrop=true|false attribute on policies so match rules
2179 can be prevented from snooping on the system bus.
2181 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2182 and "destination" in attribute names; fix some docs bugs;
2183 add eavesdrop=true|false attribute
2185 * bus/driver.c (bus_driver_handle_add_match)
2186 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2189 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2190 rid of broadcast service concept, signals are just always broadcast
2192 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2193 mostly implement matching rules stuff (currently only exposed as signal
2196 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2198 * doc/dbus-specification.sgml: Change the header field name
2199 to be an enum and update the rest of the spec to reference
2200 the fields using the conventinal name.
2202 * dbus/dbus-protocol.h: update to reflect the spec.
2204 * doc/TODO: add item to remove the 4 byte alignment requirement.
2206 * dbus/dbus-message.c: Remove the code to generalise the
2207 header/body length and serial number header fields as named
2208 header fields so we can reference field names using the
2210 (append_int_field), (append_uint_field), (append_string_field):
2211 Append the field name as a byte rather than four chars.
2212 (delete_int_or_uint_field), (delete_string_field): reflect the
2213 fact that the field name and typecode now occupy 4 bytes instead
2215 (decode_string_field), (decode_header_data): update to reflect
2216 protocol changes and move the field specific encoding from
2217 decode_string_field() back into decode_header_data().
2219 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2220 Add utility to aid debugging.
2222 * dbus/dbus-message-builder.c:
2223 (append_string_field), (_dbus_message_data_load): Update to
2224 reflect protocol changes; Change the FIELD_NAME directive
2225 to HEADER_FIELD and allow it to take the field's conventional
2226 name rather than the actual value.
2228 * test/data/*/*.message: Update to use HEADER_FIELD instead
2229 of FIELD_NAME; Always align the header on an 8 byte boundary
2230 *before* updating the header length.
2232 2003-09-15 Havoc Pennington <hp@pobox.com>
2234 * dbus/dbus-pending-call.c: add the get/set object data
2235 boilerplate as for DBusConnection, etc. Use generic object data
2236 for the notify callback.
2238 * glib/dbus-gparser.c (parse_node): parse child nodes
2240 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2242 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2243 contain functions shared between the convenience lib and the
2246 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2247 -export-symbols-regex to the GLib library
2249 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2250 fix the locking in here, and add a default handler for
2251 Introspect() that just returns sub-nodes.
2253 2003-09-14 Havoc Pennington <hp@pobox.com>
2255 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2256 rather than gfoo consistent
2258 * glib/dbus-gproxy.h: delete for now, move contents to
2259 dbus-glib.h, because the include files don't work right since we
2260 aren't in the dbus/ subdir.
2262 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2263 (dbus_gproxy_end_call): finish
2264 (dbus_gproxy_begin_call): finish
2266 * glib/dbus-gmain.c (dbus_set_g_error): new
2268 * glib/dbus-gobject.c (handle_introspect): include information
2269 about child nodes in the introspection
2271 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2272 function to help in implementation of introspection
2274 * dbus/dbus-object-tree.c
2275 (_dbus_object_tree_list_registered_and_unlock): new function
2277 2003-09-12 Havoc Pennington <hp@pobox.com>
2279 * glib/dbus-gidl.h: add common base class for all the foo_info
2282 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2285 * test/Makefile.am: try test srcdir -ef . in addition to test
2286 srcdir = ., one of them should work (yeah lame)
2288 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2291 * glib/dbus-gparser.h: make description_load routines return
2292 NodeInfo* not Parser*
2294 * Makefile.am (SUBDIRS): build test dir after all library dirs
2296 * configure.in: add GTK+ detection
2298 2003-09-07 Havoc Pennington <hp@pobox.com>
2300 * Make Doxygen contented.
2302 2003-09-07 Havoc Pennington <hp@pobox.com>
2304 * doc/dbus-specification.sgml: more updates
2306 2003-09-06 Havoc Pennington <hp@pobox.com>
2308 * doc/dbus-specification.sgml: partial updates
2310 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2311 zillionth time; hopefully I edited the right file this time.
2313 * bus/config-parser.c (append_rule_from_element): support
2314 send_type, send_path, receive_type, receive_path
2316 * bus/policy.c: add message type and path to the list of things
2317 that can be "firewalled"
2319 2003-09-06 Havoc Pennington <hp@pobox.com>
2321 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2322 (dbus_connection_register_object_path): make this not handle
2323 messages to paths below the given path
2325 2003-09-03 Havoc Pennington <hp@pobox.com>
2327 * test/glib/Makefile.am: add this with random glib-linked test
2330 * glib/Makefile.am: remove the random test programs from here,
2331 leave only the unit tests
2333 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2334 uscore/javacaps conversion, and fix
2335 (get_object_property, set_object_property): change to .NET
2336 convention for mapping props to methods, set_FooBar/get_FooBar,
2337 since one language has such a convention we may as well copy it.
2338 Plus real methods in either getFooBar or get_foo_bar style won't
2339 collide with this convention.
2341 2003-09-01 Havoc Pennington <hp@pobox.com>
2343 * glib/dbus-gparser.c: implement
2345 * glib/dbus-gobject.c: start implementing skeletons support
2347 * configure.in: when disabling checks/assert, also define
2348 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2350 2003-09-01 Havoc Pennington <hp@pobox.com>
2352 * glib/Makefile.am: rearrange a bunch of files and get "make
2353 check" framework set up
2355 2003-08-31 Havoc Pennington <hp@pobox.com>
2357 * fix build with --disable-tests
2359 2003-08-30 Havoc Pennington <hp@pobox.com>
2361 * dbus/dbus-connection.c: purge DBusMessageHandler
2363 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2364 use callbacks everywhere
2366 2003-08-30 Havoc Pennington <hp@pobox.com>
2368 * test/data/valid-config-files/system.d/test.conf: change to
2369 root for the user so warnings don't get printed
2371 * dbus/dbus-message.c: add dbus_message_get_path,
2372 dbus_message_set_path
2374 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2375 dispatching to a path
2377 * dbus/dbus-string.c (_dbus_string_validate_path): add
2379 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2380 (_dbus_marshal_object_path): implement
2382 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2383 to contain the path to the target object
2384 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2385 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2387 2003-08-30 Havoc Pennington <hp@pobox.com>
2389 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2391 2003-08-29 Havoc Pennington <hp@pobox.com>
2393 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2395 (struct DBusObjectSubtree): shrink this
2396 a lot, since we may have a lot of them
2397 (_dbus_object_tree_free_all_unlocked): implement
2398 (_dbus_object_tree_dispatch_and_unlock): implement
2400 2003-08-29 Havoc Pennington <hp@pobox.com>
2402 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2404 2003-08-28 Havoc Pennington <hp@pobox.com>
2408 * dbus/dbus-connection.c: port to no ObjectID, create a
2409 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2411 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2412 everything except UnregisterFunction and MessageFunction
2414 * dbus/dbus-marshal.c: port away from DBusObjectID,
2415 add DBUS_TYPE_OBJECT_PATH
2417 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2418 dbus/dbus-objectid.[hc]: remove these, we are moving to
2419 path-based object IDs
2421 2003-08-25 Havoc Pennington <hp@pobox.com>
2423 Just noticed that dbus_message_test is hosed, I wonder when I
2424 broke that. I thought make check was passing earlier...
2426 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2427 container tree, will replace most of dbus-object-registry
2429 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2432 2003-08-19 Havoc Pennington <hp@pobox.com>
2434 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2435 (dbus_message_is_error): fix this function
2437 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2440 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2441 reflect clarified man page
2442 (bus_client_policy_check_can_send): ditto
2444 * bus/session.conf.in: fixup
2446 * bus/system.conf.in: fixup
2448 2003-08-18 Havoc Pennington <hp@redhat.com>
2450 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2452 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2453 dumb bug created earlier (wrong order of args to
2454 decode_header_data())
2456 * tools/dbus-send.c: port
2458 * tools/dbus-print-message.c (print_message): port
2460 * test/data/*messages: port all messages over
2462 * dbus/dbus-message-builder.c: support including
2465 * bus/driver.c: port over
2467 * bus/dispatch.c: port over to new stuff
2469 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2470 rename disconnect signal to "Disconnected"
2472 2003-08-17 Havoc Pennington <hp@pobox.com>
2474 This doesn't compile yet, but syncing up so I can hack on it from
2475 work. What are branches for if not broken code? ;-)
2477 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2478 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2479 DBUS_HEADER_FIELD_ERROR_NAME
2481 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2482 for the interface+member pairs
2483 (string_hash): change to use g_str_hash algorithm
2484 (find_direct_function, find_string_function): refactor these to
2487 * dbus/dbus-message.c: port all of this over to support
2488 interface/member fields instead of name field
2490 * dbus/dbus-object-registry.c: port over
2492 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2493 from _dbus_string_validate_name
2495 * bus/dbus-daemon-1.1: change file format for the
2496 <deny>/<allow> stuff to match new message naming scheme
2498 * bus/policy.c: port over
2500 * bus/config-parser.c: parse new format
2502 2003-08-16 Havoc Pennington <hp@pobox.com>
2504 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2507 * glib/dbus-gproxy.c: some hacking
2509 2003-08-15 Havoc Pennington <hp@redhat.com>
2511 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2513 * dbus/dbus-connection.c
2514 (dbus_connection_send_with_reply_and_block): factor out internals;
2515 change to convert any error replies to DBusError instead of
2516 returning them as a message
2518 2003-08-15 Havoc Pennington <hp@pobox.com>
2520 * dbus/dbus-connection.c,
2521 dbus/dbus-pending-call.c: Finish the pending call stuff
2523 2003-08-14 Havoc Pennington <hp@redhat.com>
2525 * dbus/dbus-pending-call.c: start on new object that will replace
2526 DBusMessageHandler and ReplyHandlerData for tracking outstanding
2529 * dbus/dbus-gproxy.c: start on proxy object used to communicate
2530 with remote interfaces
2532 * dbus/dbus-gidl.c: do the boring boilerplate in here
2534 2003-08-12 Havoc Pennington <hp@pobox.com>
2536 * bus/dispatch.c (bus_dispatch): make this return proper
2537 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2539 * dbus/dbus-errors.c (dbus_set_error): use
2540 _dbus_string_append_printf_valist
2542 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2543 (_dbus_string_append_printf): new
2545 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2548 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2549 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2550 message is unhandled.
2552 2003-08-11 Havoc Pennington <hp@pobox.com>
2554 * bus/test.c (client_disconnect_handler): change to return
2555 HANDLED (would have been REMOVE_MESSAGE)
2557 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2558 HANDLED/NOT_YET_HANDLED instead of
2559 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
2562 2003-08-10 Havoc Pennington <hp@pobox.com>
2564 * tools/dbus-send.c (main): add --type argument, for now
2565 supporting only method_call and signal types.
2567 * tools/dbus-print-message.c: print message type
2569 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2570 init connection->objects
2572 * doc/dbus-specification.sgml: fix sgml
2574 * bus/*.c: port over to object-instance API changes
2576 * test/test-service.c: ditto
2578 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2579 name, we will have to fix up the rest of the code to also handle
2581 (dbus_message_new): generic message-creation call
2582 (set_string_field): allow appending name field
2584 2003-08-06 Havoc Pennington <hp@pobox.com>
2586 * dbus/dbus-object-registry.c: implement signal connection
2589 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2591 * dbus/dbus-internals.c (_dbus_memdup): new function
2593 2003-08-02 Havoc Pennington <hp@pobox.com>
2595 * dbus/dbus-message.c (dbus_message_get_no_reply)
2596 (dbus_message_set_no_reply): add these and remove
2597 set_is_error/get_is_error
2599 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
2600 remove the ERROR flag, since there's now an ERROR type
2602 2003-08-01 Havoc Pennington <hp@pobox.com>
2604 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2607 * dbus/dbus-message.c (dbus_message_get_type): new function
2609 * doc/dbus-specification.sgml: add "type" byte to messages
2611 2003-08-01 Havoc Pennington <hp@pobox.com>
2613 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2614 a message type enum to distinguish kinds of message
2615 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
2616 that need not be replied to
2618 2003-08-01 Havoc Pennington <hp@pobox.com>
2620 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2621 (unpack_8_octets): fix no-64-bit-int bug
2623 * dbus/dbus-object-registry.c (validate_id): validate the
2624 connection ID bits, not just the instance ID.
2626 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2627 the connection-global 33 bits of the object ID
2629 * dbus/dbus-object-registry.c (info_from_entry): fill in
2630 object ID in the new way
2632 * dbus/dbus-objectid.h: rather than high/low bits, specifically
2633 define server/client/instance bits.
2635 2003-07-30 Havoc Pennington <hp@pobox.com>
2637 * dbus/dbus-connection.c (dbus_connection_register_object): fix
2640 2003-07-13 Havoc Pennington <hp@pobox.com>
2642 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2643 fields to DBusObjectVTable and DBusObjectInfo
2645 2003-07-12 Havoc Pennington <hp@pobox.com>
2647 * dbus/dbus-object-registry.c: implement unit test,
2648 fix bugs discovered in process
2650 * dbus/dbus-connection.c: remove handler_table and
2651 register_handler(), add DBusObjectRegistry usage
2653 * dbus/dbus-objectid.c (dbus_object_id_is_null)
2654 (dbus_object_id_set_null): new functions
2656 2003-07-08 Havoc Pennington <hp@pobox.com>
2658 * dbus/dbus-object.c: implement some of this
2660 * dbus/dbus-object-registry.c
2661 (_dbus_object_registry_add_and_unlock): fill in the object_id out
2663 (_dbus_object_registry_new): handle OOM
2665 2003-07-08 Havoc Pennington <hp@pobox.com>
2667 * dbus/dbus-object.h: sketch out an API for registering objects
2668 with a connection, that allows us to use as little as 24 bytes
2669 per object and lets application code represent an object in
2670 any conceivable way.
2672 * dbus/dbus-object-registry.c: implement the hard bits of the
2673 DBusConnection aspect of object API. Not yet wired up.
2675 2003-07-06 Havoc Pennington <hp@pobox.com>
2677 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2678 (_dbus_marshal_object_id): new
2679 (_dbus_demarshal_object_id): new
2680 (_dbus_marshal_get_arg_end_pos): support object ID type, and
2681 consolidate identical switch cases. Don't conditionalize handling
2682 of DBUS_TYPE_UINT64, need to handle the type always.
2683 (_dbus_marshal_validate_arg): consolidate identical cases, and
2684 handle DBUS_TYPE_OBJECT_ID
2686 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2688 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2690 2003-09-28 Havoc Pennington <hp@pobox.com>
2694 2003-09-28 Havoc Pennington <hp@pobox.com>
2696 * doc/Makefile.am (dbus-specification.html): testing a funky hack
2697 to work with Debian db2html
2699 2003-09-28 Havoc Pennington <hp@pobox.com>
2701 * configure.in: 0.13
2703 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2704 stylesheet-images for benefit of Debian
2706 Change back to using filesystem-linked sockets for the system
2707 bus, so only root can create the default system bus address.
2709 * bus/system.conf.in: change to use
2710 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2712 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2715 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2716 here, and AC_DEFINE DBUS_SYSTEM_PATH
2718 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2721 * doc/busconfig.dtd:
2724 2003-08-09 Anders Carlsson <andersca@codefactory.se>
2726 * doc/dbus-specification.sgml:
2727 Add activation reply values.
2729 2003-08-05 Havoc Pennington <hp@redhat.com>
2731 * configure.in: 0.12
2733 2003-08-05 Anders Carlsson <andersca@codefactory.se>
2735 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2736 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2737 (add_watch), (remove_watch), (create_source):
2738 Refcount fds, fixes some reentrancy issues.
2740 2003-07-30 Havoc Pennington <hp@redhat.com>
2742 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2743 bus address to be abstract if we have abstract sockets
2747 2003-07-28 Havoc Pennington <hp@redhat.com>
2749 * bus/messagebus.in: fix to avoid processname/servicename
2750 confusion, from Michael Kearey
2751 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2753 2003-07-23 Havoc Pennington <hp@pobox.com>
2755 * dbus/dbus-message.c (dbus_message_iter_get_named):
2756 fix from Andy Hanton to remove broken "+1"
2758 2003-07-16 Havoc Pennington <hp@pobox.com>
2760 * tools/dbus-launch.c (babysit): close stdout/stderr in the
2761 babysitter process, as suggested by Thomas Leonard, so
2762 an "eval `dbus-launch --exit-with-session`" will actually
2765 2003-07-16 Havoc Pennington <hp@pobox.com>
2767 * configure.in: print out EXPANDED_* variables in the summary at
2768 the end; clean up the code that computes EXPANDED_ variables and
2769 get the ones using exec_prefix right. Should make things work
2770 when you build without --prefix
2772 2003-06-29 Havoc Pennington <hp@pobox.com>
2774 * mono/Test.cs (class Test): fire up a main loop and run it
2776 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2777 done once, the app has to do it
2779 2003-06-26 Havoc Pennington <hp@pobox.com>
2781 * mono/Connection.cs: set up connection with the glib main loop
2783 2003-07-01 Havoc Pennington <hp@redhat.com>
2785 * doc/dbus-specification.sgml: clarify the format of a type code,
2786 change suggested by Jim Blandy
2788 2003-06-29 Miloslav Trmac <mitr@volny.cz>
2791 * tools/Makefile.am: Don't assume srcdir == builddir.
2793 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2794 the allocated block.
2795 (_dbus_memory_test): New function.
2796 * dbus/dbus-test.h: Add _dbus_memory_test ().
2797 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2799 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2801 (dbus_message_new): Remove obsolete @todo.
2803 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2804 (_dbus_marshal_set_uint64): Fix comment.
2806 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2807 hardcode FIELD_REPLY_SERIAL.
2809 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2810 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2812 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2813 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2815 2003-06-24 Havoc Pennington <hp@pobox.com>
2817 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2819 2003-06-23 Anders Carlsson <andersca@codefactory.se>
2825 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2826 * gcj/org/.cvsignore:
2827 * gcj/org/Makefile.am:
2828 * gcj/org/freedesktop/.cvsignore:
2829 * gcj/org/freedesktop/Makefile.am:
2830 * gcj/org/freedesktop/dbus/.cvsignore:
2831 * gcj/org/freedesktop/dbus/Makefile.am:
2832 * gcj/org/freedesktop/dbus/Message.java: (Message),
2834 * gcj/org/freedesktop/dbus/natMessage.cc:
2835 Fix the build system.
2837 2003-06-22 Havoc Pennington <hp@pobox.com>
2839 * mono/Connection.cs: add more bindings
2841 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2844 2003-06-22 Havoc Pennington <hp@pobox.com>
2846 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2847 Start wrapping more stuff.
2849 2003-06-22 Havoc Pennington <hp@pobox.com>
2851 * mono/Message.cs: implement Message.Wrap() that ensures we only
2852 have a single C# wrapper per DBusMessage, assuming it works which
2853 it probably doesn't.
2855 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2856 (dbus_message_free_data_slot): new
2857 (dbus_message_set_data): new
2858 (dbus_message_get_data): new
2860 2003-06-22 Havoc Pennington <hp@pobox.com>
2862 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2863 (_dbus_data_slot_allocator_alloc): rework these to keep a
2864 reference count on each slot and automatically manage a global
2865 slot ID variable passed in by address
2867 * bus/bus.c: convert to new dataslot API
2869 * dbus/dbus-bus.c: convert to new dataslot API
2871 * dbus/dbus-connection.c: convert to new dataslot API
2873 * dbus/dbus-server.c: convert to new dataslot API
2875 * glib/dbus-gmain.c: ditto
2879 * bus/connection.c: ditto
2881 2003-06-22 Anders Carlsson <andersca@codefactory.se>
2883 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2884 after the gcj checks so that the correct configuration tags
2885 will be added to libtool.
2887 * dbus-glib-1.pc.in: No need to specify any includes since
2888 dbus-1.pc.in has those.
2890 2003-06-22 Havoc Pennington <hp@pobox.com>
2892 * mono/*, gcj/*, configure.in, Makefile.am:
2893 Check in makefiles and subdirs for mono and gcj bindings.
2894 Neither binding actually exists, just trying to get through
2895 all the build and other boring bits.
2897 2003-06-21 Philip Blundell <philb@gnu.org>
2899 * tools/dbus-monitor.1: Updated.
2901 * tools/dbus-send.1: Likewise.
2903 2003-06-20 Anders Carlsson <andersca@codefactory.se>
2905 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2906 for hangup and error after checking read so we won't discard
2907 pending data if both hangup and read are set.
2909 2003-06-19 Philip Blundell <philb@gnu.org>
2911 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2913 * tools/dbus-send.c: Accept both --system and --session.
2915 * tools/dbus-monitor.c: Same here.
2917 2003-06-19 Anders Carlsson <andersca@codefactory.se>
2919 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2920 from C++ (Patch by Miloslav Trmac).
2922 2003-06-15 Joe Shaw <joe@assbarn.com>
2924 * configure.in: Check for socklen_t.
2926 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2928 * test/test-segfault.c: Add #include <sys/time.h>
2930 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2931 dbus-launch needs it.
2933 2003-06-09 Havoc Pennington <hp@redhat.com>
2935 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2936 SUN_LEN, it breaks abstract socket usage
2938 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2941 2003-06-04 Havoc Pennington <hp@pobox.com>
2943 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2944 using unix:abstract=/foo, and when listening in a tmpdir
2945 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2947 * dbus/dbus-transport.c (_dbus_transport_open): support
2950 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2951 support abstract sockets
2953 * dbus/dbus-transport-unix.c
2954 (_dbus_transport_new_for_domain_socket): support abstract sockets
2956 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2957 toggle as an argument, implement abstract namespace support
2958 (_dbus_listen_unix_socket): ditto
2960 * configure.in: add --enable-abstract-sockets and implement
2961 a configure check for autodetection of the right value.
2963 2003-06-01 Havoc Pennington <hp@pobox.com>
2965 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2966 in /tmp (though on Linux this will end up being useless,
2967 when we add abstract namespace support)
2969 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2972 2003-05-28 Colin Walters <walters@verbum.org>
2974 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2976 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2978 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2980 2003-05-17 Colin Walters <walters@gnu.org>
2982 * tools/dbus-send.c: Don't exit with an error code if --help was
2983 passed. Default to using the session bus instead of the system
2986 * tools/dbus-launch.c: Ditto.
2988 * tools/dbus-monitor.c: Ditto.
2990 * tools/dbus-send.1: Update with new arguments.
2992 * tools/dbus-launch.c: Emit code to export variables. New
2993 arguments -s and -c to specify shell syntax, and a bit of code to
2994 autodetect syntax. Also, allow specifying a program to run.
2996 * tools/dbus-launch.1: Update with new arguments.
2998 * tools/dbus-send.1: Ditto.
3000 * tools/dbus-monitor.1: Ditto.
3002 2003-05-17 Havoc Pennington <hp@pobox.com>
3004 * bus/config-parser.c (merge_included): merge in policies from
3005 child configuration file.
3007 * bus/policy.c (bus_policy_merge): function to merge two policies
3010 2003-05-16 Havoc Pennington <hp@redhat.com>
3012 * dbus/dbus-connection.c: disable verbose lock spew
3014 * tools/dbus-send.c: add --print-reply command line option
3016 * tools/dbus-print-message.h (print_message): new util function
3017 shared by dbus-send and dbus-monitor
3019 * tools/dbus-monitor.c (handler_func): exit on disconnect
3021 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3022 disconnected, don't try to use the read_watch
3024 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3025 so we can find this bug more easily
3027 2003-05-16 Havoc Pennington <hp@redhat.com>
3029 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3030 NULL as DBusHashTable is annoyingly likely to do.
3032 2003-05-16 Colin Walters <walters@verbum.org>
3034 * tools/dbus-monitor.c: Add --session argument and usage()
3037 * tools/dbus-monitor.1: Update with new --session arg.
3039 * bus/Makefile.am (install-data-hook): Create
3040 $(libdir)/dbus-1.0/services so that the session bus is happy.
3042 2003-05-15 Havoc Pennington <hp@redhat.com>
3044 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3045 on non-x86. ifdef's are evil.
3047 2003-05-15 Havoc Pennington <hp@redhat.com>
3049 * configure.in: 0.11
3053 * bus/Makefile.am (initddir): apparently we are supposed to put
3054 init scripts in /etc/rc.d/init.d not /etc/init.d
3056 * bus/Makefile.am: remove the "you must --enable-tests to make
3057 check" as it broke distcheck
3059 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3061 2003-05-13 James Willcox <jwillcox@gnome.org>
3064 * bus/activation.c: (bus_activation_service_created),
3065 (bus_activation_activate_service):
3066 * bus/driver.c: (bus_driver_send_service_deleted),
3067 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3068 (bus_driver_send_service_acquired),
3069 (bus_driver_send_welcome_message),
3070 (bus_driver_handle_list_services):
3071 * bus/session.conf.in:
3072 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3073 (dbus_bus_service_exists), (dbus_bus_activate_service):
3076 Add some convenience API which lets you activate a service, and did a
3077 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3078 and dbus_message_get_args()
3080 2003-05-11 Havoc Pennington <hp@pobox.com>
3082 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3083 calling _dbus_marshal_validate_arg() for every byte in a byte
3086 * dbus/dbus-message-handler.c: use atomic reference counting to
3087 reduce number of locks slightly; the global lock in here sucks
3089 * dbus/dbus-connection.c
3090 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3091 update_dispatch_status that can be called with lock held; then use
3092 in a couple places to reduce locking/unlocking
3093 (dbus_connection_send): hold the lock over the whole function
3094 instead of acquiring it twice.
3096 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3098 * bus/connection.c (bus_connections_setup_connection): fix access
3099 to already-freed memory.
3101 * dbus/dbus-connection.c: keep a little cache of linked list
3102 nodes, to avoid using the global linked list alloc lock in the
3103 normal send-message case. Instead we just use the connection lock
3104 that we already have to take.
3106 * dbus/dbus-list.c (_dbus_list_find_last): new function
3108 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3109 change to use a struct for the atomic type; fix docs,
3110 they return value before increment, not after increment.
3112 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3113 (_dbus_string_append_8_aligned): new functions to try to
3114 microoptimize this operation.
3115 (reallocate_for_length): break this out of set_length(), to
3116 improve profile info, and also so we can consider inlining the
3119 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3120 strings with some preallocation, cuts down on our calls to realloc
3121 a fair bit. Though if we can get the "move entire string to empty
3122 string" optimization below to kick in here, it would be better.
3124 * dbus/dbus-string.c (_dbus_string_move): just call
3125 _dbus_string_move_len
3126 (_dbus_string_move_len): add a special case for moving
3127 an entire string into an empty string; we can just
3128 swap the string data instead of doing any reallocs.
3129 (_dbus_string_init_preallocated): new function
3131 2003-05-11 Havoc Pennington <hp@pobox.com>
3133 Write a "test-profile" that does echo client-server with threads;
3134 profile reveals lock contention, memcpy/realloc of buffers, and
3135 UTF-8 validation as hot spots. 20% of lock contention eliminated
3136 with dbus_atomic_inc/dec implementation on x86. Much remaining
3137 contention is global mempool locks for GList and DBusList.
3139 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3142 * dbus/dbus-connection.c (struct DBusConnection): use
3143 dbus_atomic_t for the reference count
3145 * dbus/dbus-message.c (struct DBusMessage): declare
3146 dbus_atomic_t values as volatile
3148 * configure.in: code to detect ability to use atomic integer
3149 operations in assembly, from GLib patch
3151 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3152 time, tired of it being wrong in threads and forked processes
3154 * glib/test-profile.c: a little program to bounce messages back
3155 and forth between threads and eat CPU
3157 * dbus/dbus-connection.c: add debug spew macros for debugging
3158 thread locks; include config.h at top; fix deadlock in
3159 dbus_connection_flush()
3161 2003-05-08 Havoc Pennington <hp@pobox.com>
3163 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3164 data from getting written, and there wasn't a good reason to
3167 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3168 dbus_verbose lines in test coverage
3169 (main): add list of functions sorted by # of untested blocks
3170 to the coverage report
3172 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3174 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3176 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3177 extend test coverage
3179 * test/data/auth/cancel.auth-script: test canceling an
3182 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3183 aren't used. in CVS history if we end up needing them.
3185 2003-05-04 Havoc Pennington <hp@pobox.com>
3187 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3190 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3191 function, which assumed length was in # of strings, not bytes
3193 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3196 * dbus/dbus-connection.c
3197 (_dbus_connection_queue_received_message): disable function for
3198 now, we are only using it in test mode
3200 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3201 remove a mistaken FIXME
3203 2003-05-04 Havoc Pennington <hp@pobox.com>
3205 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3206 unlock mutex on successful return, patch from Anders Gustafsson
3208 2003-05-04 Havoc Pennington <hp@pobox.com>
3210 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3213 2003-05-04 Havoc Pennington <hp@pobox.com>
3215 * tools/dbus-launch.c: implement
3217 * bus/main.c (main), bus/bus.c (bus_context_new):
3218 implement --print-pid and --fork
3220 2003-05-03 Havoc Pennington <hp@redhat.com>
3222 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3223 the address had no value, and add to test suite. Fix and
3224 regression test from Miloslav Trmac
3226 2003-05-03 Havoc Pennington <hp@pobox.com>
3228 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3229 watch is invalid when handled
3231 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3232 dbus-launch utility to launch the bus from a shell script. Didn't
3233 actually implement dbus-launch yet, it's just a placeholder still.
3235 2003-05-03 Havoc Pennington <hp@pobox.com>
3237 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3238 daemon; also documents daemon config file, so replaces
3239 doc/config-file.txt. Corrected some stuff from config-file.txt in
3240 the process of moving it.
3242 2003-05-03 Havoc Pennington <hp@pobox.com>
3244 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3247 2003-05-03 Colin Walters <walters@verbum.org>
3249 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3250 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3252 * Makefile.am: Update to use new .pc versioning scheme.
3254 2003-05-02 Havoc Pennington <hp@redhat.com>
3256 * bus/system.conf.in: allow send/receive to/from message bus
3259 2003-04-30 Havoc Pennington <hp@redhat.com>
3261 * configure.in: print a note when building with unit tests and
3264 2003-04-30 Havoc Pennington <hp@redhat.com>
3266 * Makefile.am: add a check-local that complains if you didn't
3267 configure with --enable-tests
3269 2003-04-29 Havoc Pennington <hp@redhat.com>
3271 * glib/dbus-gmain.c: docs cleanups
3273 * dbus/dbus-types.h: add docs on int64 types
3275 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3276 public API docs section
3278 2003-04-29 Havoc Pennington <hp@redhat.com>
3280 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3281 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3282 parallel install API version, not with the D-BUS package version.
3284 * HACKING: move some of README over here
3286 * README: updates, and document API/ABI policy
3288 * configure.in: reindentation
3290 2003-04-29 Havoc Pennington <hp@redhat.com>
3292 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3293 to use this library" to be sure people have the right
3296 2003-04-28 Havoc Pennington <hp@redhat.com>
3298 * configure.in: add --enable-docs which by default is auto yes if
3299 doxygen and db2html found, no otherwise; but can be forced on/off
3301 * doc/Makefile.am: conditionalize whether to build docs on
3304 2003-04-28 Havoc Pennington <hp@redhat.com>
3306 * configure.in: 0.10
3310 * bus/system.conf.in: add <includedir>system.d</includedir>
3312 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3313 username was provided but not uid
3315 * bus/config-parser.c (struct BusConfigParser): keep track of
3316 whether the parser is toplevel or was included; change some
3317 of the error handling if it's included.
3319 2003-04-27 Havoc Pennington <hp@pobox.com>
3323 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3324 report correct status if we finish processing authentication
3325 inside this function.
3327 * bus/activation.c (try_send_activation_failure): use
3328 bus_transaction_send_error_reply
3330 * bus/connection.c (bus_connection_get_groups): return an error
3331 explaining the problem
3333 * bus/bus.c (bus_context_check_security_policy): implement
3334 restriction here that inactive connections can only send the
3335 hello message. Also, allow bus driver to send anything to
3338 * bus/connection.c (bus_connection_complete): create the
3339 BusClientPolicy here instead of on-demand.
3340 (bus_connection_get_policy): don't return an error
3342 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3343 sender field in message being replied to
3345 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3346 causing it to return FALSE always
3348 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3349 we checked sender rather than destination
3351 2003-04-25 Havoc Pennington <hp@redhat.com>
3353 test suite is slightly hosed at the moment, will fix soon
3355 * bus/connection.c (bus_connections_expire_incomplete): fix to
3356 properly disable the timeout when required
3357 (bus_connection_set_name): check whether we can remove incomplete
3358 connections timeout after we complete each connection.
3360 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3361 probably still broken.
3363 * bus/services.c (bus_registry_acquire_service): implement max
3364 number of services owned, and honor allow/deny rules on which
3365 services a connection can own.
3367 * bus/connection.c (bus_connection_get_policy): report errors here
3369 * bus/activation.c: implement limit on number of pending
3372 2003-04-25 Havoc Pennington <hp@redhat.com>
3374 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3375 where we used >= 0 instead of != DBUS_UID_UNSET.
3377 2003-04-25 Havoc Pennington <hp@redhat.com>
3379 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3380 were toggled without add/remove, fix from Anders Gustafsson
3382 2003-04-24 Havoc Pennington <hp@redhat.com>
3384 * test/data/valid-config-files/basic.conf: add <limit> tags to
3387 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3388 <limit> tag in configuration file.
3390 2003-04-24 Havoc Pennington <hp@redhat.com>
3392 * bus/dispatch.c: somehow missed some name_is
3394 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3395 (_dbus_timeout_set_interval): new
3397 * bus/connection.c (bus_connections_setup_connection): record time
3398 when each connection is first set up, and expire them after the
3399 auth timeout passes.
3401 2003-04-24 Havoc Pennington <hp@redhat.com>
3403 * dbus/dbus-message.c (dbus_message_name_is): rename
3404 (dbus_message_service_is): rename
3405 (dbus_message_sender_is): rename
3406 (dbus_message_get_service): rename
3408 2003-04-24 Havoc Pennington <hp@redhat.com>
3410 * configure.in: add --enable-checks
3412 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3414 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3415 to use thread locks.
3416 (_dbus_connection_handler_destroyed_locked): move some private
3417 functions into proper docs group
3419 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3420 _dbus_return_val_if_fail
3422 Throughout: use dbus_return_if_fail
3424 2003-04-23 James Willcox <jwillcox@gnome.org>
3427 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3428 (dbus_connection_setup_with_g_main),
3429 (dbus_server_setup_with_g_main):
3430 * glib/test-dbus-glib.c: (main):
3431 * glib/test-thread-client.c: (main):
3432 * glib/test-thread-server.c: (new_connection_callback), (main):
3433 * tools/dbus-monitor.c: (main):
3435 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3436 and dbus_server_setup_with_g_main().
3438 2003-04-20 Havoc Pennington <hp@pobox.com>
3440 * doc/dbus-specification.sgml: document the restrictions on
3441 message and service names
3443 2003-04-22 Havoc Pennington <hp@redhat.com>
3445 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3446 support, and do some code cleanups to share more code and
3447 speed up array marshal/demarshal.
3449 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3451 * configure.in: generate dbus-arch-deps.h
3453 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3456 2003-04-22 Havoc Pennington <hp@redhat.com>
3458 * test/data/valid-messages/opposite-endian.message: fix test
3459 to use proper type for rply field
3461 * test/data/invalid-messages: add tests for below validation
3463 * dbus/dbus-message.c (decode_header_data): validate field types,
3464 and validate that named fields are valid names
3465 (decode_name_field): consider messages in the
3466 org.freedesktop.Local. namespace to be invalid.
3468 * dbus/dbus-string.c (_dbus_string_validate_name): new
3470 2003-04-19 Havoc Pennington <hp@pobox.com>
3472 * bus/driver.c (bus_driver_handle_hello): check limits and
3473 return an error if they are exceeded.
3475 * bus/connection.c: maintain separate lists of active and inactive
3476 connections, and a count of each. Maintain count of completed
3477 connections per user. Implement code to check connection limits.
3479 * dbus/dbus-list.c (_dbus_list_unlink): export
3481 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3482 number of bytes in the message queue for a connection
3484 2003-04-18 Havoc Pennington <hp@pobox.com>
3486 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3488 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3491 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3492 on realloc be sure to update the pointer in the keyring
3494 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3495 offset to avoid writing to unallocated memory
3497 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3498 try the next mechanism, so we properly handle OOM
3500 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3502 (_dbus_keyring_new): fix OOM bug
3503 (_dbus_keyring_new_homedir): always set error; impose a maximum
3504 number of keys we'll load from the file, mostly to speed up the
3505 test suite and make its OOM checks more useful, but also for
3508 * dbus/dbus-auth.c (process_error_server): reject authentication
3509 if we get an error from the client
3510 (process_cancel): on cancel, send REJECTED, per the spec
3511 (process_error_client): send CANCEL if we get an error from the
3514 2003-04-18 Havoc Pennington <hp@pobox.com>
3516 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3519 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3522 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3523 about DBUS_TEST_HOMEDIR once
3525 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3528 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3529 config file so we test the right thing
3531 Throughout: assorted docs improvements
3533 2003-04-18 Havoc Pennington <hp@pobox.com>
3535 * glib/dbus-gmain.c: adapt to watch changes
3537 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3539 * dbus/dbus-server.h: remove dbus_server_handle_watch
3541 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3543 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3544 like DBusTimeout, so we don't need dbus_connection_handle_watch
3547 2003-04-17 Havoc Pennington <hp@redhat.com>
3549 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3550 database usage so it all goes via the DBusUserDatabase cache.
3552 2003-04-17 Havoc Pennington <hp@redhat.com>
3554 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3555 there was an OOM watch we skipped, we always return TRUE so we
3556 iterate again to have a look at it again. Fixes test suite hang.
3557 Code rearrangement also lets us lose some memset and only iterate
3558 over callbacks once.
3560 * bus/driver.c (bus_driver_handle_message): sense of test for
3563 2003-04-16 Havoc Pennington <hp@pobox.com>
3565 * doc/dbus-specification.sgml: make spec say serials are unsigned
3567 * dbus/dbus-message.h: change message serials to unsigned
3569 * dbus/dbus-connection.c: adapt to message serials being unsigned
3571 2003-04-15 Havoc Pennington <hp@pobox.com>
3573 * bus/bus.c: create and keep around a shared DBusUserDatabase
3576 * bus/connection.c (bus_connection_get_groups): don't cache
3577 groups for user in the connection object, since user database
3578 object now does that.
3580 2003-04-16 Havoc Pennington <hp@redhat.com>
3582 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3583 list of size counters
3584 (_dbus_message_loader_putback_message_link): put back a popped link
3586 * dbus/dbus-connection.c
3587 (dbus_connection_set_max_live_messages_size): rename
3589 (dbus_connection_get_outgoing_size): get size of outgoing
3591 (_dbus_connection_set_connection_counter): remove this cruft
3593 2003-04-14 Havoc Pennington <hp@redhat.com>
3595 * dbus/dbus-userdb.c: user database abstraction, mostly to get
3596 caching, but at some point we might want to be able to use a
3599 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3600 SHA1 conf file to test the sha1 auth mechanism, since the regular
3601 test always uses EXTERNAL when available.
3604 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3605 add conf file that requires use of sha1 auth
3607 2003-04-13 Havoc Pennington <hp@pobox.com>
3609 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3610 from Philip Blundell to send messages and monitor them.
3612 2003-04-13 Havoc Pennington <hp@pobox.com>
3614 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3617 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3620 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3621 fix to only recover unused bytes if we're already authenticated
3622 (_dbus_transport_get_is_authenticated): fix to still mark us
3623 authenticated if there are unused bytes.
3625 * bus/dispatch.c: implement security policy checking
3627 * bus/connection.c (bus_transaction_send_from_driver): new
3629 * bus/bus.c (bus_context_check_security_policy): new
3631 * bus/dispatch.c (send_service_nonexistent_error): delete this,
3632 now we just set the DBusError and it gets converted to an error
3635 * bus/connection.c (allow_user_function): enable code using actual
3636 data from the config file
3638 * bus/policy.c (list_allows_user): handle wildcard rules for
3639 user/group connection perms
3641 2003-04-13 Havoc Pennington <hp@pobox.com>
3643 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3645 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3647 * bus/policy.c (bus_policy_append_mandatory_rule)
3648 (bus_policy_append_default_rule, bus_policy_append_user_rule)
3649 (bus_policy_append_group_rule): new functions
3651 2003-04-12 Havoc Pennington <hp@pobox.com>
3653 * bus/config-parser.c (bus_config_parser_new): fix a memleak
3655 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3656 the pid/gid/uid, just for paranoia.
3658 * test/break-loader.c (randomly_do_n_things): find a byte
3659 containing a type code, and randomly change it to a different
3662 2003-04-12 Havoc Pennington <hp@pobox.com>
3664 * bus/policy.h: change BusPolicy to be the thing from the config
3665 file, and rename old BusPolicy to BusClientPolicy
3667 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3668 match change in how policy works
3670 * dbus/dbus-internals.h: mark assert_not_reached as
3671 __attribute((noreturn))__
3673 2003-04-11 Havoc Pennington <hp@redhat.com>
3675 * doc/dbus-specification.sgml: fix a spot with the wrong name for
3676 the broadcast service. Use boolean return for ServiceExists.
3678 2003-04-11 Havoc Pennington <hp@redhat.com>
3680 * configure.in: add another directory to look for qt in.
3682 2003-04-11 Havoc Pennington <hp@redhat.com>
3684 * AUTHORS: add Colin Walters
3686 2003-04-11 Havoc Pennington <hp@redhat.com>
3692 2003-04-11 Havoc Pennington <hp@redhat.com>
3694 * bus/messagebus.in: remove pid file when stopping the
3695 message bus, since the bus won't have privileges to remove it
3698 2003-04-11 Havoc Pennington <hp@redhat.com>
3700 * bus/bus.c (bus_context_new): move credentials change after
3703 2003-04-11 Havoc Pennington <hp@pobox.com>
3705 * test/decode-gcov.c: add "below average functions" to the
3706 coverage report, and change how some of the code works.
3708 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3709 not in the coverage stats.
3711 * test/test-service.c (main): use _dbus_verbose not fprintf in a
3712 couple places so running the test suite doesn't result in megaspam.
3714 2003-04-11 Havoc Pennington <hp@pobox.com>
3716 * bus/dispatch.c (check_existent_service_activation): accept a no
3717 memory error in a place we didn't before
3719 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3720 in case the first one failed," since the test suite is less
3723 2003-04-10 Havoc Pennington <hp@pobox.com>
3725 * bus/dispatch.c (check_segfault_service_activation): add test
3726 for launching an executable that just crashes.
3728 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3729 don't leave a million cores. We'll see how portable this is.
3731 2003-04-10 Havoc Pennington <hp@pobox.com>
3733 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3734 the possible parent failures before we fork, so that we don't
3735 fail to create a babysitter after creating the child.
3737 * bus/activation.c (bus_activation_activate_service): kill child
3738 if we don't successfully complete the activation.
3740 2003-04-10 Havoc Pennington <hp@redhat.com>
3742 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3743 the connection if it's disconnected
3745 * bus/activation.c (bus_activation_service_created): use new
3746 transaction features to roll back removal of pending activation if
3747 we don't successfully create the service after all. Don't remove
3748 pending activation if the function fails.
3750 * dbus/dbus-list.c (_dbus_list_insert_before_link)
3751 (_dbus_list_insert_after_link): new code to facilitate
3754 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3755 new functionality, so we can preallocate the ability to insert
3758 * bus/connection.c (bus_transaction_add_cancel_hook): new function
3759 allowing us to put custom hooks in a transaction to be used for
3760 cancelling said transaction
3762 * doc/dbus-specification.sgml: add some discussion of secondary
3763 service owners, and disallow zero-length service names
3765 * bus/services.c (bus_registry_acquire_service): new function,
3766 splits out part of bus_driver_handle_acquire_service() and fixes
3767 a bug where we didn't remove the service doing the acquiring
3768 from the secondary queue if we failed to remove the current owner
3769 from the front of the queue.
3771 2003-04-10 Alexander Larsson <alexl@redhat.com>
3773 * doc/dbus-specification.sgml:
3774 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3776 2003-04-10 Alexander Larsson <alexl@redhat.com>
3781 Added files to cvsignore
3783 * dbus/dbus-message.h:
3784 * dbus/dbus-message.c: (dbus_message_iter_get_named):
3785 Make get_named() take two out argument and return a boolean.
3786 (dbus_message_iter_get_args_valist):
3787 Update usage of get_named().
3788 (dbus_message_iter_append_byte):
3790 (dbus_message_iter_append_named)
3792 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3795 2003-04-10 Alexander Larsson <alexl@redhat.com>
3797 * dbus/dbus-marshal.[ch]:
3798 Add array_type_pos argument to _dbus_marshal_validate_arg.
3799 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3801 * dbus/dbus-message.[ch]:
3802 Multi-dimensional arrays have full type specification in the
3803 outermost array. Iter code re-arranged to handle this.
3804 Added some more iter tests.
3806 * doc/dbus-specification.sgml:
3809 Update new array encoding description.
3810 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3812 * test/data/invalid-messages/array-with-mixed-types.message:
3813 * test/data/valid-messages/array-of-array-of-uint32.message:
3814 Change to the new array format.
3816 * test/data/invalid-messages/too-short-dict.message:
3819 * test/data/valid-messages/recursive-types.message:
3820 Fix up and extend test.
3822 2003-04-10 Havoc Pennington <hp@pobox.com>
3824 * bus/dispatch.c: lots of fixes
3826 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3827 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3828 that was crack, broke the test service.
3830 * dbus/dbus-transport.c (_dbus_transport_open): fix error
3831 handling to avoid piling up errors if we get a failure on the
3834 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3835 pid in assertion failures.
3837 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3838 to some fixed size of file descriptor array. Don't return TRUE
3839 anytime a timeout exists, that led to lots of busy loop silliness
3842 2003-04-09 Havoc Pennington <hp@redhat.com>
3844 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3845 I'd checked this in earlier but hadn't.
3847 2003-04-09 Havoc Pennington <hp@redhat.com>
3849 * bus/dispatch.c (bus_dispatch_test): get a bit further through
3850 the activation test (man this is getting old!)
3852 2003-04-09 Havoc Pennington <hp@redhat.com>
3854 * test/test-utils.c: use dispatch status function to fix this up
3856 * bus/connection.c (connection_watch_callback): don't dispatch
3858 (connection_timeout_callback): don't dispatch from here
3859 (bus_connections_setup_connection): set the dispatch status function
3860 (bus_connection_disconnected): unset it
3862 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3863 used to add a connection to be dispatched
3864 (_dbus_loop_iterate): do the dispatching at the end of each
3867 * dbus/dbus-connection.c
3868 (dbus_connection_set_dispatch_status_function): new function
3869 allowing us to fix up main loop usage
3870 (_dbus_connection_last_unref): free all the various function
3872 (dbus_connection_dispatch): call the DispatchStatusFunction
3873 whenever this function returns
3874 (dbus_connection_handle_watch): call DispatchStatusFunction
3875 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3876 (reply_handler_timeout): call DispatchStatusFunction
3877 (dbus_connection_flush): call DispatchStatusFunction
3879 2003-04-09 Havoc Pennington <hp@redhat.com>
3881 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3884 * bus/dispatch.c (check_service_activated): fix bug in test
3886 * dbus/dbus-mainloop.c (check_timeout): fix this up
3888 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3889 verbose output so we can sort out output from different processes,
3890 e.g. in the activation case.
3892 2003-04-08 Colin Walters <walters@gnu.org>
3894 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3896 (bus_context_new): Set it.
3897 (bus_context_unref): Use it to delete the pid file.
3899 2003-04-08 Havoc Pennington <hp@redhat.com>
3901 * test/data/invalid-messages/array-with-mixed-types.message:
3902 regression test that fails for the moment
3904 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3905 tests for convenience
3907 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3908 array of nil, it broke things.
3910 * test/data/invalid-messages/array-of-nil.message: regression test
3912 * test/data/valid-messages/array-of-array-of-uint32.message:
3913 happened to write this so added it to suite
3915 2003-04-08 Havoc Pennington <hp@redhat.com>
3917 * bus/driver.c (bus_driver_handle_acquire_service): init
3918 retval/reply before checking name
3920 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3921 recursion depth argument
3923 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3924 in the public struct for future extension
3926 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3929 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3932 * doc/dbus-specification.sgml: fix typo
3934 2003-04-08 Alexander Larsson <alexl@redhat.com>
3936 Implemented recursive types, named types and new-style iters
3939 * glib/test-thread-client.c: (thread_func):
3940 * glib/test-thread-server.c: (handle_test_message):
3941 * test/test-service.c: (handle_echo):
3950 * dbus/dbus-internals.c: (_dbus_type_to_string):
3951 Update for new types.
3953 * dbus/dbus-marshal.[ch]:
3954 Implement recursive types and the new marshalling format.
3955 Remove hardcoded dict marshalling.
3956 Marshal named types.
3958 * dbus/dbus-message-builder.c:
3960 Remove references to old types
3962 * dbus/dbus-message.[ch]:
3963 New non-refcounted iter API that supports recursive iters.
3964 Use iters for appending, including support for recursive
3966 Add byte and named type support.
3967 Update everything to new marshalling formats.
3968 Add tests for new API.
3970 * dbus/dbus-protocol.h:
3971 Remove old array types.
3972 Add types: BYTE, ARRAY, DICT, NAMED
3974 * dbus/dbus-string.c:
3975 * dbus/dbus-sysdeps.c:
3976 Make parse_double locale safe.
3978 * dbus/dbus-test-main.c:
3984 * doc/dbus-specification.sgml:
3987 * test/data/incomplete-messages/missing-body.message:
3988 * test/data/invalid-messages/bad-boolean.message:
3989 * test/data/invalid-messages/bad-boolean-array.message:
3990 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3991 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3992 * test/data/invalid-messages/too-short-dict.message:
3993 * test/data/valid-messages/dict-simple.message:
3994 * test/data/valid-messages/dict.message:
3995 * test/data/valid-messages/emptiness.message:
3996 * test/data/valid-messages/lots-of-arguments.message:
3997 * test/data/valid-messages/no-padding.message:
3998 * test/data/valid-messages/recursive-types.message:
3999 Add missing NAME fields
4000 Fix up dicts & arrays
4002 * test/data/invalid-messages/dict-with-nil-value.message:
4003 Removed, this is not invalid anymore.
4005 * test/data/valid-messages/recursive-types.message:
4006 Add new test for deeply recursive types.
4008 2003-04-07 Havoc Pennington <hp@pobox.com>
4010 * bus/driver.c (bus_driver_handle_acquire_service): return an
4011 error if you try to acquire a service that starts with ':'
4013 2003-04-07 Havoc Pennington <hp@redhat.com>
4015 * doc/dbus-specification.sgml: require that base service names
4016 start with ':' and that the base service is created/deleted
4017 as first and last things a connection does on the bus
4019 * bus/dispatch.c (check_existent_service_activation): lots more
4020 work on the activation test; it doesn't fully pass yet...
4022 * test/test-service.c (main): fix so we don't memleak the
4023 connection to the message bus
4024 (filter_func): accept a message asking us to exit
4026 2003-04-06 Havoc Pennington <hp@pobox.com>
4028 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4031 * configure.in: fixes to Qt detection from Colin Walters
4033 * doc/Makefile.am: Only remove generated docbook dirs if they
4034 exist, from Colin Walters
4036 * dbus/dbus-bus.c: change how we set well-known connections to
4037 NULL, so that it works if a single connection is stored in
4038 two well-known array slots.
4040 * test/Makefile.am: remove a lot of stuff that isn't immediately
4041 useful, it's in CVS history if we want it.
4043 * test/test-service.c: use dbus-mainloop instead of that
4046 2003-04-06 Havoc Pennington <hp@pobox.com>
4048 * dbus/Makefile.am: split lists of sources into stuff that goes in
4049 the library, util functions that go in the lib and are also used
4050 elsewhere, and util functions that are used in tests/daemon but
4051 don't go in the lib.
4053 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4054 here so it can be used in test binaries also
4056 2003-04-06 Havoc Pennington <hp@pobox.com>
4058 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4059 here in the parent process, so we can return an error if it
4060 fails. Also, move some of the code into the child so the parent
4061 is less hosed if we fail midway through.
4063 * bus/bus.c (bus_context_new): move pidfile detection further up
4064 in the function, before we start overwriting sockets and such.
4066 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4068 * configure.in: add --with-system-pid-file and --with-system-socket
4070 2003-04-06 Colin Walters <walters@verbum.org>
4072 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4074 * bus/system.conf.in: Declare a pidfile.
4076 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4077 create one (if appropriate).
4079 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4080 (struct BusConfigParser) [pidfile]: New.
4081 (element_type_to_name, merge_included, start_busconfig_child)
4082 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4083 (bus_config_parser_unref): Free it.
4084 (bus_config_parser_get_pidfile): New function.
4086 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4088 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4090 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4092 * dbus/dbus-sysdeps.h: Prototype it.
4094 2003-04-06 Havoc Pennington <hp@pobox.com>
4096 * bus/bus.c (bus_context_new): print the address in here, rather
4097 than in main(), because we need to do it before forking the daemon
4099 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4100 on the service nonexistent error
4102 * bus/driver.c (bus_driver_handle_acquire_service): set the
4103 sender on the AcquireService reply
4105 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4106 server also listen on a UNIX socket so services can connect to it.
4108 2003-04-06 Havoc Pennington <hp@pobox.com>
4110 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4111 so it detects deadlocks and also we actually init threads when
4114 2003-04-06 Havoc Pennington <hp@pobox.com>
4116 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4117 save the domain socket name, and unlink it when we disconnect the
4118 server. Means that at least when we exit normally, we won't leave
4119 a bunch of junk in /tmp
4121 * dbus/dbus-transport-unix.c
4122 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4123 memory management). (I was making a real change here but then
4126 2003-04-06 Havoc Pennington <hp@pobox.com>
4128 * bus/bus.c (bus_context_new): fix wrong handling of
4129 server_data_slot_unref() in the error case.
4131 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4132 "(condition) != 0" to _dbus_real_assert so that
4133 "_dbus_assert (pointer)" doesn't cause a warning
4135 * bus/main.c (main): accept --print-address option to print out
4136 the message bus address
4138 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4140 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4141 "tmpdir" option to unix: address on client side
4143 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4146 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4147 we can use to create sockets in the test suite.
4149 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4150 cleanly. To be used for testing.
4152 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4154 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4156 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4157 handle trying to call this when there's no servers active
4159 2003-04-05 Havoc Pennington <hp@pobox.com>
4165 2003-04-05 Havoc Pennington <hp@pobox.com>
4167 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4168 crash on startup. Need to get "try starting the daemon"
4169 in the test suite I guess. ;-)
4171 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4172 tracked the number of open connections; it's better done in
4173 application-specific code as you want it to span all servers etc.
4175 2003-04-05 Havoc Pennington <hp@pobox.com>
4177 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4178 patch from Colin Walters
4180 2003-04-05 Havoc Pennington <hp@pobox.com>
4182 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4183 reality; in fact multiple mechanisms are allowed.
4185 * dbus/dbus-internals.c (_dbus_real_assert)
4186 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4187 _dbus_assert_not_reached() into functions, so that they don't show
4188 up in basic block counts for test coverage, and don't use up as
4189 much disk space. Does mean slower execution speed though, so
4190 assumes --disable-asserts is the normal production case.
4192 2003-04-05 Havoc Pennington <hp@pobox.com>
4194 * test/Makefile.am (dist-hook): also dist *.in files
4200 2003-04-05 Havoc Pennington <hp@pobox.com>
4202 * dbus/dbus-string.c: docs warning
4204 * dbus/dbus-spawn.c: missing docs
4206 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4208 2003-04-05 Havoc Pennington <hp@pobox.com>
4210 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4213 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4214 to -1 once we've reaped the babysitter
4215 (_dbus_babysitter_handle_watch): do as much work as we can, not
4218 * bus/activation.c: add code using DBusBabysitter so that we
4219 handle it when a service fails to start up properly.
4220 (bus_activation_service_created): don't remove the activation
4221 entries as we go, just let them get removed when we free the pending
4222 activation. Unref reply messages after sending them.
4224 2003-04-05 Havoc Pennington <hp@pobox.com>
4226 * test/decode-gcov.c (main): print per-directory stats in the report
4228 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4230 2003-04-05 Havoc Pennington <hp@pobox.com>
4232 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4234 * test/decode-gcov.c: hack up a little program to suck data
4235 out of gcov files. Yes this is sort of silly.
4237 * configure.in: define something in config.h and do an
4238 AM_CONDITIONAL when gcov is enabled
4240 2003-04-04 Havoc Pennington <hp@redhat.com>
4242 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4243 return a "babysitter" object that is used to monitor the status of
4244 the spawned process and reap it when required.
4246 * test/test-segfault.c, test/test-exit.c,
4247 test/test-sleep-forever.c: binaries that do various lame things,
4248 used in the test suite.
4250 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4252 2003-04-03 Havoc Pennington <hp@pobox.com>
4254 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4255 in preparation for modifying it, dbus-sysdeps is getting
4258 2003-04-03 Havoc Pennington <hp@redhat.com>
4260 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4263 * bus/*.[hc]: adapt to mainloop change
4265 2003-04-03 Havoc Pennington <hp@redhat.com>
4267 * bus/activation.c (load_directory): fix up memleaks
4268 (bus_activation_entry_free): free the entry
4270 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4271 we get one from the message bus; fix memleaks.
4273 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4275 2003-04-03 Havoc Pennington <hp@pobox.com>
4277 * bus/config-parser.c (bus_config_parser_unref): free
4278 list of mechanisms, bug discovered by test suite enhancements
4279 (putting system.conf and session.conf into suite)
4281 * test/Makefile.am, test/test-service.c: add placeholder for a
4282 test service that we'll activate as part of test suite. Doesn't
4285 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4286 setting NULL value, and use system malloc not dbus_malloc()
4287 when we have unavoidable memleakage.
4289 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4290 didn't work, and support DBUS_BUS_ACTIVATION.
4292 * bus/activation.c (child_setup): pass our well-known bus type to
4295 * bus/config-parser.c: support <type> to specify well-known type
4297 * doc/dbus-specification.sgml: document the env variables to
4298 locate well-known buses and find service activator
4300 2003-04-02 Havoc Pennington <hp@redhat.com>
4302 * test/Makefile.am (all-local): add a rule to copy tests to
4303 builddir, so we can have generated tests. Use this to remove the
4304 silly hack for testing system.conf and session.conf. Will use this
4305 shortly to generate .service files pointing to test binaries.
4307 2003-04-02 Havoc Pennington <hp@redhat.com>
4309 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4310 current alloc and needed new length, not max of the doubled
4311 allocation and needed new length. Also, when building tests,
4312 don't do the double-allocation stuff, just realloc every time.
4314 2003-04-02 Havoc Pennington <hp@redhat.com>
4316 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4318 (_dbus_string_get_dirname): new
4319 (_dbus_sysdeps_test): new
4320 (_dbus_directory_open): include dirnames in error messages
4322 * bus/config-parser.c: interpret <include> and <includedir> and
4323 <servicedir> relative to config file location if the given
4324 filename is not absolute.
4326 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4328 2003-04-02 Havoc Pennington <hp@redhat.com>
4330 * bus/connection.c (bus_transaction_send_error_reply): set sender
4331 service for the error, and unref the reply on success
4333 * bus/activation.c: convert to use BusTransaction so OOM can be
4335 (bus_activation_service_created): set sender of the message
4337 2003-04-01 Havoc Pennington <hp@redhat.com>
4339 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4340 <includedir> (at least mostly)
4342 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4343 first, then the user ID
4345 2003-04-01 Havoc Pennington <hp@pobox.com>
4347 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4350 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4352 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4354 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4355 socket 0777, and unlink any existing socket.
4357 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4358 the configuration file so specifies; set up auth mechanism
4361 * bus/config-parser.c (bus_config_parser_content): add support
4362 for <fork> option and fill in code for <auth>
4364 * bus/system.conf.in: add <fork/> to default configuration,
4365 and limit auth mechanisms to EXTERNAL
4367 * doc/config-file.txt (Elements): add <fork>
4369 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4370 (_dbus_change_identity): new function
4372 2003-03-31 Havoc Pennington <hp@redhat.com>
4374 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4375 (_dbus_listen_unix_socket): fix off-by-one error in null
4376 termination spotted by Nalin
4378 2003-03-31 Havoc Pennington <hp@redhat.com>
4380 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4381 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4382 having a real home directory available.
4384 2003-03-31 Havoc Pennington <hp@redhat.com>
4386 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4388 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4390 * configure.in: add support for specifying a style of init script
4393 2003-03-31 Havoc Pennington <hp@redhat.com>
4395 Fix some annoying DBusString API and fix all affected code.
4397 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4399 (_dbus_string_get_data): change to return string instead of using
4401 (_dbus_string_get_const_data): ditto
4402 (_dbus_string_get_data_len): ditto
4403 (_dbus_string_get_const_data_len): ditto
4405 2003-03-31 Havoc Pennington <hp@redhat.com>
4407 * bus/main.c (main): fix up the command line arguments to be nicer
4409 2003-03-31 Havoc Pennington <hp@redhat.com>
4411 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4412 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4413 final location that lands in the config file
4415 * bus/config-loader-expat.c (bus_config_load): fix type of
4418 * doc/TODO: remove TODO item for dbus_bus_get()
4420 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4422 2003-03-31 Havoc Pennington <hp@pobox.com>
4424 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4425 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4426 argument since they are always client side
4428 * dbus/dbus-server.c (dbus_server_get_address): new function
4430 * bus/main.c (main): take the configuration file as an argument.
4432 * test/data/valid-config-files/debug-allow-all.conf: new file to
4433 use with dispatch.c tests for example
4435 * bus/test-main.c (main): require test data dir
4437 * bus/bus.c (bus_context_new): change this to take a
4438 configuration file name as argument
4440 * doc/config-file.txt (Elements): add <servicedir>
4442 * bus/system.conf, bus/session.conf: new files
4444 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4445 well-known socket if none set
4447 * configure.in: create system.conf and session.conf
4449 2003-03-30 Havoc Pennington <hp@pobox.com>
4451 * bus/config-parser.c: hacking
4453 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4454 to shut down, since it could cause weirdness with the DBusList
4457 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4458 link-oriented stack routines
4459 (alloc_link): free the mempool if the first alloc from it fails
4461 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4463 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4465 (_dbus_string_skip_white): new
4467 * doc/config-file.txt (Elements): add <includedir>
4469 2003-03-28 Havoc Pennington <hp@pobox.com>
4471 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4472 (_dbus_string_copy_data): new functions
4474 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4476 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4480 * dbus/dbus-memory.c:
4483 2003-03-28 Havoc Pennington <hp@pobox.com>
4485 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4486 I think it may have just been superstition. Not sure.
4488 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4489 failures that were not being handled.
4491 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4493 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4494 row that will fail on out-of-memory.
4496 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4497 function for testing out-of-memory handling.
4499 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4500 allocation functions, they do map exactly to the expat ones.
4502 2003-03-27 Havoc Pennington <hp@redhat.com>
4504 * bus/config-loader-libxml.c (bus_config_load): add another error
4507 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4510 Add note about automatic service activation.
4512 * doc/dbus-specification.sgml:
4513 Rename the specification and clarify a few things.
4515 2003-03-26 Anders Carlsson <andersca@codefactory.se>
4518 * dbus/dbus-address.c:
4520 * dbus/dbus-marshal.c:
4521 * dbus/dbus-server-debug-pipe.c:
4522 * dbus/dbus-transport-unix.c:
4523 Fix documentation warnings.
4525 2003-03-26 Havoc Pennington <hp@pobox.com>
4527 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4528 after every test so it's quick and easy to see which leaked, and
4529 so we test multiple dbus_shutdown() calls
4531 * configure.in: change configure.in XML stuff to also support
4534 * config-loader-libxml.c: some hacking
4536 * config-loader-expat.c: some hacking
4538 * config-parser.c: some hacking, plus tests
4540 2003-03-25 Havoc Pennington <hp@redhat.com>
4542 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4544 * configure.in: add --with-xml option to specify XML library,
4545 right now only libxml is supported.
4547 * bus/config-loader-libxml.c, config-parser.c: sync some minor
4548 nonworking code between home and work, still just stubs
4550 2003-03-24 Havoc Pennington <hp@redhat.com>
4552 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4555 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4556 NULL argument for "message" if the error is a well-known one,
4557 fill in a generic message in this case.
4559 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4562 * bus/test.c (bus_test_flush_bus): add
4564 * bus/policy.c (bus_policy_test): test code stub
4566 2003-03-24 Havoc Pennington <hp@pobox.com>
4568 * bus/connection.c (bus_connections_setup_connection): set up
4569 the "can this user connect" function, but it always returns
4570 TRUE until we have a config file parser so we can have a config
4571 file that allows connections.
4573 2003-03-23 Havoc Pennington <hp@pobox.com>
4575 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4576 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4577 the mutex, so we can check for proper memory management
4580 * dbus/dbus-dataslot.c: remove the mutex from
4581 DBusDataSlotAllocator and lock it manually when using it,
4582 to simplify fitting it into the global slots framework.
4584 * dbus/dbus-threads.c (init_static_locks): rework how we're
4585 handling global locks so they are easily shut down.
4587 * bus/policy.c (bus_policy_append_rule): fix
4589 * bus/test-main.c (main): check for memleaks
4591 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4592 test suite check for memleaks
4594 * dbus/dbus-memory.c: add support in test mode for tracking
4595 number of outstanding blocks
4597 2003-03-23 Havoc Pennington <hp@pobox.com>
4599 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4602 * dbus/dbus-hash.h: add ULONG hash keys
4604 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4605 (_dbus_get_group_id): new function
4607 2003-03-20 Havoc Pennington <hp@redhat.com>
4609 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4611 (dbus_connection_get_unix_user): new function
4613 2003-03-20 Havoc Pennington <hp@pobox.com>
4615 * bus/connection.c (bus_connection_send_oom_error): assert that
4616 message has a sender
4617 (connection_execute_transaction): ditto
4618 (bus_connection_preallocate_oom_error): fix to set the sender, and
4619 set recipient to the destination service, not the bus driver
4621 * bus/policy.c: hacking
4623 * dbus/dbus-message.c (dbus_message_service_is): new function
4624 (dbus_message_sender_is): new
4626 2003-03-19 Havoc Pennington <hp@redhat.com>
4628 * bus/policy.c: start sketching code for policy restrictions on
4629 what connections can do.
4631 2003-03-18 Havoc Pennington <hp@redhat.com>
4633 * doc/TODO: some notes on high-level todo items. Little nitpick
4634 stuff is all in @todo, so no need to add it here.
4636 * doc/config-file.txt: some notes on how config file might look
4638 2003-03-18 Anders Carlsson <andersca@codefactory.se>
4644 2003-03-17 Havoc Pennington <hp@redhat.com>
4646 * dbus/dbus-internals.h: add gcc attributes so that
4647 our printf-style functions warn on bad arguments to
4650 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4653 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4656 2003-03-17 Havoc Pennington <hp@redhat.com>
4658 * bus/test-main.c (main): make it print something as it runs
4659 so make check doesn't look stuck
4661 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4662 from CVS, now obsolete
4664 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4666 * bus/dispatch.c: (bus_dispatch):
4667 Refetch the service name since it may have been reallocated
4668 when dbus_message_set_sender was called.
4670 * dbus/dbus-sysdeps.c: (_dbus_accept):
4671 Add address and address length variables and use them to stop
4672 valgrind from complaining.
4674 2003-03-17 Havoc Pennington <hp@pobox.com>
4676 All tests pass, no memleaks, no valgrind complaints.
4678 * bus/test.c: refcount handler_slot
4680 * bus/connection.c (bus_connections_new): refcount
4681 connection_data_slot
4683 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4684 bytes so that auth scripts pass.
4686 * bus/dispatch.c: init message_handler_slot so it gets allocated
4689 * bus/dispatch.c (message_handler_slot_ref): fix memleak
4691 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4692 dealloc server_pipe_hash when no longer used for benefit of
4695 * dbus/dbus-auth.c (process_command): memleak fix
4697 * bus/dispatch.c (check_hello_message): memleak fix
4699 2003-03-16 Havoc Pennington <hp@pobox.com>
4701 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4703 2003-03-17 Anders Carlsson <andersca@codefactory.se>
4705 * bus/activation.c (bus_activation_activate_service): Append
4706 the pending activation entry to the list of pending activations.
4708 2003-03-16 Havoc Pennington <hp@pobox.com>
4710 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4713 * dbus/dbus-address.c (create_entry): fix OOM handling when
4714 failing to alloc entry->method
4716 2003-03-16 Havoc Pennington <hp@pobox.com>
4718 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4721 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4722 add some missing dbus_set_result
4724 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4725 alloc the DBusMessageHandler
4727 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4728 the transport here, since we call this from the finalizer; it
4729 resulted in a double-finalize.
4731 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4732 where we tried to use transport->connection that was NULL,
4733 happened when transport was disconnected early on due to OOM
4735 * bus/*.c: adapt to handle OOM for watches/timeouts
4737 * dbus/dbus-transport-unix.c: port to handle OOM during
4740 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4741 reference to unused bytes instead of a copy
4743 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4746 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4749 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4752 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4754 * doc/dbus-specification.sgml:
4755 Document reply message for ActivateService.
4757 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4759 * bus/activation.c: (bus_pending_activation_entry_free),
4760 (bus_pending_activation_free), (bus_activation_new),
4761 (bus_activation_unref), (bus_activation_service_created),
4762 (bus_activation_activate_service):
4764 * bus/bus.c: (bus_context_new):
4765 * bus/desktop-file.c: (new_section):
4766 * bus/driver.c: (bus_driver_send_service_deleted),
4767 (bus_driver_handle_activate_service):
4768 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4770 * dbus/dbus-connection.c:
4771 (dbus_connection_send_with_reply_and_block):
4772 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4773 * dbus/dbus-protocol.h:
4774 Make activation work better. Now pending activations will be queued
4775 and the daemon won't try to activate services that are already registered.
4777 2003-03-16 Havoc Pennington <hp@pobox.com>
4779 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4782 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4783 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4785 2003-03-16 Havoc Pennington <hp@pobox.com>
4787 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4788 this. always run the test suite before commit...
4790 * bus/*: adapt to DBusConnection API changes
4792 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4793 requires renaming stuff to avoid dbus_connection_dispatch name
4796 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4799 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4800 separate from _dbus_message_loader_return_buffer()
4802 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4803 this, because it's now always broken to use; the number of
4804 messages in queue vs. the number still buffered by the message
4805 loader is undefined/meaningless. Should use
4806 dbus_connection_get_dispatch_state().
4807 (dbus_connection_dispatch): rename from
4808 dbus_connection_dispatch_message
4810 2003-03-16 Havoc Pennington <hp@pobox.com>
4812 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4815 2003-03-16 Anders Carlsson <andersca@codefactory.se>
4817 * dbus/dbus-connection.c:
4818 (dbus_connection_send_with_reply_and_block):
4819 Decrease connection->n_incoming when removing an entry
4821 * dbus/dbus-dict.c: (dbus_dict_entry_free),
4822 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4823 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4824 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4825 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4826 (dbus_dict_get_byte_array):
4827 Handle NULL arrays and strings. Also add support for byte arrays.
4829 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4830 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4831 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4832 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4833 (_dbus_demarshal_dict), (demarshal_and_validate_len),
4834 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4835 * dbus/dbus-marshal.h:
4836 Add support for marshalling and demarshalling empty arrays and strings.
4838 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4839 (dbus_message_append_string_array),
4840 (dbus_message_iter_get_boolean),
4841 (dbus_message_iter_get_boolean_array),
4842 (dbus_message_iter_get_int32_array),
4843 (dbus_message_iter_get_uint32_array),
4844 (dbus_message_iter_get_double_array),
4845 (dbus_message_iter_get_byte_array),
4846 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4847 (check_message_handling):
4848 Add support for getting empty arrays and dicts.
4850 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4851 Don't do any validation at all for now, that's better than just checking
4854 * test/data/valid-messages/emptiness.message:
4855 New test message with lots of empty arrays.
4857 2003-03-16 Havoc Pennington <hp@pobox.com>
4859 * dbus/dbus-connection.c
4860 (_dbus_connection_queue_received_message_link): new function that
4861 can't fail due to OOM
4863 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4864 new function pops a message together with a list link
4867 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4868 message queuing functions to avoid needing to alloc memory
4870 2003-03-16 Havoc Pennington <hp@pobox.com>
4872 Oops - test code was only testing failure of around 30 of the
4873 mallocs in the test path, but it turns out there are 500+
4874 mallocs. I believe this was due to misguided linking setup such
4875 that there was one copy of dbus_malloc etc. in the daemon and one
4876 in the shared lib, and only daemon mallocs were tested. In any
4877 case, the test case now tests all 500+ mallocs, and doesn't pass
4878 yet, though there are lots of fixes in this patch.
4880 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4881 this so that it doesn't need to allocate memory, since it
4882 has no way of indicating failure due to OOM (and would be
4883 annoying if it did).
4885 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4887 * bus/Makefile.am: rearrange to create two self-contained
4888 libraries, to avoid having libraries with overlapping symbols.
4889 that was resulting in weirdness, e.g. I'm pretty sure there
4890 were two copies of global static variables.
4892 * dbus/dbus-internals.c: move the malloc debug stuff to
4895 * dbus/dbus-list.c (free_link): free list mempool if it becomes
4898 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4900 * dbus/dbus-address.c (dbus_parse_address): free list nodes
4903 * bus/dispatch.c (bus_dispatch_add_connection): free
4904 message_handler_slot when no longer using it, so
4905 memory leak checkers are happy for the test suite.
4907 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4909 * bus/bus.c (new_connection_callback): disconnect in here if
4910 bus_connections_setup_connection fails.
4912 * bus/connection.c (bus_connections_unref): fix to free the
4914 (bus_connections_setup_connection): if this fails, don't
4915 disconnect the connection, just be sure there are no side
4918 * dbus/dbus-string.c (undo_alignment): unbreak this
4920 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4922 (_dbus_auth_new): fix the order in which we free strings
4925 * bus/connection.c (bus_connection_disconnected): fix to
4926 not send ServiceDeleted multiple times in case of memory
4929 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4930 get the base service name
4931 (dbus_bus_register_client): don't return base service name,
4932 instead store it on the DBusConnection and have an accessor
4934 (dbus_bus_register_client): rename dbus_bus_register()
4936 * bus/dispatch.c (check_hello_message): verify that other
4937 connections on the bus also got the correct results, not
4938 just the one sending hello
4940 2003-03-15 Havoc Pennington <hp@pobox.com>
4942 Make it pass the Hello handling test including all OOM codepaths.
4943 Now to do other messages...
4945 * bus/services.c (bus_service_remove_owner): fix crash when
4946 removing owner from an empty list of owners
4947 (bus_registry_ensure): don't leave service in the list of
4948 a connection's owned services if we fail to put the service
4951 * bus/connection.c (bus_connection_preallocate_oom_error): set
4952 error flag on the OOM error.
4954 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4955 handle _dbus_transport_set_connection failure
4957 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4958 to create watches up front and simply enable/disable them as
4960 (unix_connection_set): this can now fail on OOM
4962 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4963 of enabling/disabling a watch or timeout.
4965 * bus/loop.c (bus_loop_iterate): don't touch disabled
4968 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4970 2003-03-15 Havoc Pennington <hp@pobox.com>
4972 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4973 write useful test code, after all that futzing around ;-)
4975 Test does not yet pass because we can't handle OOM in
4976 _dbus_transport_messages_pending (basically,
4977 dbus_connection_preallocate_send() does not prealloc the write
4978 watch). To fix this, I think we need to add new stuff to
4979 set_watch_functions, namely a SetEnabled function so we can alloc
4980 the watch earlier, then enable it later.
4982 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4983 dbus-memory.c to the convenience lib
4985 * bus/test.c: rename some static functions to keep them clearly
4986 distinct from stuff in connection.c. Handle client disconnection.
4988 2003-03-14 Havoc Pennington <hp@pobox.com>
4990 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4991 transport, tests more of the real codepath. Set up clients
4992 with bus_setup_debug_client.
4994 * bus/test.c (bus_setup_debug_client): function to set up debug
4995 "clients" on the main loop
4997 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5000 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5003 * dbus/dbus-server-debug.c: support a debug server based on pipes
5005 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5006 (_dbus_close): new function
5008 * configure.in: check for socketpair
5010 2003-03-14 Havoc Pennington <hp@redhat.com>
5012 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5015 * dbus/dbus-transport-debug.c: rework this a good bit to be
5016 less complicated. hopefully still works.
5018 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5021 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5024 * dbus/dbus-message.c (dbus_message_copy): rename from
5025 dbus_message_new_from_message, fix it up to copy
5026 all the message fields, add test case
5028 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5029 not quite passing yet
5031 2003-03-14 Havoc Pennington <hp@pobox.com>
5033 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5034 until no work remains" in test code. (the large diff here
5035 is just code movement, no actual changes)
5037 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5038 1, no point waiting around for test code.
5039 (_dbus_server_debug_accept_transport): unref the timeout
5040 after adding it (right?)
5042 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5044 2003-03-13 Havoc Pennington <hp@redhat.com>
5046 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5049 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5052 * dbus/dbus-connection.h: Make AddWatchFunction and
5053 AddTimeoutFunction return a bool so they can fail on out-of-memory
5055 * bus/bus.c (bus_context_new): set up timeout handlers
5057 * bus/connection.c (bus_connections_setup_connection): set up
5060 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5063 * bus/bus.c (bus_context_new): adapt to changes
5065 * bus/connection.c: adapt to changes
5067 * test/watch.c: adapt to DBusWatch changes
5069 * bus/dispatch.c (bus_dispatch_test): started adding this but
5072 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5074 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5076 2003-03-13 Havoc Pennington <hp@pobox.com>
5078 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5079 set up a test framework as for the library
5081 2003-03-12 Havoc Pennington <hp@pobox.com>
5083 Throughout: purge global variables, introduce BusActivation,
5084 BusConnections, BusRegistry, etc. objects instead.
5086 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5089 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5090 going to redo this a bit differently I think
5092 2003-03-12 Havoc Pennington <hp@redhat.com>
5094 Mega-patch that gets the message bus daemon initially handling
5095 out-of-memory. Work still needed. Also lots of random
5096 moving stuff to DBusError instead of ResultCode.
5098 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5100 * dbus/dbus-connection.c
5101 (dbus_connection_send_with_reply_and_block): use DBusError
5103 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5106 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5107 code here, as the only failure possible is OOM.
5109 * bus/connection.c (bus_connection_disconnect):
5110 rename bus_connection_disconnected as it's a notification only
5112 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5113 "name" on get_args failure, should be done by get_args;
5114 don't disconnect client for bad args, just return an error.
5115 (bus_driver_handle_service_exists): ditto
5117 * bus/services.c (bus_services_list): NULL-terminate returned array
5119 * bus/driver.c (bus_driver_send_service_lost)
5120 (bus_driver_send_service_acquired): send messages from driver to a
5121 specific client to the client's unique name, not to the broadcast
5124 * dbus/dbus-message.c (decode_header_data): reject messages that
5125 contain no name field
5126 (_dbus_message_get_client_serial): rename to
5127 dbus_message_get_serial and make public
5128 (_dbus_message_set_serial): rename from set_client_serial
5129 (_dbus_message_set_reply_serial): make public
5130 (_dbus_message_get_reply_serial): make public
5132 * bus/connection.c (bus_connection_foreach): allow stopping
5133 iteration by returning FALSE from foreach function.
5135 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5136 (dbus_connection_free_preallocated_send)
5137 (dbus_connection_preallocate_send): new API for sending a message
5138 without possibility of malloc failure.
5139 (dbus_connection_send_message): rename to just
5140 dbus_connection_send (and same for whole function family)
5142 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5144 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5146 * bus/activation.c: handle/return errors
5148 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5150 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5151 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5152 (_dbus_result_from_errno): move to this file
5154 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5156 * dbus/dbus-marshal.c:
5157 (_dbus_marshal_set_string):
5158 Take a length argument so we can marshal the correct string
5161 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5162 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5163 (_dbus_marshal_test):
5164 * dbus/dbus-marshal.h:
5165 Add support for marshalling and demarshalling dicts.
5167 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5168 Add support for TYPE DICT.
5170 * dbus/dbus-message.c: (set_string_field):
5171 Adjust header padding.
5173 (dbus_message_append_args_valist), (dbus_message_append_dict),
5174 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5175 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5176 (check_message_handling), (check_have_valid_message):
5177 * dbus/dbus-message.h:
5178 Add functions for setting and getting dicts.
5180 * dbus/dbus-protocol.h:
5186 * doc/dbus-specification.sgml:
5187 Add information about how dicts are marshalled.
5189 * test/data/invalid-messages/dict-with-nil-value.message:
5190 * test/data/invalid-messages/too-short-dict.message:
5191 * test/data/valid-messages/dict-simple.message:
5192 * test/data/valid-messages/dict.message:
5193 Add sample messages containing dicts.
5195 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5197 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5199 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5202 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5203 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5204 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5205 (dbus_dict_set_double), (dbus_dict_set_string),
5206 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5207 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5208 (dbus_dict_set_string_array), (_dbus_dict_test):
5210 Fix according to comments from Havoc.
5212 2003-03-06 Michael Meeks <michael@server.home>
5214 * configure.in: if we don't have kde-config, disable have_qt.
5216 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5221 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5222 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5223 (dbus_dict_remove), (dbus_dict_get_value_type),
5224 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5225 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5226 (dbus_dict_put_double), (dbus_dict_put_string),
5227 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5228 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5229 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5230 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5231 (dbus_dict_get_double), (dbus_dict_get_string),
5232 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5233 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5234 (dbus_dict_get_string_array), (_dbus_dict_test):
5236 Add DBusDict implementation
5238 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5242 2003-03-04 Havoc Pennington <hp@pobox.com>
5244 * test/data/auth/*: adapt to changes
5246 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5247 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5250 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5251 more stuff from being in a context name, to make the protocol
5252 simpler to deal with
5254 * dbus/dbus-errors.c (dbus_error_has_name): new function
5255 (dbus_error_is_set): new function
5257 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5258 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5260 * dbus/dbus-connection.c (dbus_connection_flush): also read
5261 messages during a flush operation
5263 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5265 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5267 * configure.in: Check for gethostbyname on Solaris.
5269 * dbus/dbus-transport.c: (_dbus_transport_open):
5270 Remove duplicate "tcp" entry.
5272 * doc/dbus-specification.sgml:
5273 Clarify some things.
5275 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5277 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5278 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5279 (_dbus_keyring_test):
5280 * dbus/dbus-md5.c: (_dbus_md5_compute):
5281 * dbus/dbus-sha.c: (_dbus_sha_compute):
5284 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5286 * README: Add some things.
5288 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5290 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5291 after case DBUS_TYPE_BOOELAN.
5293 2003-03-02 Havoc Pennington <hp@pobox.com>
5295 * test/break-loader.c (randomly_set_extreme_ints): add test that
5296 sets really huge and small integers
5298 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5299 that length of boolean array fits in the string, and that
5300 string has room for boolean value in single-bool case.
5302 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5303 optional value to "ALIGN" command which is what to fill the
5306 * test/data/valid-messages/no-padding.message: add regression
5307 test for the message padding problem
5309 2003-03-02 Havoc Pennington <hp@pobox.com>
5311 * dbus/dbus-message.c (decode_header_data): fix to always init
5312 message_padding, from Benjamin Dauvergne
5314 2003-03-02 Havoc Pennington <hp@pobox.com>
5320 2003-03-01 Joe Shaw <joe@assbarn.com>
5322 * configure.in: Check for "struct cmsgcred" and try to access its
5323 members for BSD-like unices.
5325 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5326 _dbus_read_credentials_unix_socket().
5327 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5328 read() for reading the credential byte off the unix socket. Use
5329 struct cmsgcred on systems that support it.
5331 2003-02-27 Alexander Larsson <alexl@redhat.com>
5335 Make gthreads-2.0 dependency optional. Don't build thread test if
5338 2003-02-27 Havoc Pennington <hp@pobox.com>
5340 * dbus/dbus-connection.c
5341 (dbus_connection_send_message_with_reply_and_block): fix doh!
5342 doh! doh! bug that resulted in never removing a reply from the
5343 queue, no wonder we called get_reply_serial so much ;-)
5345 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5346 and client serial instead of demarshaling them every time
5348 2003-02-27 Havoc Pennington <hp@pobox.com>
5350 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5351 more inlined, using dbus-string-private.h, speeds things up
5354 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5355 when freeing the string
5356 (_dbus_string_steal_data): fix for align offset
5357 (undo_alignment): new function
5359 2003-02-26 Havoc Pennington <hp@redhat.com>
5361 All kinds of audit fixes from Owen, plus initial attempt to
5362 handle unaligned memory returned from malloc.
5364 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5365 leave room for align_offset and nul byte
5366 (fixup_alignment): function to track an align_offset and
5367 ensure real->str is aligned
5368 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5369 to allow a nul byte plus align offset
5370 (_dbus_string_lock): fix overflow issue
5371 (_dbus_string_init_const_len): add assertions on sanity of len,
5372 assign allocated to be ALLOCATION_PADDING larger than len
5373 (set_length): fixup the overflow handling
5374 (_dbus_string_get_data_len): fix overflow in assertion
5375 (open_gap): detect overflow in size of gap to be opened
5376 (_dbus_string_lengthen): add overflow check
5377 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5378 (_dbus_string_append): add overflow check
5379 (_dbus_string_append_unichar): overflow
5380 (_dbus_string_delete): fix overflow in assertion
5381 (_dbus_string_copy_len): overflow in assertion
5382 (_dbus_string_replace_len): overflows in assertions
5383 (_dbus_string_find): change to implement in terms of
5384 _dbus_string_find_to
5385 (_dbus_string_find_to): assorted fixage
5386 (_dbus_string_equal_c_str): assert c_str != NULL,
5387 fix logic so the function works
5388 (_dbus_string_ends_with_c_str): fix overflow thingy
5389 (_dbus_string_base64_encode): overflow fix
5390 (_dbus_string_validate_ascii): overflow
5391 (_dbus_string_validate_nul): overflow
5393 2003-02-26 Havoc Pennington <hp@redhat.com>
5395 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5397 2003-02-26 Alexander Larsson <alexl@redhat.com>
5400 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5402 * dbus/dbus-connection.c:
5403 * dbus/dbus-connection.h:
5404 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5405 Add dbus_connection_set_wakeup_main_function and use it when queueing
5406 incoming and outgoing messages.
5409 * dbus/dbus-dataslot.c:
5410 Threadsafe usage of DBusDataSlotAllocator
5412 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5415 * dbus/dbus-server-unix.c:
5418 * glib/dbus-gmain.c:
5419 Implement the new wakeup functions for glib.
5422 * glib/test-thread-client.c:
5423 * glib/test-thread-server.c:
5424 * glib/test-thread.h:
5425 Initial cut at some thread test code. Not really done yet.
5427 2003-02-26 Havoc Pennington <hp@pobox.com>
5429 * dbus/dbus-connection.c
5430 (dbus_connection_send_message_with_reply_and_block): fix crash
5431 where we ref'd the outgoing message instead of the returned reply
5433 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5434 at the end of this function, so if we didn't need to read for
5435 authentication, we reinstall it for receiving messages
5437 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5438 a NULL sender for peer-to-peer case
5440 * dbus/dbus-transport-unix.c (check_read_watch): handle
5441 !authenticated case correctly
5443 * glib/dbus-gmain.c: add support for DBusServer
5445 * dbus/dbus-server.c: add data slot support
5447 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5448 return values and handle errors
5450 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5453 * Doxyfile.in (INPUT): add glib subdir
5455 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5456 setup_with_g_main instead of hookup_with_g_main; write docs
5458 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5460 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5461 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5462 * dbus/dbus-message.c: (dbus_message_append_boolean),
5463 (dbus_message_append_boolean_array),
5464 (dbus_message_get_args_valist), (_dbus_message_test):
5465 * dbus/dbus-message.h:
5466 * doc/dbus-specification.sgml:
5467 Various fixes as pointed out by Havoc.
5469 * test/data/invalid-messages/bad-boolean-array.message:
5470 * test/data/invalid-messages/bad-boolean.message:
5471 Add invalid boolean value test cases.
5473 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5475 * dbus/dbus-internals.c: (_dbus_type_to_string):
5476 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5477 (_dbus_marshal_validate_arg):
5478 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5479 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5480 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5481 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5482 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5483 (dbus_message_iter_get_double),
5484 (dbus_message_iter_get_boolean_array), (message_iter_test):
5485 * dbus/dbus-message.h:
5486 * dbus/dbus-protocol.h:
5487 * doc/dbus-specification.sgml:
5488 * test/data/valid-messages/lots-of-arguments.message:
5489 Add support for boolean and boolean array types.
5491 2003-02-23 Havoc Pennington <hp@pobox.com>
5493 * dbus/dbus-keyring.c: finish most of this implementation and
5496 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5497 these barf if the error isn't cleared to NULL
5499 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5500 (_dbus_create_directory): new function
5502 * dbus/dbus-errors.c (dbus_set_error): fix warning
5504 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5505 (_dbus_string_hex_decode): new function
5506 (test_hex_roundtrip): test code
5508 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5510 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5512 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5513 the save-to-temp/rename trick to atomically write the new file
5514 (_dbus_string_parse_uint): new function
5516 2003-02-22 Havoc Pennington <hp@pobox.com>
5518 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5520 2003-02-22 Havoc Pennington <hp@pobox.com>
5522 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5523 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5525 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5527 * dbus/test/data/sha-1: add US government test suite for SHA-1
5529 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5531 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5532 Make string arrays NULL-terminated.
5534 * dbus/dbus-memory.c: (dbus_free_string_array):
5535 * dbus/dbus-memory.h:
5536 New function for freeing NULL-terminated string arrays.
5538 * dbus/dbus-message-builder.c: (append_quoted_string),
5539 (_dbus_message_data_load):
5540 Add support for array types.
5542 * dbus/dbus-message.c: (check_message_handling):
5543 Add more types as test cases.
5545 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5546 (_dbus_string_parse_double):
5547 Add the start offset to the end offset.
5549 * test/data/valid-messages/lots-of-arguments.message:
5550 New test message with lots of arguments.
5552 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5554 * dbus/dbus-message.c: (dbus_message_append_nil),
5555 (dbus_message_append_int32), (dbus_message_append_uint32),
5556 (dbus_message_append_double), (dbus_message_append_string),
5557 (dbus_message_append_int32_array),
5558 (dbus_message_append_uint32_array),
5559 (dbus_message_append_double_array),
5560 (dbus_message_append_byte_array),
5561 (dbus_message_append_string_array):
5562 Fix all out-of-memory handling in these functions.
5564 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5566 * dbus/dbus-message.c: (dbus_message_append_nil):
5569 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5571 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5572 (dbus_message_append_nil), (dbus_message_append_int32_array),
5573 (dbus_message_append_uint32_array),
5574 (dbus_message_append_double_array),
5575 (dbus_message_append_byte_array),
5576 (dbus_message_append_string_array), (dbus_message_get_args_valist),
5577 (dbus_message_iter_get_int32_array),
5578 (dbus_message_iter_get_uint32_array),
5579 (dbus_message_iter_get_double_array),
5580 (dbus_message_iter_get_byte_array),
5581 (dbus_message_iter_get_string_array):
5583 * dbus/dbus-message.h:
5584 Add functions for appending and getting arrays.
5586 2003-02-21 Anders Carlsson <andersca@codefactory.se>
5588 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5589 element size at least 8 bytes, fixes mempool tests on
5592 2003-02-20 Alexander Larsson <alexl@redhat.com>
5594 * dbus/dbus-transport-unix.c (unix_do_iteration):
5595 Unlock the connection mutex during a blocking select call.
5596 Add todo about how we need a way to wake up the select.
5598 * dbus/dbus-connection-internal.h:
5599 * dbus/dbus-connection.c:
5600 Add _dbus_connection_lock and _dbus_connection_unlock.
5602 2003-02-19 Havoc Pennington <hp@pobox.com>
5604 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5605 Doxyfile.in, not Doxyfile
5607 * dbus/dbus-keyring.c: do some hacking on this
5609 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5611 * dbus/dbus-errors.c (dbus_set_error_const): do not call
5613 (dbus_set_error): remove dbus_error_init, check for message ==
5614 NULL *before* we sprintf into it, and add @todo about including
5615 system headers in this file
5617 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5619 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5621 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5622 get various bits of user information based on either username
5624 (_dbus_homedir_from_username): new function
5626 2003-02-19 Anders Carlsson <andersca@codefactory.se>
5629 Add check for nonposix getpwnam_r
5631 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5632 Align the pool element size to a sizeof (void *) boundary.
5634 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5635 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5636 General Solaris fixes.
5638 * test/data/valid-messages/simplest-manual.message:
5639 Explicitly state that we want little-endian packing.
5641 2003-02-19 Mikael Hallendal <micke@codefactory.se>
5643 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5645 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5646 Added to create a transport connecting using a tcp/ip socket.
5648 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5649 to a tcp socket at given host and port.
5650 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5653 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5655 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5656 Added to create a server listening on a TCP/IP socket.
5658 2003-02-19 Havoc Pennington <hp@pobox.com>
5660 Throughout: mop up all the Doxygen warnings and undocumented
5663 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5664 to search any paths.
5666 * dbus/dbus-threads.c: move global mutex initializers to
5667 dbus-internals.h, multiple prototypes was confusing doxygen
5668 besides being kind of ugly
5670 * Doxyfile (PREDEFINED): have Doxygen define
5671 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5672 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5673 (do not abuse the feature! it's for stuff like the autogenerated
5674 macros in dbus-md5.c, not just for things you don't feel like
5677 2003-02-18 Havoc Pennington <hp@pobox.com>
5679 * dbus/dbus-string.c (_dbus_string_zero): new function
5681 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5682 wrap it in some dbus-friendly API
5684 * dbus/dbus-types.h: add 16-bit types
5686 2003-02-18 Joe Shaw <joe@assbarn.com>
5688 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5689 credentials from our currently running process.
5690 (get_word): Fix a buglet where we were copying the entire length
5691 instead of relative to our position.
5693 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5694 keys on the stack... it's 640k of data.
5696 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5697 read the credentials byte off the socket, even if we don't have
5699 (_dbus_poll): Implement poll() using select() for systems which
5702 * glib/test-dbus-glib.c (main): Print out an error if no
5703 parameters are given.
5705 * test/data/auth/fallback.auth-script: Added. Tests that a client
5706 can fallback to a secondary auth mechanism if the first fails.
5708 2003-02-18 Havoc Pennington <hp@pobox.com>
5712 2003-02-17 Havoc Pennington <hp@pobox.com>
5714 * doc/dbus-specification.sgml: lots of cosmetic
5715 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5716 env variable to DBUS_BUS_ADDRESS, s/client/application/,
5717 s/server/bus/ (except in authentication section). Add a section
5718 "Message Bus Message Routing"
5720 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
5726 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5728 * doc/dbus-specification.sgml:
5729 Specification updates.
5731 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5733 * bus/activation.c: (bus_activation_init), (child_setup),
5734 (bus_activation_activate_service):
5736 * bus/main.c: (main):
5737 Set DBUS_ADDRESS environment variable.
5739 * dbus/dbus-errors.c: (dbus_set_error):
5740 Don't use va_copy since that's a C99 feature.
5742 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5743 (_dbus_spawn_async):
5744 * dbus/dbus-sysdeps.h:
5745 Add child_setup_func to _dbus_spawn_async.
5747 * doc/dbus-specification.sgml:
5748 Update specification.
5750 * test/spawn-test.c: (setup_func), (main):
5753 2003-02-17 Alexander Larsson <alexl@redhat.com>
5755 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5758 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5762 * doc/dbus-test-plan.sgml:
5763 Add test plan document.
5768 2003-02-17 Anders Carlsson <andersca@codefactory.se>
5770 * dbus/dbus-message.c: (decode_header_data),
5771 (_dbus_message_loader_return_buffer):
5772 Set the header padding amount when loading a message.
5774 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5776 * bus/dispatch.c: (send_one_message):
5777 Only send broadcast messages to registered connections.
5779 * dbus/dbus-message.c: (dbus_message_name_is):
5780 * dbus/dbus-message.h:
5781 New convenience function.
5783 * dbus/dbus-transport-debug.c: (do_reading):
5784 Only dispatch one message per run.
5787 * test/bus-test.c: (new_connection_callback), (die),
5788 (test_hello_client1_handler), (test_hello_client2_handler),
5789 (test_hello_replies), (main):
5791 * test/bus-test-loop.[ch]:
5794 2003-02-16 Havoc Pennington <hp@pobox.com>
5796 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5797 backward conditional
5799 2003-02-16 Alexander Larsson <alexl@redhat.com>
5801 * dbus/dbus-connection.c:
5802 Implement sent_message_with_reply. (with_reply_and block is still
5804 Made dispatch_message not lose message if OOM.
5806 * dbus/dbus-errors.h:
5807 Add NoReply error (for reply timeouts).
5809 2003-02-16 Alexander Larsson <alexl@redhat.com>
5811 * dbus/dbus-hash.c (_dbus_hash_table_unref):
5812 Actually free keys and values when destroying hashtable.
5814 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5816 * dbus/dbus-auth.c: (client_try_next_mechanism):
5819 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5820 Return TRUE if there's no thread implementation around.
5822 * glib/dbus-gmain.c: (free_source),
5823 (dbus_connection_hookup_with_g_main):
5824 Make sure to remove the GSource when the connection is finalized.
5826 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5828 * bus/dispatch.c: (bus_dispatch_message_handler):
5829 * dbus/dbus-errors.h:
5830 Return an error if someone tries to send a message to a service
5833 2003-02-16 Anders Carlsson <andersca@codefactory.se>
5835 * bus/activation.c: (load_directory), (bus_activation_init),
5836 (bus_activation_activate_service):
5839 (bus_driver_handle_activate_service), (bus_driver_handle_message):
5840 More work on the activation handling.
5842 * dbus/dbus-errors.h:
5843 Add some error messages
5845 * dbus/dbus-message.c: (dbus_message_new_error_reply):
5846 * dbus/dbus-message.h:
5847 New function that creates an error message.
5849 * dbus/dbus-protocol.h:
5850 Add ACTIVATE_SERVER message.
5852 * dbus/dbus-server-unix.c: (unix_handle_watch),
5853 (_dbus_server_new_for_domain_socket):
5854 Call _dbus_fd_set_close_on_exec.
5856 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5857 (_dbus_spawn_async), (_dbus_disable_sigpipe),
5858 (_dbus_fd_set_close_on_exec):
5859 * dbus/dbus-sysdeps.h:
5860 Add _dbus_fd_set_close_on exec function. Also add function that checks
5861 that all open fds are set to close-on-exec and warns otherwise.
5863 * dbus/dbus-transport-unix.c:
5864 (_dbus_transport_new_for_domain_socket):
5865 Call _dbus_fd_set_close_on_exec.
5867 2003-02-16 Havoc Pennington <hp@pobox.com>
5869 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5870 allow people to avoid setting SIGPIPE to SIG_IGN
5871 (_dbus_connection_new_for_transport): disable SIGPIPE unless
5872 we've been asked not to
5874 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5876 * dbus/dbus-list.c: (_dbus_list_append_link),
5877 (_dbus_list_prepend_link):
5878 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5882 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5885 * bus/activation.c: (bus_activation_entry_free),
5886 (add_desktop_file_entry), (load_directory), (bus_activation_init):
5888 * bus/main.c: (main):
5889 Add simple activation support, doesn't work yet though.
5891 2003-02-15 Zack Rusin <zack@kde.org>
5893 * qt/dbus-qthread.cpp: small casting fix
5895 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5897 * dbus/dbus-errors.c: (dbus_set_error):
5898 * dbus/dbus-errors.h:
5899 Add a few errors and make dbus_set_error void.
5901 * dbus/dbus-sysdeps.c:
5902 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5903 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5904 * dbus/dbus-sysdeps.h:
5905 Add _dbus_spawn_async.
5907 * test/spawn-test.c: (main):
5908 Test for _dbus_spawn_async.
5910 2003-02-15 Anders Carlsson <andersca@codefactory.se>
5912 * dbus/dbus-internals.h:
5913 Fix build without tests.
5915 * dbus/dbus-list.c: (alloc_link):
5916 Fix a segfault when a malloc fails.
5918 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5919 (dbus_malloc0), (dbus_realloc):
5920 Add support for malloc debugging.
5922 2003-02-15 Alexander Larsson <alexl@redhat.com>
5924 * dbus/dbus-threads.c:
5925 * dbus/dbus-threads.h:
5926 Add condvars. Remove static mutext from API.
5927 Implement static mutexes by initializing them from threads_init.
5929 * glib/dbus-gthread.c:
5930 * qt/dbus-qthread.cpp:
5931 Update with the thread api changes.
5936 Turn StaticMutex into normal mutex + init function.
5937 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5938 _dbus_list_append_link, _dbus_list_prepend_link
5941 * dbus/dbus-sysdeps.c:
5942 * dbus/dbus-sysdeps.h:
5943 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5944 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5946 * dbus/dbus-protocol.h:
5947 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5949 * dbus/dbus-message.c:
5950 Make ref/unref atomic.
5953 * dbus/dbus-connection-internal.h:
5954 * dbus/dbus-connection.c:
5955 * dbus/dbus-connection.h:
5957 Change _peek to _borrow,_return & _steal_borrowed.
5958 Change disconnect callback to event.
5959 Make dbus_connection_dispatch_messages reentrant.
5961 * dbus/dbus-transport.c:
5962 Don't ref the connection on calls to the transport
5965 * dbus/dbus-message-handler.c:
5968 * glib/dbus-gmain.c:
5969 Don't use peek_message anymore
5972 * test/debug-thread.c:
5973 * test/debug-thread.h:
5974 Simple thread implementation that asserts() on deadlocks in
5975 single-threaded code.
5978 (main) Call debug_threads_init.
5981 Use disconnect message instead of disconnect callback.
5985 Don't call dbus_connection_set_disconnect_function. Instead export
5986 bus_connection_disconnect.
5989 Call bus_connection_disconnect when we get a disconnected message.
5991 2003-02-15 Havoc Pennington <hp@pobox.com>
5993 * dbus/dbus-message.c (dbus_message_new): fool around with the
5996 2003-02-14 Havoc Pennington <hp@pobox.com>
5998 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6000 * dbus/dbus-memory.c: fail if the debug functions indicate we
6003 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6004 (_dbus_decrement_fail_alloc_counter): debug functions to
6005 simulate memory allocation failures
6007 2003-02-14 Havoc Pennington <hp@pobox.com>
6009 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6012 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6014 * bus/driver.c: (bus_driver_handle_hello):
6016 * bus/services.c: (bus_service_lookup):
6017 Reorder message sending so we get a more sane order.
6019 * test/bus-test.c: (message_handler):
6022 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6024 * bus/driver.c: (bus_driver_send_service_deleted),
6025 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6026 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6027 (bus_driver_send_welcome_message),
6028 (bus_driver_handle_list_services),
6029 (bus_driver_handle_acquire_service),
6030 (bus_driver_handle_service_exists):
6031 * dbus/dbus-bus.c: (dbus_bus_register_client),
6032 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6033 * dbus/dbus-errors.c: (dbus_result_to_string):
6034 * dbus/dbus-errors.h:
6035 * dbus/dbus-message.c: (dbus_message_append_args),
6036 (dbus_message_append_args_valist), (dbus_message_get_args),
6037 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6038 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6039 (dbus_message_iter_get_byte_array),
6040 (dbus_message_iter_get_string_array), (message_iter_test),
6041 (check_message_handling), (_dbus_message_test):
6042 * dbus/dbus-message.h:
6043 * test/bus-test.c: (main):
6044 Change fields to arguments in messages, so that they won't be
6045 confused with header fields.
6047 * glib/test-dbus-glib.c: (main):
6048 Remove append_fields from hello message.
6050 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6052 * dbus/dbus-errors.c:
6053 * dbus/dbus-message.c:
6054 * dbus/dbus-string.c:
6055 Documentation fixes.
6057 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6059 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6061 Implement support for timeouts in dbus-glib.
6063 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6065 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6066 * dbus/dbus-message.c: (process_test_subdir):
6067 * test/break-loader.c: (find_breaks_based_on):
6068 Plug some memory leaks.
6070 2003-02-13 Richard Hult <rhult@codefactory.se>
6072 * bus/main.c: Fix build.
6074 * dbus/dbus-errors.h:
6075 * dbus/dbus-errors.c: Fix copyright for Anders.
6077 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6082 * bus/connection.c: (bus_connection_foreach):
6085 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6086 (unescape_string), (new_section), (parse_section_start),
6087 (parse_key_value), (report_error), (bus_desktop_file_load),
6088 (bus_desktop_file_get_string):
6089 * bus/desktop-file.h:
6090 Use DBusError for error reporting.
6092 * bus/dispatch.c: (send_one_message),
6093 (bus_dispatch_message_handler):
6094 * bus/driver.c: (bus_driver_send_service_deleted),
6095 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6096 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6097 (bus_driver_send_welcome_message),
6098 (bus_driver_handle_list_services),
6099 (bus_driver_handle_acquire_service),
6100 (bus_driver_handle_service_exists):
6101 * bus/loop.c: (bus_loop_run):
6103 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6105 * bus/utils.c: (bus_wait_for_memory):
6107 New files with general utility functions.
6109 * dbus/dbus-internals.h:
6110 Remove _DBUS_HANDLE_OOM.
6112 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6114 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6115 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6116 * dbus/dbus-errors.h:
6117 Add DBusError structure.
6119 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6121 * test/data/valid-messages/standard-acquire-service.message:
6122 * test/data/valid-messages/standard-hello.message:
6123 * test/data/valid-messages/standard-list-services.message:
6124 * test/data/valid-messages/standard-service-exists.message:
6125 Add some standard messages.
6127 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6129 * bus/driver.c: (bus_driver_send_welcome_message),
6130 (bus_driver_handle_list_services),
6131 (bus_driver_handle_acquire_service),
6132 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6133 Update for API changes in libdbus.
6135 * dbus/dbus-message.c: (dbus_message_new_reply):
6136 * dbus/dbus-message.h:
6137 Remove the name argument. The spec states that replies shouldn't
6140 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6142 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6143 (report_error), (bus_desktop_file_load), (lookup_section),
6144 (lookup_line), (bus_desktop_file_get_raw),
6145 (bus_desktop_file_get_string):
6146 * bus/desktop-file.h:
6147 Some fixes, and new functions for getting a key value from a section.
6149 2003-02-13 Havoc Pennington <hp@pobox.com>
6151 * test/data/auth/fail-after-n-attempts.auth-script: new test
6153 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6156 2003-02-13 Havoc Pennington <hp@pobox.com>
6158 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6159 dbus_credentials_match were backward
6161 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6162 NO_CREDENTIALS and ROOT_CREDENTIALS
6164 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6165 into here. Never process more commands after we've reached an
6166 end state; store further data as unused bytes.
6168 * test/data/auth/*: add more auth tests
6170 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6171 command to match exact string and EXPECT_UNUSED to match unused
6174 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6176 2003-02-12 Havoc Pennington <hp@pobox.com>
6178 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6179 \r off of popped lines
6181 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6184 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6187 2003-02-12 Havoc Pennington <hp@pobox.com>
6189 * dbus/Makefile.am: remove break-loader from the build, since it
6192 * configure.in: add --enable-gcov to turn on coverage profiling
6193 flags and disable optimization
6195 2003-02-10 Havoc Pennington <hp@pobox.com>
6197 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6198 initial cut at test framework for DBusAuth from laptop.
6199 Doesn't quite work yet but it compiles and I need to get
6200 it off the 266mhz laptop. ;-)
6202 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6203 fix a memleak in error case
6205 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6208 * bus/desktop-file.c:
6209 * bus/desktop-file.h:
6210 Add a desktop file parser.
6212 2003-02-11 Zack Rusin <zack@kde.org>
6214 * qt/message.[h|cpp]: sample implementation
6215 of the KDE wrapper for DBusMessage
6217 2003-02-09 Zack Rusin <zack@kde.org>
6219 * test/bus-test.c: make_it_compile
6220 * doc/dbus-specification.sgml: minimal semantic fix
6222 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6228 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6231 * dbus/dbus-break-loader.c:
6233 * test/break-loader.c:
6234 Move dbus-break-loader to test/ and rename it to break-loader.
6236 2003-02-02 Havoc Pennington <hp@pobox.com>
6238 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6239 for code to manage cookies in your home directory
6241 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6243 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6244 to authenticate, then disconnect the client.
6246 2003-02-03 Alexander Larsson <alexl@redhat.com>
6248 * dbus/dbus-message.c (dbus_message_append_fields):
6251 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6253 * doc/dbus-specification.sgml:
6254 Update address format section.
6256 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6259 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6260 (message_handler), (new_connection_callback), (loop_quit),
6264 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6266 * bus/driver.c: (bus_driver_handle_service_exists):
6267 Simplify the code a bit.
6269 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6272 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6275 Add libdbus-daemon.la and link to it.
6277 2003-02-01 James Willcox <jwillcox@gnome.org>
6279 * bus/driver.c: (bus_driver_handle_own_service):
6280 Actually include the service reply code in the message.
6282 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6284 * bus/driver.c: (bus_driver_handle_service_exists):
6285 Don't unref the incoming message.
6287 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6289 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6291 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6293 * dbus/dbus-server.c: (dbus_server_listen):
6294 * dbus/dbus-transport.c: (_dbus_transport_open):
6295 ifdef out the calls to the debug transport and server.
6297 2003-02-02 Alexander Larsson <alexl@redhat.com>
6299 * dbus/dbus-watch.c (dbus_watch_get_flags):
6300 Add note in the docs that ERROR or HANGUP won't be returned
6301 and are assumed always on.
6303 * glib/dbus-gmain.c (add_watch):
6304 Always add IO_ERR | IO_HUP
6306 * dbus/dbus-message.h:
6307 Add semicolon after dbus_message_iter_get_string_array().
6308 Makes qt code build again
6310 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6312 * bus/driver.c: (create_unique_client_name),
6313 (bus_driver_handle_hello):
6314 Don't take a name, just use a numeric id to identify
6318 * dbus/dbus-bus.c: (dbus_bus_register_client),
6319 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6321 Add new convenience functions for communicating with the bus.
6323 * dbus/dbus-message.h:
6325 * dbus/dbus-protocol.h:
6328 2003-02-01 Alexander Larsson <alexl@redhat.com>
6330 * dbus/dbus-message.c (dbus_message_append_fields):
6331 Add some more doc comments.
6333 2003-02-01 Havoc Pennington <hp@pobox.com>
6335 * dbus/dbus-break-loader.c (randomly_modify_length): change
6336 a 4-byte value in the message as if it were a length
6338 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6339 execute bit on saved files
6341 2003-02-01 Havoc Pennington <hp@pobox.com>
6343 * dbus/dbus-break-loader.c (main): new program to find messages
6344 that break the loader.
6346 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6347 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6349 * dbus/dbus-string.c (_dbus_string_set_byte): new
6351 2003-01-31 Havoc Pennington <hp@pobox.com>
6353 * dbus/dbus-message.c: refactor the test code to be more general,
6354 in preparation for writing a "randomly permute test cases to
6355 try to break the loader" program.
6357 2003-01-31 Havoc Pennington <hp@pobox.com>
6359 * doc/dbus-specification.sgml: work on the specification
6361 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6362 the protocol version of the message.
6364 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6365 no longer specifies that.
6366 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6369 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6370 "break" for DBUS_TYPE_NIL, remove @todo
6372 2003-01-31 Havoc Pennington <hp@pobox.com>
6374 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6375 just set_is_error/get_is_error as this is a commonly-used
6376 function, and write docs.
6378 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6380 * dbus/dbus-address.c: (dbus_address_entry_free):
6381 Free key and value lists.
6383 * dbus/dbus-internals.c: (_dbus_type_to_string):
6384 Add the types we didn't have.
6386 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6387 (_dbus_marshal_validate_arg):
6390 * dbus/dbus-message.c: (dbus_message_set_sender):
6391 Remove todo about being able to set sender to NULL.
6393 (dbus_message_set_is_error_reply),
6394 (dbus_message_get_is_error_reply):
6395 * dbus/dbus-message.h:
6398 * dbus/dbus-protocol.h:
6399 Add error reply flag.
6401 * test/data/valid-messages/opposite-endian.message:
6402 Add NIL type to test.
6404 2003-01-31 Havoc Pennington <hp@pobox.com>
6406 * doc/dbus-specification.sgml: fully specify the header. Add
6407 flags and major protocol version, and change header/body len to
6410 * dbus/dbus-message-builder.c (append_saved_length): append length
6413 * dbus/dbus-message.c (dbus_message_create_header): change header
6414 length and body length to unsigned. Add the new fields from the
6416 (_dbus_message_loader_return_buffer): unsigned header/body len
6418 2003-01-30 Havoc Pennington <hp@pobox.com>
6420 * dbus/dbus-auth.c: rework to use only REJECTED, no
6423 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6424 use REJECTED, suggested by Mark McLoughlin
6426 2003-01-30 Havoc Pennington <hp@pobox.com>
6428 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6429 a better way to report errors here. e.g. "unix address lacks
6430 path" or something. also "no such file" when the path doesn't
6433 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6435 (dbus_parse_address): add @todo about documenting address format,
6436 and allowing , and ; to be escaped
6438 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6441 Add dbus-address.[ch]
6443 * dbus/dbus-address.c: (dbus_address_entry_free),
6444 (dbus_address_entries_free), (create_entry),
6445 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6446 (dbus_parse_address), (_dbus_address_test):
6447 * dbus/dbus-address.h:
6448 New files for dealing with address parsing.
6450 * dbus/dbus-connection.c:
6451 Document timeout functions.
6453 * dbus/dbus-message.c:
6454 Document dbus_message_new_from_message.
6456 * dbus/dbus-server-debug.c:
6459 * dbus/dbus-server.c: (dbus_server_listen):
6460 Parse address and use correct server implementation.
6462 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6463 * dbus/dbus-string.h:
6464 New function with test.
6466 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6470 * dbus/dbus-transport-debug.c:
6473 * dbus/dbus-transport.c: (_dbus_transport_open):
6474 Parse address and use correct transport implementation.
6476 2003-01-30 Havoc Pennington <hp@pobox.com>
6478 * dbus/dbus-message.c: use message->byte_order instead of
6479 DBUS_COMPILER_BYTE_ORDER throughout.
6480 (dbus_message_create_header): pad header to align the
6481 start of the body of the message to 8-byte boundary
6483 * dbus/dbus-marshal.h: make all the demarshalers take const
6484 DBusString arguments.
6486 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6487 validate message args here, so we don't have to do slow validation
6488 later, and so we catch bad messages as they are incoming. Also add
6489 better checks on header_len and body_len. Also fill in
6492 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6493 implemented properly)
6494 (_dbus_string_validate_nul): new function to check all-nul
6496 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6497 get_arg_end_pos and remove all validation
6498 (_dbus_marshal_validate_arg): actually do validation here.
6500 2003-01-29 Havoc Pennington <hp@pobox.com>
6502 * dbus/dbus-message.c (check_message_handling): fix assertion
6503 failure on set_client_serial
6505 2003-01-28 Havoc Pennington <hp@pobox.com>
6507 * dbus/dbus-server-debug.c: Add doc section comments
6509 * dbus/dbus-transport-debug.c: add doc section comments
6511 2003-01-28 Havoc Pennington <hp@redhat.com>
6513 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6514 the reverse order from how I had it
6515 (_dbus_string_base64_encode): reverse encoding order. I was
6516 basically byteswapping everything during encoding.
6518 2003-01-28 Anders Carlsson <andersca@codefactory.se>
6520 * dbus/dbus-connection-internal.h:
6521 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6522 (_dbus_connection_remove_timeout):
6523 Add functions for adding and removing timeouts.
6525 * dbus/dbus-message.c: (dbus_message_new_from_message):
6526 Add new function that takes a message and creates an exact
6527 copy of it, but with the refcount set to 1.
6528 (check_message_handling):
6531 * dbus/dbus-server-protected.h:
6532 * dbus/dbus-server.c: (_dbus_server_init_base),
6533 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6534 (dbus_server_set_timeout_functions):
6535 (_dbus_server_remove_timeout):
6536 New functions so that a server can add and remove timeouts.
6538 (dbus_server_listen):
6539 Add commented out call to dbus_server_debug_new.
6541 * dbus/dbus-timeout.c: (_dbus_timeout_new):
6542 Actually set the handler, doh.
6544 * dbus/dbus-transport.c: (_dbus_transport_open):
6545 Add commented out call to dbus_transport_debug_client_new.
6548 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6550 2003-01-28 Havoc Pennington <hp@pobox.com>
6552 * dbus/dbus-message.c (check_message_handling): function to check
6553 on the loaded message, iterates over it etc.
6555 2003-01-28 Havoc Pennington <hp@pobox.com>
6557 * test/Makefile.am (dist-hook): fix make distdir
6559 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6561 2003-01-27 Havoc Pennington <hp@pobox.com>
6563 * dbus/dbus-mempool.c (time_for_size): replace printf with
6566 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6567 empty lines; fix the SAVE_LENGTH stuff to be
6568 START_LENGTH/END_LENGTH so it actually works; couple other
6571 * test/Makefile.am (dist-hook): add dist-hook for .message files
6573 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6574 can be constant or locked.
6575 (_dbus_string_free): allow freeing a const string as
6578 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6580 * dbus/dbus-test-main.c (main): take an argument which is the
6581 directory containing test data
6583 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6584 argument to this and load all the messages in test/data/
6585 checking that they can be loaded or not loaded as appropriate.
6587 2003-01-27 Anders Carlsson <andersca@codefactory.se>
6589 * bus/dispatch.c: (bus_dispatch_message_handler):
6590 Dispatch messages sent to services.
6592 * bus/driver.c: (bus_driver_send_service_deleted),
6593 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6594 (bus_driver_send_service_acquired):
6595 Add helper functions for sending service related messages.
6597 (bus_driver_send_welcome_message):
6598 Send HELLO_REPLY instead of WELCOME.
6600 (bus_driver_handle_list_services):
6601 Send LIST_SERVICES_REPLY instead of SERVICES.
6603 (bus_driver_handle_own_service),
6604 (bus_driver_handle_service_exists):
6605 New message handlers.
6607 (bus_driver_handle_message):
6608 Invoke new message handlers.
6610 (bus_driver_remove_connection):
6611 Don't remove any services here since that's done automatically
6612 by bus_service_remove_owner now.
6615 New function signatures.
6617 * bus/services.c: (bus_service_add_owner):
6618 Send ServiceAcquired message if we're the only primary owner.
6620 (bus_service_remove_owner):
6621 Send ServiceAcquired/ServiceLost messages.
6623 (bus_service_set_prohibit_replacement),
6624 (bus_service_get_prohibit_replacement):
6625 Functions for setting prohibit replacement.
6627 (bus_service_has_owner):
6628 New function that checks if a connection is in the owner queue of
6632 Add new function signatures.
6634 * dbus/dbus-list.c: (_dbus_list_test):
6635 Add tests for _dbus_list_remove_last and traversing the list backwards.
6638 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6639 go any further, so return NULL then.
6641 * dbus/dbus-protocol.h:
6642 Add new messages, service flags and service replies.
6644 2003-01-26 Havoc Pennington <hp@pobox.com>
6646 * dbus/dbus-message-builder.c: implement, completely untested.
6648 * test/data/*: add data to be used in testing.
6649 ".message" files are our simple loadable text format.
6650 ".message-raw" will be binary dumps of messages.
6652 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6654 2003-01-26 Havoc Pennington <hp@pobox.com>
6656 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6658 * dbus/dbus-errors.c (dbus_result_to_string): add
6661 * dbus/dbus-message-builder.c: new file, will contain code to load
6662 up messages from files. Not implemented yet.
6664 2003-01-26 Havoc Pennington <hp@pobox.com>
6666 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6667 the sender by setting to NULL
6669 2003-01-26 Havoc Pennington <hp@pobox.com>
6671 The unit tests pass, but otherwise untested. If it breaks, the
6672 tests should have been better. ;-)
6674 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6677 * dbus/dbus-message.c: redo everything so we maintain
6678 message->header as the only copy of the various fields.
6679 This avoids the possibility of out-of-memory in some cases,
6680 for example dbus_message_lock() can't run out of memory anymore,
6681 and avoids extra copying. Figured I may as well go ahead and do
6682 this since it was busted for dbus_message_lock to not return
6683 failure on OOM, and dbus_message_write_header was totally
6684 unchecked for OOM. Also fixed some random other bugs.
6686 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6687 that strings are nul-terminated. Also, end_pos can be equal
6688 to string length just not greater than, I think.
6689 (_dbus_marshal_set_int32): new function
6690 (_dbus_marshal_set_uint32): new function
6691 (_dbus_marshal_set_string): new function
6693 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6694 a warning, init timeout_list to NULL
6695 (dbus_connection_send_message): don't use uninitialized variable
6698 * dbus/dbus-string.c (_dbus_string_replace_len): new function
6700 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6702 * bus/driver.c: (bus_driver_handle_hello),
6703 (bus_driver_send_welcome_message):
6706 2003-01-26 Anders Carlsson <andersca@codefactory.se>
6708 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6709 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6710 (dbus_connection_unref):
6711 * dbus/dbus-marshal.c: (_dbus_marshal_test):
6712 * dbus/dbus-message.c: (dbus_message_unref),
6715 (dbus_message_get_fields):
6716 Remove debugging printout.
6718 (_dbus_message_loader_return_buffer):
6719 Don't store the header string.
6721 (_dbus_message_test):
6724 2003-01-26 Richard Hult <rhult@codefactory.se>
6726 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6727 the file descriptor list, since it can change under us.
6729 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6731 * glib/dbus-gmain.c: (dbus_connection_prepare),
6732 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6733 (remove_watch), (dbus_connection_hookup_with_g_main):
6734 Rewrite the glib handling to use its own GSource instead of a
6735 GIOChannel so we can catch messages put in the queue while waiting
6738 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6741 * bus/connection.c: (connection_disconnect_handler),
6742 (connection_watch_callback), (bus_connection_setup):
6743 * bus/dispatch.c: (send_one_message),
6744 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6745 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6747 * bus/driver.c: (bus_driver_send_service_deleted),
6748 (bus_driver_send_service_created), (bus_driver_handle_hello),
6749 (bus_driver_send_welcome_message),
6750 (bus_driver_handle_list_services), (bus_driver_remove_connection),
6751 (bus_driver_handle_message):
6753 Refactor code, put the message dispatching in its own file. Use
6754 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6757 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6759 * dbus/dbus-internals.h:
6760 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6762 * dbus/dbus-message.c: (dbus_message_get_sender):
6763 * dbus/dbus-message.h:
6764 Implement dbus_message_get_sender.
6766 * dbus/dbus-protocol.h:
6767 Add message and service defines.
6769 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6771 * dbus/dbus-connection.c: (dbus_connection_send_message):
6772 * dbus/dbus-message-internal.h:
6773 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6774 (dbus_message_write_header):
6775 Remove _dbus_messag_unlock and don't set the client serial on a
6776 message if one already exists.
6778 2003-01-24 Havoc Pennington <hp@pobox.com>
6780 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6783 * bus/driver.c (bus_driver_handle_list_services): fix a leak
6786 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6788 * dbus/dbus-list.c: (alloc_link), (free_link):
6789 Use a memory pool for the links.
6791 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6793 * bus/connection.c: (bus_connection_foreach):
6795 Add new bus_connection_foreach function.
6797 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6798 Add function that broadcasts a message to all clients.
6800 (bus_driver_send_service_created), (bus_driver_handle_hello),
6801 (bus_driver_send_welcome_message),
6802 (bus_driver_handle_list_services), (bus_driver_message_handler):
6803 Implement functions that take care of listing services, and notifying
6804 clients when new services are created.
6806 * bus/services.c: (bus_services_list):
6808 Add new function that returns an array of strings with the currently
6809 registered services.
6812 * glib/dbus-gmain.c:
6813 Update copyright year.
6815 2003-01-25 Anders Carlsson <andersca@codefactory.se>
6817 * dbus/dbus-connection.c: (dbus_connection_send_message):
6818 Unlock the message in case it was sent earlier.
6820 (dbus_connection_send_message_with_reply_and_block):
6821 Remove the reply message from the list.
6823 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6824 Set array_len and new_pos correctly.
6826 (_dbus_marshal_test):
6827 Remove debug output.
6829 * dbus/dbus-message-internal.h:
6830 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6831 New function that returns the reply serial.
6833 (_dbus_message_unlock):
6834 New function that unlocks a message and resets its header.
6836 (dbus_message_append_string_array),
6837 (dbus_message_get_fields_valist),
6838 (dbus_message_iter_get_field_type),
6839 (dbus_message_iter_get_string_array),
6840 (dbus_message_get_fields),
6841 (dbus_message_append_fields_valist):
6842 Handle string arrays.
6844 (dbus_message_set_sender):
6845 Make this function public since the bus daemon needs it.
6847 (decode_header_data):
6848 Set the reply serial to -1 initially.
6850 * dbus/dbus-message.h:
6851 Add dbus_message_set_sender.
6853 2003-01-24 Havoc Pennington <hp@pobox.com>
6855 * doc/dbus-specification.sgml: add some stuff
6857 2003-01-22 Havoc Pennington <hp@pobox.com>
6859 * doc/dbus-specification.sgml: Start to document the protocol.
6861 2003-01-22 Havoc Pennington <hp@pobox.com>
6863 * dbus/dbus-connection.c
6864 (dbus_connection_send_message_with_reply_and_block): add some @todo
6866 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6868 2003-01-21 Havoc Pennington <hp@pobox.com>
6870 (patch untested because can't compile)
6872 * bus/driver.c (create_unique_client_name): make this function
6873 never recycle client names. Also, caller should initialize
6876 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6878 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6880 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6881 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6882 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6883 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6884 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6885 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6886 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6887 * dbus/dbus-marshal.h:
6888 * dbus/dbus-protocol.h:
6889 Add support for marshalling and demarshalling integer, double
6892 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6897 * bus/connection.c: (connection_disconnect_handler):
6898 Remove the connection from the bus driver's list.
6900 (connection_watch_callback): Dispatch messages.
6902 (free_connection_data): Free connection name.
6904 (bus_connection_setup): Add connection to the bus driver's list.
6905 (bus_connection_remove_owned_service):
6906 (bus_connection_set_name), (bus_connection_get_name):
6907 Add functions for setting and getting the connection's name.
6910 Add function headers.
6912 * bus/driver.c: (create_unique_client_name),
6913 (bus_driver_handle_hello_message),
6914 (bus_driver_send_welcome_message), (bus_driver_message_handler),
6915 (bus_driver_add_connection), (bus_driver_remove_connection):
6918 * bus/services.c: (bus_service_free):
6920 New file that handles communication and registreation with the bus
6923 2003-01-21 Anders Carlsson <andersca@codefactory.se>
6925 * dbus/dbus-connection.c: (dbus_connection_send_message):
6926 Add a new client_serial parameter.
6928 (dbus_connection_send_message_with_reply):
6929 Remove a @todo since we've implemented the blocking function.
6931 (dbus_connection_send_message_with_reply_and_block):
6932 New function that sends a message and waits for a reply and
6933 then returns the reply.
6935 * dbus/dbus-connection.h:
6938 * dbus/dbus-errors.c: (dbus_result_to_string):
6939 * dbus/dbus-errors.h:
6940 Add new DBUS_RESULT.
6942 * dbus/dbus-message-internal.h:
6943 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6944 (_dbus_message_set_sender), (dbus_message_write_header),
6945 (dbus_message_new_reply), (decode_header_data),
6946 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6947 * dbus/dbus-message.h:
6948 Add new functions that set the reply serial and sender.
6949 Also marshal and demarshal them correctly and add test.
6951 * dbus/dbus-protocol.h:
6952 Add new DBUS_MESSAGE_TYPE_SENDER.
6955 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6956 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6957 (dbus_connection_hookup_with_g_main):
6958 * glib/test-dbus-glib.c: (main):
6959 Rewrite to use GIOChannel and remove the GSource crack.
6961 * test/echo-client.c: (main):
6962 * test/watch.c: (check_messages):
6963 Update for changed APIs
6965 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6967 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6969 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6970 Create a DBusTimeoutList.
6971 (dbus_connection_set_timeout_functions): Add new function to
6972 set timeout callbacks
6974 * dbus/dbus-connection.h: Add public DBusTimeout API.
6976 * dbus/dbus-message.c: (dbus_message_get_service):
6977 * dbus/dbus-message.h: New function.
6979 * dbus/dbus-server.c: Fix small doc typo.
6981 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6983 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6985 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6986 of the string, just as long as specified.
6988 2003-01-19 Havoc Pennington <hp@pobox.com>
6990 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6993 * dbus/dbus-server.c (dbus_server_set_max_connections)
6994 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6995 keep track of current number of connections, and add API for
6996 setting a max (but haven't implemented enforcing the max yet)
6998 2003-01-18 Havoc Pennington <hp@pobox.com>
7000 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7001 reading/writing if read_watch != NULL or write_watch != NULL.
7003 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7004 the message loader code to actually load message->header and
7005 message->body into the newly-created message.
7007 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7010 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7011 (dbus_connection_get_max_message_size)
7012 (dbus_connection_set_max_live_messages_size)
7013 (dbus_connection_get_max_live_messages_size): implement some
7014 resource limitation functions
7016 * dbus/dbus-resources.c: new file implementing some of the
7017 resource limits stuff
7019 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7020 missing docs, add @todo to handle OOM etc.
7022 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7025 2003-01-18 Havoc Pennington <hp@pobox.com>
7027 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7028 connection if it hasn't been already.
7030 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7031 replace with DisconnectFunction.
7033 2003-01-18 Havoc Pennington <hp@pobox.com>
7035 Building --disable-verbose-mode --disable-asserts --disable-tests
7036 cuts the library from 112K to 45K or so
7038 * configure.in: check for varargs macro support,
7039 add --enable-verbose-mode, --enable-asserts.
7041 * dbus/dbus-internals.h (_dbus_assert): support
7043 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7045 2003-01-18 Havoc Pennington <hp@pobox.com>
7047 * dbus/dbus-test.c: include config.h so that tests actually run
7049 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7050 so the failure mode when that assumption fails will be plenty
7053 2003-01-18 Havoc Pennington <hp@pobox.com>
7055 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7057 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7060 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7061 since we don't want to use those in make check
7063 2003-01-15 Havoc Pennington <hp@redhat.com>
7069 2003-01-15 Havoc Pennington <hp@redhat.com>
7071 * test/Makefile.am: fix so that test source code ends up in the
7072 distribution on make distcheck
7074 2003-01-15 Havoc Pennington <hp@redhat.com>
7080 2003-01-15 Havoc Pennington <hp@redhat.com>
7082 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7083 fix build when --disable-tests
7085 * Makefile.am (EXTRA_DIST): put HACKING in here
7087 * HACKING: document procedure for making a tarball release.
7089 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7091 * bus/connection.c: (connection_error_handler),
7092 (bus_connection_setup):
7093 * bus/main.c: (main):
7094 Make sure that the DBusConnectionData struct is NULLed
7095 out to prevent a segfault.
7097 * dbus/dbus-errors.c: (dbus_result_to_string):
7098 * dbus/dbus-errors.h:
7099 * dbus/dbus-message.c: (dbus_message_get_fields),
7100 (dbus_message_get_fields_valist), (_dbus_message_test):
7101 * dbus/dbus-message.h:
7102 Make dbus_message_get_fields return a result code so we can
7103 track invalid fields as well as oom.
7105 2003-01-11 Havoc Pennington <hp@pobox.com>
7107 * configure.in: change --enable-test/--enable-ansi action-if-given
7108 to enable_foo=$enableval instead of enable_foo=yes
7110 2003-01-08 Havoc Pennington <hp@pobox.com>
7112 * dbus/dbus-string.c (_dbus_string_align_length): new function
7114 * dbus/dbus-test-main.c: move main() for test app here
7116 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7117 symbol to run tests, because dbus-test isn't in the main
7120 Code review nitpicks.
7122 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7123 for people with narrow emacs ;-). Assert client_serial was filled
7124 in. Assert message->name != NULL.
7125 (dbus_message_append_fields): have "first_field_type" arg separate
7126 from va list, needed for C++ binding that also uses varargs IIRC
7127 and helps with type safety
7128 (dbus_message_new): add @todo about using DBusString to store
7129 service/name internally
7130 (dbus_message_new): don't leak ->service and ->name on OOM later
7132 (dbus_message_unref): free the service name
7133 (dbus_message_get_fields): same change to varargs
7134 i.e. first_field_type
7135 (_dbus_message_loader_return_buffer): assert that the message data
7136 is aligned (if not it's a bug in our code). Put in verbose griping
7137 about why we set corrupted = TRUE.
7138 (decode_header_data): add FIXME that char* is evil. Was going to
7139 add FIXME about evil locale-specific string.h strncmp, but just
7140 switched to wacky string-as-uint32 optimization. Move check for
7141 "no room for field name" above get_const_data_len() to avoid
7142 assertion failure in get_const_data_len if we have trailing 2
7143 bytes or the like. Check for service and name fields being
7144 provided twice. Don't leak service/name on error. Require field
7145 names to be aligned to 4 bytes.
7147 * dbus/dbus-marshal.c: move byte swap stuff to header
7148 (_dbus_pack_int32): uscore-prefix
7149 (_dbus_unpack_int32): uscore-prefix
7150 (_dbus_unpack_uint32): export
7151 (_dbus_demarshal_string): add @todo complaining about use of
7153 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7154 handling allowing corrupt data to go unchecked
7156 2003-01-08 Havoc Pennington <hp@redhat.com>
7158 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7159 to the select() as needed for authentication. (should be using
7160 _dbus_poll() not select, but for another day)
7162 * dbus/dbus.h: include dbus/dbus-protocol.h
7164 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7166 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7169 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7171 * dbus/dbus-internals.c: (_dbus_type_to_string):
7172 New function that returns a string describing a type.
7174 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7175 * dbus/dbus-marshal.h:
7176 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7177 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7178 (dbus_message_iter_get_byte_array):
7179 * dbus/dbus-message.h:
7180 Add new convenience functions for appending and getting message fields.
7181 Also add demarshalling routines for byte arrays.
7183 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7185 * dbus/dbus-connection-internal.h:
7186 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7187 (_dbus_connection_get_next_client_serial),
7188 (dbus_connection_send_message):
7189 * dbus/dbus-internals.h:
7190 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7191 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7192 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7193 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7194 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7195 (_dbus_verbose_bytes), (_dbus_marshal_test):
7196 * dbus/dbus-marshal.h:
7197 * dbus/dbus-message-internal.h:
7198 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7199 (dbus_message_write_header), (_dbus_message_lock),
7200 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7201 (dbus_message_get_name), (dbus_message_append_int32),
7202 (dbus_message_append_uint32), (dbus_message_append_double),
7203 (dbus_message_append_string), (dbus_message_append_byte_array),
7204 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7205 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7206 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7207 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7208 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7209 (decode_header_data), (_dbus_message_loader_return_buffer),
7210 (message_iter_test), (_dbus_message_test):
7211 * dbus/dbus-message.h:
7212 * dbus/dbus-protocol.h:
7213 * dbus/dbus-test.c: (main):
7215 * glib/test-dbus-glib.c: (message_handler), (main):
7216 * test/echo-client.c: (main):
7217 * test/watch.c: (check_messages):
7218 Make messages sendable and receivable for real.
7220 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7222 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7223 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7224 * dbus/dbus-message.c: (dbus_message_append_int32),
7225 (dbus_message_append_uint32), (dbus_message_append_double),
7226 (dbus_message_append_string), (dbus_message_append_byte_array):
7227 Handle OOM restoration.
7229 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7231 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7232 (_dbus_demarshal_string), (_dbus_marshal_test):
7233 * dbus/dbus-marshal.h:
7234 * dbus/dbus-message.c: (dbus_message_get_name),
7235 Document these functions.
7237 (dbus_message_append_int32), (dbus_message_append_uint32),
7238 (dbus_message_append_double), (dbus_message_append_string),
7239 (dbus_message_append_byte_array):
7240 * dbus/dbus-message.h:
7241 Add functions for adding message fields of different types.
7243 * dbus/dbus-protocol.h:
7244 Add the different types.
7246 2003-01-05 Havoc Pennington <hp@pobox.com>
7248 * bus/connection.c: implement routines for handling connections,
7249 first thing is keeping a list of owned services on each connection
7250 and setting up watches etc.
7252 * bus/services.c: implement a mapping from service names to lists
7255 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7257 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7258 to use static mutexes for global data
7260 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7261 collection of functions to set/get application-specific data
7262 on the DBusConnection.
7264 2003-01-04 Havoc Pennington <hp@pobox.com>
7266 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7267 (_dbus_poll): new function
7269 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7272 * bus/loop.c: initial code for the daemon main loop
7274 2003-01-04 Havoc Pennington <hp@pobox.com>
7276 * test/watch.c (error_handler): make it safe if the error handler
7277 is called multiple times (if we s/error handler/disconnect
7278 handler/ we should just guarantee it's called only once)
7280 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7281 error handler on disconnect (it's quite possible we should
7282 just change the error handler to a "disconnect handler," I'm
7283 not sure we have any other meaningful errors)
7285 * configure.in: check for getpwnam_r
7287 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7288 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7289 mechanism as in SASL spec, using socket credentials
7291 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7292 (_dbus_send_credentials_unix_socket): new function
7294 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7296 (_dbus_write): only check errno if <0 returned
7297 (_dbus_write_two): ditto
7299 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7301 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7302 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7303 (_dbus_marshal_test):
7304 * dbus/dbus-marshal.h:
7305 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7306 to _dbus_marshal_utf8_string. Also fix some tests.
7308 2002-12-28 Harri Porten <porten@kde.org>
7310 * configure.in: added check for C++ compiler and a very cheesy
7311 check for the Qt integration
7313 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7315 * qt/Makefile.am: added
7317 * qt/.cvsignore: added
7319 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7320 latter, added #ifdef QT_THREAD_SUPPORT guard.
7322 * dbus/Makefile.am: added missing headers for make dist
7324 2002-12-28 Kristian Rietveld <kris@gtk.org>
7326 * dbus/Makefile.am: fixup export-symbols-regex.
7328 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7330 * acinclude.m4: Add this file and put the
7331 PKG_CHECK_MODULE macro in it.
7333 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7335 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7336 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7337 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7338 (_dbus_marshal_test):
7339 Make the demarshalling routines align the pos argument.
7340 Add string marshalling tests and fix the obvious bugs
7343 2002-12-26 Havoc Pennington <hp@pobox.com>
7345 * dbus/dbus-auth.c: fixes fixes fixes
7347 * dbus/dbus-transport-unix.c: wire up support for
7348 encoding/decoding data on the wire
7350 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7351 (_dbus_auth_decode_data): append to target string
7352 instead of nuking it.
7354 2002-12-26 Havoc Pennington <hp@pobox.com>
7356 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7357 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7360 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7361 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7362 now). Main point is because I wanted unpack_uint32 to implement
7364 (_dbus_verbose_bytes): new function
7366 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7368 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7369 mechanism to handle a corrupt message stream
7370 (_dbus_message_loader_new): fix preallocation to only prealloc,
7373 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7374 (_dbus_string_test): enhance tests for copy/move and fix the
7377 * dbus/dbus-transport-unix.c: Hold references in more places to
7378 avoid reentrancy problems
7380 * dbus/dbus-transport.c: ditto
7382 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7383 leak reference count in no-message case
7385 * test/watch.c (do_mainloop): handle adding/removing watches
7386 during iteration over the watches. Also, ref the connection/server
7387 stored on a watch, so we don't try to mangle a destroyed one.
7389 * dbus/dbus-transport-unix.c (do_authentication): perform
7392 * dbus/dbus-auth.c (get_state): add a state
7393 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7394 (_dbus_auth_get_unused_bytes): append the unused bytes
7395 to the passed in string, rather than prepend
7397 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7398 the auth conversation DBusAuth
7400 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7401 (_dbus_transport_new_for_domain_socket): when creating a
7402 transport, pass in whether it's a client-side or server-side
7403 transport so we know which DBusAuth to create
7405 2002-12-03 Havoc Pennington <hp@pobox.com>
7407 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7408 _after_ finalizing the derived members
7409 (unix_connection_set): unref watch if we fail to add it
7411 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7412 transport first, so that the connection owned by the
7413 transport will be valid as the transport finalizes.
7415 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7416 if necessary, and remove watches from the connection.
7418 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7420 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7422 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7423 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7424 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7425 (_dbus_marshal_test):
7426 * dbus/dbus-marshal.h:
7427 Add string marshal functions and have the demarshal functions
7428 return the new position.
7430 2002-12-25 Havoc Pennington <hp@pobox.com>
7432 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7433 it is a simple protocol that just maps directly to SASL.
7435 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7436 initial implementation, not actually used yet.
7438 * dbus/dbus-string.c (_dbus_string_find): new function
7439 (_dbus_string_equal): new function
7440 (_dbus_string_base64_encode): new function
7441 (_dbus_string_base64_decode): new function
7443 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7446 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7447 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7448 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7449 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7450 * dbus/dbus-marshal.h:
7451 * dbus/dbus-protocol.h:
7452 * dbus/dbus-test.c: (main):
7454 Add un-optimized marshalling/demarshalling routines.
7456 2002-12-25 Harri Porten <porten@kde.org>
7458 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7460 2002-12-24 Zack Rusin <zack@kde.org>
7462 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7463 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7466 2002-12-24 Havoc Pennington <hp@pobox.com>
7468 * glib/dbus-gthread.c: fix include
7470 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7471 I think glib API needs to change, though, as you don't
7472 want to use DBusMessageFunction, you want to use the
7473 DBusMessageHandler object. Probably
7474 dbus_connection_open_with_g_main_loop()
7475 and dbus_connection_setup_g_main_loop() or something like that
7476 (but think of better names...) that just create a connection
7477 that has watch/timeout functions etc. already set up.
7479 * dbus/dbus-connection.c
7480 (dbus_connection_send_message_with_reply): new function just to
7481 show how the message handler helps us deal with replies.
7483 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7485 * dbus/dbus-string.c (_dbus_string_test): free a string that
7488 * dbus/dbus-hash.c: use memory pools for the hash entries
7489 (rebuild_table): be more paranoid about overflow, and
7490 shrink table when we can
7491 (_dbus_hash_test): reduce number of sprintfs and write
7492 valid C89. Add tests for case where we grow and then
7493 shrink the hash table.
7495 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7497 * dbus/dbus-connection.c (dbus_connection_register_handler)
7498 (dbus_connection_unregister_handler): new functions
7500 * dbus/dbus-message.c (dbus_message_get_name): new
7502 * dbus/dbus-list.c: fix docs typo
7504 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7505 an object representing a handler for messages.
7507 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7510 * glib/dbus-gthread.c: (dbus_gthread_init):
7511 Don't use the gdbus prefix for public functions.
7513 2002-12-16 Anders Carlsson <andersca@codefactory.se>
7517 Add GLib checks and fixup .pc files
7521 * glib/dbus-gmain.c: (gdbus_connection_prepare),
7522 (gdbus_connection_check), (gdbus_connection_dispatch),
7523 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7524 (dbus_connection_gsource_new):
7525 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7526 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7527 * glib/test-dbus-glib.c: (message_handler), (main):
7530 2002-12-15 Harri Porten <porten@kde.org>
7532 * autogen.sh: check for libtoolize before attempting to use it
7534 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7537 * .cvsignore: ignore more stamp files
7539 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7541 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7542 without make install.
7544 2002-12-15 Havoc Pennington <hp@pobox.com>
7546 * dbus/dbus-threads.c: add thread stubs that a higher library
7547 layer can fill in. e.g. the GLib wrapper might fill them in with
7548 GThread stuff. We still need to use this thread API to
7549 thread-safe-ize the library.
7551 2002-12-12 Havoc Pennington <hp@pobox.com>
7553 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7554 below new interfaces and include fewer system headers.
7556 * dbus/dbus-sysdeps.c (_dbus_read): new function
7557 (_dbus_write): new function
7558 (_dbus_write_two): new function
7559 (_dbus_connect_unix_socket): new function
7560 (_dbus_listen_unix_socket): new function
7562 * dbus/dbus-message-internal.h: change interfaces to use
7565 2002-12-11 Havoc Pennington <hp@pobox.com>
7567 * dbus/dbus-types.h: add dbus_unichar
7569 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7571 * dbus/dbus-connection.c (dbus_connection_send_message): return
7574 * dbus/dbus-transport.c: include dbus-watch.h
7576 * dbus/dbus-connection.c: include dbus-message-internal.h
7578 * HACKING: add file with coding guidelines stuff.
7580 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7581 handling here, for security purposes (as in vsftpd). Not actually
7582 using this class yet.
7584 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7585 system/libc usage here, as in vsftpd, for ease of auditing (and
7586 should also simplify portability). Haven't actually moved all the
7587 system/libc usage into here yet.
7589 2002-11-25 Havoc Pennington <hp@pobox.com>
7591 * dbus/dbus-internals.c (_dbus_verbose): fix to not
7592 always print the first verbose message.
7594 2002-11-24 Havoc Pennington <hp@pobox.com>
7596 * test/echo-client.c, test/echo-server.c: cheesy test
7599 * configure.in (AC_CHECK_FUNCS): check for writev
7601 * dbus/dbus-message.c (_dbus_message_get_network_data): new
7604 * dbus/dbus-list.c (_dbus_list_foreach): new function
7606 * dbus/dbus-internals.c (_dbus_verbose): new function
7608 * dbus/dbus-server.c, dbus/dbus-server.h: public object
7609 representing a server that listens for connections.
7611 * dbus/.cvsignore: create
7613 * dbus/dbus-errors.h, dbus/dbus-errors.c:
7614 public API for reporting errors
7616 * dbus/dbus-connection.h, dbus/dbus-connection.c:
7617 public object representing a connection that
7618 sends/receives messages. (Same object used for
7619 both client and server.)
7621 * dbus/dbus-transport.h, dbus/dbus-transport.c:
7622 Basic abstraction for different kinds of stream
7623 that we might read/write messages from.
7625 2002-11-23 Havoc Pennington <hp@pobox.com>
7627 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7630 * dbus/dbus-test.c (main): add list test, and include
7631 dbus-test.h as intended
7633 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7634 (_dbus_hash_table_remove_int): return value indicates
7635 whether the entry existed to remove
7637 * dbus/dbus-list.c: add linked list utility class,
7640 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7643 2002-11-23 Havoc Pennington <hp@pobox.com>
7645 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7646 DBUS_END_DECLS to nothing, that should fix this once and for all
7648 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7650 * dbus/dbus-message.c, dbus/dbus-hash.c:
7651 add some missing @brief
7653 2002-11-23 Havoc Pennington <hp@pobox.com>
7655 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7656 to avoid confusing Doxygen
7658 * dbus/dbus-hash.c: @} not }@
7660 * dbus/dbus-message.c (struct DBusMessage): split out
7663 2002-11-23 Havoc Pennington <hp@pobox.com>
7665 * configure.in: pile on more warning flags if using gcc
7667 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7668 to document static functions
7670 * configure.in: add summary to end of configure so it
7671 looks nice and attractive
7673 * dbus/dbus-hash.c: finish implementation and write unit
7676 * configure.in: add --enable-tests to enable unit tests
7678 * dbus/dbus-test.c: test program to run unit tests
7679 for all files in dbus/*, initially runs a test for
7682 * dbus/dbus-internals.h: file to hold some internal utility stuff
7684 2002-11-22 Havoc Pennington <hp@redhat.com>
7686 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7687 "ported" away from Tcl
7689 * dbus/dbus-types.h: header for types such as dbus_bool_t
7691 2002-11-22 Havoc Pennington <hp@redhat.com>
7693 * dbus/dbus.h: fixups for doc warnings
7695 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7697 (QUIET): make it quiet so we can see warnings
7699 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7701 2002-11-22 Havoc Pennington <hp@redhat.com>
7703 * Makefile.am: include "Doxyfile" target in all-local
7705 * configure.in: generate the Doxyfile
7707 * Doxyfile.in: move Doxyfile here, so we can use
7708 configure to generate a Doxyfile with the right
7711 2002-11-22 Havoc Pennington <hp@redhat.com>
7713 * dbus/dbus-message.c: move inline docs into .c file
7715 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7716 so all docs are under doc/
7717 (MAN_EXTENSION): generate man pages. Use extension
7718 ".3dbus" which matches ".3qt" on my system,
7719 I guess this is OK, I don't know really.
7720 (FILE_PATTERNS): look for .c files not .h, makes sense
7723 2002-11-22 Havoc Pennington <hp@pobox.com>
7725 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7726 because any app can be a server, and any app can be a client,
7727 the bus is a special kind of server.
7729 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
7731 * Doxyfile : adding. Still needs Makefile rules to be generated
7732 automatically (just run "doxygen" in the toplevel dir for now to
7735 * dbus/dbus-message.h : Adding sample docs (javadoc since
7736 resembles gtk-doc a little more)
7738 * dbus/dbus.h : Adding sample docs
7740 2002-11-21 Havoc Pennington <hp@redhat.com>
7742 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7743 so we can allow ourselves to include files directly,
7744 instead of having to use dbus.h
7746 * dbus/dbus.h: fill in
7748 * dbus/dbus-message.h: sketch out a sample header file.
7749 Include griping if you include it directly instead of
7752 * dbus/dbus-macros.h: new file with macros for extern "C",
7753 TRUE/FALSE, NULL, etc.
7755 * doc/file-boilerplate.c: put include guards in here
7757 2002-11-21 Havoc Pennington <hp@redhat.com>
7759 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7761 * COPYING: include the GPL as well, and license code
7762 under both AFL and GPL.
7764 2002-11-21 Havoc Pennington <hp@redhat.com>
7766 * acconfig.h: get rid of this
7768 * autogen.sh (run_configure): add --no-configure option
7770 * configure.in: remove AC_ARG_PROGRAM to make
7771 autoconf complain less. add AC_PREREQ.
7772 add AC_DEFINE third arg.
7774 2002-11-21 Anders Carlsson <andersca@codefactory.se>
7777 Fix references so we can distcheck.
7779 2002-11-21 Havoc Pennington <hp@redhat.com>
7781 * Initial module creation