1 2005-01-16 Havoc Pennington <hp@redhat.com>
3 * Add and fix docs according to Doxygen warnings throughout
6 * dbus/dbus-marshal-recursive.c
7 (_dbus_type_reader_array_is_empty): change this to just call
8 array_reader_get_array_len() and make it static
10 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
12 (dbus_message_iter_init_append): rename from append_iter_init
14 * dbus/dbus-marshal-recursive.c
15 (_dbus_type_reader_get_element_type): rename from
16 _dbus_type_reader_get_array_type
18 2005-01-15 Havoc Pennington <hp@redhat.com>
20 * test/glib/test-profile.c (with_bus_server_filter): fix crash
22 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
23 when DBUS_DISABLE_ASSERT
24 (_dbus_marshal_set_basic): be sure we align for the string length
26 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
29 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
31 (_dbus_string_set_byte): provide inline macro version
33 2005-01-15 Havoc Pennington <hp@redhat.com>
35 * Land the new message args API and type system.
37 This patch is huge, but the public API change is not
38 really large. The set of D-BUS types has changed somewhat,
39 and the arg "getters" are more geared toward language bindings;
40 they don't make a copy, etc.
42 There are also some known issues. See these emails for details
44 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
45 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
47 * dbus/dbus-marshal-*: all the new stuff
49 * dbus/dbus-message.c: basically rewritten
51 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
52 freed blocks to be all non-nul bytes so using freed memory is less
55 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
56 DBUS_FAIL_MALLOC=N environment variable, so you can do
57 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
58 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
61 * qt/message.cpp: port to the new message args API
62 (operator<<): use str.utf8() rather than str.unicode()
63 (pretty sure this is right from the Qt docs?)
65 * glib/dbus-gvalue.c: port to the new message args API
67 * bus/dispatch.c, bus/driver.c: port to the new message args API
69 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
70 "locked" flag to TRUE and align_offset to 0; I guess we never
71 looked at these anyhow, but seems cleaner.
73 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
74 move allocation padding macro to this header; use it to implement
75 (_DBUS_STRING_STATIC): ability to declare a static string.
77 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
78 change to return TRUE if the interface is not set.
80 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
81 to dbus-marshal-validate.[hc]
83 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
86 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
87 to dbus-marshal-*.[hc]
89 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
90 function here from dbus-marshal.c
92 2005-01-12 Joe Shaw <joeshaw@novell.com>
94 * NEWS: Update for 0.23.
96 * configure.in: Release 0.23.
98 2005-01-12 Joe Shaw <joeshaw@novell.com>
100 * mono/Makefile.am, mono/example/Makefile.am: Always build the
101 dbus DLL with --debug. Clean up after the .mdb files this leaves
104 * mono/doc/Makefile.am: Need to uninstall the docs on "make
107 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
108 is an enum, get the enum's underlying type. Another mono
111 2005-01-11 Joe Shaw <joeshaw@novell.com>
113 Patch from Sjoerd Simons <sjoerd@luon.net>
115 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
116 DESTDIR. It breaks stuff.
118 2005-01-11 Joe Shaw <joeshaw@novell.com>
120 Patch from Tambet Ingo <tambet@ximian.com>
122 * mono/DBusType/Array.cs (Get): Get the underlying element type by
123 calling type.GetElementType(). The code previously depended on
124 broken Mono behavior, which was fixed in Mono 1.1.3.
126 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
127 Activator.CreateInstance() so that the class's constructor is
128 called with the right parameters.
130 2005-01-11 Joe Shaw <joeshaw@novell.com>
132 Patch from Timo Teräs <ext-timo.teras@nokia.com>
134 * dbus/dbus-connection.c
135 (_dbus_connection_queue_received_message_link): Call
136 _dbus_connection_remove_timeout() instead of the _locked()
137 variant, since it's always called from
138 _dbus_connection_handle_watch(), which handles the locking.
139 Removed the _locked() variant since it's no longer used.
141 2005-01-03 Havoc Pennington <hp@redhat.com>
143 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
146 2004-12-26 Havoc Pennington <hp@redhat.com>
148 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
150 2005-01-03 Havoc Pennington <hp@redhat.com>
152 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
155 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
157 2005-01-02 Havoc Pennington <hp@redhat.com>
159 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
161 2005-01-01 Havoc Pennington <hp@redhat.com>
163 * configure.in: add -Wfloat-equal
165 2005-01-01 Havoc Pennington <hp@redhat.com>
167 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
168 for a variety of reasons '==' doesn't do this.
170 2004-12-31 Havoc Pennington <hp@redhat.com>
172 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
175 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
177 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
179 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
181 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
182 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
183 dbus-protocol.h. Because they are defines and not enums they are not
186 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
188 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
189 dbus_bus_activate_service
191 * python/dbus.py (Bus.activate_service): activate a service on the
194 2004-12-24 Havoc Pennington <hp@redhat.com>
196 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
197 file format has also changed and I haven't adapted to that yet
199 * Makefile.am: load .gcno files from latest gcc
201 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
202 * Patch from Rob Taylor <robtaylor@fastmail.fm>
204 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
207 * python/dbus.py (get_unix_user): Added binding to
208 call dbus_bindings.bus_get_unix_user
210 * python/extract.py: Modified the proto_pat regex to
213 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
215 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
216 better POSIX compliance.
218 2004-12-19 Havoc Pennington <hp@redhat.com>
220 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
221 (_dbus_string_insert_8_aligned): new functions
223 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
225 2004-12-18 Havoc Pennington <hp@redhat.com>
227 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
230 * dbus/dbus-message.c: fix a comment, and add a still-unused
231 not-implemented function
233 * dbus/dbus-marshal.h: fix comment
235 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
237 2004-12-17 Joe Shaw <joeshaw@novell.com>
239 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
240 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
241 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
242 Type.UnderlyingSystemType to get the actual system type
243 underneath. This code previously depended on the broken Mono
244 behavior, which was fixed in 1.1.3.
246 2004-11-27 Havoc Pennington <hp@redhat.com>
248 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
250 (_dbus_string_get_const_data): inline when asserts are disabled
252 * dbus/dbus-message.c: record the _dbus_current_generation of
253 creation so we can complain if dbus_shutdown() is used improperly.
254 Do this only if checks are enabled.
256 * dbus/dbus-connection.c: ditto
258 2004-11-26 Havoc Pennington <hp@redhat.com>
260 * test/glib/test-profile.c: add with_bus mode to profile echoes
261 that go through the bus.
263 * test/glib/run-test.sh: add ability to run test-profile
265 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
268 2004-11-26 Havoc Pennington <hp@redhat.com>
270 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
271 thing was implemented
273 2004-11-26 Havoc Pennington <hp@redhat.com>
275 * test/glib/test-profile.c: tweak a bit, add support for some
276 made-up minimal malloc overhead with plain sockets, since in
277 real life some sort of buffers are unavoidable thus we could
278 count them in the theoretical best case
280 2004-11-26 Havoc Pennington <hp@redhat.com>
282 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
283 where I was trying to cache one too many messages
285 2004-11-26 Havoc Pennington <hp@redhat.com>
287 * dbus/dbus-message.c: reimplement message cache as an array which
288 makes the cache about twice as fast and saves maybe 1.5% overall
290 2004-11-26 Havoc Pennington <hp@redhat.com>
292 * dbus/dbus-threads.c (init_global_locks): forgot to put the
293 message cache lock here
295 2004-11-26 Havoc Pennington <hp@redhat.com>
297 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
298 the "char byte_order" next to each other to save 4 bytes
299 (dbus_message_new_empty_header): reduce preallocation, since the
300 message cache should achieve a similar effect
301 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
302 message cache that keeps a few DBusMessage around in a pool,
303 another 8% speedup or so.
305 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
307 2004-11-25 Havoc Pennington <hp@redhat.com>
309 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
310 to write, without reading or blocking, try it before the poll()
311 and skip the poll() if nothing remains to write. This is about a
312 3% speedup in the echo client/server
314 2004-11-25 Havoc Pennington <hp@redhat.com>
316 The primary change here is to always write() once before adding
317 the write watch, which gives us about a 10% performance increase.
319 * dbus/dbus-transport-unix.c: a number of modifications to cope
320 with removing messages_pending
321 (check_write_watch): properly handle
322 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
323 messages_pending stuff
324 (check_read_watch): properly handle WAITING_FOR_MEMORY and
326 (unix_handle_watch): after writing, see if the write watch can be
328 (unix_do_iteration): assert that write_watch/read_watch are
329 non-NULL rather than testing that they aren't, since they
330 aren't allowed to be NULL. check_write_watch() at the end so
331 we add the watch if we did not finish writing (e.g. got EAGAIN)
333 * dbus/dbus-transport-protected.h: remove messages_pending call,
334 since it resulted in too much inefficient watch adding/removing;
335 instead we now require that the transport user does an iteration
336 after queueing outgoing messages, and after trying the first
337 write() we add a write watch if we got EAGAIN or exceeded our
338 max bytes to write per iteration setting
340 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
343 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
344 freed and then accessed, valgrind flagged this bug, fix it
346 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
347 as the last valid field plus 1, where really it is equal to the
348 last valid field. Corrects some message corruption issues.
350 * dbus/dbus-mainloop.c: verbosity changes
352 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
353 instead of aborting in one of the test codepaths
355 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
356 caused not printing the pid ever again if a verbose was missing
357 the newline at the end
358 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
360 * dbus/dbus-connection.c: verbosity changes;
361 (dbus_connection_has_messages_to_send): new function
362 (_dbus_connection_message_sent): no longer call transport->messages_pending
363 (_dbus_connection_send_preallocated_unlocked): do one iteration to
364 try to write() immediately, so we can avoid the write watch. This
365 is the core purpose of this patchset
366 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
367 dump the outgoing message queue, so nobody will get confused
368 trying to send them or thinking stuff is pending to be sent
370 * bus/test.c: verbosity changes
372 * bus/driver.c: verbosity/assertion changes
374 * bus/dispatch.c: a bunch of little tweaks to get it working again
375 because this patchset changes when/where you need to block.
377 2004-11-23 Havoc Pennington <hp@redhat.com>
379 * test/glib/test-profile.c: modify to accept a plain_sockets
380 argument in which case it will bench plain sockets instead of
381 libdbus, for comparison purposes.
383 2004-11-22 Havoc Pennington <hp@redhat.com>
385 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
386 threads for more time, so sysprof can get a grip on it.
388 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
391 2004-11-13 Havoc Pennington <hp@redhat.com>
393 * test/glib/test-profile.c: fix this thing up a bit
395 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
396 preallocation sizes by a fair bit; not sure if this will be an
397 overall performance win or not, but it does reduce reallocs.
399 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
400 the test hack that forced constant realloc if asserts are
401 disabled, so we can profile sanely. Sprinkle in some
402 _DBUS_UNLIKELY() which are probably pointless, but before I
403 noticed the real performance problem I put them in.
404 (_dbus_string_validate_utf8): micro-optimize this thing a little
405 bit, though callgrind says it didn't help; then special-case
406 ascii, which did help a lot; then be sure we detect nul bytes as
407 invalid, which is a bugfix.
408 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
409 superstition; use memset to nul the padding instead of a manual
411 (_dbus_string_get_length): inline this as a
412 macro; it showed up in the profile because it's used for loop
415 2004-11-10 Colin Walters <walters@verbum.org>
417 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
420 2004-11-09 Colin Walters <walters@verbum.org>
422 * dbus/dbus-string.c (_dbus_string_get_length): New
423 function, writes DBusString to C buffer.
425 * dbus/dbus-string.h: Prototype it.
427 * dbus/dbus-message.c (dbus_message_type_to_string): New
428 function, converts message type into C string.
430 * dbus/dbus-message.h: Prototype it.
432 * bus/selinux.c (bus_selinux_check): Take source pid,
433 target pid, and audit data. Pass audit data to
435 (log_audit_callback): New function, appends extra
437 (bus_selinux_allows_acquire_service): Also take
438 service name, add it to audit data.
439 (bus_selinux_allows_send): Also take message
440 type, interface, method member, error name,
441 and destination, and add them to audit data.
442 (log_cb): Initialize func_audit.
444 * bus/selinux.h (bus_selinux_allows_acquire_service)
445 (bus_selinux_allows_send): Update prototypes
447 * bus/services.c (bus_registry_acquire_service): Pass
448 service name to bus_selinux_allows_acquire_service.
450 * bus/bus.c (bus_context_check_security_policy): Pass
451 additional audit data. Move assignment of dest
454 2004-11-07 Colin Walters <walters@verbum.org>
456 * dbus/dbus-transport-unix.c (do_authentication): Always
457 initialize auth_completed.
459 2004-11-07 Colin Walters <walters@verbum.org>
461 * bus/bus.c (load_config): Break into three
462 separate functions: process_config_first_time_only,
463 process_config_every_time, and process_config_postinit.
464 (process_config_every_time): Move call of
465 bus_registry_set_service_context_table into
466 process_config_postinit.
467 (process_config_postinit): New function, does
468 any processing that needs to happen late
469 in initialization (and also on reload).
470 (bus_context_new): Instead of calling load_config,
471 open config parser here and call process_config_first_time_only
472 and process_config_every_time directly. Later, after
473 we have forked but before changing UID,
474 invoke bus_selinux_full_init, and then call
475 process_config_postinit.
476 (bus_context_reload_config): As in bus_context_new,
477 load parse file inside here, and call process_config_every_time
478 and process_config_postinit.
480 * bus/services.h, bus/services.c
481 (bus_registry_set_service_context_table): Rename
482 from bus_registry_set_sid_table. Take string hash from config
483 parser, and convert them here into SIDs.
485 * bus/config-parser.c (struct BusConfigParser): Have
486 config parser only store a mapping of service->context
488 (merge_service_context_hash): New function.
489 (merge_included): Merge context string hashes instead
490 of using bus_selinux_id_table_union.
491 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
492 simply create a new string hash.
493 (bus_config_parser_unref): Unref it.
494 (start_selinux_child): Simply insert strings into hash,
495 don't call bus_selinux_id_table_copy_over.
497 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
498 (bus_selinux_id_table_copy_over): Delete.
500 2004-11-03 Colin Walters <walters@verbum.org>
502 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
505 2004-11-03 Colin Walters <walters@verbum.org>
507 * bus/test-main.c (test_pre_hook): Fix test logic,
508 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
510 2004-11-02 Colin Walters <walters@redhat.com>
512 * bus/selinux.c (bus_selinux_init): Split into two functions,
513 bus_selinux_pre_init and bus_selinux_post_init.
514 (bus_selinux_pre_init): Just determine whether SELinux is
516 (bus_selinux_post_init): Do everything else.
518 * bus/main.c (main): Call bus_selinux_pre_init before parsing
519 config file, and bus_selinux_post_init after. This ensures that
520 we don't lose the policyreload notification thread that
521 bus_selinux_init created before forking previously.
523 * bus/test-main.c (test_pre_hook): Update for split.
525 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
527 Patch from Johan Fischer <linux@fischaz.com>
529 * mono/doc/Makefile.am (install-data-local): Added directory
532 2004-10-29 Colin Walters <walters@redhat.com>
534 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
535 parameter for fd to write pid to.
537 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
539 * bus/bus.c (bus_context_new): Pass print_pid_fd
540 to _dbus_become_daemon (bug #1720)
542 2004-10-29 Colin Walters <walters@redhat.com>
544 Patch from Ed Catmur <ed@catmur.co.uk>
546 * mono/doc/Makefile.am (install-data-local): Handle
549 2004-10-29 Colin Walters <walters@redhat.com>
551 * bus/.cvsignore, qt/.cvsignore: Update.
553 2004-10-29 Colin Walters <walters@redhat.com>
555 Patch from Kristof Vansant <de_lupus@pandora.be>
557 * configure.in: Detect Slackware.
558 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
559 * bus/rc.messagebus.in: New file.
561 2004-10-29 Colin Walters <walters@redhat.com>
563 * tools/dbus-monitor.c (filter_func): Return
564 DBUS_HANDLER_RESULT_HANDLED in filter function
566 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
568 2004-10-29 Colin Walters <walters@redhat.com>
570 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
572 * bus/services.c (bus_registry_acquire_service):
573 Correctly retrieve service name from DBusString
576 2004-10-29 Colin Walters <walters@redhat.com>
578 * dbus/dbus-glib.h: Update documentation to not
579 refer to internal APIs.
581 2004-10-27 Joe Shaw <joeshaw@novell.com>
583 * mono/Arguments.cs (GetDBusTypeConstructor):
584 type.UnderlyingSystemType will return "System.Byte" if you do it
585 on "byte[]", which is not what we want. So check the type.IsArray
586 property and use System.Array instead.
588 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
590 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
591 the DBusUserInfo structure since this is passed into the function.
592 This would cause a double free when the function that allocated
593 the structure would try to free it when an error occured.
595 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
596 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
597 for service activation to avoid 32bit/64bit parallel install issues
599 2004-10-21 Colin Walters <walters@verbum.org>
601 * AUTHORS: Fix my email address, the @gnu.org one
602 has been bouncing for some time. Also add J5.
604 2004-10-21 Colin Walters <walters@verbum.org>
606 * dbus/dbus-transport-unix.c (do_authentication): Return
607 authentication status to callers.
608 (unix_handle_watch): If we completed authentication this round,
609 don't do another read. Instead wait until the next iteration,
610 after we've read any pending data in the auth buffer.
611 (unix_do_iteration): Ditto.
612 (unix_handle_watch): Updated for new do_authentication prototype.
614 2004-10-18 Colin Walters <walters@verbum.org>
616 * bus/selinux.c (bus_selinux_enabled): Handle
617 --disable-selinux case.
619 2004-10-18 Colin Walters <walters@verbum.org>
621 * bus/selinux.h: Add bus_selinux_enabled.
623 * bus/selinux.c (bus_selinux_enabled): Implement it.
625 * bus/config-parser.c (struct include): Add
626 if_selinux_enabled member.
627 (start_busconfig_child): Parse if_selinux_enabled
628 attribute for include.
629 (bus_config_parser_content): Handle it.
631 * bus/session.conf.in, bus/system.conf.in: Add
632 inclusion of context mapping to default config files;
633 conditional on SELinux being enabled.
635 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
637 * test/data/invalid-config-files/badselinux-1.conf,
638 test/data/invalid-config-files/badselinux-2.conf:
639 Test files for bad syntax.
641 2004-10-17 Colin Walters <walters@verbum.org>
643 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
644 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
645 format specifier mismatches.
647 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
649 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
652 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
653 pointer (bug #1540, Leonardo Boiko).
655 2004-09-28 Jon Trowbridge <trow@ximian.com>
657 * mono/BusDriver.cs: Changed BusDriver struct to remove
658 the ServiceCreated and ServiceDeleted events and replace them
659 with the new ServiceOwnerChanged event.
661 * mono/example/BusListener.cs: Added a new example program,
662 which listens for and reports any ServiceOwnerChanged events
665 * mono/example/Makefile.am (DESTDIR): Build changes for the
666 new BusListener.cs example.
668 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
670 * bus/signals.c (bus_match_rule_parse): validate the components of
671 match rules (bug #1439).
673 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
675 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
677 * doc/dbus-specification.xml: document ServiceOwnerChanged
680 * bus/driver.c, bus/driver.h, bus/services.c: Use
681 ServiceOwnerChanged signal instead of ServiceCreated and
684 * bus/dispatch.c: update testcase for the new signal.
686 2004-09-20 Jon Trowbridge <trow@ximian.com>
688 Patch from Nat Friedman <nat@novell.com>
690 * mono/Makefile.am: A number of small build fixes to allow "make
691 distcheck" to succeed.
693 * mono/example/Makefile.am: "make distcheck" fixes.
695 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
698 * test/Makefile.am: "make distcheck" fixes.
700 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
702 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
704 * doc/busconfig.dtd: update the DTD for the at_console attribute.
706 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
707 messages after the first one (bug #1389).
709 * bus/dispatch.c (check_double_hello_message): add a test case for
710 the double hello message bug.
711 (check_existent_service_activation): fix check of spawning error.
713 2004-09-16 David Zeuthen <david@fubar.dk>
715 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
717 2004-09-12 David Zeuthen <david@fubar.dk>
719 Patch from Kay Sievers <kay.sievers@vrfy.org>
721 * bus/bus.c (bus_context_new):
725 Add commandline option --nofork to override configuration file
728 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
730 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
731 compilers don't like it (bug #974).
733 2004-09-04 Harald Fernengel <harry@kdevelop.org>
735 * qt/connection.*: Applied patch by JĂ©rĂ´me Lodewyck
736 <lodewyck@clipper.ens.fr> to integrate an existing
737 connection into the Qt eventloop
739 2004-08-30 Jon Trowbridge <trow@ximian.com>
741 * mono/BusDriver.cs: Added. This is a class for interacting with
742 the org.freedesktop.DBus service.
744 * mono/Message.cs: Added a mechanism to expose the message that is
745 currently being dispatched via the static Message.Current
746 property. Added Message.Sender and Message.Destination
749 * mono/Handler.cs: Expose the dispatched message via
750 Message.Current when handling method calls.
752 * mono/Service.cs: Expose the dispatched message via
753 Message.Current when handling signal emissions.
755 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
756 Connection.BaseService property.
758 2004-08-28 Havoc Pennington <hp@redhat.com>
760 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
762 More fixes from Steve Grubb
764 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
765 (_dbus_listen_tcp_socket): fix fd leak
767 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
768 EINTR to a bit lower in the code
770 2004-08-26 Jon Trowbridge <trow@ximian.com>
772 * bus/driver.c (bus_driver_handle_service_exists): Respond with
773 TRUE if we are inquiring about the existence of the built-in
774 org.freedesktop.DBus service.
776 2004-08-25 John Palmieri <johnp@redhat.com>
777 * bus/config-parser.c:
778 (struct PolicyType): Add POLICY_CONSOLE
779 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
780 (start_busconfig_child): Sets up console element when
781 <policy at_console=""> is encountered in a policy file
782 (append_rule_from_element): Convert console elements to console
786 (bus_policy_create_client_policy): Add console rules to the client
787 policy based on if the client is at the console
788 (bus_policy_append_console_rule): New function for adding a
789 console rule to a policy
790 (bus_policy_merge): Handle console rule merging
792 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
793 where we check for console user files
795 * dbus/dbus-sysdeps.c:
796 (_dbus_file_exists): New function which checks if the given
798 (_dbus_user_at_console): New function which does the system
799 specific process of checking if the user is at the console
801 * dbus/dbus-userdb.c:
802 (_dbus_is_console_user): New function converts a UID to user name
803 and then calls the system specific _dbus_user_at_console to
804 see if the user is at the console and therefor a console user
806 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
808 * bus/config-parser.c (set_limit):
809 * bus/dbus-daemon-1.1.in:
810 * test/data/valid-config-files/many-rules.conf: set the
811 max_match_rules_per_connection limt from the config file.
813 * doc/busconfig.dtd: update the DTD.
815 * bus/driver.c: remove some unused variables.
817 2004-08-24 Mikael Hallendal <micke@imendio.com>
819 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
820 it's been replaced by dbus_g_bus_get
822 2004-08-23 Colin Walters <walters@redhat.com>
824 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
826 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
828 * bus/selinux.c: Create a thread for policy reload notification.
829 (bus_selinux_get_policy_root): Implement.
831 * bus/config-parser.c (start_busconfig_child)
832 (bus_config_parser_content): Support SELinux-root relative
835 * configure.in <HAVE_SELINUX>: Add -lpthread.
837 * bus/test-main.c (test_pre_hook, test_post_hook): New.
838 (test_post_hook): Move memory checking into here.
839 (test_pre_hook, test_post_hook): Move SELinux checks in
840 here, but conditional on a DBUS_TEST_SELINUX environment
841 variable. Unfortunately we can't run the SELinux checks
842 as a normal user, since they won't have any permissions
843 for /selinux. So this will have to be tested manually
844 for now, until we have virtualization for most of
847 2004-08-23 Havoc Pennington <hp@redhat.com>
849 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
850 drop supplementary groups, suggested by Steve Grubb
852 2004-08-20 Colin Walters <walters@redhat.com>
854 * bus/config-parser.c (start_busconfig_child): Remove some unused
857 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
860 2004-08-17 Joe Shaw <joeshaw@novell.com>
862 * configure.in: If --enable-mono is passed in, if we can't find
865 * mono/Makefile.am: Use /gacutil to install assemblies into the
868 2004-08-12 Havoc Pennington <hp@redhat.com>
870 * NEWS: update for 0.22
872 * configure.in: release 0.22
874 2004-08-11 Colin Walters <walters@redhat.com>
876 * tools/dbus-send.c (main, usage): Add --reply-timeout
879 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
881 * bus/bus.c (process_config_first_time_only): get rid of an unused
882 DBusError that was causing a memoy leak (bug #989).
884 * dbus/dbus-keyring.c, dbus/dbus-message.c:
885 fix compilation on Solaris/Forte C (bug #974)
887 * bus/main.c (main): plug two minuscule memleaks.
889 2004-08-10 Havoc Pennington <hp@redhat.com>
891 * doc/dbus-tutorial.xml: add some more info on GLib bindings
893 2004-08-09 Havoc Pennington <hp@redhat.com>
895 * COPYING: switch to Academic Free License version 2.1 instead of
896 2.0, to resolve complaints about patent termination clause.
898 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
900 * README: added documentation for the --enable-python
903 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
905 * bus/config-parser.c (bus_config_parser_new): fix an invalid
906 _unref in the SELinux support.
908 * doc/busconfig.dtd: update DTD for SELinux support.
910 * bus/config-loader-libxml.c: fix error handler and parser
911 initialisation/cleanup. OOM test now works with libxml2 HEAD.
913 * configure.in: remove the warning about libxml2.
915 * dbus/dbus-bus.c: silence doxygen warning.
917 2004-07-31 Colin Walters <walters@redhat.com>
919 * configure.in: Move #error in SELinux check to its own line.
921 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
923 * dbus/dbus-internals.h (_DBUS_SET_OOM):
924 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
927 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
928 broken by the change in the _SET_OOM macros.
930 2004-07-31 Colin Walters <walters@redhat.com>
932 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
935 2004-07-31 Colin Walters <walters@redhat.com>
937 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
938 to correctly detect DBUS__ACQUIRE_SVC. Also add an
941 2004-07-24 Havoc Pennington <hp@redhat.com>
943 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
945 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
948 * configure.in: add --enable-selinux
950 * bus/policy.c (bus_policy_merge): add FIXME to a comment
952 * bus/main.c (main): initialize and shut down selinux
954 * bus/connection.c: store SELinux ID on each connection, to avoid
955 repeated getting of the string context and converting it into
958 * bus/bus.c (bus_context_get_policy): new accessor, though it
960 (bus_context_check_security_policy): check whether the security
961 context of sender connection can send to the security context of
964 * bus/config-parser.c: add parsing for <selinux> and <associate>
966 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
967 implement dbus_connection_get_unix_fd()
969 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
970 function, used by the selinux stuff
972 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
974 * bus/config-loader-libxml.c: complete the implementation of
975 libxml backend for config file loader. Doesn't work with full OOM
978 * configure.in: change error when selecting libxml into a warning.
980 * test/data/invalid-config-files: add two non-well-formed XML
983 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
985 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
986 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
987 be necessary to read all the buffer. (bug #894)
989 * bus/activation.c (bus_activation_activate_service): fix a
990 potential assertion failure (bug #896). Small optimization in the
991 case of auto-activation messages.
993 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
994 add test case for byte-through-vararg bug (#901). patch by Kimmo
997 2004-07-28 Anders Carlsson <andersca@gnome.org>
1000 * python/dbus_bindings.pyx.in:
1001 Add dbus.init_gthreads (), allow emit_signal to pass
1002 arguments to the signal.
1004 2004-07-24 Havoc Pennington <hp@redhat.com>
1006 * AUTHORS: add some people, not really comprehensively, let me
1007 know if I missed you
1009 2004-07-24 Havoc Pennington <hp@redhat.com>
1011 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
1014 * test/Makefile.am (DIST_SUBDIRS): here also
1016 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1018 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
1019 breaking build on Solaris, reported by Farhad Saberi on the ML.
1021 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
1022 va_arg invocation to account for integer promotion in the case of
1023 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
1025 * bus/services.c (bus_service_remove_owner): fix bug #902, use
1026 _dbus_list_get_first_link, not _dbus_list_get_first.
1028 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
1030 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
1031 handler functions so that the asserts in _dbus_object_subtree_unref
1034 * dbus/dbus-transport-unix.c (do_reading):
1035 _dbus_transport_queue_messages return value is of type
1036 dbus_bool_t, not DBusDispatchStatus.
1038 2004-07-19 David Zeuthen <david@fubar.dk>
1040 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
1043 (check_get_connection_unix_user): Debug says GetProperty; but the
1044 method is called GetConnectionUnixUser
1045 (check_get_connection_unix_process_id): New function
1046 (bus_dispatch_test): Actually call check_get_connection_unix_user();
1047 also call check_get_connection_unix_process_id()
1050 (bus_driver_handle_get_connection_unix_process_id): New function,
1051 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
1055 (handle_server_data_external_mech): Set pid from the credentials
1056 obtained from the socket
1058 * dbus/dbus-connection.c:
1059 (dbus_connection_get_unix_process_id): New function
1061 * dbus/dbus-connection.h:
1062 Add prototype for dbus_connection_get_unix_process_id
1064 * dbus/dbus-transport.c:
1065 (_dbus_transport_get_unix_process_id): New function
1067 * dbus/dbus-transport.h:
1068 Add prototype for _dbus_transport_get_unix_process_id
1070 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
1072 * dbus/dbus-message.c: Message counter fix, patch by Christian
1073 Hammond <chipx86@gnupdate.org>
1075 2004-07-18 Seth Nickell <seth@gnome.org>
1078 * python/dbus_bindings.pyx.in:
1079 * python/tests/test-client.py:
1081 Add dbus.ByteArray and dbus_bindings.ByteArray
1082 types so that byte streams can be passed back.
1084 Give jdahlin the heaps of credit that are so
1087 2004-07-12 Seth Nickell <seth@gnome.org>
1091 Add message argument to the default object_method_handler
1094 * python/dbus_bindings.pyx.in:
1096 Automatically return NIL when passed an empty list
1097 (we can't pass back a list since lists are typed
1098 and we don't have any idea what type the the client
1099 intended the list to be... :-( )
1101 2004-07-10 Seth Nickell <seth@gnome.org>
1103 * python/examples/Makefile.am:
1105 Fix distcheck breakage caused by new examples.
1107 2004-07-10 Seth Nickell <seth@gnome.org>
1111 Add "message" argument to service-side dbus.Object
1112 methods. This will break existing services written
1113 using the python bindings, but will allow extraction
1114 of all the message information (e.g. who its from).
1116 Add improved "object oriented" signal handling/emission.
1118 * python/examples/example-service.py:
1122 * python/examples/example-signal-emitter.py:
1123 * python/examples/example-signal-recipient.py:
1125 Two new examples that show how to emit and receive
1126 signals using the new APIs.
1128 * python/examples/example-signals.py:
1129 * python/examples/gconf-proxy-service.py:
1130 * python/examples/gconf-proxy-service2.py:
1132 Add "message" argument to service methods.
1134 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
1136 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
1137 * dbus/bus.c (dbus_bus_get_unix_user)
1138 * doc/dbus-specification.xml: implement GetConnectionUnixUser
1139 method of org.freedesktop.DBus interface.
1141 * bus/dispatch.c: test case
1143 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
1145 * python/Makefile.am: switched include directory from glib/ to dbus/
1146 since dbus-glib.h moved
1148 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1150 * configure.in: prevent building the gcj stuff and libxml loader
1151 since they are broken.
1153 2004-06-20 Havoc Pennington <hp@redhat.com>
1155 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
1156 codes from the dbus error names
1158 * glib/dbus-glib.h: move to subdir dbus/ since it's included
1159 as dbus/dbus-glib.h and that breakage is now visible due to
1160 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
1162 * glib/dbus-glib.h: s/gproxy/g_proxy/
1164 * dbus/dbus-shared.h: new header to hold stuff shared with
1167 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
1170 * glib/dbus-glib.h (dbus_set_g_error): move to
1171 dbus-glib-lowlevel.h
1173 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
1174 of stuff to enable this
1176 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
1178 * a bunch of other changes with the same basic "separate glib
1179 bindings from dbus.h" theme
1181 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
1183 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
1185 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
1187 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1189 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
1190 the reply value of the ServiceExists message.
1192 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
1194 * python/dbus_bindings.pyx.in: No longer need to parse path
1195 elements and pass them as arrays of strings. The C API now
1196 accepts plain path strings.
1197 (_build_parsed_path): removed
1199 2004-06-07 Havoc Pennington <hp@redhat.com>
1201 * doc/TODO: remove auto-activation item since it's done; sort
1202 items by importance/milestone
1204 2004-06-07 Havoc Pennington <hp@redhat.com>
1206 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
1207 random signature when using REQUIRED_FIELDS (this hack won't work
1210 * dbus/dbus-message.c: change the signature to be a header field,
1211 instead of message->signature special-case string. Incremental
1212 step forward. Then we can fix up code to send the signature in the
1213 message, then fix up code to validate said signature, then fix up
1214 code to not put the typecodes inline, etc.
1215 (load_one_message): don't make up the signature after the fact
1216 (decode_header_data): require signature field for the known
1219 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
1221 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
1223 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
1225 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
1227 * mono/Handler.cs: Updated to follow new path argument for
1228 (un-)registering objects.
1230 * mono/example/Makefile.am:
1232 * configure.in: Bumped required version for mono and use new -pkg
1235 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
1237 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
1238 registration functions take the path argument as char* instead of
1241 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
1242 split off the path decompostion part of
1243 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
1246 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
1248 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1250 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
1251 machine approach. A state is implemented as a function that
1252 handles incoming events as specified for that state.
1254 * doc/dbus-specification.xml: Update auth protocol state machine
1255 specification to match implementation. Remove some leftover
1258 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1260 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
1261 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
1264 * Doxyfile.in: remove deprecated options.
1266 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
1267 glib/test-thread.h, glib/test-thread-client.c,
1268 glib/test-thread-server.c, glib/test-profile.c,
1269 glib/test-dbus-glib.c: remove these unused files.
1271 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
1273 * dbus/dbus-object-tree.c
1274 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
1275 non-fallback handlers (bug #684).
1276 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
1277 (find_subtree_recurse): report wether the returned subtree is an
1278 exact match or a "fallback" match higher up in the tree.
1279 (object_tree_test_iteration): update test case.
1281 2004-06-01 Seth Nickell <seth@gnome.org>
1283 * python/dbus_bindings.pyx.in:
1284 * python/tests/test-client.py:
1286 Round off basic type support. Add dicts (yay!), and
1287 remaining array types.
1289 Make MessageIter more general so it works for dicts too.
1291 Mark all loop variables as C integers.
1293 2004-05-31 Havoc Pennington <hp@redhat.com>
1295 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
1298 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
1300 * glib/dbus-glib-tool.c (main): set up to have a --self-test
1301 option that runs the tests, and start filling in some code
1302 including for starters just dumping the interfaces to stdout
1304 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
1306 * test/data/valid-introspection-files/lots-of-types.xml: test of
1307 an example introspection file
1309 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
1312 2004-05-31 Seth Nickell <seth@gnome.org>
1314 * python/dbus_bindings.pyx.in:
1315 * python/tests/test-client.py:
1320 Fix string array memory trashing bug... oops...
1322 2004-05-30 Seth Nickell <seth@gnome.org>
1326 Add a nicer-but-less-flexible alternate API for handling
1327 calls to virtual objects in dbus.ObjectTree.
1329 Screw up the argument order to the dbus.Object constructor
1330 for consistency with dbus.ObjectTree (and to make dbus_methods
1331 optional for future extension)
1333 * python/examples/Makefile.am:
1334 * python/examples/gconf-proxy-service.py:
1335 * python/examples/gconf-proxy-service2.py:
1337 Alternate implementation of gconf-proxy-service using the
1338 nicer dbus.ObjectTree API.
1340 * python/examples/example-service.py:
1341 * python/tests/test-server.py
1343 Reverse the argument order to deal with dbus.Object constructor
1346 2004-05-30 Seth Nickell <seth@gnome.org>
1348 * python/examples/example-client.py:
1349 * python/examples/example-service.py:
1351 Take it back. Lists seem to work but they're broken
1352 in the test suite. Make the base examples use
1355 2004-05-30 Seth Nickell <seth@gnome.org>
1357 * python/dbus_bindings.pyx.in:
1358 * python/tests/test-client.py:
1360 Add some more tests and fix errors that crop up.
1361 Unfortunately, currently it seems like marshalling
1362 and unmarshalling of lists is completely broken :-(
1364 2004-05-30 Seth Nickell <seth@gnome.org>
1366 * python/dbus_bindings.pyx.in:
1368 Add support for ObjectPath type.
1372 Refactor message handling code to a common function.
1374 * python/tests/test-client.py:
1375 * python/tests/test-server.py:
1377 Add tests that check to make sure values of all types
1378 can be echoed from a service w/o mangling.
1380 2004-05-29 Seth Nickell <seth@gnome.org>
1384 Add ObjectTree class which allows implementation
1385 of trees of "virtual" objects. Basically the python
1386 wrapper for "register_fallback".
1388 * python/examples/Makefile.am
1389 * python/examples/gconf-proxy-client.py:
1390 * python/examples/gconf-proxy-service.py:
1392 Implement a simple GConf proxy service that supports
1393 get/set on string and int GConf keys using the ObjectTree.
1395 2004-05-29 Seth Nickell <seth@gnome.org>
1398 * python/examples/example-client.py:
1399 * python/examples/example-service.py:
1400 * python/examples/list-system-services.py:
1402 Add SessionBus, SystemBus and ActivationBus classes
1403 so you don't need to know the special little BUS_TYPE
1406 2004-05-29 Havoc Pennington <hp@redhat.com>
1408 * bus/config-parser.c (process_test_valid_subdir): temporarily
1409 stop testing config parser OOM handling, since expat has issues
1410 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
1412 * bus/dbus-daemon-1.1.in: change requested_reply to
1413 send_requested_reply/receive_requested_reply so we can send the
1414 replies, not just receive them.
1416 * bus/config-parser.c: parse the new
1417 send_requested_reply/receive_requested_reply
1419 * bus/policy.c (bus_client_policy_check_can_send): add
1420 requested_reply argument and use it
1422 * bus/bus.c (bus_context_check_security_policy): pass through
1423 requested_reply status to message send check
1425 * bus/system.conf.in: adapt to requested_reply change
1427 2004-05-28 Havoc Pennington <hp@redhat.com>
1429 * test/glib/test-service-glib.c (main): remove unused variable
1431 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
1433 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
1434 from the enum, no longer in use.
1436 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
1439 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
1440 whether error_name passed in is a valid error name.
1442 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
1444 * dbus/dbus-message.c (dbus_message_get_args): Added support for
1445 OBJECT_PATH and OBJECT_PATH_ARRAY
1447 2004-05-28 Seth Nickell <seth@gnome.org>
1449 * python/examples/Makefile.am:
1451 Forget to add Makefile.am. Do not pass go.
1453 2004-05-28 Michael Meeks <michael@ximian.com>
1455 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
1458 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
1460 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
1461 (_dbus_message_iter_get_basic_type_array): impl.
1462 drastically simplify ~all relevant _get methods to use these.
1463 (_dbus_message_iter_append_basic_array),
1464 (dbus_message_iter_append_basic): impl
1465 drastically simplify ~all relevant _append methods to use these.
1467 * dbus/dbus-message-builder.c (parse_basic_type)
1468 (parse_basic_array, lookup_basic_type): impl.
1469 (_dbus_message_data_load): prune scads of duplicate /
1472 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
1473 (_dbus_demarshal_basic_type): implement,
1474 (demarshal_and_validate_len/arg): beef up debug.
1475 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
1477 2004-05-27 Seth Nickell <seth@gnome.org>
1480 * python/Makefile.am:
1482 Include the example python apps in the tarball.
1484 * python/examples/list-system-services.py
1486 Add a python new example that fetches the list of services
1487 from the system bus.
1489 2004-05-27 Seth Nickell <seth@gnome.org>
1492 * python/dbus_bindings.pyx.in:
1494 Fix failure to notify that a signal was not handled,
1495 resulted in hung functions.
1497 2004-05-25 Colin Walters <walters@redhat.com>
1499 * tools/dbus-monitor.c (main): Monitor all types of messages.
1501 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
1503 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1504 which unregisters the object path and disposes the handler.
1506 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1508 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1510 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1511 operands to && so we call dbus_message_iter_next () for the last
1514 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1516 * dbus/dbus-object-tree.c
1517 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1518 children even if the requested path isn't registered.
1519 (object_tree_test_iteration): test object_tree_list_registered.
1521 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1524 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1526 * doc/TODO: Remove resolved items.
1528 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1531 * bus/connection.c (bus_connections_expect_reply): Enforce the
1532 per-connection limit on pending replies.
1534 Patch from Jon Trowbridge <trow@ximian.com>:
1536 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1537 up a watch that triggers a config reload when one end of the pipe
1539 (signal_handler): Instead of doing the config reload in our SIGHUP
1540 handler, just write to the reload pipe and let the associated
1541 watch handle the reload when control returns to the main loop.
1543 * bus/driver.c (bus_driver_handle_reload_config): Added.
1544 Implements a ReloadConfig method for requesting a configuration
1545 file reload via the bus driver.
1547 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1549 * HACKING: Updated release instructions concerning the wiki page.
1551 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1553 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1554 filter against auth->allowed_mechs; we only add allowed mechs in
1555 record_mechanisms().
1557 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1558 ALLOWED_MECHS to auth-script format so we can set the list of
1561 * data/auth/client-out-of-mechanisms.auth-script: New test to
1562 check client disconnects when it is out of mechanisms to try.
1564 * dbus/dbus-auth.c (process_command): Remove check for lines
1565 longer that 1 MB; we only buffer up maximum 16 kB.
1567 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1568 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1569 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1570 assume there might be unused bytes.
1572 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1573 client-out-of-mechs, it is handled in process_reject(). Move check
1574 for max failures to send_rejected(), as it's a server-only thing.
1576 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1577 send_auth(), send_data(), send_rejected(), send_error(),
1578 send_ok(), send_begin() and send_cancel().
1580 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1582 Remove base64 encoding, replace with hex encoding. Original patch
1583 from trow@ximian.com, added error handling.
1585 * dbus/dbus-string.c (_dbus_string_base64_encode)
1586 (_dbus_string_base64_decode): Remove.
1587 (_dbus_string_hex_decode): Add end_return argument so we can
1588 distinguish between OOM and invalid hex encoding.
1589 (_dbus_string_test): Remove base64 tests and add test case for
1592 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1593 Replace base64 with hex.
1595 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1596 for invalid hex encoded data in auth protocol.
1598 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1600 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1603 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1605 * mono/dbus-sharp.dll.config.in: Added for GAC
1606 * mono/dbus-sharp.snk: Added for GAC
1607 * mono/Assembly.cs.in: Added for GAC
1608 * mono/Makefile.am: Changes for GAC installation
1609 * configure.in: Added refs for dbus-sharp.dll.config.in and
1610 Assembly.cs.in. More fixes for mono testing
1611 * mono/example/Makefile.am: Changed var to CSC
1612 * Makefile.am: Changed flag name to DBUS_USE_CSC
1614 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1616 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1617 * mono/doc/*: Added documentation framework
1618 * configure.in: Added monodoc check
1619 * README: Added description of mono configure flags
1621 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1623 * doc/dbus-specification.xml: Added a "Required" column to the
1624 header fields table and changed the "zero or more" verbage in
1625 the above paragraph to read "The header must contain the required
1626 named header fields and zero or more of the optional named header
1628 * test/data/invalid-messages/*.message: Added the required PATH
1629 named header field to the tests so that they don't fail on
1630 'Missing path field'
1632 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1634 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1635 the stack by implicitly defining variable and parameter types and
1636 removing the hack of defining C pointers as python objects and later
1639 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1641 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1643 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1645 * mono/DBusType/Dict.cs: Handle empty dicts
1646 * mono/DBusType/Array.cs: Handle empty arrays
1647 * mono/Arguments.cs: Handle empty arguments
1649 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1651 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1654 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1656 * test/data/valid-messages/standard-*.message: Update message
1657 test scripts to new header field names.
1659 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1661 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1662 overflow to times_we_did_each_thing array which would chop off the
1663 first character of the failure_dir string. Increased the size of
1664 the array to 7 to reflect the number of random mutation functions
1667 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1669 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1670 unix_server->watch here, it is unreffed in disconnect.
1671 (_dbus_server_new_for_tcp_socket): convert NULL host to
1672 "localhost" here so we don't append NULL to address.
1674 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1675 various addresses, including tcp with no explicit host.
1677 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1679 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1680 fix incorrect setting of .name_offset in the HeaderField (it was
1681 off by two bytes, positioned right after the name and typecode)
1683 * bus/bus.c (bus_context_new, bus_context_unref): test before
1684 calling dbus_server_free_data_slot and _dbus_user_database_unref
1685 in case of an error.
1687 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1690 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1692 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1693 _dbus_poll() instead of select().
1695 2004-04-15 Jon Trowbridge <trow@ximian.com>
1697 * bus/main.c (signal_handler): Reload the configuration files
1699 (main): Set up our SIGHUP handler.
1701 * bus/bus.c (struct BusContext): Store the config file, user and
1702 fork flag in the BusContext.
1703 (process_config_first_time_only): Added. Contains the code
1704 (previously in bus_context_new) for setting up the BusContext from
1705 the BusConfigParser that should only be run the first time the
1706 config files are read.
1707 (process_config_every_time): Added. Contains the code (previously
1708 in bus_context_new) for setting up the BusContext from the
1709 BusConfigParser that should be run every time the config files are
1711 (load_config): Added. Builds a BusConfigParser from the config
1712 files and passes the resulting structure off to
1713 process_config_first_time_only (assuming this is the first time)
1714 and process_config_every_time.
1715 (bus_context_new): All of the config-related code has been moved
1716 to process_config_first_time_only and process_config_every_time.
1717 Now this function just does the non-config-related initializations
1718 and calls load_config.
1719 (bus_context_reload_config): Added.
1721 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1723 * bus/driver.c (bus_driver_handle_get_service_owner):
1724 implement a GetServiceOwner method.
1725 * doc/dbus-specification.xml: document it.
1726 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1728 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1729 implement, using the bus GetServiceOwner method.
1731 * test/glib/test-dbus-glib.c:
1732 use dbus_gproxy_new_for_service_owner so that we can receive the
1735 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1737 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1738 dbus/dbus-message.c, dbus/dbus-protocol.h
1739 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1741 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1742 dbus/dbus-message.c, dbus/dbus-protocol.h
1743 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1745 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1746 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1747 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1749 * doc/dbus-specification.xml (Header Fields Table):
1750 s/SERVICE/DESTINATION
1751 s/SENDER_SERVICE/SENDER
1754 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1756 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1759 2004-04-13 Michael Meeks <michael@ximian.com>
1761 * glib/dbus-gobject.c (handle_introspect): split out
1762 (introspect_properties): this.
1763 (handle_introspect): implement this.
1765 * test/glib/Makefile.am: use the absolute path so the bus
1766 daemon's chdir ("/") doesn't kill us dead.
1768 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1770 2004-04-12 Jon Trowbridge <trow@ximian.com>
1772 * bus/config-parser.c (struct BusConfigParser): Added
1773 included_files field.
1774 (seen_include): Added. Checks whether or not a file has already
1775 been included by any parent BusConfigParser.
1776 (bus_config_parser_new): Copy the parent's included_files.
1777 (include_file): Track which files have been included, and fail on
1778 circular inclusions.
1779 (process_test_valid_subdir): Changed printf to report if we are
1780 testing valid or invalid conf files.
1781 (all_are_equiv): Changed printf to be a bit clearer about
1782 what we are actually doing.
1783 (bus_config_parser_test): Test invalid configuration files.
1785 2004-04-09 Jon Trowbridge <trow@ximian.com>
1787 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1788 argument. If non-null, the newly-constructed BusConfigParser will
1789 be initialized with the parent's BusLimits instead of the default
1791 (include_file): When including a config file, pass in
1792 the current parser as the parent and then copy the BusLimits
1793 from the included BusConfigParser pack to the current parser.
1794 (process_test_valid_subdir): Renamed from process_test_subdir.
1795 (process_test_equiv_subdir): Added. Walks through a directory,
1796 descending into each subdirectory and loading the config files
1797 it finds there. If any subdirectory contains two config files
1798 that don't produce identical BusConfigParser structs, fail.
1799 For now, the BusConfigParser's BusPolicies are not compared.
1800 (bus_config_parser_test): Call both process_test_valid_subdir and
1801 process_test_equiv_subdir.
1803 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1804 argument and pass it along to the call to bus_config_parser_new.
1805 Also made a few small changes to allow this code to compile.
1807 * bus/config-loader-expat.c (bus_config_load): Take a parent
1808 argument and pass it along to the call to bus_config_parser_new.
1810 * bus/bus.c (bus_context_new): Load the config file
1811 with a NULL parent argument.
1813 2004-03-29 Michael Meeks <michael@ximian.com>
1815 * glib/dbus-gobject.c (introspect_properties): split
1816 out, fix mangled 'while' flow control.
1817 (introspect_signals): implement.
1818 (handle_introspect): update.
1820 2004-03-29 Michael Meeks <michael@ximian.com>
1822 * glib/dbus-gobject.c (set_object_property): split out /
1823 re-work, use the property type, and not the message type(!)
1824 (get_object_property): ditto.
1826 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1827 (dbus_gvalue_marshal): make this code re-usable, needed
1828 for signals too, also on both proxy and server side.
1829 Re-write for more efficiency / readability.
1831 2004-03-29 Michael Meeks <michael@ximian.com>
1833 * dbus/dbus-message.c
1834 (dbus_message_new_error_printf): impl.
1836 * dbus/dbus-connection.c
1837 (dbus_connection_unregister_object_path): fix warning.
1839 * configure.in: fix no-mono-installed situation.
1841 2004-03-27 Havoc Pennington <hp@redhat.com>
1843 Patch from Timo Teräs:
1845 * tools/dbus-send.c (main): if --print-reply, assume type is
1846 method call; support boolean type args
1848 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1849 bunch of memleak and logic bugs
1851 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1853 * mono/Arguments.cs:
1854 * mono/Introspector.cs:
1856 * mono/InterfaceProxy.cs:
1858 * mono/ProxyBuilder.cs:
1860 Added InterfaceProxy class to avoid building proxies for every
1864 * dbus-message.c (dbus_message_append_args_valist)
1865 (dbus_message_iter_get_object_path)
1866 (dbus_message_iter_get_object_path_array)
1867 (dbus_message_iter_append_object_path)
1868 (dbus_message_iter_append_object_path_array):
1869 Added object_path iter functions to handle OBJECT_PATH arguments
1871 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1873 First checkin of mono bindings.
1876 Build stuff for the bindings
1877 * dbus-sharp.pc.in: Added for pkgconfig
1879 2004-03-21 Havoc Pennington <hp@redhat.com>
1881 * test/test-service.c (main): remove debug spew
1883 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1885 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1888 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1889 (dbus_message_iter_init_array_iterator)
1890 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1891 indicate whether the iterator is empty
1893 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1896 2004-03-19 Havoc Pennington <hp@redhat.com>
1898 * NEWS: 0.21 updates
1900 * configure.in: 0.21
1902 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1904 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1905 you don't need pyrex to make dist
1907 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1910 2004-03-18 Richard Hult <richard@imendio.com>
1912 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1913 (dbus_message_set_auto_activation): Add doxygen docs.
1915 2004-03-16 Richard Hult <richard@imendio.com>
1917 * bus/activation.c: (bus_activation_service_created),
1918 (bus_activation_send_pending_auto_activation_messages),
1919 (bus_activation_activate_service):
1921 * bus/dispatch.c: (bus_dispatch),
1922 (check_nonexistent_service_auto_activation),
1923 (check_service_auto_activated),
1924 (check_segfault_service_auto_activation),
1925 (check_existent_service_auto_activation), (bus_dispatch_test):
1926 * bus/driver.c: (bus_driver_handle_activate_service):
1927 * bus/services.c: (bus_registry_acquire_service):
1928 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1929 (dbus_message_get_auto_activation):
1930 * dbus/dbus-message.h:
1931 * dbus/dbus-protocol.h: Implement auto-activation.
1933 * doc/dbus-specification.xml: Add auto-activation to the spec.
1935 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
1937 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1938 fix a bug with CUSTOM types.
1940 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1941 a unit test for this bug (used to fail).
1943 2004-03-12 Mikael Hallendal <micke@imendio.com>
1946 (babysitter_watch_callback): notify all pending activations waiting for
1947 the same exec that the activation failed.
1948 (bus_activation_activate_service): shortcut the activation if we
1949 already waiting for the same executable to start up.
1951 2004-03-12 Mikael Hallendal <micke@imendio.com>
1954 - Added service file reloading.
1955 Each service files directory is kept in an hash table in
1956 BusActivation and each BusActivationEntry knows what .service-file it
1957 was read from. So when you try to activate a service the bus will
1958 check if it's been updated, removed or if new .service-files has
1960 - Test code at the bottom for the service file reloading.
1961 * bus/test-main.c: (main):
1963 - added service reloading test.
1964 * dbus/dbus-sysdeps.c:
1965 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1967 2004-03-08 Michael Meeks <michael@ximian.com>
1969 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
1970 bail immediately if disconnected, to avoid busy loop.
1972 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1973 cleanup cut/paste/inefficiency.
1975 2004-03-01 David Zeuthen <david@fubar.dk>
1977 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1978 bug where args were used twice. This bug resulted in a segfault
1979 on a Debian/PPC system when starting the messagebus daemon. Include
1980 dbus-sysdeps.h for DBUS_VA_COPY
1982 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1984 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1985 appropriate va_copy implementation. From GLib
1987 2004-02-24 Joe Shaw <joe@ximian.com>
1989 * bus/services.c (bus_registry_acquire_service): We need to pass
1990 in the service name to dbus_set_error() to prevent a crash.
1992 2003-12-26 Anders Carlsson <andersca@gnome.org>
1994 * AUTHORS: Reveal my True identity.
1996 2003-12-17 Mikael Hallendal <micke@imendio.com>
1998 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1999 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
2001 2003-12-13 Mikael Hallendal <micke@imendio.com>
2003 * doc/TODO: Added not about better error check of configuration files.
2005 2003-12-02 Richard Hult <richard@imendio.com>
2007 * Update AFL version to 2.0 throughout the source files to reflect
2008 the update that was done a while ago.
2010 2003-12-02 Richard Hult <richard@imendio.com>
2012 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
2013 wrote_dict_key to FALSE on the iter that the dict is appended to,
2014 just like when appending other types. Fixes a bug where a dict
2015 couldn't be put inside a dict.
2016 (dbus_message_iter_append_dict_key): Fix typo in warning message.
2017 (message_iter_test, _dbus_message_test): Add test case for dict
2020 2003-12-01 David Zeuthen <david@fubar.dk>
2022 * python/dbus.py: Add the actual message when calling the reciever
2023 of a signal such that parameters can be inspected. Add the method
2024 remove_signal_receiver
2026 2003-11-26 Mikael Hallendal <micke@imendio.com>
2030 * glib/*.[ch]: Made ref functions return the pointer
2032 2003-11-25 Zack Rusin <zack@kde.org>
2034 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
2036 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
2039 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
2040 the Integrator and to better fit with the server,
2042 2003-11-24 Zack Rusin <zack@kde.org>
2044 * qt/connection.h, qt/connection.cpp: removing initDbus method since
2045 the integrator handles it now
2047 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
2048 since QTimer wasn't really meant to be used the way DBusTimeout is
2050 2003-11-24 Zack Rusin <zack@kde.org>
2052 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
2053 Integrator class which integrates D-BUS with the Qt event loop,
2055 * qt/connection.h, qt/connection.cpp: Move all the code which
2056 was dealing with D-BUS integration to the Integrator class,
2057 and start using Integrator,
2059 2003-11-23 Zack Rusin <zack@kde.org>
2061 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
2064 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
2065 switching namespaces to DBusQt, reworking the class,
2067 * Makefile.cvs: switching dependencies so that it matches KDE
2070 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
2073 2003-11-19 Havoc Pennington <hp@redhat.com>
2077 * configure.in: bump version to 0.20
2079 * configure.in (have_qt): add yet another place to look for qt
2080 (someone hand trolltech a .pc file...)
2082 2003-11-01 Havoc Pennington <hp@redhat.com>
2084 * doc/dbus-specification.xml: add state machine docs on the auth
2085 protocol; just a first draft, I'm sure it's wrong.
2087 2003-10-28 David Zeuthen <david@fubar.dk>
2089 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
2090 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
2092 2003-10-28 Havoc Pennington <hp@redhat.com>
2094 * dbus/dbus-message.c (get_next_field): delete unused function
2096 2003-10-28 Havoc Pennington <hp@redhat.com>
2098 * bus/expirelist.c (do_expiration_with_current_time): detect
2099 failure of the expire_func due to OOM
2101 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
2103 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
2104 NoReply error that's now created by the bus when the service exits
2106 2003-10-28 Havoc Pennington <hp@redhat.com>
2108 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
2109 tests for set_path, set_interface, set_member, etc.
2111 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
2113 * dbus/dbus-message.c (set_string_field): always just delete and
2114 re-append the field; accept NULL for deletion
2115 (re_align_fields_recurse): reimplement
2117 2003-10-26 Havoc Pennington <hp@redhat.com>
2119 * dbus/dbus-connection.c: fix docs to properly describe the
2120 disconnected message
2121 (_dbus_connection_notify_disconnected): remove this function;
2122 we can't synchronously add the disconnected message, we have to
2123 do it after we've queued any remaining real messages
2124 (_dbus_connection_get_dispatch_status_unlocked): queue the
2125 disconnect message only if the transport has finished queueing all
2126 its real messages and is disconnected.
2127 (dbus_connection_disconnect): update the dispatch status here
2129 2003-10-22 Havoc Pennington <hp@redhat.com>
2131 * bus/bus.c (bus_context_check_security_policy): fix up assertion
2133 * bus/connection.c (bus_transaction_send_from_driver): set the
2134 destination to the connection's base service
2136 2003-10-20 Havoc Pennington <hp@redhat.com>
2138 hmm, make check is currently not passing.
2140 * doc/dbus-specification.xml: add requirement that custom type
2141 names follow the same rules as interface names.
2143 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
2144 duplication and allow 'c' to be 'custom'; dict is now 'm' for
2147 * doc/dbus-specification.xml: update type codes to match
2148 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
2149 CUSTOM. Add type OBJECT_PATH to the spec.
2151 2003-10-17 Havoc Pennington <hp@redhat.com>
2153 * bus/driver.c (create_unique_client_name): use "." as separator
2154 in base service names instead of '-'
2156 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
2157 byte at the end of the string
2159 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
2160 optimization macros since string validation seems to be a slow
2163 * doc/dbus-specification.xml: restrict valid
2164 service/interface/member/error names. Add test suite code for the
2167 * dbus/dbus-string.c: limit service/interface/member/error names
2170 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
2171 format arg to verbose spew
2173 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
2174 memory, return instead of g_error
2176 * test/test-service.c (path_message_func): support emitting a
2179 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
2180 activation bus type if DBUS_BUS_ACTIVATION was set; default to
2181 assuming the activation bus was the session bus so that services
2182 started manually will still register.
2183 (init_connections_unlocked): fix so that in OOM situation we get
2184 the same semantics when retrying the function
2186 * test/test-service.c (main): change to use path registration, to
2187 test those codepaths; register with DBUS_BUS_ACTIVATION rather
2188 than DBUS_BUS_SESSION
2190 2003-10-16 Havoc Pennington <hp@redhat.com>
2192 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
2194 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
2195 coverage of the tests
2196 (coverage-report.txt): don't move the .da and .bbg files around
2198 2003-10-16 Havoc Pennington <hp@redhat.com>
2200 * bus/bus.c (struct BusContext): remove struct field I didn't mean
2203 2003-10-16 Havoc Pennington <hp@redhat.com>
2205 * bus/connection.c (bus_pending_reply_expired): either cancel or
2207 (bus_connections_check_reply): use unlink, not remove_link, as we
2208 don't want to free the link; fixes double free mess
2210 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
2211 where no reply was received
2213 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
2216 * bus/signals.c (match_rule_matches): add special cases for the
2217 bus driver, so you can match on sender/destination for it.
2219 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
2220 DBUS_PRINT_BACKTRACE is set
2222 * dbus/dbus-internals.c: add pid to assertion failure messages
2224 * dbus/dbus-connection.c: add message type code to the debug spew
2226 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
2227 sender=foo not service=foo
2229 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
2230 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
2231 DBUS_ACTIVATION_ADDRESS instead
2233 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
2234 DBUS_SYSTEM_BUS_ADDRESS if appropriate
2236 * bus/bus.c (bus_context_new): handle OOM copying bus type into
2239 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
2240 (dbus_message_iter_get_object_path_array): new function (half
2241 finished, disabled for the moment)
2243 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
2244 DBUS_MESSAGE_TYPE_ERROR
2246 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
2247 avoid redirecting stderr to /dev/null
2248 (babysit): close stdin if not doing the "exit_with_session" thing
2250 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
2251 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
2252 stdout/stdin, so things don't get confused
2254 * bus/system.conf.in: fix to allow replies, I modified .conf
2255 instead of .conf.in again.
2257 2003-10-14 David Zeuthen <david@fubar.dk>
2259 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
2260 argtype to arg_type when raising unknown arg type exception.
2261 Changed type list to reflect the changes in dbus-protocol.h so
2262 the bindings actually work.
2264 2003-10-14 Havoc Pennington <hp@redhat.com>
2266 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
2267 to have a bug keeping it from outputting the .da files sometimes
2268 (string_get_string): don't append garbage nul bytes to the string.
2270 2003-10-15 Seth Nickell <seth@gnome.org>
2272 * python/Makefile.am:
2274 Include dbus_h_wrapper.h in the dist tarball.
2276 2003-10-14 Havoc Pennington <hp@redhat.com>
2278 * bus/bus.c (bus_context_check_security_policy): revamp this to
2279 work more sanely with new policy-based requested reply setup
2281 * bus/connection.c (bus_transaction_send_from_driver): set bus
2282 driver messages as no reply
2284 * bus/policy.c (bus_client_policy_check_can_receive): handle a
2285 requested_reply attribute on allow/deny rules
2287 * bus/system.conf: add <allow requested_reply="true"/>
2289 * bus/driver.c (bus_driver_handle_message): fix check for replies
2290 sent to the bus driver, which was backward. How did this ever work
2291 at all though? I think I'm missing something.
2293 * dbus/dbus-message.c (decode_header_data): require error and
2294 method return messages to have a reply serial field to be valid
2295 (_dbus_message_loader_queue_messages): break up this function;
2296 validate that reply serial and plain serial are nonzero;
2297 clean up the OOM/error handling.
2298 (get_uint_field): don't return -1 from this
2299 (dbus_message_create_header): fix signed/unsigned bug
2301 * bus/connection.c (bus_connections_expect_reply): save serial of
2302 the incoming message, not reply serial
2304 2003-10-14 Havoc Pennington <hp@redhat.com>
2306 * bus/connection.c: implement pending reply tracking using
2309 * bus/bus.c (bus_context_check_security_policy): verify that a
2310 reply is pending in order to allow a reply to be sent. Deny
2311 messages of unknown type.
2313 * bus/dbus-daemon-1.1.in: update to mention new resource limits
2315 * bus/bus.c (bus_context_get_max_replies_per_connection): new
2316 (bus_context_get_reply_timeout): new
2318 2003-10-13 Seth Nickell <seth@gnome.org>
2320 * python/Makefile.am:
2322 Pass "make distcheck": remove a couple files from DIST_FILES
2323 that weren't included in the final version.
2325 2003-10-12 Havoc Pennington <hp@pobox.com>
2327 Added test code that 1) starts an actual bus daemon and 2) uses
2328 DBusGProxy; fixed bugs that were revealed by the test. Lots
2329 more testing possible, but this is the basic framework.
2331 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
2332 empty proxy lists from the proxy list hash
2334 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
2335 couple of return_if_fail checks
2337 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
2338 to allocate, so everything is cleared to NULL as it should be.
2340 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
2341 source as data to dbus_connection_set_timeout_functions() as the
2342 timeout functions expected
2344 * test/glib/run-test.sh: add a little script to start up a message
2345 bus and run tests using it
2347 * tools/dbus-launch.1: updates
2349 * tools/dbus-launch.c (main): add --config-file option
2351 * tools/dbus-launch.c (main): remove confusing else if (runprog)
2352 that could never be reached.
2354 * dbus/dbus-message.c (dbus_message_new_method_return)
2355 (dbus_message_new_error, dbus_message_new_signal): set the
2356 no-reply-expected flag on all these. Redundant, but may
2357 as well be consistent.
2359 2003-10-11 Havoc Pennington <hp@pobox.com>
2361 * test/decode-gcov.c (function_solve_graph): make broken block
2362 graph a nonfatal error since it seems to be broken. Need to debug
2365 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
2366 can't just check type > INVALID < LAST anymore
2368 * dbus/dbus-message.c (dbus_message_get_signature): new function
2369 (dbus_message_has_signature): new function
2370 (struct DBusMessage): add signature field (right now it isn't sent
2371 over the wire, just generated on the fly)
2372 (dbus_message_copy): copy the signature, and init strings to
2373 proper length to avoid some reallocs
2374 (dbus_message_iter_init_array_iterator): return void, since it
2376 (dbus_message_iter_init_dict_iterator): return void since it can't fail
2377 (_dbus_message_loader_queue_messages): add silly temporary hack to
2378 fill in message->signature on load
2380 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
2381 characters, so they are relatively human-readable.
2383 2003-10-11 Havoc Pennington <hp@pobox.com>
2385 * dbus/dbus-message.c (_dbus_message_test): add more test
2386 coverage, but #if 0 for now since they uncover a bug
2387 not fixed yet; I think in re_align_field_recurse()
2388 (re_align_field_recurse): add FIXME about broken assertion
2390 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
2392 * bus/connection.c: share a couple code bits with expirelist.c
2394 * bus/expirelist.h, bus/expirelist.c: implement a generic
2395 expire-items-after-N-seconds facility, was going to share between
2396 expiring connections and replies, decided not to use for expiring
2397 connections for now.
2399 * COPYING: include AFL 2.0 (still need to change all the file headers)
2401 2003-10-09 Havoc Pennington <hp@redhat.com>
2403 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
2404 gcc 3.3. Not that we do anything about it yet.
2406 * bus/signals.c (bus_match_rule_parse): impose max length on the
2409 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
2411 2003-10-09 Havoc Pennington <hp@redhat.com>
2413 Make matching rules theoretically work (add parser).
2415 * bus/bus.c (bus_context_check_security_policy): fix up to handle
2416 the case where destination is explicitly specified as bus driver
2417 and someone else is eavesdropping.
2419 * bus/policy.c (bus_client_policy_check_can_receive): fix up
2420 definition of eavesdropping and assertion
2422 * tools/dbus-send.c (main): use dbus_message_type_from_string
2424 * bus/signals.c (bus_match_rule_parse): implement
2426 * dbus/dbus-message.c (dbus_message_type_from_string): new
2428 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
2430 2003-10-02 Havoc Pennington <hp@pobox.com>
2432 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
2433 dbus_gproxy_oneway_call
2435 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
2436 (dbus_server_setup_with_g_main): fix to allow calling them more
2437 than once on the same args
2438 (dbus_bus_get_with_g_main): new function
2440 2003-10-02 Havoc Pennington <hp@redhat.com>
2442 * doc/dbus-tutorial.xml: write some stuff
2444 2003-09-29 Havoc Pennington <hp@pobox.com>
2446 * configure.in: split checks for Doxygen from XML docs, check for
2449 * doc/Makefile.am: XML-ify all the docs, and add a blank
2452 2003-09-29 Havoc Pennington <hp@pobox.com>
2454 * Merge dbus-object-names branch. To see the entire patch
2455 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
2456 it's huuuuge though.
2457 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
2459 2003-09-28 Havoc Pennington <hp@pobox.com>
2461 * HACKING: update to reflect new server
2463 2003-09-26 Seth Nickell <seth@gnome.org>
2466 * python/examples/example-signals.py:
2468 Start implementing some notions of signals. The API
2469 is really terrible, but they sort of work (with the
2470 exception of being able to filter by service, and to
2471 transmit signals *as* a particular service). Need to
2472 figure out how to make messages come from the service
2475 * python/dbus_bindings.pyx.in:
2477 Removed duplicate message_handler callbacks.
2479 2003-09-25 Havoc Pennington <hp@redhat.com>
2481 * bus/session.conf.in: fix my mess
2483 2003-09-25 Havoc Pennington <hp@pobox.com>
2485 * bus/session.conf.in: fix security policy, reported by Seth Nickell
2487 2003-09-25 Seth Nickell <seth@gnome.org>
2489 * python/examples/example-service.py:
2491 Johan notices complete wrong code in example-service, but
2492 completely wrong in a way that works exactly the same (!).
2493 Johan is confused, how could this possibly work? Example
2494 code fails to serve purpose of making things clear.
2497 2003-09-25 Mark McLoughlin <mark@skynet.ie>
2499 * doc/dbus-specification.sgml: don't require header fields
2500 to be 4-byte aligned and specify that fields should be
2501 distinguished from padding by the fact that zero is not
2504 * doc/TODO: remove re-alignment item and add item to doc
2505 the OBJECT_PATH type.
2507 * dbus/dbus-message.c:
2508 (HeaderField): rename the original member to value_offset
2509 and introduce a name_offset member to keep track of where
2510 the field actually begins.
2511 (adjust_field_offsets): remove.
2512 (append_int_field), (append_uint_field),
2513 (append_string_field): don't align the start of the header
2514 field to a 4-byte boundary.
2515 (get_next_field): impl finding the next marhsalled field
2516 after a given field.
2517 (re_align_field_recurse): impl re-aligning a number of
2518 already marshalled fields.
2519 (delete_field): impl deleting a field of any type and
2520 re-aligning any following fields.
2521 (delete_int_or_uint_field), (delete_string_field): remove.
2522 (set_int_field), (set_uint_field): no need to re-check
2523 that we have the correct type for the field.
2524 (set_string_field): ditto and impl re-aligning any
2526 (decode_header_data): update to take into account that
2527 the fields aren't 4-byte aligned any more and the new
2528 way to distinguish padding from header fields. Also,
2529 don't exit when there is too much header padding.
2530 (process_test_subdir): print the directory.
2531 (_dbus_message_test): add test to make sure a following
2532 field is re-aligned correctly after field deletion.
2534 * dbus/dbus-string.[ch]:
2535 (_dbus_string_insert_bytes): rename from insert_byte and
2536 allow the insert of multiple bytes.
2537 (_dbus_string_test): test inserting multiple bytes.
2539 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2540 warning note to docs about having to re-align any
2541 marshalled values following the string.
2543 * dbus/dbus-message-builder.c:
2544 (append_string_field), (_dbus_message_data_load):
2545 don't align the header field.
2547 * dbus/dbus-auth.c: (process_test_subdir): print the
2550 * test/break-loader.c: (randomly_add_one_byte): upd. for
2553 * test/data/invalid-messages/bad-header-field-alignment.message:
2556 * test/data/valid-messages/unknown-header-field.message: shove
2557 a dict in the unknown field.
2559 2003-09-25 Seth Nickell <seth@gnome.org>
2562 * python/dbus_bindings.pyx.in:
2564 Handle return values.
2566 * python/examples/example-client.py:
2567 * python/examples/example-service.py:
2569 Pass back return values from the service to the client.
2571 2003-09-24 Seth Nickell <seth@gnome.org>
2575 Connect Object methods (when you are sharing an object) up... pass
2576 in a list of methods to be shared. Sharing all the methods just
2577 worked out too weird. You can now create nice Services over the
2580 * python/dbus_bindings.pyx.in:
2582 Keep references to user_data tuples passed into C functions so
2583 Python doesn't garbage collect on us.
2585 Implement MethodReturn and Error subclasses of Message for creating
2586 DBusMessage's of those types.
2588 * python/examples/example-client.py:
2589 * python/examples/example-service.py:
2591 Simple example code showing both how create DBus services and objects,
2592 and how to use them.
2594 2003-09-23 Havoc Pennington <hp@pobox.com>
2596 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2598 2003-09-23 Havoc Pennington <hp@redhat.com>
2600 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2601 (dbus_gproxy_disconnect_signal): implement
2602 (dbus_gproxy_manager_remove_signal_match): implement
2603 (dbus_gproxy_manager_add_signal_match): implement
2604 (dbus_gproxy_oneway_call): implement
2606 2003-09-23 Havoc Pennington <hp@pobox.com>
2608 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2609 subclass. This means dropping the transparent thread safety of the
2610 proxy; you now need a separate proxy per-thread, or your own
2611 locking on the proxy. Probably right anyway.
2612 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2614 2003-09-22 Havoc Pennington <hp@redhat.com>
2616 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2618 2003-09-21 Seth Nickell <seth@gnome.org>
2620 First checkin of the Python bindings.
2622 * python/.cvsignore:
2623 * python/Makefile.am:
2624 * python/dbus_bindings.pyx.in:
2625 * python/dbus_h_wrapper.h:
2627 Pieces for Pyrex to operate on, building a dbus_bindings.so
2628 python module for low-level access to the DBus APIs.
2632 High-level Python module for accessing DBus objects.
2637 Build stuff for the python bindings.
2641 Extra macro needed for finding the Python C header files.
2643 2003-09-21 Havoc Pennington <hp@pobox.com>
2645 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2646 implementing the proxy manager, didn't get very far.
2648 * dbus/dbus-bus.c (dbus_bus_add_match): new
2649 (dbus_bus_remove_match): new
2651 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2652 path_name argument; adjust the other not-yet-implemented
2653 gproxy constructors to be what I think they should be.
2655 2003-09-21 Havoc Pennington <hp@pobox.com>
2657 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2658 by default for message bus connections.
2660 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2661 exit_on_disconnect flag is set and we process the disconnected
2663 (dbus_connection_set_exit_on_disconnect): new function
2665 2003-09-21 Havoc Pennington <hp@pobox.com>
2667 Get matching rules mostly working in the bus; only actually
2668 parsing the rule text remains. However, the client side of
2669 "signal connections" hasn't been started, this patch is only the
2672 * dbus/dispatch.c: fix for the matching rules changes
2674 * bus/driver.c (bus_driver_handle_remove_match)
2675 (bus_driver_handle_add_match): send an ack reply from these
2678 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2679 arguments, reported by Seth Nickell
2681 * bus/config-parser.c (append_rule_from_element): support
2682 eavesdrop=true|false attribute on policies so match rules
2683 can be prevented from snooping on the system bus.
2685 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2686 and "destination" in attribute names; fix some docs bugs;
2687 add eavesdrop=true|false attribute
2689 * bus/driver.c (bus_driver_handle_add_match)
2690 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2693 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2694 rid of broadcast service concept, signals are just always broadcast
2696 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2697 mostly implement matching rules stuff (currently only exposed as signal
2700 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2702 * doc/dbus-specification.sgml: Change the header field name
2703 to be an enum and update the rest of the spec to reference
2704 the fields using the conventinal name.
2706 * dbus/dbus-protocol.h: update to reflect the spec.
2708 * doc/TODO: add item to remove the 4 byte alignment requirement.
2710 * dbus/dbus-message.c: Remove the code to generalise the
2711 header/body length and serial number header fields as named
2712 header fields so we can reference field names using the
2714 (append_int_field), (append_uint_field), (append_string_field):
2715 Append the field name as a byte rather than four chars.
2716 (delete_int_or_uint_field), (delete_string_field): reflect the
2717 fact that the field name and typecode now occupy 4 bytes instead
2719 (decode_string_field), (decode_header_data): update to reflect
2720 protocol changes and move the field specific encoding from
2721 decode_string_field() back into decode_header_data().
2723 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2724 Add utility to aid debugging.
2726 * dbus/dbus-message-builder.c:
2727 (append_string_field), (_dbus_message_data_load): Update to
2728 reflect protocol changes; Change the FIELD_NAME directive
2729 to HEADER_FIELD and allow it to take the field's conventional
2730 name rather than the actual value.
2732 * test/data/*/*.message: Update to use HEADER_FIELD instead
2733 of FIELD_NAME; Always align the header on an 8 byte boundary
2734 *before* updating the header length.
2736 2003-09-15 Havoc Pennington <hp@pobox.com>
2738 * dbus/dbus-pending-call.c: add the get/set object data
2739 boilerplate as for DBusConnection, etc. Use generic object data
2740 for the notify callback.
2742 * glib/dbus-gparser.c (parse_node): parse child nodes
2744 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2746 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2747 contain functions shared between the convenience lib and the
2750 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2751 -export-symbols-regex to the GLib library
2753 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2754 fix the locking in here, and add a default handler for
2755 Introspect() that just returns sub-nodes.
2757 2003-09-14 Havoc Pennington <hp@pobox.com>
2759 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2760 rather than gfoo consistent
2762 * glib/dbus-gproxy.h: delete for now, move contents to
2763 dbus-glib.h, because the include files don't work right since we
2764 aren't in the dbus/ subdir.
2766 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2767 (dbus_gproxy_end_call): finish
2768 (dbus_gproxy_begin_call): finish
2770 * glib/dbus-gmain.c (dbus_set_g_error): new
2772 * glib/dbus-gobject.c (handle_introspect): include information
2773 about child nodes in the introspection
2775 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2776 function to help in implementation of introspection
2778 * dbus/dbus-object-tree.c
2779 (_dbus_object_tree_list_registered_and_unlock): new function
2781 2003-09-12 Havoc Pennington <hp@pobox.com>
2783 * glib/dbus-gidl.h: add common base class for all the foo_info
2786 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2789 * test/Makefile.am: try test srcdir -ef . in addition to test
2790 srcdir = ., one of them should work (yeah lame)
2792 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2795 * glib/dbus-gparser.h: make description_load routines return
2796 NodeInfo* not Parser*
2798 * Makefile.am (SUBDIRS): build test dir after all library dirs
2800 * configure.in: add GTK+ detection
2802 2003-09-07 Havoc Pennington <hp@pobox.com>
2804 * Make Doxygen contented.
2806 2003-09-07 Havoc Pennington <hp@pobox.com>
2808 * doc/dbus-specification.sgml: more updates
2810 2003-09-06 Havoc Pennington <hp@pobox.com>
2812 * doc/dbus-specification.sgml: partial updates
2814 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2815 zillionth time; hopefully I edited the right file this time.
2817 * bus/config-parser.c (append_rule_from_element): support
2818 send_type, send_path, receive_type, receive_path
2820 * bus/policy.c: add message type and path to the list of things
2821 that can be "firewalled"
2823 2003-09-06 Havoc Pennington <hp@pobox.com>
2825 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2826 (dbus_connection_register_object_path): make this not handle
2827 messages to paths below the given path
2829 2003-09-03 Havoc Pennington <hp@pobox.com>
2831 * test/glib/Makefile.am: add this with random glib-linked test
2834 * glib/Makefile.am: remove the random test programs from here,
2835 leave only the unit tests
2837 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2838 uscore/javacaps conversion, and fix
2839 (get_object_property, set_object_property): change to .NET
2840 convention for mapping props to methods, set_FooBar/get_FooBar,
2841 since one language has such a convention we may as well copy it.
2842 Plus real methods in either getFooBar or get_foo_bar style won't
2843 collide with this convention.
2845 2003-09-01 Havoc Pennington <hp@pobox.com>
2847 * glib/dbus-gparser.c: implement
2849 * glib/dbus-gobject.c: start implementing skeletons support
2851 * configure.in: when disabling checks/assert, also define
2852 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2854 2003-09-01 Havoc Pennington <hp@pobox.com>
2856 * glib/Makefile.am: rearrange a bunch of files and get "make
2857 check" framework set up
2859 2003-08-31 Havoc Pennington <hp@pobox.com>
2861 * fix build with --disable-tests
2863 2003-08-30 Havoc Pennington <hp@pobox.com>
2865 * dbus/dbus-connection.c: purge DBusMessageHandler
2867 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2868 use callbacks everywhere
2870 2003-08-30 Havoc Pennington <hp@pobox.com>
2872 * test/data/valid-config-files/system.d/test.conf: change to
2873 root for the user so warnings don't get printed
2875 * dbus/dbus-message.c: add dbus_message_get_path,
2876 dbus_message_set_path
2878 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2879 dispatching to a path
2881 * dbus/dbus-string.c (_dbus_string_validate_path): add
2883 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2884 (_dbus_marshal_object_path): implement
2886 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2887 to contain the path to the target object
2888 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2889 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2891 2003-08-30 Havoc Pennington <hp@pobox.com>
2893 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2895 2003-08-29 Havoc Pennington <hp@pobox.com>
2897 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2899 (struct DBusObjectSubtree): shrink this
2900 a lot, since we may have a lot of them
2901 (_dbus_object_tree_free_all_unlocked): implement
2902 (_dbus_object_tree_dispatch_and_unlock): implement
2904 2003-08-29 Havoc Pennington <hp@pobox.com>
2906 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2908 2003-08-28 Havoc Pennington <hp@pobox.com>
2912 * dbus/dbus-connection.c: port to no ObjectID, create a
2913 DBusObjectTree, rename ObjectTree to ObjectPath in public API
2915 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
2916 everything except UnregisterFunction and MessageFunction
2918 * dbus/dbus-marshal.c: port away from DBusObjectID,
2919 add DBUS_TYPE_OBJECT_PATH
2921 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
2922 dbus/dbus-objectid.[hc]: remove these, we are moving to
2923 path-based object IDs
2925 2003-08-25 Havoc Pennington <hp@pobox.com>
2927 Just noticed that dbus_message_test is hosed, I wonder when I
2928 broke that. I thought make check was passing earlier...
2930 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
2931 container tree, will replace most of dbus-object-registry
2933 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2936 2003-08-19 Havoc Pennington <hp@pobox.com>
2938 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2939 (dbus_message_is_error): fix this function
2941 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2944 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2945 reflect clarified man page
2946 (bus_client_policy_check_can_send): ditto
2948 * bus/session.conf.in: fixup
2950 * bus/system.conf.in: fixup
2952 2003-08-18 Havoc Pennington <hp@redhat.com>
2954 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2956 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2957 dumb bug created earlier (wrong order of args to
2958 decode_header_data())
2960 * tools/dbus-send.c: port
2962 * tools/dbus-print-message.c (print_message): port
2964 * test/data/*messages: port all messages over
2966 * dbus/dbus-message-builder.c: support including
2969 * bus/driver.c: port over
2971 * bus/dispatch.c: port over to new stuff
2973 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2974 rename disconnect signal to "Disconnected"
2976 2003-08-17 Havoc Pennington <hp@pobox.com>
2978 This doesn't compile yet, but syncing up so I can hack on it from
2979 work. What are branches for if not broken code? ;-)
2981 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2982 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2983 DBUS_HEADER_FIELD_ERROR_NAME
2985 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2986 for the interface+member pairs
2987 (string_hash): change to use g_str_hash algorithm
2988 (find_direct_function, find_string_function): refactor these to
2991 * dbus/dbus-message.c: port all of this over to support
2992 interface/member fields instead of name field
2994 * dbus/dbus-object-registry.c: port over
2996 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2997 from _dbus_string_validate_name
2999 * bus/dbus-daemon-1.1: change file format for the
3000 <deny>/<allow> stuff to match new message naming scheme
3002 * bus/policy.c: port over
3004 * bus/config-parser.c: parse new format
3006 2003-08-16 Havoc Pennington <hp@pobox.com>
3008 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
3011 * glib/dbus-gproxy.c: some hacking
3013 2003-08-15 Havoc Pennington <hp@redhat.com>
3015 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
3017 * dbus/dbus-connection.c
3018 (dbus_connection_send_with_reply_and_block): factor out internals;
3019 change to convert any error replies to DBusError instead of
3020 returning them as a message
3022 2003-08-15 Havoc Pennington <hp@pobox.com>
3024 * dbus/dbus-connection.c,
3025 dbus/dbus-pending-call.c: Finish the pending call stuff
3027 2003-08-14 Havoc Pennington <hp@redhat.com>
3029 * dbus/dbus-pending-call.c: start on new object that will replace
3030 DBusMessageHandler and ReplyHandlerData for tracking outstanding
3033 * dbus/dbus-gproxy.c: start on proxy object used to communicate
3034 with remote interfaces
3036 * dbus/dbus-gidl.c: do the boring boilerplate in here
3038 2003-08-12 Havoc Pennington <hp@pobox.com>
3040 * bus/dispatch.c (bus_dispatch): make this return proper
3041 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
3043 * dbus/dbus-errors.c (dbus_set_error): use
3044 _dbus_string_append_printf_valist
3046 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
3047 (_dbus_string_append_printf): new
3049 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
3052 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
3053 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
3054 message is unhandled.
3056 2003-08-11 Havoc Pennington <hp@pobox.com>
3058 * bus/test.c (client_disconnect_handler): change to return
3059 HANDLED (would have been REMOVE_MESSAGE)
3061 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
3062 HANDLED/NOT_YET_HANDLED instead of
3063 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
3066 2003-08-10 Havoc Pennington <hp@pobox.com>
3068 * tools/dbus-send.c (main): add --type argument, for now
3069 supporting only method_call and signal types.
3071 * tools/dbus-print-message.c: print message type
3073 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3074 init connection->objects
3076 * doc/dbus-specification.sgml: fix sgml
3078 * bus/*.c: port over to object-instance API changes
3080 * test/test-service.c: ditto
3082 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
3083 name, we will have to fix up the rest of the code to also handle
3085 (dbus_message_new): generic message-creation call
3086 (set_string_field): allow appending name field
3088 2003-08-06 Havoc Pennington <hp@pobox.com>
3090 * dbus/dbus-object-registry.c: implement signal connection
3093 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
3095 * dbus/dbus-internals.c (_dbus_memdup): new function
3097 2003-08-02 Havoc Pennington <hp@pobox.com>
3099 * dbus/dbus-message.c (dbus_message_get_no_reply)
3100 (dbus_message_set_no_reply): add these and remove
3101 set_is_error/get_is_error
3103 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
3104 remove the ERROR flag, since there's now an ERROR type
3106 2003-08-01 Havoc Pennington <hp@pobox.com>
3108 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
3111 * dbus/dbus-message.c (dbus_message_get_type): new function
3113 * doc/dbus-specification.sgml: add "type" byte to messages
3115 2003-08-01 Havoc Pennington <hp@pobox.com>
3117 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
3118 a message type enum to distinguish kinds of message
3119 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
3120 that need not be replied to
3122 2003-08-01 Havoc Pennington <hp@pobox.com>
3124 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
3125 (unpack_8_octets): fix no-64-bit-int bug
3127 * dbus/dbus-object-registry.c (validate_id): validate the
3128 connection ID bits, not just the instance ID.
3130 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
3131 the connection-global 33 bits of the object ID
3133 * dbus/dbus-object-registry.c (info_from_entry): fill in
3134 object ID in the new way
3136 * dbus/dbus-objectid.h: rather than high/low bits, specifically
3137 define server/client/instance bits.
3139 2003-07-30 Havoc Pennington <hp@pobox.com>
3141 * dbus/dbus-connection.c (dbus_connection_register_object): fix
3144 2003-07-13 Havoc Pennington <hp@pobox.com>
3146 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
3147 fields to DBusObjectVTable and DBusObjectInfo
3149 2003-07-12 Havoc Pennington <hp@pobox.com>
3151 * dbus/dbus-object-registry.c: implement unit test,
3152 fix bugs discovered in process
3154 * dbus/dbus-connection.c: remove handler_table and
3155 register_handler(), add DBusObjectRegistry usage
3157 * dbus/dbus-objectid.c (dbus_object_id_is_null)
3158 (dbus_object_id_set_null): new functions
3160 2003-07-08 Havoc Pennington <hp@pobox.com>
3162 * dbus/dbus-object.c: implement some of this
3164 * dbus/dbus-object-registry.c
3165 (_dbus_object_registry_add_and_unlock): fill in the object_id out
3167 (_dbus_object_registry_new): handle OOM
3169 2003-07-08 Havoc Pennington <hp@pobox.com>
3171 * dbus/dbus-object.h: sketch out an API for registering objects
3172 with a connection, that allows us to use as little as 24 bytes
3173 per object and lets application code represent an object in
3174 any conceivable way.
3176 * dbus/dbus-object-registry.c: implement the hard bits of the
3177 DBusConnection aspect of object API. Not yet wired up.
3179 2003-07-06 Havoc Pennington <hp@pobox.com>
3181 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
3182 (_dbus_marshal_object_id): new
3183 (_dbus_demarshal_object_id): new
3184 (_dbus_marshal_get_arg_end_pos): support object ID type, and
3185 consolidate identical switch cases. Don't conditionalize handling
3186 of DBUS_TYPE_UINT64, need to handle the type always.
3187 (_dbus_marshal_validate_arg): consolidate identical cases, and
3188 handle DBUS_TYPE_OBJECT_ID
3190 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
3192 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
3194 2003-09-28 Havoc Pennington <hp@pobox.com>
3198 2003-09-28 Havoc Pennington <hp@pobox.com>
3200 * doc/Makefile.am (dbus-specification.html): testing a funky hack
3201 to work with Debian db2html
3203 2003-09-28 Havoc Pennington <hp@pobox.com>
3205 * configure.in: 0.13
3207 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
3208 stylesheet-images for benefit of Debian
3210 Change back to using filesystem-linked sockets for the system
3211 bus, so only root can create the default system bus address.
3213 * bus/system.conf.in: change to use
3214 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3216 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
3219 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3220 here, and AC_DEFINE DBUS_SYSTEM_PATH
3222 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3225 * doc/busconfig.dtd:
3228 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3230 * doc/dbus-specification.sgml:
3231 Add activation reply values.
3233 2003-08-05 Havoc Pennington <hp@redhat.com>
3235 * configure.in: 0.12
3237 2003-08-05 Anders Carlsson <andersca@codefactory.se>
3239 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
3240 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
3241 (add_watch), (remove_watch), (create_source):
3242 Refcount fds, fixes some reentrancy issues.
3244 2003-07-30 Havoc Pennington <hp@redhat.com>
3246 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
3247 bus address to be abstract if we have abstract sockets
3251 2003-07-28 Havoc Pennington <hp@redhat.com>
3253 * bus/messagebus.in: fix to avoid processname/servicename
3254 confusion, from Michael Kearey
3255 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
3257 2003-07-23 Havoc Pennington <hp@pobox.com>
3259 * dbus/dbus-message.c (dbus_message_iter_get_named):
3260 fix from Andy Hanton to remove broken "+1"
3262 2003-07-16 Havoc Pennington <hp@pobox.com>
3264 * tools/dbus-launch.c (babysit): close stdout/stderr in the
3265 babysitter process, as suggested by Thomas Leonard, so
3266 an "eval `dbus-launch --exit-with-session`" will actually
3269 2003-07-16 Havoc Pennington <hp@pobox.com>
3271 * configure.in: print out EXPANDED_* variables in the summary at
3272 the end; clean up the code that computes EXPANDED_ variables and
3273 get the ones using exec_prefix right. Should make things work
3274 when you build without --prefix
3276 2003-06-29 Havoc Pennington <hp@pobox.com>
3278 * mono/Test.cs (class Test): fire up a main loop and run it
3280 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
3281 done once, the app has to do it
3283 2003-06-26 Havoc Pennington <hp@pobox.com>
3285 * mono/Connection.cs: set up connection with the glib main loop
3287 2003-07-01 Havoc Pennington <hp@redhat.com>
3289 * doc/dbus-specification.sgml: clarify the format of a type code,
3290 change suggested by Jim Blandy
3292 2003-06-29 Miloslav Trmac <mitr@volny.cz>
3295 * tools/Makefile.am: Don't assume srcdir == builddir.
3297 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
3298 the allocated block.
3299 (_dbus_memory_test): New function.
3300 * dbus/dbus-test.h: Add _dbus_memory_test ().
3301 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
3303 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
3305 (dbus_message_new): Remove obsolete @todo.
3307 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
3308 (_dbus_marshal_set_uint64): Fix comment.
3310 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
3311 hardcode FIELD_REPLY_SERIAL.
3313 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
3314 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
3316 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
3317 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
3319 2003-06-24 Havoc Pennington <hp@pobox.com>
3321 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
3323 2003-06-23 Anders Carlsson <andersca@codefactory.se>
3329 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
3330 * gcj/org/.cvsignore:
3331 * gcj/org/Makefile.am:
3332 * gcj/org/freedesktop/.cvsignore:
3333 * gcj/org/freedesktop/Makefile.am:
3334 * gcj/org/freedesktop/dbus/.cvsignore:
3335 * gcj/org/freedesktop/dbus/Makefile.am:
3336 * gcj/org/freedesktop/dbus/Message.java: (Message),
3338 * gcj/org/freedesktop/dbus/natMessage.cc:
3339 Fix the build system.
3341 2003-06-22 Havoc Pennington <hp@pobox.com>
3343 * mono/Connection.cs: add more bindings
3345 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
3348 2003-06-22 Havoc Pennington <hp@pobox.com>
3350 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
3351 Start wrapping more stuff.
3353 2003-06-22 Havoc Pennington <hp@pobox.com>
3355 * mono/Message.cs: implement Message.Wrap() that ensures we only
3356 have a single C# wrapper per DBusMessage, assuming it works which
3357 it probably doesn't.
3359 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
3360 (dbus_message_free_data_slot): new
3361 (dbus_message_set_data): new
3362 (dbus_message_get_data): new
3364 2003-06-22 Havoc Pennington <hp@pobox.com>
3366 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
3367 (_dbus_data_slot_allocator_alloc): rework these to keep a
3368 reference count on each slot and automatically manage a global
3369 slot ID variable passed in by address
3371 * bus/bus.c: convert to new dataslot API
3373 * dbus/dbus-bus.c: convert to new dataslot API
3375 * dbus/dbus-connection.c: convert to new dataslot API
3377 * dbus/dbus-server.c: convert to new dataslot API
3379 * glib/dbus-gmain.c: ditto
3383 * bus/connection.c: ditto
3385 2003-06-22 Anders Carlsson <andersca@codefactory.se>
3387 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
3388 after the gcj checks so that the correct configuration tags
3389 will be added to libtool.
3391 * dbus-glib-1.pc.in: No need to specify any includes since
3392 dbus-1.pc.in has those.
3394 2003-06-22 Havoc Pennington <hp@pobox.com>
3396 * mono/*, gcj/*, configure.in, Makefile.am:
3397 Check in makefiles and subdirs for mono and gcj bindings.
3398 Neither binding actually exists, just trying to get through
3399 all the build and other boring bits.
3401 2003-06-21 Philip Blundell <philb@gnu.org>
3403 * tools/dbus-monitor.1: Updated.
3405 * tools/dbus-send.1: Likewise.
3407 2003-06-20 Anders Carlsson <andersca@codefactory.se>
3409 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
3410 for hangup and error after checking read so we won't discard
3411 pending data if both hangup and read are set.
3413 2003-06-19 Philip Blundell <philb@gnu.org>
3415 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
3417 * tools/dbus-send.c: Accept both --system and --session.
3419 * tools/dbus-monitor.c: Same here.
3421 2003-06-19 Anders Carlsson <andersca@codefactory.se>
3423 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
3424 from C++ (Patch by Miloslav Trmac).
3426 2003-06-15 Joe Shaw <joe@assbarn.com>
3428 * configure.in: Check for socklen_t.
3430 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
3432 * test/test-segfault.c: Add #include <sys/time.h>
3434 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
3435 dbus-launch needs it.
3437 2003-06-09 Havoc Pennington <hp@redhat.com>
3439 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
3440 SUN_LEN, it breaks abstract socket usage
3442 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
3445 2003-06-04 Havoc Pennington <hp@pobox.com>
3447 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
3448 using unix:abstract=/foo, and when listening in a tmpdir
3449 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
3451 * dbus/dbus-transport.c (_dbus_transport_open): support
3454 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3455 support abstract sockets
3457 * dbus/dbus-transport-unix.c
3458 (_dbus_transport_new_for_domain_socket): support abstract sockets
3460 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
3461 toggle as an argument, implement abstract namespace support
3462 (_dbus_listen_unix_socket): ditto
3464 * configure.in: add --enable-abstract-sockets and implement
3465 a configure check for autodetection of the right value.
3467 2003-06-01 Havoc Pennington <hp@pobox.com>
3469 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
3470 in /tmp (though on Linux this will end up being useless,
3471 when we add abstract namespace support)
3473 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
3476 2003-05-28 Colin Walters <walters@verbum.org>
3478 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
3480 2003-05-18 Anders Carlsson <andersca@codefactory.se>
3482 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
3484 2003-05-17 Colin Walters <walters@gnu.org>
3486 * tools/dbus-send.c: Don't exit with an error code if --help was
3487 passed. Default to using the session bus instead of the system
3490 * tools/dbus-launch.c: Ditto.
3492 * tools/dbus-monitor.c: Ditto.
3494 * tools/dbus-send.1: Update with new arguments.
3496 * tools/dbus-launch.c: Emit code to export variables. New
3497 arguments -s and -c to specify shell syntax, and a bit of code to
3498 autodetect syntax. Also, allow specifying a program to run.
3500 * tools/dbus-launch.1: Update with new arguments.
3502 * tools/dbus-send.1: Ditto.
3504 * tools/dbus-monitor.1: Ditto.
3506 2003-05-17 Havoc Pennington <hp@pobox.com>
3508 * bus/config-parser.c (merge_included): merge in policies from
3509 child configuration file.
3511 * bus/policy.c (bus_policy_merge): function to merge two policies
3514 2003-05-16 Havoc Pennington <hp@redhat.com>
3516 * dbus/dbus-connection.c: disable verbose lock spew
3518 * tools/dbus-send.c: add --print-reply command line option
3520 * tools/dbus-print-message.h (print_message): new util function
3521 shared by dbus-send and dbus-monitor
3523 * tools/dbus-monitor.c (handler_func): exit on disconnect
3525 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3526 disconnected, don't try to use the read_watch
3528 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3529 so we can find this bug more easily
3531 2003-05-16 Havoc Pennington <hp@redhat.com>
3533 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3534 NULL as DBusHashTable is annoyingly likely to do.
3536 2003-05-16 Colin Walters <walters@verbum.org>
3538 * tools/dbus-monitor.c: Add --session argument and usage()
3541 * tools/dbus-monitor.1: Update with new --session arg.
3543 * bus/Makefile.am (install-data-hook): Create
3544 $(libdir)/dbus-1.0/services so that the session bus is happy.
3546 2003-05-15 Havoc Pennington <hp@redhat.com>
3548 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3549 on non-x86. ifdef's are evil.
3551 2003-05-15 Havoc Pennington <hp@redhat.com>
3553 * configure.in: 0.11
3557 * bus/Makefile.am (initddir): apparently we are supposed to put
3558 init scripts in /etc/rc.d/init.d not /etc/init.d
3560 * bus/Makefile.am: remove the "you must --enable-tests to make
3561 check" as it broke distcheck
3563 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3565 2003-05-13 James Willcox <jwillcox@gnome.org>
3568 * bus/activation.c: (bus_activation_service_created),
3569 (bus_activation_activate_service):
3570 * bus/driver.c: (bus_driver_send_service_deleted),
3571 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3572 (bus_driver_send_service_acquired),
3573 (bus_driver_send_welcome_message),
3574 (bus_driver_handle_list_services):
3575 * bus/session.conf.in:
3576 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3577 (dbus_bus_service_exists), (dbus_bus_activate_service):
3580 Add some convenience API which lets you activate a service, and did a
3581 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3582 and dbus_message_get_args()
3584 2003-05-11 Havoc Pennington <hp@pobox.com>
3586 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3587 calling _dbus_marshal_validate_arg() for every byte in a byte
3590 * dbus/dbus-message-handler.c: use atomic reference counting to
3591 reduce number of locks slightly; the global lock in here sucks
3593 * dbus/dbus-connection.c
3594 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3595 update_dispatch_status that can be called with lock held; then use
3596 in a couple places to reduce locking/unlocking
3597 (dbus_connection_send): hold the lock over the whole function
3598 instead of acquiring it twice.
3600 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3602 * bus/connection.c (bus_connections_setup_connection): fix access
3603 to already-freed memory.
3605 * dbus/dbus-connection.c: keep a little cache of linked list
3606 nodes, to avoid using the global linked list alloc lock in the
3607 normal send-message case. Instead we just use the connection lock
3608 that we already have to take.
3610 * dbus/dbus-list.c (_dbus_list_find_last): new function
3612 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3613 change to use a struct for the atomic type; fix docs,
3614 they return value before increment, not after increment.
3616 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3617 (_dbus_string_append_8_aligned): new functions to try to
3618 microoptimize this operation.
3619 (reallocate_for_length): break this out of set_length(), to
3620 improve profile info, and also so we can consider inlining the
3623 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3624 strings with some preallocation, cuts down on our calls to realloc
3625 a fair bit. Though if we can get the "move entire string to empty
3626 string" optimization below to kick in here, it would be better.
3628 * dbus/dbus-string.c (_dbus_string_move): just call
3629 _dbus_string_move_len
3630 (_dbus_string_move_len): add a special case for moving
3631 an entire string into an empty string; we can just
3632 swap the string data instead of doing any reallocs.
3633 (_dbus_string_init_preallocated): new function
3635 2003-05-11 Havoc Pennington <hp@pobox.com>
3637 Write a "test-profile" that does echo client-server with threads;
3638 profile reveals lock contention, memcpy/realloc of buffers, and
3639 UTF-8 validation as hot spots. 20% of lock contention eliminated
3640 with dbus_atomic_inc/dec implementation on x86. Much remaining
3641 contention is global mempool locks for GList and DBusList.
3643 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3646 * dbus/dbus-connection.c (struct DBusConnection): use
3647 dbus_atomic_t for the reference count
3649 * dbus/dbus-message.c (struct DBusMessage): declare
3650 dbus_atomic_t values as volatile
3652 * configure.in: code to detect ability to use atomic integer
3653 operations in assembly, from GLib patch
3655 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3656 time, tired of it being wrong in threads and forked processes
3658 * glib/test-profile.c: a little program to bounce messages back
3659 and forth between threads and eat CPU
3661 * dbus/dbus-connection.c: add debug spew macros for debugging
3662 thread locks; include config.h at top; fix deadlock in
3663 dbus_connection_flush()
3665 2003-05-08 Havoc Pennington <hp@pobox.com>
3667 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3668 data from getting written, and there wasn't a good reason to
3671 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3672 dbus_verbose lines in test coverage
3673 (main): add list of functions sorted by # of untested blocks
3674 to the coverage report
3676 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3678 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3680 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3681 extend test coverage
3683 * test/data/auth/cancel.auth-script: test canceling an
3686 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3687 aren't used. in CVS history if we end up needing them.
3689 2003-05-04 Havoc Pennington <hp@pobox.com>
3691 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3694 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3695 function, which assumed length was in # of strings, not bytes
3697 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3700 * dbus/dbus-connection.c
3701 (_dbus_connection_queue_received_message): disable function for
3702 now, we are only using it in test mode
3704 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3705 remove a mistaken FIXME
3707 2003-05-04 Havoc Pennington <hp@pobox.com>
3709 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3710 unlock mutex on successful return, patch from Anders Gustafsson
3712 2003-05-04 Havoc Pennington <hp@pobox.com>
3714 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3717 2003-05-04 Havoc Pennington <hp@pobox.com>
3719 * tools/dbus-launch.c: implement
3721 * bus/main.c (main), bus/bus.c (bus_context_new):
3722 implement --print-pid and --fork
3724 2003-05-03 Havoc Pennington <hp@redhat.com>
3726 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3727 the address had no value, and add to test suite. Fix and
3728 regression test from Miloslav Trmac
3730 2003-05-03 Havoc Pennington <hp@pobox.com>
3732 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3733 watch is invalid when handled
3735 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3736 dbus-launch utility to launch the bus from a shell script. Didn't
3737 actually implement dbus-launch yet, it's just a placeholder still.
3739 2003-05-03 Havoc Pennington <hp@pobox.com>
3741 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3742 daemon; also documents daemon config file, so replaces
3743 doc/config-file.txt. Corrected some stuff from config-file.txt in
3744 the process of moving it.
3746 2003-05-03 Havoc Pennington <hp@pobox.com>
3748 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3751 2003-05-03 Colin Walters <walters@verbum.org>
3753 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3754 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3756 * Makefile.am: Update to use new .pc versioning scheme.
3758 2003-05-02 Havoc Pennington <hp@redhat.com>
3760 * bus/system.conf.in: allow send/receive to/from message bus
3763 2003-04-30 Havoc Pennington <hp@redhat.com>
3765 * configure.in: print a note when building with unit tests and
3768 2003-04-30 Havoc Pennington <hp@redhat.com>
3770 * Makefile.am: add a check-local that complains if you didn't
3771 configure with --enable-tests
3773 2003-04-29 Havoc Pennington <hp@redhat.com>
3775 * glib/dbus-gmain.c: docs cleanups
3777 * dbus/dbus-types.h: add docs on int64 types
3779 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3780 public API docs section
3782 2003-04-29 Havoc Pennington <hp@redhat.com>
3784 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3785 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3786 parallel install API version, not with the D-BUS package version.
3788 * HACKING: move some of README over here
3790 * README: updates, and document API/ABI policy
3792 * configure.in: reindentation
3794 2003-04-29 Havoc Pennington <hp@redhat.com>
3796 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3797 to use this library" to be sure people have the right
3800 2003-04-28 Havoc Pennington <hp@redhat.com>
3802 * configure.in: add --enable-docs which by default is auto yes if
3803 doxygen and db2html found, no otherwise; but can be forced on/off
3805 * doc/Makefile.am: conditionalize whether to build docs on
3808 2003-04-28 Havoc Pennington <hp@redhat.com>
3810 * configure.in: 0.10
3814 * bus/system.conf.in: add <includedir>system.d</includedir>
3816 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3817 username was provided but not uid
3819 * bus/config-parser.c (struct BusConfigParser): keep track of
3820 whether the parser is toplevel or was included; change some
3821 of the error handling if it's included.
3823 2003-04-27 Havoc Pennington <hp@pobox.com>
3827 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3828 report correct status if we finish processing authentication
3829 inside this function.
3831 * bus/activation.c (try_send_activation_failure): use
3832 bus_transaction_send_error_reply
3834 * bus/connection.c (bus_connection_get_groups): return an error
3835 explaining the problem
3837 * bus/bus.c (bus_context_check_security_policy): implement
3838 restriction here that inactive connections can only send the
3839 hello message. Also, allow bus driver to send anything to
3842 * bus/connection.c (bus_connection_complete): create the
3843 BusClientPolicy here instead of on-demand.
3844 (bus_connection_get_policy): don't return an error
3846 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3847 sender field in message being replied to
3849 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3850 causing it to return FALSE always
3852 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3853 we checked sender rather than destination
3855 2003-04-25 Havoc Pennington <hp@redhat.com>
3857 test suite is slightly hosed at the moment, will fix soon
3859 * bus/connection.c (bus_connections_expire_incomplete): fix to
3860 properly disable the timeout when required
3861 (bus_connection_set_name): check whether we can remove incomplete
3862 connections timeout after we complete each connection.
3864 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3865 probably still broken.
3867 * bus/services.c (bus_registry_acquire_service): implement max
3868 number of services owned, and honor allow/deny rules on which
3869 services a connection can own.
3871 * bus/connection.c (bus_connection_get_policy): report errors here
3873 * bus/activation.c: implement limit on number of pending
3876 2003-04-25 Havoc Pennington <hp@redhat.com>
3878 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3879 where we used >= 0 instead of != DBUS_UID_UNSET.
3881 2003-04-25 Havoc Pennington <hp@redhat.com>
3883 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3884 were toggled without add/remove, fix from Anders Gustafsson
3886 2003-04-24 Havoc Pennington <hp@redhat.com>
3888 * test/data/valid-config-files/basic.conf: add <limit> tags to
3891 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3892 <limit> tag in configuration file.
3894 2003-04-24 Havoc Pennington <hp@redhat.com>
3896 * bus/dispatch.c: somehow missed some name_is
3898 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3899 (_dbus_timeout_set_interval): new
3901 * bus/connection.c (bus_connections_setup_connection): record time
3902 when each connection is first set up, and expire them after the
3903 auth timeout passes.
3905 2003-04-24 Havoc Pennington <hp@redhat.com>
3907 * dbus/dbus-message.c (dbus_message_name_is): rename
3908 (dbus_message_service_is): rename
3909 (dbus_message_sender_is): rename
3910 (dbus_message_get_service): rename
3912 2003-04-24 Havoc Pennington <hp@redhat.com>
3914 * configure.in: add --enable-checks
3916 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3918 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3919 to use thread locks.
3920 (_dbus_connection_handler_destroyed_locked): move some private
3921 functions into proper docs group
3923 * dbus/dbus-internals.h: add _dbus_return_if_fail,
3924 _dbus_return_val_if_fail
3926 Throughout: use dbus_return_if_fail
3928 2003-04-23 James Willcox <jwillcox@gnome.org>
3931 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3932 (dbus_connection_setup_with_g_main),
3933 (dbus_server_setup_with_g_main):
3934 * glib/test-dbus-glib.c: (main):
3935 * glib/test-thread-client.c: (main):
3936 * glib/test-thread-server.c: (new_connection_callback), (main):
3937 * tools/dbus-monitor.c: (main):
3939 Added a GMainContext argument to dbus_connection_setup_with_g_main()
3940 and dbus_server_setup_with_g_main().
3942 2003-04-20 Havoc Pennington <hp@pobox.com>
3944 * doc/dbus-specification.sgml: document the restrictions on
3945 message and service names
3947 2003-04-22 Havoc Pennington <hp@redhat.com>
3949 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3950 support, and do some code cleanups to share more code and
3951 speed up array marshal/demarshal.
3953 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3955 * configure.in: generate dbus-arch-deps.h
3957 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3960 2003-04-22 Havoc Pennington <hp@redhat.com>
3962 * test/data/valid-messages/opposite-endian.message: fix test
3963 to use proper type for rply field
3965 * test/data/invalid-messages: add tests for below validation
3967 * dbus/dbus-message.c (decode_header_data): validate field types,
3968 and validate that named fields are valid names
3969 (decode_name_field): consider messages in the
3970 org.freedesktop.Local. namespace to be invalid.
3972 * dbus/dbus-string.c (_dbus_string_validate_name): new
3974 2003-04-19 Havoc Pennington <hp@pobox.com>
3976 * bus/driver.c (bus_driver_handle_hello): check limits and
3977 return an error if they are exceeded.
3979 * bus/connection.c: maintain separate lists of active and inactive
3980 connections, and a count of each. Maintain count of completed
3981 connections per user. Implement code to check connection limits.
3983 * dbus/dbus-list.c (_dbus_list_unlink): export
3985 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3986 number of bytes in the message queue for a connection
3988 2003-04-18 Havoc Pennington <hp@pobox.com>
3990 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3992 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3995 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3996 on realloc be sure to update the pointer in the keyring
3998 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3999 offset to avoid writing to unallocated memory
4001 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
4002 try the next mechanism, so we properly handle OOM
4004 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
4006 (_dbus_keyring_new): fix OOM bug
4007 (_dbus_keyring_new_homedir): always set error; impose a maximum
4008 number of keys we'll load from the file, mostly to speed up the
4009 test suite and make its OOM checks more useful, but also for
4012 * dbus/dbus-auth.c (process_error_server): reject authentication
4013 if we get an error from the client
4014 (process_cancel): on cancel, send REJECTED, per the spec
4015 (process_error_client): send CANCEL if we get an error from the
4018 2003-04-18 Havoc Pennington <hp@pobox.com>
4020 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
4023 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
4026 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
4027 about DBUS_TEST_HOMEDIR once
4029 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
4032 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
4033 config file so we test the right thing
4035 Throughout: assorted docs improvements
4037 2003-04-18 Havoc Pennington <hp@pobox.com>
4039 * glib/dbus-gmain.c: adapt to watch changes
4041 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
4043 * dbus/dbus-server.h: remove dbus_server_handle_watch
4045 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
4047 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
4048 like DBusTimeout, so we don't need dbus_connection_handle_watch
4051 2003-04-17 Havoc Pennington <hp@redhat.com>
4053 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
4054 database usage so it all goes via the DBusUserDatabase cache.
4056 2003-04-17 Havoc Pennington <hp@redhat.com>
4058 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
4059 there was an OOM watch we skipped, we always return TRUE so we
4060 iterate again to have a look at it again. Fixes test suite hang.
4061 Code rearrangement also lets us lose some memset and only iterate
4062 over callbacks once.
4064 * bus/driver.c (bus_driver_handle_message): sense of test for
4067 2003-04-16 Havoc Pennington <hp@pobox.com>
4069 * doc/dbus-specification.sgml: make spec say serials are unsigned
4071 * dbus/dbus-message.h: change message serials to unsigned
4073 * dbus/dbus-connection.c: adapt to message serials being unsigned
4075 2003-04-15 Havoc Pennington <hp@pobox.com>
4077 * bus/bus.c: create and keep around a shared DBusUserDatabase
4080 * bus/connection.c (bus_connection_get_groups): don't cache
4081 groups for user in the connection object, since user database
4082 object now does that.
4084 2003-04-16 Havoc Pennington <hp@redhat.com>
4086 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
4087 list of size counters
4088 (_dbus_message_loader_putback_message_link): put back a popped link
4090 * dbus/dbus-connection.c
4091 (dbus_connection_set_max_live_messages_size): rename
4093 (dbus_connection_get_outgoing_size): get size of outgoing
4095 (_dbus_connection_set_connection_counter): remove this cruft
4097 2003-04-14 Havoc Pennington <hp@redhat.com>
4099 * dbus/dbus-userdb.c: user database abstraction, mostly to get
4100 caching, but at some point we might want to be able to use a
4103 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
4104 SHA1 conf file to test the sha1 auth mechanism, since the regular
4105 test always uses EXTERNAL when available.
4108 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
4109 add conf file that requires use of sha1 auth
4111 2003-04-13 Havoc Pennington <hp@pobox.com>
4113 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
4114 from Philip Blundell to send messages and monitor them.
4116 2003-04-13 Havoc Pennington <hp@pobox.com>
4118 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
4121 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
4124 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4125 fix to only recover unused bytes if we're already authenticated
4126 (_dbus_transport_get_is_authenticated): fix to still mark us
4127 authenticated if there are unused bytes.
4129 * bus/dispatch.c: implement security policy checking
4131 * bus/connection.c (bus_transaction_send_from_driver): new
4133 * bus/bus.c (bus_context_check_security_policy): new
4135 * bus/dispatch.c (send_service_nonexistent_error): delete this,
4136 now we just set the DBusError and it gets converted to an error
4139 * bus/connection.c (allow_user_function): enable code using actual
4140 data from the config file
4142 * bus/policy.c (list_allows_user): handle wildcard rules for
4143 user/group connection perms
4145 2003-04-13 Havoc Pennington <hp@pobox.com>
4147 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
4149 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
4151 * bus/policy.c (bus_policy_append_mandatory_rule)
4152 (bus_policy_append_default_rule, bus_policy_append_user_rule)
4153 (bus_policy_append_group_rule): new functions
4155 2003-04-12 Havoc Pennington <hp@pobox.com>
4157 * bus/config-parser.c (bus_config_parser_new): fix a memleak
4159 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
4160 the pid/gid/uid, just for paranoia.
4162 * test/break-loader.c (randomly_do_n_things): find a byte
4163 containing a type code, and randomly change it to a different
4166 2003-04-12 Havoc Pennington <hp@pobox.com>
4168 * bus/policy.h: change BusPolicy to be the thing from the config
4169 file, and rename old BusPolicy to BusClientPolicy
4171 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
4172 match change in how policy works
4174 * dbus/dbus-internals.h: mark assert_not_reached as
4175 __attribute((noreturn))__
4177 2003-04-11 Havoc Pennington <hp@redhat.com>
4179 * doc/dbus-specification.sgml: fix a spot with the wrong name for
4180 the broadcast service. Use boolean return for ServiceExists.
4182 2003-04-11 Havoc Pennington <hp@redhat.com>
4184 * configure.in: add another directory to look for qt in.
4186 2003-04-11 Havoc Pennington <hp@redhat.com>
4188 * AUTHORS: add Colin Walters
4190 2003-04-11 Havoc Pennington <hp@redhat.com>
4196 2003-04-11 Havoc Pennington <hp@redhat.com>
4198 * bus/messagebus.in: remove pid file when stopping the
4199 message bus, since the bus won't have privileges to remove it
4202 2003-04-11 Havoc Pennington <hp@redhat.com>
4204 * bus/bus.c (bus_context_new): move credentials change after
4207 2003-04-11 Havoc Pennington <hp@pobox.com>
4209 * test/decode-gcov.c: add "below average functions" to the
4210 coverage report, and change how some of the code works.
4212 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
4213 not in the coverage stats.
4215 * test/test-service.c (main): use _dbus_verbose not fprintf in a
4216 couple places so running the test suite doesn't result in megaspam.
4218 2003-04-11 Havoc Pennington <hp@pobox.com>
4220 * bus/dispatch.c (check_existent_service_activation): accept a no
4221 memory error in a place we didn't before
4223 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
4224 in case the first one failed," since the test suite is less
4227 2003-04-10 Havoc Pennington <hp@pobox.com>
4229 * bus/dispatch.c (check_segfault_service_activation): add test
4230 for launching an executable that just crashes.
4232 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
4233 don't leave a million cores. We'll see how portable this is.
4235 2003-04-10 Havoc Pennington <hp@pobox.com>
4237 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
4238 the possible parent failures before we fork, so that we don't
4239 fail to create a babysitter after creating the child.
4241 * bus/activation.c (bus_activation_activate_service): kill child
4242 if we don't successfully complete the activation.
4244 2003-04-10 Havoc Pennington <hp@redhat.com>
4246 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
4247 the connection if it's disconnected
4249 * bus/activation.c (bus_activation_service_created): use new
4250 transaction features to roll back removal of pending activation if
4251 we don't successfully create the service after all. Don't remove
4252 pending activation if the function fails.
4254 * dbus/dbus-list.c (_dbus_list_insert_before_link)
4255 (_dbus_list_insert_after_link): new code to facilitate
4258 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
4259 new functionality, so we can preallocate the ability to insert
4262 * bus/connection.c (bus_transaction_add_cancel_hook): new function
4263 allowing us to put custom hooks in a transaction to be used for
4264 cancelling said transaction
4266 * doc/dbus-specification.sgml: add some discussion of secondary
4267 service owners, and disallow zero-length service names
4269 * bus/services.c (bus_registry_acquire_service): new function,
4270 splits out part of bus_driver_handle_acquire_service() and fixes
4271 a bug where we didn't remove the service doing the acquiring
4272 from the secondary queue if we failed to remove the current owner
4273 from the front of the queue.
4275 2003-04-10 Alexander Larsson <alexl@redhat.com>
4277 * doc/dbus-specification.sgml:
4278 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
4280 2003-04-10 Alexander Larsson <alexl@redhat.com>
4285 Added files to cvsignore
4287 * dbus/dbus-message.h:
4288 * dbus/dbus-message.c: (dbus_message_iter_get_named):
4289 Make get_named() take two out argument and return a boolean.
4290 (dbus_message_iter_get_args_valist):
4291 Update usage of get_named().
4292 (dbus_message_iter_append_byte):
4294 (dbus_message_iter_append_named)
4296 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
4299 2003-04-10 Alexander Larsson <alexl@redhat.com>
4301 * dbus/dbus-marshal.[ch]:
4302 Add array_type_pos argument to _dbus_marshal_validate_arg.
4303 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
4305 * dbus/dbus-message.[ch]:
4306 Multi-dimensional arrays have full type specification in the
4307 outermost array. Iter code re-arranged to handle this.
4308 Added some more iter tests.
4310 * doc/dbus-specification.sgml:
4313 Update new array encoding description.
4314 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
4316 * test/data/invalid-messages/array-with-mixed-types.message:
4317 * test/data/valid-messages/array-of-array-of-uint32.message:
4318 Change to the new array format.
4320 * test/data/invalid-messages/too-short-dict.message:
4323 * test/data/valid-messages/recursive-types.message:
4324 Fix up and extend test.
4326 2003-04-10 Havoc Pennington <hp@pobox.com>
4328 * bus/dispatch.c: lots of fixes
4330 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
4331 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
4332 that was crack, broke the test service.
4334 * dbus/dbus-transport.c (_dbus_transport_open): fix error
4335 handling to avoid piling up errors if we get a failure on the
4338 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
4339 pid in assertion failures.
4341 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
4342 to some fixed size of file descriptor array. Don't return TRUE
4343 anytime a timeout exists, that led to lots of busy loop silliness
4346 2003-04-09 Havoc Pennington <hp@redhat.com>
4348 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
4349 I'd checked this in earlier but hadn't.
4351 2003-04-09 Havoc Pennington <hp@redhat.com>
4353 * bus/dispatch.c (bus_dispatch_test): get a bit further through
4354 the activation test (man this is getting old!)
4356 2003-04-09 Havoc Pennington <hp@redhat.com>
4358 * test/test-utils.c: use dispatch status function to fix this up
4360 * bus/connection.c (connection_watch_callback): don't dispatch
4362 (connection_timeout_callback): don't dispatch from here
4363 (bus_connections_setup_connection): set the dispatch status function
4364 (bus_connection_disconnected): unset it
4366 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
4367 used to add a connection to be dispatched
4368 (_dbus_loop_iterate): do the dispatching at the end of each
4371 * dbus/dbus-connection.c
4372 (dbus_connection_set_dispatch_status_function): new function
4373 allowing us to fix up main loop usage
4374 (_dbus_connection_last_unref): free all the various function
4376 (dbus_connection_dispatch): call the DispatchStatusFunction
4377 whenever this function returns
4378 (dbus_connection_handle_watch): call DispatchStatusFunction
4379 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
4380 (reply_handler_timeout): call DispatchStatusFunction
4381 (dbus_connection_flush): call DispatchStatusFunction
4383 2003-04-09 Havoc Pennington <hp@redhat.com>
4385 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
4388 * bus/dispatch.c (check_service_activated): fix bug in test
4390 * dbus/dbus-mainloop.c (check_timeout): fix this up
4392 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
4393 verbose output so we can sort out output from different processes,
4394 e.g. in the activation case.
4396 2003-04-08 Colin Walters <walters@gnu.org>
4398 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
4400 (bus_context_new): Set it.
4401 (bus_context_unref): Use it to delete the pid file.
4403 2003-04-08 Havoc Pennington <hp@redhat.com>
4405 * test/data/invalid-messages/array-with-mixed-types.message:
4406 regression test that fails for the moment
4408 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
4409 tests for convenience
4411 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
4412 array of nil, it broke things.
4414 * test/data/invalid-messages/array-of-nil.message: regression test
4416 * test/data/valid-messages/array-of-array-of-uint32.message:
4417 happened to write this so added it to suite
4419 2003-04-08 Havoc Pennington <hp@redhat.com>
4421 * bus/driver.c (bus_driver_handle_acquire_service): init
4422 retval/reply before checking name
4424 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
4425 recursion depth argument
4427 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
4428 in the public struct for future extension
4430 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
4433 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
4436 * doc/dbus-specification.sgml: fix typo
4438 2003-04-08 Alexander Larsson <alexl@redhat.com>
4440 Implemented recursive types, named types and new-style iters
4443 * glib/test-thread-client.c: (thread_func):
4444 * glib/test-thread-server.c: (handle_test_message):
4445 * test/test-service.c: (handle_echo):
4454 * dbus/dbus-internals.c: (_dbus_type_to_string):
4455 Update for new types.
4457 * dbus/dbus-marshal.[ch]:
4458 Implement recursive types and the new marshalling format.
4459 Remove hardcoded dict marshalling.
4460 Marshal named types.
4462 * dbus/dbus-message-builder.c:
4464 Remove references to old types
4466 * dbus/dbus-message.[ch]:
4467 New non-refcounted iter API that supports recursive iters.
4468 Use iters for appending, including support for recursive
4470 Add byte and named type support.
4471 Update everything to new marshalling formats.
4472 Add tests for new API.
4474 * dbus/dbus-protocol.h:
4475 Remove old array types.
4476 Add types: BYTE, ARRAY, DICT, NAMED
4478 * dbus/dbus-string.c:
4479 * dbus/dbus-sysdeps.c:
4480 Make parse_double locale safe.
4482 * dbus/dbus-test-main.c:
4488 * doc/dbus-specification.sgml:
4491 * test/data/incomplete-messages/missing-body.message:
4492 * test/data/invalid-messages/bad-boolean.message:
4493 * test/data/invalid-messages/bad-boolean-array.message:
4494 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
4495 * test/data/invalid-messages/boolean-has-no-value.message-raw:
4496 * test/data/invalid-messages/too-short-dict.message:
4497 * test/data/valid-messages/dict-simple.message:
4498 * test/data/valid-messages/dict.message:
4499 * test/data/valid-messages/emptiness.message:
4500 * test/data/valid-messages/lots-of-arguments.message:
4501 * test/data/valid-messages/no-padding.message:
4502 * test/data/valid-messages/recursive-types.message:
4503 Add missing NAME fields
4504 Fix up dicts & arrays
4506 * test/data/invalid-messages/dict-with-nil-value.message:
4507 Removed, this is not invalid anymore.
4509 * test/data/valid-messages/recursive-types.message:
4510 Add new test for deeply recursive types.
4512 2003-04-07 Havoc Pennington <hp@pobox.com>
4514 * bus/driver.c (bus_driver_handle_acquire_service): return an
4515 error if you try to acquire a service that starts with ':'
4517 2003-04-07 Havoc Pennington <hp@redhat.com>
4519 * doc/dbus-specification.sgml: require that base service names
4520 start with ':' and that the base service is created/deleted
4521 as first and last things a connection does on the bus
4523 * bus/dispatch.c (check_existent_service_activation): lots more
4524 work on the activation test; it doesn't fully pass yet...
4526 * test/test-service.c (main): fix so we don't memleak the
4527 connection to the message bus
4528 (filter_func): accept a message asking us to exit
4530 2003-04-06 Havoc Pennington <hp@pobox.com>
4532 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4535 * configure.in: fixes to Qt detection from Colin Walters
4537 * doc/Makefile.am: Only remove generated docbook dirs if they
4538 exist, from Colin Walters
4540 * dbus/dbus-bus.c: change how we set well-known connections to
4541 NULL, so that it works if a single connection is stored in
4542 two well-known array slots.
4544 * test/Makefile.am: remove a lot of stuff that isn't immediately
4545 useful, it's in CVS history if we want it.
4547 * test/test-service.c: use dbus-mainloop instead of that
4550 2003-04-06 Havoc Pennington <hp@pobox.com>
4552 * dbus/Makefile.am: split lists of sources into stuff that goes in
4553 the library, util functions that go in the lib and are also used
4554 elsewhere, and util functions that are used in tests/daemon but
4555 don't go in the lib.
4557 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4558 here so it can be used in test binaries also
4560 2003-04-06 Havoc Pennington <hp@pobox.com>
4562 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4563 here in the parent process, so we can return an error if it
4564 fails. Also, move some of the code into the child so the parent
4565 is less hosed if we fail midway through.
4567 * bus/bus.c (bus_context_new): move pidfile detection further up
4568 in the function, before we start overwriting sockets and such.
4570 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4572 * configure.in: add --with-system-pid-file and --with-system-socket
4574 2003-04-06 Colin Walters <walters@verbum.org>
4576 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4578 * bus/system.conf.in: Declare a pidfile.
4580 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4581 create one (if appropriate).
4583 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4584 (struct BusConfigParser) [pidfile]: New.
4585 (element_type_to_name, merge_included, start_busconfig_child)
4586 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4587 (bus_config_parser_unref): Free it.
4588 (bus_config_parser_get_pidfile): New function.
4590 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4592 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4594 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4596 * dbus/dbus-sysdeps.h: Prototype it.
4598 2003-04-06 Havoc Pennington <hp@pobox.com>
4600 * bus/bus.c (bus_context_new): print the address in here, rather
4601 than in main(), because we need to do it before forking the daemon
4603 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4604 on the service nonexistent error
4606 * bus/driver.c (bus_driver_handle_acquire_service): set the
4607 sender on the AcquireService reply
4609 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4610 server also listen on a UNIX socket so services can connect to it.
4612 2003-04-06 Havoc Pennington <hp@pobox.com>
4614 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4615 so it detects deadlocks and also we actually init threads when
4618 2003-04-06 Havoc Pennington <hp@pobox.com>
4620 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4621 save the domain socket name, and unlink it when we disconnect the
4622 server. Means that at least when we exit normally, we won't leave
4623 a bunch of junk in /tmp
4625 * dbus/dbus-transport-unix.c
4626 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4627 memory management). (I was making a real change here but then
4630 2003-04-06 Havoc Pennington <hp@pobox.com>
4632 * bus/bus.c (bus_context_new): fix wrong handling of
4633 server_data_slot_unref() in the error case.
4635 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4636 "(condition) != 0" to _dbus_real_assert so that
4637 "_dbus_assert (pointer)" doesn't cause a warning
4639 * bus/main.c (main): accept --print-address option to print out
4640 the message bus address
4642 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4644 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4645 "tmpdir" option to unix: address on client side
4647 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4650 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4651 we can use to create sockets in the test suite.
4653 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4654 cleanly. To be used for testing.
4656 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4658 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4660 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4661 handle trying to call this when there's no servers active
4663 2003-04-05 Havoc Pennington <hp@pobox.com>
4669 2003-04-05 Havoc Pennington <hp@pobox.com>
4671 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4672 crash on startup. Need to get "try starting the daemon"
4673 in the test suite I guess. ;-)
4675 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4676 tracked the number of open connections; it's better done in
4677 application-specific code as you want it to span all servers etc.
4679 2003-04-05 Havoc Pennington <hp@pobox.com>
4681 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4682 patch from Colin Walters
4684 2003-04-05 Havoc Pennington <hp@pobox.com>
4686 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4687 reality; in fact multiple mechanisms are allowed.
4689 * dbus/dbus-internals.c (_dbus_real_assert)
4690 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4691 _dbus_assert_not_reached() into functions, so that they don't show
4692 up in basic block counts for test coverage, and don't use up as
4693 much disk space. Does mean slower execution speed though, so
4694 assumes --disable-asserts is the normal production case.
4696 2003-04-05 Havoc Pennington <hp@pobox.com>
4698 * test/Makefile.am (dist-hook): also dist *.in files
4704 2003-04-05 Havoc Pennington <hp@pobox.com>
4706 * dbus/dbus-string.c: docs warning
4708 * dbus/dbus-spawn.c: missing docs
4710 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4712 2003-04-05 Havoc Pennington <hp@pobox.com>
4714 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4717 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4718 to -1 once we've reaped the babysitter
4719 (_dbus_babysitter_handle_watch): do as much work as we can, not
4722 * bus/activation.c: add code using DBusBabysitter so that we
4723 handle it when a service fails to start up properly.
4724 (bus_activation_service_created): don't remove the activation
4725 entries as we go, just let them get removed when we free the pending
4726 activation. Unref reply messages after sending them.
4728 2003-04-05 Havoc Pennington <hp@pobox.com>
4730 * test/decode-gcov.c (main): print per-directory stats in the report
4732 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4734 2003-04-05 Havoc Pennington <hp@pobox.com>
4736 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4738 * test/decode-gcov.c: hack up a little program to suck data
4739 out of gcov files. Yes this is sort of silly.
4741 * configure.in: define something in config.h and do an
4742 AM_CONDITIONAL when gcov is enabled
4744 2003-04-04 Havoc Pennington <hp@redhat.com>
4746 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4747 return a "babysitter" object that is used to monitor the status of
4748 the spawned process and reap it when required.
4750 * test/test-segfault.c, test/test-exit.c,
4751 test/test-sleep-forever.c: binaries that do various lame things,
4752 used in the test suite.
4754 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4756 2003-04-03 Havoc Pennington <hp@pobox.com>
4758 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4759 in preparation for modifying it, dbus-sysdeps is getting
4762 2003-04-03 Havoc Pennington <hp@redhat.com>
4764 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4767 * bus/*.[hc]: adapt to mainloop change
4769 2003-04-03 Havoc Pennington <hp@redhat.com>
4771 * bus/activation.c (load_directory): fix up memleaks
4772 (bus_activation_entry_free): free the entry
4774 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4775 we get one from the message bus; fix memleaks.
4777 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4779 2003-04-03 Havoc Pennington <hp@pobox.com>
4781 * bus/config-parser.c (bus_config_parser_unref): free
4782 list of mechanisms, bug discovered by test suite enhancements
4783 (putting system.conf and session.conf into suite)
4785 * test/Makefile.am, test/test-service.c: add placeholder for a
4786 test service that we'll activate as part of test suite. Doesn't
4789 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4790 setting NULL value, and use system malloc not dbus_malloc()
4791 when we have unavoidable memleakage.
4793 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4794 didn't work, and support DBUS_BUS_ACTIVATION.
4796 * bus/activation.c (child_setup): pass our well-known bus type to
4799 * bus/config-parser.c: support <type> to specify well-known type
4801 * doc/dbus-specification.sgml: document the env variables to
4802 locate well-known buses and find service activator
4804 2003-04-02 Havoc Pennington <hp@redhat.com>
4806 * test/Makefile.am (all-local): add a rule to copy tests to
4807 builddir, so we can have generated tests. Use this to remove the
4808 silly hack for testing system.conf and session.conf. Will use this
4809 shortly to generate .service files pointing to test binaries.
4811 2003-04-02 Havoc Pennington <hp@redhat.com>
4813 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4814 current alloc and needed new length, not max of the doubled
4815 allocation and needed new length. Also, when building tests,
4816 don't do the double-allocation stuff, just realloc every time.
4818 2003-04-02 Havoc Pennington <hp@redhat.com>
4820 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4822 (_dbus_string_get_dirname): new
4823 (_dbus_sysdeps_test): new
4824 (_dbus_directory_open): include dirnames in error messages
4826 * bus/config-parser.c: interpret <include> and <includedir> and
4827 <servicedir> relative to config file location if the given
4828 filename is not absolute.
4830 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4832 2003-04-02 Havoc Pennington <hp@redhat.com>
4834 * bus/connection.c (bus_transaction_send_error_reply): set sender
4835 service for the error, and unref the reply on success
4837 * bus/activation.c: convert to use BusTransaction so OOM can be
4839 (bus_activation_service_created): set sender of the message
4841 2003-04-01 Havoc Pennington <hp@redhat.com>
4843 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4844 <includedir> (at least mostly)
4846 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4847 first, then the user ID
4849 2003-04-01 Havoc Pennington <hp@pobox.com>
4851 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4854 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4856 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4858 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4859 socket 0777, and unlink any existing socket.
4861 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4862 the configuration file so specifies; set up auth mechanism
4865 * bus/config-parser.c (bus_config_parser_content): add support
4866 for <fork> option and fill in code for <auth>
4868 * bus/system.conf.in: add <fork/> to default configuration,
4869 and limit auth mechanisms to EXTERNAL
4871 * doc/config-file.txt (Elements): add <fork>
4873 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4874 (_dbus_change_identity): new function
4876 2003-03-31 Havoc Pennington <hp@redhat.com>
4878 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4879 (_dbus_listen_unix_socket): fix off-by-one error in null
4880 termination spotted by Nalin
4882 2003-03-31 Havoc Pennington <hp@redhat.com>
4884 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4885 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4886 having a real home directory available.
4888 2003-03-31 Havoc Pennington <hp@redhat.com>
4890 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4892 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4894 * configure.in: add support for specifying a style of init script
4897 2003-03-31 Havoc Pennington <hp@redhat.com>
4899 Fix some annoying DBusString API and fix all affected code.
4901 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4903 (_dbus_string_get_data): change to return string instead of using
4905 (_dbus_string_get_const_data): ditto
4906 (_dbus_string_get_data_len): ditto
4907 (_dbus_string_get_const_data_len): ditto
4909 2003-03-31 Havoc Pennington <hp@redhat.com>
4911 * bus/main.c (main): fix up the command line arguments to be nicer
4913 2003-03-31 Havoc Pennington <hp@redhat.com>
4915 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4916 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4917 final location that lands in the config file
4919 * bus/config-loader-expat.c (bus_config_load): fix type of
4922 * doc/TODO: remove TODO item for dbus_bus_get()
4924 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4926 2003-03-31 Havoc Pennington <hp@pobox.com>
4928 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4929 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4930 argument since they are always client side
4932 * dbus/dbus-server.c (dbus_server_get_address): new function
4934 * bus/main.c (main): take the configuration file as an argument.
4936 * test/data/valid-config-files/debug-allow-all.conf: new file to
4937 use with dispatch.c tests for example
4939 * bus/test-main.c (main): require test data dir
4941 * bus/bus.c (bus_context_new): change this to take a
4942 configuration file name as argument
4944 * doc/config-file.txt (Elements): add <servicedir>
4946 * bus/system.conf, bus/session.conf: new files
4948 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4949 well-known socket if none set
4951 * configure.in: create system.conf and session.conf
4953 2003-03-30 Havoc Pennington <hp@pobox.com>
4955 * bus/config-parser.c: hacking
4957 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4958 to shut down, since it could cause weirdness with the DBusList
4961 * dbus/dbus-list.c (_dbus_list_test): add tests for the
4962 link-oriented stack routines
4963 (alloc_link): free the mempool if the first alloc from it fails
4965 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4967 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4969 (_dbus_string_skip_white): new
4971 * doc/config-file.txt (Elements): add <includedir>
4973 2003-03-28 Havoc Pennington <hp@pobox.com>
4975 * dbus/dbus-string.c (_dbus_string_copy_data_len)
4976 (_dbus_string_copy_data): new functions
4978 2003-03-28 Anders Carlsson <andersca@codefactory.se>
4980 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4984 * dbus/dbus-memory.c:
4987 2003-03-28 Havoc Pennington <hp@pobox.com>
4989 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4990 I think it may have just been superstition. Not sure.
4992 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4993 failures that were not being handled.
4995 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4997 * dbus/dbus-memory.c: add ability to set number of mallocs in a
4998 row that will fail on out-of-memory.
5000 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
5001 function for testing out-of-memory handling.
5003 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
5004 allocation functions, they do map exactly to the expat ones.
5006 2003-03-27 Havoc Pennington <hp@redhat.com>
5008 * bus/config-loader-libxml.c (bus_config_load): add another error
5011 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5014 Add note about automatic service activation.
5016 * doc/dbus-specification.sgml:
5017 Rename the specification and clarify a few things.
5019 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5022 * dbus/dbus-address.c:
5024 * dbus/dbus-marshal.c:
5025 * dbus/dbus-server-debug-pipe.c:
5026 * dbus/dbus-transport-unix.c:
5027 Fix documentation warnings.
5029 2003-03-26 Havoc Pennington <hp@pobox.com>
5031 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
5032 after every test so it's quick and easy to see which leaked, and
5033 so we test multiple dbus_shutdown() calls
5035 * configure.in: change configure.in XML stuff to also support
5038 * config-loader-libxml.c: some hacking
5040 * config-loader-expat.c: some hacking
5042 * config-parser.c: some hacking, plus tests
5044 2003-03-25 Havoc Pennington <hp@redhat.com>
5046 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
5048 * configure.in: add --with-xml option to specify XML library,
5049 right now only libxml is supported.
5051 * bus/config-loader-libxml.c, config-parser.c: sync some minor
5052 nonworking code between home and work, still just stubs
5054 2003-03-24 Havoc Pennington <hp@redhat.com>
5056 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
5059 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
5060 NULL argument for "message" if the error is a well-known one,
5061 fill in a generic message in this case.
5063 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
5066 * bus/test.c (bus_test_flush_bus): add
5068 * bus/policy.c (bus_policy_test): test code stub
5070 2003-03-24 Havoc Pennington <hp@pobox.com>
5072 * bus/connection.c (bus_connections_setup_connection): set up
5073 the "can this user connect" function, but it always returns
5074 TRUE until we have a config file parser so we can have a config
5075 file that allows connections.
5077 2003-03-23 Havoc Pennington <hp@pobox.com>
5079 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
5080 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
5081 the mutex, so we can check for proper memory management
5084 * dbus/dbus-dataslot.c: remove the mutex from
5085 DBusDataSlotAllocator and lock it manually when using it,
5086 to simplify fitting it into the global slots framework.
5088 * dbus/dbus-threads.c (init_static_locks): rework how we're
5089 handling global locks so they are easily shut down.
5091 * bus/policy.c (bus_policy_append_rule): fix
5093 * bus/test-main.c (main): check for memleaks
5095 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
5096 test suite check for memleaks
5098 * dbus/dbus-memory.c: add support in test mode for tracking
5099 number of outstanding blocks
5101 2003-03-23 Havoc Pennington <hp@pobox.com>
5103 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
5106 * dbus/dbus-hash.h: add ULONG hash keys
5108 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
5109 (_dbus_get_group_id): new function
5111 2003-03-20 Havoc Pennington <hp@redhat.com>
5113 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
5115 (dbus_connection_get_unix_user): new function
5117 2003-03-20 Havoc Pennington <hp@pobox.com>
5119 * bus/connection.c (bus_connection_send_oom_error): assert that
5120 message has a sender
5121 (connection_execute_transaction): ditto
5122 (bus_connection_preallocate_oom_error): fix to set the sender, and
5123 set recipient to the destination service, not the bus driver
5125 * bus/policy.c: hacking
5127 * dbus/dbus-message.c (dbus_message_service_is): new function
5128 (dbus_message_sender_is): new
5130 2003-03-19 Havoc Pennington <hp@redhat.com>
5132 * bus/policy.c: start sketching code for policy restrictions on
5133 what connections can do.
5135 2003-03-18 Havoc Pennington <hp@redhat.com>
5137 * doc/TODO: some notes on high-level todo items. Little nitpick
5138 stuff is all in @todo, so no need to add it here.
5140 * doc/config-file.txt: some notes on how config file might look
5142 2003-03-18 Anders Carlsson <andersca@codefactory.se>
5148 2003-03-17 Havoc Pennington <hp@redhat.com>
5150 * dbus/dbus-internals.h: add gcc attributes so that
5151 our printf-style functions warn on bad arguments to
5154 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
5157 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5160 2003-03-17 Havoc Pennington <hp@redhat.com>
5162 * bus/test-main.c (main): make it print something as it runs
5163 so make check doesn't look stuck
5165 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
5166 from CVS, now obsolete
5168 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5170 * bus/dispatch.c: (bus_dispatch):
5171 Refetch the service name since it may have been reallocated
5172 when dbus_message_set_sender was called.
5174 * dbus/dbus-sysdeps.c: (_dbus_accept):
5175 Add address and address length variables and use them to stop
5176 valgrind from complaining.
5178 2003-03-17 Havoc Pennington <hp@pobox.com>
5180 All tests pass, no memleaks, no valgrind complaints.
5182 * bus/test.c: refcount handler_slot
5184 * bus/connection.c (bus_connections_new): refcount
5185 connection_data_slot
5187 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
5188 bytes so that auth scripts pass.
5190 * bus/dispatch.c: init message_handler_slot so it gets allocated
5193 * bus/dispatch.c (message_handler_slot_ref): fix memleak
5195 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
5196 dealloc server_pipe_hash when no longer used for benefit of
5199 * dbus/dbus-auth.c (process_command): memleak fix
5201 * bus/dispatch.c (check_hello_message): memleak fix
5203 2003-03-16 Havoc Pennington <hp@pobox.com>
5205 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
5207 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5209 * bus/activation.c (bus_activation_activate_service): Append
5210 the pending activation entry to the list of pending activations.
5212 2003-03-16 Havoc Pennington <hp@pobox.com>
5214 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
5217 * dbus/dbus-address.c (create_entry): fix OOM handling when
5218 failing to alloc entry->method
5220 2003-03-16 Havoc Pennington <hp@pobox.com>
5222 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
5225 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5226 add some missing dbus_set_result
5228 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
5229 alloc the DBusMessageHandler
5231 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
5232 the transport here, since we call this from the finalizer; it
5233 resulted in a double-finalize.
5235 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
5236 where we tried to use transport->connection that was NULL,
5237 happened when transport was disconnected early on due to OOM
5239 * bus/*.c: adapt to handle OOM for watches/timeouts
5241 * dbus/dbus-transport-unix.c: port to handle OOM during
5244 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
5245 reference to unused bytes instead of a copy
5247 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
5250 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
5253 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
5256 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5258 * doc/dbus-specification.sgml:
5259 Document reply message for ActivateService.
5261 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5263 * bus/activation.c: (bus_pending_activation_entry_free),
5264 (bus_pending_activation_free), (bus_activation_new),
5265 (bus_activation_unref), (bus_activation_service_created),
5266 (bus_activation_activate_service):
5268 * bus/bus.c: (bus_context_new):
5269 * bus/desktop-file.c: (new_section):
5270 * bus/driver.c: (bus_driver_send_service_deleted),
5271 (bus_driver_handle_activate_service):
5272 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
5274 * dbus/dbus-connection.c:
5275 (dbus_connection_send_with_reply_and_block):
5276 * dbus/dbus-message.c: (dbus_message_append_args_valist):
5277 * dbus/dbus-protocol.h:
5278 Make activation work better. Now pending activations will be queued
5279 and the daemon won't try to activate services that are already registered.
5281 2003-03-16 Havoc Pennington <hp@pobox.com>
5283 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
5286 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
5287 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
5289 2003-03-16 Havoc Pennington <hp@pobox.com>
5291 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
5292 this. always run the test suite before commit...
5294 * bus/*: adapt to DBusConnection API changes
5296 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
5297 requires renaming stuff to avoid dbus_connection_dispatch name
5300 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
5303 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5304 separate from _dbus_message_loader_return_buffer()
5306 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
5307 this, because it's now always broken to use; the number of
5308 messages in queue vs. the number still buffered by the message
5309 loader is undefined/meaningless. Should use
5310 dbus_connection_get_dispatch_state().
5311 (dbus_connection_dispatch): rename from
5312 dbus_connection_dispatch_message
5314 2003-03-16 Havoc Pennington <hp@pobox.com>
5316 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
5319 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5321 * dbus/dbus-connection.c:
5322 (dbus_connection_send_with_reply_and_block):
5323 Decrease connection->n_incoming when removing an entry
5325 * dbus/dbus-dict.c: (dbus_dict_entry_free),
5326 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5327 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5328 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
5329 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
5330 (dbus_dict_get_byte_array):
5331 Handle NULL arrays and strings. Also add support for byte arrays.
5333 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
5334 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
5335 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5336 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5337 (_dbus_demarshal_dict), (demarshal_and_validate_len),
5338 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
5339 * dbus/dbus-marshal.h:
5340 Add support for marshalling and demarshalling empty arrays and strings.
5342 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5343 (dbus_message_append_string_array),
5344 (dbus_message_iter_get_boolean),
5345 (dbus_message_iter_get_boolean_array),
5346 (dbus_message_iter_get_int32_array),
5347 (dbus_message_iter_get_uint32_array),
5348 (dbus_message_iter_get_double_array),
5349 (dbus_message_iter_get_byte_array),
5350 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
5351 (check_message_handling):
5352 Add support for getting empty arrays and dicts.
5354 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
5355 Don't do any validation at all for now, that's better than just checking
5358 * test/data/valid-messages/emptiness.message:
5359 New test message with lots of empty arrays.
5361 2003-03-16 Havoc Pennington <hp@pobox.com>
5363 * dbus/dbus-connection.c
5364 (_dbus_connection_queue_received_message_link): new function that
5365 can't fail due to OOM
5367 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
5368 new function pops a message together with a list link
5371 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
5372 message queuing functions to avoid needing to alloc memory
5374 2003-03-16 Havoc Pennington <hp@pobox.com>
5376 Oops - test code was only testing failure of around 30 of the
5377 mallocs in the test path, but it turns out there are 500+
5378 mallocs. I believe this was due to misguided linking setup such
5379 that there was one copy of dbus_malloc etc. in the daemon and one
5380 in the shared lib, and only daemon mallocs were tested. In any
5381 case, the test case now tests all 500+ mallocs, and doesn't pass
5382 yet, though there are lots of fixes in this patch.
5384 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5385 this so that it doesn't need to allocate memory, since it
5386 has no way of indicating failure due to OOM (and would be
5387 annoying if it did).
5389 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
5391 * bus/Makefile.am: rearrange to create two self-contained
5392 libraries, to avoid having libraries with overlapping symbols.
5393 that was resulting in weirdness, e.g. I'm pretty sure there
5394 were two copies of global static variables.
5396 * dbus/dbus-internals.c: move the malloc debug stuff to
5399 * dbus/dbus-list.c (free_link): free list mempool if it becomes
5402 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
5404 * dbus/dbus-address.c (dbus_parse_address): free list nodes
5407 * bus/dispatch.c (bus_dispatch_add_connection): free
5408 message_handler_slot when no longer using it, so
5409 memory leak checkers are happy for the test suite.
5411 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
5413 * bus/bus.c (new_connection_callback): disconnect in here if
5414 bus_connections_setup_connection fails.
5416 * bus/connection.c (bus_connections_unref): fix to free the
5418 (bus_connections_setup_connection): if this fails, don't
5419 disconnect the connection, just be sure there are no side
5422 * dbus/dbus-string.c (undo_alignment): unbreak this
5424 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
5426 (_dbus_auth_new): fix the order in which we free strings
5429 * bus/connection.c (bus_connection_disconnected): fix to
5430 not send ServiceDeleted multiple times in case of memory
5433 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
5434 get the base service name
5435 (dbus_bus_register_client): don't return base service name,
5436 instead store it on the DBusConnection and have an accessor
5438 (dbus_bus_register_client): rename dbus_bus_register()
5440 * bus/dispatch.c (check_hello_message): verify that other
5441 connections on the bus also got the correct results, not
5442 just the one sending hello
5444 2003-03-15 Havoc Pennington <hp@pobox.com>
5446 Make it pass the Hello handling test including all OOM codepaths.
5447 Now to do other messages...
5449 * bus/services.c (bus_service_remove_owner): fix crash when
5450 removing owner from an empty list of owners
5451 (bus_registry_ensure): don't leave service in the list of
5452 a connection's owned services if we fail to put the service
5455 * bus/connection.c (bus_connection_preallocate_oom_error): set
5456 error flag on the OOM error.
5458 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5459 handle _dbus_transport_set_connection failure
5461 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
5462 to create watches up front and simply enable/disable them as
5464 (unix_connection_set): this can now fail on OOM
5466 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
5467 of enabling/disabling a watch or timeout.
5469 * bus/loop.c (bus_loop_iterate): don't touch disabled
5472 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
5474 2003-03-15 Havoc Pennington <hp@pobox.com>
5476 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
5477 write useful test code, after all that futzing around ;-)
5479 Test does not yet pass because we can't handle OOM in
5480 _dbus_transport_messages_pending (basically,
5481 dbus_connection_preallocate_send() does not prealloc the write
5482 watch). To fix this, I think we need to add new stuff to
5483 set_watch_functions, namely a SetEnabled function so we can alloc
5484 the watch earlier, then enable it later.
5486 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
5487 dbus-memory.c to the convenience lib
5489 * bus/test.c: rename some static functions to keep them clearly
5490 distinct from stuff in connection.c. Handle client disconnection.
5492 2003-03-14 Havoc Pennington <hp@pobox.com>
5494 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
5495 transport, tests more of the real codepath. Set up clients
5496 with bus_setup_debug_client.
5498 * bus/test.c (bus_setup_debug_client): function to set up debug
5499 "clients" on the main loop
5501 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5504 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5507 * dbus/dbus-server-debug.c: support a debug server based on pipes
5509 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5510 (_dbus_close): new function
5512 * configure.in: check for socketpair
5514 2003-03-14 Havoc Pennington <hp@redhat.com>
5516 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5519 * dbus/dbus-transport-debug.c: rework this a good bit to be
5520 less complicated. hopefully still works.
5522 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5525 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5528 * dbus/dbus-message.c (dbus_message_copy): rename from
5529 dbus_message_new_from_message, fix it up to copy
5530 all the message fields, add test case
5532 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5533 not quite passing yet
5535 2003-03-14 Havoc Pennington <hp@pobox.com>
5537 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5538 until no work remains" in test code. (the large diff here
5539 is just code movement, no actual changes)
5541 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5542 1, no point waiting around for test code.
5543 (_dbus_server_debug_accept_transport): unref the timeout
5544 after adding it (right?)
5546 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5548 2003-03-13 Havoc Pennington <hp@redhat.com>
5550 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5553 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5556 * dbus/dbus-connection.h: Make AddWatchFunction and
5557 AddTimeoutFunction return a bool so they can fail on out-of-memory
5559 * bus/bus.c (bus_context_new): set up timeout handlers
5561 * bus/connection.c (bus_connections_setup_connection): set up
5564 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5567 * bus/bus.c (bus_context_new): adapt to changes
5569 * bus/connection.c: adapt to changes
5571 * test/watch.c: adapt to DBusWatch changes
5573 * bus/dispatch.c (bus_dispatch_test): started adding this but
5576 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5578 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5580 2003-03-13 Havoc Pennington <hp@pobox.com>
5582 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5583 set up a test framework as for the library
5585 2003-03-12 Havoc Pennington <hp@pobox.com>
5587 Throughout: purge global variables, introduce BusActivation,
5588 BusConnections, BusRegistry, etc. objects instead.
5590 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5593 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5594 going to redo this a bit differently I think
5596 2003-03-12 Havoc Pennington <hp@redhat.com>
5598 Mega-patch that gets the message bus daemon initially handling
5599 out-of-memory. Work still needed. Also lots of random
5600 moving stuff to DBusError instead of ResultCode.
5602 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5604 * dbus/dbus-connection.c
5605 (dbus_connection_send_with_reply_and_block): use DBusError
5607 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5610 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5611 code here, as the only failure possible is OOM.
5613 * bus/connection.c (bus_connection_disconnect):
5614 rename bus_connection_disconnected as it's a notification only
5616 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5617 "name" on get_args failure, should be done by get_args;
5618 don't disconnect client for bad args, just return an error.
5619 (bus_driver_handle_service_exists): ditto
5621 * bus/services.c (bus_services_list): NULL-terminate returned array
5623 * bus/driver.c (bus_driver_send_service_lost)
5624 (bus_driver_send_service_acquired): send messages from driver to a
5625 specific client to the client's unique name, not to the broadcast
5628 * dbus/dbus-message.c (decode_header_data): reject messages that
5629 contain no name field
5630 (_dbus_message_get_client_serial): rename to
5631 dbus_message_get_serial and make public
5632 (_dbus_message_set_serial): rename from set_client_serial
5633 (_dbus_message_set_reply_serial): make public
5634 (_dbus_message_get_reply_serial): make public
5636 * bus/connection.c (bus_connection_foreach): allow stopping
5637 iteration by returning FALSE from foreach function.
5639 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5640 (dbus_connection_free_preallocated_send)
5641 (dbus_connection_preallocate_send): new API for sending a message
5642 without possibility of malloc failure.
5643 (dbus_connection_send_message): rename to just
5644 dbus_connection_send (and same for whole function family)
5646 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5648 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5650 * bus/activation.c: handle/return errors
5652 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5654 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5655 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5656 (_dbus_result_from_errno): move to this file
5658 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5660 * dbus/dbus-marshal.c:
5661 (_dbus_marshal_set_string):
5662 Take a length argument so we can marshal the correct string
5665 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5666 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5667 (_dbus_marshal_test):
5668 * dbus/dbus-marshal.h:
5669 Add support for marshalling and demarshalling dicts.
5671 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5672 Add support for TYPE DICT.
5674 * dbus/dbus-message.c: (set_string_field):
5675 Adjust header padding.
5677 (dbus_message_append_args_valist), (dbus_message_append_dict),
5678 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5679 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5680 (check_message_handling), (check_have_valid_message):
5681 * dbus/dbus-message.h:
5682 Add functions for setting and getting dicts.
5684 * dbus/dbus-protocol.h:
5690 * doc/dbus-specification.sgml:
5691 Add information about how dicts are marshalled.
5693 * test/data/invalid-messages/dict-with-nil-value.message:
5694 * test/data/invalid-messages/too-short-dict.message:
5695 * test/data/valid-messages/dict-simple.message:
5696 * test/data/valid-messages/dict.message:
5697 Add sample messages containing dicts.
5699 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5701 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5703 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5706 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5707 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5708 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5709 (dbus_dict_set_double), (dbus_dict_set_string),
5710 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5711 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5712 (dbus_dict_set_string_array), (_dbus_dict_test):
5714 Fix according to comments from Havoc.
5716 2003-03-06 Michael Meeks <michael@server.home>
5718 * configure.in: if we don't have kde-config, disable have_qt.
5720 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5725 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5726 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5727 (dbus_dict_remove), (dbus_dict_get_value_type),
5728 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5729 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5730 (dbus_dict_put_double), (dbus_dict_put_string),
5731 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5732 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5733 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5734 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5735 (dbus_dict_get_double), (dbus_dict_get_string),
5736 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5737 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5738 (dbus_dict_get_string_array), (_dbus_dict_test):
5740 Add DBusDict implementation
5742 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5746 2003-03-04 Havoc Pennington <hp@pobox.com>
5748 * test/data/auth/*: adapt to changes
5750 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5751 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5754 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5755 more stuff from being in a context name, to make the protocol
5756 simpler to deal with
5758 * dbus/dbus-errors.c (dbus_error_has_name): new function
5759 (dbus_error_is_set): new function
5761 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5762 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5764 * dbus/dbus-connection.c (dbus_connection_flush): also read
5765 messages during a flush operation
5767 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5769 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5771 * configure.in: Check for gethostbyname on Solaris.
5773 * dbus/dbus-transport.c: (_dbus_transport_open):
5774 Remove duplicate "tcp" entry.
5776 * doc/dbus-specification.sgml:
5777 Clarify some things.
5779 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5781 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5782 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5783 (_dbus_keyring_test):
5784 * dbus/dbus-md5.c: (_dbus_md5_compute):
5785 * dbus/dbus-sha.c: (_dbus_sha_compute):
5788 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5790 * README: Add some things.
5792 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5794 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5795 after case DBUS_TYPE_BOOELAN.
5797 2003-03-02 Havoc Pennington <hp@pobox.com>
5799 * test/break-loader.c (randomly_set_extreme_ints): add test that
5800 sets really huge and small integers
5802 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5803 that length of boolean array fits in the string, and that
5804 string has room for boolean value in single-bool case.
5806 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5807 optional value to "ALIGN" command which is what to fill the
5810 * test/data/valid-messages/no-padding.message: add regression
5811 test for the message padding problem
5813 2003-03-02 Havoc Pennington <hp@pobox.com>
5815 * dbus/dbus-message.c (decode_header_data): fix to always init
5816 message_padding, from Benjamin Dauvergne
5818 2003-03-02 Havoc Pennington <hp@pobox.com>
5824 2003-03-01 Joe Shaw <joe@assbarn.com>
5826 * configure.in: Check for "struct cmsgcred" and try to access its
5827 members for BSD-like unices.
5829 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5830 _dbus_read_credentials_unix_socket().
5831 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5832 read() for reading the credential byte off the unix socket. Use
5833 struct cmsgcred on systems that support it.
5835 2003-02-27 Alexander Larsson <alexl@redhat.com>
5839 Make gthreads-2.0 dependency optional. Don't build thread test if
5842 2003-02-27 Havoc Pennington <hp@pobox.com>
5844 * dbus/dbus-connection.c
5845 (dbus_connection_send_message_with_reply_and_block): fix doh!
5846 doh! doh! bug that resulted in never removing a reply from the
5847 queue, no wonder we called get_reply_serial so much ;-)
5849 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5850 and client serial instead of demarshaling them every time
5852 2003-02-27 Havoc Pennington <hp@pobox.com>
5854 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5855 more inlined, using dbus-string-private.h, speeds things up
5858 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5859 when freeing the string
5860 (_dbus_string_steal_data): fix for align offset
5861 (undo_alignment): new function
5863 2003-02-26 Havoc Pennington <hp@redhat.com>
5865 All kinds of audit fixes from Owen, plus initial attempt to
5866 handle unaligned memory returned from malloc.
5868 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5869 leave room for align_offset and nul byte
5870 (fixup_alignment): function to track an align_offset and
5871 ensure real->str is aligned
5872 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5873 to allow a nul byte plus align offset
5874 (_dbus_string_lock): fix overflow issue
5875 (_dbus_string_init_const_len): add assertions on sanity of len,
5876 assign allocated to be ALLOCATION_PADDING larger than len
5877 (set_length): fixup the overflow handling
5878 (_dbus_string_get_data_len): fix overflow in assertion
5879 (open_gap): detect overflow in size of gap to be opened
5880 (_dbus_string_lengthen): add overflow check
5881 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5882 (_dbus_string_append): add overflow check
5883 (_dbus_string_append_unichar): overflow
5884 (_dbus_string_delete): fix overflow in assertion
5885 (_dbus_string_copy_len): overflow in assertion
5886 (_dbus_string_replace_len): overflows in assertions
5887 (_dbus_string_find): change to implement in terms of
5888 _dbus_string_find_to
5889 (_dbus_string_find_to): assorted fixage
5890 (_dbus_string_equal_c_str): assert c_str != NULL,
5891 fix logic so the function works
5892 (_dbus_string_ends_with_c_str): fix overflow thingy
5893 (_dbus_string_base64_encode): overflow fix
5894 (_dbus_string_validate_ascii): overflow
5895 (_dbus_string_validate_nul): overflow
5897 2003-02-26 Havoc Pennington <hp@redhat.com>
5899 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5901 2003-02-26 Alexander Larsson <alexl@redhat.com>
5904 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5906 * dbus/dbus-connection.c:
5907 * dbus/dbus-connection.h:
5908 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5909 Add dbus_connection_set_wakeup_main_function and use it when queueing
5910 incoming and outgoing messages.
5913 * dbus/dbus-dataslot.c:
5914 Threadsafe usage of DBusDataSlotAllocator
5916 * dbus/dbus-message.c: (dbus_message_get_args_iter):
5919 * dbus/dbus-server-unix.c:
5922 * glib/dbus-gmain.c:
5923 Implement the new wakeup functions for glib.
5926 * glib/test-thread-client.c:
5927 * glib/test-thread-server.c:
5928 * glib/test-thread.h:
5929 Initial cut at some thread test code. Not really done yet.
5931 2003-02-26 Havoc Pennington <hp@pobox.com>
5933 * dbus/dbus-connection.c
5934 (dbus_connection_send_message_with_reply_and_block): fix crash
5935 where we ref'd the outgoing message instead of the returned reply
5937 * dbus/dbus-transport-unix.c (do_authentication): check read watch
5938 at the end of this function, so if we didn't need to read for
5939 authentication, we reinstall it for receiving messages
5941 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5942 a NULL sender for peer-to-peer case
5944 * dbus/dbus-transport-unix.c (check_read_watch): handle
5945 !authenticated case correctly
5947 * glib/dbus-gmain.c: add support for DBusServer
5949 * dbus/dbus-server.c: add data slot support
5951 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5952 return values and handle errors
5954 * dbus/dbus-dataslot.c: factor out the data slot stuff from
5957 * Doxyfile.in (INPUT): add glib subdir
5959 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5960 setup_with_g_main instead of hookup_with_g_main; write docs
5962 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5964 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5965 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5966 * dbus/dbus-message.c: (dbus_message_append_boolean),
5967 (dbus_message_append_boolean_array),
5968 (dbus_message_get_args_valist), (_dbus_message_test):
5969 * dbus/dbus-message.h:
5970 * doc/dbus-specification.sgml:
5971 Various fixes as pointed out by Havoc.
5973 * test/data/invalid-messages/bad-boolean-array.message:
5974 * test/data/invalid-messages/bad-boolean.message:
5975 Add invalid boolean value test cases.
5977 2003-02-24 Anders Carlsson <andersca@codefactory.se>
5979 * dbus/dbus-internals.c: (_dbus_type_to_string):
5980 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5981 (_dbus_marshal_validate_arg):
5982 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5983 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5984 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5985 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5986 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5987 (dbus_message_iter_get_double),
5988 (dbus_message_iter_get_boolean_array), (message_iter_test):
5989 * dbus/dbus-message.h:
5990 * dbus/dbus-protocol.h:
5991 * doc/dbus-specification.sgml:
5992 * test/data/valid-messages/lots-of-arguments.message:
5993 Add support for boolean and boolean array types.
5995 2003-02-23 Havoc Pennington <hp@pobox.com>
5997 * dbus/dbus-keyring.c: finish most of this implementation and
6000 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
6001 these barf if the error isn't cleared to NULL
6003 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
6004 (_dbus_create_directory): new function
6006 * dbus/dbus-errors.c (dbus_set_error): fix warning
6008 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
6009 (_dbus_string_hex_decode): new function
6010 (test_hex_roundtrip): test code
6012 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
6014 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
6016 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
6017 the save-to-temp/rename trick to atomically write the new file
6018 (_dbus_string_parse_uint): new function
6020 2003-02-22 Havoc Pennington <hp@pobox.com>
6022 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
6024 2003-02-22 Havoc Pennington <hp@pobox.com>
6026 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
6027 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
6029 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
6031 * dbus/test/data/sha-1: add US government test suite for SHA-1
6033 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6035 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6036 Make string arrays NULL-terminated.
6038 * dbus/dbus-memory.c: (dbus_free_string_array):
6039 * dbus/dbus-memory.h:
6040 New function for freeing NULL-terminated string arrays.
6042 * dbus/dbus-message-builder.c: (append_quoted_string),
6043 (_dbus_message_data_load):
6044 Add support for array types.
6046 * dbus/dbus-message.c: (check_message_handling):
6047 Add more types as test cases.
6049 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
6050 (_dbus_string_parse_double):
6051 Add the start offset to the end offset.
6053 * test/data/valid-messages/lots-of-arguments.message:
6054 New test message with lots of arguments.
6056 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6058 * dbus/dbus-message.c: (dbus_message_append_nil),
6059 (dbus_message_append_int32), (dbus_message_append_uint32),
6060 (dbus_message_append_double), (dbus_message_append_string),
6061 (dbus_message_append_int32_array),
6062 (dbus_message_append_uint32_array),
6063 (dbus_message_append_double_array),
6064 (dbus_message_append_byte_array),
6065 (dbus_message_append_string_array):
6066 Fix all out-of-memory handling in these functions.
6068 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6070 * dbus/dbus-message.c: (dbus_message_append_nil):
6073 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6075 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6076 (dbus_message_append_nil), (dbus_message_append_int32_array),
6077 (dbus_message_append_uint32_array),
6078 (dbus_message_append_double_array),
6079 (dbus_message_append_byte_array),
6080 (dbus_message_append_string_array), (dbus_message_get_args_valist),
6081 (dbus_message_iter_get_int32_array),
6082 (dbus_message_iter_get_uint32_array),
6083 (dbus_message_iter_get_double_array),
6084 (dbus_message_iter_get_byte_array),
6085 (dbus_message_iter_get_string_array):
6087 * dbus/dbus-message.h:
6088 Add functions for appending and getting arrays.
6090 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6092 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
6093 element size at least 8 bytes, fixes mempool tests on
6096 2003-02-20 Alexander Larsson <alexl@redhat.com>
6098 * dbus/dbus-transport-unix.c (unix_do_iteration):
6099 Unlock the connection mutex during a blocking select call.
6100 Add todo about how we need a way to wake up the select.
6102 * dbus/dbus-connection-internal.h:
6103 * dbus/dbus-connection.c:
6104 Add _dbus_connection_lock and _dbus_connection_unlock.
6106 2003-02-19 Havoc Pennington <hp@pobox.com>
6108 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
6109 Doxyfile.in, not Doxyfile
6111 * dbus/dbus-keyring.c: do some hacking on this
6113 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
6115 * dbus/dbus-errors.c (dbus_set_error_const): do not call
6117 (dbus_set_error): remove dbus_error_init, check for message ==
6118 NULL *before* we sprintf into it, and add @todo about including
6119 system headers in this file
6121 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
6123 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
6125 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
6126 get various bits of user information based on either username
6128 (_dbus_homedir_from_username): new function
6130 2003-02-19 Anders Carlsson <andersca@codefactory.se>
6133 Add check for nonposix getpwnam_r
6135 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
6136 Align the pool element size to a sizeof (void *) boundary.
6138 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
6139 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
6140 General Solaris fixes.
6142 * test/data/valid-messages/simplest-manual.message:
6143 Explicitly state that we want little-endian packing.
6145 2003-02-19 Mikael Hallendal <micke@codefactory.se>
6147 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6149 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
6150 Added to create a transport connecting using a tcp/ip socket.
6152 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
6153 to a tcp socket at given host and port.
6154 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
6157 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6159 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
6160 Added to create a server listening on a TCP/IP socket.
6162 2003-02-19 Havoc Pennington <hp@pobox.com>
6164 Throughout: mop up all the Doxygen warnings and undocumented
6167 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
6168 to search any paths.
6170 * dbus/dbus-threads.c: move global mutex initializers to
6171 dbus-internals.h, multiple prototypes was confusing doxygen
6172 besides being kind of ugly
6174 * Doxyfile (PREDEFINED): have Doxygen define
6175 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
6176 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
6177 (do not abuse the feature! it's for stuff like the autogenerated
6178 macros in dbus-md5.c, not just for things you don't feel like
6181 2003-02-18 Havoc Pennington <hp@pobox.com>
6183 * dbus/dbus-string.c (_dbus_string_zero): new function
6185 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
6186 wrap it in some dbus-friendly API
6188 * dbus/dbus-types.h: add 16-bit types
6190 2003-02-18 Joe Shaw <joe@assbarn.com>
6192 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
6193 credentials from our currently running process.
6194 (get_word): Fix a buglet where we were copying the entire length
6195 instead of relative to our position.
6197 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
6198 keys on the stack... it's 640k of data.
6200 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
6201 read the credentials byte off the socket, even if we don't have
6203 (_dbus_poll): Implement poll() using select() for systems which
6206 * glib/test-dbus-glib.c (main): Print out an error if no
6207 parameters are given.
6209 * test/data/auth/fallback.auth-script: Added. Tests that a client
6210 can fallback to a secondary auth mechanism if the first fails.
6212 2003-02-18 Havoc Pennington <hp@pobox.com>
6216 2003-02-17 Havoc Pennington <hp@pobox.com>
6218 * doc/dbus-specification.sgml: lots of cosmetic
6219 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
6220 env variable to DBUS_BUS_ADDRESS, s/client/application/,
6221 s/server/bus/ (except in authentication section). Add a section
6222 "Message Bus Message Routing"
6224 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
6230 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6232 * doc/dbus-specification.sgml:
6233 Specification updates.
6235 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6237 * bus/activation.c: (bus_activation_init), (child_setup),
6238 (bus_activation_activate_service):
6240 * bus/main.c: (main):
6241 Set DBUS_ADDRESS environment variable.
6243 * dbus/dbus-errors.c: (dbus_set_error):
6244 Don't use va_copy since that's a C99 feature.
6246 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
6247 (_dbus_spawn_async):
6248 * dbus/dbus-sysdeps.h:
6249 Add child_setup_func to _dbus_spawn_async.
6251 * doc/dbus-specification.sgml:
6252 Update specification.
6254 * test/spawn-test.c: (setup_func), (main):
6257 2003-02-17 Alexander Larsson <alexl@redhat.com>
6259 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
6262 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6266 * doc/dbus-test-plan.sgml:
6267 Add test plan document.
6272 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6274 * dbus/dbus-message.c: (decode_header_data),
6275 (_dbus_message_loader_return_buffer):
6276 Set the header padding amount when loading a message.
6278 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6280 * bus/dispatch.c: (send_one_message):
6281 Only send broadcast messages to registered connections.
6283 * dbus/dbus-message.c: (dbus_message_name_is):
6284 * dbus/dbus-message.h:
6285 New convenience function.
6287 * dbus/dbus-transport-debug.c: (do_reading):
6288 Only dispatch one message per run.
6291 * test/bus-test.c: (new_connection_callback), (die),
6292 (test_hello_client1_handler), (test_hello_client2_handler),
6293 (test_hello_replies), (main):
6295 * test/bus-test-loop.[ch]:
6298 2003-02-16 Havoc Pennington <hp@pobox.com>
6300 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6301 backward conditional
6303 2003-02-16 Alexander Larsson <alexl@redhat.com>
6305 * dbus/dbus-connection.c:
6306 Implement sent_message_with_reply. (with_reply_and block is still
6308 Made dispatch_message not lose message if OOM.
6310 * dbus/dbus-errors.h:
6311 Add NoReply error (for reply timeouts).
6313 2003-02-16 Alexander Larsson <alexl@redhat.com>
6315 * dbus/dbus-hash.c (_dbus_hash_table_unref):
6316 Actually free keys and values when destroying hashtable.
6318 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6320 * dbus/dbus-auth.c: (client_try_next_mechanism):
6323 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
6324 Return TRUE if there's no thread implementation around.
6326 * glib/dbus-gmain.c: (free_source),
6327 (dbus_connection_hookup_with_g_main):
6328 Make sure to remove the GSource when the connection is finalized.
6330 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6332 * bus/dispatch.c: (bus_dispatch_message_handler):
6333 * dbus/dbus-errors.h:
6334 Return an error if someone tries to send a message to a service
6337 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6339 * bus/activation.c: (load_directory), (bus_activation_init),
6340 (bus_activation_activate_service):
6343 (bus_driver_handle_activate_service), (bus_driver_handle_message):
6344 More work on the activation handling.
6346 * dbus/dbus-errors.h:
6347 Add some error messages
6349 * dbus/dbus-message.c: (dbus_message_new_error_reply):
6350 * dbus/dbus-message.h:
6351 New function that creates an error message.
6353 * dbus/dbus-protocol.h:
6354 Add ACTIVATE_SERVER message.
6356 * dbus/dbus-server-unix.c: (unix_handle_watch),
6357 (_dbus_server_new_for_domain_socket):
6358 Call _dbus_fd_set_close_on_exec.
6360 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
6361 (_dbus_spawn_async), (_dbus_disable_sigpipe),
6362 (_dbus_fd_set_close_on_exec):
6363 * dbus/dbus-sysdeps.h:
6364 Add _dbus_fd_set_close_on exec function. Also add function that checks
6365 that all open fds are set to close-on-exec and warns otherwise.
6367 * dbus/dbus-transport-unix.c:
6368 (_dbus_transport_new_for_domain_socket):
6369 Call _dbus_fd_set_close_on_exec.
6371 2003-02-16 Havoc Pennington <hp@pobox.com>
6373 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
6374 allow people to avoid setting SIGPIPE to SIG_IGN
6375 (_dbus_connection_new_for_transport): disable SIGPIPE unless
6376 we've been asked not to
6378 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6380 * dbus/dbus-list.c: (_dbus_list_append_link),
6381 (_dbus_list_prepend_link):
6382 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
6386 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6389 * bus/activation.c: (bus_activation_entry_free),
6390 (add_desktop_file_entry), (load_directory), (bus_activation_init):
6392 * bus/main.c: (main):
6393 Add simple activation support, doesn't work yet though.
6395 2003-02-15 Zack Rusin <zack@kde.org>
6397 * qt/dbus-qthread.cpp: small casting fix
6399 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6401 * dbus/dbus-errors.c: (dbus_set_error):
6402 * dbus/dbus-errors.h:
6403 Add a few errors and make dbus_set_error void.
6405 * dbus/dbus-sysdeps.c:
6406 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
6407 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
6408 * dbus/dbus-sysdeps.h:
6409 Add _dbus_spawn_async.
6411 * test/spawn-test.c: (main):
6412 Test for _dbus_spawn_async.
6414 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6416 * dbus/dbus-internals.h:
6417 Fix build without tests.
6419 * dbus/dbus-list.c: (alloc_link):
6420 Fix a segfault when a malloc fails.
6422 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
6423 (dbus_malloc0), (dbus_realloc):
6424 Add support for malloc debugging.
6426 2003-02-15 Alexander Larsson <alexl@redhat.com>
6428 * dbus/dbus-threads.c:
6429 * dbus/dbus-threads.h:
6430 Add condvars. Remove static mutext from API.
6431 Implement static mutexes by initializing them from threads_init.
6433 * glib/dbus-gthread.c:
6434 * qt/dbus-qthread.cpp:
6435 Update with the thread api changes.
6440 Turn StaticMutex into normal mutex + init function.
6441 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
6442 _dbus_list_append_link, _dbus_list_prepend_link
6445 * dbus/dbus-sysdeps.c:
6446 * dbus/dbus-sysdeps.h:
6447 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
6448 _dbus_atomic_dec. Only slow fallback implementation at the moment.
6450 * dbus/dbus-protocol.h:
6451 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
6453 * dbus/dbus-message.c:
6454 Make ref/unref atomic.
6457 * dbus/dbus-connection-internal.h:
6458 * dbus/dbus-connection.c:
6459 * dbus/dbus-connection.h:
6461 Change _peek to _borrow,_return & _steal_borrowed.
6462 Change disconnect callback to event.
6463 Make dbus_connection_dispatch_messages reentrant.
6465 * dbus/dbus-transport.c:
6466 Don't ref the connection on calls to the transport
6469 * dbus/dbus-message-handler.c:
6472 * glib/dbus-gmain.c:
6473 Don't use peek_message anymore
6476 * test/debug-thread.c:
6477 * test/debug-thread.h:
6478 Simple thread implementation that asserts() on deadlocks in
6479 single-threaded code.
6482 (main) Call debug_threads_init.
6485 Use disconnect message instead of disconnect callback.
6489 Don't call dbus_connection_set_disconnect_function. Instead export
6490 bus_connection_disconnect.
6493 Call bus_connection_disconnect when we get a disconnected message.
6495 2003-02-15 Havoc Pennington <hp@pobox.com>
6497 * dbus/dbus-message.c (dbus_message_new): fool around with the
6500 2003-02-14 Havoc Pennington <hp@pobox.com>
6502 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6504 * dbus/dbus-memory.c: fail if the debug functions indicate we
6507 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6508 (_dbus_decrement_fail_alloc_counter): debug functions to
6509 simulate memory allocation failures
6511 2003-02-14 Havoc Pennington <hp@pobox.com>
6513 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6516 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6518 * bus/driver.c: (bus_driver_handle_hello):
6520 * bus/services.c: (bus_service_lookup):
6521 Reorder message sending so we get a more sane order.
6523 * test/bus-test.c: (message_handler):
6526 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6528 * bus/driver.c: (bus_driver_send_service_deleted),
6529 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6530 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6531 (bus_driver_send_welcome_message),
6532 (bus_driver_handle_list_services),
6533 (bus_driver_handle_acquire_service),
6534 (bus_driver_handle_service_exists):
6535 * dbus/dbus-bus.c: (dbus_bus_register_client),
6536 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6537 * dbus/dbus-errors.c: (dbus_result_to_string):
6538 * dbus/dbus-errors.h:
6539 * dbus/dbus-message.c: (dbus_message_append_args),
6540 (dbus_message_append_args_valist), (dbus_message_get_args),
6541 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6542 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6543 (dbus_message_iter_get_byte_array),
6544 (dbus_message_iter_get_string_array), (message_iter_test),
6545 (check_message_handling), (_dbus_message_test):
6546 * dbus/dbus-message.h:
6547 * test/bus-test.c: (main):
6548 Change fields to arguments in messages, so that they won't be
6549 confused with header fields.
6551 * glib/test-dbus-glib.c: (main):
6552 Remove append_fields from hello message.
6554 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6556 * dbus/dbus-errors.c:
6557 * dbus/dbus-message.c:
6558 * dbus/dbus-string.c:
6559 Documentation fixes.
6561 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6563 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6565 Implement support for timeouts in dbus-glib.
6567 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6569 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6570 * dbus/dbus-message.c: (process_test_subdir):
6571 * test/break-loader.c: (find_breaks_based_on):
6572 Plug some memory leaks.
6574 2003-02-13 Richard Hult <rhult@codefactory.se>
6576 * bus/main.c: Fix build.
6578 * dbus/dbus-errors.h:
6579 * dbus/dbus-errors.c: Fix copyright for Anders.
6581 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6586 * bus/connection.c: (bus_connection_foreach):
6589 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6590 (unescape_string), (new_section), (parse_section_start),
6591 (parse_key_value), (report_error), (bus_desktop_file_load),
6592 (bus_desktop_file_get_string):
6593 * bus/desktop-file.h:
6594 Use DBusError for error reporting.
6596 * bus/dispatch.c: (send_one_message),
6597 (bus_dispatch_message_handler):
6598 * bus/driver.c: (bus_driver_send_service_deleted),
6599 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6600 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6601 (bus_driver_send_welcome_message),
6602 (bus_driver_handle_list_services),
6603 (bus_driver_handle_acquire_service),
6604 (bus_driver_handle_service_exists):
6605 * bus/loop.c: (bus_loop_run):
6607 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6609 * bus/utils.c: (bus_wait_for_memory):
6611 New files with general utility functions.
6613 * dbus/dbus-internals.h:
6614 Remove _DBUS_HANDLE_OOM.
6616 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6618 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6619 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6620 * dbus/dbus-errors.h:
6621 Add DBusError structure.
6623 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6625 * test/data/valid-messages/standard-acquire-service.message:
6626 * test/data/valid-messages/standard-hello.message:
6627 * test/data/valid-messages/standard-list-services.message:
6628 * test/data/valid-messages/standard-service-exists.message:
6629 Add some standard messages.
6631 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6633 * bus/driver.c: (bus_driver_send_welcome_message),
6634 (bus_driver_handle_list_services),
6635 (bus_driver_handle_acquire_service),
6636 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6637 Update for API changes in libdbus.
6639 * dbus/dbus-message.c: (dbus_message_new_reply):
6640 * dbus/dbus-message.h:
6641 Remove the name argument. The spec states that replies shouldn't
6644 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6646 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6647 (report_error), (bus_desktop_file_load), (lookup_section),
6648 (lookup_line), (bus_desktop_file_get_raw),
6649 (bus_desktop_file_get_string):
6650 * bus/desktop-file.h:
6651 Some fixes, and new functions for getting a key value from a section.
6653 2003-02-13 Havoc Pennington <hp@pobox.com>
6655 * test/data/auth/fail-after-n-attempts.auth-script: new test
6657 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6660 2003-02-13 Havoc Pennington <hp@pobox.com>
6662 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6663 dbus_credentials_match were backward
6665 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6666 NO_CREDENTIALS and ROOT_CREDENTIALS
6668 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6669 into here. Never process more commands after we've reached an
6670 end state; store further data as unused bytes.
6672 * test/data/auth/*: add more auth tests
6674 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6675 command to match exact string and EXPECT_UNUSED to match unused
6678 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6680 2003-02-12 Havoc Pennington <hp@pobox.com>
6682 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6683 \r off of popped lines
6685 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6688 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6691 2003-02-12 Havoc Pennington <hp@pobox.com>
6693 * dbus/Makefile.am: remove break-loader from the build, since it
6696 * configure.in: add --enable-gcov to turn on coverage profiling
6697 flags and disable optimization
6699 2003-02-10 Havoc Pennington <hp@pobox.com>
6701 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6702 initial cut at test framework for DBusAuth from laptop.
6703 Doesn't quite work yet but it compiles and I need to get
6704 it off the 266mhz laptop. ;-)
6706 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6707 fix a memleak in error case
6709 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6712 * bus/desktop-file.c:
6713 * bus/desktop-file.h:
6714 Add a desktop file parser.
6716 2003-02-11 Zack Rusin <zack@kde.org>
6718 * qt/message.[h|cpp]: sample implementation
6719 of the KDE wrapper for DBusMessage
6721 2003-02-09 Zack Rusin <zack@kde.org>
6723 * test/bus-test.c: make_it_compile
6724 * doc/dbus-specification.sgml: minimal semantic fix
6726 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6732 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6735 * dbus/dbus-break-loader.c:
6737 * test/break-loader.c:
6738 Move dbus-break-loader to test/ and rename it to break-loader.
6740 2003-02-02 Havoc Pennington <hp@pobox.com>
6742 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6743 for code to manage cookies in your home directory
6745 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6747 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6748 to authenticate, then disconnect the client.
6750 2003-02-03 Alexander Larsson <alexl@redhat.com>
6752 * dbus/dbus-message.c (dbus_message_append_fields):
6755 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6757 * doc/dbus-specification.sgml:
6758 Update address format section.
6760 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6763 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6764 (message_handler), (new_connection_callback), (loop_quit),
6768 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6770 * bus/driver.c: (bus_driver_handle_service_exists):
6771 Simplify the code a bit.
6773 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6776 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6779 Add libdbus-daemon.la and link to it.
6781 2003-02-01 James Willcox <jwillcox@gnome.org>
6783 * bus/driver.c: (bus_driver_handle_own_service):
6784 Actually include the service reply code in the message.
6786 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6788 * bus/driver.c: (bus_driver_handle_service_exists):
6789 Don't unref the incoming message.
6791 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6793 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6795 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6797 * dbus/dbus-server.c: (dbus_server_listen):
6798 * dbus/dbus-transport.c: (_dbus_transport_open):
6799 ifdef out the calls to the debug transport and server.
6801 2003-02-02 Alexander Larsson <alexl@redhat.com>
6803 * dbus/dbus-watch.c (dbus_watch_get_flags):
6804 Add note in the docs that ERROR or HANGUP won't be returned
6805 and are assumed always on.
6807 * glib/dbus-gmain.c (add_watch):
6808 Always add IO_ERR | IO_HUP
6810 * dbus/dbus-message.h:
6811 Add semicolon after dbus_message_iter_get_string_array().
6812 Makes qt code build again
6814 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6816 * bus/driver.c: (create_unique_client_name),
6817 (bus_driver_handle_hello):
6818 Don't take a name, just use a numeric id to identify
6822 * dbus/dbus-bus.c: (dbus_bus_register_client),
6823 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6825 Add new convenience functions for communicating with the bus.
6827 * dbus/dbus-message.h:
6829 * dbus/dbus-protocol.h:
6832 2003-02-01 Alexander Larsson <alexl@redhat.com>
6834 * dbus/dbus-message.c (dbus_message_append_fields):
6835 Add some more doc comments.
6837 2003-02-01 Havoc Pennington <hp@pobox.com>
6839 * dbus/dbus-break-loader.c (randomly_modify_length): change
6840 a 4-byte value in the message as if it were a length
6842 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6843 execute bit on saved files
6845 2003-02-01 Havoc Pennington <hp@pobox.com>
6847 * dbus/dbus-break-loader.c (main): new program to find messages
6848 that break the loader.
6850 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6851 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6853 * dbus/dbus-string.c (_dbus_string_set_byte): new
6855 2003-01-31 Havoc Pennington <hp@pobox.com>
6857 * dbus/dbus-message.c: refactor the test code to be more general,
6858 in preparation for writing a "randomly permute test cases to
6859 try to break the loader" program.
6861 2003-01-31 Havoc Pennington <hp@pobox.com>
6863 * doc/dbus-specification.sgml: work on the specification
6865 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6866 the protocol version of the message.
6868 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6869 no longer specifies that.
6870 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6873 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6874 "break" for DBUS_TYPE_NIL, remove @todo
6876 2003-01-31 Havoc Pennington <hp@pobox.com>
6878 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6879 just set_is_error/get_is_error as this is a commonly-used
6880 function, and write docs.
6882 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6884 * dbus/dbus-address.c: (dbus_address_entry_free):
6885 Free key and value lists.
6887 * dbus/dbus-internals.c: (_dbus_type_to_string):
6888 Add the types we didn't have.
6890 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6891 (_dbus_marshal_validate_arg):
6894 * dbus/dbus-message.c: (dbus_message_set_sender):
6895 Remove todo about being able to set sender to NULL.
6897 (dbus_message_set_is_error_reply),
6898 (dbus_message_get_is_error_reply):
6899 * dbus/dbus-message.h:
6902 * dbus/dbus-protocol.h:
6903 Add error reply flag.
6905 * test/data/valid-messages/opposite-endian.message:
6906 Add NIL type to test.
6908 2003-01-31 Havoc Pennington <hp@pobox.com>
6910 * doc/dbus-specification.sgml: fully specify the header. Add
6911 flags and major protocol version, and change header/body len to
6914 * dbus/dbus-message-builder.c (append_saved_length): append length
6917 * dbus/dbus-message.c (dbus_message_create_header): change header
6918 length and body length to unsigned. Add the new fields from the
6920 (_dbus_message_loader_return_buffer): unsigned header/body len
6922 2003-01-30 Havoc Pennington <hp@pobox.com>
6924 * dbus/dbus-auth.c: rework to use only REJECTED, no
6927 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6928 use REJECTED, suggested by Mark McLoughlin
6930 2003-01-30 Havoc Pennington <hp@pobox.com>
6932 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6933 a better way to report errors here. e.g. "unix address lacks
6934 path" or something. also "no such file" when the path doesn't
6937 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6939 (dbus_parse_address): add @todo about documenting address format,
6940 and allowing , and ; to be escaped
6942 2003-01-30 Anders Carlsson <andersca@codefactory.se>
6945 Add dbus-address.[ch]
6947 * dbus/dbus-address.c: (dbus_address_entry_free),
6948 (dbus_address_entries_free), (create_entry),
6949 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6950 (dbus_parse_address), (_dbus_address_test):
6951 * dbus/dbus-address.h:
6952 New files for dealing with address parsing.
6954 * dbus/dbus-connection.c:
6955 Document timeout functions.
6957 * dbus/dbus-message.c:
6958 Document dbus_message_new_from_message.
6960 * dbus/dbus-server-debug.c:
6963 * dbus/dbus-server.c: (dbus_server_listen):
6964 Parse address and use correct server implementation.
6966 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6967 * dbus/dbus-string.h:
6968 New function with test.
6970 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6974 * dbus/dbus-transport-debug.c:
6977 * dbus/dbus-transport.c: (_dbus_transport_open):
6978 Parse address and use correct transport implementation.
6980 2003-01-30 Havoc Pennington <hp@pobox.com>
6982 * dbus/dbus-message.c: use message->byte_order instead of
6983 DBUS_COMPILER_BYTE_ORDER throughout.
6984 (dbus_message_create_header): pad header to align the
6985 start of the body of the message to 8-byte boundary
6987 * dbus/dbus-marshal.h: make all the demarshalers take const
6988 DBusString arguments.
6990 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6991 validate message args here, so we don't have to do slow validation
6992 later, and so we catch bad messages as they are incoming. Also add
6993 better checks on header_len and body_len. Also fill in
6996 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6997 implemented properly)
6998 (_dbus_string_validate_nul): new function to check all-nul
7000 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
7001 get_arg_end_pos and remove all validation
7002 (_dbus_marshal_validate_arg): actually do validation here.
7004 2003-01-29 Havoc Pennington <hp@pobox.com>
7006 * dbus/dbus-message.c (check_message_handling): fix assertion
7007 failure on set_client_serial
7009 2003-01-28 Havoc Pennington <hp@pobox.com>
7011 * dbus/dbus-server-debug.c: Add doc section comments
7013 * dbus/dbus-transport-debug.c: add doc section comments
7015 2003-01-28 Havoc Pennington <hp@redhat.com>
7017 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
7018 the reverse order from how I had it
7019 (_dbus_string_base64_encode): reverse encoding order. I was
7020 basically byteswapping everything during encoding.
7022 2003-01-28 Anders Carlsson <andersca@codefactory.se>
7024 * dbus/dbus-connection-internal.h:
7025 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
7026 (_dbus_connection_remove_timeout):
7027 Add functions for adding and removing timeouts.
7029 * dbus/dbus-message.c: (dbus_message_new_from_message):
7030 Add new function that takes a message and creates an exact
7031 copy of it, but with the refcount set to 1.
7032 (check_message_handling):
7035 * dbus/dbus-server-protected.h:
7036 * dbus/dbus-server.c: (_dbus_server_init_base),
7037 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
7038 (dbus_server_set_timeout_functions):
7039 (_dbus_server_remove_timeout):
7040 New functions so that a server can add and remove timeouts.
7042 (dbus_server_listen):
7043 Add commented out call to dbus_server_debug_new.
7045 * dbus/dbus-timeout.c: (_dbus_timeout_new):
7046 Actually set the handler, doh.
7048 * dbus/dbus-transport.c: (_dbus_transport_open):
7049 Add commented out call to dbus_transport_debug_client_new.
7052 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
7054 2003-01-28 Havoc Pennington <hp@pobox.com>
7056 * dbus/dbus-message.c (check_message_handling): function to check
7057 on the loaded message, iterates over it etc.
7059 2003-01-28 Havoc Pennington <hp@pobox.com>
7061 * test/Makefile.am (dist-hook): fix make distdir
7063 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
7065 2003-01-27 Havoc Pennington <hp@pobox.com>
7067 * dbus/dbus-mempool.c (time_for_size): replace printf with
7070 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
7071 empty lines; fix the SAVE_LENGTH stuff to be
7072 START_LENGTH/END_LENGTH so it actually works; couple other
7075 * test/Makefile.am (dist-hook): add dist-hook for .message files
7077 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
7078 can be constant or locked.
7079 (_dbus_string_free): allow freeing a const string as
7082 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
7084 * dbus/dbus-test-main.c (main): take an argument which is the
7085 directory containing test data
7087 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
7088 argument to this and load all the messages in test/data/
7089 checking that they can be loaded or not loaded as appropriate.
7091 2003-01-27 Anders Carlsson <andersca@codefactory.se>
7093 * bus/dispatch.c: (bus_dispatch_message_handler):
7094 Dispatch messages sent to services.
7096 * bus/driver.c: (bus_driver_send_service_deleted),
7097 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7098 (bus_driver_send_service_acquired):
7099 Add helper functions for sending service related messages.
7101 (bus_driver_send_welcome_message):
7102 Send HELLO_REPLY instead of WELCOME.
7104 (bus_driver_handle_list_services):
7105 Send LIST_SERVICES_REPLY instead of SERVICES.
7107 (bus_driver_handle_own_service),
7108 (bus_driver_handle_service_exists):
7109 New message handlers.
7111 (bus_driver_handle_message):
7112 Invoke new message handlers.
7114 (bus_driver_remove_connection):
7115 Don't remove any services here since that's done automatically
7116 by bus_service_remove_owner now.
7119 New function signatures.
7121 * bus/services.c: (bus_service_add_owner):
7122 Send ServiceAcquired message if we're the only primary owner.
7124 (bus_service_remove_owner):
7125 Send ServiceAcquired/ServiceLost messages.
7127 (bus_service_set_prohibit_replacement),
7128 (bus_service_get_prohibit_replacement):
7129 Functions for setting prohibit replacement.
7131 (bus_service_has_owner):
7132 New function that checks if a connection is in the owner queue of
7136 Add new function signatures.
7138 * dbus/dbus-list.c: (_dbus_list_test):
7139 Add tests for _dbus_list_remove_last and traversing the list backwards.
7142 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
7143 go any further, so return NULL then.
7145 * dbus/dbus-protocol.h:
7146 Add new messages, service flags and service replies.
7148 2003-01-26 Havoc Pennington <hp@pobox.com>
7150 * dbus/dbus-message-builder.c: implement, completely untested.
7152 * test/data/*: add data to be used in testing.
7153 ".message" files are our simple loadable text format.
7154 ".message-raw" will be binary dumps of messages.
7156 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
7158 2003-01-26 Havoc Pennington <hp@pobox.com>
7160 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
7162 * dbus/dbus-errors.c (dbus_result_to_string): add
7165 * dbus/dbus-message-builder.c: new file, will contain code to load
7166 up messages from files. Not implemented yet.
7168 2003-01-26 Havoc Pennington <hp@pobox.com>
7170 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
7171 the sender by setting to NULL
7173 2003-01-26 Havoc Pennington <hp@pobox.com>
7175 The unit tests pass, but otherwise untested. If it breaks, the
7176 tests should have been better. ;-)
7178 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
7181 * dbus/dbus-message.c: redo everything so we maintain
7182 message->header as the only copy of the various fields.
7183 This avoids the possibility of out-of-memory in some cases,
7184 for example dbus_message_lock() can't run out of memory anymore,
7185 and avoids extra copying. Figured I may as well go ahead and do
7186 this since it was busted for dbus_message_lock to not return
7187 failure on OOM, and dbus_message_write_header was totally
7188 unchecked for OOM. Also fixed some random other bugs.
7190 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
7191 that strings are nul-terminated. Also, end_pos can be equal
7192 to string length just not greater than, I think.
7193 (_dbus_marshal_set_int32): new function
7194 (_dbus_marshal_set_uint32): new function
7195 (_dbus_marshal_set_string): new function
7197 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
7198 a warning, init timeout_list to NULL
7199 (dbus_connection_send_message): don't use uninitialized variable
7202 * dbus/dbus-string.c (_dbus_string_replace_len): new function
7204 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7206 * bus/driver.c: (bus_driver_handle_hello),
7207 (bus_driver_send_welcome_message):
7210 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7212 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
7213 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7214 (dbus_connection_unref):
7215 * dbus/dbus-marshal.c: (_dbus_marshal_test):
7216 * dbus/dbus-message.c: (dbus_message_unref),
7219 (dbus_message_get_fields):
7220 Remove debugging printout.
7222 (_dbus_message_loader_return_buffer):
7223 Don't store the header string.
7225 (_dbus_message_test):
7228 2003-01-26 Richard Hult <rhult@codefactory.se>
7230 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
7231 the file descriptor list, since it can change under us.
7233 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7235 * glib/dbus-gmain.c: (dbus_connection_prepare),
7236 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
7237 (remove_watch), (dbus_connection_hookup_with_g_main):
7238 Rewrite the glib handling to use its own GSource instead of a
7239 GIOChannel so we can catch messages put in the queue while waiting
7242 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7245 * bus/connection.c: (connection_disconnect_handler),
7246 (connection_watch_callback), (bus_connection_setup):
7247 * bus/dispatch.c: (send_one_message),
7248 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
7249 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
7251 * bus/driver.c: (bus_driver_send_service_deleted),
7252 (bus_driver_send_service_created), (bus_driver_handle_hello),
7253 (bus_driver_send_welcome_message),
7254 (bus_driver_handle_list_services), (bus_driver_remove_connection),
7255 (bus_driver_handle_message):
7257 Refactor code, put the message dispatching in its own file. Use
7258 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
7261 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7263 * dbus/dbus-internals.h:
7264 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
7266 * dbus/dbus-message.c: (dbus_message_get_sender):
7267 * dbus/dbus-message.h:
7268 Implement dbus_message_get_sender.
7270 * dbus/dbus-protocol.h:
7271 Add message and service defines.
7273 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7275 * dbus/dbus-connection.c: (dbus_connection_send_message):
7276 * dbus/dbus-message-internal.h:
7277 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
7278 (dbus_message_write_header):
7279 Remove _dbus_messag_unlock and don't set the client serial on a
7280 message if one already exists.
7282 2003-01-24 Havoc Pennington <hp@pobox.com>
7284 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
7287 * bus/driver.c (bus_driver_handle_list_services): fix a leak
7290 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7292 * dbus/dbus-list.c: (alloc_link), (free_link):
7293 Use a memory pool for the links.
7295 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7297 * bus/connection.c: (bus_connection_foreach):
7299 Add new bus_connection_foreach function.
7301 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
7302 Add function that broadcasts a message to all clients.
7304 (bus_driver_send_service_created), (bus_driver_handle_hello),
7305 (bus_driver_send_welcome_message),
7306 (bus_driver_handle_list_services), (bus_driver_message_handler):
7307 Implement functions that take care of listing services, and notifying
7308 clients when new services are created.
7310 * bus/services.c: (bus_services_list):
7312 Add new function that returns an array of strings with the currently
7313 registered services.
7316 * glib/dbus-gmain.c:
7317 Update copyright year.
7319 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7321 * dbus/dbus-connection.c: (dbus_connection_send_message):
7322 Unlock the message in case it was sent earlier.
7324 (dbus_connection_send_message_with_reply_and_block):
7325 Remove the reply message from the list.
7327 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7328 Set array_len and new_pos correctly.
7330 (_dbus_marshal_test):
7331 Remove debug output.
7333 * dbus/dbus-message-internal.h:
7334 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
7335 New function that returns the reply serial.
7337 (_dbus_message_unlock):
7338 New function that unlocks a message and resets its header.
7340 (dbus_message_append_string_array),
7341 (dbus_message_get_fields_valist),
7342 (dbus_message_iter_get_field_type),
7343 (dbus_message_iter_get_string_array),
7344 (dbus_message_get_fields),
7345 (dbus_message_append_fields_valist):
7346 Handle string arrays.
7348 (dbus_message_set_sender):
7349 Make this function public since the bus daemon needs it.
7351 (decode_header_data):
7352 Set the reply serial to -1 initially.
7354 * dbus/dbus-message.h:
7355 Add dbus_message_set_sender.
7357 2003-01-24 Havoc Pennington <hp@pobox.com>
7359 * doc/dbus-specification.sgml: add some stuff
7361 2003-01-22 Havoc Pennington <hp@pobox.com>
7363 * doc/dbus-specification.sgml: Start to document the protocol.
7365 2003-01-22 Havoc Pennington <hp@pobox.com>
7367 * dbus/dbus-connection.c
7368 (dbus_connection_send_message_with_reply_and_block): add some @todo
7370 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
7372 2003-01-21 Havoc Pennington <hp@pobox.com>
7374 (patch untested because can't compile)
7376 * bus/driver.c (create_unique_client_name): make this function
7377 never recycle client names. Also, caller should initialize
7380 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
7382 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7384 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7385 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7386 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
7387 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
7388 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7389 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7390 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
7391 * dbus/dbus-marshal.h:
7392 * dbus/dbus-protocol.h:
7393 Add support for marshalling and demarshalling integer, double
7396 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7401 * bus/connection.c: (connection_disconnect_handler):
7402 Remove the connection from the bus driver's list.
7404 (connection_watch_callback): Dispatch messages.
7406 (free_connection_data): Free connection name.
7408 (bus_connection_setup): Add connection to the bus driver's list.
7409 (bus_connection_remove_owned_service):
7410 (bus_connection_set_name), (bus_connection_get_name):
7411 Add functions for setting and getting the connection's name.
7414 Add function headers.
7416 * bus/driver.c: (create_unique_client_name),
7417 (bus_driver_handle_hello_message),
7418 (bus_driver_send_welcome_message), (bus_driver_message_handler),
7419 (bus_driver_add_connection), (bus_driver_remove_connection):
7422 * bus/services.c: (bus_service_free):
7424 New file that handles communication and registreation with the bus
7427 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7429 * dbus/dbus-connection.c: (dbus_connection_send_message):
7430 Add a new client_serial parameter.
7432 (dbus_connection_send_message_with_reply):
7433 Remove a @todo since we've implemented the blocking function.
7435 (dbus_connection_send_message_with_reply_and_block):
7436 New function that sends a message and waits for a reply and
7437 then returns the reply.
7439 * dbus/dbus-connection.h:
7442 * dbus/dbus-errors.c: (dbus_result_to_string):
7443 * dbus/dbus-errors.h:
7444 Add new DBUS_RESULT.
7446 * dbus/dbus-message-internal.h:
7447 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
7448 (_dbus_message_set_sender), (dbus_message_write_header),
7449 (dbus_message_new_reply), (decode_header_data),
7450 (_dbus_message_loader_return_buffer), (_dbus_message_test):
7451 * dbus/dbus-message.h:
7452 Add new functions that set the reply serial and sender.
7453 Also marshal and demarshal them correctly and add test.
7455 * dbus/dbus-protocol.h:
7456 Add new DBUS_MESSAGE_TYPE_SENDER.
7459 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
7460 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
7461 (dbus_connection_hookup_with_g_main):
7462 * glib/test-dbus-glib.c: (main):
7463 Rewrite to use GIOChannel and remove the GSource crack.
7465 * test/echo-client.c: (main):
7466 * test/watch.c: (check_messages):
7467 Update for changed APIs
7469 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7471 * dbus/Makefile.am: Add dbus-timeout.[cħ]
7473 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
7474 Create a DBusTimeoutList.
7475 (dbus_connection_set_timeout_functions): Add new function to
7476 set timeout callbacks
7478 * dbus/dbus-connection.h: Add public DBusTimeout API.
7480 * dbus/dbus-message.c: (dbus_message_get_service):
7481 * dbus/dbus-message.h: New function.
7483 * dbus/dbus-server.c: Fix small doc typo.
7485 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
7487 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7489 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
7490 of the string, just as long as specified.
7492 2003-01-19 Havoc Pennington <hp@pobox.com>
7494 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
7497 * dbus/dbus-server.c (dbus_server_set_max_connections)
7498 (dbus_server_get_max_connections, dbus_server_get_n_connections):
7499 keep track of current number of connections, and add API for
7500 setting a max (but haven't implemented enforcing the max yet)
7502 2003-01-18 Havoc Pennington <hp@pobox.com>
7504 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7505 reading/writing if read_watch != NULL or write_watch != NULL.
7507 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7508 the message loader code to actually load message->header and
7509 message->body into the newly-created message.
7511 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7514 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7515 (dbus_connection_get_max_message_size)
7516 (dbus_connection_set_max_live_messages_size)
7517 (dbus_connection_get_max_live_messages_size): implement some
7518 resource limitation functions
7520 * dbus/dbus-resources.c: new file implementing some of the
7521 resource limits stuff
7523 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7524 missing docs, add @todo to handle OOM etc.
7526 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7529 2003-01-18 Havoc Pennington <hp@pobox.com>
7531 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7532 connection if it hasn't been already.
7534 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7535 replace with DisconnectFunction.
7537 2003-01-18 Havoc Pennington <hp@pobox.com>
7539 Building --disable-verbose-mode --disable-asserts --disable-tests
7540 cuts the library from 112K to 45K or so
7542 * configure.in: check for varargs macro support,
7543 add --enable-verbose-mode, --enable-asserts.
7545 * dbus/dbus-internals.h (_dbus_assert): support
7547 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7549 2003-01-18 Havoc Pennington <hp@pobox.com>
7551 * dbus/dbus-test.c: include config.h so that tests actually run
7553 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7554 so the failure mode when that assumption fails will be plenty
7557 2003-01-18 Havoc Pennington <hp@pobox.com>
7559 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7561 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7564 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7565 since we don't want to use those in make check
7567 2003-01-15 Havoc Pennington <hp@redhat.com>
7573 2003-01-15 Havoc Pennington <hp@redhat.com>
7575 * test/Makefile.am: fix so that test source code ends up in the
7576 distribution on make distcheck
7578 2003-01-15 Havoc Pennington <hp@redhat.com>
7584 2003-01-15 Havoc Pennington <hp@redhat.com>
7586 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7587 fix build when --disable-tests
7589 * Makefile.am (EXTRA_DIST): put HACKING in here
7591 * HACKING: document procedure for making a tarball release.
7593 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7595 * bus/connection.c: (connection_error_handler),
7596 (bus_connection_setup):
7597 * bus/main.c: (main):
7598 Make sure that the DBusConnectionData struct is NULLed
7599 out to prevent a segfault.
7601 * dbus/dbus-errors.c: (dbus_result_to_string):
7602 * dbus/dbus-errors.h:
7603 * dbus/dbus-message.c: (dbus_message_get_fields),
7604 (dbus_message_get_fields_valist), (_dbus_message_test):
7605 * dbus/dbus-message.h:
7606 Make dbus_message_get_fields return a result code so we can
7607 track invalid fields as well as oom.
7609 2003-01-11 Havoc Pennington <hp@pobox.com>
7611 * configure.in: change --enable-test/--enable-ansi action-if-given
7612 to enable_foo=$enableval instead of enable_foo=yes
7614 2003-01-08 Havoc Pennington <hp@pobox.com>
7616 * dbus/dbus-string.c (_dbus_string_align_length): new function
7618 * dbus/dbus-test-main.c: move main() for test app here
7620 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7621 symbol to run tests, because dbus-test isn't in the main
7624 Code review nitpicks.
7626 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7627 for people with narrow emacs ;-). Assert client_serial was filled
7628 in. Assert message->name != NULL.
7629 (dbus_message_append_fields): have "first_field_type" arg separate
7630 from va list, needed for C++ binding that also uses varargs IIRC
7631 and helps with type safety
7632 (dbus_message_new): add @todo about using DBusString to store
7633 service/name internally
7634 (dbus_message_new): don't leak ->service and ->name on OOM later
7636 (dbus_message_unref): free the service name
7637 (dbus_message_get_fields): same change to varargs
7638 i.e. first_field_type
7639 (_dbus_message_loader_return_buffer): assert that the message data
7640 is aligned (if not it's a bug in our code). Put in verbose griping
7641 about why we set corrupted = TRUE.
7642 (decode_header_data): add FIXME that char* is evil. Was going to
7643 add FIXME about evil locale-specific string.h strncmp, but just
7644 switched to wacky string-as-uint32 optimization. Move check for
7645 "no room for field name" above get_const_data_len() to avoid
7646 assertion failure in get_const_data_len if we have trailing 2
7647 bytes or the like. Check for service and name fields being
7648 provided twice. Don't leak service/name on error. Require field
7649 names to be aligned to 4 bytes.
7651 * dbus/dbus-marshal.c: move byte swap stuff to header
7652 (_dbus_pack_int32): uscore-prefix
7653 (_dbus_unpack_int32): uscore-prefix
7654 (_dbus_unpack_uint32): export
7655 (_dbus_demarshal_string): add @todo complaining about use of
7657 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7658 handling allowing corrupt data to go unchecked
7660 2003-01-08 Havoc Pennington <hp@redhat.com>
7662 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7663 to the select() as needed for authentication. (should be using
7664 _dbus_poll() not select, but for another day)
7666 * dbus/dbus.h: include dbus/dbus-protocol.h
7668 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7670 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7673 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7675 * dbus/dbus-internals.c: (_dbus_type_to_string):
7676 New function that returns a string describing a type.
7678 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7679 * dbus/dbus-marshal.h:
7680 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7681 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7682 (dbus_message_iter_get_byte_array):
7683 * dbus/dbus-message.h:
7684 Add new convenience functions for appending and getting message fields.
7685 Also add demarshalling routines for byte arrays.
7687 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7689 * dbus/dbus-connection-internal.h:
7690 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7691 (_dbus_connection_get_next_client_serial),
7692 (dbus_connection_send_message):
7693 * dbus/dbus-internals.h:
7694 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7695 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7696 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7697 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7698 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7699 (_dbus_verbose_bytes), (_dbus_marshal_test):
7700 * dbus/dbus-marshal.h:
7701 * dbus/dbus-message-internal.h:
7702 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7703 (dbus_message_write_header), (_dbus_message_lock),
7704 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7705 (dbus_message_get_name), (dbus_message_append_int32),
7706 (dbus_message_append_uint32), (dbus_message_append_double),
7707 (dbus_message_append_string), (dbus_message_append_byte_array),
7708 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7709 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7710 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7711 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7712 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7713 (decode_header_data), (_dbus_message_loader_return_buffer),
7714 (message_iter_test), (_dbus_message_test):
7715 * dbus/dbus-message.h:
7716 * dbus/dbus-protocol.h:
7717 * dbus/dbus-test.c: (main):
7719 * glib/test-dbus-glib.c: (message_handler), (main):
7720 * test/echo-client.c: (main):
7721 * test/watch.c: (check_messages):
7722 Make messages sendable and receivable for real.
7724 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7726 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7727 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7728 * dbus/dbus-message.c: (dbus_message_append_int32),
7729 (dbus_message_append_uint32), (dbus_message_append_double),
7730 (dbus_message_append_string), (dbus_message_append_byte_array):
7731 Handle OOM restoration.
7733 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7735 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7736 (_dbus_demarshal_string), (_dbus_marshal_test):
7737 * dbus/dbus-marshal.h:
7738 * dbus/dbus-message.c: (dbus_message_get_name),
7739 Document these functions.
7741 (dbus_message_append_int32), (dbus_message_append_uint32),
7742 (dbus_message_append_double), (dbus_message_append_string),
7743 (dbus_message_append_byte_array):
7744 * dbus/dbus-message.h:
7745 Add functions for adding message fields of different types.
7747 * dbus/dbus-protocol.h:
7748 Add the different types.
7750 2003-01-05 Havoc Pennington <hp@pobox.com>
7752 * bus/connection.c: implement routines for handling connections,
7753 first thing is keeping a list of owned services on each connection
7754 and setting up watches etc.
7756 * bus/services.c: implement a mapping from service names to lists
7759 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7761 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7762 to use static mutexes for global data
7764 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7765 collection of functions to set/get application-specific data
7766 on the DBusConnection.
7768 2003-01-04 Havoc Pennington <hp@pobox.com>
7770 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7771 (_dbus_poll): new function
7773 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7776 * bus/loop.c: initial code for the daemon main loop
7778 2003-01-04 Havoc Pennington <hp@pobox.com>
7780 * test/watch.c (error_handler): make it safe if the error handler
7781 is called multiple times (if we s/error handler/disconnect
7782 handler/ we should just guarantee it's called only once)
7784 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7785 error handler on disconnect (it's quite possible we should
7786 just change the error handler to a "disconnect handler," I'm
7787 not sure we have any other meaningful errors)
7789 * configure.in: check for getpwnam_r
7791 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7792 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7793 mechanism as in SASL spec, using socket credentials
7795 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7796 (_dbus_send_credentials_unix_socket): new function
7798 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7800 (_dbus_write): only check errno if <0 returned
7801 (_dbus_write_two): ditto
7803 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7805 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7806 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7807 (_dbus_marshal_test):
7808 * dbus/dbus-marshal.h:
7809 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7810 to _dbus_marshal_utf8_string. Also fix some tests.
7812 2002-12-28 Harri Porten <porten@kde.org>
7814 * configure.in: added check for C++ compiler and a very cheesy
7815 check for the Qt integration
7817 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7819 * qt/Makefile.am: added
7821 * qt/.cvsignore: added
7823 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7824 latter, added #ifdef QT_THREAD_SUPPORT guard.
7826 * dbus/Makefile.am: added missing headers for make dist
7828 2002-12-28 Kristian Rietveld <kris@gtk.org>
7830 * dbus/Makefile.am: fixup export-symbols-regex.
7832 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7834 * acinclude.m4: Add this file and put the
7835 PKG_CHECK_MODULE macro in it.
7837 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7839 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7840 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7841 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7842 (_dbus_marshal_test):
7843 Make the demarshalling routines align the pos argument.
7844 Add string marshalling tests and fix the obvious bugs
7847 2002-12-26 Havoc Pennington <hp@pobox.com>
7849 * dbus/dbus-auth.c: fixes fixes fixes
7851 * dbus/dbus-transport-unix.c: wire up support for
7852 encoding/decoding data on the wire
7854 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7855 (_dbus_auth_decode_data): append to target string
7856 instead of nuking it.
7858 2002-12-26 Havoc Pennington <hp@pobox.com>
7860 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7861 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7864 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7865 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7866 now). Main point is because I wanted unpack_uint32 to implement
7868 (_dbus_verbose_bytes): new function
7870 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7872 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7873 mechanism to handle a corrupt message stream
7874 (_dbus_message_loader_new): fix preallocation to only prealloc,
7877 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7878 (_dbus_string_test): enhance tests for copy/move and fix the
7881 * dbus/dbus-transport-unix.c: Hold references in more places to
7882 avoid reentrancy problems
7884 * dbus/dbus-transport.c: ditto
7886 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7887 leak reference count in no-message case
7889 * test/watch.c (do_mainloop): handle adding/removing watches
7890 during iteration over the watches. Also, ref the connection/server
7891 stored on a watch, so we don't try to mangle a destroyed one.
7893 * dbus/dbus-transport-unix.c (do_authentication): perform
7896 * dbus/dbus-auth.c (get_state): add a state
7897 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7898 (_dbus_auth_get_unused_bytes): append the unused bytes
7899 to the passed in string, rather than prepend
7901 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7902 the auth conversation DBusAuth
7904 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7905 (_dbus_transport_new_for_domain_socket): when creating a
7906 transport, pass in whether it's a client-side or server-side
7907 transport so we know which DBusAuth to create
7909 2002-12-03 Havoc Pennington <hp@pobox.com>
7911 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7912 _after_ finalizing the derived members
7913 (unix_connection_set): unref watch if we fail to add it
7915 * dbus/dbus-connection.c (dbus_connection_unref): delete the
7916 transport first, so that the connection owned by the
7917 transport will be valid as the transport finalizes.
7919 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7920 if necessary, and remove watches from the connection.
7922 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7924 2002-12-26 Anders Carlsson <andersca@codefactory.se>
7926 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7927 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7928 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7929 (_dbus_marshal_test):
7930 * dbus/dbus-marshal.h:
7931 Add string marshal functions and have the demarshal functions
7932 return the new position.
7934 2002-12-25 Havoc Pennington <hp@pobox.com>
7936 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7937 it is a simple protocol that just maps directly to SASL.
7939 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7940 initial implementation, not actually used yet.
7942 * dbus/dbus-string.c (_dbus_string_find): new function
7943 (_dbus_string_equal): new function
7944 (_dbus_string_base64_encode): new function
7945 (_dbus_string_base64_decode): new function
7947 2002-12-25 Anders Carlsson <andersca@codefactory.se>
7950 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7951 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7952 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7953 (_dbus_demarshal_uint32), (_dbus_marshal_test):
7954 * dbus/dbus-marshal.h:
7955 * dbus/dbus-protocol.h:
7956 * dbus/dbus-test.c: (main):
7958 Add un-optimized marshalling/demarshalling routines.
7960 2002-12-25 Harri Porten <porten@kde.org>
7962 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7964 2002-12-24 Zack Rusin <zack@kde.org>
7966 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7967 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7970 2002-12-24 Havoc Pennington <hp@pobox.com>
7972 * glib/dbus-gthread.c: fix include
7974 * glib/dbus-glib.h: rename DBusMessageHandler for now.
7975 I think glib API needs to change, though, as you don't
7976 want to use DBusMessageFunction, you want to use the
7977 DBusMessageHandler object. Probably
7978 dbus_connection_open_with_g_main_loop()
7979 and dbus_connection_setup_g_main_loop() or something like that
7980 (but think of better names...) that just create a connection
7981 that has watch/timeout functions etc. already set up.
7983 * dbus/dbus-connection.c
7984 (dbus_connection_send_message_with_reply): new function just to
7985 show how the message handler helps us deal with replies.
7987 * dbus/dbus-list.c (_dbus_list_remove_last): new function
7989 * dbus/dbus-string.c (_dbus_string_test): free a string that
7992 * dbus/dbus-hash.c: use memory pools for the hash entries
7993 (rebuild_table): be more paranoid about overflow, and
7994 shrink table when we can
7995 (_dbus_hash_test): reduce number of sprintfs and write
7996 valid C89. Add tests for case where we grow and then
7997 shrink the hash table.
7999 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
8001 * dbus/dbus-connection.c (dbus_connection_register_handler)
8002 (dbus_connection_unregister_handler): new functions
8004 * dbus/dbus-message.c (dbus_message_get_name): new
8006 * dbus/dbus-list.c: fix docs typo
8008 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
8009 an object representing a handler for messages.
8011 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8014 * glib/dbus-gthread.c: (dbus_gthread_init):
8015 Don't use the gdbus prefix for public functions.
8017 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8021 Add GLib checks and fixup .pc files
8025 * glib/dbus-gmain.c: (gdbus_connection_prepare),
8026 (gdbus_connection_check), (gdbus_connection_dispatch),
8027 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
8028 (dbus_connection_gsource_new):
8029 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
8030 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
8031 * glib/test-dbus-glib.c: (message_handler), (main):
8034 2002-12-15 Harri Porten <porten@kde.org>
8036 * autogen.sh: check for libtoolize before attempting to use it
8038 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
8041 * .cvsignore: ignore more stamp files
8043 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
8045 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
8046 without make install.
8048 2002-12-15 Havoc Pennington <hp@pobox.com>
8050 * dbus/dbus-threads.c: add thread stubs that a higher library
8051 layer can fill in. e.g. the GLib wrapper might fill them in with
8052 GThread stuff. We still need to use this thread API to
8053 thread-safe-ize the library.
8055 2002-12-12 Havoc Pennington <hp@pobox.com>
8057 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
8058 below new interfaces and include fewer system headers.
8060 * dbus/dbus-sysdeps.c (_dbus_read): new function
8061 (_dbus_write): new function
8062 (_dbus_write_two): new function
8063 (_dbus_connect_unix_socket): new function
8064 (_dbus_listen_unix_socket): new function
8066 * dbus/dbus-message-internal.h: change interfaces to use
8069 2002-12-11 Havoc Pennington <hp@pobox.com>
8071 * dbus/dbus-types.h: add dbus_unichar
8073 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
8075 * dbus/dbus-connection.c (dbus_connection_send_message): return
8078 * dbus/dbus-transport.c: include dbus-watch.h
8080 * dbus/dbus-connection.c: include dbus-message-internal.h
8082 * HACKING: add file with coding guidelines stuff.
8084 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
8085 handling here, for security purposes (as in vsftpd). Not actually
8086 using this class yet.
8088 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
8089 system/libc usage here, as in vsftpd, for ease of auditing (and
8090 should also simplify portability). Haven't actually moved all the
8091 system/libc usage into here yet.
8093 2002-11-25 Havoc Pennington <hp@pobox.com>
8095 * dbus/dbus-internals.c (_dbus_verbose): fix to not
8096 always print the first verbose message.
8098 2002-11-24 Havoc Pennington <hp@pobox.com>
8100 * test/echo-client.c, test/echo-server.c: cheesy test
8103 * configure.in (AC_CHECK_FUNCS): check for writev
8105 * dbus/dbus-message.c (_dbus_message_get_network_data): new
8108 * dbus/dbus-list.c (_dbus_list_foreach): new function
8110 * dbus/dbus-internals.c (_dbus_verbose): new function
8112 * dbus/dbus-server.c, dbus/dbus-server.h: public object
8113 representing a server that listens for connections.
8115 * dbus/.cvsignore: create
8117 * dbus/dbus-errors.h, dbus/dbus-errors.c:
8118 public API for reporting errors
8120 * dbus/dbus-connection.h, dbus/dbus-connection.c:
8121 public object representing a connection that
8122 sends/receives messages. (Same object used for
8123 both client and server.)
8125 * dbus/dbus-transport.h, dbus/dbus-transport.c:
8126 Basic abstraction for different kinds of stream
8127 that we might read/write messages from.
8129 2002-11-23 Havoc Pennington <hp@pobox.com>
8131 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
8134 * dbus/dbus-test.c (main): add list test, and include
8135 dbus-test.h as intended
8137 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
8138 (_dbus_hash_table_remove_int): return value indicates
8139 whether the entry existed to remove
8141 * dbus/dbus-list.c: add linked list utility class,
8144 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
8147 2002-11-23 Havoc Pennington <hp@pobox.com>
8149 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
8150 DBUS_END_DECLS to nothing, that should fix this once and for all
8152 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
8154 * dbus/dbus-message.c, dbus/dbus-hash.c:
8155 add some missing @brief
8157 2002-11-23 Havoc Pennington <hp@pobox.com>
8159 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
8160 to avoid confusing Doxygen
8162 * dbus/dbus-hash.c: @} not }@
8164 * dbus/dbus-message.c (struct DBusMessage): split out
8167 2002-11-23 Havoc Pennington <hp@pobox.com>
8169 * configure.in: pile on more warning flags if using gcc
8171 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
8172 to document static functions
8174 * configure.in: add summary to end of configure so it
8175 looks nice and attractive
8177 * dbus/dbus-hash.c: finish implementation and write unit
8180 * configure.in: add --enable-tests to enable unit tests
8182 * dbus/dbus-test.c: test program to run unit tests
8183 for all files in dbus/*, initially runs a test for
8186 * dbus/dbus-internals.h: file to hold some internal utility stuff
8188 2002-11-22 Havoc Pennington <hp@redhat.com>
8190 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
8191 "ported" away from Tcl
8193 * dbus/dbus-types.h: header for types such as dbus_bool_t
8195 2002-11-22 Havoc Pennington <hp@redhat.com>
8197 * dbus/dbus.h: fixups for doc warnings
8199 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
8201 (QUIET): make it quiet so we can see warnings
8203 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
8205 2002-11-22 Havoc Pennington <hp@redhat.com>
8207 * Makefile.am: include "Doxyfile" target in all-local
8209 * configure.in: generate the Doxyfile
8211 * Doxyfile.in: move Doxyfile here, so we can use
8212 configure to generate a Doxyfile with the right
8215 2002-11-22 Havoc Pennington <hp@redhat.com>
8217 * dbus/dbus-message.c: move inline docs into .c file
8219 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
8220 so all docs are under doc/
8221 (MAN_EXTENSION): generate man pages. Use extension
8222 ".3dbus" which matches ".3qt" on my system,
8223 I guess this is OK, I don't know really.
8224 (FILE_PATTERNS): look for .c files not .h, makes sense
8227 2002-11-22 Havoc Pennington <hp@pobox.com>
8229 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
8230 because any app can be a server, and any app can be a client,
8231 the bus is a special kind of server.
8233 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
8235 * Doxyfile : adding. Still needs Makefile rules to be generated
8236 automatically (just run "doxygen" in the toplevel dir for now to
8239 * dbus/dbus-message.h : Adding sample docs (javadoc since
8240 resembles gtk-doc a little more)
8242 * dbus/dbus.h : Adding sample docs
8244 2002-11-21 Havoc Pennington <hp@redhat.com>
8246 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
8247 so we can allow ourselves to include files directly,
8248 instead of having to use dbus.h
8250 * dbus/dbus.h: fill in
8252 * dbus/dbus-message.h: sketch out a sample header file.
8253 Include griping if you include it directly instead of
8256 * dbus/dbus-macros.h: new file with macros for extern "C",
8257 TRUE/FALSE, NULL, etc.
8259 * doc/file-boilerplate.c: put include guards in here
8261 2002-11-21 Havoc Pennington <hp@redhat.com>
8263 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
8265 * COPYING: include the GPL as well, and license code
8266 under both AFL and GPL.
8268 2002-11-21 Havoc Pennington <hp@redhat.com>
8270 * acconfig.h: get rid of this
8272 * autogen.sh (run_configure): add --no-configure option
8274 * configure.in: remove AC_ARG_PROGRAM to make
8275 autoconf complain less. add AC_PREREQ.
8276 add AC_DEFINE third arg.
8278 2002-11-21 Anders Carlsson <andersca@codefactory.se>
8281 Fix references so we can distcheck.
8283 2002-11-21 Havoc Pennington <hp@redhat.com>
8285 * Initial module creation