1 2003-05-04 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
6 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
7 function, which assumed length was in # of strings, not bytes
9 * dbus/dbus-message.c (_dbus_message_test): add tests for some
12 * dbus/dbus-connection.c
13 (_dbus_connection_queue_received_message): disable function for
14 now, we are only using it in test mode
16 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
17 remove a mistaken FIXME
19 2003-05-04 Havoc Pennington <hp@pobox.com>
21 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
22 unlock mutex on successful return, patch from Anders Gustafsson
24 2003-05-04 Havoc Pennington <hp@pobox.com>
26 * dbus-glib-1.pc.in (Requires): fix dependencies, from
29 2003-05-04 Havoc Pennington <hp@pobox.com>
31 * tools/dbus-launch.c: implement
33 * bus/main.c (main), bus/bus.c (bus_context_new):
34 implement --print-pid and --fork
36 2003-05-03 Havoc Pennington <hp@redhat.com>
38 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
39 the address had no value, and add to test suite. Fix and
40 regression test from Miloslav Trmac
42 2003-05-03 Havoc Pennington <hp@pobox.com>
44 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
45 watch is invalid when handled
47 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
48 dbus-launch utility to launch the bus from a shell script. Didn't
49 actually implement dbus-launch yet, it's just a placeholder still.
51 2003-05-03 Havoc Pennington <hp@pobox.com>
53 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
54 daemon; also documents daemon config file, so replaces
55 doc/config-file.txt. Corrected some stuff from config-file.txt in
56 the process of moving it.
58 2003-05-03 Havoc Pennington <hp@pobox.com>
60 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
63 2003-05-03 Colin Walters <walters@verbum.org>
65 * dbus/dbus-sysdeps.c (fill_user_info): Test against
66 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
68 * Makefile.am: Update to use new .pc versioning scheme.
70 2003-05-02 Havoc Pennington <hp@redhat.com>
72 * bus/system.conf.in: allow send/receive to/from message bus
75 2003-04-30 Havoc Pennington <hp@redhat.com>
77 * configure.in: print a note when building with unit tests and
80 2003-04-30 Havoc Pennington <hp@redhat.com>
82 * Makefile.am: add a check-local that complains if you didn't
83 configure with --enable-tests
85 2003-04-29 Havoc Pennington <hp@redhat.com>
87 * glib/dbus-gmain.c: docs cleanups
89 * dbus/dbus-types.h: add docs on int64 types
91 * dbus/dbus-memory.c: fix docs to avoid putting private API in
92 public API docs section
94 2003-04-29 Havoc Pennington <hp@redhat.com>
96 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
97 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
98 parallel install API version, not with the D-BUS package version.
100 * HACKING: move some of README over here
102 * README: updates, and document API/ABI policy
104 * configure.in: reindentation
106 2003-04-29 Havoc Pennington <hp@redhat.com>
108 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
109 to use this library" to be sure people have the right
112 2003-04-28 Havoc Pennington <hp@redhat.com>
114 * configure.in: add --enable-docs which by default is auto yes if
115 doxygen and db2html found, no otherwise; but can be forced on/off
117 * doc/Makefile.am: conditionalize whether to build docs on
120 2003-04-28 Havoc Pennington <hp@redhat.com>
126 * bus/system.conf.in: add <includedir>system.d</includedir>
128 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
129 username was provided but not uid
131 * bus/config-parser.c (struct BusConfigParser): keep track of
132 whether the parser is toplevel or was included; change some
133 of the error handling if it's included.
135 2003-04-27 Havoc Pennington <hp@pobox.com>
139 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
140 report correct status if we finish processing authentication
141 inside this function.
143 * bus/activation.c (try_send_activation_failure): use
144 bus_transaction_send_error_reply
146 * bus/connection.c (bus_connection_get_groups): return an error
147 explaining the problem
149 * bus/bus.c (bus_context_check_security_policy): implement
150 restriction here that inactive connections can only send the
151 hello message. Also, allow bus driver to send anything to
154 * bus/connection.c (bus_connection_complete): create the
155 BusClientPolicy here instead of on-demand.
156 (bus_connection_get_policy): don't return an error
158 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
159 sender field in message being replied to
161 * bus/bus.c (bus_context_check_security_policy): fix silly typo
162 causing it to return FALSE always
164 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
165 we checked sender rather than destination
167 2003-04-25 Havoc Pennington <hp@redhat.com>
169 test suite is slightly hosed at the moment, will fix soon
171 * bus/connection.c (bus_connections_expire_incomplete): fix to
172 properly disable the timeout when required
173 (bus_connection_set_name): check whether we can remove incomplete
174 connections timeout after we complete each connection.
176 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
177 probably still broken.
179 * bus/services.c (bus_registry_acquire_service): implement max
180 number of services owned, and honor allow/deny rules on which
181 services a connection can own.
183 * bus/connection.c (bus_connection_get_policy): report errors here
185 * bus/activation.c: implement limit on number of pending
188 2003-04-25 Havoc Pennington <hp@redhat.com>
190 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
191 where we used >= 0 instead of != DBUS_UID_UNSET.
193 2003-04-25 Havoc Pennington <hp@redhat.com>
195 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
196 were toggled without add/remove, fix from Anders Gustafsson
198 2003-04-24 Havoc Pennington <hp@redhat.com>
200 * test/data/valid-config-files/basic.conf: add <limit> tags to
203 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
204 <limit> tag in configuration file.
206 2003-04-24 Havoc Pennington <hp@redhat.com>
208 * bus/dispatch.c: somehow missed some name_is
210 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
211 (_dbus_timeout_set_interval): new
213 * bus/connection.c (bus_connections_setup_connection): record time
214 when each connection is first set up, and expire them after the
217 2003-04-24 Havoc Pennington <hp@redhat.com>
219 * dbus/dbus-message.c (dbus_message_name_is): rename
220 (dbus_message_service_is): rename
221 (dbus_message_sender_is): rename
222 (dbus_message_get_service): rename
224 2003-04-24 Havoc Pennington <hp@redhat.com>
226 * configure.in: add --enable-checks
228 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
230 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
232 (_dbus_connection_handler_destroyed_locked): move some private
233 functions into proper docs group
235 * dbus/dbus-internals.h: add _dbus_return_if_fail,
236 _dbus_return_val_if_fail
238 Throughout: use dbus_return_if_fail
240 2003-04-23 James Willcox <jwillcox@gnome.org>
243 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
244 (dbus_connection_setup_with_g_main),
245 (dbus_server_setup_with_g_main):
246 * glib/test-dbus-glib.c: (main):
247 * glib/test-thread-client.c: (main):
248 * glib/test-thread-server.c: (new_connection_callback), (main):
249 * tools/dbus-monitor.c: (main):
251 Added a GMainContext argument to dbus_connection_setup_with_g_main()
252 and dbus_server_setup_with_g_main().
254 2003-04-20 Havoc Pennington <hp@pobox.com>
256 * doc/dbus-specification.sgml: document the restrictions on
257 message and service names
259 2003-04-22 Havoc Pennington <hp@redhat.com>
261 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
262 support, and do some code cleanups to share more code and
263 speed up array marshal/demarshal.
265 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
267 * configure.in: generate dbus-arch-deps.h
269 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
272 2003-04-22 Havoc Pennington <hp@redhat.com>
274 * test/data/valid-messages/opposite-endian.message: fix test
275 to use proper type for rply field
277 * test/data/invalid-messages: add tests for below validation
279 * dbus/dbus-message.c (decode_header_data): validate field types,
280 and validate that named fields are valid names
281 (decode_name_field): consider messages in the
282 org.freedesktop.Local. namespace to be invalid.
284 * dbus/dbus-string.c (_dbus_string_validate_name): new
286 2003-04-19 Havoc Pennington <hp@pobox.com>
288 * bus/driver.c (bus_driver_handle_hello): check limits and
289 return an error if they are exceeded.
291 * bus/connection.c: maintain separate lists of active and inactive
292 connections, and a count of each. Maintain count of completed
293 connections per user. Implement code to check connection limits.
295 * dbus/dbus-list.c (_dbus_list_unlink): export
297 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
298 number of bytes in the message queue for a connection
300 2003-04-18 Havoc Pennington <hp@pobox.com>
302 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
304 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
307 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
308 on realloc be sure to update the pointer in the keyring
310 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
311 offset to avoid writing to unallocated memory
313 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
314 try the next mechanism, so we properly handle OOM
316 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
318 (_dbus_keyring_new): fix OOM bug
319 (_dbus_keyring_new_homedir): always set error; impose a maximum
320 number of keys we'll load from the file, mostly to speed up the
321 test suite and make its OOM checks more useful, but also for
324 * dbus/dbus-auth.c (process_error_server): reject authentication
325 if we get an error from the client
326 (process_cancel): on cancel, send REJECTED, per the spec
327 (process_error_client): send CANCEL if we get an error from the
330 2003-04-18 Havoc Pennington <hp@pobox.com>
332 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
335 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
338 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
339 about DBUS_TEST_HOMEDIR once
341 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
344 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
345 config file so we test the right thing
347 Throughout: assorted docs improvements
349 2003-04-18 Havoc Pennington <hp@pobox.com>
351 * glib/dbus-gmain.c: adapt to watch changes
353 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
355 * dbus/dbus-server.h: remove dbus_server_handle_watch
357 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
359 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
360 like DBusTimeout, so we don't need dbus_connection_handle_watch
363 2003-04-17 Havoc Pennington <hp@redhat.com>
365 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
366 database usage so it all goes via the DBusUserDatabase cache.
368 2003-04-17 Havoc Pennington <hp@redhat.com>
370 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
371 there was an OOM watch we skipped, we always return TRUE so we
372 iterate again to have a look at it again. Fixes test suite hang.
373 Code rearrangement also lets us lose some memset and only iterate
376 * bus/driver.c (bus_driver_handle_message): sense of test for
379 2003-04-16 Havoc Pennington <hp@pobox.com>
381 * doc/dbus-specification.sgml: make spec say serials are unsigned
383 * dbus/dbus-message.h: change message serials to unsigned
385 * dbus/dbus-connection.c: adapt to message serials being unsigned
387 2003-04-15 Havoc Pennington <hp@pobox.com>
389 * bus/bus.c: create and keep around a shared DBusUserDatabase
392 * bus/connection.c (bus_connection_get_groups): don't cache
393 groups for user in the connection object, since user database
394 object now does that.
396 2003-04-16 Havoc Pennington <hp@redhat.com>
398 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
399 list of size counters
400 (_dbus_message_loader_putback_message_link): put back a popped link
402 * dbus/dbus-connection.c
403 (dbus_connection_set_max_live_messages_size): rename
405 (dbus_connection_get_outgoing_size): get size of outgoing
407 (_dbus_connection_set_connection_counter): remove this cruft
409 2003-04-14 Havoc Pennington <hp@redhat.com>
411 * dbus/dbus-userdb.c: user database abstraction, mostly to get
412 caching, but at some point we might want to be able to use a
415 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
416 SHA1 conf file to test the sha1 auth mechanism, since the regular
417 test always uses EXTERNAL when available.
420 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
421 add conf file that requires use of sha1 auth
423 2003-04-13 Havoc Pennington <hp@pobox.com>
425 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
426 from Philip Blundell to send messages and monitor them.
428 2003-04-13 Havoc Pennington <hp@pobox.com>
430 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
433 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
436 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
437 fix to only recover unused bytes if we're already authenticated
438 (_dbus_transport_get_is_authenticated): fix to still mark us
439 authenticated if there are unused bytes.
441 * bus/dispatch.c: implement security policy checking
443 * bus/connection.c (bus_transaction_send_from_driver): new
445 * bus/bus.c (bus_context_check_security_policy): new
447 * bus/dispatch.c (send_service_nonexistent_error): delete this,
448 now we just set the DBusError and it gets converted to an error
451 * bus/connection.c (allow_user_function): enable code using actual
452 data from the config file
454 * bus/policy.c (list_allows_user): handle wildcard rules for
455 user/group connection perms
457 2003-04-13 Havoc Pennington <hp@pobox.com>
459 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
461 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
463 * bus/policy.c (bus_policy_append_mandatory_rule)
464 (bus_policy_append_default_rule, bus_policy_append_user_rule)
465 (bus_policy_append_group_rule): new functions
467 2003-04-12 Havoc Pennington <hp@pobox.com>
469 * bus/config-parser.c (bus_config_parser_new): fix a memleak
471 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
472 the pid/gid/uid, just for paranoia.
474 * test/break-loader.c (randomly_do_n_things): find a byte
475 containing a type code, and randomly change it to a different
478 2003-04-12 Havoc Pennington <hp@pobox.com>
480 * bus/policy.h: change BusPolicy to be the thing from the config
481 file, and rename old BusPolicy to BusClientPolicy
483 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
484 match change in how policy works
486 * dbus/dbus-internals.h: mark assert_not_reached as
487 __attribute((noreturn))__
489 2003-04-11 Havoc Pennington <hp@redhat.com>
491 * doc/dbus-specification.sgml: fix a spot with the wrong name for
492 the broadcast service. Use boolean return for ServiceExists.
494 2003-04-11 Havoc Pennington <hp@redhat.com>
496 * configure.in: add another directory to look for qt in.
498 2003-04-11 Havoc Pennington <hp@redhat.com>
500 * AUTHORS: add Colin Walters
502 2003-04-11 Havoc Pennington <hp@redhat.com>
508 2003-04-11 Havoc Pennington <hp@redhat.com>
510 * bus/messagebus.in: remove pid file when stopping the
511 message bus, since the bus won't have privileges to remove it
514 2003-04-11 Havoc Pennington <hp@redhat.com>
516 * bus/bus.c (bus_context_new): move credentials change after
519 2003-04-11 Havoc Pennington <hp@pobox.com>
521 * test/decode-gcov.c: add "below average functions" to the
522 coverage report, and change how some of the code works.
524 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
525 not in the coverage stats.
527 * test/test-service.c (main): use _dbus_verbose not fprintf in a
528 couple places so running the test suite doesn't result in megaspam.
530 2003-04-11 Havoc Pennington <hp@pobox.com>
532 * bus/dispatch.c (check_existent_service_activation): accept a no
533 memory error in a place we didn't before
535 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
536 in case the first one failed," since the test suite is less
539 2003-04-10 Havoc Pennington <hp@pobox.com>
541 * bus/dispatch.c (check_segfault_service_activation): add test
542 for launching an executable that just crashes.
544 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
545 don't leave a million cores. We'll see how portable this is.
547 2003-04-10 Havoc Pennington <hp@pobox.com>
549 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
550 the possible parent failures before we fork, so that we don't
551 fail to create a babysitter after creating the child.
553 * bus/activation.c (bus_activation_activate_service): kill child
554 if we don't successfully complete the activation.
556 2003-04-10 Havoc Pennington <hp@redhat.com>
558 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
559 the connection if it's disconnected
561 * bus/activation.c (bus_activation_service_created): use new
562 transaction features to roll back removal of pending activation if
563 we don't successfully create the service after all. Don't remove
564 pending activation if the function fails.
566 * dbus/dbus-list.c (_dbus_list_insert_before_link)
567 (_dbus_list_insert_after_link): new code to facilitate
570 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
571 new functionality, so we can preallocate the ability to insert
574 * bus/connection.c (bus_transaction_add_cancel_hook): new function
575 allowing us to put custom hooks in a transaction to be used for
576 cancelling said transaction
578 * doc/dbus-specification.sgml: add some discussion of secondary
579 service owners, and disallow zero-length service names
581 * bus/services.c (bus_registry_acquire_service): new function,
582 splits out part of bus_driver_handle_acquire_service() and fixes
583 a bug where we didn't remove the service doing the acquiring
584 from the secondary queue if we failed to remove the current owner
585 from the front of the queue.
587 2003-04-10 Alexander Larsson <alexl@redhat.com>
589 * doc/dbus-specification.sgml:
590 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
592 2003-04-10 Alexander Larsson <alexl@redhat.com>
597 Added files to cvsignore
599 * dbus/dbus-message.h:
600 * dbus/dbus-message.c: (dbus_message_iter_get_named):
601 Make get_named() take two out argument and return a boolean.
602 (dbus_message_iter_get_args_valist):
603 Update usage of get_named().
604 (dbus_message_iter_append_byte):
606 (dbus_message_iter_append_named)
608 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
611 2003-04-10 Alexander Larsson <alexl@redhat.com>
613 * dbus/dbus-marshal.[ch]:
614 Add array_type_pos argument to _dbus_marshal_validate_arg.
615 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
617 * dbus/dbus-message.[ch]:
618 Multi-dimensional arrays have full type specification in the
619 outermost array. Iter code re-arranged to handle this.
620 Added some more iter tests.
622 * doc/dbus-specification.sgml:
625 Update new array encoding description.
626 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
628 * test/data/invalid-messages/array-with-mixed-types.message:
629 * test/data/valid-messages/array-of-array-of-uint32.message:
630 Change to the new array format.
632 * test/data/invalid-messages/too-short-dict.message:
635 * test/data/valid-messages/recursive-types.message:
636 Fix up and extend test.
638 2003-04-10 Havoc Pennington <hp@pobox.com>
640 * bus/dispatch.c: lots of fixes
642 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
643 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
644 that was crack, broke the test service.
646 * dbus/dbus-transport.c (_dbus_transport_open): fix error
647 handling to avoid piling up errors if we get a failure on the
650 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
651 pid in assertion failures.
653 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
654 to some fixed size of file descriptor array. Don't return TRUE
655 anytime a timeout exists, that led to lots of busy loop silliness
658 2003-04-09 Havoc Pennington <hp@redhat.com>
660 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
661 I'd checked this in earlier but hadn't.
663 2003-04-09 Havoc Pennington <hp@redhat.com>
665 * bus/dispatch.c (bus_dispatch_test): get a bit further through
666 the activation test (man this is getting old!)
668 2003-04-09 Havoc Pennington <hp@redhat.com>
670 * test/test-utils.c: use dispatch status function to fix this up
672 * bus/connection.c (connection_watch_callback): don't dispatch
674 (connection_timeout_callback): don't dispatch from here
675 (bus_connections_setup_connection): set the dispatch status function
676 (bus_connection_disconnected): unset it
678 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
679 used to add a connection to be dispatched
680 (_dbus_loop_iterate): do the dispatching at the end of each
683 * dbus/dbus-connection.c
684 (dbus_connection_set_dispatch_status_function): new function
685 allowing us to fix up main loop usage
686 (_dbus_connection_last_unref): free all the various function
688 (dbus_connection_dispatch): call the DispatchStatusFunction
689 whenever this function returns
690 (dbus_connection_handle_watch): call DispatchStatusFunction
691 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
692 (reply_handler_timeout): call DispatchStatusFunction
693 (dbus_connection_flush): call DispatchStatusFunction
695 2003-04-09 Havoc Pennington <hp@redhat.com>
697 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
700 * bus/dispatch.c (check_service_activated): fix bug in test
702 * dbus/dbus-mainloop.c (check_timeout): fix this up
704 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
705 verbose output so we can sort out output from different processes,
706 e.g. in the activation case.
708 2003-04-08 Colin Walters <walters@gnu.org>
710 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
712 (bus_context_new): Set it.
713 (bus_context_unref): Use it to delete the pid file.
715 2003-04-08 Havoc Pennington <hp@redhat.com>
717 * test/data/invalid-messages/array-with-mixed-types.message:
718 regression test that fails for the moment
720 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
721 tests for convenience
723 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
724 array of nil, it broke things.
726 * test/data/invalid-messages/array-of-nil.message: regression test
728 * test/data/valid-messages/array-of-array-of-uint32.message:
729 happened to write this so added it to suite
731 2003-04-08 Havoc Pennington <hp@redhat.com>
733 * bus/driver.c (bus_driver_handle_acquire_service): init
734 retval/reply before checking name
736 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
737 recursion depth argument
739 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
740 in the public struct for future extension
742 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
745 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
748 * doc/dbus-specification.sgml: fix typo
750 2003-04-08 Alexander Larsson <alexl@redhat.com>
752 Implemented recursive types, named types and new-style iters
755 * glib/test-thread-client.c: (thread_func):
756 * glib/test-thread-server.c: (handle_test_message):
757 * test/test-service.c: (handle_echo):
766 * dbus/dbus-internals.c: (_dbus_type_to_string):
767 Update for new types.
769 * dbus/dbus-marshal.[ch]:
770 Implement recursive types and the new marshalling format.
771 Remove hardcoded dict marshalling.
774 * dbus/dbus-message-builder.c:
776 Remove references to old types
778 * dbus/dbus-message.[ch]:
779 New non-refcounted iter API that supports recursive iters.
780 Use iters for appending, including support for recursive
782 Add byte and named type support.
783 Update everything to new marshalling formats.
784 Add tests for new API.
786 * dbus/dbus-protocol.h:
787 Remove old array types.
788 Add types: BYTE, ARRAY, DICT, NAMED
790 * dbus/dbus-string.c:
791 * dbus/dbus-sysdeps.c:
792 Make parse_double locale safe.
794 * dbus/dbus-test-main.c:
800 * doc/dbus-specification.sgml:
803 * test/data/incomplete-messages/missing-body.message:
804 * test/data/invalid-messages/bad-boolean.message:
805 * test/data/invalid-messages/bad-boolean-array.message:
806 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
807 * test/data/invalid-messages/boolean-has-no-value.message-raw:
808 * test/data/invalid-messages/too-short-dict.message:
809 * test/data/valid-messages/dict-simple.message:
810 * test/data/valid-messages/dict.message:
811 * test/data/valid-messages/emptiness.message:
812 * test/data/valid-messages/lots-of-arguments.message:
813 * test/data/valid-messages/no-padding.message:
814 * test/data/valid-messages/recursive-types.message:
815 Add missing NAME fields
816 Fix up dicts & arrays
818 * test/data/invalid-messages/dict-with-nil-value.message:
819 Removed, this is not invalid anymore.
821 * test/data/valid-messages/recursive-types.message:
822 Add new test for deeply recursive types.
824 2003-04-07 Havoc Pennington <hp@pobox.com>
826 * bus/driver.c (bus_driver_handle_acquire_service): return an
827 error if you try to acquire a service that starts with ':'
829 2003-04-07 Havoc Pennington <hp@redhat.com>
831 * doc/dbus-specification.sgml: require that base service names
832 start with ':' and that the base service is created/deleted
833 as first and last things a connection does on the bus
835 * bus/dispatch.c (check_existent_service_activation): lots more
836 work on the activation test; it doesn't fully pass yet...
838 * test/test-service.c (main): fix so we don't memleak the
839 connection to the message bus
840 (filter_func): accept a message asking us to exit
842 2003-04-06 Havoc Pennington <hp@pobox.com>
844 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
847 * configure.in: fixes to Qt detection from Colin Walters
849 * doc/Makefile.am: Only remove generated docbook dirs if they
850 exist, from Colin Walters
852 * dbus/dbus-bus.c: change how we set well-known connections to
853 NULL, so that it works if a single connection is stored in
854 two well-known array slots.
856 * test/Makefile.am: remove a lot of stuff that isn't immediately
857 useful, it's in CVS history if we want it.
859 * test/test-service.c: use dbus-mainloop instead of that
862 2003-04-06 Havoc Pennington <hp@pobox.com>
864 * dbus/Makefile.am: split lists of sources into stuff that goes in
865 the library, util functions that go in the lib and are also used
866 elsewhere, and util functions that are used in tests/daemon but
869 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
870 here so it can be used in test binaries also
872 2003-04-06 Havoc Pennington <hp@pobox.com>
874 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
875 here in the parent process, so we can return an error if it
876 fails. Also, move some of the code into the child so the parent
877 is less hosed if we fail midway through.
879 * bus/bus.c (bus_context_new): move pidfile detection further up
880 in the function, before we start overwriting sockets and such.
882 * bus/messagebus.in: adjust this a bit, not sure if it will work.
884 * configure.in: add --with-system-pid-file and --with-system-socket
886 2003-04-06 Colin Walters <walters@verbum.org>
888 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
890 * bus/system.conf.in: Declare a pidfile.
892 * bus/bus.c (bus_context_new): Test for an existing pid file, and
893 create one (if appropriate).
895 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
896 (struct BusConfigParser) [pidfile]: New.
897 (element_type_to_name, merge_included, start_busconfig_child)
898 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
899 (bus_config_parser_unref): Free it.
900 (bus_config_parser_get_pidfile): New function.
902 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
904 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
906 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
908 * dbus/dbus-sysdeps.h: Prototype it.
910 2003-04-06 Havoc Pennington <hp@pobox.com>
912 * bus/bus.c (bus_context_new): print the address in here, rather
913 than in main(), because we need to do it before forking the daemon
915 * bus/dispatch.c (send_service_nonexistent_error): set the sender
916 on the service nonexistent error
918 * bus/driver.c (bus_driver_handle_acquire_service): set the
919 sender on the AcquireService reply
921 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
922 server also listen on a UNIX socket so services can connect to it.
924 2003-04-06 Havoc Pennington <hp@pobox.com>
926 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
927 so it detects deadlocks and also we actually init threads when
930 2003-04-06 Havoc Pennington <hp@pobox.com>
932 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
933 save the domain socket name, and unlink it when we disconnect the
934 server. Means that at least when we exit normally, we won't leave
935 a bunch of junk in /tmp
937 * dbus/dbus-transport-unix.c
938 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
939 memory management). (I was making a real change here but then
942 2003-04-06 Havoc Pennington <hp@pobox.com>
944 * bus/bus.c (bus_context_new): fix wrong handling of
945 server_data_slot_unref() in the error case.
947 * dbus/dbus-internals.h (_dbus_assert): change so it passes
948 "(condition) != 0" to _dbus_real_assert so that
949 "_dbus_assert (pointer)" doesn't cause a warning
951 * bus/main.c (main): accept --print-address option to print out
952 the message bus address
954 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
956 * dbus/dbus-transport.c (_dbus_transport_open): special error for
957 "tmpdir" option to unix: address on client side
959 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
962 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
963 we can use to create sockets in the test suite.
965 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
966 cleanly. To be used for testing.
968 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
970 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
972 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
973 handle trying to call this when there's no servers active
975 2003-04-05 Havoc Pennington <hp@pobox.com>
981 2003-04-05 Havoc Pennington <hp@pobox.com>
983 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
984 crash on startup. Need to get "try starting the daemon"
985 in the test suite I guess. ;-)
987 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
988 tracked the number of open connections; it's better done in
989 application-specific code as you want it to span all servers etc.
991 2003-04-05 Havoc Pennington <hp@pobox.com>
993 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
994 patch from Colin Walters
996 2003-04-05 Havoc Pennington <hp@pobox.com>
998 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
999 reality; in fact multiple mechanisms are allowed.
1001 * dbus/dbus-internals.c (_dbus_real_assert)
1002 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
1003 _dbus_assert_not_reached() into functions, so that they don't show
1004 up in basic block counts for test coverage, and don't use up as
1005 much disk space. Does mean slower execution speed though, so
1006 assumes --disable-asserts is the normal production case.
1008 2003-04-05 Havoc Pennington <hp@pobox.com>
1010 * test/Makefile.am (dist-hook): also dist *.in files
1016 2003-04-05 Havoc Pennington <hp@pobox.com>
1018 * dbus/dbus-string.c: docs warning
1020 * dbus/dbus-spawn.c: missing docs
1022 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
1024 2003-04-05 Havoc Pennington <hp@pobox.com>
1026 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
1029 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
1030 to -1 once we've reaped the babysitter
1031 (_dbus_babysitter_handle_watch): do as much work as we can, not
1034 * bus/activation.c: add code using DBusBabysitter so that we
1035 handle it when a service fails to start up properly.
1036 (bus_activation_service_created): don't remove the activation
1037 entries as we go, just let them get removed when we free the pending
1038 activation. Unref reply messages after sending them.
1040 2003-04-05 Havoc Pennington <hp@pobox.com>
1042 * test/decode-gcov.c (main): print per-directory stats in the report
1044 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
1046 2003-04-05 Havoc Pennington <hp@pobox.com>
1048 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
1050 * test/decode-gcov.c: hack up a little program to suck data
1051 out of gcov files. Yes this is sort of silly.
1053 * configure.in: define something in config.h and do an
1054 AM_CONDITIONAL when gcov is enabled
1056 2003-04-04 Havoc Pennington <hp@redhat.com>
1058 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
1059 return a "babysitter" object that is used to monitor the status of
1060 the spawned process and reap it when required.
1062 * test/test-segfault.c, test/test-exit.c,
1063 test/test-sleep-forever.c: binaries that do various lame things,
1064 used in the test suite.
1066 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
1068 2003-04-03 Havoc Pennington <hp@pobox.com>
1070 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
1071 in preparation for modifying it, dbus-sysdeps is getting
1074 2003-04-03 Havoc Pennington <hp@redhat.com>
1076 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1079 * bus/*.[hc]: adapt to mainloop change
1081 2003-04-03 Havoc Pennington <hp@redhat.com>
1083 * bus/activation.c (load_directory): fix up memleaks
1084 (bus_activation_entry_free): free the entry
1086 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1087 we get one from the message bus; fix memleaks.
1089 * dbus/dbus-message.c (dbus_set_error_from_message): new function
1091 2003-04-03 Havoc Pennington <hp@pobox.com>
1093 * bus/config-parser.c (bus_config_parser_unref): free
1094 list of mechanisms, bug discovered by test suite enhancements
1095 (putting system.conf and session.conf into suite)
1097 * test/Makefile.am, test/test-service.c: add placeholder for a
1098 test service that we'll activate as part of test suite. Doesn't
1101 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
1102 setting NULL value, and use system malloc not dbus_malloc()
1103 when we have unavoidable memleakage.
1105 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1106 didn't work, and support DBUS_BUS_ACTIVATION.
1108 * bus/activation.c (child_setup): pass our well-known bus type to
1111 * bus/config-parser.c: support <type> to specify well-known type
1113 * doc/dbus-specification.sgml: document the env variables to
1114 locate well-known buses and find service activator
1116 2003-04-02 Havoc Pennington <hp@redhat.com>
1118 * test/Makefile.am (all-local): add a rule to copy tests to
1119 builddir, so we can have generated tests. Use this to remove the
1120 silly hack for testing system.conf and session.conf. Will use this
1121 shortly to generate .service files pointing to test binaries.
1123 2003-04-02 Havoc Pennington <hp@redhat.com>
1125 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1126 current alloc and needed new length, not max of the doubled
1127 allocation and needed new length. Also, when building tests,
1128 don't do the double-allocation stuff, just realloc every time.
1130 2003-04-02 Havoc Pennington <hp@redhat.com>
1132 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1134 (_dbus_string_get_dirname): new
1135 (_dbus_sysdeps_test): new
1136 (_dbus_directory_open): include dirnames in error messages
1138 * bus/config-parser.c: interpret <include> and <includedir> and
1139 <servicedir> relative to config file location if the given
1140 filename is not absolute.
1142 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1144 2003-04-02 Havoc Pennington <hp@redhat.com>
1146 * bus/connection.c (bus_transaction_send_error_reply): set sender
1147 service for the error, and unref the reply on success
1149 * bus/activation.c: convert to use BusTransaction so OOM can be
1151 (bus_activation_service_created): set sender of the message
1153 2003-04-01 Havoc Pennington <hp@redhat.com>
1155 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1156 <includedir> (at least mostly)
1158 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1159 first, then the user ID
1161 2003-04-01 Havoc Pennington <hp@pobox.com>
1163 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1166 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1168 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1170 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1171 socket 0777, and unlink any existing socket.
1173 * bus/bus.c (bus_context_new): change our UID/GID and fork if
1174 the configuration file so specifies; set up auth mechanism
1177 * bus/config-parser.c (bus_config_parser_content): add support
1178 for <fork> option and fill in code for <auth>
1180 * bus/system.conf.in: add <fork/> to default configuration,
1181 and limit auth mechanisms to EXTERNAL
1183 * doc/config-file.txt (Elements): add <fork>
1185 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1186 (_dbus_change_identity): new function
1188 2003-03-31 Havoc Pennington <hp@redhat.com>
1190 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
1191 (_dbus_listen_unix_socket): fix off-by-one error in null
1192 termination spotted by Nalin
1194 2003-03-31 Havoc Pennington <hp@redhat.com>
1196 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1197 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1198 having a real home directory available.
1200 2003-03-31 Havoc Pennington <hp@redhat.com>
1202 * bus/Makefile.am (install-data-hook): create /var/run/dbus
1204 * bus/messagebus.in: add init script for Red Hat /etc/init.d
1206 * configure.in: add support for specifying a style of init script
1209 2003-03-31 Havoc Pennington <hp@redhat.com>
1211 Fix some annoying DBusString API and fix all affected code.
1213 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1215 (_dbus_string_get_data): change to return string instead of using
1217 (_dbus_string_get_const_data): ditto
1218 (_dbus_string_get_data_len): ditto
1219 (_dbus_string_get_const_data_len): ditto
1221 2003-03-31 Havoc Pennington <hp@redhat.com>
1223 * bus/main.c (main): fix up the command line arguments to be nicer
1225 2003-03-31 Havoc Pennington <hp@redhat.com>
1227 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1228 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
1229 final location that lands in the config file
1231 * bus/config-loader-expat.c (bus_config_load): fix type of
1234 * doc/TODO: remove TODO item for dbus_bus_get()
1236 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1238 2003-03-31 Havoc Pennington <hp@pobox.com>
1240 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1241 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1242 argument since they are always client side
1244 * dbus/dbus-server.c (dbus_server_get_address): new function
1246 * bus/main.c (main): take the configuration file as an argument.
1248 * test/data/valid-config-files/debug-allow-all.conf: new file to
1249 use with dispatch.c tests for example
1251 * bus/test-main.c (main): require test data dir
1253 * bus/bus.c (bus_context_new): change this to take a
1254 configuration file name as argument
1256 * doc/config-file.txt (Elements): add <servicedir>
1258 * bus/system.conf, bus/session.conf: new files
1260 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1261 well-known socket if none set
1263 * configure.in: create system.conf and session.conf
1265 2003-03-30 Havoc Pennington <hp@pobox.com>
1267 * bus/config-parser.c: hacking
1269 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1270 to shut down, since it could cause weirdness with the DBusList
1273 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1274 link-oriented stack routines
1275 (alloc_link): free the mempool if the first alloc from it fails
1277 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1279 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1281 (_dbus_string_skip_white): new
1283 * doc/config-file.txt (Elements): add <includedir>
1285 2003-03-28 Havoc Pennington <hp@pobox.com>
1287 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1288 (_dbus_string_copy_data): new functions
1290 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1292 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1296 * dbus/dbus-memory.c:
1299 2003-03-28 Havoc Pennington <hp@pobox.com>
1301 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1302 I think it may have just been superstition. Not sure.
1304 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1305 failures that were not being handled.
1307 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1309 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1310 row that will fail on out-of-memory.
1312 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1313 function for testing out-of-memory handling.
1315 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1316 allocation functions, they do map exactly to the expat ones.
1318 2003-03-27 Havoc Pennington <hp@redhat.com>
1320 * bus/config-loader-libxml.c (bus_config_load): add another error
1323 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1326 Add note about automatic service activation.
1328 * doc/dbus-specification.sgml:
1329 Rename the specification and clarify a few things.
1331 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1334 * dbus/dbus-address.c:
1336 * dbus/dbus-marshal.c:
1337 * dbus/dbus-server-debug-pipe.c:
1338 * dbus/dbus-transport-unix.c:
1339 Fix documentation warnings.
1341 2003-03-26 Havoc Pennington <hp@pobox.com>
1343 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1344 after every test so it's quick and easy to see which leaked, and
1345 so we test multiple dbus_shutdown() calls
1347 * configure.in: change configure.in XML stuff to also support
1350 * config-loader-libxml.c: some hacking
1352 * config-loader-expat.c: some hacking
1354 * config-parser.c: some hacking, plus tests
1356 2003-03-25 Havoc Pennington <hp@redhat.com>
1358 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1360 * configure.in: add --with-xml option to specify XML library,
1361 right now only libxml is supported.
1363 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1364 nonworking code between home and work, still just stubs
1366 2003-03-24 Havoc Pennington <hp@redhat.com>
1368 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1371 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1372 NULL argument for "message" if the error is a well-known one,
1373 fill in a generic message in this case.
1375 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1378 * bus/test.c (bus_test_flush_bus): add
1380 * bus/policy.c (bus_policy_test): test code stub
1382 2003-03-24 Havoc Pennington <hp@pobox.com>
1384 * bus/connection.c (bus_connections_setup_connection): set up
1385 the "can this user connect" function, but it always returns
1386 TRUE until we have a config file parser so we can have a config
1387 file that allows connections.
1389 2003-03-23 Havoc Pennington <hp@pobox.com>
1391 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1392 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1393 the mutex, so we can check for proper memory management
1396 * dbus/dbus-dataslot.c: remove the mutex from
1397 DBusDataSlotAllocator and lock it manually when using it,
1398 to simplify fitting it into the global slots framework.
1400 * dbus/dbus-threads.c (init_static_locks): rework how we're
1401 handling global locks so they are easily shut down.
1403 * bus/policy.c (bus_policy_append_rule): fix
1405 * bus/test-main.c (main): check for memleaks
1407 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1408 test suite check for memleaks
1410 * dbus/dbus-memory.c: add support in test mode for tracking
1411 number of outstanding blocks
1413 2003-03-23 Havoc Pennington <hp@pobox.com>
1415 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1418 * dbus/dbus-hash.h: add ULONG hash keys
1420 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1421 (_dbus_get_group_id): new function
1423 2003-03-20 Havoc Pennington <hp@redhat.com>
1425 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1427 (dbus_connection_get_unix_user): new function
1429 2003-03-20 Havoc Pennington <hp@pobox.com>
1431 * bus/connection.c (bus_connection_send_oom_error): assert that
1432 message has a sender
1433 (connection_execute_transaction): ditto
1434 (bus_connection_preallocate_oom_error): fix to set the sender, and
1435 set recipient to the destination service, not the bus driver
1437 * bus/policy.c: hacking
1439 * dbus/dbus-message.c (dbus_message_service_is): new function
1440 (dbus_message_sender_is): new
1442 2003-03-19 Havoc Pennington <hp@redhat.com>
1444 * bus/policy.c: start sketching code for policy restrictions on
1445 what connections can do.
1447 2003-03-18 Havoc Pennington <hp@redhat.com>
1449 * doc/TODO: some notes on high-level todo items. Little nitpick
1450 stuff is all in @todo, so no need to add it here.
1452 * doc/config-file.txt: some notes on how config file might look
1454 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1460 2003-03-17 Havoc Pennington <hp@redhat.com>
1462 * dbus/dbus-internals.h: add gcc attributes so that
1463 our printf-style functions warn on bad arguments to
1466 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1469 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1472 2003-03-17 Havoc Pennington <hp@redhat.com>
1474 * bus/test-main.c (main): make it print something as it runs
1475 so make check doesn't look stuck
1477 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1478 from CVS, now obsolete
1480 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1482 * bus/dispatch.c: (bus_dispatch):
1483 Refetch the service name since it may have been reallocated
1484 when dbus_message_set_sender was called.
1486 * dbus/dbus-sysdeps.c: (_dbus_accept):
1487 Add address and address length variables and use them to stop
1488 valgrind from complaining.
1490 2003-03-17 Havoc Pennington <hp@pobox.com>
1492 All tests pass, no memleaks, no valgrind complaints.
1494 * bus/test.c: refcount handler_slot
1496 * bus/connection.c (bus_connections_new): refcount
1497 connection_data_slot
1499 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1500 bytes so that auth scripts pass.
1502 * bus/dispatch.c: init message_handler_slot so it gets allocated
1505 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1507 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1508 dealloc server_pipe_hash when no longer used for benefit of
1511 * dbus/dbus-auth.c (process_command): memleak fix
1513 * bus/dispatch.c (check_hello_message): memleak fix
1515 2003-03-16 Havoc Pennington <hp@pobox.com>
1517 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1519 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1521 * bus/activation.c (bus_activation_activate_service): Append
1522 the pending activation entry to the list of pending activations.
1524 2003-03-16 Havoc Pennington <hp@pobox.com>
1526 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1529 * dbus/dbus-address.c (create_entry): fix OOM handling when
1530 failing to alloc entry->method
1532 2003-03-16 Havoc Pennington <hp@pobox.com>
1534 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1537 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1538 add some missing dbus_set_result
1540 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1541 alloc the DBusMessageHandler
1543 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1544 the transport here, since we call this from the finalizer; it
1545 resulted in a double-finalize.
1547 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1548 where we tried to use transport->connection that was NULL,
1549 happened when transport was disconnected early on due to OOM
1551 * bus/*.c: adapt to handle OOM for watches/timeouts
1553 * dbus/dbus-transport-unix.c: port to handle OOM during
1556 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1557 reference to unused bytes instead of a copy
1559 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1562 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1565 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1568 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1570 * doc/dbus-specification.sgml:
1571 Document reply message for ActivateService.
1573 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1575 * bus/activation.c: (bus_pending_activation_entry_free),
1576 (bus_pending_activation_free), (bus_activation_new),
1577 (bus_activation_unref), (bus_activation_service_created),
1578 (bus_activation_activate_service):
1580 * bus/bus.c: (bus_context_new):
1581 * bus/desktop-file.c: (new_section):
1582 * bus/driver.c: (bus_driver_send_service_deleted),
1583 (bus_driver_handle_activate_service):
1584 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1586 * dbus/dbus-connection.c:
1587 (dbus_connection_send_with_reply_and_block):
1588 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1589 * dbus/dbus-protocol.h:
1590 Make activation work better. Now pending activations will be queued
1591 and the daemon won't try to activate services that are already registered.
1593 2003-03-16 Havoc Pennington <hp@pobox.com>
1595 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1598 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1599 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1601 2003-03-16 Havoc Pennington <hp@pobox.com>
1603 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1604 this. always run the test suite before commit...
1606 * bus/*: adapt to DBusConnection API changes
1608 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1609 requires renaming stuff to avoid dbus_connection_dispatch name
1612 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1615 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1616 separate from _dbus_message_loader_return_buffer()
1618 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1619 this, because it's now always broken to use; the number of
1620 messages in queue vs. the number still buffered by the message
1621 loader is undefined/meaningless. Should use
1622 dbus_connection_get_dispatch_state().
1623 (dbus_connection_dispatch): rename from
1624 dbus_connection_dispatch_message
1626 2003-03-16 Havoc Pennington <hp@pobox.com>
1628 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1631 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1633 * dbus/dbus-connection.c:
1634 (dbus_connection_send_with_reply_and_block):
1635 Decrease connection->n_incoming when removing an entry
1637 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1638 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1639 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1640 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1641 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1642 (dbus_dict_get_byte_array):
1643 Handle NULL arrays and strings. Also add support for byte arrays.
1645 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1646 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1647 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1648 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1649 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1650 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1651 * dbus/dbus-marshal.h:
1652 Add support for marshalling and demarshalling empty arrays and strings.
1654 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1655 (dbus_message_append_string_array),
1656 (dbus_message_iter_get_boolean),
1657 (dbus_message_iter_get_boolean_array),
1658 (dbus_message_iter_get_int32_array),
1659 (dbus_message_iter_get_uint32_array),
1660 (dbus_message_iter_get_double_array),
1661 (dbus_message_iter_get_byte_array),
1662 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1663 (check_message_handling):
1664 Add support for getting empty arrays and dicts.
1666 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1667 Don't do any validation at all for now, that's better than just checking
1670 * test/data/valid-messages/emptiness.message:
1671 New test message with lots of empty arrays.
1673 2003-03-16 Havoc Pennington <hp@pobox.com>
1675 * dbus/dbus-connection.c
1676 (_dbus_connection_queue_received_message_link): new function that
1677 can't fail due to OOM
1679 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1680 new function pops a message together with a list link
1683 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1684 message queuing functions to avoid needing to alloc memory
1686 2003-03-16 Havoc Pennington <hp@pobox.com>
1688 Oops - test code was only testing failure of around 30 of the
1689 mallocs in the test path, but it turns out there are 500+
1690 mallocs. I believe this was due to misguided linking setup such
1691 that there was one copy of dbus_malloc etc. in the daemon and one
1692 in the shared lib, and only daemon mallocs were tested. In any
1693 case, the test case now tests all 500+ mallocs, and doesn't pass
1694 yet, though there are lots of fixes in this patch.
1696 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1697 this so that it doesn't need to allocate memory, since it
1698 has no way of indicating failure due to OOM (and would be
1699 annoying if it did).
1701 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1703 * bus/Makefile.am: rearrange to create two self-contained
1704 libraries, to avoid having libraries with overlapping symbols.
1705 that was resulting in weirdness, e.g. I'm pretty sure there
1706 were two copies of global static variables.
1708 * dbus/dbus-internals.c: move the malloc debug stuff to
1711 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1714 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1716 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1719 * bus/dispatch.c (bus_dispatch_add_connection): free
1720 message_handler_slot when no longer using it, so
1721 memory leak checkers are happy for the test suite.
1723 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1725 * bus/bus.c (new_connection_callback): disconnect in here if
1726 bus_connections_setup_connection fails.
1728 * bus/connection.c (bus_connections_unref): fix to free the
1730 (bus_connections_setup_connection): if this fails, don't
1731 disconnect the connection, just be sure there are no side
1734 * dbus/dbus-string.c (undo_alignment): unbreak this
1736 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1738 (_dbus_auth_new): fix the order in which we free strings
1741 * bus/connection.c (bus_connection_disconnected): fix to
1742 not send ServiceDeleted multiple times in case of memory
1745 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1746 get the base service name
1747 (dbus_bus_register_client): don't return base service name,
1748 instead store it on the DBusConnection and have an accessor
1750 (dbus_bus_register_client): rename dbus_bus_register()
1752 * bus/dispatch.c (check_hello_message): verify that other
1753 connections on the bus also got the correct results, not
1754 just the one sending hello
1756 2003-03-15 Havoc Pennington <hp@pobox.com>
1758 Make it pass the Hello handling test including all OOM codepaths.
1759 Now to do other messages...
1761 * bus/services.c (bus_service_remove_owner): fix crash when
1762 removing owner from an empty list of owners
1763 (bus_registry_ensure): don't leave service in the list of
1764 a connection's owned services if we fail to put the service
1767 * bus/connection.c (bus_connection_preallocate_oom_error): set
1768 error flag on the OOM error.
1770 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1771 handle _dbus_transport_set_connection failure
1773 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1774 to create watches up front and simply enable/disable them as
1776 (unix_connection_set): this can now fail on OOM
1778 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1779 of enabling/disabling a watch or timeout.
1781 * bus/loop.c (bus_loop_iterate): don't touch disabled
1784 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1786 2003-03-15 Havoc Pennington <hp@pobox.com>
1788 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1789 write useful test code, after all that futzing around ;-)
1791 Test does not yet pass because we can't handle OOM in
1792 _dbus_transport_messages_pending (basically,
1793 dbus_connection_preallocate_send() does not prealloc the write
1794 watch). To fix this, I think we need to add new stuff to
1795 set_watch_functions, namely a SetEnabled function so we can alloc
1796 the watch earlier, then enable it later.
1798 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1799 dbus-memory.c to the convenience lib
1801 * bus/test.c: rename some static functions to keep them clearly
1802 distinct from stuff in connection.c. Handle client disconnection.
1804 2003-03-14 Havoc Pennington <hp@pobox.com>
1806 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1807 transport, tests more of the real codepath. Set up clients
1808 with bus_setup_debug_client.
1810 * bus/test.c (bus_setup_debug_client): function to set up debug
1811 "clients" on the main loop
1813 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1816 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1819 * dbus/dbus-server-debug.c: support a debug server based on pipes
1821 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1822 (_dbus_close): new function
1824 * configure.in: check for socketpair
1826 2003-03-14 Havoc Pennington <hp@redhat.com>
1828 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1831 * dbus/dbus-transport-debug.c: rework this a good bit to be
1832 less complicated. hopefully still works.
1834 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1837 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1840 * dbus/dbus-message.c (dbus_message_copy): rename from
1841 dbus_message_new_from_message, fix it up to copy
1842 all the message fields, add test case
1844 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1845 not quite passing yet
1847 2003-03-14 Havoc Pennington <hp@pobox.com>
1849 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1850 until no work remains" in test code. (the large diff here
1851 is just code movement, no actual changes)
1853 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1854 1, no point waiting around for test code.
1855 (_dbus_server_debug_accept_transport): unref the timeout
1856 after adding it (right?)
1858 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1860 2003-03-13 Havoc Pennington <hp@redhat.com>
1862 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1865 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1868 * dbus/dbus-connection.h: Make AddWatchFunction and
1869 AddTimeoutFunction return a bool so they can fail on out-of-memory
1871 * bus/bus.c (bus_context_new): set up timeout handlers
1873 * bus/connection.c (bus_connections_setup_connection): set up
1876 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1879 * bus/bus.c (bus_context_new): adapt to changes
1881 * bus/connection.c: adapt to changes
1883 * test/watch.c: adapt to DBusWatch changes
1885 * bus/dispatch.c (bus_dispatch_test): started adding this but
1888 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1890 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1892 2003-03-13 Havoc Pennington <hp@pobox.com>
1894 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1895 set up a test framework as for the library
1897 2003-03-12 Havoc Pennington <hp@pobox.com>
1899 Throughout: purge global variables, introduce BusActivation,
1900 BusConnections, BusRegistry, etc. objects instead.
1902 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1905 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1906 going to redo this a bit differently I think
1908 2003-03-12 Havoc Pennington <hp@redhat.com>
1910 Mega-patch that gets the message bus daemon initially handling
1911 out-of-memory. Work still needed. Also lots of random
1912 moving stuff to DBusError instead of ResultCode.
1914 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1916 * dbus/dbus-connection.c
1917 (dbus_connection_send_with_reply_and_block): use DBusError
1919 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1922 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1923 code here, as the only failure possible is OOM.
1925 * bus/connection.c (bus_connection_disconnect):
1926 rename bus_connection_disconnected as it's a notification only
1928 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1929 "name" on get_args failure, should be done by get_args;
1930 don't disconnect client for bad args, just return an error.
1931 (bus_driver_handle_service_exists): ditto
1933 * bus/services.c (bus_services_list): NULL-terminate returned array
1935 * bus/driver.c (bus_driver_send_service_lost)
1936 (bus_driver_send_service_acquired): send messages from driver to a
1937 specific client to the client's unique name, not to the broadcast
1940 * dbus/dbus-message.c (decode_header_data): reject messages that
1941 contain no name field
1942 (_dbus_message_get_client_serial): rename to
1943 dbus_message_get_serial and make public
1944 (_dbus_message_set_serial): rename from set_client_serial
1945 (_dbus_message_set_reply_serial): make public
1946 (_dbus_message_get_reply_serial): make public
1948 * bus/connection.c (bus_connection_foreach): allow stopping
1949 iteration by returning FALSE from foreach function.
1951 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1952 (dbus_connection_free_preallocated_send)
1953 (dbus_connection_preallocate_send): new API for sending a message
1954 without possibility of malloc failure.
1955 (dbus_connection_send_message): rename to just
1956 dbus_connection_send (and same for whole function family)
1958 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1960 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1962 * bus/activation.c: handle/return errors
1964 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1966 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1967 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1968 (_dbus_result_from_errno): move to this file
1970 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1972 * dbus/dbus-marshal.c:
1973 (_dbus_marshal_set_string):
1974 Take a length argument so we can marshal the correct string
1977 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1978 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1979 (_dbus_marshal_test):
1980 * dbus/dbus-marshal.h:
1981 Add support for marshalling and demarshalling dicts.
1983 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1984 Add support for TYPE DICT.
1986 * dbus/dbus-message.c: (set_string_field):
1987 Adjust header padding.
1989 (dbus_message_append_args_valist), (dbus_message_append_dict),
1990 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1991 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1992 (check_message_handling), (check_have_valid_message):
1993 * dbus/dbus-message.h:
1994 Add functions for setting and getting dicts.
1996 * dbus/dbus-protocol.h:
2002 * doc/dbus-specification.sgml:
2003 Add information about how dicts are marshalled.
2005 * test/data/invalid-messages/dict-with-nil-value.message:
2006 * test/data/invalid-messages/too-short-dict.message:
2007 * test/data/valid-messages/dict-simple.message:
2008 * test/data/valid-messages/dict.message:
2009 Add sample messages containing dicts.
2011 2003-03-08 Anders Carlsson <andersca@codefactory.se>
2013 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
2015 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2018 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2019 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
2020 (dbus_dict_set_int32), (dbus_dict_set_uint32),
2021 (dbus_dict_set_double), (dbus_dict_set_string),
2022 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2023 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2024 (dbus_dict_set_string_array), (_dbus_dict_test):
2026 Fix according to comments from Havoc.
2028 2003-03-06 Michael Meeks <michael@server.home>
2030 * configure.in: if we don't have kde-config, disable have_qt.
2032 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2037 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2038 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
2039 (dbus_dict_remove), (dbus_dict_get_value_type),
2040 (dbus_dict_get_keys), (dbus_dict_put_boolean),
2041 (dbus_dict_put_int32), (dbus_dict_put_uint32),
2042 (dbus_dict_put_double), (dbus_dict_put_string),
2043 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
2044 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
2045 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
2046 (dbus_dict_get_int32), (dbus_dict_get_uint32),
2047 (dbus_dict_get_double), (dbus_dict_get_string),
2048 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
2049 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
2050 (dbus_dict_get_string_array), (_dbus_dict_test):
2052 Add DBusDict implementation
2054 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
2058 2003-03-04 Havoc Pennington <hp@pobox.com>
2060 * test/data/auth/*: adapt to changes
2062 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
2063 USERID_BASE64 and change USERNAME_BASE64 to put in username not
2066 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
2067 more stuff from being in a context name, to make the protocol
2068 simpler to deal with
2070 * dbus/dbus-errors.c (dbus_error_has_name): new function
2071 (dbus_error_is_set): new function
2073 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
2074 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
2076 * dbus/dbus-connection.c (dbus_connection_flush): also read
2077 messages during a flush operation
2079 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2081 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2083 * configure.in: Check for gethostbyname on Solaris.
2085 * dbus/dbus-transport.c: (_dbus_transport_open):
2086 Remove duplicate "tcp" entry.
2088 * doc/dbus-specification.sgml:
2089 Clarify some things.
2091 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2093 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2094 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2095 (_dbus_keyring_test):
2096 * dbus/dbus-md5.c: (_dbus_md5_compute):
2097 * dbus/dbus-sha.c: (_dbus_sha_compute):
2100 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2102 * README: Add some things.
2104 2003-03-04 Anders Carlsson <andersca@codefactory.se>
2106 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2107 after case DBUS_TYPE_BOOELAN.
2109 2003-03-02 Havoc Pennington <hp@pobox.com>
2111 * test/break-loader.c (randomly_set_extreme_ints): add test that
2112 sets really huge and small integers
2114 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2115 that length of boolean array fits in the string, and that
2116 string has room for boolean value in single-bool case.
2118 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2119 optional value to "ALIGN" command which is what to fill the
2122 * test/data/valid-messages/no-padding.message: add regression
2123 test for the message padding problem
2125 2003-03-02 Havoc Pennington <hp@pobox.com>
2127 * dbus/dbus-message.c (decode_header_data): fix to always init
2128 message_padding, from Benjamin Dauvergne
2130 2003-03-02 Havoc Pennington <hp@pobox.com>
2136 2003-03-01 Joe Shaw <joe@assbarn.com>
2138 * configure.in: Check for "struct cmsgcred" and try to access its
2139 members for BSD-like unices.
2141 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2142 _dbus_read_credentials_unix_socket().
2143 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2144 read() for reading the credential byte off the unix socket. Use
2145 struct cmsgcred on systems that support it.
2147 2003-02-27 Alexander Larsson <alexl@redhat.com>
2151 Make gthreads-2.0 dependency optional. Don't build thread test if
2154 2003-02-27 Havoc Pennington <hp@pobox.com>
2156 * dbus/dbus-connection.c
2157 (dbus_connection_send_message_with_reply_and_block): fix doh!
2158 doh! doh! bug that resulted in never removing a reply from the
2159 queue, no wonder we called get_reply_serial so much ;-)
2161 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2162 and client serial instead of demarshaling them every time
2164 2003-02-27 Havoc Pennington <hp@pobox.com>
2166 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2167 more inlined, using dbus-string-private.h, speeds things up
2170 * dbus/dbus-string.c (_dbus_string_free): apply align offset
2171 when freeing the string
2172 (_dbus_string_steal_data): fix for align offset
2173 (undo_alignment): new function
2175 2003-02-26 Havoc Pennington <hp@redhat.com>
2177 All kinds of audit fixes from Owen, plus initial attempt to
2178 handle unaligned memory returned from malloc.
2180 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
2181 leave room for align_offset and nul byte
2182 (fixup_alignment): function to track an align_offset and
2183 ensure real->str is aligned
2184 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
2185 to allow a nul byte plus align offset
2186 (_dbus_string_lock): fix overflow issue
2187 (_dbus_string_init_const_len): add assertions on sanity of len,
2188 assign allocated to be ALLOCATION_PADDING larger than len
2189 (set_length): fixup the overflow handling
2190 (_dbus_string_get_data_len): fix overflow in assertion
2191 (open_gap): detect overflow in size of gap to be opened
2192 (_dbus_string_lengthen): add overflow check
2193 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2194 (_dbus_string_append): add overflow check
2195 (_dbus_string_append_unichar): overflow
2196 (_dbus_string_delete): fix overflow in assertion
2197 (_dbus_string_copy_len): overflow in assertion
2198 (_dbus_string_replace_len): overflows in assertions
2199 (_dbus_string_find): change to implement in terms of
2200 _dbus_string_find_to
2201 (_dbus_string_find_to): assorted fixage
2202 (_dbus_string_equal_c_str): assert c_str != NULL,
2203 fix logic so the function works
2204 (_dbus_string_ends_with_c_str): fix overflow thingy
2205 (_dbus_string_base64_encode): overflow fix
2206 (_dbus_string_validate_ascii): overflow
2207 (_dbus_string_validate_nul): overflow
2209 2003-02-26 Havoc Pennington <hp@redhat.com>
2211 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2213 2003-02-26 Alexander Larsson <alexl@redhat.com>
2216 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2218 * dbus/dbus-connection.c:
2219 * dbus/dbus-connection.h:
2220 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2221 Add dbus_connection_set_wakeup_main_function and use it when queueing
2222 incoming and outgoing messages.
2225 * dbus/dbus-dataslot.c:
2226 Threadsafe usage of DBusDataSlotAllocator
2228 * dbus/dbus-message.c: (dbus_message_get_args_iter):
2231 * dbus/dbus-server-unix.c:
2234 * glib/dbus-gmain.c:
2235 Implement the new wakeup functions for glib.
2238 * glib/test-thread-client.c:
2239 * glib/test-thread-server.c:
2240 * glib/test-thread.h:
2241 Initial cut at some thread test code. Not really done yet.
2243 2003-02-26 Havoc Pennington <hp@pobox.com>
2245 * dbus/dbus-connection.c
2246 (dbus_connection_send_message_with_reply_and_block): fix crash
2247 where we ref'd the outgoing message instead of the returned reply
2249 * dbus/dbus-transport-unix.c (do_authentication): check read watch
2250 at the end of this function, so if we didn't need to read for
2251 authentication, we reinstall it for receiving messages
2253 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2254 a NULL sender for peer-to-peer case
2256 * dbus/dbus-transport-unix.c (check_read_watch): handle
2257 !authenticated case correctly
2259 * glib/dbus-gmain.c: add support for DBusServer
2261 * dbus/dbus-server.c: add data slot support
2263 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2264 return values and handle errors
2266 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2269 * Doxyfile.in (INPUT): add glib subdir
2271 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2272 setup_with_g_main instead of hookup_with_g_main; write docs
2274 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2276 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2277 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2278 * dbus/dbus-message.c: (dbus_message_append_boolean),
2279 (dbus_message_append_boolean_array),
2280 (dbus_message_get_args_valist), (_dbus_message_test):
2281 * dbus/dbus-message.h:
2282 * doc/dbus-specification.sgml:
2283 Various fixes as pointed out by Havoc.
2285 * test/data/invalid-messages/bad-boolean-array.message:
2286 * test/data/invalid-messages/bad-boolean.message:
2287 Add invalid boolean value test cases.
2289 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2291 * dbus/dbus-internals.c: (_dbus_type_to_string):
2292 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2293 (_dbus_marshal_validate_arg):
2294 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2295 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2296 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2297 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2298 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2299 (dbus_message_iter_get_double),
2300 (dbus_message_iter_get_boolean_array), (message_iter_test):
2301 * dbus/dbus-message.h:
2302 * dbus/dbus-protocol.h:
2303 * doc/dbus-specification.sgml:
2304 * test/data/valid-messages/lots-of-arguments.message:
2305 Add support for boolean and boolean array types.
2307 2003-02-23 Havoc Pennington <hp@pobox.com>
2309 * dbus/dbus-keyring.c: finish most of this implementation and
2312 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2313 these barf if the error isn't cleared to NULL
2315 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2316 (_dbus_create_directory): new function
2318 * dbus/dbus-errors.c (dbus_set_error): fix warning
2320 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2321 (_dbus_string_hex_decode): new function
2322 (test_hex_roundtrip): test code
2324 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2326 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2328 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2329 the save-to-temp/rename trick to atomically write the new file
2330 (_dbus_string_parse_uint): new function
2332 2003-02-22 Havoc Pennington <hp@pobox.com>
2334 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2336 2003-02-22 Havoc Pennington <hp@pobox.com>
2338 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2339 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2341 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2343 * dbus/test/data/sha-1: add US government test suite for SHA-1
2345 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2347 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2348 Make string arrays NULL-terminated.
2350 * dbus/dbus-memory.c: (dbus_free_string_array):
2351 * dbus/dbus-memory.h:
2352 New function for freeing NULL-terminated string arrays.
2354 * dbus/dbus-message-builder.c: (append_quoted_string),
2355 (_dbus_message_data_load):
2356 Add support for array types.
2358 * dbus/dbus-message.c: (check_message_handling):
2359 Add more types as test cases.
2361 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2362 (_dbus_string_parse_double):
2363 Add the start offset to the end offset.
2365 * test/data/valid-messages/lots-of-arguments.message:
2366 New test message with lots of arguments.
2368 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2370 * dbus/dbus-message.c: (dbus_message_append_nil),
2371 (dbus_message_append_int32), (dbus_message_append_uint32),
2372 (dbus_message_append_double), (dbus_message_append_string),
2373 (dbus_message_append_int32_array),
2374 (dbus_message_append_uint32_array),
2375 (dbus_message_append_double_array),
2376 (dbus_message_append_byte_array),
2377 (dbus_message_append_string_array):
2378 Fix all out-of-memory handling in these functions.
2380 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2382 * dbus/dbus-message.c: (dbus_message_append_nil):
2385 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2387 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2388 (dbus_message_append_nil), (dbus_message_append_int32_array),
2389 (dbus_message_append_uint32_array),
2390 (dbus_message_append_double_array),
2391 (dbus_message_append_byte_array),
2392 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2393 (dbus_message_iter_get_int32_array),
2394 (dbus_message_iter_get_uint32_array),
2395 (dbus_message_iter_get_double_array),
2396 (dbus_message_iter_get_byte_array),
2397 (dbus_message_iter_get_string_array):
2399 * dbus/dbus-message.h:
2400 Add functions for appending and getting arrays.
2402 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2404 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2405 element size at least 8 bytes, fixes mempool tests on
2408 2003-02-20 Alexander Larsson <alexl@redhat.com>
2410 * dbus/dbus-transport-unix.c (unix_do_iteration):
2411 Unlock the connection mutex during a blocking select call.
2412 Add todo about how we need a way to wake up the select.
2414 * dbus/dbus-connection-internal.h:
2415 * dbus/dbus-connection.c:
2416 Add _dbus_connection_lock and _dbus_connection_unlock.
2418 2003-02-19 Havoc Pennington <hp@pobox.com>
2420 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2421 Doxyfile.in, not Doxyfile
2423 * dbus/dbus-keyring.c: do some hacking on this
2425 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2427 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2429 (dbus_set_error): remove dbus_error_init, check for message ==
2430 NULL *before* we sprintf into it, and add @todo about including
2431 system headers in this file
2433 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2435 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2437 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2438 get various bits of user information based on either username
2440 (_dbus_homedir_from_username): new function
2442 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2445 Add check for nonposix getpwnam_r
2447 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2448 Align the pool element size to a sizeof (void *) boundary.
2450 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2451 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2452 General Solaris fixes.
2454 * test/data/valid-messages/simplest-manual.message:
2455 Explicitly state that we want little-endian packing.
2457 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2459 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2461 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2462 Added to create a transport connecting using a tcp/ip socket.
2464 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2465 to a tcp socket at given host and port.
2466 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2469 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2471 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2472 Added to create a server listening on a TCP/IP socket.
2474 2003-02-19 Havoc Pennington <hp@pobox.com>
2476 Throughout: mop up all the Doxygen warnings and undocumented
2479 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2480 to search any paths.
2482 * dbus/dbus-threads.c: move global mutex initializers to
2483 dbus-internals.h, multiple prototypes was confusing doxygen
2484 besides being kind of ugly
2486 * Doxyfile (PREDEFINED): have Doxygen define
2487 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2488 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2489 (do not abuse the feature! it's for stuff like the autogenerated
2490 macros in dbus-md5.c, not just for things you don't feel like
2493 2003-02-18 Havoc Pennington <hp@pobox.com>
2495 * dbus/dbus-string.c (_dbus_string_zero): new function
2497 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2498 wrap it in some dbus-friendly API
2500 * dbus/dbus-types.h: add 16-bit types
2502 2003-02-18 Joe Shaw <joe@assbarn.com>
2504 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2505 credentials from our currently running process.
2506 (get_word): Fix a buglet where we were copying the entire length
2507 instead of relative to our position.
2509 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2510 keys on the stack... it's 640k of data.
2512 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2513 read the credentials byte off the socket, even if we don't have
2515 (_dbus_poll): Implement poll() using select() for systems which
2518 * glib/test-dbus-glib.c (main): Print out an error if no
2519 parameters are given.
2521 * test/data/auth/fallback.auth-script: Added. Tests that a client
2522 can fallback to a secondary auth mechanism if the first fails.
2524 2003-02-18 Havoc Pennington <hp@pobox.com>
2528 2003-02-17 Havoc Pennington <hp@pobox.com>
2530 * doc/dbus-specification.sgml: lots of cosmetic
2531 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2532 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2533 s/server/bus/ (except in authentication section). Add a section
2534 "Message Bus Message Routing"
2536 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2542 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2544 * doc/dbus-specification.sgml:
2545 Specification updates.
2547 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2549 * bus/activation.c: (bus_activation_init), (child_setup),
2550 (bus_activation_activate_service):
2552 * bus/main.c: (main):
2553 Set DBUS_ADDRESS environment variable.
2555 * dbus/dbus-errors.c: (dbus_set_error):
2556 Don't use va_copy since that's a C99 feature.
2558 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2559 (_dbus_spawn_async):
2560 * dbus/dbus-sysdeps.h:
2561 Add child_setup_func to _dbus_spawn_async.
2563 * doc/dbus-specification.sgml:
2564 Update specification.
2566 * test/spawn-test.c: (setup_func), (main):
2569 2003-02-17 Alexander Larsson <alexl@redhat.com>
2571 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2574 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2578 * doc/dbus-test-plan.sgml:
2579 Add test plan document.
2584 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2586 * dbus/dbus-message.c: (decode_header_data),
2587 (_dbus_message_loader_return_buffer):
2588 Set the header padding amount when loading a message.
2590 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2592 * bus/dispatch.c: (send_one_message):
2593 Only send broadcast messages to registered connections.
2595 * dbus/dbus-message.c: (dbus_message_name_is):
2596 * dbus/dbus-message.h:
2597 New convenience function.
2599 * dbus/dbus-transport-debug.c: (do_reading):
2600 Only dispatch one message per run.
2603 * test/bus-test.c: (new_connection_callback), (die),
2604 (test_hello_client1_handler), (test_hello_client2_handler),
2605 (test_hello_replies), (main):
2607 * test/bus-test-loop.[ch]:
2610 2003-02-16 Havoc Pennington <hp@pobox.com>
2612 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2613 backward conditional
2615 2003-02-16 Alexander Larsson <alexl@redhat.com>
2617 * dbus/dbus-connection.c:
2618 Implement sent_message_with_reply. (with_reply_and block is still
2620 Made dispatch_message not lose message if OOM.
2622 * dbus/dbus-errors.h:
2623 Add NoReply error (for reply timeouts).
2625 2003-02-16 Alexander Larsson <alexl@redhat.com>
2627 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2628 Actually free keys and values when destroying hashtable.
2630 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2632 * dbus/dbus-auth.c: (client_try_next_mechanism):
2635 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2636 Return TRUE if there's no thread implementation around.
2638 * glib/dbus-gmain.c: (free_source),
2639 (dbus_connection_hookup_with_g_main):
2640 Make sure to remove the GSource when the connection is finalized.
2642 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2644 * bus/dispatch.c: (bus_dispatch_message_handler):
2645 * dbus/dbus-errors.h:
2646 Return an error if someone tries to send a message to a service
2649 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2651 * bus/activation.c: (load_directory), (bus_activation_init),
2652 (bus_activation_activate_service):
2655 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2656 More work on the activation handling.
2658 * dbus/dbus-errors.h:
2659 Add some error messages
2661 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2662 * dbus/dbus-message.h:
2663 New function that creates an error message.
2665 * dbus/dbus-protocol.h:
2666 Add ACTIVATE_SERVER message.
2668 * dbus/dbus-server-unix.c: (unix_handle_watch),
2669 (_dbus_server_new_for_domain_socket):
2670 Call _dbus_fd_set_close_on_exec.
2672 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2673 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2674 (_dbus_fd_set_close_on_exec):
2675 * dbus/dbus-sysdeps.h:
2676 Add _dbus_fd_set_close_on exec function. Also add function that checks
2677 that all open fds are set to close-on-exec and warns otherwise.
2679 * dbus/dbus-transport-unix.c:
2680 (_dbus_transport_new_for_domain_socket):
2681 Call _dbus_fd_set_close_on_exec.
2683 2003-02-16 Havoc Pennington <hp@pobox.com>
2685 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2686 allow people to avoid setting SIGPIPE to SIG_IGN
2687 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2688 we've been asked not to
2690 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2692 * dbus/dbus-list.c: (_dbus_list_append_link),
2693 (_dbus_list_prepend_link):
2694 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2698 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2701 * bus/activation.c: (bus_activation_entry_free),
2702 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2704 * bus/main.c: (main):
2705 Add simple activation support, doesn't work yet though.
2707 2003-02-15 Zack Rusin <zack@kde.org>
2709 * qt/dbus-qthread.cpp: small casting fix
2711 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2713 * dbus/dbus-errors.c: (dbus_set_error):
2714 * dbus/dbus-errors.h:
2715 Add a few errors and make dbus_set_error void.
2717 * dbus/dbus-sysdeps.c:
2718 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2719 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2720 * dbus/dbus-sysdeps.h:
2721 Add _dbus_spawn_async.
2723 * test/spawn-test.c: (main):
2724 Test for _dbus_spawn_async.
2726 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2728 * dbus/dbus-internals.h:
2729 Fix build without tests.
2731 * dbus/dbus-list.c: (alloc_link):
2732 Fix a segfault when a malloc fails.
2734 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2735 (dbus_malloc0), (dbus_realloc):
2736 Add support for malloc debugging.
2738 2003-02-15 Alexander Larsson <alexl@redhat.com>
2740 * dbus/dbus-threads.c:
2741 * dbus/dbus-threads.h:
2742 Add condvars. Remove static mutext from API.
2743 Implement static mutexes by initializing them from threads_init.
2745 * glib/dbus-gthread.c:
2746 * qt/dbus-qthread.cpp:
2747 Update with the thread api changes.
2752 Turn StaticMutex into normal mutex + init function.
2753 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2754 _dbus_list_append_link, _dbus_list_prepend_link
2757 * dbus/dbus-sysdeps.c:
2758 * dbus/dbus-sysdeps.h:
2759 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2760 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2762 * dbus/dbus-protocol.h:
2763 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2765 * dbus/dbus-message.c:
2766 Make ref/unref atomic.
2769 * dbus/dbus-connection-internal.h:
2770 * dbus/dbus-connection.c:
2771 * dbus/dbus-connection.h:
2773 Change _peek to _borrow,_return & _steal_borrowed.
2774 Change disconnect callback to event.
2775 Make dbus_connection_dispatch_messages reentrant.
2777 * dbus/dbus-transport.c:
2778 Don't ref the connection on calls to the transport
2781 * dbus/dbus-message-handler.c:
2784 * glib/dbus-gmain.c:
2785 Don't use peek_message anymore
2788 * test/debug-thread.c:
2789 * test/debug-thread.h:
2790 Simple thread implementation that asserts() on deadlocks in
2791 single-threaded code.
2794 (main) Call debug_threads_init.
2797 Use disconnect message instead of disconnect callback.
2801 Don't call dbus_connection_set_disconnect_function. Instead export
2802 bus_connection_disconnect.
2805 Call bus_connection_disconnect when we get a disconnected message.
2807 2003-02-15 Havoc Pennington <hp@pobox.com>
2809 * dbus/dbus-message.c (dbus_message_new): fool around with the
2812 2003-02-14 Havoc Pennington <hp@pobox.com>
2814 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2816 * dbus/dbus-memory.c: fail if the debug functions indicate we
2819 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2820 (_dbus_decrement_fail_alloc_counter): debug functions to
2821 simulate memory allocation failures
2823 2003-02-14 Havoc Pennington <hp@pobox.com>
2825 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2828 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2830 * bus/driver.c: (bus_driver_handle_hello):
2832 * bus/services.c: (bus_service_lookup):
2833 Reorder message sending so we get a more sane order.
2835 * test/bus-test.c: (message_handler):
2838 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2840 * bus/driver.c: (bus_driver_send_service_deleted),
2841 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2842 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2843 (bus_driver_send_welcome_message),
2844 (bus_driver_handle_list_services),
2845 (bus_driver_handle_acquire_service),
2846 (bus_driver_handle_service_exists):
2847 * dbus/dbus-bus.c: (dbus_bus_register_client),
2848 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2849 * dbus/dbus-errors.c: (dbus_result_to_string):
2850 * dbus/dbus-errors.h:
2851 * dbus/dbus-message.c: (dbus_message_append_args),
2852 (dbus_message_append_args_valist), (dbus_message_get_args),
2853 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2854 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2855 (dbus_message_iter_get_byte_array),
2856 (dbus_message_iter_get_string_array), (message_iter_test),
2857 (check_message_handling), (_dbus_message_test):
2858 * dbus/dbus-message.h:
2859 * test/bus-test.c: (main):
2860 Change fields to arguments in messages, so that they won't be
2861 confused with header fields.
2863 * glib/test-dbus-glib.c: (main):
2864 Remove append_fields from hello message.
2866 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2868 * dbus/dbus-errors.c:
2869 * dbus/dbus-message.c:
2870 * dbus/dbus-string.c:
2871 Documentation fixes.
2873 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2875 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2877 Implement support for timeouts in dbus-glib.
2879 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2881 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2882 * dbus/dbus-message.c: (process_test_subdir):
2883 * test/break-loader.c: (find_breaks_based_on):
2884 Plug some memory leaks.
2886 2003-02-13 Richard Hult <rhult@codefactory.se>
2888 * bus/main.c: Fix build.
2890 * dbus/dbus-errors.h:
2891 * dbus/dbus-errors.c: Fix copyright for Anders.
2893 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2898 * bus/connection.c: (bus_connection_foreach):
2901 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2902 (unescape_string), (new_section), (parse_section_start),
2903 (parse_key_value), (report_error), (bus_desktop_file_load),
2904 (bus_desktop_file_get_string):
2905 * bus/desktop-file.h:
2906 Use DBusError for error reporting.
2908 * bus/dispatch.c: (send_one_message),
2909 (bus_dispatch_message_handler):
2910 * bus/driver.c: (bus_driver_send_service_deleted),
2911 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2912 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2913 (bus_driver_send_welcome_message),
2914 (bus_driver_handle_list_services),
2915 (bus_driver_handle_acquire_service),
2916 (bus_driver_handle_service_exists):
2917 * bus/loop.c: (bus_loop_run):
2919 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2921 * bus/utils.c: (bus_wait_for_memory):
2923 New files with general utility functions.
2925 * dbus/dbus-internals.h:
2926 Remove _DBUS_HANDLE_OOM.
2928 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2930 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2931 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2932 * dbus/dbus-errors.h:
2933 Add DBusError structure.
2935 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2937 * test/data/valid-messages/standard-acquire-service.message:
2938 * test/data/valid-messages/standard-hello.message:
2939 * test/data/valid-messages/standard-list-services.message:
2940 * test/data/valid-messages/standard-service-exists.message:
2941 Add some standard messages.
2943 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2945 * bus/driver.c: (bus_driver_send_welcome_message),
2946 (bus_driver_handle_list_services),
2947 (bus_driver_handle_acquire_service),
2948 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2949 Update for API changes in libdbus.
2951 * dbus/dbus-message.c: (dbus_message_new_reply):
2952 * dbus/dbus-message.h:
2953 Remove the name argument. The spec states that replies shouldn't
2956 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2958 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2959 (report_error), (bus_desktop_file_load), (lookup_section),
2960 (lookup_line), (bus_desktop_file_get_raw),
2961 (bus_desktop_file_get_string):
2962 * bus/desktop-file.h:
2963 Some fixes, and new functions for getting a key value from a section.
2965 2003-02-13 Havoc Pennington <hp@pobox.com>
2967 * test/data/auth/fail-after-n-attempts.auth-script: new test
2969 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2972 2003-02-13 Havoc Pennington <hp@pobox.com>
2974 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2975 dbus_credentials_match were backward
2977 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2978 NO_CREDENTIALS and ROOT_CREDENTIALS
2980 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2981 into here. Never process more commands after we've reached an
2982 end state; store further data as unused bytes.
2984 * test/data/auth/*: add more auth tests
2986 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2987 command to match exact string and EXPECT_UNUSED to match unused
2990 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2992 2003-02-12 Havoc Pennington <hp@pobox.com>
2994 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2995 \r off of popped lines
2997 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
3000 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
3003 2003-02-12 Havoc Pennington <hp@pobox.com>
3005 * dbus/Makefile.am: remove break-loader from the build, since it
3008 * configure.in: add --enable-gcov to turn on coverage profiling
3009 flags and disable optimization
3011 2003-02-10 Havoc Pennington <hp@pobox.com>
3013 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
3014 initial cut at test framework for DBusAuth from laptop.
3015 Doesn't quite work yet but it compiles and I need to get
3016 it off the 266mhz laptop. ;-)
3018 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
3019 fix a memleak in error case
3021 2003-02-12 Anders Carlsson <andersca@codefactory.se>
3024 * bus/desktop-file.c:
3025 * bus/desktop-file.h:
3026 Add a desktop file parser.
3028 2003-02-11 Zack Rusin <zack@kde.org>
3030 * qt/message.[h|cpp]: sample implementation
3031 of the KDE wrapper for DBusMessage
3033 2003-02-09 Zack Rusin <zack@kde.org>
3035 * test/bus-test.c: make_it_compile
3036 * doc/dbus-specification.sgml: minimal semantic fix
3038 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3044 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3047 * dbus/dbus-break-loader.c:
3049 * test/break-loader.c:
3050 Move dbus-break-loader to test/ and rename it to break-loader.
3052 2003-02-02 Havoc Pennington <hp@pobox.com>
3054 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
3055 for code to manage cookies in your home directory
3057 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
3059 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
3060 to authenticate, then disconnect the client.
3062 2003-02-03 Alexander Larsson <alexl@redhat.com>
3064 * dbus/dbus-message.c (dbus_message_append_fields):
3067 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3069 * doc/dbus-specification.sgml:
3070 Update address format section.
3072 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3075 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
3076 (message_handler), (new_connection_callback), (loop_quit),
3080 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3082 * bus/driver.c: (bus_driver_handle_service_exists):
3083 Simplify the code a bit.
3085 * dbus/dbus-bus.c: (dbus_bus_service_exists):
3088 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3091 Add libdbus-daemon.la and link to it.
3093 2003-02-01 James Willcox <jwillcox@gnome.org>
3095 * bus/driver.c: (bus_driver_handle_own_service):
3096 Actually include the service reply code in the message.
3098 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3100 * bus/driver.c: (bus_driver_handle_service_exists):
3101 Don't unref the incoming message.
3103 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3105 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3107 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3109 * dbus/dbus-server.c: (dbus_server_listen):
3110 * dbus/dbus-transport.c: (_dbus_transport_open):
3111 ifdef out the calls to the debug transport and server.
3113 2003-02-02 Alexander Larsson <alexl@redhat.com>
3115 * dbus/dbus-watch.c (dbus_watch_get_flags):
3116 Add note in the docs that ERROR or HANGUP won't be returned
3117 and are assumed always on.
3119 * glib/dbus-gmain.c (add_watch):
3120 Always add IO_ERR | IO_HUP
3122 * dbus/dbus-message.h:
3123 Add semicolon after dbus_message_iter_get_string_array().
3124 Makes qt code build again
3126 2003-02-01 Anders Carlsson <andersca@codefactory.se>
3128 * bus/driver.c: (create_unique_client_name),
3129 (bus_driver_handle_hello):
3130 Don't take a name, just use a numeric id to identify
3134 * dbus/dbus-bus.c: (dbus_bus_register_client),
3135 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3137 Add new convenience functions for communicating with the bus.
3139 * dbus/dbus-message.h:
3141 * dbus/dbus-protocol.h:
3144 2003-02-01 Alexander Larsson <alexl@redhat.com>
3146 * dbus/dbus-message.c (dbus_message_append_fields):
3147 Add some more doc comments.
3149 2003-02-01 Havoc Pennington <hp@pobox.com>
3151 * dbus/dbus-break-loader.c (randomly_modify_length): change
3152 a 4-byte value in the message as if it were a length
3154 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3155 execute bit on saved files
3157 2003-02-01 Havoc Pennington <hp@pobox.com>
3159 * dbus/dbus-break-loader.c (main): new program to find messages
3160 that break the loader.
3162 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3163 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3165 * dbus/dbus-string.c (_dbus_string_set_byte): new
3167 2003-01-31 Havoc Pennington <hp@pobox.com>
3169 * dbus/dbus-message.c: refactor the test code to be more general,
3170 in preparation for writing a "randomly permute test cases to
3171 try to break the loader" program.
3173 2003-01-31 Havoc Pennington <hp@pobox.com>
3175 * doc/dbus-specification.sgml: work on the specification
3177 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
3178 the protocol version of the message.
3180 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
3181 no longer specifies that.
3182 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
3185 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3186 "break" for DBUS_TYPE_NIL, remove @todo
3188 2003-01-31 Havoc Pennington <hp@pobox.com>
3190 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
3191 just set_is_error/get_is_error as this is a commonly-used
3192 function, and write docs.
3194 2003-01-31 Anders Carlsson <andersca@codefactory.se>
3196 * dbus/dbus-address.c: (dbus_address_entry_free):
3197 Free key and value lists.
3199 * dbus/dbus-internals.c: (_dbus_type_to_string):
3200 Add the types we didn't have.
3202 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3203 (_dbus_marshal_validate_arg):
3206 * dbus/dbus-message.c: (dbus_message_set_sender):
3207 Remove todo about being able to set sender to NULL.
3209 (dbus_message_set_is_error_reply),
3210 (dbus_message_get_is_error_reply):
3211 * dbus/dbus-message.h:
3214 * dbus/dbus-protocol.h:
3215 Add error reply flag.
3217 * test/data/valid-messages/opposite-endian.message:
3218 Add NIL type to test.
3220 2003-01-31 Havoc Pennington <hp@pobox.com>
3222 * doc/dbus-specification.sgml: fully specify the header. Add
3223 flags and major protocol version, and change header/body len to
3226 * dbus/dbus-message-builder.c (append_saved_length): append length
3229 * dbus/dbus-message.c (dbus_message_create_header): change header
3230 length and body length to unsigned. Add the new fields from the
3232 (_dbus_message_loader_return_buffer): unsigned header/body len
3234 2003-01-30 Havoc Pennington <hp@pobox.com>
3236 * dbus/dbus-auth.c: rework to use only REJECTED, no
3239 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
3240 use REJECTED, suggested by Mark McLoughlin
3242 2003-01-30 Havoc Pennington <hp@pobox.com>
3244 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3245 a better way to report errors here. e.g. "unix address lacks
3246 path" or something. also "no such file" when the path doesn't
3249 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3251 (dbus_parse_address): add @todo about documenting address format,
3252 and allowing , and ; to be escaped
3254 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3257 Add dbus-address.[ch]
3259 * dbus/dbus-address.c: (dbus_address_entry_free),
3260 (dbus_address_entries_free), (create_entry),
3261 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3262 (dbus_parse_address), (_dbus_address_test):
3263 * dbus/dbus-address.h:
3264 New files for dealing with address parsing.
3266 * dbus/dbus-connection.c:
3267 Document timeout functions.
3269 * dbus/dbus-message.c:
3270 Document dbus_message_new_from_message.
3272 * dbus/dbus-server-debug.c:
3275 * dbus/dbus-server.c: (dbus_server_listen):
3276 Parse address and use correct server implementation.
3278 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3279 * dbus/dbus-string.h:
3280 New function with test.
3282 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3286 * dbus/dbus-transport-debug.c:
3289 * dbus/dbus-transport.c: (_dbus_transport_open):
3290 Parse address and use correct transport implementation.
3292 2003-01-30 Havoc Pennington <hp@pobox.com>
3294 * dbus/dbus-message.c: use message->byte_order instead of
3295 DBUS_COMPILER_BYTE_ORDER throughout.
3296 (dbus_message_create_header): pad header to align the
3297 start of the body of the message to 8-byte boundary
3299 * dbus/dbus-marshal.h: make all the demarshalers take const
3300 DBusString arguments.
3302 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3303 validate message args here, so we don't have to do slow validation
3304 later, and so we catch bad messages as they are incoming. Also add
3305 better checks on header_len and body_len. Also fill in
3308 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3309 implemented properly)
3310 (_dbus_string_validate_nul): new function to check all-nul
3312 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3313 get_arg_end_pos and remove all validation
3314 (_dbus_marshal_validate_arg): actually do validation here.
3316 2003-01-29 Havoc Pennington <hp@pobox.com>
3318 * dbus/dbus-message.c (check_message_handling): fix assertion
3319 failure on set_client_serial
3321 2003-01-28 Havoc Pennington <hp@pobox.com>
3323 * dbus/dbus-server-debug.c: Add doc section comments
3325 * dbus/dbus-transport-debug.c: add doc section comments
3327 2003-01-28 Havoc Pennington <hp@redhat.com>
3329 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3330 the reverse order from how I had it
3331 (_dbus_string_base64_encode): reverse encoding order. I was
3332 basically byteswapping everything during encoding.
3334 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3336 * dbus/dbus-connection-internal.h:
3337 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3338 (_dbus_connection_remove_timeout):
3339 Add functions for adding and removing timeouts.
3341 * dbus/dbus-message.c: (dbus_message_new_from_message):
3342 Add new function that takes a message and creates an exact
3343 copy of it, but with the refcount set to 1.
3344 (check_message_handling):
3347 * dbus/dbus-server-protected.h:
3348 * dbus/dbus-server.c: (_dbus_server_init_base),
3349 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3350 (dbus_server_set_timeout_functions):
3351 (_dbus_server_remove_timeout):
3352 New functions so that a server can add and remove timeouts.
3354 (dbus_server_listen):
3355 Add commented out call to dbus_server_debug_new.
3357 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3358 Actually set the handler, doh.
3360 * dbus/dbus-transport.c: (_dbus_transport_open):
3361 Add commented out call to dbus_transport_debug_client_new.
3364 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3366 2003-01-28 Havoc Pennington <hp@pobox.com>
3368 * dbus/dbus-message.c (check_message_handling): function to check
3369 on the loaded message, iterates over it etc.
3371 2003-01-28 Havoc Pennington <hp@pobox.com>
3373 * test/Makefile.am (dist-hook): fix make distdir
3375 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3377 2003-01-27 Havoc Pennington <hp@pobox.com>
3379 * dbus/dbus-mempool.c (time_for_size): replace printf with
3382 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3383 empty lines; fix the SAVE_LENGTH stuff to be
3384 START_LENGTH/END_LENGTH so it actually works; couple other
3387 * test/Makefile.am (dist-hook): add dist-hook for .message files
3389 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3390 can be constant or locked.
3391 (_dbus_string_free): allow freeing a const string as
3394 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3396 * dbus/dbus-test-main.c (main): take an argument which is the
3397 directory containing test data
3399 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3400 argument to this and load all the messages in test/data/
3401 checking that they can be loaded or not loaded as appropriate.
3403 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3405 * bus/dispatch.c: (bus_dispatch_message_handler):
3406 Dispatch messages sent to services.
3408 * bus/driver.c: (bus_driver_send_service_deleted),
3409 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3410 (bus_driver_send_service_acquired):
3411 Add helper functions for sending service related messages.
3413 (bus_driver_send_welcome_message):
3414 Send HELLO_REPLY instead of WELCOME.
3416 (bus_driver_handle_list_services):
3417 Send LIST_SERVICES_REPLY instead of SERVICES.
3419 (bus_driver_handle_own_service),
3420 (bus_driver_handle_service_exists):
3421 New message handlers.
3423 (bus_driver_handle_message):
3424 Invoke new message handlers.
3426 (bus_driver_remove_connection):
3427 Don't remove any services here since that's done automatically
3428 by bus_service_remove_owner now.
3431 New function signatures.
3433 * bus/services.c: (bus_service_add_owner):
3434 Send ServiceAcquired message if we're the only primary owner.
3436 (bus_service_remove_owner):
3437 Send ServiceAcquired/ServiceLost messages.
3439 (bus_service_set_prohibit_replacement),
3440 (bus_service_get_prohibit_replacement):
3441 Functions for setting prohibit replacement.
3443 (bus_service_has_owner):
3444 New function that checks if a connection is in the owner queue of
3448 Add new function signatures.
3450 * dbus/dbus-list.c: (_dbus_list_test):
3451 Add tests for _dbus_list_remove_last and traversing the list backwards.
3454 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3455 go any further, so return NULL then.
3457 * dbus/dbus-protocol.h:
3458 Add new messages, service flags and service replies.
3460 2003-01-26 Havoc Pennington <hp@pobox.com>
3462 * dbus/dbus-message-builder.c: implement, completely untested.
3464 * test/data/*: add data to be used in testing.
3465 ".message" files are our simple loadable text format.
3466 ".message-raw" will be binary dumps of messages.
3468 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3470 2003-01-26 Havoc Pennington <hp@pobox.com>
3472 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3474 * dbus/dbus-errors.c (dbus_result_to_string): add
3477 * dbus/dbus-message-builder.c: new file, will contain code to load
3478 up messages from files. Not implemented yet.
3480 2003-01-26 Havoc Pennington <hp@pobox.com>
3482 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3483 the sender by setting to NULL
3485 2003-01-26 Havoc Pennington <hp@pobox.com>
3487 The unit tests pass, but otherwise untested. If it breaks, the
3488 tests should have been better. ;-)
3490 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3493 * dbus/dbus-message.c: redo everything so we maintain
3494 message->header as the only copy of the various fields.
3495 This avoids the possibility of out-of-memory in some cases,
3496 for example dbus_message_lock() can't run out of memory anymore,
3497 and avoids extra copying. Figured I may as well go ahead and do
3498 this since it was busted for dbus_message_lock to not return
3499 failure on OOM, and dbus_message_write_header was totally
3500 unchecked for OOM. Also fixed some random other bugs.
3502 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3503 that strings are nul-terminated. Also, end_pos can be equal
3504 to string length just not greater than, I think.
3505 (_dbus_marshal_set_int32): new function
3506 (_dbus_marshal_set_uint32): new function
3507 (_dbus_marshal_set_string): new function
3509 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3510 a warning, init timeout_list to NULL
3511 (dbus_connection_send_message): don't use uninitialized variable
3514 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3516 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3518 * bus/driver.c: (bus_driver_handle_hello),
3519 (bus_driver_send_welcome_message):
3522 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3524 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3525 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3526 (dbus_connection_unref):
3527 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3528 * dbus/dbus-message.c: (dbus_message_unref),
3531 (dbus_message_get_fields):
3532 Remove debugging printout.
3534 (_dbus_message_loader_return_buffer):
3535 Don't store the header string.
3537 (_dbus_message_test):
3540 2003-01-26 Richard Hult <rhult@codefactory.se>
3542 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3543 the file descriptor list, since it can change under us.
3545 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3547 * glib/dbus-gmain.c: (dbus_connection_prepare),
3548 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3549 (remove_watch), (dbus_connection_hookup_with_g_main):
3550 Rewrite the glib handling to use its own GSource instead of a
3551 GIOChannel so we can catch messages put in the queue while waiting
3554 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3557 * bus/connection.c: (connection_disconnect_handler),
3558 (connection_watch_callback), (bus_connection_setup):
3559 * bus/dispatch.c: (send_one_message),
3560 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3561 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3563 * bus/driver.c: (bus_driver_send_service_deleted),
3564 (bus_driver_send_service_created), (bus_driver_handle_hello),
3565 (bus_driver_send_welcome_message),
3566 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3567 (bus_driver_handle_message):
3569 Refactor code, put the message dispatching in its own file. Use
3570 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3573 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3575 * dbus/dbus-internals.h:
3576 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3578 * dbus/dbus-message.c: (dbus_message_get_sender):
3579 * dbus/dbus-message.h:
3580 Implement dbus_message_get_sender.
3582 * dbus/dbus-protocol.h:
3583 Add message and service defines.
3585 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3587 * dbus/dbus-connection.c: (dbus_connection_send_message):
3588 * dbus/dbus-message-internal.h:
3589 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3590 (dbus_message_write_header):
3591 Remove _dbus_messag_unlock and don't set the client serial on a
3592 message if one already exists.
3594 2003-01-24 Havoc Pennington <hp@pobox.com>
3596 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3599 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3602 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3604 * dbus/dbus-list.c: (alloc_link), (free_link):
3605 Use a memory pool for the links.
3607 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3609 * bus/connection.c: (bus_connection_foreach):
3611 Add new bus_connection_foreach function.
3613 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3614 Add function that broadcasts a message to all clients.
3616 (bus_driver_send_service_created), (bus_driver_handle_hello),
3617 (bus_driver_send_welcome_message),
3618 (bus_driver_handle_list_services), (bus_driver_message_handler):
3619 Implement functions that take care of listing services, and notifying
3620 clients when new services are created.
3622 * bus/services.c: (bus_services_list):
3624 Add new function that returns an array of strings with the currently
3625 registered services.
3628 * glib/dbus-gmain.c:
3629 Update copyright year.
3631 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3633 * dbus/dbus-connection.c: (dbus_connection_send_message):
3634 Unlock the message in case it was sent earlier.
3636 (dbus_connection_send_message_with_reply_and_block):
3637 Remove the reply message from the list.
3639 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3640 Set array_len and new_pos correctly.
3642 (_dbus_marshal_test):
3643 Remove debug output.
3645 * dbus/dbus-message-internal.h:
3646 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3647 New function that returns the reply serial.
3649 (_dbus_message_unlock):
3650 New function that unlocks a message and resets its header.
3652 (dbus_message_append_string_array),
3653 (dbus_message_get_fields_valist),
3654 (dbus_message_iter_get_field_type),
3655 (dbus_message_iter_get_string_array),
3656 (dbus_message_get_fields),
3657 (dbus_message_append_fields_valist):
3658 Handle string arrays.
3660 (dbus_message_set_sender):
3661 Make this function public since the bus daemon needs it.
3663 (decode_header_data):
3664 Set the reply serial to -1 initially.
3666 * dbus/dbus-message.h:
3667 Add dbus_message_set_sender.
3669 2003-01-24 Havoc Pennington <hp@pobox.com>
3671 * doc/dbus-specification.sgml: add some stuff
3673 2003-01-22 Havoc Pennington <hp@pobox.com>
3675 * doc/dbus-specification.sgml: Start to document the protocol.
3677 2003-01-22 Havoc Pennington <hp@pobox.com>
3679 * dbus/dbus-connection.c
3680 (dbus_connection_send_message_with_reply_and_block): add some @todo
3682 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3684 2003-01-21 Havoc Pennington <hp@pobox.com>
3686 (patch untested because can't compile)
3688 * bus/driver.c (create_unique_client_name): make this function
3689 never recycle client names. Also, caller should initialize
3692 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3694 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3696 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3697 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3698 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3699 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3700 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3701 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3702 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3703 * dbus/dbus-marshal.h:
3704 * dbus/dbus-protocol.h:
3705 Add support for marshalling and demarshalling integer, double
3708 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3713 * bus/connection.c: (connection_disconnect_handler):
3714 Remove the connection from the bus driver's list.
3716 (connection_watch_callback): Dispatch messages.
3718 (free_connection_data): Free connection name.
3720 (bus_connection_setup): Add connection to the bus driver's list.
3721 (bus_connection_remove_owned_service):
3722 (bus_connection_set_name), (bus_connection_get_name):
3723 Add functions for setting and getting the connection's name.
3726 Add function headers.
3728 * bus/driver.c: (create_unique_client_name),
3729 (bus_driver_handle_hello_message),
3730 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3731 (bus_driver_add_connection), (bus_driver_remove_connection):
3734 * bus/services.c: (bus_service_free):
3736 New file that handles communication and registreation with the bus
3739 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3741 * dbus/dbus-connection.c: (dbus_connection_send_message):
3742 Add a new client_serial parameter.
3744 (dbus_connection_send_message_with_reply):
3745 Remove a @todo since we've implemented the blocking function.
3747 (dbus_connection_send_message_with_reply_and_block):
3748 New function that sends a message and waits for a reply and
3749 then returns the reply.
3751 * dbus/dbus-connection.h:
3754 * dbus/dbus-errors.c: (dbus_result_to_string):
3755 * dbus/dbus-errors.h:
3756 Add new DBUS_RESULT.
3758 * dbus/dbus-message-internal.h:
3759 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3760 (_dbus_message_set_sender), (dbus_message_write_header),
3761 (dbus_message_new_reply), (decode_header_data),
3762 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3763 * dbus/dbus-message.h:
3764 Add new functions that set the reply serial and sender.
3765 Also marshal and demarshal them correctly and add test.
3767 * dbus/dbus-protocol.h:
3768 Add new DBUS_MESSAGE_TYPE_SENDER.
3771 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3772 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3773 (dbus_connection_hookup_with_g_main):
3774 * glib/test-dbus-glib.c: (main):
3775 Rewrite to use GIOChannel and remove the GSource crack.
3777 * test/echo-client.c: (main):
3778 * test/watch.c: (check_messages):
3779 Update for changed APIs
3781 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3783 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3785 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3786 Create a DBusTimeoutList.
3787 (dbus_connection_set_timeout_functions): Add new function to
3788 set timeout callbacks
3790 * dbus/dbus-connection.h: Add public DBusTimeout API.
3792 * dbus/dbus-message.c: (dbus_message_get_service):
3793 * dbus/dbus-message.h: New function.
3795 * dbus/dbus-server.c: Fix small doc typo.
3797 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3799 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3801 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3802 of the string, just as long as specified.
3804 2003-01-19 Havoc Pennington <hp@pobox.com>
3806 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3809 * dbus/dbus-server.c (dbus_server_set_max_connections)
3810 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3811 keep track of current number of connections, and add API for
3812 setting a max (but haven't implemented enforcing the max yet)
3814 2003-01-18 Havoc Pennington <hp@pobox.com>
3816 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3817 reading/writing if read_watch != NULL or write_watch != NULL.
3819 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3820 the message loader code to actually load message->header and
3821 message->body into the newly-created message.
3823 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3826 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3827 (dbus_connection_get_max_message_size)
3828 (dbus_connection_set_max_live_messages_size)
3829 (dbus_connection_get_max_live_messages_size): implement some
3830 resource limitation functions
3832 * dbus/dbus-resources.c: new file implementing some of the
3833 resource limits stuff
3835 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3836 missing docs, add @todo to handle OOM etc.
3838 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3841 2003-01-18 Havoc Pennington <hp@pobox.com>
3843 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3844 connection if it hasn't been already.
3846 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3847 replace with DisconnectFunction.
3849 2003-01-18 Havoc Pennington <hp@pobox.com>
3851 Building --disable-verbose-mode --disable-asserts --disable-tests
3852 cuts the library from 112K to 45K or so
3854 * configure.in: check for varargs macro support,
3855 add --enable-verbose-mode, --enable-asserts.
3857 * dbus/dbus-internals.h (_dbus_assert): support
3859 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3861 2003-01-18 Havoc Pennington <hp@pobox.com>
3863 * dbus/dbus-test.c: include config.h so that tests actually run
3865 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3866 so the failure mode when that assumption fails will be plenty
3869 2003-01-18 Havoc Pennington <hp@pobox.com>
3871 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3873 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3876 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3877 since we don't want to use those in make check
3879 2003-01-15 Havoc Pennington <hp@redhat.com>
3885 2003-01-15 Havoc Pennington <hp@redhat.com>
3887 * test/Makefile.am: fix so that test source code ends up in the
3888 distribution on make distcheck
3890 2003-01-15 Havoc Pennington <hp@redhat.com>
3896 2003-01-15 Havoc Pennington <hp@redhat.com>
3898 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3899 fix build when --disable-tests
3901 * Makefile.am (EXTRA_DIST): put HACKING in here
3903 * HACKING: document procedure for making a tarball release.
3905 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3907 * bus/connection.c: (connection_error_handler),
3908 (bus_connection_setup):
3909 * bus/main.c: (main):
3910 Make sure that the DBusConnectionData struct is NULLed
3911 out to prevent a segfault.
3913 * dbus/dbus-errors.c: (dbus_result_to_string):
3914 * dbus/dbus-errors.h:
3915 * dbus/dbus-message.c: (dbus_message_get_fields),
3916 (dbus_message_get_fields_valist), (_dbus_message_test):
3917 * dbus/dbus-message.h:
3918 Make dbus_message_get_fields return a result code so we can
3919 track invalid fields as well as oom.
3921 2003-01-11 Havoc Pennington <hp@pobox.com>
3923 * configure.in: change --enable-test/--enable-ansi action-if-given
3924 to enable_foo=$enableval instead of enable_foo=yes
3926 2003-01-08 Havoc Pennington <hp@pobox.com>
3928 * dbus/dbus-string.c (_dbus_string_align_length): new function
3930 * dbus/dbus-test-main.c: move main() for test app here
3932 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3933 symbol to run tests, because dbus-test isn't in the main
3936 Code review nitpicks.
3938 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3939 for people with narrow emacs ;-). Assert client_serial was filled
3940 in. Assert message->name != NULL.
3941 (dbus_message_append_fields): have "first_field_type" arg separate
3942 from va list, needed for C++ binding that also uses varargs IIRC
3943 and helps with type safety
3944 (dbus_message_new): add @todo about using DBusString to store
3945 service/name internally
3946 (dbus_message_new): don't leak ->service and ->name on OOM later
3948 (dbus_message_unref): free the service name
3949 (dbus_message_get_fields): same change to varargs
3950 i.e. first_field_type
3951 (_dbus_message_loader_return_buffer): assert that the message data
3952 is aligned (if not it's a bug in our code). Put in verbose griping
3953 about why we set corrupted = TRUE.
3954 (decode_header_data): add FIXME that char* is evil. Was going to
3955 add FIXME about evil locale-specific string.h strncmp, but just
3956 switched to wacky string-as-uint32 optimization. Move check for
3957 "no room for field name" above get_const_data_len() to avoid
3958 assertion failure in get_const_data_len if we have trailing 2
3959 bytes or the like. Check for service and name fields being
3960 provided twice. Don't leak service/name on error. Require field
3961 names to be aligned to 4 bytes.
3963 * dbus/dbus-marshal.c: move byte swap stuff to header
3964 (_dbus_pack_int32): uscore-prefix
3965 (_dbus_unpack_int32): uscore-prefix
3966 (_dbus_unpack_uint32): export
3967 (_dbus_demarshal_string): add @todo complaining about use of
3969 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3970 handling allowing corrupt data to go unchecked
3972 2003-01-08 Havoc Pennington <hp@redhat.com>
3974 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3975 to the select() as needed for authentication. (should be using
3976 _dbus_poll() not select, but for another day)
3978 * dbus/dbus.h: include dbus/dbus-protocol.h
3980 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3982 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3985 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3987 * dbus/dbus-internals.c: (_dbus_type_to_string):
3988 New function that returns a string describing a type.
3990 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3991 * dbus/dbus-marshal.h:
3992 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3993 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3994 (dbus_message_iter_get_byte_array):
3995 * dbus/dbus-message.h:
3996 Add new convenience functions for appending and getting message fields.
3997 Also add demarshalling routines for byte arrays.
3999 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4001 * dbus/dbus-connection-internal.h:
4002 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4003 (_dbus_connection_get_next_client_serial),
4004 (dbus_connection_send_message):
4005 * dbus/dbus-internals.h:
4006 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
4007 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
4008 (_dbus_marshal_uint32), (_dbus_demarshal_double),
4009 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
4010 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
4011 (_dbus_verbose_bytes), (_dbus_marshal_test):
4012 * dbus/dbus-marshal.h:
4013 * dbus/dbus-message-internal.h:
4014 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
4015 (dbus_message_write_header), (_dbus_message_lock),
4016 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
4017 (dbus_message_get_name), (dbus_message_append_int32),
4018 (dbus_message_append_uint32), (dbus_message_append_double),
4019 (dbus_message_append_string), (dbus_message_append_byte_array),
4020 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
4021 (dbus_message_iter_unref), (dbus_message_iter_has_next),
4022 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
4023 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
4024 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
4025 (decode_header_data), (_dbus_message_loader_return_buffer),
4026 (message_iter_test), (_dbus_message_test):
4027 * dbus/dbus-message.h:
4028 * dbus/dbus-protocol.h:
4029 * dbus/dbus-test.c: (main):
4031 * glib/test-dbus-glib.c: (message_handler), (main):
4032 * test/echo-client.c: (main):
4033 * test/watch.c: (check_messages):
4034 Make messages sendable and receivable for real.
4036 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4038 * dbus/dbus-marshal.c: (_dbus_marshal_double),
4039 (_dbus_marshal_string), (_dbus_marshal_byte_array):
4040 * dbus/dbus-message.c: (dbus_message_append_int32),
4041 (dbus_message_append_uint32), (dbus_message_append_double),
4042 (dbus_message_append_string), (dbus_message_append_byte_array):
4043 Handle OOM restoration.
4045 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4047 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4048 (_dbus_demarshal_string), (_dbus_marshal_test):
4049 * dbus/dbus-marshal.h:
4050 * dbus/dbus-message.c: (dbus_message_get_name),
4051 Document these functions.
4053 (dbus_message_append_int32), (dbus_message_append_uint32),
4054 (dbus_message_append_double), (dbus_message_append_string),
4055 (dbus_message_append_byte_array):
4056 * dbus/dbus-message.h:
4057 Add functions for adding message fields of different types.
4059 * dbus/dbus-protocol.h:
4060 Add the different types.
4062 2003-01-05 Havoc Pennington <hp@pobox.com>
4064 * bus/connection.c: implement routines for handling connections,
4065 first thing is keeping a list of owned services on each connection
4066 and setting up watches etc.
4068 * bus/services.c: implement a mapping from service names to lists
4071 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
4073 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
4074 to use static mutexes for global data
4076 * dbus/dbus-connection.c (dbus_connection_set_data): add new
4077 collection of functions to set/get application-specific data
4078 on the DBusConnection.
4080 2003-01-04 Havoc Pennington <hp@pobox.com>
4082 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4083 (_dbus_poll): new function
4085 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4088 * bus/loop.c: initial code for the daemon main loop
4090 2003-01-04 Havoc Pennington <hp@pobox.com>
4092 * test/watch.c (error_handler): make it safe if the error handler
4093 is called multiple times (if we s/error handler/disconnect
4094 handler/ we should just guarantee it's called only once)
4096 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4097 error handler on disconnect (it's quite possible we should
4098 just change the error handler to a "disconnect handler," I'm
4099 not sure we have any other meaningful errors)
4101 * configure.in: check for getpwnam_r
4103 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4104 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4105 mechanism as in SASL spec, using socket credentials
4107 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4108 (_dbus_send_credentials_unix_socket): new function
4110 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4112 (_dbus_write): only check errno if <0 returned
4113 (_dbus_write_two): ditto
4115 2003-01-02 Anders Carlsson <andersca@codefactory.se>
4117 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4118 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4119 (_dbus_marshal_test):
4120 * dbus/dbus-marshal.h:
4121 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4122 to _dbus_marshal_utf8_string. Also fix some tests.
4124 2002-12-28 Harri Porten <porten@kde.org>
4126 * configure.in: added check for C++ compiler and a very cheesy
4127 check for the Qt integration
4129 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4131 * qt/Makefile.am: added
4133 * qt/.cvsignore: added
4135 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4136 latter, added #ifdef QT_THREAD_SUPPORT guard.
4138 * dbus/Makefile.am: added missing headers for make dist
4140 2002-12-28 Kristian Rietveld <kris@gtk.org>
4142 * dbus/Makefile.am: fixup export-symbols-regex.
4144 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4146 * acinclude.m4: Add this file and put the
4147 PKG_CHECK_MODULE macro in it.
4149 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4151 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4152 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4153 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4154 (_dbus_marshal_test):
4155 Make the demarshalling routines align the pos argument.
4156 Add string marshalling tests and fix the obvious bugs
4159 2002-12-26 Havoc Pennington <hp@pobox.com>
4161 * dbus/dbus-auth.c: fixes fixes fixes
4163 * dbus/dbus-transport-unix.c: wire up support for
4164 encoding/decoding data on the wire
4166 * dbus/dbus-auth.c (_dbus_auth_encode_data)
4167 (_dbus_auth_decode_data): append to target string
4168 instead of nuking it.
4170 2002-12-26 Havoc Pennington <hp@pobox.com>
4172 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4173 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4176 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4177 avoid swap_bytes() overhead (ignoring possible assembly stuff for
4178 now). Main point is because I wanted unpack_uint32 to implement
4180 (_dbus_verbose_bytes): new function
4182 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4184 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4185 mechanism to handle a corrupt message stream
4186 (_dbus_message_loader_new): fix preallocation to only prealloc,
4189 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4190 (_dbus_string_test): enhance tests for copy/move and fix the
4193 * dbus/dbus-transport-unix.c: Hold references in more places to
4194 avoid reentrancy problems
4196 * dbus/dbus-transport.c: ditto
4198 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4199 leak reference count in no-message case
4201 * test/watch.c (do_mainloop): handle adding/removing watches
4202 during iteration over the watches. Also, ref the connection/server
4203 stored on a watch, so we don't try to mangle a destroyed one.
4205 * dbus/dbus-transport-unix.c (do_authentication): perform
4208 * dbus/dbus-auth.c (get_state): add a state
4209 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4210 (_dbus_auth_get_unused_bytes): append the unused bytes
4211 to the passed in string, rather than prepend
4213 * dbus/dbus-transport.c (_dbus_transport_init_base): create
4214 the auth conversation DBusAuth
4216 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4217 (_dbus_transport_new_for_domain_socket): when creating a
4218 transport, pass in whether it's a client-side or server-side
4219 transport so we know which DBusAuth to create
4221 2002-12-03 Havoc Pennington <hp@pobox.com>
4223 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4224 _after_ finalizing the derived members
4225 (unix_connection_set): unref watch if we fail to add it
4227 * dbus/dbus-connection.c (dbus_connection_unref): delete the
4228 transport first, so that the connection owned by the
4229 transport will be valid as the transport finalizes.
4231 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4232 if necessary, and remove watches from the connection.
4234 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4236 2002-12-26 Anders Carlsson <andersca@codefactory.se>
4238 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4239 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4240 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4241 (_dbus_marshal_test):
4242 * dbus/dbus-marshal.h:
4243 Add string marshal functions and have the demarshal functions
4244 return the new position.
4246 2002-12-25 Havoc Pennington <hp@pobox.com>
4248 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
4249 it is a simple protocol that just maps directly to SASL.
4251 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4252 initial implementation, not actually used yet.
4254 * dbus/dbus-string.c (_dbus_string_find): new function
4255 (_dbus_string_equal): new function
4256 (_dbus_string_base64_encode): new function
4257 (_dbus_string_base64_decode): new function
4259 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4262 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4263 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4264 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4265 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4266 * dbus/dbus-marshal.h:
4267 * dbus/dbus-protocol.h:
4268 * dbus/dbus-test.c: (main):
4270 Add un-optimized marshalling/demarshalling routines.
4272 2002-12-25 Harri Porten <porten@kde.org>
4274 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4276 2002-12-24 Zack Rusin <zack@kde.org>
4278 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4279 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4282 2002-12-24 Havoc Pennington <hp@pobox.com>
4284 * glib/dbus-gthread.c: fix include
4286 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4287 I think glib API needs to change, though, as you don't
4288 want to use DBusMessageFunction, you want to use the
4289 DBusMessageHandler object. Probably
4290 dbus_connection_open_with_g_main_loop()
4291 and dbus_connection_setup_g_main_loop() or something like that
4292 (but think of better names...) that just create a connection
4293 that has watch/timeout functions etc. already set up.
4295 * dbus/dbus-connection.c
4296 (dbus_connection_send_message_with_reply): new function just to
4297 show how the message handler helps us deal with replies.
4299 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4301 * dbus/dbus-string.c (_dbus_string_test): free a string that
4304 * dbus/dbus-hash.c: use memory pools for the hash entries
4305 (rebuild_table): be more paranoid about overflow, and
4306 shrink table when we can
4307 (_dbus_hash_test): reduce number of sprintfs and write
4308 valid C89. Add tests for case where we grow and then
4309 shrink the hash table.
4311 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4313 * dbus/dbus-connection.c (dbus_connection_register_handler)
4314 (dbus_connection_unregister_handler): new functions
4316 * dbus/dbus-message.c (dbus_message_get_name): new
4318 * dbus/dbus-list.c: fix docs typo
4320 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4321 an object representing a handler for messages.
4323 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4326 * glib/dbus-gthread.c: (dbus_gthread_init):
4327 Don't use the gdbus prefix for public functions.
4329 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4333 Add GLib checks and fixup .pc files
4337 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4338 (gdbus_connection_check), (gdbus_connection_dispatch),
4339 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4340 (dbus_connection_gsource_new):
4341 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4342 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4343 * glib/test-dbus-glib.c: (message_handler), (main):
4346 2002-12-15 Harri Porten <porten@kde.org>
4348 * autogen.sh: check for libtoolize before attempting to use it
4350 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4353 * .cvsignore: ignore more stamp files
4355 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4357 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4358 without make install.
4360 2002-12-15 Havoc Pennington <hp@pobox.com>
4362 * dbus/dbus-threads.c: add thread stubs that a higher library
4363 layer can fill in. e.g. the GLib wrapper might fill them in with
4364 GThread stuff. We still need to use this thread API to
4365 thread-safe-ize the library.
4367 2002-12-12 Havoc Pennington <hp@pobox.com>
4369 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4370 below new interfaces and include fewer system headers.
4372 * dbus/dbus-sysdeps.c (_dbus_read): new function
4373 (_dbus_write): new function
4374 (_dbus_write_two): new function
4375 (_dbus_connect_unix_socket): new function
4376 (_dbus_listen_unix_socket): new function
4378 * dbus/dbus-message-internal.h: change interfaces to use
4381 2002-12-11 Havoc Pennington <hp@pobox.com>
4383 * dbus/dbus-types.h: add dbus_unichar
4385 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4387 * dbus/dbus-connection.c (dbus_connection_send_message): return
4390 * dbus/dbus-transport.c: include dbus-watch.h
4392 * dbus/dbus-connection.c: include dbus-message-internal.h
4394 * HACKING: add file with coding guidelines stuff.
4396 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4397 handling here, for security purposes (as in vsftpd). Not actually
4398 using this class yet.
4400 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4401 system/libc usage here, as in vsftpd, for ease of auditing (and
4402 should also simplify portability). Haven't actually moved all the
4403 system/libc usage into here yet.
4405 2002-11-25 Havoc Pennington <hp@pobox.com>
4407 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4408 always print the first verbose message.
4410 2002-11-24 Havoc Pennington <hp@pobox.com>
4412 * test/echo-client.c, test/echo-server.c: cheesy test
4415 * configure.in (AC_CHECK_FUNCS): check for writev
4417 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4420 * dbus/dbus-list.c (_dbus_list_foreach): new function
4422 * dbus/dbus-internals.c (_dbus_verbose): new function
4424 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4425 representing a server that listens for connections.
4427 * dbus/.cvsignore: create
4429 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4430 public API for reporting errors
4432 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4433 public object representing a connection that
4434 sends/receives messages. (Same object used for
4435 both client and server.)
4437 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4438 Basic abstraction for different kinds of stream
4439 that we might read/write messages from.
4441 2002-11-23 Havoc Pennington <hp@pobox.com>
4443 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4446 * dbus/dbus-test.c (main): add list test, and include
4447 dbus-test.h as intended
4449 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4450 (_dbus_hash_table_remove_int): return value indicates
4451 whether the entry existed to remove
4453 * dbus/dbus-list.c: add linked list utility class,
4456 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4459 2002-11-23 Havoc Pennington <hp@pobox.com>
4461 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4462 DBUS_END_DECLS to nothing, that should fix this once and for all
4464 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4466 * dbus/dbus-message.c, dbus/dbus-hash.c:
4467 add some missing @brief
4469 2002-11-23 Havoc Pennington <hp@pobox.com>
4471 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4472 to avoid confusing Doxygen
4474 * dbus/dbus-hash.c: @} not }@
4476 * dbus/dbus-message.c (struct DBusMessage): split out
4479 2002-11-23 Havoc Pennington <hp@pobox.com>
4481 * configure.in: pile on more warning flags if using gcc
4483 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4484 to document static functions
4486 * configure.in: add summary to end of configure so it
4487 looks nice and attractive
4489 * dbus/dbus-hash.c: finish implementation and write unit
4492 * configure.in: add --enable-tests to enable unit tests
4494 * dbus/dbus-test.c: test program to run unit tests
4495 for all files in dbus/*, initially runs a test for
4498 * dbus/dbus-internals.h: file to hold some internal utility stuff
4500 2002-11-22 Havoc Pennington <hp@redhat.com>
4502 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4503 "ported" away from Tcl
4505 * dbus/dbus-types.h: header for types such as dbus_bool_t
4507 2002-11-22 Havoc Pennington <hp@redhat.com>
4509 * dbus/dbus.h: fixups for doc warnings
4511 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4513 (QUIET): make it quiet so we can see warnings
4515 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4517 2002-11-22 Havoc Pennington <hp@redhat.com>
4519 * Makefile.am: include "Doxyfile" target in all-local
4521 * configure.in: generate the Doxyfile
4523 * Doxyfile.in: move Doxyfile here, so we can use
4524 configure to generate a Doxyfile with the right
4527 2002-11-22 Havoc Pennington <hp@redhat.com>
4529 * dbus/dbus-message.c: move inline docs into .c file
4531 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4532 so all docs are under doc/
4533 (MAN_EXTENSION): generate man pages. Use extension
4534 ".3dbus" which matches ".3qt" on my system,
4535 I guess this is OK, I don't know really.
4536 (FILE_PATTERNS): look for .c files not .h, makes sense
4539 2002-11-22 Havoc Pennington <hp@pobox.com>
4541 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4542 because any app can be a server, and any app can be a client,
4543 the bus is a special kind of server.
4545 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4547 * Doxyfile : adding. Still needs Makefile rules to be generated
4548 automatically (just run "doxygen" in the toplevel dir for now to
4551 * dbus/dbus-message.h : Adding sample docs (javadoc since
4552 resembles gtk-doc a little more)
4554 * dbus/dbus.h : Adding sample docs
4556 2002-11-21 Havoc Pennington <hp@redhat.com>
4558 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4559 so we can allow ourselves to include files directly,
4560 instead of having to use dbus.h
4562 * dbus/dbus.h: fill in
4564 * dbus/dbus-message.h: sketch out a sample header file.
4565 Include griping if you include it directly instead of
4568 * dbus/dbus-macros.h: new file with macros for extern "C",
4569 TRUE/FALSE, NULL, etc.
4571 * doc/file-boilerplate.c: put include guards in here
4573 2002-11-21 Havoc Pennington <hp@redhat.com>
4575 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4577 * COPYING: include the GPL as well, and license code
4578 under both AFL and GPL.
4580 2002-11-21 Havoc Pennington <hp@redhat.com>
4582 * acconfig.h: get rid of this
4584 * autogen.sh (run_configure): add --no-configure option
4586 * configure.in: remove AC_ARG_PROGRAM to make
4587 autoconf complain less. add AC_PREREQ.
4588 add AC_DEFINE third arg.
4590 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4593 Fix references so we can distcheck.
4595 2002-11-21 Havoc Pennington <hp@redhat.com>
4597 * Initial module creation