1 2005-01-17 Havoc Pennington <hp@redhat.com>
3 * Throughout, align variant bodies according to the contained
4 type, rather than always to 8. Should save a fair bit of space in
7 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
8 fix handling of case where p == end
10 * doc/TODO: remove the dbus_bool_t item and variant alignment items
12 2005-01-17 Havoc Pennington <hp@redhat.com>
14 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
16 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
17 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
18 are marshaling/unmarshaling a boolean.
20 2005-01-16 Havoc Pennington <hp@redhat.com>
22 This is about it on what can be disabled/deleted from libdbus
23 easily, back below 150K anyhow. Deeper cuts are more work than
24 just turning the code off as I've done here.
26 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
27 signed int convenience funcs
29 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
32 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
35 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
37 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
38 tests-enabled-only, though it should probably be deleted)
40 * dbus/dbus-message-util.c: same stuff
42 * dbus/dbus-auth-util.c: same stuff
44 2005-01-16 Havoc Pennington <hp@redhat.com>
46 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
48 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
49 way for stripping down dbus-userdb.c stuff included in libdbus.
50 Rename _dbus_parse_uid for consistency.
52 2005-01-16 Havoc Pennington <hp@redhat.com>
54 * dbus/dbus-internals.c (_dbus_real_assert): print the function
55 name the assertion failed in
57 * dbus/dbus-internals.h (_dbus_return_if_fail)
58 (_dbus_return_val_if_fail): assert that the name of the function
59 containing the check doesn't start with '_', since we only want to
60 use checks on public functions
62 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
65 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
66 change checks to asserts for private function
68 * dbus/dbus-message.c (_dbus_message_set_serial): checks
69 to asserts for private function
71 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
72 broken assertion that was breaking make check
73 (_dbus_type_reader_array_is_empty): remove this rather than fix
74 it, was only used in assertions
76 2005-01-16 Havoc Pennington <hp@redhat.com>
78 * test/unused-code-gc.py: hacky script to find code that's used
79 only by the bus (not libdbus) or used only by tests or not used at
80 all. It has some false alarms, but looks like we can clean up a
81 lot of size from libdbus.
83 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
84 dbus/Makefile.am: initially move 10K of binary size out of libdbus
86 2005-01-16 Havoc Pennington <hp@redhat.com>
88 * Add and fix docs according to Doxygen warnings throughout
91 * dbus/dbus-marshal-recursive.c
92 (_dbus_type_reader_array_is_empty): change this to just call
93 array_reader_get_array_len() and make it static
95 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
97 (dbus_message_iter_init_append): rename from append_iter_init
99 * dbus/dbus-marshal-recursive.c
100 (_dbus_type_reader_get_element_type): rename from
101 _dbus_type_reader_get_array_type
103 2005-01-15 Havoc Pennington <hp@redhat.com>
105 * test/glib/test-profile.c (with_bus_server_filter): fix crash
107 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
108 when DBUS_DISABLE_ASSERT
109 (_dbus_marshal_set_basic): be sure we align for the string length
111 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
114 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
116 (_dbus_string_set_byte): provide inline macro version
118 2005-01-15 Havoc Pennington <hp@redhat.com>
120 * Land the new message args API and type system.
122 This patch is huge, but the public API change is not
123 really large. The set of D-BUS types has changed somewhat,
124 and the arg "getters" are more geared toward language bindings;
125 they don't make a copy, etc.
127 There are also some known issues. See these emails for details
129 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
130 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
132 * dbus/dbus-marshal-*: all the new stuff
134 * dbus/dbus-message.c: basically rewritten
136 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
137 freed blocks to be all non-nul bytes so using freed memory is less
140 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
141 DBUS_FAIL_MALLOC=N environment variable, so you can do
142 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
143 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
146 * qt/message.cpp: port to the new message args API
147 (operator<<): use str.utf8() rather than str.unicode()
148 (pretty sure this is right from the Qt docs?)
150 * glib/dbus-gvalue.c: port to the new message args API
152 * bus/dispatch.c, bus/driver.c: port to the new message args API
154 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
155 "locked" flag to TRUE and align_offset to 0; I guess we never
156 looked at these anyhow, but seems cleaner.
158 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
159 move allocation padding macro to this header; use it to implement
160 (_DBUS_STRING_STATIC): ability to declare a static string.
162 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
163 change to return TRUE if the interface is not set.
165 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
166 to dbus-marshal-validate.[hc]
168 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
171 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
172 to dbus-marshal-*.[hc]
174 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
175 function here from dbus-marshal.c
177 2005-01-12 Joe Shaw <joeshaw@novell.com>
179 * NEWS: Update for 0.23.
181 * configure.in: Release 0.23.
183 2005-01-12 Joe Shaw <joeshaw@novell.com>
185 * mono/Makefile.am, mono/example/Makefile.am: Always build the
186 dbus DLL with --debug. Clean up after the .mdb files this leaves
189 * mono/doc/Makefile.am: Need to uninstall the docs on "make
192 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
193 is an enum, get the enum's underlying type. Another mono
196 2005-01-11 Joe Shaw <joeshaw@novell.com>
198 Patch from Sjoerd Simons <sjoerd@luon.net>
200 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
201 DESTDIR. It breaks stuff.
203 2005-01-11 Joe Shaw <joeshaw@novell.com>
205 Patch from Tambet Ingo <tambet@ximian.com>
207 * mono/DBusType/Array.cs (Get): Get the underlying element type by
208 calling type.GetElementType(). The code previously depended on
209 broken Mono behavior, which was fixed in Mono 1.1.3.
211 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
212 Activator.CreateInstance() so that the class's constructor is
213 called with the right parameters.
215 2005-01-11 Joe Shaw <joeshaw@novell.com>
217 Patch from Timo Teräs <ext-timo.teras@nokia.com>
219 * dbus/dbus-connection.c
220 (_dbus_connection_queue_received_message_link): Call
221 _dbus_connection_remove_timeout() instead of the _locked()
222 variant, since it's always called from
223 _dbus_connection_handle_watch(), which handles the locking.
224 Removed the _locked() variant since it's no longer used.
226 2005-01-03 Havoc Pennington <hp@redhat.com>
228 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
231 2004-12-26 Havoc Pennington <hp@redhat.com>
233 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
235 2005-01-03 Havoc Pennington <hp@redhat.com>
237 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
240 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
242 2005-01-02 Havoc Pennington <hp@redhat.com>
244 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
246 2005-01-01 Havoc Pennington <hp@redhat.com>
248 * configure.in: add -Wfloat-equal
250 2005-01-01 Havoc Pennington <hp@redhat.com>
252 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
253 for a variety of reasons '==' doesn't do this.
255 2004-12-31 Havoc Pennington <hp@redhat.com>
257 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
260 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
262 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
264 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
266 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
267 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
268 dbus-protocol.h. Because they are defines and not enums they are not
271 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
273 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
274 dbus_bus_activate_service
276 * python/dbus.py (Bus.activate_service): activate a service on the
279 2004-12-24 Havoc Pennington <hp@redhat.com>
281 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
282 file format has also changed and I haven't adapted to that yet
284 * Makefile.am: load .gcno files from latest gcc
286 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
287 * Patch from Rob Taylor <robtaylor@fastmail.fm>
289 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
292 * python/dbus.py (get_unix_user): Added binding to
293 call dbus_bindings.bus_get_unix_user
295 * python/extract.py: Modified the proto_pat regex to
298 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
300 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
301 better POSIX compliance.
303 2004-12-19 Havoc Pennington <hp@redhat.com>
305 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
306 (_dbus_string_insert_8_aligned): new functions
308 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
310 2004-12-18 Havoc Pennington <hp@redhat.com>
312 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
315 * dbus/dbus-message.c: fix a comment, and add a still-unused
316 not-implemented function
318 * dbus/dbus-marshal.h: fix comment
320 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
322 2004-12-17 Joe Shaw <joeshaw@novell.com>
324 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
325 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
326 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
327 Type.UnderlyingSystemType to get the actual system type
328 underneath. This code previously depended on the broken Mono
329 behavior, which was fixed in 1.1.3.
331 2004-11-27 Havoc Pennington <hp@redhat.com>
333 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
335 (_dbus_string_get_const_data): inline when asserts are disabled
337 * dbus/dbus-message.c: record the _dbus_current_generation of
338 creation so we can complain if dbus_shutdown() is used improperly.
339 Do this only if checks are enabled.
341 * dbus/dbus-connection.c: ditto
343 2004-11-26 Havoc Pennington <hp@redhat.com>
345 * test/glib/test-profile.c: add with_bus mode to profile echoes
346 that go through the bus.
348 * test/glib/run-test.sh: add ability to run test-profile
350 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
353 2004-11-26 Havoc Pennington <hp@redhat.com>
355 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
356 thing was implemented
358 2004-11-26 Havoc Pennington <hp@redhat.com>
360 * test/glib/test-profile.c: tweak a bit, add support for some
361 made-up minimal malloc overhead with plain sockets, since in
362 real life some sort of buffers are unavoidable thus we could
363 count them in the theoretical best case
365 2004-11-26 Havoc Pennington <hp@redhat.com>
367 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
368 where I was trying to cache one too many messages
370 2004-11-26 Havoc Pennington <hp@redhat.com>
372 * dbus/dbus-message.c: reimplement message cache as an array which
373 makes the cache about twice as fast and saves maybe 1.5% overall
375 2004-11-26 Havoc Pennington <hp@redhat.com>
377 * dbus/dbus-threads.c (init_global_locks): forgot to put the
378 message cache lock here
380 2004-11-26 Havoc Pennington <hp@redhat.com>
382 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
383 the "char byte_order" next to each other to save 4 bytes
384 (dbus_message_new_empty_header): reduce preallocation, since the
385 message cache should achieve a similar effect
386 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
387 message cache that keeps a few DBusMessage around in a pool,
388 another 8% speedup or so.
390 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
392 2004-11-25 Havoc Pennington <hp@redhat.com>
394 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
395 to write, without reading or blocking, try it before the poll()
396 and skip the poll() if nothing remains to write. This is about a
397 3% speedup in the echo client/server
399 2004-11-25 Havoc Pennington <hp@redhat.com>
401 The primary change here is to always write() once before adding
402 the write watch, which gives us about a 10% performance increase.
404 * dbus/dbus-transport-unix.c: a number of modifications to cope
405 with removing messages_pending
406 (check_write_watch): properly handle
407 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
408 messages_pending stuff
409 (check_read_watch): properly handle WAITING_FOR_MEMORY and
411 (unix_handle_watch): after writing, see if the write watch can be
413 (unix_do_iteration): assert that write_watch/read_watch are
414 non-NULL rather than testing that they aren't, since they
415 aren't allowed to be NULL. check_write_watch() at the end so
416 we add the watch if we did not finish writing (e.g. got EAGAIN)
418 * dbus/dbus-transport-protected.h: remove messages_pending call,
419 since it resulted in too much inefficient watch adding/removing;
420 instead we now require that the transport user does an iteration
421 after queueing outgoing messages, and after trying the first
422 write() we add a write watch if we got EAGAIN or exceeded our
423 max bytes to write per iteration setting
425 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
428 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
429 freed and then accessed, valgrind flagged this bug, fix it
431 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
432 as the last valid field plus 1, where really it is equal to the
433 last valid field. Corrects some message corruption issues.
435 * dbus/dbus-mainloop.c: verbosity changes
437 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
438 instead of aborting in one of the test codepaths
440 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
441 caused not printing the pid ever again if a verbose was missing
442 the newline at the end
443 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
445 * dbus/dbus-connection.c: verbosity changes;
446 (dbus_connection_has_messages_to_send): new function
447 (_dbus_connection_message_sent): no longer call transport->messages_pending
448 (_dbus_connection_send_preallocated_unlocked): do one iteration to
449 try to write() immediately, so we can avoid the write watch. This
450 is the core purpose of this patchset
451 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
452 dump the outgoing message queue, so nobody will get confused
453 trying to send them or thinking stuff is pending to be sent
455 * bus/test.c: verbosity changes
457 * bus/driver.c: verbosity/assertion changes
459 * bus/dispatch.c: a bunch of little tweaks to get it working again
460 because this patchset changes when/where you need to block.
462 2004-11-23 Havoc Pennington <hp@redhat.com>
464 * test/glib/test-profile.c: modify to accept a plain_sockets
465 argument in which case it will bench plain sockets instead of
466 libdbus, for comparison purposes.
468 2004-11-22 Havoc Pennington <hp@redhat.com>
470 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
471 threads for more time, so sysprof can get a grip on it.
473 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
476 2004-11-13 Havoc Pennington <hp@redhat.com>
478 * test/glib/test-profile.c: fix this thing up a bit
480 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
481 preallocation sizes by a fair bit; not sure if this will be an
482 overall performance win or not, but it does reduce reallocs.
484 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
485 the test hack that forced constant realloc if asserts are
486 disabled, so we can profile sanely. Sprinkle in some
487 _DBUS_UNLIKELY() which are probably pointless, but before I
488 noticed the real performance problem I put them in.
489 (_dbus_string_validate_utf8): micro-optimize this thing a little
490 bit, though callgrind says it didn't help; then special-case
491 ascii, which did help a lot; then be sure we detect nul bytes as
492 invalid, which is a bugfix.
493 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
494 superstition; use memset to nul the padding instead of a manual
496 (_dbus_string_get_length): inline this as a
497 macro; it showed up in the profile because it's used for loop
500 2004-11-10 Colin Walters <walters@verbum.org>
502 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
505 2004-11-09 Colin Walters <walters@verbum.org>
507 * dbus/dbus-string.c (_dbus_string_get_length): New
508 function, writes DBusString to C buffer.
510 * dbus/dbus-string.h: Prototype it.
512 * dbus/dbus-message.c (dbus_message_type_to_string): New
513 function, converts message type into C string.
515 * dbus/dbus-message.h: Prototype it.
517 * bus/selinux.c (bus_selinux_check): Take source pid,
518 target pid, and audit data. Pass audit data to
520 (log_audit_callback): New function, appends extra
522 (bus_selinux_allows_acquire_service): Also take
523 service name, add it to audit data.
524 (bus_selinux_allows_send): Also take message
525 type, interface, method member, error name,
526 and destination, and add them to audit data.
527 (log_cb): Initialize func_audit.
529 * bus/selinux.h (bus_selinux_allows_acquire_service)
530 (bus_selinux_allows_send): Update prototypes
532 * bus/services.c (bus_registry_acquire_service): Pass
533 service name to bus_selinux_allows_acquire_service.
535 * bus/bus.c (bus_context_check_security_policy): Pass
536 additional audit data. Move assignment of dest
539 2004-11-07 Colin Walters <walters@verbum.org>
541 * dbus/dbus-transport-unix.c (do_authentication): Always
542 initialize auth_completed.
544 2004-11-07 Colin Walters <walters@verbum.org>
546 * bus/bus.c (load_config): Break into three
547 separate functions: process_config_first_time_only,
548 process_config_every_time, and process_config_postinit.
549 (process_config_every_time): Move call of
550 bus_registry_set_service_context_table into
551 process_config_postinit.
552 (process_config_postinit): New function, does
553 any processing that needs to happen late
554 in initialization (and also on reload).
555 (bus_context_new): Instead of calling load_config,
556 open config parser here and call process_config_first_time_only
557 and process_config_every_time directly. Later, after
558 we have forked but before changing UID,
559 invoke bus_selinux_full_init, and then call
560 process_config_postinit.
561 (bus_context_reload_config): As in bus_context_new,
562 load parse file inside here, and call process_config_every_time
563 and process_config_postinit.
565 * bus/services.h, bus/services.c
566 (bus_registry_set_service_context_table): Rename
567 from bus_registry_set_sid_table. Take string hash from config
568 parser, and convert them here into SIDs.
570 * bus/config-parser.c (struct BusConfigParser): Have
571 config parser only store a mapping of service->context
573 (merge_service_context_hash): New function.
574 (merge_included): Merge context string hashes instead
575 of using bus_selinux_id_table_union.
576 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
577 simply create a new string hash.
578 (bus_config_parser_unref): Unref it.
579 (start_selinux_child): Simply insert strings into hash,
580 don't call bus_selinux_id_table_copy_over.
582 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
583 (bus_selinux_id_table_copy_over): Delete.
585 2004-11-03 Colin Walters <walters@verbum.org>
587 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
590 2004-11-03 Colin Walters <walters@verbum.org>
592 * bus/test-main.c (test_pre_hook): Fix test logic,
593 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
595 2004-11-02 Colin Walters <walters@redhat.com>
597 * bus/selinux.c (bus_selinux_init): Split into two functions,
598 bus_selinux_pre_init and bus_selinux_post_init.
599 (bus_selinux_pre_init): Just determine whether SELinux is
601 (bus_selinux_post_init): Do everything else.
603 * bus/main.c (main): Call bus_selinux_pre_init before parsing
604 config file, and bus_selinux_post_init after. This ensures that
605 we don't lose the policyreload notification thread that
606 bus_selinux_init created before forking previously.
608 * bus/test-main.c (test_pre_hook): Update for split.
610 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
612 Patch from Johan Fischer <linux@fischaz.com>
614 * mono/doc/Makefile.am (install-data-local): Added directory
617 2004-10-29 Colin Walters <walters@redhat.com>
619 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
620 parameter for fd to write pid to.
622 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
624 * bus/bus.c (bus_context_new): Pass print_pid_fd
625 to _dbus_become_daemon (bug #1720)
627 2004-10-29 Colin Walters <walters@redhat.com>
629 Patch from Ed Catmur <ed@catmur.co.uk>
631 * mono/doc/Makefile.am (install-data-local): Handle
634 2004-10-29 Colin Walters <walters@redhat.com>
636 * bus/.cvsignore, qt/.cvsignore: Update.
638 2004-10-29 Colin Walters <walters@redhat.com>
640 Patch from Kristof Vansant <de_lupus@pandora.be>
642 * configure.in: Detect Slackware.
643 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
644 * bus/rc.messagebus.in: New file.
646 2004-10-29 Colin Walters <walters@redhat.com>
648 * tools/dbus-monitor.c (filter_func): Return
649 DBUS_HANDLER_RESULT_HANDLED in filter function
651 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
653 2004-10-29 Colin Walters <walters@redhat.com>
655 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
657 * bus/services.c (bus_registry_acquire_service):
658 Correctly retrieve service name from DBusString
661 2004-10-29 Colin Walters <walters@redhat.com>
663 * dbus/dbus-glib.h: Update documentation to not
664 refer to internal APIs.
666 2004-10-27 Joe Shaw <joeshaw@novell.com>
668 * mono/Arguments.cs (GetDBusTypeConstructor):
669 type.UnderlyingSystemType will return "System.Byte" if you do it
670 on "byte[]", which is not what we want. So check the type.IsArray
671 property and use System.Array instead.
673 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
675 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
676 the DBusUserInfo structure since this is passed into the function.
677 This would cause a double free when the function that allocated
678 the structure would try to free it when an error occured.
680 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
681 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
682 for service activation to avoid 32bit/64bit parallel install issues
684 2004-10-21 Colin Walters <walters@verbum.org>
686 * AUTHORS: Fix my email address, the @gnu.org one
687 has been bouncing for some time. Also add J5.
689 2004-10-21 Colin Walters <walters@verbum.org>
691 * dbus/dbus-transport-unix.c (do_authentication): Return
692 authentication status to callers.
693 (unix_handle_watch): If we completed authentication this round,
694 don't do another read. Instead wait until the next iteration,
695 after we've read any pending data in the auth buffer.
696 (unix_do_iteration): Ditto.
697 (unix_handle_watch): Updated for new do_authentication prototype.
699 2004-10-18 Colin Walters <walters@verbum.org>
701 * bus/selinux.c (bus_selinux_enabled): Handle
702 --disable-selinux case.
704 2004-10-18 Colin Walters <walters@verbum.org>
706 * bus/selinux.h: Add bus_selinux_enabled.
708 * bus/selinux.c (bus_selinux_enabled): Implement it.
710 * bus/config-parser.c (struct include): Add
711 if_selinux_enabled member.
712 (start_busconfig_child): Parse if_selinux_enabled
713 attribute for include.
714 (bus_config_parser_content): Handle it.
716 * bus/session.conf.in, bus/system.conf.in: Add
717 inclusion of context mapping to default config files;
718 conditional on SELinux being enabled.
720 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
722 * test/data/invalid-config-files/badselinux-1.conf,
723 test/data/invalid-config-files/badselinux-2.conf:
724 Test files for bad syntax.
726 2004-10-17 Colin Walters <walters@verbum.org>
728 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
729 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
730 format specifier mismatches.
732 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
734 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
737 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
738 pointer (bug #1540, Leonardo Boiko).
740 2004-09-28 Jon Trowbridge <trow@ximian.com>
742 * mono/BusDriver.cs: Changed BusDriver struct to remove
743 the ServiceCreated and ServiceDeleted events and replace them
744 with the new ServiceOwnerChanged event.
746 * mono/example/BusListener.cs: Added a new example program,
747 which listens for and reports any ServiceOwnerChanged events
750 * mono/example/Makefile.am (DESTDIR): Build changes for the
751 new BusListener.cs example.
753 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
755 * bus/signals.c (bus_match_rule_parse): validate the components of
756 match rules (bug #1439).
758 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
760 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
762 * doc/dbus-specification.xml: document ServiceOwnerChanged
765 * bus/driver.c, bus/driver.h, bus/services.c: Use
766 ServiceOwnerChanged signal instead of ServiceCreated and
769 * bus/dispatch.c: update testcase for the new signal.
771 2004-09-20 Jon Trowbridge <trow@ximian.com>
773 Patch from Nat Friedman <nat@novell.com>
775 * mono/Makefile.am: A number of small build fixes to allow "make
776 distcheck" to succeed.
778 * mono/example/Makefile.am: "make distcheck" fixes.
780 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
783 * test/Makefile.am: "make distcheck" fixes.
785 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
787 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
789 * doc/busconfig.dtd: update the DTD for the at_console attribute.
791 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
792 messages after the first one (bug #1389).
794 * bus/dispatch.c (check_double_hello_message): add a test case for
795 the double hello message bug.
796 (check_existent_service_activation): fix check of spawning error.
798 2004-09-16 David Zeuthen <david@fubar.dk>
800 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
802 2004-09-12 David Zeuthen <david@fubar.dk>
804 Patch from Kay Sievers <kay.sievers@vrfy.org>
806 * bus/bus.c (bus_context_new):
810 Add commandline option --nofork to override configuration file
813 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
815 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
816 compilers don't like it (bug #974).
818 2004-09-04 Harald Fernengel <harry@kdevelop.org>
820 * qt/connection.*: Applied patch by JĂ©rĂ´me Lodewyck
821 <lodewyck@clipper.ens.fr> to integrate an existing
822 connection into the Qt eventloop
824 2004-08-30 Jon Trowbridge <trow@ximian.com>
826 * mono/BusDriver.cs: Added. This is a class for interacting with
827 the org.freedesktop.DBus service.
829 * mono/Message.cs: Added a mechanism to expose the message that is
830 currently being dispatched via the static Message.Current
831 property. Added Message.Sender and Message.Destination
834 * mono/Handler.cs: Expose the dispatched message via
835 Message.Current when handling method calls.
837 * mono/Service.cs: Expose the dispatched message via
838 Message.Current when handling signal emissions.
840 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
841 Connection.BaseService property.
843 2004-08-28 Havoc Pennington <hp@redhat.com>
845 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
847 More fixes from Steve Grubb
849 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
850 (_dbus_listen_tcp_socket): fix fd leak
852 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
853 EINTR to a bit lower in the code
855 2004-08-26 Jon Trowbridge <trow@ximian.com>
857 * bus/driver.c (bus_driver_handle_service_exists): Respond with
858 TRUE if we are inquiring about the existence of the built-in
859 org.freedesktop.DBus service.
861 2004-08-25 John Palmieri <johnp@redhat.com>
862 * bus/config-parser.c:
863 (struct PolicyType): Add POLICY_CONSOLE
864 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
865 (start_busconfig_child): Sets up console element when
866 <policy at_console=""> is encountered in a policy file
867 (append_rule_from_element): Convert console elements to console
871 (bus_policy_create_client_policy): Add console rules to the client
872 policy based on if the client is at the console
873 (bus_policy_append_console_rule): New function for adding a
874 console rule to a policy
875 (bus_policy_merge): Handle console rule merging
877 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
878 where we check for console user files
880 * dbus/dbus-sysdeps.c:
881 (_dbus_file_exists): New function which checks if the given
883 (_dbus_user_at_console): New function which does the system
884 specific process of checking if the user is at the console
886 * dbus/dbus-userdb.c:
887 (_dbus_is_console_user): New function converts a UID to user name
888 and then calls the system specific _dbus_user_at_console to
889 see if the user is at the console and therefor a console user
891 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
893 * bus/config-parser.c (set_limit):
894 * bus/dbus-daemon-1.1.in:
895 * test/data/valid-config-files/many-rules.conf: set the
896 max_match_rules_per_connection limt from the config file.
898 * doc/busconfig.dtd: update the DTD.
900 * bus/driver.c: remove some unused variables.
902 2004-08-24 Mikael Hallendal <micke@imendio.com>
904 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
905 it's been replaced by dbus_g_bus_get
907 2004-08-23 Colin Walters <walters@redhat.com>
909 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
911 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
913 * bus/selinux.c: Create a thread for policy reload notification.
914 (bus_selinux_get_policy_root): Implement.
916 * bus/config-parser.c (start_busconfig_child)
917 (bus_config_parser_content): Support SELinux-root relative
920 * configure.in <HAVE_SELINUX>: Add -lpthread.
922 * bus/test-main.c (test_pre_hook, test_post_hook): New.
923 (test_post_hook): Move memory checking into here.
924 (test_pre_hook, test_post_hook): Move SELinux checks in
925 here, but conditional on a DBUS_TEST_SELINUX environment
926 variable. Unfortunately we can't run the SELinux checks
927 as a normal user, since they won't have any permissions
928 for /selinux. So this will have to be tested manually
929 for now, until we have virtualization for most of
932 2004-08-23 Havoc Pennington <hp@redhat.com>
934 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
935 drop supplementary groups, suggested by Steve Grubb
937 2004-08-20 Colin Walters <walters@redhat.com>
939 * bus/config-parser.c (start_busconfig_child): Remove some unused
942 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
945 2004-08-17 Joe Shaw <joeshaw@novell.com>
947 * configure.in: If --enable-mono is passed in, if we can't find
950 * mono/Makefile.am: Use /gacutil to install assemblies into the
953 2004-08-12 Havoc Pennington <hp@redhat.com>
955 * NEWS: update for 0.22
957 * configure.in: release 0.22
959 2004-08-11 Colin Walters <walters@redhat.com>
961 * tools/dbus-send.c (main, usage): Add --reply-timeout
964 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
966 * bus/bus.c (process_config_first_time_only): get rid of an unused
967 DBusError that was causing a memoy leak (bug #989).
969 * dbus/dbus-keyring.c, dbus/dbus-message.c:
970 fix compilation on Solaris/Forte C (bug #974)
972 * bus/main.c (main): plug two minuscule memleaks.
974 2004-08-10 Havoc Pennington <hp@redhat.com>
976 * doc/dbus-tutorial.xml: add some more info on GLib bindings
978 2004-08-09 Havoc Pennington <hp@redhat.com>
980 * COPYING: switch to Academic Free License version 2.1 instead of
981 2.0, to resolve complaints about patent termination clause.
983 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
985 * README: added documentation for the --enable-python
988 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
990 * bus/config-parser.c (bus_config_parser_new): fix an invalid
991 _unref in the SELinux support.
993 * doc/busconfig.dtd: update DTD for SELinux support.
995 * bus/config-loader-libxml.c: fix error handler and parser
996 initialisation/cleanup. OOM test now works with libxml2 HEAD.
998 * configure.in: remove the warning about libxml2.
1000 * dbus/dbus-bus.c: silence doxygen warning.
1002 2004-07-31 Colin Walters <walters@redhat.com>
1004 * configure.in: Move #error in SELinux check to its own line.
1006 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1008 * dbus/dbus-internals.h (_DBUS_SET_OOM):
1009 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
1012 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
1013 broken by the change in the _SET_OOM macros.
1015 2004-07-31 Colin Walters <walters@redhat.com>
1017 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
1020 2004-07-31 Colin Walters <walters@redhat.com>
1022 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
1023 to correctly detect DBUS__ACQUIRE_SVC. Also add an
1026 2004-07-24 Havoc Pennington <hp@redhat.com>
1028 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1030 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
1033 * configure.in: add --enable-selinux
1035 * bus/policy.c (bus_policy_merge): add FIXME to a comment
1037 * bus/main.c (main): initialize and shut down selinux
1039 * bus/connection.c: store SELinux ID on each connection, to avoid
1040 repeated getting of the string context and converting it into
1043 * bus/bus.c (bus_context_get_policy): new accessor, though it
1045 (bus_context_check_security_policy): check whether the security
1046 context of sender connection can send to the security context of
1047 recipient connection
1049 * bus/config-parser.c: add parsing for <selinux> and <associate>
1051 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
1052 implement dbus_connection_get_unix_fd()
1054 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
1055 function, used by the selinux stuff
1057 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
1059 * bus/config-loader-libxml.c: complete the implementation of
1060 libxml backend for config file loader. Doesn't work with full OOM
1063 * configure.in: change error when selecting libxml into a warning.
1065 * test/data/invalid-config-files: add two non-well-formed XML
1068 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
1070 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
1071 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
1072 be necessary to read all the buffer. (bug #894)
1074 * bus/activation.c (bus_activation_activate_service): fix a
1075 potential assertion failure (bug #896). Small optimization in the
1076 case of auto-activation messages.
1078 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
1079 add test case for byte-through-vararg bug (#901). patch by Kimmo
1082 2004-07-28 Anders Carlsson <andersca@gnome.org>
1085 * python/dbus_bindings.pyx.in:
1086 Add dbus.init_gthreads (), allow emit_signal to pass
1087 arguments to the signal.
1089 2004-07-24 Havoc Pennington <hp@redhat.com>
1091 * AUTHORS: add some people, not really comprehensively, let me
1092 know if I missed you
1094 2004-07-24 Havoc Pennington <hp@redhat.com>
1096 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
1099 * test/Makefile.am (DIST_SUBDIRS): here also
1101 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1103 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
1104 breaking build on Solaris, reported by Farhad Saberi on the ML.
1106 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
1107 va_arg invocation to account for integer promotion in the case of
1108 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
1110 * bus/services.c (bus_service_remove_owner): fix bug #902, use
1111 _dbus_list_get_first_link, not _dbus_list_get_first.
1113 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
1115 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
1116 handler functions so that the asserts in _dbus_object_subtree_unref
1119 * dbus/dbus-transport-unix.c (do_reading):
1120 _dbus_transport_queue_messages return value is of type
1121 dbus_bool_t, not DBusDispatchStatus.
1123 2004-07-19 David Zeuthen <david@fubar.dk>
1125 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
1128 (check_get_connection_unix_user): Debug says GetProperty; but the
1129 method is called GetConnectionUnixUser
1130 (check_get_connection_unix_process_id): New function
1131 (bus_dispatch_test): Actually call check_get_connection_unix_user();
1132 also call check_get_connection_unix_process_id()
1135 (bus_driver_handle_get_connection_unix_process_id): New function,
1136 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
1140 (handle_server_data_external_mech): Set pid from the credentials
1141 obtained from the socket
1143 * dbus/dbus-connection.c:
1144 (dbus_connection_get_unix_process_id): New function
1146 * dbus/dbus-connection.h:
1147 Add prototype for dbus_connection_get_unix_process_id
1149 * dbus/dbus-transport.c:
1150 (_dbus_transport_get_unix_process_id): New function
1152 * dbus/dbus-transport.h:
1153 Add prototype for _dbus_transport_get_unix_process_id
1155 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
1157 * dbus/dbus-message.c: Message counter fix, patch by Christian
1158 Hammond <chipx86@gnupdate.org>
1160 2004-07-18 Seth Nickell <seth@gnome.org>
1163 * python/dbus_bindings.pyx.in:
1164 * python/tests/test-client.py:
1166 Add dbus.ByteArray and dbus_bindings.ByteArray
1167 types so that byte streams can be passed back.
1169 Give jdahlin the heaps of credit that are so
1172 2004-07-12 Seth Nickell <seth@gnome.org>
1176 Add message argument to the default object_method_handler
1179 * python/dbus_bindings.pyx.in:
1181 Automatically return NIL when passed an empty list
1182 (we can't pass back a list since lists are typed
1183 and we don't have any idea what type the the client
1184 intended the list to be... :-( )
1186 2004-07-10 Seth Nickell <seth@gnome.org>
1188 * python/examples/Makefile.am:
1190 Fix distcheck breakage caused by new examples.
1192 2004-07-10 Seth Nickell <seth@gnome.org>
1196 Add "message" argument to service-side dbus.Object
1197 methods. This will break existing services written
1198 using the python bindings, but will allow extraction
1199 of all the message information (e.g. who its from).
1201 Add improved "object oriented" signal handling/emission.
1203 * python/examples/example-service.py:
1207 * python/examples/example-signal-emitter.py:
1208 * python/examples/example-signal-recipient.py:
1210 Two new examples that show how to emit and receive
1211 signals using the new APIs.
1213 * python/examples/example-signals.py:
1214 * python/examples/gconf-proxy-service.py:
1215 * python/examples/gconf-proxy-service2.py:
1217 Add "message" argument to service methods.
1219 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
1221 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
1222 * dbus/bus.c (dbus_bus_get_unix_user)
1223 * doc/dbus-specification.xml: implement GetConnectionUnixUser
1224 method of org.freedesktop.DBus interface.
1226 * bus/dispatch.c: test case
1228 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
1230 * python/Makefile.am: switched include directory from glib/ to dbus/
1231 since dbus-glib.h moved
1233 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1235 * configure.in: prevent building the gcj stuff and libxml loader
1236 since they are broken.
1238 2004-06-20 Havoc Pennington <hp@redhat.com>
1240 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
1241 codes from the dbus error names
1243 * glib/dbus-glib.h: move to subdir dbus/ since it's included
1244 as dbus/dbus-glib.h and that breakage is now visible due to
1245 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
1247 * glib/dbus-glib.h: s/gproxy/g_proxy/
1249 * dbus/dbus-shared.h: new header to hold stuff shared with
1252 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
1255 * glib/dbus-glib.h (dbus_set_g_error): move to
1256 dbus-glib-lowlevel.h
1258 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
1259 of stuff to enable this
1261 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
1263 * a bunch of other changes with the same basic "separate glib
1264 bindings from dbus.h" theme
1266 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
1268 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
1270 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
1272 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1274 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
1275 the reply value of the ServiceExists message.
1277 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
1279 * python/dbus_bindings.pyx.in: No longer need to parse path
1280 elements and pass them as arrays of strings. The C API now
1281 accepts plain path strings.
1282 (_build_parsed_path): removed
1284 2004-06-07 Havoc Pennington <hp@redhat.com>
1286 * doc/TODO: remove auto-activation item since it's done; sort
1287 items by importance/milestone
1289 2004-06-07 Havoc Pennington <hp@redhat.com>
1291 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
1292 random signature when using REQUIRED_FIELDS (this hack won't work
1295 * dbus/dbus-message.c: change the signature to be a header field,
1296 instead of message->signature special-case string. Incremental
1297 step forward. Then we can fix up code to send the signature in the
1298 message, then fix up code to validate said signature, then fix up
1299 code to not put the typecodes inline, etc.
1300 (load_one_message): don't make up the signature after the fact
1301 (decode_header_data): require signature field for the known
1304 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
1306 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
1308 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
1310 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
1312 * mono/Handler.cs: Updated to follow new path argument for
1313 (un-)registering objects.
1315 * mono/example/Makefile.am:
1317 * configure.in: Bumped required version for mono and use new -pkg
1320 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
1322 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
1323 registration functions take the path argument as char* instead of
1326 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
1327 split off the path decompostion part of
1328 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
1331 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
1333 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1335 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
1336 machine approach. A state is implemented as a function that
1337 handles incoming events as specified for that state.
1339 * doc/dbus-specification.xml: Update auth protocol state machine
1340 specification to match implementation. Remove some leftover
1343 2004-06-02 Kristian Høgsberg <krh@redhat.com>
1345 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
1346 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
1349 * Doxyfile.in: remove deprecated options.
1351 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
1352 glib/test-thread.h, glib/test-thread-client.c,
1353 glib/test-thread-server.c, glib/test-profile.c,
1354 glib/test-dbus-glib.c: remove these unused files.
1356 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
1358 * dbus/dbus-object-tree.c
1359 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
1360 non-fallback handlers (bug #684).
1361 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
1362 (find_subtree_recurse): report wether the returned subtree is an
1363 exact match or a "fallback" match higher up in the tree.
1364 (object_tree_test_iteration): update test case.
1366 2004-06-01 Seth Nickell <seth@gnome.org>
1368 * python/dbus_bindings.pyx.in:
1369 * python/tests/test-client.py:
1371 Round off basic type support. Add dicts (yay!), and
1372 remaining array types.
1374 Make MessageIter more general so it works for dicts too.
1376 Mark all loop variables as C integers.
1378 2004-05-31 Havoc Pennington <hp@redhat.com>
1380 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
1383 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
1385 * glib/dbus-glib-tool.c (main): set up to have a --self-test
1386 option that runs the tests, and start filling in some code
1387 including for starters just dumping the interfaces to stdout
1389 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
1391 * test/data/valid-introspection-files/lots-of-types.xml: test of
1392 an example introspection file
1394 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
1397 2004-05-31 Seth Nickell <seth@gnome.org>
1399 * python/dbus_bindings.pyx.in:
1400 * python/tests/test-client.py:
1405 Fix string array memory trashing bug... oops...
1407 2004-05-30 Seth Nickell <seth@gnome.org>
1411 Add a nicer-but-less-flexible alternate API for handling
1412 calls to virtual objects in dbus.ObjectTree.
1414 Screw up the argument order to the dbus.Object constructor
1415 for consistency with dbus.ObjectTree (and to make dbus_methods
1416 optional for future extension)
1418 * python/examples/Makefile.am:
1419 * python/examples/gconf-proxy-service.py:
1420 * python/examples/gconf-proxy-service2.py:
1422 Alternate implementation of gconf-proxy-service using the
1423 nicer dbus.ObjectTree API.
1425 * python/examples/example-service.py:
1426 * python/tests/test-server.py
1428 Reverse the argument order to deal with dbus.Object constructor
1431 2004-05-30 Seth Nickell <seth@gnome.org>
1433 * python/examples/example-client.py:
1434 * python/examples/example-service.py:
1436 Take it back. Lists seem to work but they're broken
1437 in the test suite. Make the base examples use
1440 2004-05-30 Seth Nickell <seth@gnome.org>
1442 * python/dbus_bindings.pyx.in:
1443 * python/tests/test-client.py:
1445 Add some more tests and fix errors that crop up.
1446 Unfortunately, currently it seems like marshalling
1447 and unmarshalling of lists is completely broken :-(
1449 2004-05-30 Seth Nickell <seth@gnome.org>
1451 * python/dbus_bindings.pyx.in:
1453 Add support for ObjectPath type.
1457 Refactor message handling code to a common function.
1459 * python/tests/test-client.py:
1460 * python/tests/test-server.py:
1462 Add tests that check to make sure values of all types
1463 can be echoed from a service w/o mangling.
1465 2004-05-29 Seth Nickell <seth@gnome.org>
1469 Add ObjectTree class which allows implementation
1470 of trees of "virtual" objects. Basically the python
1471 wrapper for "register_fallback".
1473 * python/examples/Makefile.am
1474 * python/examples/gconf-proxy-client.py:
1475 * python/examples/gconf-proxy-service.py:
1477 Implement a simple GConf proxy service that supports
1478 get/set on string and int GConf keys using the ObjectTree.
1480 2004-05-29 Seth Nickell <seth@gnome.org>
1483 * python/examples/example-client.py:
1484 * python/examples/example-service.py:
1485 * python/examples/list-system-services.py:
1487 Add SessionBus, SystemBus and ActivationBus classes
1488 so you don't need to know the special little BUS_TYPE
1491 2004-05-29 Havoc Pennington <hp@redhat.com>
1493 * bus/config-parser.c (process_test_valid_subdir): temporarily
1494 stop testing config parser OOM handling, since expat has issues
1495 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
1497 * bus/dbus-daemon-1.1.in: change requested_reply to
1498 send_requested_reply/receive_requested_reply so we can send the
1499 replies, not just receive them.
1501 * bus/config-parser.c: parse the new
1502 send_requested_reply/receive_requested_reply
1504 * bus/policy.c (bus_client_policy_check_can_send): add
1505 requested_reply argument and use it
1507 * bus/bus.c (bus_context_check_security_policy): pass through
1508 requested_reply status to message send check
1510 * bus/system.conf.in: adapt to requested_reply change
1512 2004-05-28 Havoc Pennington <hp@redhat.com>
1514 * test/glib/test-service-glib.c (main): remove unused variable
1516 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
1518 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
1519 from the enum, no longer in use.
1521 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
1524 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
1525 whether error_name passed in is a valid error name.
1527 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
1529 * dbus/dbus-message.c (dbus_message_get_args): Added support for
1530 OBJECT_PATH and OBJECT_PATH_ARRAY
1532 2004-05-28 Seth Nickell <seth@gnome.org>
1534 * python/examples/Makefile.am:
1536 Forget to add Makefile.am. Do not pass go.
1538 2004-05-28 Michael Meeks <michael@ximian.com>
1540 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
1543 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
1545 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
1546 (_dbus_message_iter_get_basic_type_array): impl.
1547 drastically simplify ~all relevant _get methods to use these.
1548 (_dbus_message_iter_append_basic_array),
1549 (dbus_message_iter_append_basic): impl
1550 drastically simplify ~all relevant _append methods to use these.
1552 * dbus/dbus-message-builder.c (parse_basic_type)
1553 (parse_basic_array, lookup_basic_type): impl.
1554 (_dbus_message_data_load): prune scads of duplicate /
1557 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
1558 (_dbus_demarshal_basic_type): implement,
1559 (demarshal_and_validate_len/arg): beef up debug.
1560 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
1562 2004-05-27 Seth Nickell <seth@gnome.org>
1565 * python/Makefile.am:
1567 Include the example python apps in the tarball.
1569 * python/examples/list-system-services.py
1571 Add a python new example that fetches the list of services
1572 from the system bus.
1574 2004-05-27 Seth Nickell <seth@gnome.org>
1577 * python/dbus_bindings.pyx.in:
1579 Fix failure to notify that a signal was not handled,
1580 resulted in hung functions.
1582 2004-05-25 Colin Walters <walters@redhat.com>
1584 * tools/dbus-monitor.c (main): Monitor all types of messages.
1586 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
1588 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
1589 which unregisters the object path and disposes the handler.
1591 2004-05-23 Kristian Høgsberg <krh@redhat.com>
1593 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
1595 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
1596 operands to && so we call dbus_message_iter_next () for the last
1599 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1601 * dbus/dbus-object-tree.c
1602 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
1603 children even if the requested path isn't registered.
1604 (object_tree_test_iteration): test object_tree_list_registered.
1606 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
1609 2004-05-20 Kristian Høgsberg <krh@redhat.com>
1611 * doc/TODO: Remove resolved items.
1613 * bus/expirelist.h (struct BusExpireList): remove unused n_items
1616 * bus/connection.c (bus_connections_expect_reply): Enforce the
1617 per-connection limit on pending replies.
1619 Patch from Jon Trowbridge <trow@ximian.com>:
1621 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
1622 up a watch that triggers a config reload when one end of the pipe
1624 (signal_handler): Instead of doing the config reload in our SIGHUP
1625 handler, just write to the reload pipe and let the associated
1626 watch handle the reload when control returns to the main loop.
1628 * bus/driver.c (bus_driver_handle_reload_config): Added.
1629 Implements a ReloadConfig method for requesting a configuration
1630 file reload via the bus driver.
1632 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
1634 * HACKING: Updated release instructions concerning the wiki page.
1636 2004-05-18 Kristian Høgsberg <krh@redhat.com>
1638 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
1639 filter against auth->allowed_mechs; we only add allowed mechs in
1640 record_mechanisms().
1642 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
1643 ALLOWED_MECHS to auth-script format so we can set the list of
1646 * data/auth/client-out-of-mechanisms.auth-script: New test to
1647 check client disconnects when it is out of mechanisms to try.
1649 * dbus/dbus-auth.c (process_command): Remove check for lines
1650 longer that 1 MB; we only buffer up maximum 16 kB.
1652 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1653 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
1654 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
1655 assume there might be unused bytes.
1657 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
1658 client-out-of-mechs, it is handled in process_reject(). Move check
1659 for max failures to send_rejected(), as it's a server-only thing.
1661 * dbus/dbus-auth.c: Factor out protocol reply code into functions
1662 send_auth(), send_data(), send_rejected(), send_error(),
1663 send_ok(), send_begin() and send_cancel().
1665 2004-05-17 Kristian Høgsberg <krh@redhat.com>
1667 Remove base64 encoding, replace with hex encoding. Original patch
1668 from trow@ximian.com, added error handling.
1670 * dbus/dbus-string.c (_dbus_string_base64_encode)
1671 (_dbus_string_base64_decode): Remove.
1672 (_dbus_string_hex_decode): Add end_return argument so we can
1673 distinguish between OOM and invalid hex encoding.
1674 (_dbus_string_test): Remove base64 tests and add test case for
1677 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
1678 Replace base64 with hex.
1680 * test/data/auth/invalid-hex-encoding.auth-script: New test case
1681 for invalid hex encoded data in auth protocol.
1683 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1685 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
1688 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1690 * mono/dbus-sharp.dll.config.in: Added for GAC
1691 * mono/dbus-sharp.snk: Added for GAC
1692 * mono/Assembly.cs.in: Added for GAC
1693 * mono/Makefile.am: Changes for GAC installation
1694 * configure.in: Added refs for dbus-sharp.dll.config.in and
1695 Assembly.cs.in. More fixes for mono testing
1696 * mono/example/Makefile.am: Changed var to CSC
1697 * Makefile.am: Changed flag name to DBUS_USE_CSC
1699 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
1701 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
1702 * mono/doc/*: Added documentation framework
1703 * configure.in: Added monodoc check
1704 * README: Added description of mono configure flags
1706 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
1708 * doc/dbus-specification.xml: Added a "Required" column to the
1709 header fields table and changed the "zero or more" verbage in
1710 the above paragraph to read "The header must contain the required
1711 named header fields and zero or more of the optional named header
1713 * test/data/invalid-messages/*.message: Added the required PATH
1714 named header field to the tests so that they don't fail on
1715 'Missing path field'
1717 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
1719 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
1720 the stack by implicitly defining variable and parameter types and
1721 removing the hack of defining C pointers as python objects and later
1724 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
1726 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
1728 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
1730 * mono/DBusType/Dict.cs: Handle empty dicts
1731 * mono/DBusType/Array.cs: Handle empty arrays
1732 * mono/Arguments.cs: Handle empty arguments
1734 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
1736 * dbus-sharp.pc.in: Modified to include include Libs and Requires
1739 2004-04-25 Kristian Høgsberg <krh@redhat.com>
1741 * test/data/valid-messages/standard-*.message: Update message
1742 test scripts to new header field names.
1744 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
1746 * test/break-loader.c (randomly_do_n_things): tracked down buffer
1747 overflow to times_we_did_each_thing array which would chop off the
1748 first character of the failure_dir string. Increased the size of
1749 the array to 7 to reflect the number of random mutation functions
1752 2004-04-21 Kristian Høgsberg <krh@redhat.com>
1754 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
1755 unix_server->watch here, it is unreffed in disconnect.
1756 (_dbus_server_new_for_tcp_socket): convert NULL host to
1757 "localhost" here so we don't append NULL to address.
1759 * dbus/dbus-server.c (_dbus_server_test): Add test case for
1760 various addresses, including tcp with no explicit host.
1762 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1764 * dbus/dbus-message.c (decode_header_data, decode_string_field):
1765 fix incorrect setting of .name_offset in the HeaderField (it was
1766 off by two bytes, positioned right after the name and typecode)
1768 * bus/bus.c (bus_context_new, bus_context_unref): test before
1769 calling dbus_server_free_data_slot and _dbus_user_database_unref
1770 in case of an error.
1772 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1775 2004-04-19 Kristian Høgsberg <krh@redhat.com>
1777 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1778 _dbus_poll() instead of select().
1780 2004-04-15 Jon Trowbridge <trow@ximian.com>
1782 * bus/main.c (signal_handler): Reload the configuration files
1784 (main): Set up our SIGHUP handler.
1786 * bus/bus.c (struct BusContext): Store the config file, user and
1787 fork flag in the BusContext.
1788 (process_config_first_time_only): Added. Contains the code
1789 (previously in bus_context_new) for setting up the BusContext from
1790 the BusConfigParser that should only be run the first time the
1791 config files are read.
1792 (process_config_every_time): Added. Contains the code (previously
1793 in bus_context_new) for setting up the BusContext from the
1794 BusConfigParser that should be run every time the config files are
1796 (load_config): Added. Builds a BusConfigParser from the config
1797 files and passes the resulting structure off to
1798 process_config_first_time_only (assuming this is the first time)
1799 and process_config_every_time.
1800 (bus_context_new): All of the config-related code has been moved
1801 to process_config_first_time_only and process_config_every_time.
1802 Now this function just does the non-config-related initializations
1803 and calls load_config.
1804 (bus_context_reload_config): Added.
1806 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
1808 * bus/driver.c (bus_driver_handle_get_service_owner):
1809 implement a GetServiceOwner method.
1810 * doc/dbus-specification.xml: document it.
1811 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1813 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1814 implement, using the bus GetServiceOwner method.
1816 * test/glib/test-dbus-glib.c:
1817 use dbus_gproxy_new_for_service_owner so that we can receive the
1820 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
1822 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1823 dbus/dbus-message.c, dbus/dbus-protocol.h
1824 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1826 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1827 dbus/dbus-message.c, dbus/dbus-protocol.h
1828 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1830 * dbus/dbus-internals.c (_dbus_header_field_to_string):
1831 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1832 DBUS_HEADER_FIELD_SENDER resolves to "sender"
1834 * doc/dbus-specification.xml (Header Fields Table):
1835 s/SERVICE/DESTINATION
1836 s/SENDER_SERVICE/SENDER
1839 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
1841 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1844 2004-04-13 Michael Meeks <michael@ximian.com>
1846 * glib/dbus-gobject.c (handle_introspect): split out
1847 (introspect_properties): this.
1848 (handle_introspect): implement this.
1850 * test/glib/Makefile.am: use the absolute path so the bus
1851 daemon's chdir ("/") doesn't kill us dead.
1853 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1855 2004-04-12 Jon Trowbridge <trow@ximian.com>
1857 * bus/config-parser.c (struct BusConfigParser): Added
1858 included_files field.
1859 (seen_include): Added. Checks whether or not a file has already
1860 been included by any parent BusConfigParser.
1861 (bus_config_parser_new): Copy the parent's included_files.
1862 (include_file): Track which files have been included, and fail on
1863 circular inclusions.
1864 (process_test_valid_subdir): Changed printf to report if we are
1865 testing valid or invalid conf files.
1866 (all_are_equiv): Changed printf to be a bit clearer about
1867 what we are actually doing.
1868 (bus_config_parser_test): Test invalid configuration files.
1870 2004-04-09 Jon Trowbridge <trow@ximian.com>
1872 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1873 argument. If non-null, the newly-constructed BusConfigParser will
1874 be initialized with the parent's BusLimits instead of the default
1876 (include_file): When including a config file, pass in
1877 the current parser as the parent and then copy the BusLimits
1878 from the included BusConfigParser pack to the current parser.
1879 (process_test_valid_subdir): Renamed from process_test_subdir.
1880 (process_test_equiv_subdir): Added. Walks through a directory,
1881 descending into each subdirectory and loading the config files
1882 it finds there. If any subdirectory contains two config files
1883 that don't produce identical BusConfigParser structs, fail.
1884 For now, the BusConfigParser's BusPolicies are not compared.
1885 (bus_config_parser_test): Call both process_test_valid_subdir and
1886 process_test_equiv_subdir.
1888 * bus/config-loader-libxml.c (bus_config_load): Take a parent
1889 argument and pass it along to the call to bus_config_parser_new.
1890 Also made a few small changes to allow this code to compile.
1892 * bus/config-loader-expat.c (bus_config_load): Take a parent
1893 argument and pass it along to the call to bus_config_parser_new.
1895 * bus/bus.c (bus_context_new): Load the config file
1896 with a NULL parent argument.
1898 2004-03-29 Michael Meeks <michael@ximian.com>
1900 * glib/dbus-gobject.c (introspect_properties): split
1901 out, fix mangled 'while' flow control.
1902 (introspect_signals): implement.
1903 (handle_introspect): update.
1905 2004-03-29 Michael Meeks <michael@ximian.com>
1907 * glib/dbus-gobject.c (set_object_property): split out /
1908 re-work, use the property type, and not the message type(!)
1909 (get_object_property): ditto.
1911 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1912 (dbus_gvalue_marshal): make this code re-usable, needed
1913 for signals too, also on both proxy and server side.
1914 Re-write for more efficiency / readability.
1916 2004-03-29 Michael Meeks <michael@ximian.com>
1918 * dbus/dbus-message.c
1919 (dbus_message_new_error_printf): impl.
1921 * dbus/dbus-connection.c
1922 (dbus_connection_unregister_object_path): fix warning.
1924 * configure.in: fix no-mono-installed situation.
1926 2004-03-27 Havoc Pennington <hp@redhat.com>
1928 Patch from Timo Teräs:
1930 * tools/dbus-send.c (main): if --print-reply, assume type is
1931 method call; support boolean type args
1933 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1934 bunch of memleak and logic bugs
1936 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1938 * mono/Arguments.cs:
1939 * mono/Introspector.cs:
1941 * mono/InterfaceProxy.cs:
1943 * mono/ProxyBuilder.cs:
1945 Added InterfaceProxy class to avoid building proxies for every
1949 * dbus-message.c (dbus_message_append_args_valist)
1950 (dbus_message_iter_get_object_path)
1951 (dbus_message_iter_get_object_path_array)
1952 (dbus_message_iter_append_object_path)
1953 (dbus_message_iter_append_object_path_array):
1954 Added object_path iter functions to handle OBJECT_PATH arguments
1956 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
1958 First checkin of mono bindings.
1961 Build stuff for the bindings
1962 * dbus-sharp.pc.in: Added for pkgconfig
1964 2004-03-21 Havoc Pennington <hp@redhat.com>
1966 * test/test-service.c (main): remove debug spew
1968 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1970 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1973 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1974 (dbus_message_iter_init_array_iterator)
1975 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1976 indicate whether the iterator is empty
1978 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1981 2004-03-19 Havoc Pennington <hp@redhat.com>
1983 * NEWS: 0.21 updates
1985 * configure.in: 0.21
1987 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1989 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1990 you don't need pyrex to make dist
1992 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1995 2004-03-18 Richard Hult <richard@imendio.com>
1997 * dbus/dbus-message.c (dbus_message_get_auto_activation)
1998 (dbus_message_set_auto_activation): Add doxygen docs.
2000 2004-03-16 Richard Hult <richard@imendio.com>
2002 * bus/activation.c: (bus_activation_service_created),
2003 (bus_activation_send_pending_auto_activation_messages),
2004 (bus_activation_activate_service):
2006 * bus/dispatch.c: (bus_dispatch),
2007 (check_nonexistent_service_auto_activation),
2008 (check_service_auto_activated),
2009 (check_segfault_service_auto_activation),
2010 (check_existent_service_auto_activation), (bus_dispatch_test):
2011 * bus/driver.c: (bus_driver_handle_activate_service):
2012 * bus/services.c: (bus_registry_acquire_service):
2013 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
2014 (dbus_message_get_auto_activation):
2015 * dbus/dbus-message.h:
2016 * dbus/dbus-protocol.h: Implement auto-activation.
2018 * doc/dbus-specification.xml: Add auto-activation to the spec.
2020 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
2022 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
2023 fix a bug with CUSTOM types.
2025 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
2026 a unit test for this bug (used to fail).
2028 2004-03-12 Mikael Hallendal <micke@imendio.com>
2031 (babysitter_watch_callback): notify all pending activations waiting for
2032 the same exec that the activation failed.
2033 (bus_activation_activate_service): shortcut the activation if we
2034 already waiting for the same executable to start up.
2036 2004-03-12 Mikael Hallendal <micke@imendio.com>
2039 - Added service file reloading.
2040 Each service files directory is kept in an hash table in
2041 BusActivation and each BusActivationEntry knows what .service-file it
2042 was read from. So when you try to activate a service the bus will
2043 check if it's been updated, removed or if new .service-files has
2045 - Test code at the bottom for the service file reloading.
2046 * bus/test-main.c: (main):
2048 - added service reloading test.
2049 * dbus/dbus-sysdeps.c:
2050 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
2052 2004-03-08 Michael Meeks <michael@ximian.com>
2054 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
2055 bail immediately if disconnected, to avoid busy loop.
2057 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
2058 cleanup cut/paste/inefficiency.
2060 2004-03-01 David Zeuthen <david@fubar.dk>
2062 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
2063 bug where args were used twice. This bug resulted in a segfault
2064 on a Debian/PPC system when starting the messagebus daemon. Include
2065 dbus-sysdeps.h for DBUS_VA_COPY
2067 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
2069 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
2070 appropriate va_copy implementation. From GLib
2072 2004-02-24 Joe Shaw <joe@ximian.com>
2074 * bus/services.c (bus_registry_acquire_service): We need to pass
2075 in the service name to dbus_set_error() to prevent a crash.
2077 2003-12-26 Anders Carlsson <andersca@gnome.org>
2079 * AUTHORS: Reveal my True identity.
2081 2003-12-17 Mikael Hallendal <micke@imendio.com>
2083 * dbus/dbus-message.c: (dbus_message_append_args_valist):
2084 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
2086 2003-12-13 Mikael Hallendal <micke@imendio.com>
2088 * doc/TODO: Added not about better error check of configuration files.
2090 2003-12-02 Richard Hult <richard@imendio.com>
2092 * Update AFL version to 2.0 throughout the source files to reflect
2093 the update that was done a while ago.
2095 2003-12-02 Richard Hult <richard@imendio.com>
2097 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
2098 wrote_dict_key to FALSE on the iter that the dict is appended to,
2099 just like when appending other types. Fixes a bug where a dict
2100 couldn't be put inside a dict.
2101 (dbus_message_iter_append_dict_key): Fix typo in warning message.
2102 (message_iter_test, _dbus_message_test): Add test case for dict
2105 2003-12-01 David Zeuthen <david@fubar.dk>
2107 * python/dbus.py: Add the actual message when calling the reciever
2108 of a signal such that parameters can be inspected. Add the method
2109 remove_signal_receiver
2111 2003-11-26 Mikael Hallendal <micke@imendio.com>
2115 * glib/*.[ch]: Made ref functions return the pointer
2117 2003-11-25 Zack Rusin <zack@kde.org>
2119 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
2121 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
2124 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
2125 the Integrator and to better fit with the server,
2127 2003-11-24 Zack Rusin <zack@kde.org>
2129 * qt/connection.h, qt/connection.cpp: removing initDbus method since
2130 the integrator handles it now
2132 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
2133 since QTimer wasn't really meant to be used the way DBusTimeout is
2135 2003-11-24 Zack Rusin <zack@kde.org>
2137 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
2138 Integrator class which integrates D-BUS with the Qt event loop,
2140 * qt/connection.h, qt/connection.cpp: Move all the code which
2141 was dealing with D-BUS integration to the Integrator class,
2142 and start using Integrator,
2144 2003-11-23 Zack Rusin <zack@kde.org>
2146 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
2149 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
2150 switching namespaces to DBusQt, reworking the class,
2152 * Makefile.cvs: switching dependencies so that it matches KDE
2155 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
2158 2003-11-19 Havoc Pennington <hp@redhat.com>
2162 * configure.in: bump version to 0.20
2164 * configure.in (have_qt): add yet another place to look for qt
2165 (someone hand trolltech a .pc file...)
2167 2003-11-01 Havoc Pennington <hp@redhat.com>
2169 * doc/dbus-specification.xml: add state machine docs on the auth
2170 protocol; just a first draft, I'm sure it's wrong.
2172 2003-10-28 David Zeuthen <david@fubar.dk>
2174 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
2175 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
2177 2003-10-28 Havoc Pennington <hp@redhat.com>
2179 * dbus/dbus-message.c (get_next_field): delete unused function
2181 2003-10-28 Havoc Pennington <hp@redhat.com>
2183 * bus/expirelist.c (do_expiration_with_current_time): detect
2184 failure of the expire_func due to OOM
2186 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
2188 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
2189 NoReply error that's now created by the bus when the service exits
2191 2003-10-28 Havoc Pennington <hp@redhat.com>
2193 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
2194 tests for set_path, set_interface, set_member, etc.
2196 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
2198 * dbus/dbus-message.c (set_string_field): always just delete and
2199 re-append the field; accept NULL for deletion
2200 (re_align_fields_recurse): reimplement
2202 2003-10-26 Havoc Pennington <hp@redhat.com>
2204 * dbus/dbus-connection.c: fix docs to properly describe the
2205 disconnected message
2206 (_dbus_connection_notify_disconnected): remove this function;
2207 we can't synchronously add the disconnected message, we have to
2208 do it after we've queued any remaining real messages
2209 (_dbus_connection_get_dispatch_status_unlocked): queue the
2210 disconnect message only if the transport has finished queueing all
2211 its real messages and is disconnected.
2212 (dbus_connection_disconnect): update the dispatch status here
2214 2003-10-22 Havoc Pennington <hp@redhat.com>
2216 * bus/bus.c (bus_context_check_security_policy): fix up assertion
2218 * bus/connection.c (bus_transaction_send_from_driver): set the
2219 destination to the connection's base service
2221 2003-10-20 Havoc Pennington <hp@redhat.com>
2223 hmm, make check is currently not passing.
2225 * doc/dbus-specification.xml: add requirement that custom type
2226 names follow the same rules as interface names.
2228 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
2229 duplication and allow 'c' to be 'custom'; dict is now 'm' for
2232 * doc/dbus-specification.xml: update type codes to match
2233 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
2234 CUSTOM. Add type OBJECT_PATH to the spec.
2236 2003-10-17 Havoc Pennington <hp@redhat.com>
2238 * bus/driver.c (create_unique_client_name): use "." as separator
2239 in base service names instead of '-'
2241 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
2242 byte at the end of the string
2244 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
2245 optimization macros since string validation seems to be a slow
2248 * doc/dbus-specification.xml: restrict valid
2249 service/interface/member/error names. Add test suite code for the
2252 * dbus/dbus-string.c: limit service/interface/member/error names
2255 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
2256 format arg to verbose spew
2258 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
2259 memory, return instead of g_error
2261 * test/test-service.c (path_message_func): support emitting a
2264 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
2265 activation bus type if DBUS_BUS_ACTIVATION was set; default to
2266 assuming the activation bus was the session bus so that services
2267 started manually will still register.
2268 (init_connections_unlocked): fix so that in OOM situation we get
2269 the same semantics when retrying the function
2271 * test/test-service.c (main): change to use path registration, to
2272 test those codepaths; register with DBUS_BUS_ACTIVATION rather
2273 than DBUS_BUS_SESSION
2275 2003-10-16 Havoc Pennington <hp@redhat.com>
2277 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
2279 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
2280 coverage of the tests
2281 (coverage-report.txt): don't move the .da and .bbg files around
2283 2003-10-16 Havoc Pennington <hp@redhat.com>
2285 * bus/bus.c (struct BusContext): remove struct field I didn't mean
2288 2003-10-16 Havoc Pennington <hp@redhat.com>
2290 * bus/connection.c (bus_pending_reply_expired): either cancel or
2292 (bus_connections_check_reply): use unlink, not remove_link, as we
2293 don't want to free the link; fixes double free mess
2295 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
2296 where no reply was received
2298 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
2301 * bus/signals.c (match_rule_matches): add special cases for the
2302 bus driver, so you can match on sender/destination for it.
2304 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
2305 DBUS_PRINT_BACKTRACE is set
2307 * dbus/dbus-internals.c: add pid to assertion failure messages
2309 * dbus/dbus-connection.c: add message type code to the debug spew
2311 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
2312 sender=foo not service=foo
2314 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
2315 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
2316 DBUS_ACTIVATION_ADDRESS instead
2318 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
2319 DBUS_SYSTEM_BUS_ADDRESS if appropriate
2321 * bus/bus.c (bus_context_new): handle OOM copying bus type into
2324 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
2325 (dbus_message_iter_get_object_path_array): new function (half
2326 finished, disabled for the moment)
2328 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
2329 DBUS_MESSAGE_TYPE_ERROR
2331 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
2332 avoid redirecting stderr to /dev/null
2333 (babysit): close stdin if not doing the "exit_with_session" thing
2335 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
2336 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
2337 stdout/stdin, so things don't get confused
2339 * bus/system.conf.in: fix to allow replies, I modified .conf
2340 instead of .conf.in again.
2342 2003-10-14 David Zeuthen <david@fubar.dk>
2344 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
2345 argtype to arg_type when raising unknown arg type exception.
2346 Changed type list to reflect the changes in dbus-protocol.h so
2347 the bindings actually work.
2349 2003-10-14 Havoc Pennington <hp@redhat.com>
2351 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
2352 to have a bug keeping it from outputting the .da files sometimes
2353 (string_get_string): don't append garbage nul bytes to the string.
2355 2003-10-15 Seth Nickell <seth@gnome.org>
2357 * python/Makefile.am:
2359 Include dbus_h_wrapper.h in the dist tarball.
2361 2003-10-14 Havoc Pennington <hp@redhat.com>
2363 * bus/bus.c (bus_context_check_security_policy): revamp this to
2364 work more sanely with new policy-based requested reply setup
2366 * bus/connection.c (bus_transaction_send_from_driver): set bus
2367 driver messages as no reply
2369 * bus/policy.c (bus_client_policy_check_can_receive): handle a
2370 requested_reply attribute on allow/deny rules
2372 * bus/system.conf: add <allow requested_reply="true"/>
2374 * bus/driver.c (bus_driver_handle_message): fix check for replies
2375 sent to the bus driver, which was backward. How did this ever work
2376 at all though? I think I'm missing something.
2378 * dbus/dbus-message.c (decode_header_data): require error and
2379 method return messages to have a reply serial field to be valid
2380 (_dbus_message_loader_queue_messages): break up this function;
2381 validate that reply serial and plain serial are nonzero;
2382 clean up the OOM/error handling.
2383 (get_uint_field): don't return -1 from this
2384 (dbus_message_create_header): fix signed/unsigned bug
2386 * bus/connection.c (bus_connections_expect_reply): save serial of
2387 the incoming message, not reply serial
2389 2003-10-14 Havoc Pennington <hp@redhat.com>
2391 * bus/connection.c: implement pending reply tracking using
2394 * bus/bus.c (bus_context_check_security_policy): verify that a
2395 reply is pending in order to allow a reply to be sent. Deny
2396 messages of unknown type.
2398 * bus/dbus-daemon-1.1.in: update to mention new resource limits
2400 * bus/bus.c (bus_context_get_max_replies_per_connection): new
2401 (bus_context_get_reply_timeout): new
2403 2003-10-13 Seth Nickell <seth@gnome.org>
2405 * python/Makefile.am:
2407 Pass "make distcheck": remove a couple files from DIST_FILES
2408 that weren't included in the final version.
2410 2003-10-12 Havoc Pennington <hp@pobox.com>
2412 Added test code that 1) starts an actual bus daemon and 2) uses
2413 DBusGProxy; fixed bugs that were revealed by the test. Lots
2414 more testing possible, but this is the basic framework.
2416 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
2417 empty proxy lists from the proxy list hash
2419 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
2420 couple of return_if_fail checks
2422 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
2423 to allocate, so everything is cleared to NULL as it should be.
2425 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
2426 source as data to dbus_connection_set_timeout_functions() as the
2427 timeout functions expected
2429 * test/glib/run-test.sh: add a little script to start up a message
2430 bus and run tests using it
2432 * tools/dbus-launch.1: updates
2434 * tools/dbus-launch.c (main): add --config-file option
2436 * tools/dbus-launch.c (main): remove confusing else if (runprog)
2437 that could never be reached.
2439 * dbus/dbus-message.c (dbus_message_new_method_return)
2440 (dbus_message_new_error, dbus_message_new_signal): set the
2441 no-reply-expected flag on all these. Redundant, but may
2442 as well be consistent.
2444 2003-10-11 Havoc Pennington <hp@pobox.com>
2446 * test/decode-gcov.c (function_solve_graph): make broken block
2447 graph a nonfatal error since it seems to be broken. Need to debug
2450 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
2451 can't just check type > INVALID < LAST anymore
2453 * dbus/dbus-message.c (dbus_message_get_signature): new function
2454 (dbus_message_has_signature): new function
2455 (struct DBusMessage): add signature field (right now it isn't sent
2456 over the wire, just generated on the fly)
2457 (dbus_message_copy): copy the signature, and init strings to
2458 proper length to avoid some reallocs
2459 (dbus_message_iter_init_array_iterator): return void, since it
2461 (dbus_message_iter_init_dict_iterator): return void since it can't fail
2462 (_dbus_message_loader_queue_messages): add silly temporary hack to
2463 fill in message->signature on load
2465 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
2466 characters, so they are relatively human-readable.
2468 2003-10-11 Havoc Pennington <hp@pobox.com>
2470 * dbus/dbus-message.c (_dbus_message_test): add more test
2471 coverage, but #if 0 for now since they uncover a bug
2472 not fixed yet; I think in re_align_field_recurse()
2473 (re_align_field_recurse): add FIXME about broken assertion
2475 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
2477 * bus/connection.c: share a couple code bits with expirelist.c
2479 * bus/expirelist.h, bus/expirelist.c: implement a generic
2480 expire-items-after-N-seconds facility, was going to share between
2481 expiring connections and replies, decided not to use for expiring
2482 connections for now.
2484 * COPYING: include AFL 2.0 (still need to change all the file headers)
2486 2003-10-09 Havoc Pennington <hp@redhat.com>
2488 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
2489 gcc 3.3. Not that we do anything about it yet.
2491 * bus/signals.c (bus_match_rule_parse): impose max length on the
2494 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
2496 2003-10-09 Havoc Pennington <hp@redhat.com>
2498 Make matching rules theoretically work (add parser).
2500 * bus/bus.c (bus_context_check_security_policy): fix up to handle
2501 the case where destination is explicitly specified as bus driver
2502 and someone else is eavesdropping.
2504 * bus/policy.c (bus_client_policy_check_can_receive): fix up
2505 definition of eavesdropping and assertion
2507 * tools/dbus-send.c (main): use dbus_message_type_from_string
2509 * bus/signals.c (bus_match_rule_parse): implement
2511 * dbus/dbus-message.c (dbus_message_type_from_string): new
2513 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
2515 2003-10-02 Havoc Pennington <hp@pobox.com>
2517 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
2518 dbus_gproxy_oneway_call
2520 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
2521 (dbus_server_setup_with_g_main): fix to allow calling them more
2522 than once on the same args
2523 (dbus_bus_get_with_g_main): new function
2525 2003-10-02 Havoc Pennington <hp@redhat.com>
2527 * doc/dbus-tutorial.xml: write some stuff
2529 2003-09-29 Havoc Pennington <hp@pobox.com>
2531 * configure.in: split checks for Doxygen from XML docs, check for
2534 * doc/Makefile.am: XML-ify all the docs, and add a blank
2537 2003-09-29 Havoc Pennington <hp@pobox.com>
2539 * Merge dbus-object-names branch. To see the entire patch
2540 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
2541 it's huuuuge though.
2542 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
2544 2003-09-28 Havoc Pennington <hp@pobox.com>
2546 * HACKING: update to reflect new server
2548 2003-09-26 Seth Nickell <seth@gnome.org>
2551 * python/examples/example-signals.py:
2553 Start implementing some notions of signals. The API
2554 is really terrible, but they sort of work (with the
2555 exception of being able to filter by service, and to
2556 transmit signals *as* a particular service). Need to
2557 figure out how to make messages come from the service
2560 * python/dbus_bindings.pyx.in:
2562 Removed duplicate message_handler callbacks.
2564 2003-09-25 Havoc Pennington <hp@redhat.com>
2566 * bus/session.conf.in: fix my mess
2568 2003-09-25 Havoc Pennington <hp@pobox.com>
2570 * bus/session.conf.in: fix security policy, reported by Seth Nickell
2572 2003-09-25 Seth Nickell <seth@gnome.org>
2574 * python/examples/example-service.py:
2576 Johan notices complete wrong code in example-service, but
2577 completely wrong in a way that works exactly the same (!).
2578 Johan is confused, how could this possibly work? Example
2579 code fails to serve purpose of making things clear.
2582 2003-09-25 Mark McLoughlin <mark@skynet.ie>
2584 * doc/dbus-specification.sgml: don't require header fields
2585 to be 4-byte aligned and specify that fields should be
2586 distinguished from padding by the fact that zero is not
2589 * doc/TODO: remove re-alignment item and add item to doc
2590 the OBJECT_PATH type.
2592 * dbus/dbus-message.c:
2593 (HeaderField): rename the original member to value_offset
2594 and introduce a name_offset member to keep track of where
2595 the field actually begins.
2596 (adjust_field_offsets): remove.
2597 (append_int_field), (append_uint_field),
2598 (append_string_field): don't align the start of the header
2599 field to a 4-byte boundary.
2600 (get_next_field): impl finding the next marhsalled field
2601 after a given field.
2602 (re_align_field_recurse): impl re-aligning a number of
2603 already marshalled fields.
2604 (delete_field): impl deleting a field of any type and
2605 re-aligning any following fields.
2606 (delete_int_or_uint_field), (delete_string_field): remove.
2607 (set_int_field), (set_uint_field): no need to re-check
2608 that we have the correct type for the field.
2609 (set_string_field): ditto and impl re-aligning any
2611 (decode_header_data): update to take into account that
2612 the fields aren't 4-byte aligned any more and the new
2613 way to distinguish padding from header fields. Also,
2614 don't exit when there is too much header padding.
2615 (process_test_subdir): print the directory.
2616 (_dbus_message_test): add test to make sure a following
2617 field is re-aligned correctly after field deletion.
2619 * dbus/dbus-string.[ch]:
2620 (_dbus_string_insert_bytes): rename from insert_byte and
2621 allow the insert of multiple bytes.
2622 (_dbus_string_test): test inserting multiple bytes.
2624 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
2625 warning note to docs about having to re-align any
2626 marshalled values following the string.
2628 * dbus/dbus-message-builder.c:
2629 (append_string_field), (_dbus_message_data_load):
2630 don't align the header field.
2632 * dbus/dbus-auth.c: (process_test_subdir): print the
2635 * test/break-loader.c: (randomly_add_one_byte): upd. for
2638 * test/data/invalid-messages/bad-header-field-alignment.message:
2641 * test/data/valid-messages/unknown-header-field.message: shove
2642 a dict in the unknown field.
2644 2003-09-25 Seth Nickell <seth@gnome.org>
2647 * python/dbus_bindings.pyx.in:
2649 Handle return values.
2651 * python/examples/example-client.py:
2652 * python/examples/example-service.py:
2654 Pass back return values from the service to the client.
2656 2003-09-24 Seth Nickell <seth@gnome.org>
2660 Connect Object methods (when you are sharing an object) up... pass
2661 in a list of methods to be shared. Sharing all the methods just
2662 worked out too weird. You can now create nice Services over the
2665 * python/dbus_bindings.pyx.in:
2667 Keep references to user_data tuples passed into C functions so
2668 Python doesn't garbage collect on us.
2670 Implement MethodReturn and Error subclasses of Message for creating
2671 DBusMessage's of those types.
2673 * python/examples/example-client.py:
2674 * python/examples/example-service.py:
2676 Simple example code showing both how create DBus services and objects,
2677 and how to use them.
2679 2003-09-23 Havoc Pennington <hp@pobox.com>
2681 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
2683 2003-09-23 Havoc Pennington <hp@redhat.com>
2685 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
2686 (dbus_gproxy_disconnect_signal): implement
2687 (dbus_gproxy_manager_remove_signal_match): implement
2688 (dbus_gproxy_manager_add_signal_match): implement
2689 (dbus_gproxy_oneway_call): implement
2691 2003-09-23 Havoc Pennington <hp@pobox.com>
2693 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
2694 subclass. This means dropping the transparent thread safety of the
2695 proxy; you now need a separate proxy per-thread, or your own
2696 locking on the proxy. Probably right anyway.
2697 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
2699 2003-09-22 Havoc Pennington <hp@redhat.com>
2701 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
2703 2003-09-21 Seth Nickell <seth@gnome.org>
2705 First checkin of the Python bindings.
2707 * python/.cvsignore:
2708 * python/Makefile.am:
2709 * python/dbus_bindings.pyx.in:
2710 * python/dbus_h_wrapper.h:
2712 Pieces for Pyrex to operate on, building a dbus_bindings.so
2713 python module for low-level access to the DBus APIs.
2717 High-level Python module for accessing DBus objects.
2722 Build stuff for the python bindings.
2726 Extra macro needed for finding the Python C header files.
2728 2003-09-21 Havoc Pennington <hp@pobox.com>
2730 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
2731 implementing the proxy manager, didn't get very far.
2733 * dbus/dbus-bus.c (dbus_bus_add_match): new
2734 (dbus_bus_remove_match): new
2736 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
2737 path_name argument; adjust the other not-yet-implemented
2738 gproxy constructors to be what I think they should be.
2740 2003-09-21 Havoc Pennington <hp@pobox.com>
2742 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
2743 by default for message bus connections.
2745 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
2746 exit_on_disconnect flag is set and we process the disconnected
2748 (dbus_connection_set_exit_on_disconnect): new function
2750 2003-09-21 Havoc Pennington <hp@pobox.com>
2752 Get matching rules mostly working in the bus; only actually
2753 parsing the rule text remains. However, the client side of
2754 "signal connections" hasn't been started, this patch is only the
2757 * dbus/dispatch.c: fix for the matching rules changes
2759 * bus/driver.c (bus_driver_handle_remove_match)
2760 (bus_driver_handle_add_match): send an ack reply from these
2763 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2764 arguments, reported by Seth Nickell
2766 * bus/config-parser.c (append_rule_from_element): support
2767 eavesdrop=true|false attribute on policies so match rules
2768 can be prevented from snooping on the system bus.
2770 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2771 and "destination" in attribute names; fix some docs bugs;
2772 add eavesdrop=true|false attribute
2774 * bus/driver.c (bus_driver_handle_add_match)
2775 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2778 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2779 rid of broadcast service concept, signals are just always broadcast
2781 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2782 mostly implement matching rules stuff (currently only exposed as signal
2785 2003-09-21 Mark McLoughlin <mark@skynet.ie>
2787 * doc/dbus-specification.sgml: Change the header field name
2788 to be an enum and update the rest of the spec to reference
2789 the fields using the conventinal name.
2791 * dbus/dbus-protocol.h: update to reflect the spec.
2793 * doc/TODO: add item to remove the 4 byte alignment requirement.
2795 * dbus/dbus-message.c: Remove the code to generalise the
2796 header/body length and serial number header fields as named
2797 header fields so we can reference field names using the
2799 (append_int_field), (append_uint_field), (append_string_field):
2800 Append the field name as a byte rather than four chars.
2801 (delete_int_or_uint_field), (delete_string_field): reflect the
2802 fact that the field name and typecode now occupy 4 bytes instead
2804 (decode_string_field), (decode_header_data): update to reflect
2805 protocol changes and move the field specific encoding from
2806 decode_string_field() back into decode_header_data().
2808 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2809 Add utility to aid debugging.
2811 * dbus/dbus-message-builder.c:
2812 (append_string_field), (_dbus_message_data_load): Update to
2813 reflect protocol changes; Change the FIELD_NAME directive
2814 to HEADER_FIELD and allow it to take the field's conventional
2815 name rather than the actual value.
2817 * test/data/*/*.message: Update to use HEADER_FIELD instead
2818 of FIELD_NAME; Always align the header on an 8 byte boundary
2819 *before* updating the header length.
2821 2003-09-15 Havoc Pennington <hp@pobox.com>
2823 * dbus/dbus-pending-call.c: add the get/set object data
2824 boilerplate as for DBusConnection, etc. Use generic object data
2825 for the notify callback.
2827 * glib/dbus-gparser.c (parse_node): parse child nodes
2829 * tools/dbus-viewer.c: more hacking on the dbus-viewer
2831 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2832 contain functions shared between the convenience lib and the
2835 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2836 -export-symbols-regex to the GLib library
2838 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2839 fix the locking in here, and add a default handler for
2840 Introspect() that just returns sub-nodes.
2842 2003-09-14 Havoc Pennington <hp@pobox.com>
2844 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2845 rather than gfoo consistent
2847 * glib/dbus-gproxy.h: delete for now, move contents to
2848 dbus-glib.h, because the include files don't work right since we
2849 aren't in the dbus/ subdir.
2851 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2852 (dbus_gproxy_end_call): finish
2853 (dbus_gproxy_begin_call): finish
2855 * glib/dbus-gmain.c (dbus_set_g_error): new
2857 * glib/dbus-gobject.c (handle_introspect): include information
2858 about child nodes in the introspection
2860 * dbus/dbus-connection.c (dbus_connection_list_registered): new
2861 function to help in implementation of introspection
2863 * dbus/dbus-object-tree.c
2864 (_dbus_object_tree_list_registered_and_unlock): new function
2866 2003-09-12 Havoc Pennington <hp@pobox.com>
2868 * glib/dbus-gidl.h: add common base class for all the foo_info
2871 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2874 * test/Makefile.am: try test srcdir -ef . in addition to test
2875 srcdir = ., one of them should work (yeah lame)
2877 * glib/Makefile.am: build the "idl" parser stuff as a convenience
2880 * glib/dbus-gparser.h: make description_load routines return
2881 NodeInfo* not Parser*
2883 * Makefile.am (SUBDIRS): build test dir after all library dirs
2885 * configure.in: add GTK+ detection
2887 2003-09-07 Havoc Pennington <hp@pobox.com>
2889 * Make Doxygen contented.
2891 2003-09-07 Havoc Pennington <hp@pobox.com>
2893 * doc/dbus-specification.sgml: more updates
2895 2003-09-06 Havoc Pennington <hp@pobox.com>
2897 * doc/dbus-specification.sgml: partial updates
2899 * bus/dbus-daemon-1.1.in: fix the config file docs for the
2900 zillionth time; hopefully I edited the right file this time.
2902 * bus/config-parser.c (append_rule_from_element): support
2903 send_type, send_path, receive_type, receive_path
2905 * bus/policy.c: add message type and path to the list of things
2906 that can be "firewalled"
2908 2003-09-06 Havoc Pennington <hp@pobox.com>
2910 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2911 (dbus_connection_register_object_path): make this not handle
2912 messages to paths below the given path
2914 2003-09-03 Havoc Pennington <hp@pobox.com>
2916 * test/glib/Makefile.am: add this with random glib-linked test
2919 * glib/Makefile.am: remove the random test programs from here,
2920 leave only the unit tests
2922 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
2923 uscore/javacaps conversion, and fix
2924 (get_object_property, set_object_property): change to .NET
2925 convention for mapping props to methods, set_FooBar/get_FooBar,
2926 since one language has such a convention we may as well copy it.
2927 Plus real methods in either getFooBar or get_foo_bar style won't
2928 collide with this convention.
2930 2003-09-01 Havoc Pennington <hp@pobox.com>
2932 * glib/dbus-gparser.c: implement
2934 * glib/dbus-gobject.c: start implementing skeletons support
2936 * configure.in: when disabling checks/assert, also define
2937 G_DISABLE_ASSERT and G_DISABLE_CHECKS
2939 2003-09-01 Havoc Pennington <hp@pobox.com>
2941 * glib/Makefile.am: rearrange a bunch of files and get "make
2942 check" framework set up
2944 2003-08-31 Havoc Pennington <hp@pobox.com>
2946 * fix build with --disable-tests
2948 2003-08-30 Havoc Pennington <hp@pobox.com>
2950 * dbus/dbus-connection.c: purge DBusMessageHandler
2952 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
2953 use callbacks everywhere
2955 2003-08-30 Havoc Pennington <hp@pobox.com>
2957 * test/data/valid-config-files/system.d/test.conf: change to
2958 root for the user so warnings don't get printed
2960 * dbus/dbus-message.c: add dbus_message_get_path,
2961 dbus_message_set_path
2963 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2964 dispatching to a path
2966 * dbus/dbus-string.c (_dbus_string_validate_path): add
2968 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2969 (_dbus_marshal_object_path): implement
2971 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
2972 to contain the path to the target object
2973 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2974 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2976 2003-08-30 Havoc Pennington <hp@pobox.com>
2978 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2980 2003-08-29 Havoc Pennington <hp@pobox.com>
2982 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2984 (struct DBusObjectSubtree): shrink this
2985 a lot, since we may have a lot of them
2986 (_dbus_object_tree_free_all_unlocked): implement
2987 (_dbus_object_tree_dispatch_and_unlock): implement
2989 2003-08-29 Havoc Pennington <hp@pobox.com>
2991 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2993 2003-08-28 Havoc Pennington <hp@pobox.com>
2997 * dbus/dbus-connection.c: port to no ObjectID, create a
2998 DBusObjectTree, rename ObjectTree to ObjectPath in public API
3000 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
3001 everything except UnregisterFunction and MessageFunction
3003 * dbus/dbus-marshal.c: port away from DBusObjectID,
3004 add DBUS_TYPE_OBJECT_PATH
3006 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
3007 dbus/dbus-objectid.[hc]: remove these, we are moving to
3008 path-based object IDs
3010 2003-08-25 Havoc Pennington <hp@pobox.com>
3012 Just noticed that dbus_message_test is hosed, I wonder when I
3013 broke that. I thought make check was passing earlier...
3015 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
3016 container tree, will replace most of dbus-object-registry
3018 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
3021 2003-08-19 Havoc Pennington <hp@pobox.com>
3023 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
3024 (dbus_message_is_error): fix this function
3026 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
3029 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
3030 reflect clarified man page
3031 (bus_client_policy_check_can_send): ditto
3033 * bus/session.conf.in: fixup
3035 * bus/system.conf.in: fixup
3037 2003-08-18 Havoc Pennington <hp@redhat.com>
3039 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
3041 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3042 dumb bug created earlier (wrong order of args to
3043 decode_header_data())
3045 * tools/dbus-send.c: port
3047 * tools/dbus-print-message.c (print_message): port
3049 * test/data/*messages: port all messages over
3051 * dbus/dbus-message-builder.c: support including
3054 * bus/driver.c: port over
3056 * bus/dispatch.c: port over to new stuff
3058 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3059 rename disconnect signal to "Disconnected"
3061 2003-08-17 Havoc Pennington <hp@pobox.com>
3063 This doesn't compile yet, but syncing up so I can hack on it from
3064 work. What are branches for if not broken code? ;-)
3066 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
3067 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
3068 DBUS_HEADER_FIELD_ERROR_NAME
3070 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
3071 for the interface+member pairs
3072 (string_hash): change to use g_str_hash algorithm
3073 (find_direct_function, find_string_function): refactor these to
3076 * dbus/dbus-message.c: port all of this over to support
3077 interface/member fields instead of name field
3079 * dbus/dbus-object-registry.c: port over
3081 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
3082 from _dbus_string_validate_name
3084 * bus/dbus-daemon-1.1: change file format for the
3085 <deny>/<allow> stuff to match new message naming scheme
3087 * bus/policy.c: port over
3089 * bus/config-parser.c: parse new format
3091 2003-08-16 Havoc Pennington <hp@pobox.com>
3093 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
3096 * glib/dbus-gproxy.c: some hacking
3098 2003-08-15 Havoc Pennington <hp@redhat.com>
3100 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
3102 * dbus/dbus-connection.c
3103 (dbus_connection_send_with_reply_and_block): factor out internals;
3104 change to convert any error replies to DBusError instead of
3105 returning them as a message
3107 2003-08-15 Havoc Pennington <hp@pobox.com>
3109 * dbus/dbus-connection.c,
3110 dbus/dbus-pending-call.c: Finish the pending call stuff
3112 2003-08-14 Havoc Pennington <hp@redhat.com>
3114 * dbus/dbus-pending-call.c: start on new object that will replace
3115 DBusMessageHandler and ReplyHandlerData for tracking outstanding
3118 * dbus/dbus-gproxy.c: start on proxy object used to communicate
3119 with remote interfaces
3121 * dbus/dbus-gidl.c: do the boring boilerplate in here
3123 2003-08-12 Havoc Pennington <hp@pobox.com>
3125 * bus/dispatch.c (bus_dispatch): make this return proper
3126 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
3128 * dbus/dbus-errors.c (dbus_set_error): use
3129 _dbus_string_append_printf_valist
3131 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
3132 (_dbus_string_append_printf): new
3134 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
3137 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
3138 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
3139 message is unhandled.
3141 2003-08-11 Havoc Pennington <hp@pobox.com>
3143 * bus/test.c (client_disconnect_handler): change to return
3144 HANDLED (would have been REMOVE_MESSAGE)
3146 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
3147 HANDLED/NOT_YET_HANDLED instead of
3148 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
3151 2003-08-10 Havoc Pennington <hp@pobox.com>
3153 * tools/dbus-send.c (main): add --type argument, for now
3154 supporting only method_call and signal types.
3156 * tools/dbus-print-message.c: print message type
3158 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3159 init connection->objects
3161 * doc/dbus-specification.sgml: fix sgml
3163 * bus/*.c: port over to object-instance API changes
3165 * test/test-service.c: ditto
3167 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
3168 name, we will have to fix up the rest of the code to also handle
3170 (dbus_message_new): generic message-creation call
3171 (set_string_field): allow appending name field
3173 2003-08-06 Havoc Pennington <hp@pobox.com>
3175 * dbus/dbus-object-registry.c: implement signal connection
3178 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
3180 * dbus/dbus-internals.c (_dbus_memdup): new function
3182 2003-08-02 Havoc Pennington <hp@pobox.com>
3184 * dbus/dbus-message.c (dbus_message_get_no_reply)
3185 (dbus_message_set_no_reply): add these and remove
3186 set_is_error/get_is_error
3188 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
3189 remove the ERROR flag, since there's now an ERROR type
3191 2003-08-01 Havoc Pennington <hp@pobox.com>
3193 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
3196 * dbus/dbus-message.c (dbus_message_get_type): new function
3198 * doc/dbus-specification.sgml: add "type" byte to messages
3200 2003-08-01 Havoc Pennington <hp@pobox.com>
3202 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
3203 a message type enum to distinguish kinds of message
3204 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
3205 that need not be replied to
3207 2003-08-01 Havoc Pennington <hp@pobox.com>
3209 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
3210 (unpack_8_octets): fix no-64-bit-int bug
3212 * dbus/dbus-object-registry.c (validate_id): validate the
3213 connection ID bits, not just the instance ID.
3215 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
3216 the connection-global 33 bits of the object ID
3218 * dbus/dbus-object-registry.c (info_from_entry): fill in
3219 object ID in the new way
3221 * dbus/dbus-objectid.h: rather than high/low bits, specifically
3222 define server/client/instance bits.
3224 2003-07-30 Havoc Pennington <hp@pobox.com>
3226 * dbus/dbus-connection.c (dbus_connection_register_object): fix
3229 2003-07-13 Havoc Pennington <hp@pobox.com>
3231 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
3232 fields to DBusObjectVTable and DBusObjectInfo
3234 2003-07-12 Havoc Pennington <hp@pobox.com>
3236 * dbus/dbus-object-registry.c: implement unit test,
3237 fix bugs discovered in process
3239 * dbus/dbus-connection.c: remove handler_table and
3240 register_handler(), add DBusObjectRegistry usage
3242 * dbus/dbus-objectid.c (dbus_object_id_is_null)
3243 (dbus_object_id_set_null): new functions
3245 2003-07-08 Havoc Pennington <hp@pobox.com>
3247 * dbus/dbus-object.c: implement some of this
3249 * dbus/dbus-object-registry.c
3250 (_dbus_object_registry_add_and_unlock): fill in the object_id out
3252 (_dbus_object_registry_new): handle OOM
3254 2003-07-08 Havoc Pennington <hp@pobox.com>
3256 * dbus/dbus-object.h: sketch out an API for registering objects
3257 with a connection, that allows us to use as little as 24 bytes
3258 per object and lets application code represent an object in
3259 any conceivable way.
3261 * dbus/dbus-object-registry.c: implement the hard bits of the
3262 DBusConnection aspect of object API. Not yet wired up.
3264 2003-07-06 Havoc Pennington <hp@pobox.com>
3266 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
3267 (_dbus_marshal_object_id): new
3268 (_dbus_demarshal_object_id): new
3269 (_dbus_marshal_get_arg_end_pos): support object ID type, and
3270 consolidate identical switch cases. Don't conditionalize handling
3271 of DBUS_TYPE_UINT64, need to handle the type always.
3272 (_dbus_marshal_validate_arg): consolidate identical cases, and
3273 handle DBUS_TYPE_OBJECT_ID
3275 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
3277 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
3279 2003-09-28 Havoc Pennington <hp@pobox.com>
3283 2003-09-28 Havoc Pennington <hp@pobox.com>
3285 * doc/Makefile.am (dbus-specification.html): testing a funky hack
3286 to work with Debian db2html
3288 2003-09-28 Havoc Pennington <hp@pobox.com>
3290 * configure.in: 0.13
3292 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
3293 stylesheet-images for benefit of Debian
3295 Change back to using filesystem-linked sockets for the system
3296 bus, so only root can create the default system bus address.
3298 * bus/system.conf.in: change to use
3299 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3301 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
3304 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
3305 here, and AC_DEFINE DBUS_SYSTEM_PATH
3307 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3310 * doc/busconfig.dtd:
3313 2003-08-09 Anders Carlsson <andersca@codefactory.se>
3315 * doc/dbus-specification.sgml:
3316 Add activation reply values.
3318 2003-08-05 Havoc Pennington <hp@redhat.com>
3320 * configure.in: 0.12
3322 2003-08-05 Anders Carlsson <andersca@codefactory.se>
3324 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
3325 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
3326 (add_watch), (remove_watch), (create_source):
3327 Refcount fds, fixes some reentrancy issues.
3329 2003-07-30 Havoc Pennington <hp@redhat.com>
3331 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
3332 bus address to be abstract if we have abstract sockets
3336 2003-07-28 Havoc Pennington <hp@redhat.com>
3338 * bus/messagebus.in: fix to avoid processname/servicename
3339 confusion, from Michael Kearey
3340 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
3342 2003-07-23 Havoc Pennington <hp@pobox.com>
3344 * dbus/dbus-message.c (dbus_message_iter_get_named):
3345 fix from Andy Hanton to remove broken "+1"
3347 2003-07-16 Havoc Pennington <hp@pobox.com>
3349 * tools/dbus-launch.c (babysit): close stdout/stderr in the
3350 babysitter process, as suggested by Thomas Leonard, so
3351 an "eval `dbus-launch --exit-with-session`" will actually
3354 2003-07-16 Havoc Pennington <hp@pobox.com>
3356 * configure.in: print out EXPANDED_* variables in the summary at
3357 the end; clean up the code that computes EXPANDED_ variables and
3358 get the ones using exec_prefix right. Should make things work
3359 when you build without --prefix
3361 2003-06-29 Havoc Pennington <hp@pobox.com>
3363 * mono/Test.cs (class Test): fire up a main loop and run it
3365 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
3366 done once, the app has to do it
3368 2003-06-26 Havoc Pennington <hp@pobox.com>
3370 * mono/Connection.cs: set up connection with the glib main loop
3372 2003-07-01 Havoc Pennington <hp@redhat.com>
3374 * doc/dbus-specification.sgml: clarify the format of a type code,
3375 change suggested by Jim Blandy
3377 2003-06-29 Miloslav Trmac <mitr@volny.cz>
3380 * tools/Makefile.am: Don't assume srcdir == builddir.
3382 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
3383 the allocated block.
3384 (_dbus_memory_test): New function.
3385 * dbus/dbus-test.h: Add _dbus_memory_test ().
3386 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
3388 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
3390 (dbus_message_new): Remove obsolete @todo.
3392 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
3393 (_dbus_marshal_set_uint64): Fix comment.
3395 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
3396 hardcode FIELD_REPLY_SERIAL.
3398 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
3399 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
3401 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
3402 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
3404 2003-06-24 Havoc Pennington <hp@pobox.com>
3406 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
3408 2003-06-23 Anders Carlsson <andersca@codefactory.se>
3414 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
3415 * gcj/org/.cvsignore:
3416 * gcj/org/Makefile.am:
3417 * gcj/org/freedesktop/.cvsignore:
3418 * gcj/org/freedesktop/Makefile.am:
3419 * gcj/org/freedesktop/dbus/.cvsignore:
3420 * gcj/org/freedesktop/dbus/Makefile.am:
3421 * gcj/org/freedesktop/dbus/Message.java: (Message),
3423 * gcj/org/freedesktop/dbus/natMessage.cc:
3424 Fix the build system.
3426 2003-06-22 Havoc Pennington <hp@pobox.com>
3428 * mono/Connection.cs: add more bindings
3430 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
3433 2003-06-22 Havoc Pennington <hp@pobox.com>
3435 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
3436 Start wrapping more stuff.
3438 2003-06-22 Havoc Pennington <hp@pobox.com>
3440 * mono/Message.cs: implement Message.Wrap() that ensures we only
3441 have a single C# wrapper per DBusMessage, assuming it works which
3442 it probably doesn't.
3444 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
3445 (dbus_message_free_data_slot): new
3446 (dbus_message_set_data): new
3447 (dbus_message_get_data): new
3449 2003-06-22 Havoc Pennington <hp@pobox.com>
3451 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
3452 (_dbus_data_slot_allocator_alloc): rework these to keep a
3453 reference count on each slot and automatically manage a global
3454 slot ID variable passed in by address
3456 * bus/bus.c: convert to new dataslot API
3458 * dbus/dbus-bus.c: convert to new dataslot API
3460 * dbus/dbus-connection.c: convert to new dataslot API
3462 * dbus/dbus-server.c: convert to new dataslot API
3464 * glib/dbus-gmain.c: ditto
3468 * bus/connection.c: ditto
3470 2003-06-22 Anders Carlsson <andersca@codefactory.se>
3472 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
3473 after the gcj checks so that the correct configuration tags
3474 will be added to libtool.
3476 * dbus-glib-1.pc.in: No need to specify any includes since
3477 dbus-1.pc.in has those.
3479 2003-06-22 Havoc Pennington <hp@pobox.com>
3481 * mono/*, gcj/*, configure.in, Makefile.am:
3482 Check in makefiles and subdirs for mono and gcj bindings.
3483 Neither binding actually exists, just trying to get through
3484 all the build and other boring bits.
3486 2003-06-21 Philip Blundell <philb@gnu.org>
3488 * tools/dbus-monitor.1: Updated.
3490 * tools/dbus-send.1: Likewise.
3492 2003-06-20 Anders Carlsson <andersca@codefactory.se>
3494 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
3495 for hangup and error after checking read so we won't discard
3496 pending data if both hangup and read are set.
3498 2003-06-19 Philip Blundell <philb@gnu.org>
3500 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
3502 * tools/dbus-send.c: Accept both --system and --session.
3504 * tools/dbus-monitor.c: Same here.
3506 2003-06-19 Anders Carlsson <andersca@codefactory.se>
3508 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
3509 from C++ (Patch by Miloslav Trmac).
3511 2003-06-15 Joe Shaw <joe@assbarn.com>
3513 * configure.in: Check for socklen_t.
3515 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
3517 * test/test-segfault.c: Add #include <sys/time.h>
3519 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
3520 dbus-launch needs it.
3522 2003-06-09 Havoc Pennington <hp@redhat.com>
3524 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
3525 SUN_LEN, it breaks abstract socket usage
3527 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
3530 2003-06-04 Havoc Pennington <hp@pobox.com>
3532 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
3533 using unix:abstract=/foo, and when listening in a tmpdir
3534 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
3536 * dbus/dbus-transport.c (_dbus_transport_open): support
3539 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3540 support abstract sockets
3542 * dbus/dbus-transport-unix.c
3543 (_dbus_transport_new_for_domain_socket): support abstract sockets
3545 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
3546 toggle as an argument, implement abstract namespace support
3547 (_dbus_listen_unix_socket): ditto
3549 * configure.in: add --enable-abstract-sockets and implement
3550 a configure check for autodetection of the right value.
3552 2003-06-01 Havoc Pennington <hp@pobox.com>
3554 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
3555 in /tmp (though on Linux this will end up being useless,
3556 when we add abstract namespace support)
3558 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
3561 2003-05-28 Colin Walters <walters@verbum.org>
3563 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
3565 2003-05-18 Anders Carlsson <andersca@codefactory.se>
3567 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
3569 2003-05-17 Colin Walters <walters@gnu.org>
3571 * tools/dbus-send.c: Don't exit with an error code if --help was
3572 passed. Default to using the session bus instead of the system
3575 * tools/dbus-launch.c: Ditto.
3577 * tools/dbus-monitor.c: Ditto.
3579 * tools/dbus-send.1: Update with new arguments.
3581 * tools/dbus-launch.c: Emit code to export variables. New
3582 arguments -s and -c to specify shell syntax, and a bit of code to
3583 autodetect syntax. Also, allow specifying a program to run.
3585 * tools/dbus-launch.1: Update with new arguments.
3587 * tools/dbus-send.1: Ditto.
3589 * tools/dbus-monitor.1: Ditto.
3591 2003-05-17 Havoc Pennington <hp@pobox.com>
3593 * bus/config-parser.c (merge_included): merge in policies from
3594 child configuration file.
3596 * bus/policy.c (bus_policy_merge): function to merge two policies
3599 2003-05-16 Havoc Pennington <hp@redhat.com>
3601 * dbus/dbus-connection.c: disable verbose lock spew
3603 * tools/dbus-send.c: add --print-reply command line option
3605 * tools/dbus-print-message.h (print_message): new util function
3606 shared by dbus-send and dbus-monitor
3608 * tools/dbus-monitor.c (handler_func): exit on disconnect
3610 * dbus/dbus-transport-unix.c (do_reading): if the transport is
3611 disconnected, don't try to use the read_watch
3613 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
3614 so we can find this bug more easily
3616 2003-05-16 Havoc Pennington <hp@redhat.com>
3618 * bus/policy.c (free_rule_list_func): avoid a crash when passed
3619 NULL as DBusHashTable is annoyingly likely to do.
3621 2003-05-16 Colin Walters <walters@verbum.org>
3623 * tools/dbus-monitor.c: Add --session argument and usage()
3626 * tools/dbus-monitor.1: Update with new --session arg.
3628 * bus/Makefile.am (install-data-hook): Create
3629 $(libdir)/dbus-1.0/services so that the session bus is happy.
3631 2003-05-15 Havoc Pennington <hp@redhat.com>
3633 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
3634 on non-x86. ifdef's are evil.
3636 2003-05-15 Havoc Pennington <hp@redhat.com>
3638 * configure.in: 0.11
3642 * bus/Makefile.am (initddir): apparently we are supposed to put
3643 init scripts in /etc/rc.d/init.d not /etc/init.d
3645 * bus/Makefile.am: remove the "you must --enable-tests to make
3646 check" as it broke distcheck
3648 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
3650 2003-05-13 James Willcox <jwillcox@gnome.org>
3653 * bus/activation.c: (bus_activation_service_created),
3654 (bus_activation_activate_service):
3655 * bus/driver.c: (bus_driver_send_service_deleted),
3656 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3657 (bus_driver_send_service_acquired),
3658 (bus_driver_send_welcome_message),
3659 (bus_driver_handle_list_services):
3660 * bus/session.conf.in:
3661 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
3662 (dbus_bus_service_exists), (dbus_bus_activate_service):
3665 Add some convenience API which lets you activate a service, and did a
3666 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
3667 and dbus_message_get_args()
3669 2003-05-11 Havoc Pennington <hp@pobox.com>
3671 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
3672 calling _dbus_marshal_validate_arg() for every byte in a byte
3675 * dbus/dbus-message-handler.c: use atomic reference counting to
3676 reduce number of locks slightly; the global lock in here sucks
3678 * dbus/dbus-connection.c
3679 (_dbus_connection_update_dispatch_status_and_unlock): variant of
3680 update_dispatch_status that can be called with lock held; then use
3681 in a couple places to reduce locking/unlocking
3682 (dbus_connection_send): hold the lock over the whole function
3683 instead of acquiring it twice.
3685 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
3687 * bus/connection.c (bus_connections_setup_connection): fix access
3688 to already-freed memory.
3690 * dbus/dbus-connection.c: keep a little cache of linked list
3691 nodes, to avoid using the global linked list alloc lock in the
3692 normal send-message case. Instead we just use the connection lock
3693 that we already have to take.
3695 * dbus/dbus-list.c (_dbus_list_find_last): new function
3697 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
3698 change to use a struct for the atomic type; fix docs,
3699 they return value before increment, not after increment.
3701 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
3702 (_dbus_string_append_8_aligned): new functions to try to
3703 microoptimize this operation.
3704 (reallocate_for_length): break this out of set_length(), to
3705 improve profile info, and also so we can consider inlining the
3708 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
3709 strings with some preallocation, cuts down on our calls to realloc
3710 a fair bit. Though if we can get the "move entire string to empty
3711 string" optimization below to kick in here, it would be better.
3713 * dbus/dbus-string.c (_dbus_string_move): just call
3714 _dbus_string_move_len
3715 (_dbus_string_move_len): add a special case for moving
3716 an entire string into an empty string; we can just
3717 swap the string data instead of doing any reallocs.
3718 (_dbus_string_init_preallocated): new function
3720 2003-05-11 Havoc Pennington <hp@pobox.com>
3722 Write a "test-profile" that does echo client-server with threads;
3723 profile reveals lock contention, memcpy/realloc of buffers, and
3724 UTF-8 validation as hot spots. 20% of lock contention eliminated
3725 with dbus_atomic_inc/dec implementation on x86. Much remaining
3726 contention is global mempool locks for GList and DBusList.
3728 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
3731 * dbus/dbus-connection.c (struct DBusConnection): use
3732 dbus_atomic_t for the reference count
3734 * dbus/dbus-message.c (struct DBusMessage): declare
3735 dbus_atomic_t values as volatile
3737 * configure.in: code to detect ability to use atomic integer
3738 operations in assembly, from GLib patch
3740 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
3741 time, tired of it being wrong in threads and forked processes
3743 * glib/test-profile.c: a little program to bounce messages back
3744 and forth between threads and eat CPU
3746 * dbus/dbus-connection.c: add debug spew macros for debugging
3747 thread locks; include config.h at top; fix deadlock in
3748 dbus_connection_flush()
3750 2003-05-08 Havoc Pennington <hp@pobox.com>
3752 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
3753 data from getting written, and there wasn't a good reason to
3756 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
3757 dbus_verbose lines in test coverage
3758 (main): add list of functions sorted by # of untested blocks
3759 to the coverage report
3761 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3763 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3765 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3766 extend test coverage
3768 * test/data/auth/cancel.auth-script: test canceling an
3771 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3772 aren't used. in CVS history if we end up needing them.
3774 2003-05-04 Havoc Pennington <hp@pobox.com>
3776 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3779 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3780 function, which assumed length was in # of strings, not bytes
3782 * dbus/dbus-message.c (_dbus_message_test): add tests for some
3785 * dbus/dbus-connection.c
3786 (_dbus_connection_queue_received_message): disable function for
3787 now, we are only using it in test mode
3789 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3790 remove a mistaken FIXME
3792 2003-05-04 Havoc Pennington <hp@pobox.com>
3794 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3795 unlock mutex on successful return, patch from Anders Gustafsson
3797 2003-05-04 Havoc Pennington <hp@pobox.com>
3799 * dbus-glib-1.pc.in (Requires): fix dependencies, from
3802 2003-05-04 Havoc Pennington <hp@pobox.com>
3804 * tools/dbus-launch.c: implement
3806 * bus/main.c (main), bus/bus.c (bus_context_new):
3807 implement --print-pid and --fork
3809 2003-05-03 Havoc Pennington <hp@redhat.com>
3811 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3812 the address had no value, and add to test suite. Fix and
3813 regression test from Miloslav Trmac
3815 2003-05-03 Havoc Pennington <hp@pobox.com>
3817 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3818 watch is invalid when handled
3820 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3821 dbus-launch utility to launch the bus from a shell script. Didn't
3822 actually implement dbus-launch yet, it's just a placeholder still.
3824 2003-05-03 Havoc Pennington <hp@pobox.com>
3826 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3827 daemon; also documents daemon config file, so replaces
3828 doc/config-file.txt. Corrected some stuff from config-file.txt in
3829 the process of moving it.
3831 2003-05-03 Havoc Pennington <hp@pobox.com>
3833 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3836 2003-05-03 Colin Walters <walters@verbum.org>
3838 * dbus/dbus-sysdeps.c (fill_user_info): Test against
3839 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3841 * Makefile.am: Update to use new .pc versioning scheme.
3843 2003-05-02 Havoc Pennington <hp@redhat.com>
3845 * bus/system.conf.in: allow send/receive to/from message bus
3848 2003-04-30 Havoc Pennington <hp@redhat.com>
3850 * configure.in: print a note when building with unit tests and
3853 2003-04-30 Havoc Pennington <hp@redhat.com>
3855 * Makefile.am: add a check-local that complains if you didn't
3856 configure with --enable-tests
3858 2003-04-29 Havoc Pennington <hp@redhat.com>
3860 * glib/dbus-gmain.c: docs cleanups
3862 * dbus/dbus-types.h: add docs on int64 types
3864 * dbus/dbus-memory.c: fix docs to avoid putting private API in
3865 public API docs section
3867 2003-04-29 Havoc Pennington <hp@redhat.com>
3869 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3870 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3871 parallel install API version, not with the D-BUS package version.
3873 * HACKING: move some of README over here
3875 * README: updates, and document API/ABI policy
3877 * configure.in: reindentation
3879 2003-04-29 Havoc Pennington <hp@redhat.com>
3881 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3882 to use this library" to be sure people have the right
3885 2003-04-28 Havoc Pennington <hp@redhat.com>
3887 * configure.in: add --enable-docs which by default is auto yes if
3888 doxygen and db2html found, no otherwise; but can be forced on/off
3890 * doc/Makefile.am: conditionalize whether to build docs on
3893 2003-04-28 Havoc Pennington <hp@redhat.com>
3895 * configure.in: 0.10
3899 * bus/system.conf.in: add <includedir>system.d</includedir>
3901 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3902 username was provided but not uid
3904 * bus/config-parser.c (struct BusConfigParser): keep track of
3905 whether the parser is toplevel or was included; change some
3906 of the error handling if it's included.
3908 2003-04-27 Havoc Pennington <hp@pobox.com>
3912 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3913 report correct status if we finish processing authentication
3914 inside this function.
3916 * bus/activation.c (try_send_activation_failure): use
3917 bus_transaction_send_error_reply
3919 * bus/connection.c (bus_connection_get_groups): return an error
3920 explaining the problem
3922 * bus/bus.c (bus_context_check_security_policy): implement
3923 restriction here that inactive connections can only send the
3924 hello message. Also, allow bus driver to send anything to
3927 * bus/connection.c (bus_connection_complete): create the
3928 BusClientPolicy here instead of on-demand.
3929 (bus_connection_get_policy): don't return an error
3931 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3932 sender field in message being replied to
3934 * bus/bus.c (bus_context_check_security_policy): fix silly typo
3935 causing it to return FALSE always
3937 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3938 we checked sender rather than destination
3940 2003-04-25 Havoc Pennington <hp@redhat.com>
3942 test suite is slightly hosed at the moment, will fix soon
3944 * bus/connection.c (bus_connections_expire_incomplete): fix to
3945 properly disable the timeout when required
3946 (bus_connection_set_name): check whether we can remove incomplete
3947 connections timeout after we complete each connection.
3949 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3950 probably still broken.
3952 * bus/services.c (bus_registry_acquire_service): implement max
3953 number of services owned, and honor allow/deny rules on which
3954 services a connection can own.
3956 * bus/connection.c (bus_connection_get_policy): report errors here
3958 * bus/activation.c: implement limit on number of pending
3961 2003-04-25 Havoc Pennington <hp@redhat.com>
3963 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3964 where we used >= 0 instead of != DBUS_UID_UNSET.
3966 2003-04-25 Havoc Pennington <hp@redhat.com>
3968 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3969 were toggled without add/remove, fix from Anders Gustafsson
3971 2003-04-24 Havoc Pennington <hp@redhat.com>
3973 * test/data/valid-config-files/basic.conf: add <limit> tags to
3976 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3977 <limit> tag in configuration file.
3979 2003-04-24 Havoc Pennington <hp@redhat.com>
3981 * bus/dispatch.c: somehow missed some name_is
3983 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3984 (_dbus_timeout_set_interval): new
3986 * bus/connection.c (bus_connections_setup_connection): record time
3987 when each connection is first set up, and expire them after the
3988 auth timeout passes.
3990 2003-04-24 Havoc Pennington <hp@redhat.com>
3992 * dbus/dbus-message.c (dbus_message_name_is): rename
3993 (dbus_message_service_is): rename
3994 (dbus_message_sender_is): rename
3995 (dbus_message_get_service): rename
3997 2003-04-24 Havoc Pennington <hp@redhat.com>
3999 * configure.in: add --enable-checks
4001 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
4003 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
4004 to use thread locks.
4005 (_dbus_connection_handler_destroyed_locked): move some private
4006 functions into proper docs group
4008 * dbus/dbus-internals.h: add _dbus_return_if_fail,
4009 _dbus_return_val_if_fail
4011 Throughout: use dbus_return_if_fail
4013 2003-04-23 James Willcox <jwillcox@gnome.org>
4016 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
4017 (dbus_connection_setup_with_g_main),
4018 (dbus_server_setup_with_g_main):
4019 * glib/test-dbus-glib.c: (main):
4020 * glib/test-thread-client.c: (main):
4021 * glib/test-thread-server.c: (new_connection_callback), (main):
4022 * tools/dbus-monitor.c: (main):
4024 Added a GMainContext argument to dbus_connection_setup_with_g_main()
4025 and dbus_server_setup_with_g_main().
4027 2003-04-20 Havoc Pennington <hp@pobox.com>
4029 * doc/dbus-specification.sgml: document the restrictions on
4030 message and service names
4032 2003-04-22 Havoc Pennington <hp@redhat.com>
4034 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4035 support, and do some code cleanups to share more code and
4036 speed up array marshal/demarshal.
4038 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
4040 * configure.in: generate dbus-arch-deps.h
4042 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
4045 2003-04-22 Havoc Pennington <hp@redhat.com>
4047 * test/data/valid-messages/opposite-endian.message: fix test
4048 to use proper type for rply field
4050 * test/data/invalid-messages: add tests for below validation
4052 * dbus/dbus-message.c (decode_header_data): validate field types,
4053 and validate that named fields are valid names
4054 (decode_name_field): consider messages in the
4055 org.freedesktop.Local. namespace to be invalid.
4057 * dbus/dbus-string.c (_dbus_string_validate_name): new
4059 2003-04-19 Havoc Pennington <hp@pobox.com>
4061 * bus/driver.c (bus_driver_handle_hello): check limits and
4062 return an error if they are exceeded.
4064 * bus/connection.c: maintain separate lists of active and inactive
4065 connections, and a count of each. Maintain count of completed
4066 connections per user. Implement code to check connection limits.
4068 * dbus/dbus-list.c (_dbus_list_unlink): export
4070 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
4071 number of bytes in the message queue for a connection
4073 2003-04-18 Havoc Pennington <hp@pobox.com>
4075 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
4077 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
4080 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
4081 on realloc be sure to update the pointer in the keyring
4083 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
4084 offset to avoid writing to unallocated memory
4086 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
4087 try the next mechanism, so we properly handle OOM
4089 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
4091 (_dbus_keyring_new): fix OOM bug
4092 (_dbus_keyring_new_homedir): always set error; impose a maximum
4093 number of keys we'll load from the file, mostly to speed up the
4094 test suite and make its OOM checks more useful, but also for
4097 * dbus/dbus-auth.c (process_error_server): reject authentication
4098 if we get an error from the client
4099 (process_cancel): on cancel, send REJECTED, per the spec
4100 (process_error_client): send CANCEL if we get an error from the
4103 2003-04-18 Havoc Pennington <hp@pobox.com>
4105 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
4108 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
4111 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
4112 about DBUS_TEST_HOMEDIR once
4114 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
4117 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
4118 config file so we test the right thing
4120 Throughout: assorted docs improvements
4122 2003-04-18 Havoc Pennington <hp@pobox.com>
4124 * glib/dbus-gmain.c: adapt to watch changes
4126 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
4128 * dbus/dbus-server.h: remove dbus_server_handle_watch
4130 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
4132 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
4133 like DBusTimeout, so we don't need dbus_connection_handle_watch
4136 2003-04-17 Havoc Pennington <hp@redhat.com>
4138 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
4139 database usage so it all goes via the DBusUserDatabase cache.
4141 2003-04-17 Havoc Pennington <hp@redhat.com>
4143 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
4144 there was an OOM watch we skipped, we always return TRUE so we
4145 iterate again to have a look at it again. Fixes test suite hang.
4146 Code rearrangement also lets us lose some memset and only iterate
4147 over callbacks once.
4149 * bus/driver.c (bus_driver_handle_message): sense of test for
4152 2003-04-16 Havoc Pennington <hp@pobox.com>
4154 * doc/dbus-specification.sgml: make spec say serials are unsigned
4156 * dbus/dbus-message.h: change message serials to unsigned
4158 * dbus/dbus-connection.c: adapt to message serials being unsigned
4160 2003-04-15 Havoc Pennington <hp@pobox.com>
4162 * bus/bus.c: create and keep around a shared DBusUserDatabase
4165 * bus/connection.c (bus_connection_get_groups): don't cache
4166 groups for user in the connection object, since user database
4167 object now does that.
4169 2003-04-16 Havoc Pennington <hp@redhat.com>
4171 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
4172 list of size counters
4173 (_dbus_message_loader_putback_message_link): put back a popped link
4175 * dbus/dbus-connection.c
4176 (dbus_connection_set_max_live_messages_size): rename
4178 (dbus_connection_get_outgoing_size): get size of outgoing
4180 (_dbus_connection_set_connection_counter): remove this cruft
4182 2003-04-14 Havoc Pennington <hp@redhat.com>
4184 * dbus/dbus-userdb.c: user database abstraction, mostly to get
4185 caching, but at some point we might want to be able to use a
4188 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
4189 SHA1 conf file to test the sha1 auth mechanism, since the regular
4190 test always uses EXTERNAL when available.
4193 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
4194 add conf file that requires use of sha1 auth
4196 2003-04-13 Havoc Pennington <hp@pobox.com>
4198 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
4199 from Philip Blundell to send messages and monitor them.
4201 2003-04-13 Havoc Pennington <hp@pobox.com>
4203 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
4206 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
4209 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4210 fix to only recover unused bytes if we're already authenticated
4211 (_dbus_transport_get_is_authenticated): fix to still mark us
4212 authenticated if there are unused bytes.
4214 * bus/dispatch.c: implement security policy checking
4216 * bus/connection.c (bus_transaction_send_from_driver): new
4218 * bus/bus.c (bus_context_check_security_policy): new
4220 * bus/dispatch.c (send_service_nonexistent_error): delete this,
4221 now we just set the DBusError and it gets converted to an error
4224 * bus/connection.c (allow_user_function): enable code using actual
4225 data from the config file
4227 * bus/policy.c (list_allows_user): handle wildcard rules for
4228 user/group connection perms
4230 2003-04-13 Havoc Pennington <hp@pobox.com>
4232 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
4234 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
4236 * bus/policy.c (bus_policy_append_mandatory_rule)
4237 (bus_policy_append_default_rule, bus_policy_append_user_rule)
4238 (bus_policy_append_group_rule): new functions
4240 2003-04-12 Havoc Pennington <hp@pobox.com>
4242 * bus/config-parser.c (bus_config_parser_new): fix a memleak
4244 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
4245 the pid/gid/uid, just for paranoia.
4247 * test/break-loader.c (randomly_do_n_things): find a byte
4248 containing a type code, and randomly change it to a different
4251 2003-04-12 Havoc Pennington <hp@pobox.com>
4253 * bus/policy.h: change BusPolicy to be the thing from the config
4254 file, and rename old BusPolicy to BusClientPolicy
4256 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
4257 match change in how policy works
4259 * dbus/dbus-internals.h: mark assert_not_reached as
4260 __attribute((noreturn))__
4262 2003-04-11 Havoc Pennington <hp@redhat.com>
4264 * doc/dbus-specification.sgml: fix a spot with the wrong name for
4265 the broadcast service. Use boolean return for ServiceExists.
4267 2003-04-11 Havoc Pennington <hp@redhat.com>
4269 * configure.in: add another directory to look for qt in.
4271 2003-04-11 Havoc Pennington <hp@redhat.com>
4273 * AUTHORS: add Colin Walters
4275 2003-04-11 Havoc Pennington <hp@redhat.com>
4281 2003-04-11 Havoc Pennington <hp@redhat.com>
4283 * bus/messagebus.in: remove pid file when stopping the
4284 message bus, since the bus won't have privileges to remove it
4287 2003-04-11 Havoc Pennington <hp@redhat.com>
4289 * bus/bus.c (bus_context_new): move credentials change after
4292 2003-04-11 Havoc Pennington <hp@pobox.com>
4294 * test/decode-gcov.c: add "below average functions" to the
4295 coverage report, and change how some of the code works.
4297 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
4298 not in the coverage stats.
4300 * test/test-service.c (main): use _dbus_verbose not fprintf in a
4301 couple places so running the test suite doesn't result in megaspam.
4303 2003-04-11 Havoc Pennington <hp@pobox.com>
4305 * bus/dispatch.c (check_existent_service_activation): accept a no
4306 memory error in a place we didn't before
4308 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
4309 in case the first one failed," since the test suite is less
4312 2003-04-10 Havoc Pennington <hp@pobox.com>
4314 * bus/dispatch.c (check_segfault_service_activation): add test
4315 for launching an executable that just crashes.
4317 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
4318 don't leave a million cores. We'll see how portable this is.
4320 2003-04-10 Havoc Pennington <hp@pobox.com>
4322 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
4323 the possible parent failures before we fork, so that we don't
4324 fail to create a babysitter after creating the child.
4326 * bus/activation.c (bus_activation_activate_service): kill child
4327 if we don't successfully complete the activation.
4329 2003-04-10 Havoc Pennington <hp@redhat.com>
4331 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
4332 the connection if it's disconnected
4334 * bus/activation.c (bus_activation_service_created): use new
4335 transaction features to roll back removal of pending activation if
4336 we don't successfully create the service after all. Don't remove
4337 pending activation if the function fails.
4339 * dbus/dbus-list.c (_dbus_list_insert_before_link)
4340 (_dbus_list_insert_after_link): new code to facilitate
4343 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
4344 new functionality, so we can preallocate the ability to insert
4347 * bus/connection.c (bus_transaction_add_cancel_hook): new function
4348 allowing us to put custom hooks in a transaction to be used for
4349 cancelling said transaction
4351 * doc/dbus-specification.sgml: add some discussion of secondary
4352 service owners, and disallow zero-length service names
4354 * bus/services.c (bus_registry_acquire_service): new function,
4355 splits out part of bus_driver_handle_acquire_service() and fixes
4356 a bug where we didn't remove the service doing the acquiring
4357 from the secondary queue if we failed to remove the current owner
4358 from the front of the queue.
4360 2003-04-10 Alexander Larsson <alexl@redhat.com>
4362 * doc/dbus-specification.sgml:
4363 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
4365 2003-04-10 Alexander Larsson <alexl@redhat.com>
4370 Added files to cvsignore
4372 * dbus/dbus-message.h:
4373 * dbus/dbus-message.c: (dbus_message_iter_get_named):
4374 Make get_named() take two out argument and return a boolean.
4375 (dbus_message_iter_get_args_valist):
4376 Update usage of get_named().
4377 (dbus_message_iter_append_byte):
4379 (dbus_message_iter_append_named)
4381 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
4384 2003-04-10 Alexander Larsson <alexl@redhat.com>
4386 * dbus/dbus-marshal.[ch]:
4387 Add array_type_pos argument to _dbus_marshal_validate_arg.
4388 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
4390 * dbus/dbus-message.[ch]:
4391 Multi-dimensional arrays have full type specification in the
4392 outermost array. Iter code re-arranged to handle this.
4393 Added some more iter tests.
4395 * doc/dbus-specification.sgml:
4398 Update new array encoding description.
4399 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
4401 * test/data/invalid-messages/array-with-mixed-types.message:
4402 * test/data/valid-messages/array-of-array-of-uint32.message:
4403 Change to the new array format.
4405 * test/data/invalid-messages/too-short-dict.message:
4408 * test/data/valid-messages/recursive-types.message:
4409 Fix up and extend test.
4411 2003-04-10 Havoc Pennington <hp@pobox.com>
4413 * bus/dispatch.c: lots of fixes
4415 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
4416 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
4417 that was crack, broke the test service.
4419 * dbus/dbus-transport.c (_dbus_transport_open): fix error
4420 handling to avoid piling up errors if we get a failure on the
4423 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
4424 pid in assertion failures.
4426 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
4427 to some fixed size of file descriptor array. Don't return TRUE
4428 anytime a timeout exists, that led to lots of busy loop silliness
4431 2003-04-09 Havoc Pennington <hp@redhat.com>
4433 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
4434 I'd checked this in earlier but hadn't.
4436 2003-04-09 Havoc Pennington <hp@redhat.com>
4438 * bus/dispatch.c (bus_dispatch_test): get a bit further through
4439 the activation test (man this is getting old!)
4441 2003-04-09 Havoc Pennington <hp@redhat.com>
4443 * test/test-utils.c: use dispatch status function to fix this up
4445 * bus/connection.c (connection_watch_callback): don't dispatch
4447 (connection_timeout_callback): don't dispatch from here
4448 (bus_connections_setup_connection): set the dispatch status function
4449 (bus_connection_disconnected): unset it
4451 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
4452 used to add a connection to be dispatched
4453 (_dbus_loop_iterate): do the dispatching at the end of each
4456 * dbus/dbus-connection.c
4457 (dbus_connection_set_dispatch_status_function): new function
4458 allowing us to fix up main loop usage
4459 (_dbus_connection_last_unref): free all the various function
4461 (dbus_connection_dispatch): call the DispatchStatusFunction
4462 whenever this function returns
4463 (dbus_connection_handle_watch): call DispatchStatusFunction
4464 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
4465 (reply_handler_timeout): call DispatchStatusFunction
4466 (dbus_connection_flush): call DispatchStatusFunction
4468 2003-04-09 Havoc Pennington <hp@redhat.com>
4470 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
4473 * bus/dispatch.c (check_service_activated): fix bug in test
4475 * dbus/dbus-mainloop.c (check_timeout): fix this up
4477 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
4478 verbose output so we can sort out output from different processes,
4479 e.g. in the activation case.
4481 2003-04-08 Colin Walters <walters@gnu.org>
4483 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
4485 (bus_context_new): Set it.
4486 (bus_context_unref): Use it to delete the pid file.
4488 2003-04-08 Havoc Pennington <hp@redhat.com>
4490 * test/data/invalid-messages/array-with-mixed-types.message:
4491 regression test that fails for the moment
4493 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
4494 tests for convenience
4496 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
4497 array of nil, it broke things.
4499 * test/data/invalid-messages/array-of-nil.message: regression test
4501 * test/data/valid-messages/array-of-array-of-uint32.message:
4502 happened to write this so added it to suite
4504 2003-04-08 Havoc Pennington <hp@redhat.com>
4506 * bus/driver.c (bus_driver_handle_acquire_service): init
4507 retval/reply before checking name
4509 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
4510 recursion depth argument
4512 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
4513 in the public struct for future extension
4515 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
4518 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
4521 * doc/dbus-specification.sgml: fix typo
4523 2003-04-08 Alexander Larsson <alexl@redhat.com>
4525 Implemented recursive types, named types and new-style iters
4528 * glib/test-thread-client.c: (thread_func):
4529 * glib/test-thread-server.c: (handle_test_message):
4530 * test/test-service.c: (handle_echo):
4539 * dbus/dbus-internals.c: (_dbus_type_to_string):
4540 Update for new types.
4542 * dbus/dbus-marshal.[ch]:
4543 Implement recursive types and the new marshalling format.
4544 Remove hardcoded dict marshalling.
4545 Marshal named types.
4547 * dbus/dbus-message-builder.c:
4549 Remove references to old types
4551 * dbus/dbus-message.[ch]:
4552 New non-refcounted iter API that supports recursive iters.
4553 Use iters for appending, including support for recursive
4555 Add byte and named type support.
4556 Update everything to new marshalling formats.
4557 Add tests for new API.
4559 * dbus/dbus-protocol.h:
4560 Remove old array types.
4561 Add types: BYTE, ARRAY, DICT, NAMED
4563 * dbus/dbus-string.c:
4564 * dbus/dbus-sysdeps.c:
4565 Make parse_double locale safe.
4567 * dbus/dbus-test-main.c:
4573 * doc/dbus-specification.sgml:
4576 * test/data/incomplete-messages/missing-body.message:
4577 * test/data/invalid-messages/bad-boolean.message:
4578 * test/data/invalid-messages/bad-boolean-array.message:
4579 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
4580 * test/data/invalid-messages/boolean-has-no-value.message-raw:
4581 * test/data/invalid-messages/too-short-dict.message:
4582 * test/data/valid-messages/dict-simple.message:
4583 * test/data/valid-messages/dict.message:
4584 * test/data/valid-messages/emptiness.message:
4585 * test/data/valid-messages/lots-of-arguments.message:
4586 * test/data/valid-messages/no-padding.message:
4587 * test/data/valid-messages/recursive-types.message:
4588 Add missing NAME fields
4589 Fix up dicts & arrays
4591 * test/data/invalid-messages/dict-with-nil-value.message:
4592 Removed, this is not invalid anymore.
4594 * test/data/valid-messages/recursive-types.message:
4595 Add new test for deeply recursive types.
4597 2003-04-07 Havoc Pennington <hp@pobox.com>
4599 * bus/driver.c (bus_driver_handle_acquire_service): return an
4600 error if you try to acquire a service that starts with ':'
4602 2003-04-07 Havoc Pennington <hp@redhat.com>
4604 * doc/dbus-specification.sgml: require that base service names
4605 start with ':' and that the base service is created/deleted
4606 as first and last things a connection does on the bus
4608 * bus/dispatch.c (check_existent_service_activation): lots more
4609 work on the activation test; it doesn't fully pass yet...
4611 * test/test-service.c (main): fix so we don't memleak the
4612 connection to the message bus
4613 (filter_func): accept a message asking us to exit
4615 2003-04-06 Havoc Pennington <hp@pobox.com>
4617 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
4620 * configure.in: fixes to Qt detection from Colin Walters
4622 * doc/Makefile.am: Only remove generated docbook dirs if they
4623 exist, from Colin Walters
4625 * dbus/dbus-bus.c: change how we set well-known connections to
4626 NULL, so that it works if a single connection is stored in
4627 two well-known array slots.
4629 * test/Makefile.am: remove a lot of stuff that isn't immediately
4630 useful, it's in CVS history if we want it.
4632 * test/test-service.c: use dbus-mainloop instead of that
4635 2003-04-06 Havoc Pennington <hp@pobox.com>
4637 * dbus/Makefile.am: split lists of sources into stuff that goes in
4638 the library, util functions that go in the lib and are also used
4639 elsewhere, and util functions that are used in tests/daemon but
4640 don't go in the lib.
4642 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
4643 here so it can be used in test binaries also
4645 2003-04-06 Havoc Pennington <hp@pobox.com>
4647 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
4648 here in the parent process, so we can return an error if it
4649 fails. Also, move some of the code into the child so the parent
4650 is less hosed if we fail midway through.
4652 * bus/bus.c (bus_context_new): move pidfile detection further up
4653 in the function, before we start overwriting sockets and such.
4655 * bus/messagebus.in: adjust this a bit, not sure if it will work.
4657 * configure.in: add --with-system-pid-file and --with-system-socket
4659 2003-04-06 Colin Walters <walters@verbum.org>
4661 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
4663 * bus/system.conf.in: Declare a pidfile.
4665 * bus/bus.c (bus_context_new): Test for an existing pid file, and
4666 create one (if appropriate).
4668 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
4669 (struct BusConfigParser) [pidfile]: New.
4670 (element_type_to_name, merge_included, start_busconfig_child)
4671 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
4672 (bus_config_parser_unref): Free it.
4673 (bus_config_parser_get_pidfile): New function.
4675 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
4677 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
4679 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
4681 * dbus/dbus-sysdeps.h: Prototype it.
4683 2003-04-06 Havoc Pennington <hp@pobox.com>
4685 * bus/bus.c (bus_context_new): print the address in here, rather
4686 than in main(), because we need to do it before forking the daemon
4688 * bus/dispatch.c (send_service_nonexistent_error): set the sender
4689 on the service nonexistent error
4691 * bus/driver.c (bus_driver_handle_acquire_service): set the
4692 sender on the AcquireService reply
4694 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
4695 server also listen on a UNIX socket so services can connect to it.
4697 2003-04-06 Havoc Pennington <hp@pobox.com>
4699 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4700 so it detects deadlocks and also we actually init threads when
4703 2003-04-06 Havoc Pennington <hp@pobox.com>
4705 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4706 save the domain socket name, and unlink it when we disconnect the
4707 server. Means that at least when we exit normally, we won't leave
4708 a bunch of junk in /tmp
4710 * dbus/dbus-transport-unix.c
4711 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
4712 memory management). (I was making a real change here but then
4715 2003-04-06 Havoc Pennington <hp@pobox.com>
4717 * bus/bus.c (bus_context_new): fix wrong handling of
4718 server_data_slot_unref() in the error case.
4720 * dbus/dbus-internals.h (_dbus_assert): change so it passes
4721 "(condition) != 0" to _dbus_real_assert so that
4722 "_dbus_assert (pointer)" doesn't cause a warning
4724 * bus/main.c (main): accept --print-address option to print out
4725 the message bus address
4727 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
4729 * dbus/dbus-transport.c (_dbus_transport_open): special error for
4730 "tmpdir" option to unix: address on client side
4732 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
4735 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
4736 we can use to create sockets in the test suite.
4738 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
4739 cleanly. To be used for testing.
4741 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
4743 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
4745 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4746 handle trying to call this when there's no servers active
4748 2003-04-05 Havoc Pennington <hp@pobox.com>
4754 2003-04-05 Havoc Pennington <hp@pobox.com>
4756 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
4757 crash on startup. Need to get "try starting the daemon"
4758 in the test suite I guess. ;-)
4760 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4761 tracked the number of open connections; it's better done in
4762 application-specific code as you want it to span all servers etc.
4764 2003-04-05 Havoc Pennington <hp@pobox.com>
4766 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4767 patch from Colin Walters
4769 2003-04-05 Havoc Pennington <hp@pobox.com>
4771 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4772 reality; in fact multiple mechanisms are allowed.
4774 * dbus/dbus-internals.c (_dbus_real_assert)
4775 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4776 _dbus_assert_not_reached() into functions, so that they don't show
4777 up in basic block counts for test coverage, and don't use up as
4778 much disk space. Does mean slower execution speed though, so
4779 assumes --disable-asserts is the normal production case.
4781 2003-04-05 Havoc Pennington <hp@pobox.com>
4783 * test/Makefile.am (dist-hook): also dist *.in files
4789 2003-04-05 Havoc Pennington <hp@pobox.com>
4791 * dbus/dbus-string.c: docs warning
4793 * dbus/dbus-spawn.c: missing docs
4795 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4797 2003-04-05 Havoc Pennington <hp@pobox.com>
4799 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4802 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4803 to -1 once we've reaped the babysitter
4804 (_dbus_babysitter_handle_watch): do as much work as we can, not
4807 * bus/activation.c: add code using DBusBabysitter so that we
4808 handle it when a service fails to start up properly.
4809 (bus_activation_service_created): don't remove the activation
4810 entries as we go, just let them get removed when we free the pending
4811 activation. Unref reply messages after sending them.
4813 2003-04-05 Havoc Pennington <hp@pobox.com>
4815 * test/decode-gcov.c (main): print per-directory stats in the report
4817 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4819 2003-04-05 Havoc Pennington <hp@pobox.com>
4821 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4823 * test/decode-gcov.c: hack up a little program to suck data
4824 out of gcov files. Yes this is sort of silly.
4826 * configure.in: define something in config.h and do an
4827 AM_CONDITIONAL when gcov is enabled
4829 2003-04-04 Havoc Pennington <hp@redhat.com>
4831 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4832 return a "babysitter" object that is used to monitor the status of
4833 the spawned process and reap it when required.
4835 * test/test-segfault.c, test/test-exit.c,
4836 test/test-sleep-forever.c: binaries that do various lame things,
4837 used in the test suite.
4839 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4841 2003-04-03 Havoc Pennington <hp@pobox.com>
4843 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4844 in preparation for modifying it, dbus-sysdeps is getting
4847 2003-04-03 Havoc Pennington <hp@redhat.com>
4849 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4852 * bus/*.[hc]: adapt to mainloop change
4854 2003-04-03 Havoc Pennington <hp@redhat.com>
4856 * bus/activation.c (load_directory): fix up memleaks
4857 (bus_activation_entry_free): free the entry
4859 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4860 we get one from the message bus; fix memleaks.
4862 * dbus/dbus-message.c (dbus_set_error_from_message): new function
4864 2003-04-03 Havoc Pennington <hp@pobox.com>
4866 * bus/config-parser.c (bus_config_parser_unref): free
4867 list of mechanisms, bug discovered by test suite enhancements
4868 (putting system.conf and session.conf into suite)
4870 * test/Makefile.am, test/test-service.c: add placeholder for a
4871 test service that we'll activate as part of test suite. Doesn't
4874 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4875 setting NULL value, and use system malloc not dbus_malloc()
4876 when we have unavoidable memleakage.
4878 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4879 didn't work, and support DBUS_BUS_ACTIVATION.
4881 * bus/activation.c (child_setup): pass our well-known bus type to
4884 * bus/config-parser.c: support <type> to specify well-known type
4886 * doc/dbus-specification.sgml: document the env variables to
4887 locate well-known buses and find service activator
4889 2003-04-02 Havoc Pennington <hp@redhat.com>
4891 * test/Makefile.am (all-local): add a rule to copy tests to
4892 builddir, so we can have generated tests. Use this to remove the
4893 silly hack for testing system.conf and session.conf. Will use this
4894 shortly to generate .service files pointing to test binaries.
4896 2003-04-02 Havoc Pennington <hp@redhat.com>
4898 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4899 current alloc and needed new length, not max of the doubled
4900 allocation and needed new length. Also, when building tests,
4901 don't do the double-allocation stuff, just realloc every time.
4903 2003-04-02 Havoc Pennington <hp@redhat.com>
4905 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4907 (_dbus_string_get_dirname): new
4908 (_dbus_sysdeps_test): new
4909 (_dbus_directory_open): include dirnames in error messages
4911 * bus/config-parser.c: interpret <include> and <includedir> and
4912 <servicedir> relative to config file location if the given
4913 filename is not absolute.
4915 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4917 2003-04-02 Havoc Pennington <hp@redhat.com>
4919 * bus/connection.c (bus_transaction_send_error_reply): set sender
4920 service for the error, and unref the reply on success
4922 * bus/activation.c: convert to use BusTransaction so OOM can be
4924 (bus_activation_service_created): set sender of the message
4926 2003-04-01 Havoc Pennington <hp@redhat.com>
4928 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4929 <includedir> (at least mostly)
4931 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4932 first, then the user ID
4934 2003-04-01 Havoc Pennington <hp@pobox.com>
4936 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4939 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4941 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4943 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4944 socket 0777, and unlink any existing socket.
4946 * bus/bus.c (bus_context_new): change our UID/GID and fork if
4947 the configuration file so specifies; set up auth mechanism
4950 * bus/config-parser.c (bus_config_parser_content): add support
4951 for <fork> option and fill in code for <auth>
4953 * bus/system.conf.in: add <fork/> to default configuration,
4954 and limit auth mechanisms to EXTERNAL
4956 * doc/config-file.txt (Elements): add <fork>
4958 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4959 (_dbus_change_identity): new function
4961 2003-03-31 Havoc Pennington <hp@redhat.com>
4963 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4964 (_dbus_listen_unix_socket): fix off-by-one error in null
4965 termination spotted by Nalin
4967 2003-03-31 Havoc Pennington <hp@redhat.com>
4969 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4970 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4971 having a real home directory available.
4973 2003-03-31 Havoc Pennington <hp@redhat.com>
4975 * bus/Makefile.am (install-data-hook): create /var/run/dbus
4977 * bus/messagebus.in: add init script for Red Hat /etc/init.d
4979 * configure.in: add support for specifying a style of init script
4982 2003-03-31 Havoc Pennington <hp@redhat.com>
4984 Fix some annoying DBusString API and fix all affected code.
4986 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4988 (_dbus_string_get_data): change to return string instead of using
4990 (_dbus_string_get_const_data): ditto
4991 (_dbus_string_get_data_len): ditto
4992 (_dbus_string_get_const_data_len): ditto
4994 2003-03-31 Havoc Pennington <hp@redhat.com>
4996 * bus/main.c (main): fix up the command line arguments to be nicer
4998 2003-03-31 Havoc Pennington <hp@redhat.com>
5000 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
5001 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
5002 final location that lands in the config file
5004 * bus/config-loader-expat.c (bus_config_load): fix type of
5007 * doc/TODO: remove TODO item for dbus_bus_get()
5009 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
5011 2003-03-31 Havoc Pennington <hp@pobox.com>
5013 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
5014 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
5015 argument since they are always client side
5017 * dbus/dbus-server.c (dbus_server_get_address): new function
5019 * bus/main.c (main): take the configuration file as an argument.
5021 * test/data/valid-config-files/debug-allow-all.conf: new file to
5022 use with dispatch.c tests for example
5024 * bus/test-main.c (main): require test data dir
5026 * bus/bus.c (bus_context_new): change this to take a
5027 configuration file name as argument
5029 * doc/config-file.txt (Elements): add <servicedir>
5031 * bus/system.conf, bus/session.conf: new files
5033 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
5034 well-known socket if none set
5036 * configure.in: create system.conf and session.conf
5038 2003-03-30 Havoc Pennington <hp@pobox.com>
5040 * bus/config-parser.c: hacking
5042 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
5043 to shut down, since it could cause weirdness with the DBusList
5046 * dbus/dbus-list.c (_dbus_list_test): add tests for the
5047 link-oriented stack routines
5048 (alloc_link): free the mempool if the first alloc from it fails
5050 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
5052 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
5054 (_dbus_string_skip_white): new
5056 * doc/config-file.txt (Elements): add <includedir>
5058 2003-03-28 Havoc Pennington <hp@pobox.com>
5060 * dbus/dbus-string.c (_dbus_string_copy_data_len)
5061 (_dbus_string_copy_data): new functions
5063 2003-03-28 Anders Carlsson <andersca@codefactory.se>
5065 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
5069 * dbus/dbus-memory.c:
5072 2003-03-28 Havoc Pennington <hp@pobox.com>
5074 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
5075 I think it may have just been superstition. Not sure.
5077 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
5078 failures that were not being handled.
5080 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
5082 * dbus/dbus-memory.c: add ability to set number of mallocs in a
5083 row that will fail on out-of-memory.
5085 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
5086 function for testing out-of-memory handling.
5088 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
5089 allocation functions, they do map exactly to the expat ones.
5091 2003-03-27 Havoc Pennington <hp@redhat.com>
5093 * bus/config-loader-libxml.c (bus_config_load): add another error
5096 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5099 Add note about automatic service activation.
5101 * doc/dbus-specification.sgml:
5102 Rename the specification and clarify a few things.
5104 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5107 * dbus/dbus-address.c:
5109 * dbus/dbus-marshal.c:
5110 * dbus/dbus-server-debug-pipe.c:
5111 * dbus/dbus-transport-unix.c:
5112 Fix documentation warnings.
5114 2003-03-26 Havoc Pennington <hp@pobox.com>
5116 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
5117 after every test so it's quick and easy to see which leaked, and
5118 so we test multiple dbus_shutdown() calls
5120 * configure.in: change configure.in XML stuff to also support
5123 * config-loader-libxml.c: some hacking
5125 * config-loader-expat.c: some hacking
5127 * config-parser.c: some hacking, plus tests
5129 2003-03-25 Havoc Pennington <hp@redhat.com>
5131 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
5133 * configure.in: add --with-xml option to specify XML library,
5134 right now only libxml is supported.
5136 * bus/config-loader-libxml.c, config-parser.c: sync some minor
5137 nonworking code between home and work, still just stubs
5139 2003-03-24 Havoc Pennington <hp@redhat.com>
5141 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
5144 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
5145 NULL argument for "message" if the error is a well-known one,
5146 fill in a generic message in this case.
5148 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
5151 * bus/test.c (bus_test_flush_bus): add
5153 * bus/policy.c (bus_policy_test): test code stub
5155 2003-03-24 Havoc Pennington <hp@pobox.com>
5157 * bus/connection.c (bus_connections_setup_connection): set up
5158 the "can this user connect" function, but it always returns
5159 TRUE until we have a config file parser so we can have a config
5160 file that allows connections.
5162 2003-03-23 Havoc Pennington <hp@pobox.com>
5164 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
5165 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
5166 the mutex, so we can check for proper memory management
5169 * dbus/dbus-dataslot.c: remove the mutex from
5170 DBusDataSlotAllocator and lock it manually when using it,
5171 to simplify fitting it into the global slots framework.
5173 * dbus/dbus-threads.c (init_static_locks): rework how we're
5174 handling global locks so they are easily shut down.
5176 * bus/policy.c (bus_policy_append_rule): fix
5178 * bus/test-main.c (main): check for memleaks
5180 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
5181 test suite check for memleaks
5183 * dbus/dbus-memory.c: add support in test mode for tracking
5184 number of outstanding blocks
5186 2003-03-23 Havoc Pennington <hp@pobox.com>
5188 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
5191 * dbus/dbus-hash.h: add ULONG hash keys
5193 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
5194 (_dbus_get_group_id): new function
5196 2003-03-20 Havoc Pennington <hp@redhat.com>
5198 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
5200 (dbus_connection_get_unix_user): new function
5202 2003-03-20 Havoc Pennington <hp@pobox.com>
5204 * bus/connection.c (bus_connection_send_oom_error): assert that
5205 message has a sender
5206 (connection_execute_transaction): ditto
5207 (bus_connection_preallocate_oom_error): fix to set the sender, and
5208 set recipient to the destination service, not the bus driver
5210 * bus/policy.c: hacking
5212 * dbus/dbus-message.c (dbus_message_service_is): new function
5213 (dbus_message_sender_is): new
5215 2003-03-19 Havoc Pennington <hp@redhat.com>
5217 * bus/policy.c: start sketching code for policy restrictions on
5218 what connections can do.
5220 2003-03-18 Havoc Pennington <hp@redhat.com>
5222 * doc/TODO: some notes on high-level todo items. Little nitpick
5223 stuff is all in @todo, so no need to add it here.
5225 * doc/config-file.txt: some notes on how config file might look
5227 2003-03-18 Anders Carlsson <andersca@codefactory.se>
5233 2003-03-17 Havoc Pennington <hp@redhat.com>
5235 * dbus/dbus-internals.h: add gcc attributes so that
5236 our printf-style functions warn on bad arguments to
5239 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
5242 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5245 2003-03-17 Havoc Pennington <hp@redhat.com>
5247 * bus/test-main.c (main): make it print something as it runs
5248 so make check doesn't look stuck
5250 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
5251 from CVS, now obsolete
5253 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5255 * bus/dispatch.c: (bus_dispatch):
5256 Refetch the service name since it may have been reallocated
5257 when dbus_message_set_sender was called.
5259 * dbus/dbus-sysdeps.c: (_dbus_accept):
5260 Add address and address length variables and use them to stop
5261 valgrind from complaining.
5263 2003-03-17 Havoc Pennington <hp@pobox.com>
5265 All tests pass, no memleaks, no valgrind complaints.
5267 * bus/test.c: refcount handler_slot
5269 * bus/connection.c (bus_connections_new): refcount
5270 connection_data_slot
5272 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
5273 bytes so that auth scripts pass.
5275 * bus/dispatch.c: init message_handler_slot so it gets allocated
5278 * bus/dispatch.c (message_handler_slot_ref): fix memleak
5280 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
5281 dealloc server_pipe_hash when no longer used for benefit of
5284 * dbus/dbus-auth.c (process_command): memleak fix
5286 * bus/dispatch.c (check_hello_message): memleak fix
5288 2003-03-16 Havoc Pennington <hp@pobox.com>
5290 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
5292 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5294 * bus/activation.c (bus_activation_activate_service): Append
5295 the pending activation entry to the list of pending activations.
5297 2003-03-16 Havoc Pennington <hp@pobox.com>
5299 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
5302 * dbus/dbus-address.c (create_entry): fix OOM handling when
5303 failing to alloc entry->method
5305 2003-03-16 Havoc Pennington <hp@pobox.com>
5307 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
5310 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5311 add some missing dbus_set_result
5313 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
5314 alloc the DBusMessageHandler
5316 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
5317 the transport here, since we call this from the finalizer; it
5318 resulted in a double-finalize.
5320 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
5321 where we tried to use transport->connection that was NULL,
5322 happened when transport was disconnected early on due to OOM
5324 * bus/*.c: adapt to handle OOM for watches/timeouts
5326 * dbus/dbus-transport-unix.c: port to handle OOM during
5329 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
5330 reference to unused bytes instead of a copy
5332 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
5335 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
5338 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
5341 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5343 * doc/dbus-specification.sgml:
5344 Document reply message for ActivateService.
5346 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5348 * bus/activation.c: (bus_pending_activation_entry_free),
5349 (bus_pending_activation_free), (bus_activation_new),
5350 (bus_activation_unref), (bus_activation_service_created),
5351 (bus_activation_activate_service):
5353 * bus/bus.c: (bus_context_new):
5354 * bus/desktop-file.c: (new_section):
5355 * bus/driver.c: (bus_driver_send_service_deleted),
5356 (bus_driver_handle_activate_service):
5357 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
5359 * dbus/dbus-connection.c:
5360 (dbus_connection_send_with_reply_and_block):
5361 * dbus/dbus-message.c: (dbus_message_append_args_valist):
5362 * dbus/dbus-protocol.h:
5363 Make activation work better. Now pending activations will be queued
5364 and the daemon won't try to activate services that are already registered.
5366 2003-03-16 Havoc Pennington <hp@pobox.com>
5368 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
5371 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
5372 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
5374 2003-03-16 Havoc Pennington <hp@pobox.com>
5376 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
5377 this. always run the test suite before commit...
5379 * bus/*: adapt to DBusConnection API changes
5381 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
5382 requires renaming stuff to avoid dbus_connection_dispatch name
5385 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
5388 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5389 separate from _dbus_message_loader_return_buffer()
5391 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
5392 this, because it's now always broken to use; the number of
5393 messages in queue vs. the number still buffered by the message
5394 loader is undefined/meaningless. Should use
5395 dbus_connection_get_dispatch_state().
5396 (dbus_connection_dispatch): rename from
5397 dbus_connection_dispatch_message
5399 2003-03-16 Havoc Pennington <hp@pobox.com>
5401 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
5404 2003-03-16 Anders Carlsson <andersca@codefactory.se>
5406 * dbus/dbus-connection.c:
5407 (dbus_connection_send_with_reply_and_block):
5408 Decrease connection->n_incoming when removing an entry
5410 * dbus/dbus-dict.c: (dbus_dict_entry_free),
5411 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5412 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5413 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
5414 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
5415 (dbus_dict_get_byte_array):
5416 Handle NULL arrays and strings. Also add support for byte arrays.
5418 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
5419 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
5420 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5421 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5422 (_dbus_demarshal_dict), (demarshal_and_validate_len),
5423 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
5424 * dbus/dbus-marshal.h:
5425 Add support for marshalling and demarshalling empty arrays and strings.
5427 * dbus/dbus-message.c: (dbus_message_append_args_valist),
5428 (dbus_message_append_string_array),
5429 (dbus_message_iter_get_boolean),
5430 (dbus_message_iter_get_boolean_array),
5431 (dbus_message_iter_get_int32_array),
5432 (dbus_message_iter_get_uint32_array),
5433 (dbus_message_iter_get_double_array),
5434 (dbus_message_iter_get_byte_array),
5435 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
5436 (check_message_handling):
5437 Add support for getting empty arrays and dicts.
5439 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
5440 Don't do any validation at all for now, that's better than just checking
5443 * test/data/valid-messages/emptiness.message:
5444 New test message with lots of empty arrays.
5446 2003-03-16 Havoc Pennington <hp@pobox.com>
5448 * dbus/dbus-connection.c
5449 (_dbus_connection_queue_received_message_link): new function that
5450 can't fail due to OOM
5452 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
5453 new function pops a message together with a list link
5456 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
5457 message queuing functions to avoid needing to alloc memory
5459 2003-03-16 Havoc Pennington <hp@pobox.com>
5461 Oops - test code was only testing failure of around 30 of the
5462 mallocs in the test path, but it turns out there are 500+
5463 mallocs. I believe this was due to misguided linking setup such
5464 that there was one copy of dbus_malloc etc. in the daemon and one
5465 in the shared lib, and only daemon mallocs were tested. In any
5466 case, the test case now tests all 500+ mallocs, and doesn't pass
5467 yet, though there are lots of fixes in this patch.
5469 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5470 this so that it doesn't need to allocate memory, since it
5471 has no way of indicating failure due to OOM (and would be
5472 annoying if it did).
5474 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
5476 * bus/Makefile.am: rearrange to create two self-contained
5477 libraries, to avoid having libraries with overlapping symbols.
5478 that was resulting in weirdness, e.g. I'm pretty sure there
5479 were two copies of global static variables.
5481 * dbus/dbus-internals.c: move the malloc debug stuff to
5484 * dbus/dbus-list.c (free_link): free list mempool if it becomes
5487 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
5489 * dbus/dbus-address.c (dbus_parse_address): free list nodes
5492 * bus/dispatch.c (bus_dispatch_add_connection): free
5493 message_handler_slot when no longer using it, so
5494 memory leak checkers are happy for the test suite.
5496 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
5498 * bus/bus.c (new_connection_callback): disconnect in here if
5499 bus_connections_setup_connection fails.
5501 * bus/connection.c (bus_connections_unref): fix to free the
5503 (bus_connections_setup_connection): if this fails, don't
5504 disconnect the connection, just be sure there are no side
5507 * dbus/dbus-string.c (undo_alignment): unbreak this
5509 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
5511 (_dbus_auth_new): fix the order in which we free strings
5514 * bus/connection.c (bus_connection_disconnected): fix to
5515 not send ServiceDeleted multiple times in case of memory
5518 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
5519 get the base service name
5520 (dbus_bus_register_client): don't return base service name,
5521 instead store it on the DBusConnection and have an accessor
5523 (dbus_bus_register_client): rename dbus_bus_register()
5525 * bus/dispatch.c (check_hello_message): verify that other
5526 connections on the bus also got the correct results, not
5527 just the one sending hello
5529 2003-03-15 Havoc Pennington <hp@pobox.com>
5531 Make it pass the Hello handling test including all OOM codepaths.
5532 Now to do other messages...
5534 * bus/services.c (bus_service_remove_owner): fix crash when
5535 removing owner from an empty list of owners
5536 (bus_registry_ensure): don't leave service in the list of
5537 a connection's owned services if we fail to put the service
5540 * bus/connection.c (bus_connection_preallocate_oom_error): set
5541 error flag on the OOM error.
5543 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5544 handle _dbus_transport_set_connection failure
5546 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
5547 to create watches up front and simply enable/disable them as
5549 (unix_connection_set): this can now fail on OOM
5551 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
5552 of enabling/disabling a watch or timeout.
5554 * bus/loop.c (bus_loop_iterate): don't touch disabled
5557 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
5559 2003-03-15 Havoc Pennington <hp@pobox.com>
5561 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
5562 write useful test code, after all that futzing around ;-)
5564 Test does not yet pass because we can't handle OOM in
5565 _dbus_transport_messages_pending (basically,
5566 dbus_connection_preallocate_send() does not prealloc the write
5567 watch). To fix this, I think we need to add new stuff to
5568 set_watch_functions, namely a SetEnabled function so we can alloc
5569 the watch earlier, then enable it later.
5571 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
5572 dbus-memory.c to the convenience lib
5574 * bus/test.c: rename some static functions to keep them clearly
5575 distinct from stuff in connection.c. Handle client disconnection.
5577 2003-03-14 Havoc Pennington <hp@pobox.com>
5579 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
5580 transport, tests more of the real codepath. Set up clients
5581 with bus_setup_debug_client.
5583 * bus/test.c (bus_setup_debug_client): function to set up debug
5584 "clients" on the main loop
5586 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
5589 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
5592 * dbus/dbus-server-debug.c: support a debug server based on pipes
5594 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
5595 (_dbus_close): new function
5597 * configure.in: check for socketpair
5599 2003-03-14 Havoc Pennington <hp@redhat.com>
5601 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
5604 * dbus/dbus-transport-debug.c: rework this a good bit to be
5605 less complicated. hopefully still works.
5607 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
5610 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
5613 * dbus/dbus-message.c (dbus_message_copy): rename from
5614 dbus_message_new_from_message, fix it up to copy
5615 all the message fields, add test case
5617 * bus/dispatch.c (bus_dispatch_test): add some more test code,
5618 not quite passing yet
5620 2003-03-14 Havoc Pennington <hp@pobox.com>
5622 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
5623 until no work remains" in test code. (the large diff here
5624 is just code movement, no actual changes)
5626 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
5627 1, no point waiting around for test code.
5628 (_dbus_server_debug_accept_transport): unref the timeout
5629 after adding it (right?)
5631 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
5633 2003-03-13 Havoc Pennington <hp@redhat.com>
5635 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
5638 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
5641 * dbus/dbus-connection.h: Make AddWatchFunction and
5642 AddTimeoutFunction return a bool so they can fail on out-of-memory
5644 * bus/bus.c (bus_context_new): set up timeout handlers
5646 * bus/connection.c (bus_connections_setup_connection): set up
5649 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
5652 * bus/bus.c (bus_context_new): adapt to changes
5654 * bus/connection.c: adapt to changes
5656 * test/watch.c: adapt to DBusWatch changes
5658 * bus/dispatch.c (bus_dispatch_test): started adding this but
5661 2003-03-14 Anders Carlsson <andersca@codefactory.se>
5663 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
5665 2003-03-13 Havoc Pennington <hp@pobox.com>
5667 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
5668 set up a test framework as for the library
5670 2003-03-12 Havoc Pennington <hp@pobox.com>
5672 Throughout: purge global variables, introduce BusActivation,
5673 BusConnections, BusRegistry, etc. objects instead.
5675 * bus/bus.h, bus/bus.c: introduce BusContext as a global
5678 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
5679 going to redo this a bit differently I think
5681 2003-03-12 Havoc Pennington <hp@redhat.com>
5683 Mega-patch that gets the message bus daemon initially handling
5684 out-of-memory. Work still needed. Also lots of random
5685 moving stuff to DBusError instead of ResultCode.
5687 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
5689 * dbus/dbus-connection.c
5690 (dbus_connection_send_with_reply_and_block): use DBusError
5692 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
5695 * dbus/dbus-connection.c (dbus_connection_send): drop the result
5696 code here, as the only failure possible is OOM.
5698 * bus/connection.c (bus_connection_disconnect):
5699 rename bus_connection_disconnected as it's a notification only
5701 * bus/driver.c (bus_driver_handle_acquire_service): don't free
5702 "name" on get_args failure, should be done by get_args;
5703 don't disconnect client for bad args, just return an error.
5704 (bus_driver_handle_service_exists): ditto
5706 * bus/services.c (bus_services_list): NULL-terminate returned array
5708 * bus/driver.c (bus_driver_send_service_lost)
5709 (bus_driver_send_service_acquired): send messages from driver to a
5710 specific client to the client's unique name, not to the broadcast
5713 * dbus/dbus-message.c (decode_header_data): reject messages that
5714 contain no name field
5715 (_dbus_message_get_client_serial): rename to
5716 dbus_message_get_serial and make public
5717 (_dbus_message_set_serial): rename from set_client_serial
5718 (_dbus_message_set_reply_serial): make public
5719 (_dbus_message_get_reply_serial): make public
5721 * bus/connection.c (bus_connection_foreach): allow stopping
5722 iteration by returning FALSE from foreach function.
5724 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
5725 (dbus_connection_free_preallocated_send)
5726 (dbus_connection_preallocate_send): new API for sending a message
5727 without possibility of malloc failure.
5728 (dbus_connection_send_message): rename to just
5729 dbus_connection_send (and same for whole function family)
5731 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
5733 * dbus/dbus-sysdeps.c (_dbus_exit): new function
5735 * bus/activation.c: handle/return errors
5737 * dbus/dbus-errors.h: add more DBUS_ERROR #define
5739 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
5740 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
5741 (_dbus_result_from_errno): move to this file
5743 2003-03-10 Anders Carlsson <andersca@codefactory.se>
5745 * dbus/dbus-marshal.c:
5746 (_dbus_marshal_set_string):
5747 Take a length argument so we can marshal the correct string
5750 (_dbus_marshal_dict), (_dbus_demarshal_dict),
5751 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
5752 (_dbus_marshal_test):
5753 * dbus/dbus-marshal.h:
5754 Add support for marshalling and demarshalling dicts.
5756 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5757 Add support for TYPE DICT.
5759 * dbus/dbus-message.c: (set_string_field):
5760 Adjust header padding.
5762 (dbus_message_append_args_valist), (dbus_message_append_dict),
5763 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5764 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5765 (check_message_handling), (check_have_valid_message):
5766 * dbus/dbus-message.h:
5767 Add functions for setting and getting dicts.
5769 * dbus/dbus-protocol.h:
5775 * doc/dbus-specification.sgml:
5776 Add information about how dicts are marshalled.
5778 * test/data/invalid-messages/dict-with-nil-value.message:
5779 * test/data/invalid-messages/too-short-dict.message:
5780 * test/data/valid-messages/dict-simple.message:
5781 * test/data/valid-messages/dict.message:
5782 Add sample messages containing dicts.
5784 2003-03-08 Anders Carlsson <andersca@codefactory.se>
5786 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5788 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5791 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5792 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5793 (dbus_dict_set_int32), (dbus_dict_set_uint32),
5794 (dbus_dict_set_double), (dbus_dict_set_string),
5795 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5796 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5797 (dbus_dict_set_string_array), (_dbus_dict_test):
5799 Fix according to comments from Havoc.
5801 2003-03-06 Michael Meeks <michael@server.home>
5803 * configure.in: if we don't have kde-config, disable have_qt.
5805 2003-03-07 Anders Carlsson <andersca@codefactory.se>
5810 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5811 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5812 (dbus_dict_remove), (dbus_dict_get_value_type),
5813 (dbus_dict_get_keys), (dbus_dict_put_boolean),
5814 (dbus_dict_put_int32), (dbus_dict_put_uint32),
5815 (dbus_dict_put_double), (dbus_dict_put_string),
5816 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5817 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5818 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5819 (dbus_dict_get_int32), (dbus_dict_get_uint32),
5820 (dbus_dict_get_double), (dbus_dict_get_string),
5821 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5822 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5823 (dbus_dict_get_string_array), (_dbus_dict_test):
5825 Add DBusDict implementation
5827 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5831 2003-03-04 Havoc Pennington <hp@pobox.com>
5833 * test/data/auth/*: adapt to changes
5835 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5836 USERID_BASE64 and change USERNAME_BASE64 to put in username not
5839 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5840 more stuff from being in a context name, to make the protocol
5841 simpler to deal with
5843 * dbus/dbus-errors.c (dbus_error_has_name): new function
5844 (dbus_error_is_set): new function
5846 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5847 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5849 * dbus/dbus-connection.c (dbus_connection_flush): also read
5850 messages during a flush operation
5852 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5854 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5856 * configure.in: Check for gethostbyname on Solaris.
5858 * dbus/dbus-transport.c: (_dbus_transport_open):
5859 Remove duplicate "tcp" entry.
5861 * doc/dbus-specification.sgml:
5862 Clarify some things.
5864 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5866 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5867 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5868 (_dbus_keyring_test):
5869 * dbus/dbus-md5.c: (_dbus_md5_compute):
5870 * dbus/dbus-sha.c: (_dbus_sha_compute):
5873 2003-03-05 Anders Carlsson <andersca@codefactory.se>
5875 * README: Add some things.
5877 2003-03-04 Anders Carlsson <andersca@codefactory.se>
5879 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5880 after case DBUS_TYPE_BOOELAN.
5882 2003-03-02 Havoc Pennington <hp@pobox.com>
5884 * test/break-loader.c (randomly_set_extreme_ints): add test that
5885 sets really huge and small integers
5887 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5888 that length of boolean array fits in the string, and that
5889 string has room for boolean value in single-bool case.
5891 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5892 optional value to "ALIGN" command which is what to fill the
5895 * test/data/valid-messages/no-padding.message: add regression
5896 test for the message padding problem
5898 2003-03-02 Havoc Pennington <hp@pobox.com>
5900 * dbus/dbus-message.c (decode_header_data): fix to always init
5901 message_padding, from Benjamin Dauvergne
5903 2003-03-02 Havoc Pennington <hp@pobox.com>
5909 2003-03-01 Joe Shaw <joe@assbarn.com>
5911 * configure.in: Check for "struct cmsgcred" and try to access its
5912 members for BSD-like unices.
5914 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5915 _dbus_read_credentials_unix_socket().
5916 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5917 read() for reading the credential byte off the unix socket. Use
5918 struct cmsgcred on systems that support it.
5920 2003-02-27 Alexander Larsson <alexl@redhat.com>
5924 Make gthreads-2.0 dependency optional. Don't build thread test if
5927 2003-02-27 Havoc Pennington <hp@pobox.com>
5929 * dbus/dbus-connection.c
5930 (dbus_connection_send_message_with_reply_and_block): fix doh!
5931 doh! doh! bug that resulted in never removing a reply from the
5932 queue, no wonder we called get_reply_serial so much ;-)
5934 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5935 and client serial instead of demarshaling them every time
5937 2003-02-27 Havoc Pennington <hp@pobox.com>
5939 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5940 more inlined, using dbus-string-private.h, speeds things up
5943 * dbus/dbus-string.c (_dbus_string_free): apply align offset
5944 when freeing the string
5945 (_dbus_string_steal_data): fix for align offset
5946 (undo_alignment): new function
5948 2003-02-26 Havoc Pennington <hp@redhat.com>
5950 All kinds of audit fixes from Owen, plus initial attempt to
5951 handle unaligned memory returned from malloc.
5953 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5954 leave room for align_offset and nul byte
5955 (fixup_alignment): function to track an align_offset and
5956 ensure real->str is aligned
5957 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5958 to allow a nul byte plus align offset
5959 (_dbus_string_lock): fix overflow issue
5960 (_dbus_string_init_const_len): add assertions on sanity of len,
5961 assign allocated to be ALLOCATION_PADDING larger than len
5962 (set_length): fixup the overflow handling
5963 (_dbus_string_get_data_len): fix overflow in assertion
5964 (open_gap): detect overflow in size of gap to be opened
5965 (_dbus_string_lengthen): add overflow check
5966 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5967 (_dbus_string_append): add overflow check
5968 (_dbus_string_append_unichar): overflow
5969 (_dbus_string_delete): fix overflow in assertion
5970 (_dbus_string_copy_len): overflow in assertion
5971 (_dbus_string_replace_len): overflows in assertions
5972 (_dbus_string_find): change to implement in terms of
5973 _dbus_string_find_to
5974 (_dbus_string_find_to): assorted fixage
5975 (_dbus_string_equal_c_str): assert c_str != NULL,
5976 fix logic so the function works
5977 (_dbus_string_ends_with_c_str): fix overflow thingy
5978 (_dbus_string_base64_encode): overflow fix
5979 (_dbus_string_validate_ascii): overflow
5980 (_dbus_string_validate_nul): overflow
5982 2003-02-26 Havoc Pennington <hp@redhat.com>
5984 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5986 2003-02-26 Alexander Larsson <alexl@redhat.com>
5989 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5991 * dbus/dbus-connection.c:
5992 * dbus/dbus-connection.h:
5993 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5994 Add dbus_connection_set_wakeup_main_function and use it when queueing
5995 incoming and outgoing messages.
5998 * dbus/dbus-dataslot.c:
5999 Threadsafe usage of DBusDataSlotAllocator
6001 * dbus/dbus-message.c: (dbus_message_get_args_iter):
6004 * dbus/dbus-server-unix.c:
6007 * glib/dbus-gmain.c:
6008 Implement the new wakeup functions for glib.
6011 * glib/test-thread-client.c:
6012 * glib/test-thread-server.c:
6013 * glib/test-thread.h:
6014 Initial cut at some thread test code. Not really done yet.
6016 2003-02-26 Havoc Pennington <hp@pobox.com>
6018 * dbus/dbus-connection.c
6019 (dbus_connection_send_message_with_reply_and_block): fix crash
6020 where we ref'd the outgoing message instead of the returned reply
6022 * dbus/dbus-transport-unix.c (do_authentication): check read watch
6023 at the end of this function, so if we didn't need to read for
6024 authentication, we reinstall it for receiving messages
6026 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
6027 a NULL sender for peer-to-peer case
6029 * dbus/dbus-transport-unix.c (check_read_watch): handle
6030 !authenticated case correctly
6032 * glib/dbus-gmain.c: add support for DBusServer
6034 * dbus/dbus-server.c: add data slot support
6036 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
6037 return values and handle errors
6039 * dbus/dbus-dataslot.c: factor out the data slot stuff from
6042 * Doxyfile.in (INPUT): add glib subdir
6044 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
6045 setup_with_g_main instead of hookup_with_g_main; write docs
6047 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6049 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
6050 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6051 * dbus/dbus-message.c: (dbus_message_append_boolean),
6052 (dbus_message_append_boolean_array),
6053 (dbus_message_get_args_valist), (_dbus_message_test):
6054 * dbus/dbus-message.h:
6055 * doc/dbus-specification.sgml:
6056 Various fixes as pointed out by Havoc.
6058 * test/data/invalid-messages/bad-boolean-array.message:
6059 * test/data/invalid-messages/bad-boolean.message:
6060 Add invalid boolean value test cases.
6062 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6064 * dbus/dbus-internals.c: (_dbus_type_to_string):
6065 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6066 (_dbus_marshal_validate_arg):
6067 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6068 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6069 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
6070 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
6071 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
6072 (dbus_message_iter_get_double),
6073 (dbus_message_iter_get_boolean_array), (message_iter_test):
6074 * dbus/dbus-message.h:
6075 * dbus/dbus-protocol.h:
6076 * doc/dbus-specification.sgml:
6077 * test/data/valid-messages/lots-of-arguments.message:
6078 Add support for boolean and boolean array types.
6080 2003-02-23 Havoc Pennington <hp@pobox.com>
6082 * dbus/dbus-keyring.c: finish most of this implementation and
6085 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
6086 these barf if the error isn't cleared to NULL
6088 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
6089 (_dbus_create_directory): new function
6091 * dbus/dbus-errors.c (dbus_set_error): fix warning
6093 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
6094 (_dbus_string_hex_decode): new function
6095 (test_hex_roundtrip): test code
6097 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
6099 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
6101 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
6102 the save-to-temp/rename trick to atomically write the new file
6103 (_dbus_string_parse_uint): new function
6105 2003-02-22 Havoc Pennington <hp@pobox.com>
6107 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
6109 2003-02-22 Havoc Pennington <hp@pobox.com>
6111 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
6112 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
6114 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
6116 * dbus/test/data/sha-1: add US government test suite for SHA-1
6118 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6120 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6121 Make string arrays NULL-terminated.
6123 * dbus/dbus-memory.c: (dbus_free_string_array):
6124 * dbus/dbus-memory.h:
6125 New function for freeing NULL-terminated string arrays.
6127 * dbus/dbus-message-builder.c: (append_quoted_string),
6128 (_dbus_message_data_load):
6129 Add support for array types.
6131 * dbus/dbus-message.c: (check_message_handling):
6132 Add more types as test cases.
6134 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
6135 (_dbus_string_parse_double):
6136 Add the start offset to the end offset.
6138 * test/data/valid-messages/lots-of-arguments.message:
6139 New test message with lots of arguments.
6141 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6143 * dbus/dbus-message.c: (dbus_message_append_nil),
6144 (dbus_message_append_int32), (dbus_message_append_uint32),
6145 (dbus_message_append_double), (dbus_message_append_string),
6146 (dbus_message_append_int32_array),
6147 (dbus_message_append_uint32_array),
6148 (dbus_message_append_double_array),
6149 (dbus_message_append_byte_array),
6150 (dbus_message_append_string_array):
6151 Fix all out-of-memory handling in these functions.
6153 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6155 * dbus/dbus-message.c: (dbus_message_append_nil):
6158 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6160 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6161 (dbus_message_append_nil), (dbus_message_append_int32_array),
6162 (dbus_message_append_uint32_array),
6163 (dbus_message_append_double_array),
6164 (dbus_message_append_byte_array),
6165 (dbus_message_append_string_array), (dbus_message_get_args_valist),
6166 (dbus_message_iter_get_int32_array),
6167 (dbus_message_iter_get_uint32_array),
6168 (dbus_message_iter_get_double_array),
6169 (dbus_message_iter_get_byte_array),
6170 (dbus_message_iter_get_string_array):
6172 * dbus/dbus-message.h:
6173 Add functions for appending and getting arrays.
6175 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6177 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
6178 element size at least 8 bytes, fixes mempool tests on
6181 2003-02-20 Alexander Larsson <alexl@redhat.com>
6183 * dbus/dbus-transport-unix.c (unix_do_iteration):
6184 Unlock the connection mutex during a blocking select call.
6185 Add todo about how we need a way to wake up the select.
6187 * dbus/dbus-connection-internal.h:
6188 * dbus/dbus-connection.c:
6189 Add _dbus_connection_lock and _dbus_connection_unlock.
6191 2003-02-19 Havoc Pennington <hp@pobox.com>
6193 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
6194 Doxyfile.in, not Doxyfile
6196 * dbus/dbus-keyring.c: do some hacking on this
6198 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
6200 * dbus/dbus-errors.c (dbus_set_error_const): do not call
6202 (dbus_set_error): remove dbus_error_init, check for message ==
6203 NULL *before* we sprintf into it, and add @todo about including
6204 system headers in this file
6206 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
6208 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
6210 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
6211 get various bits of user information based on either username
6213 (_dbus_homedir_from_username): new function
6215 2003-02-19 Anders Carlsson <andersca@codefactory.se>
6218 Add check for nonposix getpwnam_r
6220 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
6221 Align the pool element size to a sizeof (void *) boundary.
6223 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
6224 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
6225 General Solaris fixes.
6227 * test/data/valid-messages/simplest-manual.message:
6228 Explicitly state that we want little-endian packing.
6230 2003-02-19 Mikael Hallendal <micke@codefactory.se>
6232 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6234 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
6235 Added to create a transport connecting using a tcp/ip socket.
6237 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
6238 to a tcp socket at given host and port.
6239 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
6242 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6244 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
6245 Added to create a server listening on a TCP/IP socket.
6247 2003-02-19 Havoc Pennington <hp@pobox.com>
6249 Throughout: mop up all the Doxygen warnings and undocumented
6252 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
6253 to search any paths.
6255 * dbus/dbus-threads.c: move global mutex initializers to
6256 dbus-internals.h, multiple prototypes was confusing doxygen
6257 besides being kind of ugly
6259 * Doxyfile (PREDEFINED): have Doxygen define
6260 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
6261 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
6262 (do not abuse the feature! it's for stuff like the autogenerated
6263 macros in dbus-md5.c, not just for things you don't feel like
6266 2003-02-18 Havoc Pennington <hp@pobox.com>
6268 * dbus/dbus-string.c (_dbus_string_zero): new function
6270 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
6271 wrap it in some dbus-friendly API
6273 * dbus/dbus-types.h: add 16-bit types
6275 2003-02-18 Joe Shaw <joe@assbarn.com>
6277 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
6278 credentials from our currently running process.
6279 (get_word): Fix a buglet where we were copying the entire length
6280 instead of relative to our position.
6282 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
6283 keys on the stack... it's 640k of data.
6285 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
6286 read the credentials byte off the socket, even if we don't have
6288 (_dbus_poll): Implement poll() using select() for systems which
6291 * glib/test-dbus-glib.c (main): Print out an error if no
6292 parameters are given.
6294 * test/data/auth/fallback.auth-script: Added. Tests that a client
6295 can fallback to a secondary auth mechanism if the first fails.
6297 2003-02-18 Havoc Pennington <hp@pobox.com>
6301 2003-02-17 Havoc Pennington <hp@pobox.com>
6303 * doc/dbus-specification.sgml: lots of cosmetic
6304 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
6305 env variable to DBUS_BUS_ADDRESS, s/client/application/,
6306 s/server/bus/ (except in authentication section). Add a section
6307 "Message Bus Message Routing"
6309 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
6315 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6317 * doc/dbus-specification.sgml:
6318 Specification updates.
6320 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6322 * bus/activation.c: (bus_activation_init), (child_setup),
6323 (bus_activation_activate_service):
6325 * bus/main.c: (main):
6326 Set DBUS_ADDRESS environment variable.
6328 * dbus/dbus-errors.c: (dbus_set_error):
6329 Don't use va_copy since that's a C99 feature.
6331 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
6332 (_dbus_spawn_async):
6333 * dbus/dbus-sysdeps.h:
6334 Add child_setup_func to _dbus_spawn_async.
6336 * doc/dbus-specification.sgml:
6337 Update specification.
6339 * test/spawn-test.c: (setup_func), (main):
6342 2003-02-17 Alexander Larsson <alexl@redhat.com>
6344 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
6347 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6351 * doc/dbus-test-plan.sgml:
6352 Add test plan document.
6357 2003-02-17 Anders Carlsson <andersca@codefactory.se>
6359 * dbus/dbus-message.c: (decode_header_data),
6360 (_dbus_message_loader_return_buffer):
6361 Set the header padding amount when loading a message.
6363 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6365 * bus/dispatch.c: (send_one_message):
6366 Only send broadcast messages to registered connections.
6368 * dbus/dbus-message.c: (dbus_message_name_is):
6369 * dbus/dbus-message.h:
6370 New convenience function.
6372 * dbus/dbus-transport-debug.c: (do_reading):
6373 Only dispatch one message per run.
6376 * test/bus-test.c: (new_connection_callback), (die),
6377 (test_hello_client1_handler), (test_hello_client2_handler),
6378 (test_hello_replies), (main):
6380 * test/bus-test-loop.[ch]:
6383 2003-02-16 Havoc Pennington <hp@pobox.com>
6385 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6386 backward conditional
6388 2003-02-16 Alexander Larsson <alexl@redhat.com>
6390 * dbus/dbus-connection.c:
6391 Implement sent_message_with_reply. (with_reply_and block is still
6393 Made dispatch_message not lose message if OOM.
6395 * dbus/dbus-errors.h:
6396 Add NoReply error (for reply timeouts).
6398 2003-02-16 Alexander Larsson <alexl@redhat.com>
6400 * dbus/dbus-hash.c (_dbus_hash_table_unref):
6401 Actually free keys and values when destroying hashtable.
6403 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6405 * dbus/dbus-auth.c: (client_try_next_mechanism):
6408 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
6409 Return TRUE if there's no thread implementation around.
6411 * glib/dbus-gmain.c: (free_source),
6412 (dbus_connection_hookup_with_g_main):
6413 Make sure to remove the GSource when the connection is finalized.
6415 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6417 * bus/dispatch.c: (bus_dispatch_message_handler):
6418 * dbus/dbus-errors.h:
6419 Return an error if someone tries to send a message to a service
6422 2003-02-16 Anders Carlsson <andersca@codefactory.se>
6424 * bus/activation.c: (load_directory), (bus_activation_init),
6425 (bus_activation_activate_service):
6428 (bus_driver_handle_activate_service), (bus_driver_handle_message):
6429 More work on the activation handling.
6431 * dbus/dbus-errors.h:
6432 Add some error messages
6434 * dbus/dbus-message.c: (dbus_message_new_error_reply):
6435 * dbus/dbus-message.h:
6436 New function that creates an error message.
6438 * dbus/dbus-protocol.h:
6439 Add ACTIVATE_SERVER message.
6441 * dbus/dbus-server-unix.c: (unix_handle_watch),
6442 (_dbus_server_new_for_domain_socket):
6443 Call _dbus_fd_set_close_on_exec.
6445 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
6446 (_dbus_spawn_async), (_dbus_disable_sigpipe),
6447 (_dbus_fd_set_close_on_exec):
6448 * dbus/dbus-sysdeps.h:
6449 Add _dbus_fd_set_close_on exec function. Also add function that checks
6450 that all open fds are set to close-on-exec and warns otherwise.
6452 * dbus/dbus-transport-unix.c:
6453 (_dbus_transport_new_for_domain_socket):
6454 Call _dbus_fd_set_close_on_exec.
6456 2003-02-16 Havoc Pennington <hp@pobox.com>
6458 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
6459 allow people to avoid setting SIGPIPE to SIG_IGN
6460 (_dbus_connection_new_for_transport): disable SIGPIPE unless
6461 we've been asked not to
6463 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6465 * dbus/dbus-list.c: (_dbus_list_append_link),
6466 (_dbus_list_prepend_link):
6467 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
6471 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6474 * bus/activation.c: (bus_activation_entry_free),
6475 (add_desktop_file_entry), (load_directory), (bus_activation_init):
6477 * bus/main.c: (main):
6478 Add simple activation support, doesn't work yet though.
6480 2003-02-15 Zack Rusin <zack@kde.org>
6482 * qt/dbus-qthread.cpp: small casting fix
6484 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6486 * dbus/dbus-errors.c: (dbus_set_error):
6487 * dbus/dbus-errors.h:
6488 Add a few errors and make dbus_set_error void.
6490 * dbus/dbus-sysdeps.c:
6491 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
6492 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
6493 * dbus/dbus-sysdeps.h:
6494 Add _dbus_spawn_async.
6496 * test/spawn-test.c: (main):
6497 Test for _dbus_spawn_async.
6499 2003-02-15 Anders Carlsson <andersca@codefactory.se>
6501 * dbus/dbus-internals.h:
6502 Fix build without tests.
6504 * dbus/dbus-list.c: (alloc_link):
6505 Fix a segfault when a malloc fails.
6507 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
6508 (dbus_malloc0), (dbus_realloc):
6509 Add support for malloc debugging.
6511 2003-02-15 Alexander Larsson <alexl@redhat.com>
6513 * dbus/dbus-threads.c:
6514 * dbus/dbus-threads.h:
6515 Add condvars. Remove static mutext from API.
6516 Implement static mutexes by initializing them from threads_init.
6518 * glib/dbus-gthread.c:
6519 * qt/dbus-qthread.cpp:
6520 Update with the thread api changes.
6525 Turn StaticMutex into normal mutex + init function.
6526 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
6527 _dbus_list_append_link, _dbus_list_prepend_link
6530 * dbus/dbus-sysdeps.c:
6531 * dbus/dbus-sysdeps.h:
6532 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
6533 _dbus_atomic_dec. Only slow fallback implementation at the moment.
6535 * dbus/dbus-protocol.h:
6536 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
6538 * dbus/dbus-message.c:
6539 Make ref/unref atomic.
6542 * dbus/dbus-connection-internal.h:
6543 * dbus/dbus-connection.c:
6544 * dbus/dbus-connection.h:
6546 Change _peek to _borrow,_return & _steal_borrowed.
6547 Change disconnect callback to event.
6548 Make dbus_connection_dispatch_messages reentrant.
6550 * dbus/dbus-transport.c:
6551 Don't ref the connection on calls to the transport
6554 * dbus/dbus-message-handler.c:
6557 * glib/dbus-gmain.c:
6558 Don't use peek_message anymore
6561 * test/debug-thread.c:
6562 * test/debug-thread.h:
6563 Simple thread implementation that asserts() on deadlocks in
6564 single-threaded code.
6567 (main) Call debug_threads_init.
6570 Use disconnect message instead of disconnect callback.
6574 Don't call dbus_connection_set_disconnect_function. Instead export
6575 bus_connection_disconnect.
6578 Call bus_connection_disconnect when we get a disconnected message.
6580 2003-02-15 Havoc Pennington <hp@pobox.com>
6582 * dbus/dbus-message.c (dbus_message_new): fool around with the
6585 2003-02-14 Havoc Pennington <hp@pobox.com>
6587 * dbus/dbus-mempool.c: fail if the debug functions so indicate
6589 * dbus/dbus-memory.c: fail if the debug functions indicate we
6592 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
6593 (_dbus_decrement_fail_alloc_counter): debug functions to
6594 simulate memory allocation failures
6596 2003-02-14 Havoc Pennington <hp@pobox.com>
6598 * dbus/dbus-errors.h (struct DBusError): add a word of padding
6601 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6603 * bus/driver.c: (bus_driver_handle_hello):
6605 * bus/services.c: (bus_service_lookup):
6606 Reorder message sending so we get a more sane order.
6608 * test/bus-test.c: (message_handler):
6611 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6613 * bus/driver.c: (bus_driver_send_service_deleted),
6614 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6615 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6616 (bus_driver_send_welcome_message),
6617 (bus_driver_handle_list_services),
6618 (bus_driver_handle_acquire_service),
6619 (bus_driver_handle_service_exists):
6620 * dbus/dbus-bus.c: (dbus_bus_register_client),
6621 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6622 * dbus/dbus-errors.c: (dbus_result_to_string):
6623 * dbus/dbus-errors.h:
6624 * dbus/dbus-message.c: (dbus_message_append_args),
6625 (dbus_message_append_args_valist), (dbus_message_get_args),
6626 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
6627 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
6628 (dbus_message_iter_get_byte_array),
6629 (dbus_message_iter_get_string_array), (message_iter_test),
6630 (check_message_handling), (_dbus_message_test):
6631 * dbus/dbus-message.h:
6632 * test/bus-test.c: (main):
6633 Change fields to arguments in messages, so that they won't be
6634 confused with header fields.
6636 * glib/test-dbus-glib.c: (main):
6637 Remove append_fields from hello message.
6639 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6641 * dbus/dbus-errors.c:
6642 * dbus/dbus-message.c:
6643 * dbus/dbus-string.c:
6644 Documentation fixes.
6646 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6648 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
6650 Implement support for timeouts in dbus-glib.
6652 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6654 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6655 * dbus/dbus-message.c: (process_test_subdir):
6656 * test/break-loader.c: (find_breaks_based_on):
6657 Plug some memory leaks.
6659 2003-02-13 Richard Hult <rhult@codefactory.se>
6661 * bus/main.c: Fix build.
6663 * dbus/dbus-errors.h:
6664 * dbus/dbus-errors.c: Fix copyright for Anders.
6666 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6671 * bus/connection.c: (bus_connection_foreach):
6674 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
6675 (unescape_string), (new_section), (parse_section_start),
6676 (parse_key_value), (report_error), (bus_desktop_file_load),
6677 (bus_desktop_file_get_string):
6678 * bus/desktop-file.h:
6679 Use DBusError for error reporting.
6681 * bus/dispatch.c: (send_one_message),
6682 (bus_dispatch_message_handler):
6683 * bus/driver.c: (bus_driver_send_service_deleted),
6684 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6685 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
6686 (bus_driver_send_welcome_message),
6687 (bus_driver_handle_list_services),
6688 (bus_driver_handle_acquire_service),
6689 (bus_driver_handle_service_exists):
6690 * bus/loop.c: (bus_loop_run):
6692 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
6694 * bus/utils.c: (bus_wait_for_memory):
6696 New files with general utility functions.
6698 * dbus/dbus-internals.h:
6699 Remove _DBUS_HANDLE_OOM.
6701 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6703 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
6704 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
6705 * dbus/dbus-errors.h:
6706 Add DBusError structure.
6708 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6710 * test/data/valid-messages/standard-acquire-service.message:
6711 * test/data/valid-messages/standard-hello.message:
6712 * test/data/valid-messages/standard-list-services.message:
6713 * test/data/valid-messages/standard-service-exists.message:
6714 Add some standard messages.
6716 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6718 * bus/driver.c: (bus_driver_send_welcome_message),
6719 (bus_driver_handle_list_services),
6720 (bus_driver_handle_acquire_service),
6721 (bus_driver_handle_service_exists), (bus_driver_handle_message):
6722 Update for API changes in libdbus.
6724 * dbus/dbus-message.c: (dbus_message_new_reply):
6725 * dbus/dbus-message.h:
6726 Remove the name argument. The spec states that replies shouldn't
6729 2003-02-13 Anders Carlsson <andersca@codefactory.se>
6731 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
6732 (report_error), (bus_desktop_file_load), (lookup_section),
6733 (lookup_line), (bus_desktop_file_get_raw),
6734 (bus_desktop_file_get_string):
6735 * bus/desktop-file.h:
6736 Some fixes, and new functions for getting a key value from a section.
6738 2003-02-13 Havoc Pennington <hp@pobox.com>
6740 * test/data/auth/fail-after-n-attempts.auth-script: new test
6742 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
6745 2003-02-13 Havoc Pennington <hp@pobox.com>
6747 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
6748 dbus_credentials_match were backward
6750 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
6751 NO_CREDENTIALS and ROOT_CREDENTIALS
6753 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
6754 into here. Never process more commands after we've reached an
6755 end state; store further data as unused bytes.
6757 * test/data/auth/*: add more auth tests
6759 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6760 command to match exact string and EXPECT_UNUSED to match unused
6763 * test/Makefile.am (dist-hook): fix to dist all the test stuff
6765 2003-02-12 Havoc Pennington <hp@pobox.com>
6767 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6768 \r off of popped lines
6770 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6773 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6776 2003-02-12 Havoc Pennington <hp@pobox.com>
6778 * dbus/Makefile.am: remove break-loader from the build, since it
6781 * configure.in: add --enable-gcov to turn on coverage profiling
6782 flags and disable optimization
6784 2003-02-10 Havoc Pennington <hp@pobox.com>
6786 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6787 initial cut at test framework for DBusAuth from laptop.
6788 Doesn't quite work yet but it compiles and I need to get
6789 it off the 266mhz laptop. ;-)
6791 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6792 fix a memleak in error case
6794 2003-02-12 Anders Carlsson <andersca@codefactory.se>
6797 * bus/desktop-file.c:
6798 * bus/desktop-file.h:
6799 Add a desktop file parser.
6801 2003-02-11 Zack Rusin <zack@kde.org>
6803 * qt/message.[h|cpp]: sample implementation
6804 of the KDE wrapper for DBusMessage
6806 2003-02-09 Zack Rusin <zack@kde.org>
6808 * test/bus-test.c: make_it_compile
6809 * doc/dbus-specification.sgml: minimal semantic fix
6811 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6817 2003-02-06 Anders Carlsson <andersca@codefactory.se>
6820 * dbus/dbus-break-loader.c:
6822 * test/break-loader.c:
6823 Move dbus-break-loader to test/ and rename it to break-loader.
6825 2003-02-02 Havoc Pennington <hp@pobox.com>
6827 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6828 for code to manage cookies in your home directory
6830 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6832 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6833 to authenticate, then disconnect the client.
6835 2003-02-03 Alexander Larsson <alexl@redhat.com>
6837 * dbus/dbus-message.c (dbus_message_append_fields):
6840 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6842 * doc/dbus-specification.sgml:
6843 Update address format section.
6845 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6848 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6849 (message_handler), (new_connection_callback), (loop_quit),
6853 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6855 * bus/driver.c: (bus_driver_handle_service_exists):
6856 Simplify the code a bit.
6858 * dbus/dbus-bus.c: (dbus_bus_service_exists):
6861 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6864 Add libdbus-daemon.la and link to it.
6866 2003-02-01 James Willcox <jwillcox@gnome.org>
6868 * bus/driver.c: (bus_driver_handle_own_service):
6869 Actually include the service reply code in the message.
6871 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6873 * bus/driver.c: (bus_driver_handle_service_exists):
6874 Don't unref the incoming message.
6876 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6878 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6880 2003-02-02 Anders Carlsson <andersca@codefactory.se>
6882 * dbus/dbus-server.c: (dbus_server_listen):
6883 * dbus/dbus-transport.c: (_dbus_transport_open):
6884 ifdef out the calls to the debug transport and server.
6886 2003-02-02 Alexander Larsson <alexl@redhat.com>
6888 * dbus/dbus-watch.c (dbus_watch_get_flags):
6889 Add note in the docs that ERROR or HANGUP won't be returned
6890 and are assumed always on.
6892 * glib/dbus-gmain.c (add_watch):
6893 Always add IO_ERR | IO_HUP
6895 * dbus/dbus-message.h:
6896 Add semicolon after dbus_message_iter_get_string_array().
6897 Makes qt code build again
6899 2003-02-01 Anders Carlsson <andersca@codefactory.se>
6901 * bus/driver.c: (create_unique_client_name),
6902 (bus_driver_handle_hello):
6903 Don't take a name, just use a numeric id to identify
6907 * dbus/dbus-bus.c: (dbus_bus_register_client),
6908 (dbus_bus_acquire_service), (dbus_bus_service_exists):
6910 Add new convenience functions for communicating with the bus.
6912 * dbus/dbus-message.h:
6914 * dbus/dbus-protocol.h:
6917 2003-02-01 Alexander Larsson <alexl@redhat.com>
6919 * dbus/dbus-message.c (dbus_message_append_fields):
6920 Add some more doc comments.
6922 2003-02-01 Havoc Pennington <hp@pobox.com>
6924 * dbus/dbus-break-loader.c (randomly_modify_length): change
6925 a 4-byte value in the message as if it were a length
6927 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6928 execute bit on saved files
6930 2003-02-01 Havoc Pennington <hp@pobox.com>
6932 * dbus/dbus-break-loader.c (main): new program to find messages
6933 that break the loader.
6935 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6936 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6938 * dbus/dbus-string.c (_dbus_string_set_byte): new
6940 2003-01-31 Havoc Pennington <hp@pobox.com>
6942 * dbus/dbus-message.c: refactor the test code to be more general,
6943 in preparation for writing a "randomly permute test cases to
6944 try to break the loader" program.
6946 2003-01-31 Havoc Pennington <hp@pobox.com>
6948 * doc/dbus-specification.sgml: work on the specification
6950 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6951 the protocol version of the message.
6953 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6954 no longer specifies that.
6955 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6958 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6959 "break" for DBUS_TYPE_NIL, remove @todo
6961 2003-01-31 Havoc Pennington <hp@pobox.com>
6963 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6964 just set_is_error/get_is_error as this is a commonly-used
6965 function, and write docs.
6967 2003-01-31 Anders Carlsson <andersca@codefactory.se>
6969 * dbus/dbus-address.c: (dbus_address_entry_free):
6970 Free key and value lists.
6972 * dbus/dbus-internals.c: (_dbus_type_to_string):
6973 Add the types we didn't have.
6975 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6976 (_dbus_marshal_validate_arg):
6979 * dbus/dbus-message.c: (dbus_message_set_sender):
6980 Remove todo about being able to set sender to NULL.
6982 (dbus_message_set_is_error_reply),
6983 (dbus_message_get_is_error_reply):
6984 * dbus/dbus-message.h:
6987 * dbus/dbus-protocol.h:
6988 Add error reply flag.
6990 * test/data/valid-messages/opposite-endian.message:
6991 Add NIL type to test.
6993 2003-01-31 Havoc Pennington <hp@pobox.com>
6995 * doc/dbus-specification.sgml: fully specify the header. Add
6996 flags and major protocol version, and change header/body len to
6999 * dbus/dbus-message-builder.c (append_saved_length): append length
7002 * dbus/dbus-message.c (dbus_message_create_header): change header
7003 length and body length to unsigned. Add the new fields from the
7005 (_dbus_message_loader_return_buffer): unsigned header/body len
7007 2003-01-30 Havoc Pennington <hp@pobox.com>
7009 * dbus/dbus-auth.c: rework to use only REJECTED, no
7012 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
7013 use REJECTED, suggested by Mark McLoughlin
7015 2003-01-30 Havoc Pennington <hp@pobox.com>
7017 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
7018 a better way to report errors here. e.g. "unix address lacks
7019 path" or something. also "no such file" when the path doesn't
7022 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
7024 (dbus_parse_address): add @todo about documenting address format,
7025 and allowing , and ; to be escaped
7027 2003-01-30 Anders Carlsson <andersca@codefactory.se>
7030 Add dbus-address.[ch]
7032 * dbus/dbus-address.c: (dbus_address_entry_free),
7033 (dbus_address_entries_free), (create_entry),
7034 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
7035 (dbus_parse_address), (_dbus_address_test):
7036 * dbus/dbus-address.h:
7037 New files for dealing with address parsing.
7039 * dbus/dbus-connection.c:
7040 Document timeout functions.
7042 * dbus/dbus-message.c:
7043 Document dbus_message_new_from_message.
7045 * dbus/dbus-server-debug.c:
7048 * dbus/dbus-server.c: (dbus_server_listen):
7049 Parse address and use correct server implementation.
7051 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
7052 * dbus/dbus-string.h:
7053 New function with test.
7055 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
7059 * dbus/dbus-transport-debug.c:
7062 * dbus/dbus-transport.c: (_dbus_transport_open):
7063 Parse address and use correct transport implementation.
7065 2003-01-30 Havoc Pennington <hp@pobox.com>
7067 * dbus/dbus-message.c: use message->byte_order instead of
7068 DBUS_COMPILER_BYTE_ORDER throughout.
7069 (dbus_message_create_header): pad header to align the
7070 start of the body of the message to 8-byte boundary
7072 * dbus/dbus-marshal.h: make all the demarshalers take const
7073 DBusString arguments.
7075 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
7076 validate message args here, so we don't have to do slow validation
7077 later, and so we catch bad messages as they are incoming. Also add
7078 better checks on header_len and body_len. Also fill in
7081 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
7082 implemented properly)
7083 (_dbus_string_validate_nul): new function to check all-nul
7085 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
7086 get_arg_end_pos and remove all validation
7087 (_dbus_marshal_validate_arg): actually do validation here.
7089 2003-01-29 Havoc Pennington <hp@pobox.com>
7091 * dbus/dbus-message.c (check_message_handling): fix assertion
7092 failure on set_client_serial
7094 2003-01-28 Havoc Pennington <hp@pobox.com>
7096 * dbus/dbus-server-debug.c: Add doc section comments
7098 * dbus/dbus-transport-debug.c: add doc section comments
7100 2003-01-28 Havoc Pennington <hp@redhat.com>
7102 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
7103 the reverse order from how I had it
7104 (_dbus_string_base64_encode): reverse encoding order. I was
7105 basically byteswapping everything during encoding.
7107 2003-01-28 Anders Carlsson <andersca@codefactory.se>
7109 * dbus/dbus-connection-internal.h:
7110 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
7111 (_dbus_connection_remove_timeout):
7112 Add functions for adding and removing timeouts.
7114 * dbus/dbus-message.c: (dbus_message_new_from_message):
7115 Add new function that takes a message and creates an exact
7116 copy of it, but with the refcount set to 1.
7117 (check_message_handling):
7120 * dbus/dbus-server-protected.h:
7121 * dbus/dbus-server.c: (_dbus_server_init_base),
7122 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
7123 (dbus_server_set_timeout_functions):
7124 (_dbus_server_remove_timeout):
7125 New functions so that a server can add and remove timeouts.
7127 (dbus_server_listen):
7128 Add commented out call to dbus_server_debug_new.
7130 * dbus/dbus-timeout.c: (_dbus_timeout_new):
7131 Actually set the handler, doh.
7133 * dbus/dbus-transport.c: (_dbus_transport_open):
7134 Add commented out call to dbus_transport_debug_client_new.
7137 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
7139 2003-01-28 Havoc Pennington <hp@pobox.com>
7141 * dbus/dbus-message.c (check_message_handling): function to check
7142 on the loaded message, iterates over it etc.
7144 2003-01-28 Havoc Pennington <hp@pobox.com>
7146 * test/Makefile.am (dist-hook): fix make distdir
7148 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
7150 2003-01-27 Havoc Pennington <hp@pobox.com>
7152 * dbus/dbus-mempool.c (time_for_size): replace printf with
7155 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
7156 empty lines; fix the SAVE_LENGTH stuff to be
7157 START_LENGTH/END_LENGTH so it actually works; couple other
7160 * test/Makefile.am (dist-hook): add dist-hook for .message files
7162 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
7163 can be constant or locked.
7164 (_dbus_string_free): allow freeing a const string as
7167 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
7169 * dbus/dbus-test-main.c (main): take an argument which is the
7170 directory containing test data
7172 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
7173 argument to this and load all the messages in test/data/
7174 checking that they can be loaded or not loaded as appropriate.
7176 2003-01-27 Anders Carlsson <andersca@codefactory.se>
7178 * bus/dispatch.c: (bus_dispatch_message_handler):
7179 Dispatch messages sent to services.
7181 * bus/driver.c: (bus_driver_send_service_deleted),
7182 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7183 (bus_driver_send_service_acquired):
7184 Add helper functions for sending service related messages.
7186 (bus_driver_send_welcome_message):
7187 Send HELLO_REPLY instead of WELCOME.
7189 (bus_driver_handle_list_services):
7190 Send LIST_SERVICES_REPLY instead of SERVICES.
7192 (bus_driver_handle_own_service),
7193 (bus_driver_handle_service_exists):
7194 New message handlers.
7196 (bus_driver_handle_message):
7197 Invoke new message handlers.
7199 (bus_driver_remove_connection):
7200 Don't remove any services here since that's done automatically
7201 by bus_service_remove_owner now.
7204 New function signatures.
7206 * bus/services.c: (bus_service_add_owner):
7207 Send ServiceAcquired message if we're the only primary owner.
7209 (bus_service_remove_owner):
7210 Send ServiceAcquired/ServiceLost messages.
7212 (bus_service_set_prohibit_replacement),
7213 (bus_service_get_prohibit_replacement):
7214 Functions for setting prohibit replacement.
7216 (bus_service_has_owner):
7217 New function that checks if a connection is in the owner queue of
7221 Add new function signatures.
7223 * dbus/dbus-list.c: (_dbus_list_test):
7224 Add tests for _dbus_list_remove_last and traversing the list backwards.
7227 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
7228 go any further, so return NULL then.
7230 * dbus/dbus-protocol.h:
7231 Add new messages, service flags and service replies.
7233 2003-01-26 Havoc Pennington <hp@pobox.com>
7235 * dbus/dbus-message-builder.c: implement, completely untested.
7237 * test/data/*: add data to be used in testing.
7238 ".message" files are our simple loadable text format.
7239 ".message-raw" will be binary dumps of messages.
7241 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
7243 2003-01-26 Havoc Pennington <hp@pobox.com>
7245 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
7247 * dbus/dbus-errors.c (dbus_result_to_string): add
7250 * dbus/dbus-message-builder.c: new file, will contain code to load
7251 up messages from files. Not implemented yet.
7253 2003-01-26 Havoc Pennington <hp@pobox.com>
7255 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
7256 the sender by setting to NULL
7258 2003-01-26 Havoc Pennington <hp@pobox.com>
7260 The unit tests pass, but otherwise untested. If it breaks, the
7261 tests should have been better. ;-)
7263 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
7266 * dbus/dbus-message.c: redo everything so we maintain
7267 message->header as the only copy of the various fields.
7268 This avoids the possibility of out-of-memory in some cases,
7269 for example dbus_message_lock() can't run out of memory anymore,
7270 and avoids extra copying. Figured I may as well go ahead and do
7271 this since it was busted for dbus_message_lock to not return
7272 failure on OOM, and dbus_message_write_header was totally
7273 unchecked for OOM. Also fixed some random other bugs.
7275 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
7276 that strings are nul-terminated. Also, end_pos can be equal
7277 to string length just not greater than, I think.
7278 (_dbus_marshal_set_int32): new function
7279 (_dbus_marshal_set_uint32): new function
7280 (_dbus_marshal_set_string): new function
7282 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
7283 a warning, init timeout_list to NULL
7284 (dbus_connection_send_message): don't use uninitialized variable
7287 * dbus/dbus-string.c (_dbus_string_replace_len): new function
7289 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7291 * bus/driver.c: (bus_driver_handle_hello),
7292 (bus_driver_send_welcome_message):
7295 2003-01-26 Anders Carlsson <andersca@codefactory.se>
7297 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
7298 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7299 (dbus_connection_unref):
7300 * dbus/dbus-marshal.c: (_dbus_marshal_test):
7301 * dbus/dbus-message.c: (dbus_message_unref),
7304 (dbus_message_get_fields):
7305 Remove debugging printout.
7307 (_dbus_message_loader_return_buffer):
7308 Don't store the header string.
7310 (_dbus_message_test):
7313 2003-01-26 Richard Hult <rhult@codefactory.se>
7315 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
7316 the file descriptor list, since it can change under us.
7318 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7320 * glib/dbus-gmain.c: (dbus_connection_prepare),
7321 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
7322 (remove_watch), (dbus_connection_hookup_with_g_main):
7323 Rewrite the glib handling to use its own GSource instead of a
7324 GIOChannel so we can catch messages put in the queue while waiting
7327 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7330 * bus/connection.c: (connection_disconnect_handler),
7331 (connection_watch_callback), (bus_connection_setup):
7332 * bus/dispatch.c: (send_one_message),
7333 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
7334 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
7336 * bus/driver.c: (bus_driver_send_service_deleted),
7337 (bus_driver_send_service_created), (bus_driver_handle_hello),
7338 (bus_driver_send_welcome_message),
7339 (bus_driver_handle_list_services), (bus_driver_remove_connection),
7340 (bus_driver_handle_message):
7342 Refactor code, put the message dispatching in its own file. Use
7343 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
7346 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7348 * dbus/dbus-internals.h:
7349 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
7351 * dbus/dbus-message.c: (dbus_message_get_sender):
7352 * dbus/dbus-message.h:
7353 Implement dbus_message_get_sender.
7355 * dbus/dbus-protocol.h:
7356 Add message and service defines.
7358 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7360 * dbus/dbus-connection.c: (dbus_connection_send_message):
7361 * dbus/dbus-message-internal.h:
7362 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
7363 (dbus_message_write_header):
7364 Remove _dbus_messag_unlock and don't set the client serial on a
7365 message if one already exists.
7367 2003-01-24 Havoc Pennington <hp@pobox.com>
7369 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
7372 * bus/driver.c (bus_driver_handle_list_services): fix a leak
7375 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7377 * dbus/dbus-list.c: (alloc_link), (free_link):
7378 Use a memory pool for the links.
7380 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7382 * bus/connection.c: (bus_connection_foreach):
7384 Add new bus_connection_foreach function.
7386 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
7387 Add function that broadcasts a message to all clients.
7389 (bus_driver_send_service_created), (bus_driver_handle_hello),
7390 (bus_driver_send_welcome_message),
7391 (bus_driver_handle_list_services), (bus_driver_message_handler):
7392 Implement functions that take care of listing services, and notifying
7393 clients when new services are created.
7395 * bus/services.c: (bus_services_list):
7397 Add new function that returns an array of strings with the currently
7398 registered services.
7401 * glib/dbus-gmain.c:
7402 Update copyright year.
7404 2003-01-25 Anders Carlsson <andersca@codefactory.se>
7406 * dbus/dbus-connection.c: (dbus_connection_send_message):
7407 Unlock the message in case it was sent earlier.
7409 (dbus_connection_send_message_with_reply_and_block):
7410 Remove the reply message from the list.
7412 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7413 Set array_len and new_pos correctly.
7415 (_dbus_marshal_test):
7416 Remove debug output.
7418 * dbus/dbus-message-internal.h:
7419 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
7420 New function that returns the reply serial.
7422 (_dbus_message_unlock):
7423 New function that unlocks a message and resets its header.
7425 (dbus_message_append_string_array),
7426 (dbus_message_get_fields_valist),
7427 (dbus_message_iter_get_field_type),
7428 (dbus_message_iter_get_string_array),
7429 (dbus_message_get_fields),
7430 (dbus_message_append_fields_valist):
7431 Handle string arrays.
7433 (dbus_message_set_sender):
7434 Make this function public since the bus daemon needs it.
7436 (decode_header_data):
7437 Set the reply serial to -1 initially.
7439 * dbus/dbus-message.h:
7440 Add dbus_message_set_sender.
7442 2003-01-24 Havoc Pennington <hp@pobox.com>
7444 * doc/dbus-specification.sgml: add some stuff
7446 2003-01-22 Havoc Pennington <hp@pobox.com>
7448 * doc/dbus-specification.sgml: Start to document the protocol.
7450 2003-01-22 Havoc Pennington <hp@pobox.com>
7452 * dbus/dbus-connection.c
7453 (dbus_connection_send_message_with_reply_and_block): add some @todo
7455 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
7457 2003-01-21 Havoc Pennington <hp@pobox.com>
7459 (patch untested because can't compile)
7461 * bus/driver.c (create_unique_client_name): make this function
7462 never recycle client names. Also, caller should initialize
7465 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
7467 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7469 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7470 (_dbus_marshal_int32), (_dbus_marshal_uint32),
7471 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
7472 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
7473 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7474 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7475 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
7476 * dbus/dbus-marshal.h:
7477 * dbus/dbus-protocol.h:
7478 Add support for marshalling and demarshalling integer, double
7481 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7486 * bus/connection.c: (connection_disconnect_handler):
7487 Remove the connection from the bus driver's list.
7489 (connection_watch_callback): Dispatch messages.
7491 (free_connection_data): Free connection name.
7493 (bus_connection_setup): Add connection to the bus driver's list.
7494 (bus_connection_remove_owned_service):
7495 (bus_connection_set_name), (bus_connection_get_name):
7496 Add functions for setting and getting the connection's name.
7499 Add function headers.
7501 * bus/driver.c: (create_unique_client_name),
7502 (bus_driver_handle_hello_message),
7503 (bus_driver_send_welcome_message), (bus_driver_message_handler),
7504 (bus_driver_add_connection), (bus_driver_remove_connection):
7507 * bus/services.c: (bus_service_free):
7509 New file that handles communication and registreation with the bus
7512 2003-01-21 Anders Carlsson <andersca@codefactory.se>
7514 * dbus/dbus-connection.c: (dbus_connection_send_message):
7515 Add a new client_serial parameter.
7517 (dbus_connection_send_message_with_reply):
7518 Remove a @todo since we've implemented the blocking function.
7520 (dbus_connection_send_message_with_reply_and_block):
7521 New function that sends a message and waits for a reply and
7522 then returns the reply.
7524 * dbus/dbus-connection.h:
7527 * dbus/dbus-errors.c: (dbus_result_to_string):
7528 * dbus/dbus-errors.h:
7529 Add new DBUS_RESULT.
7531 * dbus/dbus-message-internal.h:
7532 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
7533 (_dbus_message_set_sender), (dbus_message_write_header),
7534 (dbus_message_new_reply), (decode_header_data),
7535 (_dbus_message_loader_return_buffer), (_dbus_message_test):
7536 * dbus/dbus-message.h:
7537 Add new functions that set the reply serial and sender.
7538 Also marshal and demarshal them correctly and add test.
7540 * dbus/dbus-protocol.h:
7541 Add new DBUS_MESSAGE_TYPE_SENDER.
7544 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
7545 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
7546 (dbus_connection_hookup_with_g_main):
7547 * glib/test-dbus-glib.c: (main):
7548 Rewrite to use GIOChannel and remove the GSource crack.
7550 * test/echo-client.c: (main):
7551 * test/watch.c: (check_messages):
7552 Update for changed APIs
7554 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7556 * dbus/Makefile.am: Add dbus-timeout.[cħ]
7558 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
7559 Create a DBusTimeoutList.
7560 (dbus_connection_set_timeout_functions): Add new function to
7561 set timeout callbacks
7563 * dbus/dbus-connection.h: Add public DBusTimeout API.
7565 * dbus/dbus-message.c: (dbus_message_get_service):
7566 * dbus/dbus-message.h: New function.
7568 * dbus/dbus-server.c: Fix small doc typo.
7570 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
7572 2003-01-19 Anders Carlsson <andersca@codefactory.se>
7574 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
7575 of the string, just as long as specified.
7577 2003-01-19 Havoc Pennington <hp@pobox.com>
7579 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
7582 * dbus/dbus-server.c (dbus_server_set_max_connections)
7583 (dbus_server_get_max_connections, dbus_server_get_n_connections):
7584 keep track of current number of connections, and add API for
7585 setting a max (but haven't implemented enforcing the max yet)
7587 2003-01-18 Havoc Pennington <hp@pobox.com>
7589 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
7590 reading/writing if read_watch != NULL or write_watch != NULL.
7592 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
7593 the message loader code to actually load message->header and
7594 message->body into the newly-created message.
7596 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
7599 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
7600 (dbus_connection_get_max_message_size)
7601 (dbus_connection_set_max_live_messages_size)
7602 (dbus_connection_get_max_live_messages_size): implement some
7603 resource limitation functions
7605 * dbus/dbus-resources.c: new file implementing some of the
7606 resource limits stuff
7608 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
7609 missing docs, add @todo to handle OOM etc.
7611 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
7614 2003-01-18 Havoc Pennington <hp@pobox.com>
7616 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
7617 connection if it hasn't been already.
7619 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
7620 replace with DisconnectFunction.
7622 2003-01-18 Havoc Pennington <hp@pobox.com>
7624 Building --disable-verbose-mode --disable-asserts --disable-tests
7625 cuts the library from 112K to 45K or so
7627 * configure.in: check for varargs macro support,
7628 add --enable-verbose-mode, --enable-asserts.
7630 * dbus/dbus-internals.h (_dbus_assert): support
7632 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
7634 2003-01-18 Havoc Pennington <hp@pobox.com>
7636 * dbus/dbus-test.c: include config.h so that tests actually run
7638 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
7639 so the failure mode when that assumption fails will be plenty
7642 2003-01-18 Havoc Pennington <hp@pobox.com>
7644 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
7646 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
7649 * test/Makefile.am: don't use special variable "TESTS" for echo-*
7650 since we don't want to use those in make check
7652 2003-01-15 Havoc Pennington <hp@redhat.com>
7658 2003-01-15 Havoc Pennington <hp@redhat.com>
7660 * test/Makefile.am: fix so that test source code ends up in the
7661 distribution on make distcheck
7663 2003-01-15 Havoc Pennington <hp@redhat.com>
7669 2003-01-15 Havoc Pennington <hp@redhat.com>
7671 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
7672 fix build when --disable-tests
7674 * Makefile.am (EXTRA_DIST): put HACKING in here
7676 * HACKING: document procedure for making a tarball release.
7678 2003-01-14 Anders Carlsson <andersca@codefactory.se>
7680 * bus/connection.c: (connection_error_handler),
7681 (bus_connection_setup):
7682 * bus/main.c: (main):
7683 Make sure that the DBusConnectionData struct is NULLed
7684 out to prevent a segfault.
7686 * dbus/dbus-errors.c: (dbus_result_to_string):
7687 * dbus/dbus-errors.h:
7688 * dbus/dbus-message.c: (dbus_message_get_fields),
7689 (dbus_message_get_fields_valist), (_dbus_message_test):
7690 * dbus/dbus-message.h:
7691 Make dbus_message_get_fields return a result code so we can
7692 track invalid fields as well as oom.
7694 2003-01-11 Havoc Pennington <hp@pobox.com>
7696 * configure.in: change --enable-test/--enable-ansi action-if-given
7697 to enable_foo=$enableval instead of enable_foo=yes
7699 2003-01-08 Havoc Pennington <hp@pobox.com>
7701 * dbus/dbus-string.c (_dbus_string_align_length): new function
7703 * dbus/dbus-test-main.c: move main() for test app here
7705 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
7706 symbol to run tests, because dbus-test isn't in the main
7709 Code review nitpicks.
7711 * dbus/dbus-message.c (dbus_message_write_header): add newlines
7712 for people with narrow emacs ;-). Assert client_serial was filled
7713 in. Assert message->name != NULL.
7714 (dbus_message_append_fields): have "first_field_type" arg separate
7715 from va list, needed for C++ binding that also uses varargs IIRC
7716 and helps with type safety
7717 (dbus_message_new): add @todo about using DBusString to store
7718 service/name internally
7719 (dbus_message_new): don't leak ->service and ->name on OOM later
7721 (dbus_message_unref): free the service name
7722 (dbus_message_get_fields): same change to varargs
7723 i.e. first_field_type
7724 (_dbus_message_loader_return_buffer): assert that the message data
7725 is aligned (if not it's a bug in our code). Put in verbose griping
7726 about why we set corrupted = TRUE.
7727 (decode_header_data): add FIXME that char* is evil. Was going to
7728 add FIXME about evil locale-specific string.h strncmp, but just
7729 switched to wacky string-as-uint32 optimization. Move check for
7730 "no room for field name" above get_const_data_len() to avoid
7731 assertion failure in get_const_data_len if we have trailing 2
7732 bytes or the like. Check for service and name fields being
7733 provided twice. Don't leak service/name on error. Require field
7734 names to be aligned to 4 bytes.
7736 * dbus/dbus-marshal.c: move byte swap stuff to header
7737 (_dbus_pack_int32): uscore-prefix
7738 (_dbus_unpack_int32): uscore-prefix
7739 (_dbus_unpack_uint32): export
7740 (_dbus_demarshal_string): add @todo complaining about use of
7742 (_dbus_marshal_get_field_end_pos): add @todo about bad error
7743 handling allowing corrupt data to go unchecked
7745 2003-01-08 Havoc Pennington <hp@redhat.com>
7747 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
7748 to the select() as needed for authentication. (should be using
7749 _dbus_poll() not select, but for another day)
7751 * dbus/dbus.h: include dbus/dbus-protocol.h
7753 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7755 * dbus/Makefile.am (dbusinclude_HEADERS): Install
7758 2003-01-08 Anders Carlsson <andersca@codefactory.se>
7760 * dbus/dbus-internals.c: (_dbus_type_to_string):
7761 New function that returns a string describing a type.
7763 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7764 * dbus/dbus-marshal.h:
7765 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7766 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7767 (dbus_message_iter_get_byte_array):
7768 * dbus/dbus-message.h:
7769 Add new convenience functions for appending and getting message fields.
7770 Also add demarshalling routines for byte arrays.
7772 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7774 * dbus/dbus-connection-internal.h:
7775 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7776 (_dbus_connection_get_next_client_serial),
7777 (dbus_connection_send_message):
7778 * dbus/dbus-internals.h:
7779 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7780 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7781 (_dbus_marshal_uint32), (_dbus_demarshal_double),
7782 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7783 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7784 (_dbus_verbose_bytes), (_dbus_marshal_test):
7785 * dbus/dbus-marshal.h:
7786 * dbus/dbus-message-internal.h:
7787 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7788 (dbus_message_write_header), (_dbus_message_lock),
7789 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7790 (dbus_message_get_name), (dbus_message_append_int32),
7791 (dbus_message_append_uint32), (dbus_message_append_double),
7792 (dbus_message_append_string), (dbus_message_append_byte_array),
7793 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7794 (dbus_message_iter_unref), (dbus_message_iter_has_next),
7795 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7796 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7797 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7798 (decode_header_data), (_dbus_message_loader_return_buffer),
7799 (message_iter_test), (_dbus_message_test):
7800 * dbus/dbus-message.h:
7801 * dbus/dbus-protocol.h:
7802 * dbus/dbus-test.c: (main):
7804 * glib/test-dbus-glib.c: (message_handler), (main):
7805 * test/echo-client.c: (main):
7806 * test/watch.c: (check_messages):
7807 Make messages sendable and receivable for real.
7809 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7811 * dbus/dbus-marshal.c: (_dbus_marshal_double),
7812 (_dbus_marshal_string), (_dbus_marshal_byte_array):
7813 * dbus/dbus-message.c: (dbus_message_append_int32),
7814 (dbus_message_append_uint32), (dbus_message_append_double),
7815 (dbus_message_append_string), (dbus_message_append_byte_array):
7816 Handle OOM restoration.
7818 2003-01-07 Anders Carlsson <andersca@codefactory.se>
7820 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7821 (_dbus_demarshal_string), (_dbus_marshal_test):
7822 * dbus/dbus-marshal.h:
7823 * dbus/dbus-message.c: (dbus_message_get_name),
7824 Document these functions.
7826 (dbus_message_append_int32), (dbus_message_append_uint32),
7827 (dbus_message_append_double), (dbus_message_append_string),
7828 (dbus_message_append_byte_array):
7829 * dbus/dbus-message.h:
7830 Add functions for adding message fields of different types.
7832 * dbus/dbus-protocol.h:
7833 Add the different types.
7835 2003-01-05 Havoc Pennington <hp@pobox.com>
7837 * bus/connection.c: implement routines for handling connections,
7838 first thing is keeping a list of owned services on each connection
7839 and setting up watches etc.
7841 * bus/services.c: implement a mapping from service names to lists
7844 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7846 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7847 to use static mutexes for global data
7849 * dbus/dbus-connection.c (dbus_connection_set_data): add new
7850 collection of functions to set/get application-specific data
7851 on the DBusConnection.
7853 2003-01-04 Havoc Pennington <hp@pobox.com>
7855 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7856 (_dbus_poll): new function
7858 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7861 * bus/loop.c: initial code for the daemon main loop
7863 2003-01-04 Havoc Pennington <hp@pobox.com>
7865 * test/watch.c (error_handler): make it safe if the error handler
7866 is called multiple times (if we s/error handler/disconnect
7867 handler/ we should just guarantee it's called only once)
7869 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7870 error handler on disconnect (it's quite possible we should
7871 just change the error handler to a "disconnect handler," I'm
7872 not sure we have any other meaningful errors)
7874 * configure.in: check for getpwnam_r
7876 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7877 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7878 mechanism as in SASL spec, using socket credentials
7880 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7881 (_dbus_send_credentials_unix_socket): new function
7883 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7885 (_dbus_write): only check errno if <0 returned
7886 (_dbus_write_two): ditto
7888 2003-01-02 Anders Carlsson <andersca@codefactory.se>
7890 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7891 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7892 (_dbus_marshal_test):
7893 * dbus/dbus-marshal.h:
7894 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7895 to _dbus_marshal_utf8_string. Also fix some tests.
7897 2002-12-28 Harri Porten <porten@kde.org>
7899 * configure.in: added check for C++ compiler and a very cheesy
7900 check for the Qt integration
7902 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7904 * qt/Makefile.am: added
7906 * qt/.cvsignore: added
7908 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7909 latter, added #ifdef QT_THREAD_SUPPORT guard.
7911 * dbus/Makefile.am: added missing headers for make dist
7913 2002-12-28 Kristian Rietveld <kris@gtk.org>
7915 * dbus/Makefile.am: fixup export-symbols-regex.
7917 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7919 * acinclude.m4: Add this file and put the
7920 PKG_CHECK_MODULE macro in it.
7922 2002-12-27 Anders Carlsson <andersca@codefactory.se>
7924 * dbus/dbus-marshal.c: (_dbus_marshal_string),
7925 (_dbus_demarshal_double), (_dbus_demarshal_int32),
7926 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7927 (_dbus_marshal_test):
7928 Make the demarshalling routines align the pos argument.
7929 Add string marshalling tests and fix the obvious bugs
7932 2002-12-26 Havoc Pennington <hp@pobox.com>
7934 * dbus/dbus-auth.c: fixes fixes fixes
7936 * dbus/dbus-transport-unix.c: wire up support for
7937 encoding/decoding data on the wire
7939 * dbus/dbus-auth.c (_dbus_auth_encode_data)
7940 (_dbus_auth_decode_data): append to target string
7941 instead of nuking it.
7943 2002-12-26 Havoc Pennington <hp@pobox.com>
7945 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7946 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7949 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7950 avoid swap_bytes() overhead (ignoring possible assembly stuff for
7951 now). Main point is because I wanted unpack_uint32 to implement
7953 (_dbus_verbose_bytes): new function
7955 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7957 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7958 mechanism to handle a corrupt message stream
7959 (_dbus_message_loader_new): fix preallocation to only prealloc,
7962 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7963 (_dbus_string_test): enhance tests for copy/move and fix the
7966 * dbus/dbus-transport-unix.c: Hold references in more places to
7967 avoid reentrancy problems
7969 * dbus/dbus-transport.c: ditto
7971 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7972 leak reference count in no-message case
7974 * test/watch.c (do_mainloop): handle adding/removing watches
7975 during iteration over the watches. Also, ref the connection/server
7976 stored on a watch, so we don't try to mangle a destroyed one.
7978 * dbus/dbus-transport-unix.c (do_authentication): perform
7981 * dbus/dbus-auth.c (get_state): add a state
7982 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7983 (_dbus_auth_get_unused_bytes): append the unused bytes
7984 to the passed in string, rather than prepend
7986 * dbus/dbus-transport.c (_dbus_transport_init_base): create
7987 the auth conversation DBusAuth
7989 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7990 (_dbus_transport_new_for_domain_socket): when creating a
7991 transport, pass in whether it's a client-side or server-side
7992 transport so we know which DBusAuth to create
7994 2002-12-03 Havoc Pennington <hp@pobox.com>
7996 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7997 _after_ finalizing the derived members
7998 (unix_connection_set): unref watch if we fail to add it
8000 * dbus/dbus-connection.c (dbus_connection_unref): delete the
8001 transport first, so that the connection owned by the
8002 transport will be valid as the transport finalizes.
8004 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
8005 if necessary, and remove watches from the connection.
8007 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
8009 2002-12-26 Anders Carlsson <andersca@codefactory.se>
8011 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8012 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8013 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8014 (_dbus_marshal_test):
8015 * dbus/dbus-marshal.h:
8016 Add string marshal functions and have the demarshal functions
8017 return the new position.
8019 2002-12-25 Havoc Pennington <hp@pobox.com>
8021 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
8022 it is a simple protocol that just maps directly to SASL.
8024 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
8025 initial implementation, not actually used yet.
8027 * dbus/dbus-string.c (_dbus_string_find): new function
8028 (_dbus_string_equal): new function
8029 (_dbus_string_base64_encode): new function
8030 (_dbus_string_base64_decode): new function
8032 2002-12-25 Anders Carlsson <andersca@codefactory.se>
8035 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
8036 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8037 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8038 (_dbus_demarshal_uint32), (_dbus_marshal_test):
8039 * dbus/dbus-marshal.h:
8040 * dbus/dbus-protocol.h:
8041 * dbus/dbus-test.c: (main):
8043 Add un-optimized marshalling/demarshalling routines.
8045 2002-12-25 Harri Porten <porten@kde.org>
8047 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
8049 2002-12-24 Zack Rusin <zack@kde.org>
8051 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
8052 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
8055 2002-12-24 Havoc Pennington <hp@pobox.com>
8057 * glib/dbus-gthread.c: fix include
8059 * glib/dbus-glib.h: rename DBusMessageHandler for now.
8060 I think glib API needs to change, though, as you don't
8061 want to use DBusMessageFunction, you want to use the
8062 DBusMessageHandler object. Probably
8063 dbus_connection_open_with_g_main_loop()
8064 and dbus_connection_setup_g_main_loop() or something like that
8065 (but think of better names...) that just create a connection
8066 that has watch/timeout functions etc. already set up.
8068 * dbus/dbus-connection.c
8069 (dbus_connection_send_message_with_reply): new function just to
8070 show how the message handler helps us deal with replies.
8072 * dbus/dbus-list.c (_dbus_list_remove_last): new function
8074 * dbus/dbus-string.c (_dbus_string_test): free a string that
8077 * dbus/dbus-hash.c: use memory pools for the hash entries
8078 (rebuild_table): be more paranoid about overflow, and
8079 shrink table when we can
8080 (_dbus_hash_test): reduce number of sprintfs and write
8081 valid C89. Add tests for case where we grow and then
8082 shrink the hash table.
8084 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
8086 * dbus/dbus-connection.c (dbus_connection_register_handler)
8087 (dbus_connection_unregister_handler): new functions
8089 * dbus/dbus-message.c (dbus_message_get_name): new
8091 * dbus/dbus-list.c: fix docs typo
8093 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
8094 an object representing a handler for messages.
8096 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8099 * glib/dbus-gthread.c: (dbus_gthread_init):
8100 Don't use the gdbus prefix for public functions.
8102 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8106 Add GLib checks and fixup .pc files
8110 * glib/dbus-gmain.c: (gdbus_connection_prepare),
8111 (gdbus_connection_check), (gdbus_connection_dispatch),
8112 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
8113 (dbus_connection_gsource_new):
8114 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
8115 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
8116 * glib/test-dbus-glib.c: (message_handler), (main):
8119 2002-12-15 Harri Porten <porten@kde.org>
8121 * autogen.sh: check for libtoolize before attempting to use it
8123 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
8126 * .cvsignore: ignore more stamp files
8128 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
8130 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
8131 without make install.
8133 2002-12-15 Havoc Pennington <hp@pobox.com>
8135 * dbus/dbus-threads.c: add thread stubs that a higher library
8136 layer can fill in. e.g. the GLib wrapper might fill them in with
8137 GThread stuff. We still need to use this thread API to
8138 thread-safe-ize the library.
8140 2002-12-12 Havoc Pennington <hp@pobox.com>
8142 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
8143 below new interfaces and include fewer system headers.
8145 * dbus/dbus-sysdeps.c (_dbus_read): new function
8146 (_dbus_write): new function
8147 (_dbus_write_two): new function
8148 (_dbus_connect_unix_socket): new function
8149 (_dbus_listen_unix_socket): new function
8151 * dbus/dbus-message-internal.h: change interfaces to use
8154 2002-12-11 Havoc Pennington <hp@pobox.com>
8156 * dbus/dbus-types.h: add dbus_unichar
8158 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
8160 * dbus/dbus-connection.c (dbus_connection_send_message): return
8163 * dbus/dbus-transport.c: include dbus-watch.h
8165 * dbus/dbus-connection.c: include dbus-message-internal.h
8167 * HACKING: add file with coding guidelines stuff.
8169 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
8170 handling here, for security purposes (as in vsftpd). Not actually
8171 using this class yet.
8173 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
8174 system/libc usage here, as in vsftpd, for ease of auditing (and
8175 should also simplify portability). Haven't actually moved all the
8176 system/libc usage into here yet.
8178 2002-11-25 Havoc Pennington <hp@pobox.com>
8180 * dbus/dbus-internals.c (_dbus_verbose): fix to not
8181 always print the first verbose message.
8183 2002-11-24 Havoc Pennington <hp@pobox.com>
8185 * test/echo-client.c, test/echo-server.c: cheesy test
8188 * configure.in (AC_CHECK_FUNCS): check for writev
8190 * dbus/dbus-message.c (_dbus_message_get_network_data): new
8193 * dbus/dbus-list.c (_dbus_list_foreach): new function
8195 * dbus/dbus-internals.c (_dbus_verbose): new function
8197 * dbus/dbus-server.c, dbus/dbus-server.h: public object
8198 representing a server that listens for connections.
8200 * dbus/.cvsignore: create
8202 * dbus/dbus-errors.h, dbus/dbus-errors.c:
8203 public API for reporting errors
8205 * dbus/dbus-connection.h, dbus/dbus-connection.c:
8206 public object representing a connection that
8207 sends/receives messages. (Same object used for
8208 both client and server.)
8210 * dbus/dbus-transport.h, dbus/dbus-transport.c:
8211 Basic abstraction for different kinds of stream
8212 that we might read/write messages from.
8214 2002-11-23 Havoc Pennington <hp@pobox.com>
8216 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
8219 * dbus/dbus-test.c (main): add list test, and include
8220 dbus-test.h as intended
8222 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
8223 (_dbus_hash_table_remove_int): return value indicates
8224 whether the entry existed to remove
8226 * dbus/dbus-list.c: add linked list utility class,
8229 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
8232 2002-11-23 Havoc Pennington <hp@pobox.com>
8234 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
8235 DBUS_END_DECLS to nothing, that should fix this once and for all
8237 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
8239 * dbus/dbus-message.c, dbus/dbus-hash.c:
8240 add some missing @brief
8242 2002-11-23 Havoc Pennington <hp@pobox.com>
8244 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
8245 to avoid confusing Doxygen
8247 * dbus/dbus-hash.c: @} not }@
8249 * dbus/dbus-message.c (struct DBusMessage): split out
8252 2002-11-23 Havoc Pennington <hp@pobox.com>
8254 * configure.in: pile on more warning flags if using gcc
8256 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
8257 to document static functions
8259 * configure.in: add summary to end of configure so it
8260 looks nice and attractive
8262 * dbus/dbus-hash.c: finish implementation and write unit
8265 * configure.in: add --enable-tests to enable unit tests
8267 * dbus/dbus-test.c: test program to run unit tests
8268 for all files in dbus/*, initially runs a test for
8271 * dbus/dbus-internals.h: file to hold some internal utility stuff
8273 2002-11-22 Havoc Pennington <hp@redhat.com>
8275 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
8276 "ported" away from Tcl
8278 * dbus/dbus-types.h: header for types such as dbus_bool_t
8280 2002-11-22 Havoc Pennington <hp@redhat.com>
8282 * dbus/dbus.h: fixups for doc warnings
8284 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
8286 (QUIET): make it quiet so we can see warnings
8288 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
8290 2002-11-22 Havoc Pennington <hp@redhat.com>
8292 * Makefile.am: include "Doxyfile" target in all-local
8294 * configure.in: generate the Doxyfile
8296 * Doxyfile.in: move Doxyfile here, so we can use
8297 configure to generate a Doxyfile with the right
8300 2002-11-22 Havoc Pennington <hp@redhat.com>
8302 * dbus/dbus-message.c: move inline docs into .c file
8304 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
8305 so all docs are under doc/
8306 (MAN_EXTENSION): generate man pages. Use extension
8307 ".3dbus" which matches ".3qt" on my system,
8308 I guess this is OK, I don't know really.
8309 (FILE_PATTERNS): look for .c files not .h, makes sense
8312 2002-11-22 Havoc Pennington <hp@pobox.com>
8314 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
8315 because any app can be a server, and any app can be a client,
8316 the bus is a special kind of server.
8318 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
8320 * Doxyfile : adding. Still needs Makefile rules to be generated
8321 automatically (just run "doxygen" in the toplevel dir for now to
8324 * dbus/dbus-message.h : Adding sample docs (javadoc since
8325 resembles gtk-doc a little more)
8327 * dbus/dbus.h : Adding sample docs
8329 2002-11-21 Havoc Pennington <hp@redhat.com>
8331 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
8332 so we can allow ourselves to include files directly,
8333 instead of having to use dbus.h
8335 * dbus/dbus.h: fill in
8337 * dbus/dbus-message.h: sketch out a sample header file.
8338 Include griping if you include it directly instead of
8341 * dbus/dbus-macros.h: new file with macros for extern "C",
8342 TRUE/FALSE, NULL, etc.
8344 * doc/file-boilerplate.c: put include guards in here
8346 2002-11-21 Havoc Pennington <hp@redhat.com>
8348 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
8350 * COPYING: include the GPL as well, and license code
8351 under both AFL and GPL.
8353 2002-11-21 Havoc Pennington <hp@redhat.com>
8355 * acconfig.h: get rid of this
8357 * autogen.sh (run_configure): add --no-configure option
8359 * configure.in: remove AC_ARG_PROGRAM to make
8360 autoconf complain less. add AC_PREREQ.
8361 add AC_DEFINE third arg.
8363 2002-11-21 Anders Carlsson <andersca@codefactory.se>
8366 Fix references so we can distcheck.
8368 2002-11-21 Havoc Pennington <hp@redhat.com>
8370 * Initial module creation