1 2003-05-03 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4 the address had no value, and add to test suite. Fix and
5 regression test from Miloslav Trmac
7 2003-05-03 Havoc Pennington <hp@pobox.com>
9 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
10 daemon; also documents daemon config file, so replaces
11 doc/config-file.txt. Corrected some stuff from config-file.txt in
12 the process of moving it.
14 2003-05-03 Havoc Pennington <hp@pobox.com>
16 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
19 2003-05-03 Colin Walters <walters@verbum.org>
21 * dbus/dbus-sysdeps.c (fill_user_info): Test against
22 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
24 * Makefile.am: Update to use new .pc versioning scheme.
26 2003-05-02 Havoc Pennington <hp@redhat.com>
28 * bus/system.conf.in: allow send/receive to/from message bus
31 2003-04-30 Havoc Pennington <hp@redhat.com>
33 * configure.in: print a note when building with unit tests and
36 2003-04-30 Havoc Pennington <hp@redhat.com>
38 * Makefile.am: add a check-local that complains if you didn't
39 configure with --enable-tests
41 2003-04-29 Havoc Pennington <hp@redhat.com>
43 * glib/dbus-gmain.c: docs cleanups
45 * dbus/dbus-types.h: add docs on int64 types
47 * dbus/dbus-memory.c: fix docs to avoid putting private API in
48 public API docs section
50 2003-04-29 Havoc Pennington <hp@redhat.com>
52 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
53 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
54 parallel install API version, not with the D-BUS package version.
56 * HACKING: move some of README over here
58 * README: updates, and document API/ABI policy
60 * configure.in: reindentation
62 2003-04-29 Havoc Pennington <hp@redhat.com>
64 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
65 to use this library" to be sure people have the right
68 2003-04-28 Havoc Pennington <hp@redhat.com>
70 * configure.in: add --enable-docs which by default is auto yes if
71 doxygen and db2html found, no otherwise; but can be forced on/off
73 * doc/Makefile.am: conditionalize whether to build docs on
76 2003-04-28 Havoc Pennington <hp@redhat.com>
82 * bus/system.conf.in: add <includedir>system.d</includedir>
84 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
85 username was provided but not uid
87 * bus/config-parser.c (struct BusConfigParser): keep track of
88 whether the parser is toplevel or was included; change some
89 of the error handling if it's included.
91 2003-04-27 Havoc Pennington <hp@pobox.com>
95 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
96 report correct status if we finish processing authentication
99 * bus/activation.c (try_send_activation_failure): use
100 bus_transaction_send_error_reply
102 * bus/connection.c (bus_connection_get_groups): return an error
103 explaining the problem
105 * bus/bus.c (bus_context_check_security_policy): implement
106 restriction here that inactive connections can only send the
107 hello message. Also, allow bus driver to send anything to
110 * bus/connection.c (bus_connection_complete): create the
111 BusClientPolicy here instead of on-demand.
112 (bus_connection_get_policy): don't return an error
114 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
115 sender field in message being replied to
117 * bus/bus.c (bus_context_check_security_policy): fix silly typo
118 causing it to return FALSE always
120 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
121 we checked sender rather than destination
123 2003-04-25 Havoc Pennington <hp@redhat.com>
125 test suite is slightly hosed at the moment, will fix soon
127 * bus/connection.c (bus_connections_expire_incomplete): fix to
128 properly disable the timeout when required
129 (bus_connection_set_name): check whether we can remove incomplete
130 connections timeout after we complete each connection.
132 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
133 probably still broken.
135 * bus/services.c (bus_registry_acquire_service): implement max
136 number of services owned, and honor allow/deny rules on which
137 services a connection can own.
139 * bus/connection.c (bus_connection_get_policy): report errors here
141 * bus/activation.c: implement limit on number of pending
144 2003-04-25 Havoc Pennington <hp@redhat.com>
146 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
147 where we used >= 0 instead of != DBUS_UID_UNSET.
149 2003-04-25 Havoc Pennington <hp@redhat.com>
151 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
152 were toggled without add/remove, fix from Anders Gustafsson
154 2003-04-24 Havoc Pennington <hp@redhat.com>
156 * test/data/valid-config-files/basic.conf: add <limit> tags to
159 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
160 <limit> tag in configuration file.
162 2003-04-24 Havoc Pennington <hp@redhat.com>
164 * bus/dispatch.c: somehow missed some name_is
166 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
167 (_dbus_timeout_set_interval): new
169 * bus/connection.c (bus_connections_setup_connection): record time
170 when each connection is first set up, and expire them after the
173 2003-04-24 Havoc Pennington <hp@redhat.com>
175 * dbus/dbus-message.c (dbus_message_name_is): rename
176 (dbus_message_service_is): rename
177 (dbus_message_sender_is): rename
178 (dbus_message_get_service): rename
180 2003-04-24 Havoc Pennington <hp@redhat.com>
182 * configure.in: add --enable-checks
184 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
186 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
188 (_dbus_connection_handler_destroyed_locked): move some private
189 functions into proper docs group
191 * dbus/dbus-internals.h: add _dbus_return_if_fail,
192 _dbus_return_val_if_fail
194 Throughout: use dbus_return_if_fail
196 2003-04-23 James Willcox <jwillcox@gnome.org>
199 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
200 (dbus_connection_setup_with_g_main),
201 (dbus_server_setup_with_g_main):
202 * glib/test-dbus-glib.c: (main):
203 * glib/test-thread-client.c: (main):
204 * glib/test-thread-server.c: (new_connection_callback), (main):
205 * tools/dbus-monitor.c: (main):
207 Added a GMainContext argument to dbus_connection_setup_with_g_main()
208 and dbus_server_setup_with_g_main().
210 2003-04-20 Havoc Pennington <hp@pobox.com>
212 * doc/dbus-specification.sgml: document the restrictions on
213 message and service names
215 2003-04-22 Havoc Pennington <hp@redhat.com>
217 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
218 support, and do some code cleanups to share more code and
219 speed up array marshal/demarshal.
221 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
223 * configure.in: generate dbus-arch-deps.h
225 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
228 2003-04-22 Havoc Pennington <hp@redhat.com>
230 * test/data/valid-messages/opposite-endian.message: fix test
231 to use proper type for rply field
233 * test/data/invalid-messages: add tests for below validation
235 * dbus/dbus-message.c (decode_header_data): validate field types,
236 and validate that named fields are valid names
237 (decode_name_field): consider messages in the
238 org.freedesktop.Local. namespace to be invalid.
240 * dbus/dbus-string.c (_dbus_string_validate_name): new
242 2003-04-19 Havoc Pennington <hp@pobox.com>
244 * bus/driver.c (bus_driver_handle_hello): check limits and
245 return an error if they are exceeded.
247 * bus/connection.c: maintain separate lists of active and inactive
248 connections, and a count of each. Maintain count of completed
249 connections per user. Implement code to check connection limits.
251 * dbus/dbus-list.c (_dbus_list_unlink): export
253 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
254 number of bytes in the message queue for a connection
256 2003-04-18 Havoc Pennington <hp@pobox.com>
258 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
260 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
263 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
264 on realloc be sure to update the pointer in the keyring
266 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
267 offset to avoid writing to unallocated memory
269 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
270 try the next mechanism, so we properly handle OOM
272 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
274 (_dbus_keyring_new): fix OOM bug
275 (_dbus_keyring_new_homedir): always set error; impose a maximum
276 number of keys we'll load from the file, mostly to speed up the
277 test suite and make its OOM checks more useful, but also for
280 * dbus/dbus-auth.c (process_error_server): reject authentication
281 if we get an error from the client
282 (process_cancel): on cancel, send REJECTED, per the spec
283 (process_error_client): send CANCEL if we get an error from the
286 2003-04-18 Havoc Pennington <hp@pobox.com>
288 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
291 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
294 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
295 about DBUS_TEST_HOMEDIR once
297 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
300 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
301 config file so we test the right thing
303 Throughout: assorted docs improvements
305 2003-04-18 Havoc Pennington <hp@pobox.com>
307 * glib/dbus-gmain.c: adapt to watch changes
309 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
311 * dbus/dbus-server.h: remove dbus_server_handle_watch
313 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
315 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
316 like DBusTimeout, so we don't need dbus_connection_handle_watch
319 2003-04-17 Havoc Pennington <hp@redhat.com>
321 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
322 database usage so it all goes via the DBusUserDatabase cache.
324 2003-04-17 Havoc Pennington <hp@redhat.com>
326 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
327 there was an OOM watch we skipped, we always return TRUE so we
328 iterate again to have a look at it again. Fixes test suite hang.
329 Code rearrangement also lets us lose some memset and only iterate
332 * bus/driver.c (bus_driver_handle_message): sense of test for
335 2003-04-16 Havoc Pennington <hp@pobox.com>
337 * doc/dbus-specification.sgml: make spec say serials are unsigned
339 * dbus/dbus-message.h: change message serials to unsigned
341 * dbus/dbus-connection.c: adapt to message serials being unsigned
343 2003-04-15 Havoc Pennington <hp@pobox.com>
345 * bus/bus.c: create and keep around a shared DBusUserDatabase
348 * bus/connection.c (bus_connection_get_groups): don't cache
349 groups for user in the connection object, since user database
350 object now does that.
352 2003-04-16 Havoc Pennington <hp@redhat.com>
354 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
355 list of size counters
356 (_dbus_message_loader_putback_message_link): put back a popped link
358 * dbus/dbus-connection.c
359 (dbus_connection_set_max_live_messages_size): rename
361 (dbus_connection_get_outgoing_size): get size of outgoing
363 (_dbus_connection_set_connection_counter): remove this cruft
365 2003-04-14 Havoc Pennington <hp@redhat.com>
367 * dbus/dbus-userdb.c: user database abstraction, mostly to get
368 caching, but at some point we might want to be able to use a
371 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
372 SHA1 conf file to test the sha1 auth mechanism, since the regular
373 test always uses EXTERNAL when available.
376 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
377 add conf file that requires use of sha1 auth
379 2003-04-13 Havoc Pennington <hp@pobox.com>
381 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
382 from Philip Blundell to send messages and monitor them.
384 2003-04-13 Havoc Pennington <hp@pobox.com>
386 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
389 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
392 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
393 fix to only recover unused bytes if we're already authenticated
394 (_dbus_transport_get_is_authenticated): fix to still mark us
395 authenticated if there are unused bytes.
397 * bus/dispatch.c: implement security policy checking
399 * bus/connection.c (bus_transaction_send_from_driver): new
401 * bus/bus.c (bus_context_check_security_policy): new
403 * bus/dispatch.c (send_service_nonexistent_error): delete this,
404 now we just set the DBusError and it gets converted to an error
407 * bus/connection.c (allow_user_function): enable code using actual
408 data from the config file
410 * bus/policy.c (list_allows_user): handle wildcard rules for
411 user/group connection perms
413 2003-04-13 Havoc Pennington <hp@pobox.com>
415 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
417 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
419 * bus/policy.c (bus_policy_append_mandatory_rule)
420 (bus_policy_append_default_rule, bus_policy_append_user_rule)
421 (bus_policy_append_group_rule): new functions
423 2003-04-12 Havoc Pennington <hp@pobox.com>
425 * bus/config-parser.c (bus_config_parser_new): fix a memleak
427 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
428 the pid/gid/uid, just for paranoia.
430 * test/break-loader.c (randomly_do_n_things): find a byte
431 containing a type code, and randomly change it to a different
434 2003-04-12 Havoc Pennington <hp@pobox.com>
436 * bus/policy.h: change BusPolicy to be the thing from the config
437 file, and rename old BusPolicy to BusClientPolicy
439 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
440 match change in how policy works
442 * dbus/dbus-internals.h: mark assert_not_reached as
443 __attribute((noreturn))__
445 2003-04-11 Havoc Pennington <hp@redhat.com>
447 * doc/dbus-specification.sgml: fix a spot with the wrong name for
448 the broadcast service. Use boolean return for ServiceExists.
450 2003-04-11 Havoc Pennington <hp@redhat.com>
452 * configure.in: add another directory to look for qt in.
454 2003-04-11 Havoc Pennington <hp@redhat.com>
456 * AUTHORS: add Colin Walters
458 2003-04-11 Havoc Pennington <hp@redhat.com>
464 2003-04-11 Havoc Pennington <hp@redhat.com>
466 * bus/messagebus.in: remove pid file when stopping the
467 message bus, since the bus won't have privileges to remove it
470 2003-04-11 Havoc Pennington <hp@redhat.com>
472 * bus/bus.c (bus_context_new): move credentials change after
475 2003-04-11 Havoc Pennington <hp@pobox.com>
477 * test/decode-gcov.c: add "below average functions" to the
478 coverage report, and change how some of the code works.
480 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
481 not in the coverage stats.
483 * test/test-service.c (main): use _dbus_verbose not fprintf in a
484 couple places so running the test suite doesn't result in megaspam.
486 2003-04-11 Havoc Pennington <hp@pobox.com>
488 * bus/dispatch.c (check_existent_service_activation): accept a no
489 memory error in a place we didn't before
491 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
492 in case the first one failed," since the test suite is less
495 2003-04-10 Havoc Pennington <hp@pobox.com>
497 * bus/dispatch.c (check_segfault_service_activation): add test
498 for launching an executable that just crashes.
500 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
501 don't leave a million cores. We'll see how portable this is.
503 2003-04-10 Havoc Pennington <hp@pobox.com>
505 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
506 the possible parent failures before we fork, so that we don't
507 fail to create a babysitter after creating the child.
509 * bus/activation.c (bus_activation_activate_service): kill child
510 if we don't successfully complete the activation.
512 2003-04-10 Havoc Pennington <hp@redhat.com>
514 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
515 the connection if it's disconnected
517 * bus/activation.c (bus_activation_service_created): use new
518 transaction features to roll back removal of pending activation if
519 we don't successfully create the service after all. Don't remove
520 pending activation if the function fails.
522 * dbus/dbus-list.c (_dbus_list_insert_before_link)
523 (_dbus_list_insert_after_link): new code to facilitate
526 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
527 new functionality, so we can preallocate the ability to insert
530 * bus/connection.c (bus_transaction_add_cancel_hook): new function
531 allowing us to put custom hooks in a transaction to be used for
532 cancelling said transaction
534 * doc/dbus-specification.sgml: add some discussion of secondary
535 service owners, and disallow zero-length service names
537 * bus/services.c (bus_registry_acquire_service): new function,
538 splits out part of bus_driver_handle_acquire_service() and fixes
539 a bug where we didn't remove the service doing the acquiring
540 from the secondary queue if we failed to remove the current owner
541 from the front of the queue.
543 2003-04-10 Alexander Larsson <alexl@redhat.com>
545 * doc/dbus-specification.sgml:
546 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
548 2003-04-10 Alexander Larsson <alexl@redhat.com>
553 Added files to cvsignore
555 * dbus/dbus-message.h:
556 * dbus/dbus-message.c: (dbus_message_iter_get_named):
557 Make get_named() take two out argument and return a boolean.
558 (dbus_message_iter_get_args_valist):
559 Update usage of get_named().
560 (dbus_message_iter_append_byte):
562 (dbus_message_iter_append_named)
564 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
567 2003-04-10 Alexander Larsson <alexl@redhat.com>
569 * dbus/dbus-marshal.[ch]:
570 Add array_type_pos argument to _dbus_marshal_validate_arg.
571 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
573 * dbus/dbus-message.[ch]:
574 Multi-dimensional arrays have full type specification in the
575 outermost array. Iter code re-arranged to handle this.
576 Added some more iter tests.
578 * doc/dbus-specification.sgml:
581 Update new array encoding description.
582 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
584 * test/data/invalid-messages/array-with-mixed-types.message:
585 * test/data/valid-messages/array-of-array-of-uint32.message:
586 Change to the new array format.
588 * test/data/invalid-messages/too-short-dict.message:
591 * test/data/valid-messages/recursive-types.message:
592 Fix up and extend test.
594 2003-04-10 Havoc Pennington <hp@pobox.com>
596 * bus/dispatch.c: lots of fixes
598 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
599 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
600 that was crack, broke the test service.
602 * dbus/dbus-transport.c (_dbus_transport_open): fix error
603 handling to avoid piling up errors if we get a failure on the
606 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
607 pid in assertion failures.
609 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
610 to some fixed size of file descriptor array. Don't return TRUE
611 anytime a timeout exists, that led to lots of busy loop silliness
614 2003-04-09 Havoc Pennington <hp@redhat.com>
616 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
617 I'd checked this in earlier but hadn't.
619 2003-04-09 Havoc Pennington <hp@redhat.com>
621 * bus/dispatch.c (bus_dispatch_test): get a bit further through
622 the activation test (man this is getting old!)
624 2003-04-09 Havoc Pennington <hp@redhat.com>
626 * test/test-utils.c: use dispatch status function to fix this up
628 * bus/connection.c (connection_watch_callback): don't dispatch
630 (connection_timeout_callback): don't dispatch from here
631 (bus_connections_setup_connection): set the dispatch status function
632 (bus_connection_disconnected): unset it
634 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
635 used to add a connection to be dispatched
636 (_dbus_loop_iterate): do the dispatching at the end of each
639 * dbus/dbus-connection.c
640 (dbus_connection_set_dispatch_status_function): new function
641 allowing us to fix up main loop usage
642 (_dbus_connection_last_unref): free all the various function
644 (dbus_connection_dispatch): call the DispatchStatusFunction
645 whenever this function returns
646 (dbus_connection_handle_watch): call DispatchStatusFunction
647 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
648 (reply_handler_timeout): call DispatchStatusFunction
649 (dbus_connection_flush): call DispatchStatusFunction
651 2003-04-09 Havoc Pennington <hp@redhat.com>
653 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
656 * bus/dispatch.c (check_service_activated): fix bug in test
658 * dbus/dbus-mainloop.c (check_timeout): fix this up
660 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
661 verbose output so we can sort out output from different processes,
662 e.g. in the activation case.
664 2003-04-08 Colin Walters <walters@gnu.org>
666 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
668 (bus_context_new): Set it.
669 (bus_context_unref): Use it to delete the pid file.
671 2003-04-08 Havoc Pennington <hp@redhat.com>
673 * test/data/invalid-messages/array-with-mixed-types.message:
674 regression test that fails for the moment
676 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
677 tests for convenience
679 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
680 array of nil, it broke things.
682 * test/data/invalid-messages/array-of-nil.message: regression test
684 * test/data/valid-messages/array-of-array-of-uint32.message:
685 happened to write this so added it to suite
687 2003-04-08 Havoc Pennington <hp@redhat.com>
689 * bus/driver.c (bus_driver_handle_acquire_service): init
690 retval/reply before checking name
692 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
693 recursion depth argument
695 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
696 in the public struct for future extension
698 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
701 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
704 * doc/dbus-specification.sgml: fix typo
706 2003-04-08 Alexander Larsson <alexl@redhat.com>
708 Implemented recursive types, named types and new-style iters
711 * glib/test-thread-client.c: (thread_func):
712 * glib/test-thread-server.c: (handle_test_message):
713 * test/test-service.c: (handle_echo):
722 * dbus/dbus-internals.c: (_dbus_type_to_string):
723 Update for new types.
725 * dbus/dbus-marshal.[ch]:
726 Implement recursive types and the new marshalling format.
727 Remove hardcoded dict marshalling.
730 * dbus/dbus-message-builder.c:
732 Remove references to old types
734 * dbus/dbus-message.[ch]:
735 New non-refcounted iter API that supports recursive iters.
736 Use iters for appending, including support for recursive
738 Add byte and named type support.
739 Update everything to new marshalling formats.
740 Add tests for new API.
742 * dbus/dbus-protocol.h:
743 Remove old array types.
744 Add types: BYTE, ARRAY, DICT, NAMED
746 * dbus/dbus-string.c:
747 * dbus/dbus-sysdeps.c:
748 Make parse_double locale safe.
750 * dbus/dbus-test-main.c:
756 * doc/dbus-specification.sgml:
759 * test/data/incomplete-messages/missing-body.message:
760 * test/data/invalid-messages/bad-boolean.message:
761 * test/data/invalid-messages/bad-boolean-array.message:
762 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
763 * test/data/invalid-messages/boolean-has-no-value.message-raw:
764 * test/data/invalid-messages/too-short-dict.message:
765 * test/data/valid-messages/dict-simple.message:
766 * test/data/valid-messages/dict.message:
767 * test/data/valid-messages/emptiness.message:
768 * test/data/valid-messages/lots-of-arguments.message:
769 * test/data/valid-messages/no-padding.message:
770 * test/data/valid-messages/recursive-types.message:
771 Add missing NAME fields
772 Fix up dicts & arrays
774 * test/data/invalid-messages/dict-with-nil-value.message:
775 Removed, this is not invalid anymore.
777 * test/data/valid-messages/recursive-types.message:
778 Add new test for deeply recursive types.
780 2003-04-07 Havoc Pennington <hp@pobox.com>
782 * bus/driver.c (bus_driver_handle_acquire_service): return an
783 error if you try to acquire a service that starts with ':'
785 2003-04-07 Havoc Pennington <hp@redhat.com>
787 * doc/dbus-specification.sgml: require that base service names
788 start with ':' and that the base service is created/deleted
789 as first and last things a connection does on the bus
791 * bus/dispatch.c (check_existent_service_activation): lots more
792 work on the activation test; it doesn't fully pass yet...
794 * test/test-service.c (main): fix so we don't memleak the
795 connection to the message bus
796 (filter_func): accept a message asking us to exit
798 2003-04-06 Havoc Pennington <hp@pobox.com>
800 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
803 * configure.in: fixes to Qt detection from Colin Walters
805 * doc/Makefile.am: Only remove generated docbook dirs if they
806 exist, from Colin Walters
808 * dbus/dbus-bus.c: change how we set well-known connections to
809 NULL, so that it works if a single connection is stored in
810 two well-known array slots.
812 * test/Makefile.am: remove a lot of stuff that isn't immediately
813 useful, it's in CVS history if we want it.
815 * test/test-service.c: use dbus-mainloop instead of that
818 2003-04-06 Havoc Pennington <hp@pobox.com>
820 * dbus/Makefile.am: split lists of sources into stuff that goes in
821 the library, util functions that go in the lib and are also used
822 elsewhere, and util functions that are used in tests/daemon but
825 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
826 here so it can be used in test binaries also
828 2003-04-06 Havoc Pennington <hp@pobox.com>
830 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
831 here in the parent process, so we can return an error if it
832 fails. Also, move some of the code into the child so the parent
833 is less hosed if we fail midway through.
835 * bus/bus.c (bus_context_new): move pidfile detection further up
836 in the function, before we start overwriting sockets and such.
838 * bus/messagebus.in: adjust this a bit, not sure if it will work.
840 * configure.in: add --with-system-pid-file and --with-system-socket
842 2003-04-06 Colin Walters <walters@verbum.org>
844 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
846 * bus/system.conf.in: Declare a pidfile.
848 * bus/bus.c (bus_context_new): Test for an existing pid file, and
849 create one (if appropriate).
851 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
852 (struct BusConfigParser) [pidfile]: New.
853 (element_type_to_name, merge_included, start_busconfig_child)
854 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
855 (bus_config_parser_unref): Free it.
856 (bus_config_parser_get_pidfile): New function.
858 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
860 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
862 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
864 * dbus/dbus-sysdeps.h: Prototype it.
866 2003-04-06 Havoc Pennington <hp@pobox.com>
868 * bus/bus.c (bus_context_new): print the address in here, rather
869 than in main(), because we need to do it before forking the daemon
871 * bus/dispatch.c (send_service_nonexistent_error): set the sender
872 on the service nonexistent error
874 * bus/driver.c (bus_driver_handle_acquire_service): set the
875 sender on the AcquireService reply
877 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
878 server also listen on a UNIX socket so services can connect to it.
880 2003-04-06 Havoc Pennington <hp@pobox.com>
882 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
883 so it detects deadlocks and also we actually init threads when
886 2003-04-06 Havoc Pennington <hp@pobox.com>
888 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
889 save the domain socket name, and unlink it when we disconnect the
890 server. Means that at least when we exit normally, we won't leave
891 a bunch of junk in /tmp
893 * dbus/dbus-transport-unix.c
894 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
895 memory management). (I was making a real change here but then
898 2003-04-06 Havoc Pennington <hp@pobox.com>
900 * bus/bus.c (bus_context_new): fix wrong handling of
901 server_data_slot_unref() in the error case.
903 * dbus/dbus-internals.h (_dbus_assert): change so it passes
904 "(condition) != 0" to _dbus_real_assert so that
905 "_dbus_assert (pointer)" doesn't cause a warning
907 * bus/main.c (main): accept --print-address option to print out
908 the message bus address
910 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
912 * dbus/dbus-transport.c (_dbus_transport_open): special error for
913 "tmpdir" option to unix: address on client side
915 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
918 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
919 we can use to create sockets in the test suite.
921 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
922 cleanly. To be used for testing.
924 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
926 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
928 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
929 handle trying to call this when there's no servers active
931 2003-04-05 Havoc Pennington <hp@pobox.com>
937 2003-04-05 Havoc Pennington <hp@pobox.com>
939 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
940 crash on startup. Need to get "try starting the daemon"
941 in the test suite I guess. ;-)
943 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
944 tracked the number of open connections; it's better done in
945 application-specific code as you want it to span all servers etc.
947 2003-04-05 Havoc Pennington <hp@pobox.com>
949 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
950 patch from Colin Walters
952 2003-04-05 Havoc Pennington <hp@pobox.com>
954 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
955 reality; in fact multiple mechanisms are allowed.
957 * dbus/dbus-internals.c (_dbus_real_assert)
958 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
959 _dbus_assert_not_reached() into functions, so that they don't show
960 up in basic block counts for test coverage, and don't use up as
961 much disk space. Does mean slower execution speed though, so
962 assumes --disable-asserts is the normal production case.
964 2003-04-05 Havoc Pennington <hp@pobox.com>
966 * test/Makefile.am (dist-hook): also dist *.in files
972 2003-04-05 Havoc Pennington <hp@pobox.com>
974 * dbus/dbus-string.c: docs warning
976 * dbus/dbus-spawn.c: missing docs
978 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
980 2003-04-05 Havoc Pennington <hp@pobox.com>
982 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
985 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
986 to -1 once we've reaped the babysitter
987 (_dbus_babysitter_handle_watch): do as much work as we can, not
990 * bus/activation.c: add code using DBusBabysitter so that we
991 handle it when a service fails to start up properly.
992 (bus_activation_service_created): don't remove the activation
993 entries as we go, just let them get removed when we free the pending
994 activation. Unref reply messages after sending them.
996 2003-04-05 Havoc Pennington <hp@pobox.com>
998 * test/decode-gcov.c (main): print per-directory stats in the report
1000 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
1002 2003-04-05 Havoc Pennington <hp@pobox.com>
1004 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
1006 * test/decode-gcov.c: hack up a little program to suck data
1007 out of gcov files. Yes this is sort of silly.
1009 * configure.in: define something in config.h and do an
1010 AM_CONDITIONAL when gcov is enabled
1012 2003-04-04 Havoc Pennington <hp@redhat.com>
1014 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
1015 return a "babysitter" object that is used to monitor the status of
1016 the spawned process and reap it when required.
1018 * test/test-segfault.c, test/test-exit.c,
1019 test/test-sleep-forever.c: binaries that do various lame things,
1020 used in the test suite.
1022 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
1024 2003-04-03 Havoc Pennington <hp@pobox.com>
1026 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
1027 in preparation for modifying it, dbus-sysdeps is getting
1030 2003-04-03 Havoc Pennington <hp@redhat.com>
1032 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1035 * bus/*.[hc]: adapt to mainloop change
1037 2003-04-03 Havoc Pennington <hp@redhat.com>
1039 * bus/activation.c (load_directory): fix up memleaks
1040 (bus_activation_entry_free): free the entry
1042 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1043 we get one from the message bus; fix memleaks.
1045 * dbus/dbus-message.c (dbus_set_error_from_message): new function
1047 2003-04-03 Havoc Pennington <hp@pobox.com>
1049 * bus/config-parser.c (bus_config_parser_unref): free
1050 list of mechanisms, bug discovered by test suite enhancements
1051 (putting system.conf and session.conf into suite)
1053 * test/Makefile.am, test/test-service.c: add placeholder for a
1054 test service that we'll activate as part of test suite. Doesn't
1057 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
1058 setting NULL value, and use system malloc not dbus_malloc()
1059 when we have unavoidable memleakage.
1061 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1062 didn't work, and support DBUS_BUS_ACTIVATION.
1064 * bus/activation.c (child_setup): pass our well-known bus type to
1067 * bus/config-parser.c: support <type> to specify well-known type
1069 * doc/dbus-specification.sgml: document the env variables to
1070 locate well-known buses and find service activator
1072 2003-04-02 Havoc Pennington <hp@redhat.com>
1074 * test/Makefile.am (all-local): add a rule to copy tests to
1075 builddir, so we can have generated tests. Use this to remove the
1076 silly hack for testing system.conf and session.conf. Will use this
1077 shortly to generate .service files pointing to test binaries.
1079 2003-04-02 Havoc Pennington <hp@redhat.com>
1081 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1082 current alloc and needed new length, not max of the doubled
1083 allocation and needed new length. Also, when building tests,
1084 don't do the double-allocation stuff, just realloc every time.
1086 2003-04-02 Havoc Pennington <hp@redhat.com>
1088 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1090 (_dbus_string_get_dirname): new
1091 (_dbus_sysdeps_test): new
1092 (_dbus_directory_open): include dirnames in error messages
1094 * bus/config-parser.c: interpret <include> and <includedir> and
1095 <servicedir> relative to config file location if the given
1096 filename is not absolute.
1098 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1100 2003-04-02 Havoc Pennington <hp@redhat.com>
1102 * bus/connection.c (bus_transaction_send_error_reply): set sender
1103 service for the error, and unref the reply on success
1105 * bus/activation.c: convert to use BusTransaction so OOM can be
1107 (bus_activation_service_created): set sender of the message
1109 2003-04-01 Havoc Pennington <hp@redhat.com>
1111 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1112 <includedir> (at least mostly)
1114 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1115 first, then the user ID
1117 2003-04-01 Havoc Pennington <hp@pobox.com>
1119 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1122 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1124 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1126 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1127 socket 0777, and unlink any existing socket.
1129 * bus/bus.c (bus_context_new): change our UID/GID and fork if
1130 the configuration file so specifies; set up auth mechanism
1133 * bus/config-parser.c (bus_config_parser_content): add support
1134 for <fork> option and fill in code for <auth>
1136 * bus/system.conf.in: add <fork/> to default configuration,
1137 and limit auth mechanisms to EXTERNAL
1139 * doc/config-file.txt (Elements): add <fork>
1141 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1142 (_dbus_change_identity): new function
1144 2003-03-31 Havoc Pennington <hp@redhat.com>
1146 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
1147 (_dbus_listen_unix_socket): fix off-by-one error in null
1148 termination spotted by Nalin
1150 2003-03-31 Havoc Pennington <hp@redhat.com>
1152 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1153 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1154 having a real home directory available.
1156 2003-03-31 Havoc Pennington <hp@redhat.com>
1158 * bus/Makefile.am (install-data-hook): create /var/run/dbus
1160 * bus/messagebus.in: add init script for Red Hat /etc/init.d
1162 * configure.in: add support for specifying a style of init script
1165 2003-03-31 Havoc Pennington <hp@redhat.com>
1167 Fix some annoying DBusString API and fix all affected code.
1169 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1171 (_dbus_string_get_data): change to return string instead of using
1173 (_dbus_string_get_const_data): ditto
1174 (_dbus_string_get_data_len): ditto
1175 (_dbus_string_get_const_data_len): ditto
1177 2003-03-31 Havoc Pennington <hp@redhat.com>
1179 * bus/main.c (main): fix up the command line arguments to be nicer
1181 2003-03-31 Havoc Pennington <hp@redhat.com>
1183 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1184 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
1185 final location that lands in the config file
1187 * bus/config-loader-expat.c (bus_config_load): fix type of
1190 * doc/TODO: remove TODO item for dbus_bus_get()
1192 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1194 2003-03-31 Havoc Pennington <hp@pobox.com>
1196 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1197 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1198 argument since they are always client side
1200 * dbus/dbus-server.c (dbus_server_get_address): new function
1202 * bus/main.c (main): take the configuration file as an argument.
1204 * test/data/valid-config-files/debug-allow-all.conf: new file to
1205 use with dispatch.c tests for example
1207 * bus/test-main.c (main): require test data dir
1209 * bus/bus.c (bus_context_new): change this to take a
1210 configuration file name as argument
1212 * doc/config-file.txt (Elements): add <servicedir>
1214 * bus/system.conf, bus/session.conf: new files
1216 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1217 well-known socket if none set
1219 * configure.in: create system.conf and session.conf
1221 2003-03-30 Havoc Pennington <hp@pobox.com>
1223 * bus/config-parser.c: hacking
1225 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1226 to shut down, since it could cause weirdness with the DBusList
1229 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1230 link-oriented stack routines
1231 (alloc_link): free the mempool if the first alloc from it fails
1233 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1235 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1237 (_dbus_string_skip_white): new
1239 * doc/config-file.txt (Elements): add <includedir>
1241 2003-03-28 Havoc Pennington <hp@pobox.com>
1243 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1244 (_dbus_string_copy_data): new functions
1246 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1248 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1252 * dbus/dbus-memory.c:
1255 2003-03-28 Havoc Pennington <hp@pobox.com>
1257 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1258 I think it may have just been superstition. Not sure.
1260 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1261 failures that were not being handled.
1263 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1265 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1266 row that will fail on out-of-memory.
1268 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1269 function for testing out-of-memory handling.
1271 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1272 allocation functions, they do map exactly to the expat ones.
1274 2003-03-27 Havoc Pennington <hp@redhat.com>
1276 * bus/config-loader-libxml.c (bus_config_load): add another error
1279 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1282 Add note about automatic service activation.
1284 * doc/dbus-specification.sgml:
1285 Rename the specification and clarify a few things.
1287 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1290 * dbus/dbus-address.c:
1292 * dbus/dbus-marshal.c:
1293 * dbus/dbus-server-debug-pipe.c:
1294 * dbus/dbus-transport-unix.c:
1295 Fix documentation warnings.
1297 2003-03-26 Havoc Pennington <hp@pobox.com>
1299 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1300 after every test so it's quick and easy to see which leaked, and
1301 so we test multiple dbus_shutdown() calls
1303 * configure.in: change configure.in XML stuff to also support
1306 * config-loader-libxml.c: some hacking
1308 * config-loader-expat.c: some hacking
1310 * config-parser.c: some hacking, plus tests
1312 2003-03-25 Havoc Pennington <hp@redhat.com>
1314 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1316 * configure.in: add --with-xml option to specify XML library,
1317 right now only libxml is supported.
1319 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1320 nonworking code between home and work, still just stubs
1322 2003-03-24 Havoc Pennington <hp@redhat.com>
1324 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1327 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1328 NULL argument for "message" if the error is a well-known one,
1329 fill in a generic message in this case.
1331 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1334 * bus/test.c (bus_test_flush_bus): add
1336 * bus/policy.c (bus_policy_test): test code stub
1338 2003-03-24 Havoc Pennington <hp@pobox.com>
1340 * bus/connection.c (bus_connections_setup_connection): set up
1341 the "can this user connect" function, but it always returns
1342 TRUE until we have a config file parser so we can have a config
1343 file that allows connections.
1345 2003-03-23 Havoc Pennington <hp@pobox.com>
1347 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1348 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1349 the mutex, so we can check for proper memory management
1352 * dbus/dbus-dataslot.c: remove the mutex from
1353 DBusDataSlotAllocator and lock it manually when using it,
1354 to simplify fitting it into the global slots framework.
1356 * dbus/dbus-threads.c (init_static_locks): rework how we're
1357 handling global locks so they are easily shut down.
1359 * bus/policy.c (bus_policy_append_rule): fix
1361 * bus/test-main.c (main): check for memleaks
1363 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1364 test suite check for memleaks
1366 * dbus/dbus-memory.c: add support in test mode for tracking
1367 number of outstanding blocks
1369 2003-03-23 Havoc Pennington <hp@pobox.com>
1371 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1374 * dbus/dbus-hash.h: add ULONG hash keys
1376 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1377 (_dbus_get_group_id): new function
1379 2003-03-20 Havoc Pennington <hp@redhat.com>
1381 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1383 (dbus_connection_get_unix_user): new function
1385 2003-03-20 Havoc Pennington <hp@pobox.com>
1387 * bus/connection.c (bus_connection_send_oom_error): assert that
1388 message has a sender
1389 (connection_execute_transaction): ditto
1390 (bus_connection_preallocate_oom_error): fix to set the sender, and
1391 set recipient to the destination service, not the bus driver
1393 * bus/policy.c: hacking
1395 * dbus/dbus-message.c (dbus_message_service_is): new function
1396 (dbus_message_sender_is): new
1398 2003-03-19 Havoc Pennington <hp@redhat.com>
1400 * bus/policy.c: start sketching code for policy restrictions on
1401 what connections can do.
1403 2003-03-18 Havoc Pennington <hp@redhat.com>
1405 * doc/TODO: some notes on high-level todo items. Little nitpick
1406 stuff is all in @todo, so no need to add it here.
1408 * doc/config-file.txt: some notes on how config file might look
1410 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1416 2003-03-17 Havoc Pennington <hp@redhat.com>
1418 * dbus/dbus-internals.h: add gcc attributes so that
1419 our printf-style functions warn on bad arguments to
1422 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1425 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1428 2003-03-17 Havoc Pennington <hp@redhat.com>
1430 * bus/test-main.c (main): make it print something as it runs
1431 so make check doesn't look stuck
1433 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1434 from CVS, now obsolete
1436 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1438 * bus/dispatch.c: (bus_dispatch):
1439 Refetch the service name since it may have been reallocated
1440 when dbus_message_set_sender was called.
1442 * dbus/dbus-sysdeps.c: (_dbus_accept):
1443 Add address and address length variables and use them to stop
1444 valgrind from complaining.
1446 2003-03-17 Havoc Pennington <hp@pobox.com>
1448 All tests pass, no memleaks, no valgrind complaints.
1450 * bus/test.c: refcount handler_slot
1452 * bus/connection.c (bus_connections_new): refcount
1453 connection_data_slot
1455 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1456 bytes so that auth scripts pass.
1458 * bus/dispatch.c: init message_handler_slot so it gets allocated
1461 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1463 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1464 dealloc server_pipe_hash when no longer used for benefit of
1467 * dbus/dbus-auth.c (process_command): memleak fix
1469 * bus/dispatch.c (check_hello_message): memleak fix
1471 2003-03-16 Havoc Pennington <hp@pobox.com>
1473 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1475 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1477 * bus/activation.c (bus_activation_activate_service): Append
1478 the pending activation entry to the list of pending activations.
1480 2003-03-16 Havoc Pennington <hp@pobox.com>
1482 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1485 * dbus/dbus-address.c (create_entry): fix OOM handling when
1486 failing to alloc entry->method
1488 2003-03-16 Havoc Pennington <hp@pobox.com>
1490 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1493 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1494 add some missing dbus_set_result
1496 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1497 alloc the DBusMessageHandler
1499 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1500 the transport here, since we call this from the finalizer; it
1501 resulted in a double-finalize.
1503 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1504 where we tried to use transport->connection that was NULL,
1505 happened when transport was disconnected early on due to OOM
1507 * bus/*.c: adapt to handle OOM for watches/timeouts
1509 * dbus/dbus-transport-unix.c: port to handle OOM during
1512 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1513 reference to unused bytes instead of a copy
1515 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1518 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1521 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1524 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1526 * doc/dbus-specification.sgml:
1527 Document reply message for ActivateService.
1529 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1531 * bus/activation.c: (bus_pending_activation_entry_free),
1532 (bus_pending_activation_free), (bus_activation_new),
1533 (bus_activation_unref), (bus_activation_service_created),
1534 (bus_activation_activate_service):
1536 * bus/bus.c: (bus_context_new):
1537 * bus/desktop-file.c: (new_section):
1538 * bus/driver.c: (bus_driver_send_service_deleted),
1539 (bus_driver_handle_activate_service):
1540 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1542 * dbus/dbus-connection.c:
1543 (dbus_connection_send_with_reply_and_block):
1544 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1545 * dbus/dbus-protocol.h:
1546 Make activation work better. Now pending activations will be queued
1547 and the daemon won't try to activate services that are already registered.
1549 2003-03-16 Havoc Pennington <hp@pobox.com>
1551 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1554 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1555 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1557 2003-03-16 Havoc Pennington <hp@pobox.com>
1559 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1560 this. always run the test suite before commit...
1562 * bus/*: adapt to DBusConnection API changes
1564 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1565 requires renaming stuff to avoid dbus_connection_dispatch name
1568 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1571 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1572 separate from _dbus_message_loader_return_buffer()
1574 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1575 this, because it's now always broken to use; the number of
1576 messages in queue vs. the number still buffered by the message
1577 loader is undefined/meaningless. Should use
1578 dbus_connection_get_dispatch_state().
1579 (dbus_connection_dispatch): rename from
1580 dbus_connection_dispatch_message
1582 2003-03-16 Havoc Pennington <hp@pobox.com>
1584 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1587 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1589 * dbus/dbus-connection.c:
1590 (dbus_connection_send_with_reply_and_block):
1591 Decrease connection->n_incoming when removing an entry
1593 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1594 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1595 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1596 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1597 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1598 (dbus_dict_get_byte_array):
1599 Handle NULL arrays and strings. Also add support for byte arrays.
1601 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1602 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1603 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1604 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1605 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1606 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1607 * dbus/dbus-marshal.h:
1608 Add support for marshalling and demarshalling empty arrays and strings.
1610 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1611 (dbus_message_append_string_array),
1612 (dbus_message_iter_get_boolean),
1613 (dbus_message_iter_get_boolean_array),
1614 (dbus_message_iter_get_int32_array),
1615 (dbus_message_iter_get_uint32_array),
1616 (dbus_message_iter_get_double_array),
1617 (dbus_message_iter_get_byte_array),
1618 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1619 (check_message_handling):
1620 Add support for getting empty arrays and dicts.
1622 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1623 Don't do any validation at all for now, that's better than just checking
1626 * test/data/valid-messages/emptiness.message:
1627 New test message with lots of empty arrays.
1629 2003-03-16 Havoc Pennington <hp@pobox.com>
1631 * dbus/dbus-connection.c
1632 (_dbus_connection_queue_received_message_link): new function that
1633 can't fail due to OOM
1635 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1636 new function pops a message together with a list link
1639 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1640 message queuing functions to avoid needing to alloc memory
1642 2003-03-16 Havoc Pennington <hp@pobox.com>
1644 Oops - test code was only testing failure of around 30 of the
1645 mallocs in the test path, but it turns out there are 500+
1646 mallocs. I believe this was due to misguided linking setup such
1647 that there was one copy of dbus_malloc etc. in the daemon and one
1648 in the shared lib, and only daemon mallocs were tested. In any
1649 case, the test case now tests all 500+ mallocs, and doesn't pass
1650 yet, though there are lots of fixes in this patch.
1652 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1653 this so that it doesn't need to allocate memory, since it
1654 has no way of indicating failure due to OOM (and would be
1655 annoying if it did).
1657 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1659 * bus/Makefile.am: rearrange to create two self-contained
1660 libraries, to avoid having libraries with overlapping symbols.
1661 that was resulting in weirdness, e.g. I'm pretty sure there
1662 were two copies of global static variables.
1664 * dbus/dbus-internals.c: move the malloc debug stuff to
1667 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1670 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1672 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1675 * bus/dispatch.c (bus_dispatch_add_connection): free
1676 message_handler_slot when no longer using it, so
1677 memory leak checkers are happy for the test suite.
1679 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1681 * bus/bus.c (new_connection_callback): disconnect in here if
1682 bus_connections_setup_connection fails.
1684 * bus/connection.c (bus_connections_unref): fix to free the
1686 (bus_connections_setup_connection): if this fails, don't
1687 disconnect the connection, just be sure there are no side
1690 * dbus/dbus-string.c (undo_alignment): unbreak this
1692 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1694 (_dbus_auth_new): fix the order in which we free strings
1697 * bus/connection.c (bus_connection_disconnected): fix to
1698 not send ServiceDeleted multiple times in case of memory
1701 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1702 get the base service name
1703 (dbus_bus_register_client): don't return base service name,
1704 instead store it on the DBusConnection and have an accessor
1706 (dbus_bus_register_client): rename dbus_bus_register()
1708 * bus/dispatch.c (check_hello_message): verify that other
1709 connections on the bus also got the correct results, not
1710 just the one sending hello
1712 2003-03-15 Havoc Pennington <hp@pobox.com>
1714 Make it pass the Hello handling test including all OOM codepaths.
1715 Now to do other messages...
1717 * bus/services.c (bus_service_remove_owner): fix crash when
1718 removing owner from an empty list of owners
1719 (bus_registry_ensure): don't leave service in the list of
1720 a connection's owned services if we fail to put the service
1723 * bus/connection.c (bus_connection_preallocate_oom_error): set
1724 error flag on the OOM error.
1726 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1727 handle _dbus_transport_set_connection failure
1729 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1730 to create watches up front and simply enable/disable them as
1732 (unix_connection_set): this can now fail on OOM
1734 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1735 of enabling/disabling a watch or timeout.
1737 * bus/loop.c (bus_loop_iterate): don't touch disabled
1740 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1742 2003-03-15 Havoc Pennington <hp@pobox.com>
1744 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1745 write useful test code, after all that futzing around ;-)
1747 Test does not yet pass because we can't handle OOM in
1748 _dbus_transport_messages_pending (basically,
1749 dbus_connection_preallocate_send() does not prealloc the write
1750 watch). To fix this, I think we need to add new stuff to
1751 set_watch_functions, namely a SetEnabled function so we can alloc
1752 the watch earlier, then enable it later.
1754 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1755 dbus-memory.c to the convenience lib
1757 * bus/test.c: rename some static functions to keep them clearly
1758 distinct from stuff in connection.c. Handle client disconnection.
1760 2003-03-14 Havoc Pennington <hp@pobox.com>
1762 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1763 transport, tests more of the real codepath. Set up clients
1764 with bus_setup_debug_client.
1766 * bus/test.c (bus_setup_debug_client): function to set up debug
1767 "clients" on the main loop
1769 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1772 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1775 * dbus/dbus-server-debug.c: support a debug server based on pipes
1777 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1778 (_dbus_close): new function
1780 * configure.in: check for socketpair
1782 2003-03-14 Havoc Pennington <hp@redhat.com>
1784 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1787 * dbus/dbus-transport-debug.c: rework this a good bit to be
1788 less complicated. hopefully still works.
1790 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1793 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1796 * dbus/dbus-message.c (dbus_message_copy): rename from
1797 dbus_message_new_from_message, fix it up to copy
1798 all the message fields, add test case
1800 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1801 not quite passing yet
1803 2003-03-14 Havoc Pennington <hp@pobox.com>
1805 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1806 until no work remains" in test code. (the large diff here
1807 is just code movement, no actual changes)
1809 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1810 1, no point waiting around for test code.
1811 (_dbus_server_debug_accept_transport): unref the timeout
1812 after adding it (right?)
1814 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1816 2003-03-13 Havoc Pennington <hp@redhat.com>
1818 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1821 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1824 * dbus/dbus-connection.h: Make AddWatchFunction and
1825 AddTimeoutFunction return a bool so they can fail on out-of-memory
1827 * bus/bus.c (bus_context_new): set up timeout handlers
1829 * bus/connection.c (bus_connections_setup_connection): set up
1832 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1835 * bus/bus.c (bus_context_new): adapt to changes
1837 * bus/connection.c: adapt to changes
1839 * test/watch.c: adapt to DBusWatch changes
1841 * bus/dispatch.c (bus_dispatch_test): started adding this but
1844 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1846 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1848 2003-03-13 Havoc Pennington <hp@pobox.com>
1850 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1851 set up a test framework as for the library
1853 2003-03-12 Havoc Pennington <hp@pobox.com>
1855 Throughout: purge global variables, introduce BusActivation,
1856 BusConnections, BusRegistry, etc. objects instead.
1858 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1861 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1862 going to redo this a bit differently I think
1864 2003-03-12 Havoc Pennington <hp@redhat.com>
1866 Mega-patch that gets the message bus daemon initially handling
1867 out-of-memory. Work still needed. Also lots of random
1868 moving stuff to DBusError instead of ResultCode.
1870 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1872 * dbus/dbus-connection.c
1873 (dbus_connection_send_with_reply_and_block): use DBusError
1875 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1878 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1879 code here, as the only failure possible is OOM.
1881 * bus/connection.c (bus_connection_disconnect):
1882 rename bus_connection_disconnected as it's a notification only
1884 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1885 "name" on get_args failure, should be done by get_args;
1886 don't disconnect client for bad args, just return an error.
1887 (bus_driver_handle_service_exists): ditto
1889 * bus/services.c (bus_services_list): NULL-terminate returned array
1891 * bus/driver.c (bus_driver_send_service_lost)
1892 (bus_driver_send_service_acquired): send messages from driver to a
1893 specific client to the client's unique name, not to the broadcast
1896 * dbus/dbus-message.c (decode_header_data): reject messages that
1897 contain no name field
1898 (_dbus_message_get_client_serial): rename to
1899 dbus_message_get_serial and make public
1900 (_dbus_message_set_serial): rename from set_client_serial
1901 (_dbus_message_set_reply_serial): make public
1902 (_dbus_message_get_reply_serial): make public
1904 * bus/connection.c (bus_connection_foreach): allow stopping
1905 iteration by returning FALSE from foreach function.
1907 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1908 (dbus_connection_free_preallocated_send)
1909 (dbus_connection_preallocate_send): new API for sending a message
1910 without possibility of malloc failure.
1911 (dbus_connection_send_message): rename to just
1912 dbus_connection_send (and same for whole function family)
1914 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1916 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1918 * bus/activation.c: handle/return errors
1920 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1922 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1923 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1924 (_dbus_result_from_errno): move to this file
1926 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1928 * dbus/dbus-marshal.c:
1929 (_dbus_marshal_set_string):
1930 Take a length argument so we can marshal the correct string
1933 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1934 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1935 (_dbus_marshal_test):
1936 * dbus/dbus-marshal.h:
1937 Add support for marshalling and demarshalling dicts.
1939 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1940 Add support for TYPE DICT.
1942 * dbus/dbus-message.c: (set_string_field):
1943 Adjust header padding.
1945 (dbus_message_append_args_valist), (dbus_message_append_dict),
1946 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1947 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1948 (check_message_handling), (check_have_valid_message):
1949 * dbus/dbus-message.h:
1950 Add functions for setting and getting dicts.
1952 * dbus/dbus-protocol.h:
1958 * doc/dbus-specification.sgml:
1959 Add information about how dicts are marshalled.
1961 * test/data/invalid-messages/dict-with-nil-value.message:
1962 * test/data/invalid-messages/too-short-dict.message:
1963 * test/data/valid-messages/dict-simple.message:
1964 * test/data/valid-messages/dict.message:
1965 Add sample messages containing dicts.
1967 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1969 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1971 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1974 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1975 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1976 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1977 (dbus_dict_set_double), (dbus_dict_set_string),
1978 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1979 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1980 (dbus_dict_set_string_array), (_dbus_dict_test):
1982 Fix according to comments from Havoc.
1984 2003-03-06 Michael Meeks <michael@server.home>
1986 * configure.in: if we don't have kde-config, disable have_qt.
1988 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1993 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1994 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1995 (dbus_dict_remove), (dbus_dict_get_value_type),
1996 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1997 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1998 (dbus_dict_put_double), (dbus_dict_put_string),
1999 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
2000 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
2001 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
2002 (dbus_dict_get_int32), (dbus_dict_get_uint32),
2003 (dbus_dict_get_double), (dbus_dict_get_string),
2004 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
2005 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
2006 (dbus_dict_get_string_array), (_dbus_dict_test):
2008 Add DBusDict implementation
2010 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
2014 2003-03-04 Havoc Pennington <hp@pobox.com>
2016 * test/data/auth/*: adapt to changes
2018 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
2019 USERID_BASE64 and change USERNAME_BASE64 to put in username not
2022 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
2023 more stuff from being in a context name, to make the protocol
2024 simpler to deal with
2026 * dbus/dbus-errors.c (dbus_error_has_name): new function
2027 (dbus_error_is_set): new function
2029 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
2030 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
2032 * dbus/dbus-connection.c (dbus_connection_flush): also read
2033 messages during a flush operation
2035 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2037 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2039 * configure.in: Check for gethostbyname on Solaris.
2041 * dbus/dbus-transport.c: (_dbus_transport_open):
2042 Remove duplicate "tcp" entry.
2044 * doc/dbus-specification.sgml:
2045 Clarify some things.
2047 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2049 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2050 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2051 (_dbus_keyring_test):
2052 * dbus/dbus-md5.c: (_dbus_md5_compute):
2053 * dbus/dbus-sha.c: (_dbus_sha_compute):
2056 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2058 * README: Add some things.
2060 2003-03-04 Anders Carlsson <andersca@codefactory.se>
2062 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2063 after case DBUS_TYPE_BOOELAN.
2065 2003-03-02 Havoc Pennington <hp@pobox.com>
2067 * test/break-loader.c (randomly_set_extreme_ints): add test that
2068 sets really huge and small integers
2070 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2071 that length of boolean array fits in the string, and that
2072 string has room for boolean value in single-bool case.
2074 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2075 optional value to "ALIGN" command which is what to fill the
2078 * test/data/valid-messages/no-padding.message: add regression
2079 test for the message padding problem
2081 2003-03-02 Havoc Pennington <hp@pobox.com>
2083 * dbus/dbus-message.c (decode_header_data): fix to always init
2084 message_padding, from Benjamin Dauvergne
2086 2003-03-02 Havoc Pennington <hp@pobox.com>
2092 2003-03-01 Joe Shaw <joe@assbarn.com>
2094 * configure.in: Check for "struct cmsgcred" and try to access its
2095 members for BSD-like unices.
2097 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2098 _dbus_read_credentials_unix_socket().
2099 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2100 read() for reading the credential byte off the unix socket. Use
2101 struct cmsgcred on systems that support it.
2103 2003-02-27 Alexander Larsson <alexl@redhat.com>
2107 Make gthreads-2.0 dependency optional. Don't build thread test if
2110 2003-02-27 Havoc Pennington <hp@pobox.com>
2112 * dbus/dbus-connection.c
2113 (dbus_connection_send_message_with_reply_and_block): fix doh!
2114 doh! doh! bug that resulted in never removing a reply from the
2115 queue, no wonder we called get_reply_serial so much ;-)
2117 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2118 and client serial instead of demarshaling them every time
2120 2003-02-27 Havoc Pennington <hp@pobox.com>
2122 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2123 more inlined, using dbus-string-private.h, speeds things up
2126 * dbus/dbus-string.c (_dbus_string_free): apply align offset
2127 when freeing the string
2128 (_dbus_string_steal_data): fix for align offset
2129 (undo_alignment): new function
2131 2003-02-26 Havoc Pennington <hp@redhat.com>
2133 All kinds of audit fixes from Owen, plus initial attempt to
2134 handle unaligned memory returned from malloc.
2136 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
2137 leave room for align_offset and nul byte
2138 (fixup_alignment): function to track an align_offset and
2139 ensure real->str is aligned
2140 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
2141 to allow a nul byte plus align offset
2142 (_dbus_string_lock): fix overflow issue
2143 (_dbus_string_init_const_len): add assertions on sanity of len,
2144 assign allocated to be ALLOCATION_PADDING larger than len
2145 (set_length): fixup the overflow handling
2146 (_dbus_string_get_data_len): fix overflow in assertion
2147 (open_gap): detect overflow in size of gap to be opened
2148 (_dbus_string_lengthen): add overflow check
2149 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2150 (_dbus_string_append): add overflow check
2151 (_dbus_string_append_unichar): overflow
2152 (_dbus_string_delete): fix overflow in assertion
2153 (_dbus_string_copy_len): overflow in assertion
2154 (_dbus_string_replace_len): overflows in assertions
2155 (_dbus_string_find): change to implement in terms of
2156 _dbus_string_find_to
2157 (_dbus_string_find_to): assorted fixage
2158 (_dbus_string_equal_c_str): assert c_str != NULL,
2159 fix logic so the function works
2160 (_dbus_string_ends_with_c_str): fix overflow thingy
2161 (_dbus_string_base64_encode): overflow fix
2162 (_dbus_string_validate_ascii): overflow
2163 (_dbus_string_validate_nul): overflow
2165 2003-02-26 Havoc Pennington <hp@redhat.com>
2167 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2169 2003-02-26 Alexander Larsson <alexl@redhat.com>
2172 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2174 * dbus/dbus-connection.c:
2175 * dbus/dbus-connection.h:
2176 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2177 Add dbus_connection_set_wakeup_main_function and use it when queueing
2178 incoming and outgoing messages.
2181 * dbus/dbus-dataslot.c:
2182 Threadsafe usage of DBusDataSlotAllocator
2184 * dbus/dbus-message.c: (dbus_message_get_args_iter):
2187 * dbus/dbus-server-unix.c:
2190 * glib/dbus-gmain.c:
2191 Implement the new wakeup functions for glib.
2194 * glib/test-thread-client.c:
2195 * glib/test-thread-server.c:
2196 * glib/test-thread.h:
2197 Initial cut at some thread test code. Not really done yet.
2199 2003-02-26 Havoc Pennington <hp@pobox.com>
2201 * dbus/dbus-connection.c
2202 (dbus_connection_send_message_with_reply_and_block): fix crash
2203 where we ref'd the outgoing message instead of the returned reply
2205 * dbus/dbus-transport-unix.c (do_authentication): check read watch
2206 at the end of this function, so if we didn't need to read for
2207 authentication, we reinstall it for receiving messages
2209 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2210 a NULL sender for peer-to-peer case
2212 * dbus/dbus-transport-unix.c (check_read_watch): handle
2213 !authenticated case correctly
2215 * glib/dbus-gmain.c: add support for DBusServer
2217 * dbus/dbus-server.c: add data slot support
2219 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2220 return values and handle errors
2222 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2225 * Doxyfile.in (INPUT): add glib subdir
2227 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2228 setup_with_g_main instead of hookup_with_g_main; write docs
2230 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2232 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2233 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2234 * dbus/dbus-message.c: (dbus_message_append_boolean),
2235 (dbus_message_append_boolean_array),
2236 (dbus_message_get_args_valist), (_dbus_message_test):
2237 * dbus/dbus-message.h:
2238 * doc/dbus-specification.sgml:
2239 Various fixes as pointed out by Havoc.
2241 * test/data/invalid-messages/bad-boolean-array.message:
2242 * test/data/invalid-messages/bad-boolean.message:
2243 Add invalid boolean value test cases.
2245 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2247 * dbus/dbus-internals.c: (_dbus_type_to_string):
2248 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2249 (_dbus_marshal_validate_arg):
2250 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2251 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2252 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2253 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2254 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2255 (dbus_message_iter_get_double),
2256 (dbus_message_iter_get_boolean_array), (message_iter_test):
2257 * dbus/dbus-message.h:
2258 * dbus/dbus-protocol.h:
2259 * doc/dbus-specification.sgml:
2260 * test/data/valid-messages/lots-of-arguments.message:
2261 Add support for boolean and boolean array types.
2263 2003-02-23 Havoc Pennington <hp@pobox.com>
2265 * dbus/dbus-keyring.c: finish most of this implementation and
2268 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2269 these barf if the error isn't cleared to NULL
2271 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2272 (_dbus_create_directory): new function
2274 * dbus/dbus-errors.c (dbus_set_error): fix warning
2276 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2277 (_dbus_string_hex_decode): new function
2278 (test_hex_roundtrip): test code
2280 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2282 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2284 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2285 the save-to-temp/rename trick to atomically write the new file
2286 (_dbus_string_parse_uint): new function
2288 2003-02-22 Havoc Pennington <hp@pobox.com>
2290 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2292 2003-02-22 Havoc Pennington <hp@pobox.com>
2294 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2295 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2297 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2299 * dbus/test/data/sha-1: add US government test suite for SHA-1
2301 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2303 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2304 Make string arrays NULL-terminated.
2306 * dbus/dbus-memory.c: (dbus_free_string_array):
2307 * dbus/dbus-memory.h:
2308 New function for freeing NULL-terminated string arrays.
2310 * dbus/dbus-message-builder.c: (append_quoted_string),
2311 (_dbus_message_data_load):
2312 Add support for array types.
2314 * dbus/dbus-message.c: (check_message_handling):
2315 Add more types as test cases.
2317 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2318 (_dbus_string_parse_double):
2319 Add the start offset to the end offset.
2321 * test/data/valid-messages/lots-of-arguments.message:
2322 New test message with lots of arguments.
2324 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2326 * dbus/dbus-message.c: (dbus_message_append_nil),
2327 (dbus_message_append_int32), (dbus_message_append_uint32),
2328 (dbus_message_append_double), (dbus_message_append_string),
2329 (dbus_message_append_int32_array),
2330 (dbus_message_append_uint32_array),
2331 (dbus_message_append_double_array),
2332 (dbus_message_append_byte_array),
2333 (dbus_message_append_string_array):
2334 Fix all out-of-memory handling in these functions.
2336 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2338 * dbus/dbus-message.c: (dbus_message_append_nil):
2341 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2343 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2344 (dbus_message_append_nil), (dbus_message_append_int32_array),
2345 (dbus_message_append_uint32_array),
2346 (dbus_message_append_double_array),
2347 (dbus_message_append_byte_array),
2348 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2349 (dbus_message_iter_get_int32_array),
2350 (dbus_message_iter_get_uint32_array),
2351 (dbus_message_iter_get_double_array),
2352 (dbus_message_iter_get_byte_array),
2353 (dbus_message_iter_get_string_array):
2355 * dbus/dbus-message.h:
2356 Add functions for appending and getting arrays.
2358 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2360 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2361 element size at least 8 bytes, fixes mempool tests on
2364 2003-02-20 Alexander Larsson <alexl@redhat.com>
2366 * dbus/dbus-transport-unix.c (unix_do_iteration):
2367 Unlock the connection mutex during a blocking select call.
2368 Add todo about how we need a way to wake up the select.
2370 * dbus/dbus-connection-internal.h:
2371 * dbus/dbus-connection.c:
2372 Add _dbus_connection_lock and _dbus_connection_unlock.
2374 2003-02-19 Havoc Pennington <hp@pobox.com>
2376 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2377 Doxyfile.in, not Doxyfile
2379 * dbus/dbus-keyring.c: do some hacking on this
2381 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2383 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2385 (dbus_set_error): remove dbus_error_init, check for message ==
2386 NULL *before* we sprintf into it, and add @todo about including
2387 system headers in this file
2389 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2391 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2393 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2394 get various bits of user information based on either username
2396 (_dbus_homedir_from_username): new function
2398 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2401 Add check for nonposix getpwnam_r
2403 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2404 Align the pool element size to a sizeof (void *) boundary.
2406 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2407 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2408 General Solaris fixes.
2410 * test/data/valid-messages/simplest-manual.message:
2411 Explicitly state that we want little-endian packing.
2413 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2415 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2417 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2418 Added to create a transport connecting using a tcp/ip socket.
2420 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2421 to a tcp socket at given host and port.
2422 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2425 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2427 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2428 Added to create a server listening on a TCP/IP socket.
2430 2003-02-19 Havoc Pennington <hp@pobox.com>
2432 Throughout: mop up all the Doxygen warnings and undocumented
2435 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2436 to search any paths.
2438 * dbus/dbus-threads.c: move global mutex initializers to
2439 dbus-internals.h, multiple prototypes was confusing doxygen
2440 besides being kind of ugly
2442 * Doxyfile (PREDEFINED): have Doxygen define
2443 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2444 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2445 (do not abuse the feature! it's for stuff like the autogenerated
2446 macros in dbus-md5.c, not just for things you don't feel like
2449 2003-02-18 Havoc Pennington <hp@pobox.com>
2451 * dbus/dbus-string.c (_dbus_string_zero): new function
2453 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2454 wrap it in some dbus-friendly API
2456 * dbus/dbus-types.h: add 16-bit types
2458 2003-02-18 Joe Shaw <joe@assbarn.com>
2460 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2461 credentials from our currently running process.
2462 (get_word): Fix a buglet where we were copying the entire length
2463 instead of relative to our position.
2465 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2466 keys on the stack... it's 640k of data.
2468 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2469 read the credentials byte off the socket, even if we don't have
2471 (_dbus_poll): Implement poll() using select() for systems which
2474 * glib/test-dbus-glib.c (main): Print out an error if no
2475 parameters are given.
2477 * test/data/auth/fallback.auth-script: Added. Tests that a client
2478 can fallback to a secondary auth mechanism if the first fails.
2480 2003-02-18 Havoc Pennington <hp@pobox.com>
2484 2003-02-17 Havoc Pennington <hp@pobox.com>
2486 * doc/dbus-specification.sgml: lots of cosmetic
2487 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2488 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2489 s/server/bus/ (except in authentication section). Add a section
2490 "Message Bus Message Routing"
2492 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2498 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2500 * doc/dbus-specification.sgml:
2501 Specification updates.
2503 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2505 * bus/activation.c: (bus_activation_init), (child_setup),
2506 (bus_activation_activate_service):
2508 * bus/main.c: (main):
2509 Set DBUS_ADDRESS environment variable.
2511 * dbus/dbus-errors.c: (dbus_set_error):
2512 Don't use va_copy since that's a C99 feature.
2514 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2515 (_dbus_spawn_async):
2516 * dbus/dbus-sysdeps.h:
2517 Add child_setup_func to _dbus_spawn_async.
2519 * doc/dbus-specification.sgml:
2520 Update specification.
2522 * test/spawn-test.c: (setup_func), (main):
2525 2003-02-17 Alexander Larsson <alexl@redhat.com>
2527 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2530 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2534 * doc/dbus-test-plan.sgml:
2535 Add test plan document.
2540 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2542 * dbus/dbus-message.c: (decode_header_data),
2543 (_dbus_message_loader_return_buffer):
2544 Set the header padding amount when loading a message.
2546 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2548 * bus/dispatch.c: (send_one_message):
2549 Only send broadcast messages to registered connections.
2551 * dbus/dbus-message.c: (dbus_message_name_is):
2552 * dbus/dbus-message.h:
2553 New convenience function.
2555 * dbus/dbus-transport-debug.c: (do_reading):
2556 Only dispatch one message per run.
2559 * test/bus-test.c: (new_connection_callback), (die),
2560 (test_hello_client1_handler), (test_hello_client2_handler),
2561 (test_hello_replies), (main):
2563 * test/bus-test-loop.[ch]:
2566 2003-02-16 Havoc Pennington <hp@pobox.com>
2568 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2569 backward conditional
2571 2003-02-16 Alexander Larsson <alexl@redhat.com>
2573 * dbus/dbus-connection.c:
2574 Implement sent_message_with_reply. (with_reply_and block is still
2576 Made dispatch_message not lose message if OOM.
2578 * dbus/dbus-errors.h:
2579 Add NoReply error (for reply timeouts).
2581 2003-02-16 Alexander Larsson <alexl@redhat.com>
2583 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2584 Actually free keys and values when destroying hashtable.
2586 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2588 * dbus/dbus-auth.c: (client_try_next_mechanism):
2591 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2592 Return TRUE if there's no thread implementation around.
2594 * glib/dbus-gmain.c: (free_source),
2595 (dbus_connection_hookup_with_g_main):
2596 Make sure to remove the GSource when the connection is finalized.
2598 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2600 * bus/dispatch.c: (bus_dispatch_message_handler):
2601 * dbus/dbus-errors.h:
2602 Return an error if someone tries to send a message to a service
2605 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2607 * bus/activation.c: (load_directory), (bus_activation_init),
2608 (bus_activation_activate_service):
2611 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2612 More work on the activation handling.
2614 * dbus/dbus-errors.h:
2615 Add some error messages
2617 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2618 * dbus/dbus-message.h:
2619 New function that creates an error message.
2621 * dbus/dbus-protocol.h:
2622 Add ACTIVATE_SERVER message.
2624 * dbus/dbus-server-unix.c: (unix_handle_watch),
2625 (_dbus_server_new_for_domain_socket):
2626 Call _dbus_fd_set_close_on_exec.
2628 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2629 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2630 (_dbus_fd_set_close_on_exec):
2631 * dbus/dbus-sysdeps.h:
2632 Add _dbus_fd_set_close_on exec function. Also add function that checks
2633 that all open fds are set to close-on-exec and warns otherwise.
2635 * dbus/dbus-transport-unix.c:
2636 (_dbus_transport_new_for_domain_socket):
2637 Call _dbus_fd_set_close_on_exec.
2639 2003-02-16 Havoc Pennington <hp@pobox.com>
2641 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2642 allow people to avoid setting SIGPIPE to SIG_IGN
2643 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2644 we've been asked not to
2646 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2648 * dbus/dbus-list.c: (_dbus_list_append_link),
2649 (_dbus_list_prepend_link):
2650 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2654 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2657 * bus/activation.c: (bus_activation_entry_free),
2658 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2660 * bus/main.c: (main):
2661 Add simple activation support, doesn't work yet though.
2663 2003-02-15 Zack Rusin <zack@kde.org>
2665 * qt/dbus-qthread.cpp: small casting fix
2667 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2669 * dbus/dbus-errors.c: (dbus_set_error):
2670 * dbus/dbus-errors.h:
2671 Add a few errors and make dbus_set_error void.
2673 * dbus/dbus-sysdeps.c:
2674 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2675 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2676 * dbus/dbus-sysdeps.h:
2677 Add _dbus_spawn_async.
2679 * test/spawn-test.c: (main):
2680 Test for _dbus_spawn_async.
2682 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2684 * dbus/dbus-internals.h:
2685 Fix build without tests.
2687 * dbus/dbus-list.c: (alloc_link):
2688 Fix a segfault when a malloc fails.
2690 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2691 (dbus_malloc0), (dbus_realloc):
2692 Add support for malloc debugging.
2694 2003-02-15 Alexander Larsson <alexl@redhat.com>
2696 * dbus/dbus-threads.c:
2697 * dbus/dbus-threads.h:
2698 Add condvars. Remove static mutext from API.
2699 Implement static mutexes by initializing them from threads_init.
2701 * glib/dbus-gthread.c:
2702 * qt/dbus-qthread.cpp:
2703 Update with the thread api changes.
2708 Turn StaticMutex into normal mutex + init function.
2709 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2710 _dbus_list_append_link, _dbus_list_prepend_link
2713 * dbus/dbus-sysdeps.c:
2714 * dbus/dbus-sysdeps.h:
2715 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2716 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2718 * dbus/dbus-protocol.h:
2719 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2721 * dbus/dbus-message.c:
2722 Make ref/unref atomic.
2725 * dbus/dbus-connection-internal.h:
2726 * dbus/dbus-connection.c:
2727 * dbus/dbus-connection.h:
2729 Change _peek to _borrow,_return & _steal_borrowed.
2730 Change disconnect callback to event.
2731 Make dbus_connection_dispatch_messages reentrant.
2733 * dbus/dbus-transport.c:
2734 Don't ref the connection on calls to the transport
2737 * dbus/dbus-message-handler.c:
2740 * glib/dbus-gmain.c:
2741 Don't use peek_message anymore
2744 * test/debug-thread.c:
2745 * test/debug-thread.h:
2746 Simple thread implementation that asserts() on deadlocks in
2747 single-threaded code.
2750 (main) Call debug_threads_init.
2753 Use disconnect message instead of disconnect callback.
2757 Don't call dbus_connection_set_disconnect_function. Instead export
2758 bus_connection_disconnect.
2761 Call bus_connection_disconnect when we get a disconnected message.
2763 2003-02-15 Havoc Pennington <hp@pobox.com>
2765 * dbus/dbus-message.c (dbus_message_new): fool around with the
2768 2003-02-14 Havoc Pennington <hp@pobox.com>
2770 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2772 * dbus/dbus-memory.c: fail if the debug functions indicate we
2775 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2776 (_dbus_decrement_fail_alloc_counter): debug functions to
2777 simulate memory allocation failures
2779 2003-02-14 Havoc Pennington <hp@pobox.com>
2781 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2784 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2786 * bus/driver.c: (bus_driver_handle_hello):
2788 * bus/services.c: (bus_service_lookup):
2789 Reorder message sending so we get a more sane order.
2791 * test/bus-test.c: (message_handler):
2794 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2796 * bus/driver.c: (bus_driver_send_service_deleted),
2797 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2798 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2799 (bus_driver_send_welcome_message),
2800 (bus_driver_handle_list_services),
2801 (bus_driver_handle_acquire_service),
2802 (bus_driver_handle_service_exists):
2803 * dbus/dbus-bus.c: (dbus_bus_register_client),
2804 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2805 * dbus/dbus-errors.c: (dbus_result_to_string):
2806 * dbus/dbus-errors.h:
2807 * dbus/dbus-message.c: (dbus_message_append_args),
2808 (dbus_message_append_args_valist), (dbus_message_get_args),
2809 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2810 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2811 (dbus_message_iter_get_byte_array),
2812 (dbus_message_iter_get_string_array), (message_iter_test),
2813 (check_message_handling), (_dbus_message_test):
2814 * dbus/dbus-message.h:
2815 * test/bus-test.c: (main):
2816 Change fields to arguments in messages, so that they won't be
2817 confused with header fields.
2819 * glib/test-dbus-glib.c: (main):
2820 Remove append_fields from hello message.
2822 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2824 * dbus/dbus-errors.c:
2825 * dbus/dbus-message.c:
2826 * dbus/dbus-string.c:
2827 Documentation fixes.
2829 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2831 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2833 Implement support for timeouts in dbus-glib.
2835 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2837 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2838 * dbus/dbus-message.c: (process_test_subdir):
2839 * test/break-loader.c: (find_breaks_based_on):
2840 Plug some memory leaks.
2842 2003-02-13 Richard Hult <rhult@codefactory.se>
2844 * bus/main.c: Fix build.
2846 * dbus/dbus-errors.h:
2847 * dbus/dbus-errors.c: Fix copyright for Anders.
2849 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2854 * bus/connection.c: (bus_connection_foreach):
2857 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2858 (unescape_string), (new_section), (parse_section_start),
2859 (parse_key_value), (report_error), (bus_desktop_file_load),
2860 (bus_desktop_file_get_string):
2861 * bus/desktop-file.h:
2862 Use DBusError for error reporting.
2864 * bus/dispatch.c: (send_one_message),
2865 (bus_dispatch_message_handler):
2866 * bus/driver.c: (bus_driver_send_service_deleted),
2867 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2868 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2869 (bus_driver_send_welcome_message),
2870 (bus_driver_handle_list_services),
2871 (bus_driver_handle_acquire_service),
2872 (bus_driver_handle_service_exists):
2873 * bus/loop.c: (bus_loop_run):
2875 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2877 * bus/utils.c: (bus_wait_for_memory):
2879 New files with general utility functions.
2881 * dbus/dbus-internals.h:
2882 Remove _DBUS_HANDLE_OOM.
2884 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2886 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2887 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2888 * dbus/dbus-errors.h:
2889 Add DBusError structure.
2891 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2893 * test/data/valid-messages/standard-acquire-service.message:
2894 * test/data/valid-messages/standard-hello.message:
2895 * test/data/valid-messages/standard-list-services.message:
2896 * test/data/valid-messages/standard-service-exists.message:
2897 Add some standard messages.
2899 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2901 * bus/driver.c: (bus_driver_send_welcome_message),
2902 (bus_driver_handle_list_services),
2903 (bus_driver_handle_acquire_service),
2904 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2905 Update for API changes in libdbus.
2907 * dbus/dbus-message.c: (dbus_message_new_reply):
2908 * dbus/dbus-message.h:
2909 Remove the name argument. The spec states that replies shouldn't
2912 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2914 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2915 (report_error), (bus_desktop_file_load), (lookup_section),
2916 (lookup_line), (bus_desktop_file_get_raw),
2917 (bus_desktop_file_get_string):
2918 * bus/desktop-file.h:
2919 Some fixes, and new functions for getting a key value from a section.
2921 2003-02-13 Havoc Pennington <hp@pobox.com>
2923 * test/data/auth/fail-after-n-attempts.auth-script: new test
2925 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2928 2003-02-13 Havoc Pennington <hp@pobox.com>
2930 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2931 dbus_credentials_match were backward
2933 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2934 NO_CREDENTIALS and ROOT_CREDENTIALS
2936 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2937 into here. Never process more commands after we've reached an
2938 end state; store further data as unused bytes.
2940 * test/data/auth/*: add more auth tests
2942 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2943 command to match exact string and EXPECT_UNUSED to match unused
2946 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2948 2003-02-12 Havoc Pennington <hp@pobox.com>
2950 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2951 \r off of popped lines
2953 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2956 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2959 2003-02-12 Havoc Pennington <hp@pobox.com>
2961 * dbus/Makefile.am: remove break-loader from the build, since it
2964 * configure.in: add --enable-gcov to turn on coverage profiling
2965 flags and disable optimization
2967 2003-02-10 Havoc Pennington <hp@pobox.com>
2969 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2970 initial cut at test framework for DBusAuth from laptop.
2971 Doesn't quite work yet but it compiles and I need to get
2972 it off the 266mhz laptop. ;-)
2974 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2975 fix a memleak in error case
2977 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2980 * bus/desktop-file.c:
2981 * bus/desktop-file.h:
2982 Add a desktop file parser.
2984 2003-02-11 Zack Rusin <zack@kde.org>
2986 * qt/message.[h|cpp]: sample implementation
2987 of the KDE wrapper for DBusMessage
2989 2003-02-09 Zack Rusin <zack@kde.org>
2991 * test/bus-test.c: make_it_compile
2992 * doc/dbus-specification.sgml: minimal semantic fix
2994 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3000 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3003 * dbus/dbus-break-loader.c:
3005 * test/break-loader.c:
3006 Move dbus-break-loader to test/ and rename it to break-loader.
3008 2003-02-02 Havoc Pennington <hp@pobox.com>
3010 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
3011 for code to manage cookies in your home directory
3013 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
3015 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
3016 to authenticate, then disconnect the client.
3018 2003-02-03 Alexander Larsson <alexl@redhat.com>
3020 * dbus/dbus-message.c (dbus_message_append_fields):
3023 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3025 * doc/dbus-specification.sgml:
3026 Update address format section.
3028 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3031 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
3032 (message_handler), (new_connection_callback), (loop_quit),
3036 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3038 * bus/driver.c: (bus_driver_handle_service_exists):
3039 Simplify the code a bit.
3041 * dbus/dbus-bus.c: (dbus_bus_service_exists):
3044 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3047 Add libdbus-daemon.la and link to it.
3049 2003-02-01 James Willcox <jwillcox@gnome.org>
3051 * bus/driver.c: (bus_driver_handle_own_service):
3052 Actually include the service reply code in the message.
3054 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3056 * bus/driver.c: (bus_driver_handle_service_exists):
3057 Don't unref the incoming message.
3059 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3061 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3063 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3065 * dbus/dbus-server.c: (dbus_server_listen):
3066 * dbus/dbus-transport.c: (_dbus_transport_open):
3067 ifdef out the calls to the debug transport and server.
3069 2003-02-02 Alexander Larsson <alexl@redhat.com>
3071 * dbus/dbus-watch.c (dbus_watch_get_flags):
3072 Add note in the docs that ERROR or HANGUP won't be returned
3073 and are assumed always on.
3075 * glib/dbus-gmain.c (add_watch):
3076 Always add IO_ERR | IO_HUP
3078 * dbus/dbus-message.h:
3079 Add semicolon after dbus_message_iter_get_string_array().
3080 Makes qt code build again
3082 2003-02-01 Anders Carlsson <andersca@codefactory.se>
3084 * bus/driver.c: (create_unique_client_name),
3085 (bus_driver_handle_hello):
3086 Don't take a name, just use a numeric id to identify
3090 * dbus/dbus-bus.c: (dbus_bus_register_client),
3091 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3093 Add new convenience functions for communicating with the bus.
3095 * dbus/dbus-message.h:
3097 * dbus/dbus-protocol.h:
3100 2003-02-01 Alexander Larsson <alexl@redhat.com>
3102 * dbus/dbus-message.c (dbus_message_append_fields):
3103 Add some more doc comments.
3105 2003-02-01 Havoc Pennington <hp@pobox.com>
3107 * dbus/dbus-break-loader.c (randomly_modify_length): change
3108 a 4-byte value in the message as if it were a length
3110 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3111 execute bit on saved files
3113 2003-02-01 Havoc Pennington <hp@pobox.com>
3115 * dbus/dbus-break-loader.c (main): new program to find messages
3116 that break the loader.
3118 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3119 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3121 * dbus/dbus-string.c (_dbus_string_set_byte): new
3123 2003-01-31 Havoc Pennington <hp@pobox.com>
3125 * dbus/dbus-message.c: refactor the test code to be more general,
3126 in preparation for writing a "randomly permute test cases to
3127 try to break the loader" program.
3129 2003-01-31 Havoc Pennington <hp@pobox.com>
3131 * doc/dbus-specification.sgml: work on the specification
3133 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
3134 the protocol version of the message.
3136 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
3137 no longer specifies that.
3138 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
3141 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3142 "break" for DBUS_TYPE_NIL, remove @todo
3144 2003-01-31 Havoc Pennington <hp@pobox.com>
3146 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
3147 just set_is_error/get_is_error as this is a commonly-used
3148 function, and write docs.
3150 2003-01-31 Anders Carlsson <andersca@codefactory.se>
3152 * dbus/dbus-address.c: (dbus_address_entry_free):
3153 Free key and value lists.
3155 * dbus/dbus-internals.c: (_dbus_type_to_string):
3156 Add the types we didn't have.
3158 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3159 (_dbus_marshal_validate_arg):
3162 * dbus/dbus-message.c: (dbus_message_set_sender):
3163 Remove todo about being able to set sender to NULL.
3165 (dbus_message_set_is_error_reply),
3166 (dbus_message_get_is_error_reply):
3167 * dbus/dbus-message.h:
3170 * dbus/dbus-protocol.h:
3171 Add error reply flag.
3173 * test/data/valid-messages/opposite-endian.message:
3174 Add NIL type to test.
3176 2003-01-31 Havoc Pennington <hp@pobox.com>
3178 * doc/dbus-specification.sgml: fully specify the header. Add
3179 flags and major protocol version, and change header/body len to
3182 * dbus/dbus-message-builder.c (append_saved_length): append length
3185 * dbus/dbus-message.c (dbus_message_create_header): change header
3186 length and body length to unsigned. Add the new fields from the
3188 (_dbus_message_loader_return_buffer): unsigned header/body len
3190 2003-01-30 Havoc Pennington <hp@pobox.com>
3192 * dbus/dbus-auth.c: rework to use only REJECTED, no
3195 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
3196 use REJECTED, suggested by Mark McLoughlin
3198 2003-01-30 Havoc Pennington <hp@pobox.com>
3200 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3201 a better way to report errors here. e.g. "unix address lacks
3202 path" or something. also "no such file" when the path doesn't
3205 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3207 (dbus_parse_address): add @todo about documenting address format,
3208 and allowing , and ; to be escaped
3210 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3213 Add dbus-address.[ch]
3215 * dbus/dbus-address.c: (dbus_address_entry_free),
3216 (dbus_address_entries_free), (create_entry),
3217 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3218 (dbus_parse_address), (_dbus_address_test):
3219 * dbus/dbus-address.h:
3220 New files for dealing with address parsing.
3222 * dbus/dbus-connection.c:
3223 Document timeout functions.
3225 * dbus/dbus-message.c:
3226 Document dbus_message_new_from_message.
3228 * dbus/dbus-server-debug.c:
3231 * dbus/dbus-server.c: (dbus_server_listen):
3232 Parse address and use correct server implementation.
3234 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3235 * dbus/dbus-string.h:
3236 New function with test.
3238 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3242 * dbus/dbus-transport-debug.c:
3245 * dbus/dbus-transport.c: (_dbus_transport_open):
3246 Parse address and use correct transport implementation.
3248 2003-01-30 Havoc Pennington <hp@pobox.com>
3250 * dbus/dbus-message.c: use message->byte_order instead of
3251 DBUS_COMPILER_BYTE_ORDER throughout.
3252 (dbus_message_create_header): pad header to align the
3253 start of the body of the message to 8-byte boundary
3255 * dbus/dbus-marshal.h: make all the demarshalers take const
3256 DBusString arguments.
3258 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3259 validate message args here, so we don't have to do slow validation
3260 later, and so we catch bad messages as they are incoming. Also add
3261 better checks on header_len and body_len. Also fill in
3264 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3265 implemented properly)
3266 (_dbus_string_validate_nul): new function to check all-nul
3268 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3269 get_arg_end_pos and remove all validation
3270 (_dbus_marshal_validate_arg): actually do validation here.
3272 2003-01-29 Havoc Pennington <hp@pobox.com>
3274 * dbus/dbus-message.c (check_message_handling): fix assertion
3275 failure on set_client_serial
3277 2003-01-28 Havoc Pennington <hp@pobox.com>
3279 * dbus/dbus-server-debug.c: Add doc section comments
3281 * dbus/dbus-transport-debug.c: add doc section comments
3283 2003-01-28 Havoc Pennington <hp@redhat.com>
3285 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3286 the reverse order from how I had it
3287 (_dbus_string_base64_encode): reverse encoding order. I was
3288 basically byteswapping everything during encoding.
3290 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3292 * dbus/dbus-connection-internal.h:
3293 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3294 (_dbus_connection_remove_timeout):
3295 Add functions for adding and removing timeouts.
3297 * dbus/dbus-message.c: (dbus_message_new_from_message):
3298 Add new function that takes a message and creates an exact
3299 copy of it, but with the refcount set to 1.
3300 (check_message_handling):
3303 * dbus/dbus-server-protected.h:
3304 * dbus/dbus-server.c: (_dbus_server_init_base),
3305 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3306 (dbus_server_set_timeout_functions):
3307 (_dbus_server_remove_timeout):
3308 New functions so that a server can add and remove timeouts.
3310 (dbus_server_listen):
3311 Add commented out call to dbus_server_debug_new.
3313 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3314 Actually set the handler, doh.
3316 * dbus/dbus-transport.c: (_dbus_transport_open):
3317 Add commented out call to dbus_transport_debug_client_new.
3320 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3322 2003-01-28 Havoc Pennington <hp@pobox.com>
3324 * dbus/dbus-message.c (check_message_handling): function to check
3325 on the loaded message, iterates over it etc.
3327 2003-01-28 Havoc Pennington <hp@pobox.com>
3329 * test/Makefile.am (dist-hook): fix make distdir
3331 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3333 2003-01-27 Havoc Pennington <hp@pobox.com>
3335 * dbus/dbus-mempool.c (time_for_size): replace printf with
3338 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3339 empty lines; fix the SAVE_LENGTH stuff to be
3340 START_LENGTH/END_LENGTH so it actually works; couple other
3343 * test/Makefile.am (dist-hook): add dist-hook for .message files
3345 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3346 can be constant or locked.
3347 (_dbus_string_free): allow freeing a const string as
3350 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3352 * dbus/dbus-test-main.c (main): take an argument which is the
3353 directory containing test data
3355 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3356 argument to this and load all the messages in test/data/
3357 checking that they can be loaded or not loaded as appropriate.
3359 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3361 * bus/dispatch.c: (bus_dispatch_message_handler):
3362 Dispatch messages sent to services.
3364 * bus/driver.c: (bus_driver_send_service_deleted),
3365 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3366 (bus_driver_send_service_acquired):
3367 Add helper functions for sending service related messages.
3369 (bus_driver_send_welcome_message):
3370 Send HELLO_REPLY instead of WELCOME.
3372 (bus_driver_handle_list_services):
3373 Send LIST_SERVICES_REPLY instead of SERVICES.
3375 (bus_driver_handle_own_service),
3376 (bus_driver_handle_service_exists):
3377 New message handlers.
3379 (bus_driver_handle_message):
3380 Invoke new message handlers.
3382 (bus_driver_remove_connection):
3383 Don't remove any services here since that's done automatically
3384 by bus_service_remove_owner now.
3387 New function signatures.
3389 * bus/services.c: (bus_service_add_owner):
3390 Send ServiceAcquired message if we're the only primary owner.
3392 (bus_service_remove_owner):
3393 Send ServiceAcquired/ServiceLost messages.
3395 (bus_service_set_prohibit_replacement),
3396 (bus_service_get_prohibit_replacement):
3397 Functions for setting prohibit replacement.
3399 (bus_service_has_owner):
3400 New function that checks if a connection is in the owner queue of
3404 Add new function signatures.
3406 * dbus/dbus-list.c: (_dbus_list_test):
3407 Add tests for _dbus_list_remove_last and traversing the list backwards.
3410 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3411 go any further, so return NULL then.
3413 * dbus/dbus-protocol.h:
3414 Add new messages, service flags and service replies.
3416 2003-01-26 Havoc Pennington <hp@pobox.com>
3418 * dbus/dbus-message-builder.c: implement, completely untested.
3420 * test/data/*: add data to be used in testing.
3421 ".message" files are our simple loadable text format.
3422 ".message-raw" will be binary dumps of messages.
3424 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3426 2003-01-26 Havoc Pennington <hp@pobox.com>
3428 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3430 * dbus/dbus-errors.c (dbus_result_to_string): add
3433 * dbus/dbus-message-builder.c: new file, will contain code to load
3434 up messages from files. Not implemented yet.
3436 2003-01-26 Havoc Pennington <hp@pobox.com>
3438 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3439 the sender by setting to NULL
3441 2003-01-26 Havoc Pennington <hp@pobox.com>
3443 The unit tests pass, but otherwise untested. If it breaks, the
3444 tests should have been better. ;-)
3446 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3449 * dbus/dbus-message.c: redo everything so we maintain
3450 message->header as the only copy of the various fields.
3451 This avoids the possibility of out-of-memory in some cases,
3452 for example dbus_message_lock() can't run out of memory anymore,
3453 and avoids extra copying. Figured I may as well go ahead and do
3454 this since it was busted for dbus_message_lock to not return
3455 failure on OOM, and dbus_message_write_header was totally
3456 unchecked for OOM. Also fixed some random other bugs.
3458 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3459 that strings are nul-terminated. Also, end_pos can be equal
3460 to string length just not greater than, I think.
3461 (_dbus_marshal_set_int32): new function
3462 (_dbus_marshal_set_uint32): new function
3463 (_dbus_marshal_set_string): new function
3465 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3466 a warning, init timeout_list to NULL
3467 (dbus_connection_send_message): don't use uninitialized variable
3470 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3472 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3474 * bus/driver.c: (bus_driver_handle_hello),
3475 (bus_driver_send_welcome_message):
3478 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3480 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3481 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3482 (dbus_connection_unref):
3483 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3484 * dbus/dbus-message.c: (dbus_message_unref),
3487 (dbus_message_get_fields):
3488 Remove debugging printout.
3490 (_dbus_message_loader_return_buffer):
3491 Don't store the header string.
3493 (_dbus_message_test):
3496 2003-01-26 Richard Hult <rhult@codefactory.se>
3498 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3499 the file descriptor list, since it can change under us.
3501 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3503 * glib/dbus-gmain.c: (dbus_connection_prepare),
3504 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3505 (remove_watch), (dbus_connection_hookup_with_g_main):
3506 Rewrite the glib handling to use its own GSource instead of a
3507 GIOChannel so we can catch messages put in the queue while waiting
3510 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3513 * bus/connection.c: (connection_disconnect_handler),
3514 (connection_watch_callback), (bus_connection_setup):
3515 * bus/dispatch.c: (send_one_message),
3516 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3517 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3519 * bus/driver.c: (bus_driver_send_service_deleted),
3520 (bus_driver_send_service_created), (bus_driver_handle_hello),
3521 (bus_driver_send_welcome_message),
3522 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3523 (bus_driver_handle_message):
3525 Refactor code, put the message dispatching in its own file. Use
3526 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3529 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3531 * dbus/dbus-internals.h:
3532 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3534 * dbus/dbus-message.c: (dbus_message_get_sender):
3535 * dbus/dbus-message.h:
3536 Implement dbus_message_get_sender.
3538 * dbus/dbus-protocol.h:
3539 Add message and service defines.
3541 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3543 * dbus/dbus-connection.c: (dbus_connection_send_message):
3544 * dbus/dbus-message-internal.h:
3545 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3546 (dbus_message_write_header):
3547 Remove _dbus_messag_unlock and don't set the client serial on a
3548 message if one already exists.
3550 2003-01-24 Havoc Pennington <hp@pobox.com>
3552 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3555 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3558 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3560 * dbus/dbus-list.c: (alloc_link), (free_link):
3561 Use a memory pool for the links.
3563 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3565 * bus/connection.c: (bus_connection_foreach):
3567 Add new bus_connection_foreach function.
3569 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3570 Add function that broadcasts a message to all clients.
3572 (bus_driver_send_service_created), (bus_driver_handle_hello),
3573 (bus_driver_send_welcome_message),
3574 (bus_driver_handle_list_services), (bus_driver_message_handler):
3575 Implement functions that take care of listing services, and notifying
3576 clients when new services are created.
3578 * bus/services.c: (bus_services_list):
3580 Add new function that returns an array of strings with the currently
3581 registered services.
3584 * glib/dbus-gmain.c:
3585 Update copyright year.
3587 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3589 * dbus/dbus-connection.c: (dbus_connection_send_message):
3590 Unlock the message in case it was sent earlier.
3592 (dbus_connection_send_message_with_reply_and_block):
3593 Remove the reply message from the list.
3595 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3596 Set array_len and new_pos correctly.
3598 (_dbus_marshal_test):
3599 Remove debug output.
3601 * dbus/dbus-message-internal.h:
3602 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3603 New function that returns the reply serial.
3605 (_dbus_message_unlock):
3606 New function that unlocks a message and resets its header.
3608 (dbus_message_append_string_array),
3609 (dbus_message_get_fields_valist),
3610 (dbus_message_iter_get_field_type),
3611 (dbus_message_iter_get_string_array),
3612 (dbus_message_get_fields),
3613 (dbus_message_append_fields_valist):
3614 Handle string arrays.
3616 (dbus_message_set_sender):
3617 Make this function public since the bus daemon needs it.
3619 (decode_header_data):
3620 Set the reply serial to -1 initially.
3622 * dbus/dbus-message.h:
3623 Add dbus_message_set_sender.
3625 2003-01-24 Havoc Pennington <hp@pobox.com>
3627 * doc/dbus-specification.sgml: add some stuff
3629 2003-01-22 Havoc Pennington <hp@pobox.com>
3631 * doc/dbus-specification.sgml: Start to document the protocol.
3633 2003-01-22 Havoc Pennington <hp@pobox.com>
3635 * dbus/dbus-connection.c
3636 (dbus_connection_send_message_with_reply_and_block): add some @todo
3638 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3640 2003-01-21 Havoc Pennington <hp@pobox.com>
3642 (patch untested because can't compile)
3644 * bus/driver.c (create_unique_client_name): make this function
3645 never recycle client names. Also, caller should initialize
3648 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3650 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3652 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3653 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3654 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3655 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3656 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3657 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3658 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3659 * dbus/dbus-marshal.h:
3660 * dbus/dbus-protocol.h:
3661 Add support for marshalling and demarshalling integer, double
3664 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3669 * bus/connection.c: (connection_disconnect_handler):
3670 Remove the connection from the bus driver's list.
3672 (connection_watch_callback): Dispatch messages.
3674 (free_connection_data): Free connection name.
3676 (bus_connection_setup): Add connection to the bus driver's list.
3677 (bus_connection_remove_owned_service):
3678 (bus_connection_set_name), (bus_connection_get_name):
3679 Add functions for setting and getting the connection's name.
3682 Add function headers.
3684 * bus/driver.c: (create_unique_client_name),
3685 (bus_driver_handle_hello_message),
3686 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3687 (bus_driver_add_connection), (bus_driver_remove_connection):
3690 * bus/services.c: (bus_service_free):
3692 New file that handles communication and registreation with the bus
3695 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3697 * dbus/dbus-connection.c: (dbus_connection_send_message):
3698 Add a new client_serial parameter.
3700 (dbus_connection_send_message_with_reply):
3701 Remove a @todo since we've implemented the blocking function.
3703 (dbus_connection_send_message_with_reply_and_block):
3704 New function that sends a message and waits for a reply and
3705 then returns the reply.
3707 * dbus/dbus-connection.h:
3710 * dbus/dbus-errors.c: (dbus_result_to_string):
3711 * dbus/dbus-errors.h:
3712 Add new DBUS_RESULT.
3714 * dbus/dbus-message-internal.h:
3715 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3716 (_dbus_message_set_sender), (dbus_message_write_header),
3717 (dbus_message_new_reply), (decode_header_data),
3718 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3719 * dbus/dbus-message.h:
3720 Add new functions that set the reply serial and sender.
3721 Also marshal and demarshal them correctly and add test.
3723 * dbus/dbus-protocol.h:
3724 Add new DBUS_MESSAGE_TYPE_SENDER.
3727 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3728 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3729 (dbus_connection_hookup_with_g_main):
3730 * glib/test-dbus-glib.c: (main):
3731 Rewrite to use GIOChannel and remove the GSource crack.
3733 * test/echo-client.c: (main):
3734 * test/watch.c: (check_messages):
3735 Update for changed APIs
3737 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3739 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3741 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3742 Create a DBusTimeoutList.
3743 (dbus_connection_set_timeout_functions): Add new function to
3744 set timeout callbacks
3746 * dbus/dbus-connection.h: Add public DBusTimeout API.
3748 * dbus/dbus-message.c: (dbus_message_get_service):
3749 * dbus/dbus-message.h: New function.
3751 * dbus/dbus-server.c: Fix small doc typo.
3753 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3755 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3757 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3758 of the string, just as long as specified.
3760 2003-01-19 Havoc Pennington <hp@pobox.com>
3762 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3765 * dbus/dbus-server.c (dbus_server_set_max_connections)
3766 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3767 keep track of current number of connections, and add API for
3768 setting a max (but haven't implemented enforcing the max yet)
3770 2003-01-18 Havoc Pennington <hp@pobox.com>
3772 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3773 reading/writing if read_watch != NULL or write_watch != NULL.
3775 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3776 the message loader code to actually load message->header and
3777 message->body into the newly-created message.
3779 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3782 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3783 (dbus_connection_get_max_message_size)
3784 (dbus_connection_set_max_live_messages_size)
3785 (dbus_connection_get_max_live_messages_size): implement some
3786 resource limitation functions
3788 * dbus/dbus-resources.c: new file implementing some of the
3789 resource limits stuff
3791 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3792 missing docs, add @todo to handle OOM etc.
3794 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3797 2003-01-18 Havoc Pennington <hp@pobox.com>
3799 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3800 connection if it hasn't been already.
3802 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3803 replace with DisconnectFunction.
3805 2003-01-18 Havoc Pennington <hp@pobox.com>
3807 Building --disable-verbose-mode --disable-asserts --disable-tests
3808 cuts the library from 112K to 45K or so
3810 * configure.in: check for varargs macro support,
3811 add --enable-verbose-mode, --enable-asserts.
3813 * dbus/dbus-internals.h (_dbus_assert): support
3815 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3817 2003-01-18 Havoc Pennington <hp@pobox.com>
3819 * dbus/dbus-test.c: include config.h so that tests actually run
3821 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3822 so the failure mode when that assumption fails will be plenty
3825 2003-01-18 Havoc Pennington <hp@pobox.com>
3827 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3829 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3832 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3833 since we don't want to use those in make check
3835 2003-01-15 Havoc Pennington <hp@redhat.com>
3841 2003-01-15 Havoc Pennington <hp@redhat.com>
3843 * test/Makefile.am: fix so that test source code ends up in the
3844 distribution on make distcheck
3846 2003-01-15 Havoc Pennington <hp@redhat.com>
3852 2003-01-15 Havoc Pennington <hp@redhat.com>
3854 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3855 fix build when --disable-tests
3857 * Makefile.am (EXTRA_DIST): put HACKING in here
3859 * HACKING: document procedure for making a tarball release.
3861 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3863 * bus/connection.c: (connection_error_handler),
3864 (bus_connection_setup):
3865 * bus/main.c: (main):
3866 Make sure that the DBusConnectionData struct is NULLed
3867 out to prevent a segfault.
3869 * dbus/dbus-errors.c: (dbus_result_to_string):
3870 * dbus/dbus-errors.h:
3871 * dbus/dbus-message.c: (dbus_message_get_fields),
3872 (dbus_message_get_fields_valist), (_dbus_message_test):
3873 * dbus/dbus-message.h:
3874 Make dbus_message_get_fields return a result code so we can
3875 track invalid fields as well as oom.
3877 2003-01-11 Havoc Pennington <hp@pobox.com>
3879 * configure.in: change --enable-test/--enable-ansi action-if-given
3880 to enable_foo=$enableval instead of enable_foo=yes
3882 2003-01-08 Havoc Pennington <hp@pobox.com>
3884 * dbus/dbus-string.c (_dbus_string_align_length): new function
3886 * dbus/dbus-test-main.c: move main() for test app here
3888 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3889 symbol to run tests, because dbus-test isn't in the main
3892 Code review nitpicks.
3894 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3895 for people with narrow emacs ;-). Assert client_serial was filled
3896 in. Assert message->name != NULL.
3897 (dbus_message_append_fields): have "first_field_type" arg separate
3898 from va list, needed for C++ binding that also uses varargs IIRC
3899 and helps with type safety
3900 (dbus_message_new): add @todo about using DBusString to store
3901 service/name internally
3902 (dbus_message_new): don't leak ->service and ->name on OOM later
3904 (dbus_message_unref): free the service name
3905 (dbus_message_get_fields): same change to varargs
3906 i.e. first_field_type
3907 (_dbus_message_loader_return_buffer): assert that the message data
3908 is aligned (if not it's a bug in our code). Put in verbose griping
3909 about why we set corrupted = TRUE.
3910 (decode_header_data): add FIXME that char* is evil. Was going to
3911 add FIXME about evil locale-specific string.h strncmp, but just
3912 switched to wacky string-as-uint32 optimization. Move check for
3913 "no room for field name" above get_const_data_len() to avoid
3914 assertion failure in get_const_data_len if we have trailing 2
3915 bytes or the like. Check for service and name fields being
3916 provided twice. Don't leak service/name on error. Require field
3917 names to be aligned to 4 bytes.
3919 * dbus/dbus-marshal.c: move byte swap stuff to header
3920 (_dbus_pack_int32): uscore-prefix
3921 (_dbus_unpack_int32): uscore-prefix
3922 (_dbus_unpack_uint32): export
3923 (_dbus_demarshal_string): add @todo complaining about use of
3925 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3926 handling allowing corrupt data to go unchecked
3928 2003-01-08 Havoc Pennington <hp@redhat.com>
3930 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3931 to the select() as needed for authentication. (should be using
3932 _dbus_poll() not select, but for another day)
3934 * dbus/dbus.h: include dbus/dbus-protocol.h
3936 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3938 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3941 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3943 * dbus/dbus-internals.c: (_dbus_type_to_string):
3944 New function that returns a string describing a type.
3946 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3947 * dbus/dbus-marshal.h:
3948 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3949 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3950 (dbus_message_iter_get_byte_array):
3951 * dbus/dbus-message.h:
3952 Add new convenience functions for appending and getting message fields.
3953 Also add demarshalling routines for byte arrays.
3955 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3957 * dbus/dbus-connection-internal.h:
3958 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3959 (_dbus_connection_get_next_client_serial),
3960 (dbus_connection_send_message):
3961 * dbus/dbus-internals.h:
3962 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3963 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3964 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3965 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3966 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3967 (_dbus_verbose_bytes), (_dbus_marshal_test):
3968 * dbus/dbus-marshal.h:
3969 * dbus/dbus-message-internal.h:
3970 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3971 (dbus_message_write_header), (_dbus_message_lock),
3972 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3973 (dbus_message_get_name), (dbus_message_append_int32),
3974 (dbus_message_append_uint32), (dbus_message_append_double),
3975 (dbus_message_append_string), (dbus_message_append_byte_array),
3976 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3977 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3978 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3979 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3980 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3981 (decode_header_data), (_dbus_message_loader_return_buffer),
3982 (message_iter_test), (_dbus_message_test):
3983 * dbus/dbus-message.h:
3984 * dbus/dbus-protocol.h:
3985 * dbus/dbus-test.c: (main):
3987 * glib/test-dbus-glib.c: (message_handler), (main):
3988 * test/echo-client.c: (main):
3989 * test/watch.c: (check_messages):
3990 Make messages sendable and receivable for real.
3992 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3994 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3995 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3996 * dbus/dbus-message.c: (dbus_message_append_int32),
3997 (dbus_message_append_uint32), (dbus_message_append_double),
3998 (dbus_message_append_string), (dbus_message_append_byte_array):
3999 Handle OOM restoration.
4001 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4003 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4004 (_dbus_demarshal_string), (_dbus_marshal_test):
4005 * dbus/dbus-marshal.h:
4006 * dbus/dbus-message.c: (dbus_message_get_name),
4007 Document these functions.
4009 (dbus_message_append_int32), (dbus_message_append_uint32),
4010 (dbus_message_append_double), (dbus_message_append_string),
4011 (dbus_message_append_byte_array):
4012 * dbus/dbus-message.h:
4013 Add functions for adding message fields of different types.
4015 * dbus/dbus-protocol.h:
4016 Add the different types.
4018 2003-01-05 Havoc Pennington <hp@pobox.com>
4020 * bus/connection.c: implement routines for handling connections,
4021 first thing is keeping a list of owned services on each connection
4022 and setting up watches etc.
4024 * bus/services.c: implement a mapping from service names to lists
4027 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
4029 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
4030 to use static mutexes for global data
4032 * dbus/dbus-connection.c (dbus_connection_set_data): add new
4033 collection of functions to set/get application-specific data
4034 on the DBusConnection.
4036 2003-01-04 Havoc Pennington <hp@pobox.com>
4038 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4039 (_dbus_poll): new function
4041 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4044 * bus/loop.c: initial code for the daemon main loop
4046 2003-01-04 Havoc Pennington <hp@pobox.com>
4048 * test/watch.c (error_handler): make it safe if the error handler
4049 is called multiple times (if we s/error handler/disconnect
4050 handler/ we should just guarantee it's called only once)
4052 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4053 error handler on disconnect (it's quite possible we should
4054 just change the error handler to a "disconnect handler," I'm
4055 not sure we have any other meaningful errors)
4057 * configure.in: check for getpwnam_r
4059 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4060 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4061 mechanism as in SASL spec, using socket credentials
4063 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4064 (_dbus_send_credentials_unix_socket): new function
4066 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4068 (_dbus_write): only check errno if <0 returned
4069 (_dbus_write_two): ditto
4071 2003-01-02 Anders Carlsson <andersca@codefactory.se>
4073 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4074 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4075 (_dbus_marshal_test):
4076 * dbus/dbus-marshal.h:
4077 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4078 to _dbus_marshal_utf8_string. Also fix some tests.
4080 2002-12-28 Harri Porten <porten@kde.org>
4082 * configure.in: added check for C++ compiler and a very cheesy
4083 check for the Qt integration
4085 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4087 * qt/Makefile.am: added
4089 * qt/.cvsignore: added
4091 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4092 latter, added #ifdef QT_THREAD_SUPPORT guard.
4094 * dbus/Makefile.am: added missing headers for make dist
4096 2002-12-28 Kristian Rietveld <kris@gtk.org>
4098 * dbus/Makefile.am: fixup export-symbols-regex.
4100 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4102 * acinclude.m4: Add this file and put the
4103 PKG_CHECK_MODULE macro in it.
4105 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4107 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4108 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4109 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4110 (_dbus_marshal_test):
4111 Make the demarshalling routines align the pos argument.
4112 Add string marshalling tests and fix the obvious bugs
4115 2002-12-26 Havoc Pennington <hp@pobox.com>
4117 * dbus/dbus-auth.c: fixes fixes fixes
4119 * dbus/dbus-transport-unix.c: wire up support for
4120 encoding/decoding data on the wire
4122 * dbus/dbus-auth.c (_dbus_auth_encode_data)
4123 (_dbus_auth_decode_data): append to target string
4124 instead of nuking it.
4126 2002-12-26 Havoc Pennington <hp@pobox.com>
4128 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4129 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4132 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4133 avoid swap_bytes() overhead (ignoring possible assembly stuff for
4134 now). Main point is because I wanted unpack_uint32 to implement
4136 (_dbus_verbose_bytes): new function
4138 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4140 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4141 mechanism to handle a corrupt message stream
4142 (_dbus_message_loader_new): fix preallocation to only prealloc,
4145 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4146 (_dbus_string_test): enhance tests for copy/move and fix the
4149 * dbus/dbus-transport-unix.c: Hold references in more places to
4150 avoid reentrancy problems
4152 * dbus/dbus-transport.c: ditto
4154 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4155 leak reference count in no-message case
4157 * test/watch.c (do_mainloop): handle adding/removing watches
4158 during iteration over the watches. Also, ref the connection/server
4159 stored on a watch, so we don't try to mangle a destroyed one.
4161 * dbus/dbus-transport-unix.c (do_authentication): perform
4164 * dbus/dbus-auth.c (get_state): add a state
4165 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4166 (_dbus_auth_get_unused_bytes): append the unused bytes
4167 to the passed in string, rather than prepend
4169 * dbus/dbus-transport.c (_dbus_transport_init_base): create
4170 the auth conversation DBusAuth
4172 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4173 (_dbus_transport_new_for_domain_socket): when creating a
4174 transport, pass in whether it's a client-side or server-side
4175 transport so we know which DBusAuth to create
4177 2002-12-03 Havoc Pennington <hp@pobox.com>
4179 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4180 _after_ finalizing the derived members
4181 (unix_connection_set): unref watch if we fail to add it
4183 * dbus/dbus-connection.c (dbus_connection_unref): delete the
4184 transport first, so that the connection owned by the
4185 transport will be valid as the transport finalizes.
4187 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4188 if necessary, and remove watches from the connection.
4190 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4192 2002-12-26 Anders Carlsson <andersca@codefactory.se>
4194 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4195 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4196 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4197 (_dbus_marshal_test):
4198 * dbus/dbus-marshal.h:
4199 Add string marshal functions and have the demarshal functions
4200 return the new position.
4202 2002-12-25 Havoc Pennington <hp@pobox.com>
4204 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
4205 it is a simple protocol that just maps directly to SASL.
4207 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4208 initial implementation, not actually used yet.
4210 * dbus/dbus-string.c (_dbus_string_find): new function
4211 (_dbus_string_equal): new function
4212 (_dbus_string_base64_encode): new function
4213 (_dbus_string_base64_decode): new function
4215 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4218 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4219 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4220 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4221 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4222 * dbus/dbus-marshal.h:
4223 * dbus/dbus-protocol.h:
4224 * dbus/dbus-test.c: (main):
4226 Add un-optimized marshalling/demarshalling routines.
4228 2002-12-25 Harri Porten <porten@kde.org>
4230 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4232 2002-12-24 Zack Rusin <zack@kde.org>
4234 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4235 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4238 2002-12-24 Havoc Pennington <hp@pobox.com>
4240 * glib/dbus-gthread.c: fix include
4242 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4243 I think glib API needs to change, though, as you don't
4244 want to use DBusMessageFunction, you want to use the
4245 DBusMessageHandler object. Probably
4246 dbus_connection_open_with_g_main_loop()
4247 and dbus_connection_setup_g_main_loop() or something like that
4248 (but think of better names...) that just create a connection
4249 that has watch/timeout functions etc. already set up.
4251 * dbus/dbus-connection.c
4252 (dbus_connection_send_message_with_reply): new function just to
4253 show how the message handler helps us deal with replies.
4255 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4257 * dbus/dbus-string.c (_dbus_string_test): free a string that
4260 * dbus/dbus-hash.c: use memory pools for the hash entries
4261 (rebuild_table): be more paranoid about overflow, and
4262 shrink table when we can
4263 (_dbus_hash_test): reduce number of sprintfs and write
4264 valid C89. Add tests for case where we grow and then
4265 shrink the hash table.
4267 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4269 * dbus/dbus-connection.c (dbus_connection_register_handler)
4270 (dbus_connection_unregister_handler): new functions
4272 * dbus/dbus-message.c (dbus_message_get_name): new
4274 * dbus/dbus-list.c: fix docs typo
4276 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4277 an object representing a handler for messages.
4279 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4282 * glib/dbus-gthread.c: (dbus_gthread_init):
4283 Don't use the gdbus prefix for public functions.
4285 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4289 Add GLib checks and fixup .pc files
4293 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4294 (gdbus_connection_check), (gdbus_connection_dispatch),
4295 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4296 (dbus_connection_gsource_new):
4297 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4298 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4299 * glib/test-dbus-glib.c: (message_handler), (main):
4302 2002-12-15 Harri Porten <porten@kde.org>
4304 * autogen.sh: check for libtoolize before attempting to use it
4306 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4309 * .cvsignore: ignore more stamp files
4311 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4313 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4314 without make install.
4316 2002-12-15 Havoc Pennington <hp@pobox.com>
4318 * dbus/dbus-threads.c: add thread stubs that a higher library
4319 layer can fill in. e.g. the GLib wrapper might fill them in with
4320 GThread stuff. We still need to use this thread API to
4321 thread-safe-ize the library.
4323 2002-12-12 Havoc Pennington <hp@pobox.com>
4325 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4326 below new interfaces and include fewer system headers.
4328 * dbus/dbus-sysdeps.c (_dbus_read): new function
4329 (_dbus_write): new function
4330 (_dbus_write_two): new function
4331 (_dbus_connect_unix_socket): new function
4332 (_dbus_listen_unix_socket): new function
4334 * dbus/dbus-message-internal.h: change interfaces to use
4337 2002-12-11 Havoc Pennington <hp@pobox.com>
4339 * dbus/dbus-types.h: add dbus_unichar
4341 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4343 * dbus/dbus-connection.c (dbus_connection_send_message): return
4346 * dbus/dbus-transport.c: include dbus-watch.h
4348 * dbus/dbus-connection.c: include dbus-message-internal.h
4350 * HACKING: add file with coding guidelines stuff.
4352 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4353 handling here, for security purposes (as in vsftpd). Not actually
4354 using this class yet.
4356 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4357 system/libc usage here, as in vsftpd, for ease of auditing (and
4358 should also simplify portability). Haven't actually moved all the
4359 system/libc usage into here yet.
4361 2002-11-25 Havoc Pennington <hp@pobox.com>
4363 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4364 always print the first verbose message.
4366 2002-11-24 Havoc Pennington <hp@pobox.com>
4368 * test/echo-client.c, test/echo-server.c: cheesy test
4371 * configure.in (AC_CHECK_FUNCS): check for writev
4373 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4376 * dbus/dbus-list.c (_dbus_list_foreach): new function
4378 * dbus/dbus-internals.c (_dbus_verbose): new function
4380 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4381 representing a server that listens for connections.
4383 * dbus/.cvsignore: create
4385 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4386 public API for reporting errors
4388 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4389 public object representing a connection that
4390 sends/receives messages. (Same object used for
4391 both client and server.)
4393 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4394 Basic abstraction for different kinds of stream
4395 that we might read/write messages from.
4397 2002-11-23 Havoc Pennington <hp@pobox.com>
4399 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4402 * dbus/dbus-test.c (main): add list test, and include
4403 dbus-test.h as intended
4405 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4406 (_dbus_hash_table_remove_int): return value indicates
4407 whether the entry existed to remove
4409 * dbus/dbus-list.c: add linked list utility class,
4412 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4415 2002-11-23 Havoc Pennington <hp@pobox.com>
4417 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4418 DBUS_END_DECLS to nothing, that should fix this once and for all
4420 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4422 * dbus/dbus-message.c, dbus/dbus-hash.c:
4423 add some missing @brief
4425 2002-11-23 Havoc Pennington <hp@pobox.com>
4427 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4428 to avoid confusing Doxygen
4430 * dbus/dbus-hash.c: @} not }@
4432 * dbus/dbus-message.c (struct DBusMessage): split out
4435 2002-11-23 Havoc Pennington <hp@pobox.com>
4437 * configure.in: pile on more warning flags if using gcc
4439 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4440 to document static functions
4442 * configure.in: add summary to end of configure so it
4443 looks nice and attractive
4445 * dbus/dbus-hash.c: finish implementation and write unit
4448 * configure.in: add --enable-tests to enable unit tests
4450 * dbus/dbus-test.c: test program to run unit tests
4451 for all files in dbus/*, initially runs a test for
4454 * dbus/dbus-internals.h: file to hold some internal utility stuff
4456 2002-11-22 Havoc Pennington <hp@redhat.com>
4458 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4459 "ported" away from Tcl
4461 * dbus/dbus-types.h: header for types such as dbus_bool_t
4463 2002-11-22 Havoc Pennington <hp@redhat.com>
4465 * dbus/dbus.h: fixups for doc warnings
4467 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4469 (QUIET): make it quiet so we can see warnings
4471 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4473 2002-11-22 Havoc Pennington <hp@redhat.com>
4475 * Makefile.am: include "Doxyfile" target in all-local
4477 * configure.in: generate the Doxyfile
4479 * Doxyfile.in: move Doxyfile here, so we can use
4480 configure to generate a Doxyfile with the right
4483 2002-11-22 Havoc Pennington <hp@redhat.com>
4485 * dbus/dbus-message.c: move inline docs into .c file
4487 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4488 so all docs are under doc/
4489 (MAN_EXTENSION): generate man pages. Use extension
4490 ".3dbus" which matches ".3qt" on my system,
4491 I guess this is OK, I don't know really.
4492 (FILE_PATTERNS): look for .c files not .h, makes sense
4495 2002-11-22 Havoc Pennington <hp@pobox.com>
4497 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4498 because any app can be a server, and any app can be a client,
4499 the bus is a special kind of server.
4501 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4503 * Doxyfile : adding. Still needs Makefile rules to be generated
4504 automatically (just run "doxygen" in the toplevel dir for now to
4507 * dbus/dbus-message.h : Adding sample docs (javadoc since
4508 resembles gtk-doc a little more)
4510 * dbus/dbus.h : Adding sample docs
4512 2002-11-21 Havoc Pennington <hp@redhat.com>
4514 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4515 so we can allow ourselves to include files directly,
4516 instead of having to use dbus.h
4518 * dbus/dbus.h: fill in
4520 * dbus/dbus-message.h: sketch out a sample header file.
4521 Include griping if you include it directly instead of
4524 * dbus/dbus-macros.h: new file with macros for extern "C",
4525 TRUE/FALSE, NULL, etc.
4527 * doc/file-boilerplate.c: put include guards in here
4529 2002-11-21 Havoc Pennington <hp@redhat.com>
4531 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4533 * COPYING: include the GPL as well, and license code
4534 under both AFL and GPL.
4536 2002-11-21 Havoc Pennington <hp@redhat.com>
4538 * acconfig.h: get rid of this
4540 * autogen.sh (run_configure): add --no-configure option
4542 * configure.in: remove AC_ARG_PROGRAM to make
4543 autoconf complain less. add AC_PREREQ.
4544 add AC_DEFINE third arg.
4546 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4549 Fix references so we can distcheck.
4551 2002-11-21 Havoc Pennington <hp@redhat.com>
4553 * Initial module creation