1 2003-04-30 Havoc Pennington <hp@redhat.com>
3 * Makefile.am: add a check-local that complains if you didn't
4 configure with --enable-tests
6 2003-04-29 Havoc Pennington <hp@redhat.com>
8 * glib/dbus-gmain.c: docs cleanups
10 * dbus/dbus-types.h: add docs on int64 types
12 * dbus/dbus-memory.c: fix docs to avoid putting private API in
13 public API docs section
15 2003-04-29 Havoc Pennington <hp@redhat.com>
17 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
18 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
19 parallel install API version, not with the D-BUS package version.
21 * HACKING: move some of README over here
23 * README: updates, and document API/ABI policy
25 * configure.in: reindentation
27 2003-04-29 Havoc Pennington <hp@redhat.com>
29 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
30 to use this library" to be sure people have the right
33 2003-04-28 Havoc Pennington <hp@redhat.com>
35 * configure.in: add --enable-docs which by default is auto yes if
36 doxygen and db2html found, no otherwise; but can be forced on/off
38 * doc/Makefile.am: conditionalize whether to build docs on
41 2003-04-28 Havoc Pennington <hp@redhat.com>
47 * bus/system.conf.in: add <includedir>system.d</includedir>
49 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
50 username was provided but not uid
52 * bus/config-parser.c (struct BusConfigParser): keep track of
53 whether the parser is toplevel or was included; change some
54 of the error handling if it's included.
56 2003-04-27 Havoc Pennington <hp@pobox.com>
60 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
61 report correct status if we finish processing authentication
64 * bus/activation.c (try_send_activation_failure): use
65 bus_transaction_send_error_reply
67 * bus/connection.c (bus_connection_get_groups): return an error
68 explaining the problem
70 * bus/bus.c (bus_context_check_security_policy): implement
71 restriction here that inactive connections can only send the
72 hello message. Also, allow bus driver to send anything to
75 * bus/connection.c (bus_connection_complete): create the
76 BusClientPolicy here instead of on-demand.
77 (bus_connection_get_policy): don't return an error
79 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
80 sender field in message being replied to
82 * bus/bus.c (bus_context_check_security_policy): fix silly typo
83 causing it to return FALSE always
85 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
86 we checked sender rather than destination
88 2003-04-25 Havoc Pennington <hp@redhat.com>
90 test suite is slightly hosed at the moment, will fix soon
92 * bus/connection.c (bus_connections_expire_incomplete): fix to
93 properly disable the timeout when required
94 (bus_connection_set_name): check whether we can remove incomplete
95 connections timeout after we complete each connection.
97 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
98 probably still broken.
100 * bus/services.c (bus_registry_acquire_service): implement max
101 number of services owned, and honor allow/deny rules on which
102 services a connection can own.
104 * bus/connection.c (bus_connection_get_policy): report errors here
106 * bus/activation.c: implement limit on number of pending
109 2003-04-25 Havoc Pennington <hp@redhat.com>
111 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
112 where we used >= 0 instead of != DBUS_UID_UNSET.
114 2003-04-25 Havoc Pennington <hp@redhat.com>
116 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
117 were toggled without add/remove, fix from Anders Gustafsson
119 2003-04-24 Havoc Pennington <hp@redhat.com>
121 * test/data/valid-config-files/basic.conf: add <limit> tags to
124 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
125 <limit> tag in configuration file.
127 2003-04-24 Havoc Pennington <hp@redhat.com>
129 * bus/dispatch.c: somehow missed some name_is
131 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
132 (_dbus_timeout_set_interval): new
134 * bus/connection.c (bus_connections_setup_connection): record time
135 when each connection is first set up, and expire them after the
138 2003-04-24 Havoc Pennington <hp@redhat.com>
140 * dbus/dbus-message.c (dbus_message_name_is): rename
141 (dbus_message_service_is): rename
142 (dbus_message_sender_is): rename
143 (dbus_message_get_service): rename
145 2003-04-24 Havoc Pennington <hp@redhat.com>
147 * configure.in: add --enable-checks
149 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
151 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
153 (_dbus_connection_handler_destroyed_locked): move some private
154 functions into proper docs group
156 * dbus/dbus-internals.h: add _dbus_return_if_fail,
157 _dbus_return_val_if_fail
159 Throughout: use dbus_return_if_fail
161 2003-04-23 James Willcox <jwillcox@gnome.org>
164 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
165 (dbus_connection_setup_with_g_main),
166 (dbus_server_setup_with_g_main):
167 * glib/test-dbus-glib.c: (main):
168 * glib/test-thread-client.c: (main):
169 * glib/test-thread-server.c: (new_connection_callback), (main):
170 * tools/dbus-monitor.c: (main):
172 Added a GMainContext argument to dbus_connection_setup_with_g_main()
173 and dbus_server_setup_with_g_main().
175 2003-04-20 Havoc Pennington <hp@pobox.com>
177 * doc/dbus-specification.sgml: document the restrictions on
178 message and service names
180 2003-04-22 Havoc Pennington <hp@redhat.com>
182 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
183 support, and do some code cleanups to share more code and
184 speed up array marshal/demarshal.
186 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
188 * configure.in: generate dbus-arch-deps.h
190 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
193 2003-04-22 Havoc Pennington <hp@redhat.com>
195 * test/data/valid-messages/opposite-endian.message: fix test
196 to use proper type for rply field
198 * test/data/invalid-messages: add tests for below validation
200 * dbus/dbus-message.c (decode_header_data): validate field types,
201 and validate that named fields are valid names
202 (decode_name_field): consider messages in the
203 org.freedesktop.Local. namespace to be invalid.
205 * dbus/dbus-string.c (_dbus_string_validate_name): new
207 2003-04-19 Havoc Pennington <hp@pobox.com>
209 * bus/driver.c (bus_driver_handle_hello): check limits and
210 return an error if they are exceeded.
212 * bus/connection.c: maintain separate lists of active and inactive
213 connections, and a count of each. Maintain count of completed
214 connections per user. Implement code to check connection limits.
216 * dbus/dbus-list.c (_dbus_list_unlink): export
218 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
219 number of bytes in the message queue for a connection
221 2003-04-18 Havoc Pennington <hp@pobox.com>
223 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
225 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
228 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
229 on realloc be sure to update the pointer in the keyring
231 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
232 offset to avoid writing to unallocated memory
234 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
235 try the next mechanism, so we properly handle OOM
237 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
239 (_dbus_keyring_new): fix OOM bug
240 (_dbus_keyring_new_homedir): always set error; impose a maximum
241 number of keys we'll load from the file, mostly to speed up the
242 test suite and make its OOM checks more useful, but also for
245 * dbus/dbus-auth.c (process_error_server): reject authentication
246 if we get an error from the client
247 (process_cancel): on cancel, send REJECTED, per the spec
248 (process_error_client): send CANCEL if we get an error from the
251 2003-04-18 Havoc Pennington <hp@pobox.com>
253 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
256 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
259 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
260 about DBUS_TEST_HOMEDIR once
262 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
265 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
266 config file so we test the right thing
268 Throughout: assorted docs improvements
270 2003-04-18 Havoc Pennington <hp@pobox.com>
272 * glib/dbus-gmain.c: adapt to watch changes
274 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
276 * dbus/dbus-server.h: remove dbus_server_handle_watch
278 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
280 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
281 like DBusTimeout, so we don't need dbus_connection_handle_watch
284 2003-04-17 Havoc Pennington <hp@redhat.com>
286 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
287 database usage so it all goes via the DBusUserDatabase cache.
289 2003-04-17 Havoc Pennington <hp@redhat.com>
291 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
292 there was an OOM watch we skipped, we always return TRUE so we
293 iterate again to have a look at it again. Fixes test suite hang.
294 Code rearrangement also lets us lose some memset and only iterate
297 * bus/driver.c (bus_driver_handle_message): sense of test for
300 2003-04-16 Havoc Pennington <hp@pobox.com>
302 * doc/dbus-specification.sgml: make spec say serials are unsigned
304 * dbus/dbus-message.h: change message serials to unsigned
306 * dbus/dbus-connection.c: adapt to message serials being unsigned
308 2003-04-15 Havoc Pennington <hp@pobox.com>
310 * bus/bus.c: create and keep around a shared DBusUserDatabase
313 * bus/connection.c (bus_connection_get_groups): don't cache
314 groups for user in the connection object, since user database
315 object now does that.
317 2003-04-16 Havoc Pennington <hp@redhat.com>
319 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
320 list of size counters
321 (_dbus_message_loader_putback_message_link): put back a popped link
323 * dbus/dbus-connection.c
324 (dbus_connection_set_max_live_messages_size): rename
326 (dbus_connection_get_outgoing_size): get size of outgoing
328 (_dbus_connection_set_connection_counter): remove this cruft
330 2003-04-14 Havoc Pennington <hp@redhat.com>
332 * dbus/dbus-userdb.c: user database abstraction, mostly to get
333 caching, but at some point we might want to be able to use a
336 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
337 SHA1 conf file to test the sha1 auth mechanism, since the regular
338 test always uses EXTERNAL when available.
341 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
342 add conf file that requires use of sha1 auth
344 2003-04-13 Havoc Pennington <hp@pobox.com>
346 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
347 from Philip Blundell to send messages and monitor them.
349 2003-04-13 Havoc Pennington <hp@pobox.com>
351 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
354 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
357 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
358 fix to only recover unused bytes if we're already authenticated
359 (_dbus_transport_get_is_authenticated): fix to still mark us
360 authenticated if there are unused bytes.
362 * bus/dispatch.c: implement security policy checking
364 * bus/connection.c (bus_transaction_send_from_driver): new
366 * bus/bus.c (bus_context_check_security_policy): new
368 * bus/dispatch.c (send_service_nonexistent_error): delete this,
369 now we just set the DBusError and it gets converted to an error
372 * bus/connection.c (allow_user_function): enable code using actual
373 data from the config file
375 * bus/policy.c (list_allows_user): handle wildcard rules for
376 user/group connection perms
378 2003-04-13 Havoc Pennington <hp@pobox.com>
380 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
382 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
384 * bus/policy.c (bus_policy_append_mandatory_rule)
385 (bus_policy_append_default_rule, bus_policy_append_user_rule)
386 (bus_policy_append_group_rule): new functions
388 2003-04-12 Havoc Pennington <hp@pobox.com>
390 * bus/config-parser.c (bus_config_parser_new): fix a memleak
392 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
393 the pid/gid/uid, just for paranoia.
395 * test/break-loader.c (randomly_do_n_things): find a byte
396 containing a type code, and randomly change it to a different
399 2003-04-12 Havoc Pennington <hp@pobox.com>
401 * bus/policy.h: change BusPolicy to be the thing from the config
402 file, and rename old BusPolicy to BusClientPolicy
404 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
405 match change in how policy works
407 * dbus/dbus-internals.h: mark assert_not_reached as
408 __attribute((noreturn))__
410 2003-04-11 Havoc Pennington <hp@redhat.com>
412 * doc/dbus-specification.sgml: fix a spot with the wrong name for
413 the broadcast service. Use boolean return for ServiceExists.
415 2003-04-11 Havoc Pennington <hp@redhat.com>
417 * configure.in: add another directory to look for qt in.
419 2003-04-11 Havoc Pennington <hp@redhat.com>
421 * AUTHORS: add Colin Walters
423 2003-04-11 Havoc Pennington <hp@redhat.com>
429 2003-04-11 Havoc Pennington <hp@redhat.com>
431 * bus/messagebus.in: remove pid file when stopping the
432 message bus, since the bus won't have privileges to remove it
435 2003-04-11 Havoc Pennington <hp@redhat.com>
437 * bus/bus.c (bus_context_new): move credentials change after
440 2003-04-11 Havoc Pennington <hp@pobox.com>
442 * test/decode-gcov.c: add "below average functions" to the
443 coverage report, and change how some of the code works.
445 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
446 not in the coverage stats.
448 * test/test-service.c (main): use _dbus_verbose not fprintf in a
449 couple places so running the test suite doesn't result in megaspam.
451 2003-04-11 Havoc Pennington <hp@pobox.com>
453 * bus/dispatch.c (check_existent_service_activation): accept a no
454 memory error in a place we didn't before
456 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
457 in case the first one failed," since the test suite is less
460 2003-04-10 Havoc Pennington <hp@pobox.com>
462 * bus/dispatch.c (check_segfault_service_activation): add test
463 for launching an executable that just crashes.
465 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
466 don't leave a million cores. We'll see how portable this is.
468 2003-04-10 Havoc Pennington <hp@pobox.com>
470 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
471 the possible parent failures before we fork, so that we don't
472 fail to create a babysitter after creating the child.
474 * bus/activation.c (bus_activation_activate_service): kill child
475 if we don't successfully complete the activation.
477 2003-04-10 Havoc Pennington <hp@redhat.com>
479 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
480 the connection if it's disconnected
482 * bus/activation.c (bus_activation_service_created): use new
483 transaction features to roll back removal of pending activation if
484 we don't successfully create the service after all. Don't remove
485 pending activation if the function fails.
487 * dbus/dbus-list.c (_dbus_list_insert_before_link)
488 (_dbus_list_insert_after_link): new code to facilitate
491 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
492 new functionality, so we can preallocate the ability to insert
495 * bus/connection.c (bus_transaction_add_cancel_hook): new function
496 allowing us to put custom hooks in a transaction to be used for
497 cancelling said transaction
499 * doc/dbus-specification.sgml: add some discussion of secondary
500 service owners, and disallow zero-length service names
502 * bus/services.c (bus_registry_acquire_service): new function,
503 splits out part of bus_driver_handle_acquire_service() and fixes
504 a bug where we didn't remove the service doing the acquiring
505 from the secondary queue if we failed to remove the current owner
506 from the front of the queue.
508 2003-04-10 Alexander Larsson <alexl@redhat.com>
510 * doc/dbus-specification.sgml:
511 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
513 2003-04-10 Alexander Larsson <alexl@redhat.com>
518 Added files to cvsignore
520 * dbus/dbus-message.h:
521 * dbus/dbus-message.c: (dbus_message_iter_get_named):
522 Make get_named() take two out argument and return a boolean.
523 (dbus_message_iter_get_args_valist):
524 Update usage of get_named().
525 (dbus_message_iter_append_byte):
527 (dbus_message_iter_append_named)
529 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
532 2003-04-10 Alexander Larsson <alexl@redhat.com>
534 * dbus/dbus-marshal.[ch]:
535 Add array_type_pos argument to _dbus_marshal_validate_arg.
536 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
538 * dbus/dbus-message.[ch]:
539 Multi-dimensional arrays have full type specification in the
540 outermost array. Iter code re-arranged to handle this.
541 Added some more iter tests.
543 * doc/dbus-specification.sgml:
546 Update new array encoding description.
547 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
549 * test/data/invalid-messages/array-with-mixed-types.message:
550 * test/data/valid-messages/array-of-array-of-uint32.message:
551 Change to the new array format.
553 * test/data/invalid-messages/too-short-dict.message:
556 * test/data/valid-messages/recursive-types.message:
557 Fix up and extend test.
559 2003-04-10 Havoc Pennington <hp@pobox.com>
561 * bus/dispatch.c: lots of fixes
563 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
564 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
565 that was crack, broke the test service.
567 * dbus/dbus-transport.c (_dbus_transport_open): fix error
568 handling to avoid piling up errors if we get a failure on the
571 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
572 pid in assertion failures.
574 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
575 to some fixed size of file descriptor array. Don't return TRUE
576 anytime a timeout exists, that led to lots of busy loop silliness
579 2003-04-09 Havoc Pennington <hp@redhat.com>
581 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
582 I'd checked this in earlier but hadn't.
584 2003-04-09 Havoc Pennington <hp@redhat.com>
586 * bus/dispatch.c (bus_dispatch_test): get a bit further through
587 the activation test (man this is getting old!)
589 2003-04-09 Havoc Pennington <hp@redhat.com>
591 * test/test-utils.c: use dispatch status function to fix this up
593 * bus/connection.c (connection_watch_callback): don't dispatch
595 (connection_timeout_callback): don't dispatch from here
596 (bus_connections_setup_connection): set the dispatch status function
597 (bus_connection_disconnected): unset it
599 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
600 used to add a connection to be dispatched
601 (_dbus_loop_iterate): do the dispatching at the end of each
604 * dbus/dbus-connection.c
605 (dbus_connection_set_dispatch_status_function): new function
606 allowing us to fix up main loop usage
607 (_dbus_connection_last_unref): free all the various function
609 (dbus_connection_dispatch): call the DispatchStatusFunction
610 whenever this function returns
611 (dbus_connection_handle_watch): call DispatchStatusFunction
612 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
613 (reply_handler_timeout): call DispatchStatusFunction
614 (dbus_connection_flush): call DispatchStatusFunction
616 2003-04-09 Havoc Pennington <hp@redhat.com>
618 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
621 * bus/dispatch.c (check_service_activated): fix bug in test
623 * dbus/dbus-mainloop.c (check_timeout): fix this up
625 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
626 verbose output so we can sort out output from different processes,
627 e.g. in the activation case.
629 2003-04-08 Colin Walters <walters@gnu.org>
631 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
633 (bus_context_new): Set it.
634 (bus_context_unref): Use it to delete the pid file.
636 2003-04-08 Havoc Pennington <hp@redhat.com>
638 * test/data/invalid-messages/array-with-mixed-types.message:
639 regression test that fails for the moment
641 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
642 tests for convenience
644 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
645 array of nil, it broke things.
647 * test/data/invalid-messages/array-of-nil.message: regression test
649 * test/data/valid-messages/array-of-array-of-uint32.message:
650 happened to write this so added it to suite
652 2003-04-08 Havoc Pennington <hp@redhat.com>
654 * bus/driver.c (bus_driver_handle_acquire_service): init
655 retval/reply before checking name
657 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
658 recursion depth argument
660 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
661 in the public struct for future extension
663 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
666 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
669 * doc/dbus-specification.sgml: fix typo
671 2003-04-08 Alexander Larsson <alexl@redhat.com>
673 Implemented recursive types, named types and new-style iters
676 * glib/test-thread-client.c: (thread_func):
677 * glib/test-thread-server.c: (handle_test_message):
678 * test/test-service.c: (handle_echo):
687 * dbus/dbus-internals.c: (_dbus_type_to_string):
688 Update for new types.
690 * dbus/dbus-marshal.[ch]:
691 Implement recursive types and the new marshalling format.
692 Remove hardcoded dict marshalling.
695 * dbus/dbus-message-builder.c:
697 Remove references to old types
699 * dbus/dbus-message.[ch]:
700 New non-refcounted iter API that supports recursive iters.
701 Use iters for appending, including support for recursive
703 Add byte and named type support.
704 Update everything to new marshalling formats.
705 Add tests for new API.
707 * dbus/dbus-protocol.h:
708 Remove old array types.
709 Add types: BYTE, ARRAY, DICT, NAMED
711 * dbus/dbus-string.c:
712 * dbus/dbus-sysdeps.c:
713 Make parse_double locale safe.
715 * dbus/dbus-test-main.c:
721 * doc/dbus-specification.sgml:
724 * test/data/incomplete-messages/missing-body.message:
725 * test/data/invalid-messages/bad-boolean.message:
726 * test/data/invalid-messages/bad-boolean-array.message:
727 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
728 * test/data/invalid-messages/boolean-has-no-value.message-raw:
729 * test/data/invalid-messages/too-short-dict.message:
730 * test/data/valid-messages/dict-simple.message:
731 * test/data/valid-messages/dict.message:
732 * test/data/valid-messages/emptiness.message:
733 * test/data/valid-messages/lots-of-arguments.message:
734 * test/data/valid-messages/no-padding.message:
735 * test/data/valid-messages/recursive-types.message:
736 Add missing NAME fields
737 Fix up dicts & arrays
739 * test/data/invalid-messages/dict-with-nil-value.message:
740 Removed, this is not invalid anymore.
742 * test/data/valid-messages/recursive-types.message:
743 Add new test for deeply recursive types.
745 2003-04-07 Havoc Pennington <hp@pobox.com>
747 * bus/driver.c (bus_driver_handle_acquire_service): return an
748 error if you try to acquire a service that starts with ':'
750 2003-04-07 Havoc Pennington <hp@redhat.com>
752 * doc/dbus-specification.sgml: require that base service names
753 start with ':' and that the base service is created/deleted
754 as first and last things a connection does on the bus
756 * bus/dispatch.c (check_existent_service_activation): lots more
757 work on the activation test; it doesn't fully pass yet...
759 * test/test-service.c (main): fix so we don't memleak the
760 connection to the message bus
761 (filter_func): accept a message asking us to exit
763 2003-04-06 Havoc Pennington <hp@pobox.com>
765 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
768 * configure.in: fixes to Qt detection from Colin Walters
770 * doc/Makefile.am: Only remove generated docbook dirs if they
771 exist, from Colin Walters
773 * dbus/dbus-bus.c: change how we set well-known connections to
774 NULL, so that it works if a single connection is stored in
775 two well-known array slots.
777 * test/Makefile.am: remove a lot of stuff that isn't immediately
778 useful, it's in CVS history if we want it.
780 * test/test-service.c: use dbus-mainloop instead of that
783 2003-04-06 Havoc Pennington <hp@pobox.com>
785 * dbus/Makefile.am: split lists of sources into stuff that goes in
786 the library, util functions that go in the lib and are also used
787 elsewhere, and util functions that are used in tests/daemon but
790 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
791 here so it can be used in test binaries also
793 2003-04-06 Havoc Pennington <hp@pobox.com>
795 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
796 here in the parent process, so we can return an error if it
797 fails. Also, move some of the code into the child so the parent
798 is less hosed if we fail midway through.
800 * bus/bus.c (bus_context_new): move pidfile detection further up
801 in the function, before we start overwriting sockets and such.
803 * bus/messagebus.in: adjust this a bit, not sure if it will work.
805 * configure.in: add --with-system-pid-file and --with-system-socket
807 2003-04-06 Colin Walters <walters@verbum.org>
809 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
811 * bus/system.conf.in: Declare a pidfile.
813 * bus/bus.c (bus_context_new): Test for an existing pid file, and
814 create one (if appropriate).
816 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
817 (struct BusConfigParser) [pidfile]: New.
818 (element_type_to_name, merge_included, start_busconfig_child)
819 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
820 (bus_config_parser_unref): Free it.
821 (bus_config_parser_get_pidfile): New function.
823 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
825 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
827 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
829 * dbus/dbus-sysdeps.h: Prototype it.
831 2003-04-06 Havoc Pennington <hp@pobox.com>
833 * bus/bus.c (bus_context_new): print the address in here, rather
834 than in main(), because we need to do it before forking the daemon
836 * bus/dispatch.c (send_service_nonexistent_error): set the sender
837 on the service nonexistent error
839 * bus/driver.c (bus_driver_handle_acquire_service): set the
840 sender on the AcquireService reply
842 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
843 server also listen on a UNIX socket so services can connect to it.
845 2003-04-06 Havoc Pennington <hp@pobox.com>
847 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
848 so it detects deadlocks and also we actually init threads when
851 2003-04-06 Havoc Pennington <hp@pobox.com>
853 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
854 save the domain socket name, and unlink it when we disconnect the
855 server. Means that at least when we exit normally, we won't leave
856 a bunch of junk in /tmp
858 * dbus/dbus-transport-unix.c
859 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
860 memory management). (I was making a real change here but then
863 2003-04-06 Havoc Pennington <hp@pobox.com>
865 * bus/bus.c (bus_context_new): fix wrong handling of
866 server_data_slot_unref() in the error case.
868 * dbus/dbus-internals.h (_dbus_assert): change so it passes
869 "(condition) != 0" to _dbus_real_assert so that
870 "_dbus_assert (pointer)" doesn't cause a warning
872 * bus/main.c (main): accept --print-address option to print out
873 the message bus address
875 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
877 * dbus/dbus-transport.c (_dbus_transport_open): special error for
878 "tmpdir" option to unix: address on client side
880 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
883 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
884 we can use to create sockets in the test suite.
886 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
887 cleanly. To be used for testing.
889 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
891 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
893 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
894 handle trying to call this when there's no servers active
896 2003-04-05 Havoc Pennington <hp@pobox.com>
902 2003-04-05 Havoc Pennington <hp@pobox.com>
904 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
905 crash on startup. Need to get "try starting the daemon"
906 in the test suite I guess. ;-)
908 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
909 tracked the number of open connections; it's better done in
910 application-specific code as you want it to span all servers etc.
912 2003-04-05 Havoc Pennington <hp@pobox.com>
914 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
915 patch from Colin Walters
917 2003-04-05 Havoc Pennington <hp@pobox.com>
919 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
920 reality; in fact multiple mechanisms are allowed.
922 * dbus/dbus-internals.c (_dbus_real_assert)
923 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
924 _dbus_assert_not_reached() into functions, so that they don't show
925 up in basic block counts for test coverage, and don't use up as
926 much disk space. Does mean slower execution speed though, so
927 assumes --disable-asserts is the normal production case.
929 2003-04-05 Havoc Pennington <hp@pobox.com>
931 * test/Makefile.am (dist-hook): also dist *.in files
937 2003-04-05 Havoc Pennington <hp@pobox.com>
939 * dbus/dbus-string.c: docs warning
941 * dbus/dbus-spawn.c: missing docs
943 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
945 2003-04-05 Havoc Pennington <hp@pobox.com>
947 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
950 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
951 to -1 once we've reaped the babysitter
952 (_dbus_babysitter_handle_watch): do as much work as we can, not
955 * bus/activation.c: add code using DBusBabysitter so that we
956 handle it when a service fails to start up properly.
957 (bus_activation_service_created): don't remove the activation
958 entries as we go, just let them get removed when we free the pending
959 activation. Unref reply messages after sending them.
961 2003-04-05 Havoc Pennington <hp@pobox.com>
963 * test/decode-gcov.c (main): print per-directory stats in the report
965 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
967 2003-04-05 Havoc Pennington <hp@pobox.com>
969 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
971 * test/decode-gcov.c: hack up a little program to suck data
972 out of gcov files. Yes this is sort of silly.
974 * configure.in: define something in config.h and do an
975 AM_CONDITIONAL when gcov is enabled
977 2003-04-04 Havoc Pennington <hp@redhat.com>
979 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
980 return a "babysitter" object that is used to monitor the status of
981 the spawned process and reap it when required.
983 * test/test-segfault.c, test/test-exit.c,
984 test/test-sleep-forever.c: binaries that do various lame things,
985 used in the test suite.
987 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
989 2003-04-03 Havoc Pennington <hp@pobox.com>
991 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
992 in preparation for modifying it, dbus-sysdeps is getting
995 2003-04-03 Havoc Pennington <hp@redhat.com>
997 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1000 * bus/*.[hc]: adapt to mainloop change
1002 2003-04-03 Havoc Pennington <hp@redhat.com>
1004 * bus/activation.c (load_directory): fix up memleaks
1005 (bus_activation_entry_free): free the entry
1007 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1008 we get one from the message bus; fix memleaks.
1010 * dbus/dbus-message.c (dbus_set_error_from_message): new function
1012 2003-04-03 Havoc Pennington <hp@pobox.com>
1014 * bus/config-parser.c (bus_config_parser_unref): free
1015 list of mechanisms, bug discovered by test suite enhancements
1016 (putting system.conf and session.conf into suite)
1018 * test/Makefile.am, test/test-service.c: add placeholder for a
1019 test service that we'll activate as part of test suite. Doesn't
1022 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
1023 setting NULL value, and use system malloc not dbus_malloc()
1024 when we have unavoidable memleakage.
1026 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1027 didn't work, and support DBUS_BUS_ACTIVATION.
1029 * bus/activation.c (child_setup): pass our well-known bus type to
1032 * bus/config-parser.c: support <type> to specify well-known type
1034 * doc/dbus-specification.sgml: document the env variables to
1035 locate well-known buses and find service activator
1037 2003-04-02 Havoc Pennington <hp@redhat.com>
1039 * test/Makefile.am (all-local): add a rule to copy tests to
1040 builddir, so we can have generated tests. Use this to remove the
1041 silly hack for testing system.conf and session.conf. Will use this
1042 shortly to generate .service files pointing to test binaries.
1044 2003-04-02 Havoc Pennington <hp@redhat.com>
1046 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1047 current alloc and needed new length, not max of the doubled
1048 allocation and needed new length. Also, when building tests,
1049 don't do the double-allocation stuff, just realloc every time.
1051 2003-04-02 Havoc Pennington <hp@redhat.com>
1053 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1055 (_dbus_string_get_dirname): new
1056 (_dbus_sysdeps_test): new
1057 (_dbus_directory_open): include dirnames in error messages
1059 * bus/config-parser.c: interpret <include> and <includedir> and
1060 <servicedir> relative to config file location if the given
1061 filename is not absolute.
1063 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1065 2003-04-02 Havoc Pennington <hp@redhat.com>
1067 * bus/connection.c (bus_transaction_send_error_reply): set sender
1068 service for the error, and unref the reply on success
1070 * bus/activation.c: convert to use BusTransaction so OOM can be
1072 (bus_activation_service_created): set sender of the message
1074 2003-04-01 Havoc Pennington <hp@redhat.com>
1076 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1077 <includedir> (at least mostly)
1079 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1080 first, then the user ID
1082 2003-04-01 Havoc Pennington <hp@pobox.com>
1084 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1087 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1089 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1091 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1092 socket 0777, and unlink any existing socket.
1094 * bus/bus.c (bus_context_new): change our UID/GID and fork if
1095 the configuration file so specifies; set up auth mechanism
1098 * bus/config-parser.c (bus_config_parser_content): add support
1099 for <fork> option and fill in code for <auth>
1101 * bus/system.conf.in: add <fork/> to default configuration,
1102 and limit auth mechanisms to EXTERNAL
1104 * doc/config-file.txt (Elements): add <fork>
1106 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1107 (_dbus_change_identity): new function
1109 2003-03-31 Havoc Pennington <hp@redhat.com>
1111 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
1112 (_dbus_listen_unix_socket): fix off-by-one error in null
1113 termination spotted by Nalin
1115 2003-03-31 Havoc Pennington <hp@redhat.com>
1117 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1118 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1119 having a real home directory available.
1121 2003-03-31 Havoc Pennington <hp@redhat.com>
1123 * bus/Makefile.am (install-data-hook): create /var/run/dbus
1125 * bus/messagebus.in: add init script for Red Hat /etc/init.d
1127 * configure.in: add support for specifying a style of init script
1130 2003-03-31 Havoc Pennington <hp@redhat.com>
1132 Fix some annoying DBusString API and fix all affected code.
1134 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1136 (_dbus_string_get_data): change to return string instead of using
1138 (_dbus_string_get_const_data): ditto
1139 (_dbus_string_get_data_len): ditto
1140 (_dbus_string_get_const_data_len): ditto
1142 2003-03-31 Havoc Pennington <hp@redhat.com>
1144 * bus/main.c (main): fix up the command line arguments to be nicer
1146 2003-03-31 Havoc Pennington <hp@redhat.com>
1148 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1149 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
1150 final location that lands in the config file
1152 * bus/config-loader-expat.c (bus_config_load): fix type of
1155 * doc/TODO: remove TODO item for dbus_bus_get()
1157 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1159 2003-03-31 Havoc Pennington <hp@pobox.com>
1161 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1162 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1163 argument since they are always client side
1165 * dbus/dbus-server.c (dbus_server_get_address): new function
1167 * bus/main.c (main): take the configuration file as an argument.
1169 * test/data/valid-config-files/debug-allow-all.conf: new file to
1170 use with dispatch.c tests for example
1172 * bus/test-main.c (main): require test data dir
1174 * bus/bus.c (bus_context_new): change this to take a
1175 configuration file name as argument
1177 * doc/config-file.txt (Elements): add <servicedir>
1179 * bus/system.conf, bus/session.conf: new files
1181 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1182 well-known socket if none set
1184 * configure.in: create system.conf and session.conf
1186 2003-03-30 Havoc Pennington <hp@pobox.com>
1188 * bus/config-parser.c: hacking
1190 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1191 to shut down, since it could cause weirdness with the DBusList
1194 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1195 link-oriented stack routines
1196 (alloc_link): free the mempool if the first alloc from it fails
1198 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1200 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1202 (_dbus_string_skip_white): new
1204 * doc/config-file.txt (Elements): add <includedir>
1206 2003-03-28 Havoc Pennington <hp@pobox.com>
1208 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1209 (_dbus_string_copy_data): new functions
1211 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1213 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1217 * dbus/dbus-memory.c:
1220 2003-03-28 Havoc Pennington <hp@pobox.com>
1222 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1223 I think it may have just been superstition. Not sure.
1225 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1226 failures that were not being handled.
1228 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1230 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1231 row that will fail on out-of-memory.
1233 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1234 function for testing out-of-memory handling.
1236 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1237 allocation functions, they do map exactly to the expat ones.
1239 2003-03-27 Havoc Pennington <hp@redhat.com>
1241 * bus/config-loader-libxml.c (bus_config_load): add another error
1244 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1247 Add note about automatic service activation.
1249 * doc/dbus-specification.sgml:
1250 Rename the specification and clarify a few things.
1252 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1255 * dbus/dbus-address.c:
1257 * dbus/dbus-marshal.c:
1258 * dbus/dbus-server-debug-pipe.c:
1259 * dbus/dbus-transport-unix.c:
1260 Fix documentation warnings.
1262 2003-03-26 Havoc Pennington <hp@pobox.com>
1264 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1265 after every test so it's quick and easy to see which leaked, and
1266 so we test multiple dbus_shutdown() calls
1268 * configure.in: change configure.in XML stuff to also support
1271 * config-loader-libxml.c: some hacking
1273 * config-loader-expat.c: some hacking
1275 * config-parser.c: some hacking, plus tests
1277 2003-03-25 Havoc Pennington <hp@redhat.com>
1279 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1281 * configure.in: add --with-xml option to specify XML library,
1282 right now only libxml is supported.
1284 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1285 nonworking code between home and work, still just stubs
1287 2003-03-24 Havoc Pennington <hp@redhat.com>
1289 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1292 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1293 NULL argument for "message" if the error is a well-known one,
1294 fill in a generic message in this case.
1296 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1299 * bus/test.c (bus_test_flush_bus): add
1301 * bus/policy.c (bus_policy_test): test code stub
1303 2003-03-24 Havoc Pennington <hp@pobox.com>
1305 * bus/connection.c (bus_connections_setup_connection): set up
1306 the "can this user connect" function, but it always returns
1307 TRUE until we have a config file parser so we can have a config
1308 file that allows connections.
1310 2003-03-23 Havoc Pennington <hp@pobox.com>
1312 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1313 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1314 the mutex, so we can check for proper memory management
1317 * dbus/dbus-dataslot.c: remove the mutex from
1318 DBusDataSlotAllocator and lock it manually when using it,
1319 to simplify fitting it into the global slots framework.
1321 * dbus/dbus-threads.c (init_static_locks): rework how we're
1322 handling global locks so they are easily shut down.
1324 * bus/policy.c (bus_policy_append_rule): fix
1326 * bus/test-main.c (main): check for memleaks
1328 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1329 test suite check for memleaks
1331 * dbus/dbus-memory.c: add support in test mode for tracking
1332 number of outstanding blocks
1334 2003-03-23 Havoc Pennington <hp@pobox.com>
1336 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1339 * dbus/dbus-hash.h: add ULONG hash keys
1341 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1342 (_dbus_get_group_id): new function
1344 2003-03-20 Havoc Pennington <hp@redhat.com>
1346 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1348 (dbus_connection_get_unix_user): new function
1350 2003-03-20 Havoc Pennington <hp@pobox.com>
1352 * bus/connection.c (bus_connection_send_oom_error): assert that
1353 message has a sender
1354 (connection_execute_transaction): ditto
1355 (bus_connection_preallocate_oom_error): fix to set the sender, and
1356 set recipient to the destination service, not the bus driver
1358 * bus/policy.c: hacking
1360 * dbus/dbus-message.c (dbus_message_service_is): new function
1361 (dbus_message_sender_is): new
1363 2003-03-19 Havoc Pennington <hp@redhat.com>
1365 * bus/policy.c: start sketching code for policy restrictions on
1366 what connections can do.
1368 2003-03-18 Havoc Pennington <hp@redhat.com>
1370 * doc/TODO: some notes on high-level todo items. Little nitpick
1371 stuff is all in @todo, so no need to add it here.
1373 * doc/config-file.txt: some notes on how config file might look
1375 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1381 2003-03-17 Havoc Pennington <hp@redhat.com>
1383 * dbus/dbus-internals.h: add gcc attributes so that
1384 our printf-style functions warn on bad arguments to
1387 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1390 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1393 2003-03-17 Havoc Pennington <hp@redhat.com>
1395 * bus/test-main.c (main): make it print something as it runs
1396 so make check doesn't look stuck
1398 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1399 from CVS, now obsolete
1401 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1403 * bus/dispatch.c: (bus_dispatch):
1404 Refetch the service name since it may have been reallocated
1405 when dbus_message_set_sender was called.
1407 * dbus/dbus-sysdeps.c: (_dbus_accept):
1408 Add address and address length variables and use them to stop
1409 valgrind from complaining.
1411 2003-03-17 Havoc Pennington <hp@pobox.com>
1413 All tests pass, no memleaks, no valgrind complaints.
1415 * bus/test.c: refcount handler_slot
1417 * bus/connection.c (bus_connections_new): refcount
1418 connection_data_slot
1420 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1421 bytes so that auth scripts pass.
1423 * bus/dispatch.c: init message_handler_slot so it gets allocated
1426 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1428 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1429 dealloc server_pipe_hash when no longer used for benefit of
1432 * dbus/dbus-auth.c (process_command): memleak fix
1434 * bus/dispatch.c (check_hello_message): memleak fix
1436 2003-03-16 Havoc Pennington <hp@pobox.com>
1438 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1440 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1442 * bus/activation.c (bus_activation_activate_service): Append
1443 the pending activation entry to the list of pending activations.
1445 2003-03-16 Havoc Pennington <hp@pobox.com>
1447 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1450 * dbus/dbus-address.c (create_entry): fix OOM handling when
1451 failing to alloc entry->method
1453 2003-03-16 Havoc Pennington <hp@pobox.com>
1455 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1458 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1459 add some missing dbus_set_result
1461 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1462 alloc the DBusMessageHandler
1464 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1465 the transport here, since we call this from the finalizer; it
1466 resulted in a double-finalize.
1468 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1469 where we tried to use transport->connection that was NULL,
1470 happened when transport was disconnected early on due to OOM
1472 * bus/*.c: adapt to handle OOM for watches/timeouts
1474 * dbus/dbus-transport-unix.c: port to handle OOM during
1477 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1478 reference to unused bytes instead of a copy
1480 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1483 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1486 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1489 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1491 * doc/dbus-specification.sgml:
1492 Document reply message for ActivateService.
1494 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1496 * bus/activation.c: (bus_pending_activation_entry_free),
1497 (bus_pending_activation_free), (bus_activation_new),
1498 (bus_activation_unref), (bus_activation_service_created),
1499 (bus_activation_activate_service):
1501 * bus/bus.c: (bus_context_new):
1502 * bus/desktop-file.c: (new_section):
1503 * bus/driver.c: (bus_driver_send_service_deleted),
1504 (bus_driver_handle_activate_service):
1505 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1507 * dbus/dbus-connection.c:
1508 (dbus_connection_send_with_reply_and_block):
1509 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1510 * dbus/dbus-protocol.h:
1511 Make activation work better. Now pending activations will be queued
1512 and the daemon won't try to activate services that are already registered.
1514 2003-03-16 Havoc Pennington <hp@pobox.com>
1516 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1519 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1520 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1522 2003-03-16 Havoc Pennington <hp@pobox.com>
1524 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1525 this. always run the test suite before commit...
1527 * bus/*: adapt to DBusConnection API changes
1529 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1530 requires renaming stuff to avoid dbus_connection_dispatch name
1533 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1536 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1537 separate from _dbus_message_loader_return_buffer()
1539 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1540 this, because it's now always broken to use; the number of
1541 messages in queue vs. the number still buffered by the message
1542 loader is undefined/meaningless. Should use
1543 dbus_connection_get_dispatch_state().
1544 (dbus_connection_dispatch): rename from
1545 dbus_connection_dispatch_message
1547 2003-03-16 Havoc Pennington <hp@pobox.com>
1549 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1552 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1554 * dbus/dbus-connection.c:
1555 (dbus_connection_send_with_reply_and_block):
1556 Decrease connection->n_incoming when removing an entry
1558 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1559 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1560 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1561 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1562 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1563 (dbus_dict_get_byte_array):
1564 Handle NULL arrays and strings. Also add support for byte arrays.
1566 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1567 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1568 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1569 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1570 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1571 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1572 * dbus/dbus-marshal.h:
1573 Add support for marshalling and demarshalling empty arrays and strings.
1575 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1576 (dbus_message_append_string_array),
1577 (dbus_message_iter_get_boolean),
1578 (dbus_message_iter_get_boolean_array),
1579 (dbus_message_iter_get_int32_array),
1580 (dbus_message_iter_get_uint32_array),
1581 (dbus_message_iter_get_double_array),
1582 (dbus_message_iter_get_byte_array),
1583 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1584 (check_message_handling):
1585 Add support for getting empty arrays and dicts.
1587 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1588 Don't do any validation at all for now, that's better than just checking
1591 * test/data/valid-messages/emptiness.message:
1592 New test message with lots of empty arrays.
1594 2003-03-16 Havoc Pennington <hp@pobox.com>
1596 * dbus/dbus-connection.c
1597 (_dbus_connection_queue_received_message_link): new function that
1598 can't fail due to OOM
1600 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1601 new function pops a message together with a list link
1604 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1605 message queuing functions to avoid needing to alloc memory
1607 2003-03-16 Havoc Pennington <hp@pobox.com>
1609 Oops - test code was only testing failure of around 30 of the
1610 mallocs in the test path, but it turns out there are 500+
1611 mallocs. I believe this was due to misguided linking setup such
1612 that there was one copy of dbus_malloc etc. in the daemon and one
1613 in the shared lib, and only daemon mallocs were tested. In any
1614 case, the test case now tests all 500+ mallocs, and doesn't pass
1615 yet, though there are lots of fixes in this patch.
1617 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1618 this so that it doesn't need to allocate memory, since it
1619 has no way of indicating failure due to OOM (and would be
1620 annoying if it did).
1622 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1624 * bus/Makefile.am: rearrange to create two self-contained
1625 libraries, to avoid having libraries with overlapping symbols.
1626 that was resulting in weirdness, e.g. I'm pretty sure there
1627 were two copies of global static variables.
1629 * dbus/dbus-internals.c: move the malloc debug stuff to
1632 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1635 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1637 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1640 * bus/dispatch.c (bus_dispatch_add_connection): free
1641 message_handler_slot when no longer using it, so
1642 memory leak checkers are happy for the test suite.
1644 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1646 * bus/bus.c (new_connection_callback): disconnect in here if
1647 bus_connections_setup_connection fails.
1649 * bus/connection.c (bus_connections_unref): fix to free the
1651 (bus_connections_setup_connection): if this fails, don't
1652 disconnect the connection, just be sure there are no side
1655 * dbus/dbus-string.c (undo_alignment): unbreak this
1657 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1659 (_dbus_auth_new): fix the order in which we free strings
1662 * bus/connection.c (bus_connection_disconnected): fix to
1663 not send ServiceDeleted multiple times in case of memory
1666 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1667 get the base service name
1668 (dbus_bus_register_client): don't return base service name,
1669 instead store it on the DBusConnection and have an accessor
1671 (dbus_bus_register_client): rename dbus_bus_register()
1673 * bus/dispatch.c (check_hello_message): verify that other
1674 connections on the bus also got the correct results, not
1675 just the one sending hello
1677 2003-03-15 Havoc Pennington <hp@pobox.com>
1679 Make it pass the Hello handling test including all OOM codepaths.
1680 Now to do other messages...
1682 * bus/services.c (bus_service_remove_owner): fix crash when
1683 removing owner from an empty list of owners
1684 (bus_registry_ensure): don't leave service in the list of
1685 a connection's owned services if we fail to put the service
1688 * bus/connection.c (bus_connection_preallocate_oom_error): set
1689 error flag on the OOM error.
1691 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1692 handle _dbus_transport_set_connection failure
1694 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1695 to create watches up front and simply enable/disable them as
1697 (unix_connection_set): this can now fail on OOM
1699 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1700 of enabling/disabling a watch or timeout.
1702 * bus/loop.c (bus_loop_iterate): don't touch disabled
1705 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1707 2003-03-15 Havoc Pennington <hp@pobox.com>
1709 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1710 write useful test code, after all that futzing around ;-)
1712 Test does not yet pass because we can't handle OOM in
1713 _dbus_transport_messages_pending (basically,
1714 dbus_connection_preallocate_send() does not prealloc the write
1715 watch). To fix this, I think we need to add new stuff to
1716 set_watch_functions, namely a SetEnabled function so we can alloc
1717 the watch earlier, then enable it later.
1719 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1720 dbus-memory.c to the convenience lib
1722 * bus/test.c: rename some static functions to keep them clearly
1723 distinct from stuff in connection.c. Handle client disconnection.
1725 2003-03-14 Havoc Pennington <hp@pobox.com>
1727 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1728 transport, tests more of the real codepath. Set up clients
1729 with bus_setup_debug_client.
1731 * bus/test.c (bus_setup_debug_client): function to set up debug
1732 "clients" on the main loop
1734 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1737 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1740 * dbus/dbus-server-debug.c: support a debug server based on pipes
1742 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1743 (_dbus_close): new function
1745 * configure.in: check for socketpair
1747 2003-03-14 Havoc Pennington <hp@redhat.com>
1749 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1752 * dbus/dbus-transport-debug.c: rework this a good bit to be
1753 less complicated. hopefully still works.
1755 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1758 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1761 * dbus/dbus-message.c (dbus_message_copy): rename from
1762 dbus_message_new_from_message, fix it up to copy
1763 all the message fields, add test case
1765 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1766 not quite passing yet
1768 2003-03-14 Havoc Pennington <hp@pobox.com>
1770 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1771 until no work remains" in test code. (the large diff here
1772 is just code movement, no actual changes)
1774 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1775 1, no point waiting around for test code.
1776 (_dbus_server_debug_accept_transport): unref the timeout
1777 after adding it (right?)
1779 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1781 2003-03-13 Havoc Pennington <hp@redhat.com>
1783 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1786 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1789 * dbus/dbus-connection.h: Make AddWatchFunction and
1790 AddTimeoutFunction return a bool so they can fail on out-of-memory
1792 * bus/bus.c (bus_context_new): set up timeout handlers
1794 * bus/connection.c (bus_connections_setup_connection): set up
1797 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1800 * bus/bus.c (bus_context_new): adapt to changes
1802 * bus/connection.c: adapt to changes
1804 * test/watch.c: adapt to DBusWatch changes
1806 * bus/dispatch.c (bus_dispatch_test): started adding this but
1809 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1811 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1813 2003-03-13 Havoc Pennington <hp@pobox.com>
1815 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1816 set up a test framework as for the library
1818 2003-03-12 Havoc Pennington <hp@pobox.com>
1820 Throughout: purge global variables, introduce BusActivation,
1821 BusConnections, BusRegistry, etc. objects instead.
1823 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1826 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1827 going to redo this a bit differently I think
1829 2003-03-12 Havoc Pennington <hp@redhat.com>
1831 Mega-patch that gets the message bus daemon initially handling
1832 out-of-memory. Work still needed. Also lots of random
1833 moving stuff to DBusError instead of ResultCode.
1835 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1837 * dbus/dbus-connection.c
1838 (dbus_connection_send_with_reply_and_block): use DBusError
1840 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1843 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1844 code here, as the only failure possible is OOM.
1846 * bus/connection.c (bus_connection_disconnect):
1847 rename bus_connection_disconnected as it's a notification only
1849 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1850 "name" on get_args failure, should be done by get_args;
1851 don't disconnect client for bad args, just return an error.
1852 (bus_driver_handle_service_exists): ditto
1854 * bus/services.c (bus_services_list): NULL-terminate returned array
1856 * bus/driver.c (bus_driver_send_service_lost)
1857 (bus_driver_send_service_acquired): send messages from driver to a
1858 specific client to the client's unique name, not to the broadcast
1861 * dbus/dbus-message.c (decode_header_data): reject messages that
1862 contain no name field
1863 (_dbus_message_get_client_serial): rename to
1864 dbus_message_get_serial and make public
1865 (_dbus_message_set_serial): rename from set_client_serial
1866 (_dbus_message_set_reply_serial): make public
1867 (_dbus_message_get_reply_serial): make public
1869 * bus/connection.c (bus_connection_foreach): allow stopping
1870 iteration by returning FALSE from foreach function.
1872 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1873 (dbus_connection_free_preallocated_send)
1874 (dbus_connection_preallocate_send): new API for sending a message
1875 without possibility of malloc failure.
1876 (dbus_connection_send_message): rename to just
1877 dbus_connection_send (and same for whole function family)
1879 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1881 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1883 * bus/activation.c: handle/return errors
1885 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1887 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1888 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1889 (_dbus_result_from_errno): move to this file
1891 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1893 * dbus/dbus-marshal.c:
1894 (_dbus_marshal_set_string):
1895 Take a length argument so we can marshal the correct string
1898 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1899 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1900 (_dbus_marshal_test):
1901 * dbus/dbus-marshal.h:
1902 Add support for marshalling and demarshalling dicts.
1904 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1905 Add support for TYPE DICT.
1907 * dbus/dbus-message.c: (set_string_field):
1908 Adjust header padding.
1910 (dbus_message_append_args_valist), (dbus_message_append_dict),
1911 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1912 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1913 (check_message_handling), (check_have_valid_message):
1914 * dbus/dbus-message.h:
1915 Add functions for setting and getting dicts.
1917 * dbus/dbus-protocol.h:
1923 * doc/dbus-specification.sgml:
1924 Add information about how dicts are marshalled.
1926 * test/data/invalid-messages/dict-with-nil-value.message:
1927 * test/data/invalid-messages/too-short-dict.message:
1928 * test/data/valid-messages/dict-simple.message:
1929 * test/data/valid-messages/dict.message:
1930 Add sample messages containing dicts.
1932 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1934 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1936 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1939 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1940 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1941 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1942 (dbus_dict_set_double), (dbus_dict_set_string),
1943 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1944 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1945 (dbus_dict_set_string_array), (_dbus_dict_test):
1947 Fix according to comments from Havoc.
1949 2003-03-06 Michael Meeks <michael@server.home>
1951 * configure.in: if we don't have kde-config, disable have_qt.
1953 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1958 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1959 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1960 (dbus_dict_remove), (dbus_dict_get_value_type),
1961 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1962 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1963 (dbus_dict_put_double), (dbus_dict_put_string),
1964 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1965 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1966 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1967 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1968 (dbus_dict_get_double), (dbus_dict_get_string),
1969 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1970 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1971 (dbus_dict_get_string_array), (_dbus_dict_test):
1973 Add DBusDict implementation
1975 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1979 2003-03-04 Havoc Pennington <hp@pobox.com>
1981 * test/data/auth/*: adapt to changes
1983 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1984 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1987 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1988 more stuff from being in a context name, to make the protocol
1989 simpler to deal with
1991 * dbus/dbus-errors.c (dbus_error_has_name): new function
1992 (dbus_error_is_set): new function
1994 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1995 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1997 * dbus/dbus-connection.c (dbus_connection_flush): also read
1998 messages during a flush operation
2000 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2002 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2004 * configure.in: Check for gethostbyname on Solaris.
2006 * dbus/dbus-transport.c: (_dbus_transport_open):
2007 Remove duplicate "tcp" entry.
2009 * doc/dbus-specification.sgml:
2010 Clarify some things.
2012 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2014 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2015 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2016 (_dbus_keyring_test):
2017 * dbus/dbus-md5.c: (_dbus_md5_compute):
2018 * dbus/dbus-sha.c: (_dbus_sha_compute):
2021 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2023 * README: Add some things.
2025 2003-03-04 Anders Carlsson <andersca@codefactory.se>
2027 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2028 after case DBUS_TYPE_BOOELAN.
2030 2003-03-02 Havoc Pennington <hp@pobox.com>
2032 * test/break-loader.c (randomly_set_extreme_ints): add test that
2033 sets really huge and small integers
2035 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2036 that length of boolean array fits in the string, and that
2037 string has room for boolean value in single-bool case.
2039 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2040 optional value to "ALIGN" command which is what to fill the
2043 * test/data/valid-messages/no-padding.message: add regression
2044 test for the message padding problem
2046 2003-03-02 Havoc Pennington <hp@pobox.com>
2048 * dbus/dbus-message.c (decode_header_data): fix to always init
2049 message_padding, from Benjamin Dauvergne
2051 2003-03-02 Havoc Pennington <hp@pobox.com>
2057 2003-03-01 Joe Shaw <joe@assbarn.com>
2059 * configure.in: Check for "struct cmsgcred" and try to access its
2060 members for BSD-like unices.
2062 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2063 _dbus_read_credentials_unix_socket().
2064 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2065 read() for reading the credential byte off the unix socket. Use
2066 struct cmsgcred on systems that support it.
2068 2003-02-27 Alexander Larsson <alexl@redhat.com>
2072 Make gthreads-2.0 dependency optional. Don't build thread test if
2075 2003-02-27 Havoc Pennington <hp@pobox.com>
2077 * dbus/dbus-connection.c
2078 (dbus_connection_send_message_with_reply_and_block): fix doh!
2079 doh! doh! bug that resulted in never removing a reply from the
2080 queue, no wonder we called get_reply_serial so much ;-)
2082 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2083 and client serial instead of demarshaling them every time
2085 2003-02-27 Havoc Pennington <hp@pobox.com>
2087 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2088 more inlined, using dbus-string-private.h, speeds things up
2091 * dbus/dbus-string.c (_dbus_string_free): apply align offset
2092 when freeing the string
2093 (_dbus_string_steal_data): fix for align offset
2094 (undo_alignment): new function
2096 2003-02-26 Havoc Pennington <hp@redhat.com>
2098 All kinds of audit fixes from Owen, plus initial attempt to
2099 handle unaligned memory returned from malloc.
2101 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
2102 leave room for align_offset and nul byte
2103 (fixup_alignment): function to track an align_offset and
2104 ensure real->str is aligned
2105 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
2106 to allow a nul byte plus align offset
2107 (_dbus_string_lock): fix overflow issue
2108 (_dbus_string_init_const_len): add assertions on sanity of len,
2109 assign allocated to be ALLOCATION_PADDING larger than len
2110 (set_length): fixup the overflow handling
2111 (_dbus_string_get_data_len): fix overflow in assertion
2112 (open_gap): detect overflow in size of gap to be opened
2113 (_dbus_string_lengthen): add overflow check
2114 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2115 (_dbus_string_append): add overflow check
2116 (_dbus_string_append_unichar): overflow
2117 (_dbus_string_delete): fix overflow in assertion
2118 (_dbus_string_copy_len): overflow in assertion
2119 (_dbus_string_replace_len): overflows in assertions
2120 (_dbus_string_find): change to implement in terms of
2121 _dbus_string_find_to
2122 (_dbus_string_find_to): assorted fixage
2123 (_dbus_string_equal_c_str): assert c_str != NULL,
2124 fix logic so the function works
2125 (_dbus_string_ends_with_c_str): fix overflow thingy
2126 (_dbus_string_base64_encode): overflow fix
2127 (_dbus_string_validate_ascii): overflow
2128 (_dbus_string_validate_nul): overflow
2130 2003-02-26 Havoc Pennington <hp@redhat.com>
2132 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2134 2003-02-26 Alexander Larsson <alexl@redhat.com>
2137 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2139 * dbus/dbus-connection.c:
2140 * dbus/dbus-connection.h:
2141 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2142 Add dbus_connection_set_wakeup_main_function and use it when queueing
2143 incoming and outgoing messages.
2146 * dbus/dbus-dataslot.c:
2147 Threadsafe usage of DBusDataSlotAllocator
2149 * dbus/dbus-message.c: (dbus_message_get_args_iter):
2152 * dbus/dbus-server-unix.c:
2155 * glib/dbus-gmain.c:
2156 Implement the new wakeup functions for glib.
2159 * glib/test-thread-client.c:
2160 * glib/test-thread-server.c:
2161 * glib/test-thread.h:
2162 Initial cut at some thread test code. Not really done yet.
2164 2003-02-26 Havoc Pennington <hp@pobox.com>
2166 * dbus/dbus-connection.c
2167 (dbus_connection_send_message_with_reply_and_block): fix crash
2168 where we ref'd the outgoing message instead of the returned reply
2170 * dbus/dbus-transport-unix.c (do_authentication): check read watch
2171 at the end of this function, so if we didn't need to read for
2172 authentication, we reinstall it for receiving messages
2174 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2175 a NULL sender for peer-to-peer case
2177 * dbus/dbus-transport-unix.c (check_read_watch): handle
2178 !authenticated case correctly
2180 * glib/dbus-gmain.c: add support for DBusServer
2182 * dbus/dbus-server.c: add data slot support
2184 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2185 return values and handle errors
2187 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2190 * Doxyfile.in (INPUT): add glib subdir
2192 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2193 setup_with_g_main instead of hookup_with_g_main; write docs
2195 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2197 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2198 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2199 * dbus/dbus-message.c: (dbus_message_append_boolean),
2200 (dbus_message_append_boolean_array),
2201 (dbus_message_get_args_valist), (_dbus_message_test):
2202 * dbus/dbus-message.h:
2203 * doc/dbus-specification.sgml:
2204 Various fixes as pointed out by Havoc.
2206 * test/data/invalid-messages/bad-boolean-array.message:
2207 * test/data/invalid-messages/bad-boolean.message:
2208 Add invalid boolean value test cases.
2210 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2212 * dbus/dbus-internals.c: (_dbus_type_to_string):
2213 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2214 (_dbus_marshal_validate_arg):
2215 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2216 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2217 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2218 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2219 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2220 (dbus_message_iter_get_double),
2221 (dbus_message_iter_get_boolean_array), (message_iter_test):
2222 * dbus/dbus-message.h:
2223 * dbus/dbus-protocol.h:
2224 * doc/dbus-specification.sgml:
2225 * test/data/valid-messages/lots-of-arguments.message:
2226 Add support for boolean and boolean array types.
2228 2003-02-23 Havoc Pennington <hp@pobox.com>
2230 * dbus/dbus-keyring.c: finish most of this implementation and
2233 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2234 these barf if the error isn't cleared to NULL
2236 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2237 (_dbus_create_directory): new function
2239 * dbus/dbus-errors.c (dbus_set_error): fix warning
2241 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2242 (_dbus_string_hex_decode): new function
2243 (test_hex_roundtrip): test code
2245 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2247 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2249 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2250 the save-to-temp/rename trick to atomically write the new file
2251 (_dbus_string_parse_uint): new function
2253 2003-02-22 Havoc Pennington <hp@pobox.com>
2255 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2257 2003-02-22 Havoc Pennington <hp@pobox.com>
2259 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2260 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2262 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2264 * dbus/test/data/sha-1: add US government test suite for SHA-1
2266 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2268 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2269 Make string arrays NULL-terminated.
2271 * dbus/dbus-memory.c: (dbus_free_string_array):
2272 * dbus/dbus-memory.h:
2273 New function for freeing NULL-terminated string arrays.
2275 * dbus/dbus-message-builder.c: (append_quoted_string),
2276 (_dbus_message_data_load):
2277 Add support for array types.
2279 * dbus/dbus-message.c: (check_message_handling):
2280 Add more types as test cases.
2282 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2283 (_dbus_string_parse_double):
2284 Add the start offset to the end offset.
2286 * test/data/valid-messages/lots-of-arguments.message:
2287 New test message with lots of arguments.
2289 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2291 * dbus/dbus-message.c: (dbus_message_append_nil),
2292 (dbus_message_append_int32), (dbus_message_append_uint32),
2293 (dbus_message_append_double), (dbus_message_append_string),
2294 (dbus_message_append_int32_array),
2295 (dbus_message_append_uint32_array),
2296 (dbus_message_append_double_array),
2297 (dbus_message_append_byte_array),
2298 (dbus_message_append_string_array):
2299 Fix all out-of-memory handling in these functions.
2301 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2303 * dbus/dbus-message.c: (dbus_message_append_nil):
2306 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2308 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2309 (dbus_message_append_nil), (dbus_message_append_int32_array),
2310 (dbus_message_append_uint32_array),
2311 (dbus_message_append_double_array),
2312 (dbus_message_append_byte_array),
2313 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2314 (dbus_message_iter_get_int32_array),
2315 (dbus_message_iter_get_uint32_array),
2316 (dbus_message_iter_get_double_array),
2317 (dbus_message_iter_get_byte_array),
2318 (dbus_message_iter_get_string_array):
2320 * dbus/dbus-message.h:
2321 Add functions for appending and getting arrays.
2323 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2325 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2326 element size at least 8 bytes, fixes mempool tests on
2329 2003-02-20 Alexander Larsson <alexl@redhat.com>
2331 * dbus/dbus-transport-unix.c (unix_do_iteration):
2332 Unlock the connection mutex during a blocking select call.
2333 Add todo about how we need a way to wake up the select.
2335 * dbus/dbus-connection-internal.h:
2336 * dbus/dbus-connection.c:
2337 Add _dbus_connection_lock and _dbus_connection_unlock.
2339 2003-02-19 Havoc Pennington <hp@pobox.com>
2341 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2342 Doxyfile.in, not Doxyfile
2344 * dbus/dbus-keyring.c: do some hacking on this
2346 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2348 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2350 (dbus_set_error): remove dbus_error_init, check for message ==
2351 NULL *before* we sprintf into it, and add @todo about including
2352 system headers in this file
2354 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2356 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2358 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2359 get various bits of user information based on either username
2361 (_dbus_homedir_from_username): new function
2363 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2366 Add check for nonposix getpwnam_r
2368 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2369 Align the pool element size to a sizeof (void *) boundary.
2371 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2372 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2373 General Solaris fixes.
2375 * test/data/valid-messages/simplest-manual.message:
2376 Explicitly state that we want little-endian packing.
2378 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2380 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2382 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2383 Added to create a transport connecting using a tcp/ip socket.
2385 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2386 to a tcp socket at given host and port.
2387 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2390 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2392 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2393 Added to create a server listening on a TCP/IP socket.
2395 2003-02-19 Havoc Pennington <hp@pobox.com>
2397 Throughout: mop up all the Doxygen warnings and undocumented
2400 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2401 to search any paths.
2403 * dbus/dbus-threads.c: move global mutex initializers to
2404 dbus-internals.h, multiple prototypes was confusing doxygen
2405 besides being kind of ugly
2407 * Doxyfile (PREDEFINED): have Doxygen define
2408 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2409 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2410 (do not abuse the feature! it's for stuff like the autogenerated
2411 macros in dbus-md5.c, not just for things you don't feel like
2414 2003-02-18 Havoc Pennington <hp@pobox.com>
2416 * dbus/dbus-string.c (_dbus_string_zero): new function
2418 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2419 wrap it in some dbus-friendly API
2421 * dbus/dbus-types.h: add 16-bit types
2423 2003-02-18 Joe Shaw <joe@assbarn.com>
2425 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2426 credentials from our currently running process.
2427 (get_word): Fix a buglet where we were copying the entire length
2428 instead of relative to our position.
2430 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2431 keys on the stack... it's 640k of data.
2433 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2434 read the credentials byte off the socket, even if we don't have
2436 (_dbus_poll): Implement poll() using select() for systems which
2439 * glib/test-dbus-glib.c (main): Print out an error if no
2440 parameters are given.
2442 * test/data/auth/fallback.auth-script: Added. Tests that a client
2443 can fallback to a secondary auth mechanism if the first fails.
2445 2003-02-18 Havoc Pennington <hp@pobox.com>
2449 2003-02-17 Havoc Pennington <hp@pobox.com>
2451 * doc/dbus-specification.sgml: lots of cosmetic
2452 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2453 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2454 s/server/bus/ (except in authentication section). Add a section
2455 "Message Bus Message Routing"
2457 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2463 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2465 * doc/dbus-specification.sgml:
2466 Specification updates.
2468 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2470 * bus/activation.c: (bus_activation_init), (child_setup),
2471 (bus_activation_activate_service):
2473 * bus/main.c: (main):
2474 Set DBUS_ADDRESS environment variable.
2476 * dbus/dbus-errors.c: (dbus_set_error):
2477 Don't use va_copy since that's a C99 feature.
2479 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2480 (_dbus_spawn_async):
2481 * dbus/dbus-sysdeps.h:
2482 Add child_setup_func to _dbus_spawn_async.
2484 * doc/dbus-specification.sgml:
2485 Update specification.
2487 * test/spawn-test.c: (setup_func), (main):
2490 2003-02-17 Alexander Larsson <alexl@redhat.com>
2492 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2495 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2499 * doc/dbus-test-plan.sgml:
2500 Add test plan document.
2505 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2507 * dbus/dbus-message.c: (decode_header_data),
2508 (_dbus_message_loader_return_buffer):
2509 Set the header padding amount when loading a message.
2511 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2513 * bus/dispatch.c: (send_one_message):
2514 Only send broadcast messages to registered connections.
2516 * dbus/dbus-message.c: (dbus_message_name_is):
2517 * dbus/dbus-message.h:
2518 New convenience function.
2520 * dbus/dbus-transport-debug.c: (do_reading):
2521 Only dispatch one message per run.
2524 * test/bus-test.c: (new_connection_callback), (die),
2525 (test_hello_client1_handler), (test_hello_client2_handler),
2526 (test_hello_replies), (main):
2528 * test/bus-test-loop.[ch]:
2531 2003-02-16 Havoc Pennington <hp@pobox.com>
2533 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2534 backward conditional
2536 2003-02-16 Alexander Larsson <alexl@redhat.com>
2538 * dbus/dbus-connection.c:
2539 Implement sent_message_with_reply. (with_reply_and block is still
2541 Made dispatch_message not lose message if OOM.
2543 * dbus/dbus-errors.h:
2544 Add NoReply error (for reply timeouts).
2546 2003-02-16 Alexander Larsson <alexl@redhat.com>
2548 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2549 Actually free keys and values when destroying hashtable.
2551 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2553 * dbus/dbus-auth.c: (client_try_next_mechanism):
2556 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2557 Return TRUE if there's no thread implementation around.
2559 * glib/dbus-gmain.c: (free_source),
2560 (dbus_connection_hookup_with_g_main):
2561 Make sure to remove the GSource when the connection is finalized.
2563 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2565 * bus/dispatch.c: (bus_dispatch_message_handler):
2566 * dbus/dbus-errors.h:
2567 Return an error if someone tries to send a message to a service
2570 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2572 * bus/activation.c: (load_directory), (bus_activation_init),
2573 (bus_activation_activate_service):
2576 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2577 More work on the activation handling.
2579 * dbus/dbus-errors.h:
2580 Add some error messages
2582 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2583 * dbus/dbus-message.h:
2584 New function that creates an error message.
2586 * dbus/dbus-protocol.h:
2587 Add ACTIVATE_SERVER message.
2589 * dbus/dbus-server-unix.c: (unix_handle_watch),
2590 (_dbus_server_new_for_domain_socket):
2591 Call _dbus_fd_set_close_on_exec.
2593 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2594 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2595 (_dbus_fd_set_close_on_exec):
2596 * dbus/dbus-sysdeps.h:
2597 Add _dbus_fd_set_close_on exec function. Also add function that checks
2598 that all open fds are set to close-on-exec and warns otherwise.
2600 * dbus/dbus-transport-unix.c:
2601 (_dbus_transport_new_for_domain_socket):
2602 Call _dbus_fd_set_close_on_exec.
2604 2003-02-16 Havoc Pennington <hp@pobox.com>
2606 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2607 allow people to avoid setting SIGPIPE to SIG_IGN
2608 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2609 we've been asked not to
2611 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2613 * dbus/dbus-list.c: (_dbus_list_append_link),
2614 (_dbus_list_prepend_link):
2615 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2619 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2622 * bus/activation.c: (bus_activation_entry_free),
2623 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2625 * bus/main.c: (main):
2626 Add simple activation support, doesn't work yet though.
2628 2003-02-15 Zack Rusin <zack@kde.org>
2630 * qt/dbus-qthread.cpp: small casting fix
2632 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2634 * dbus/dbus-errors.c: (dbus_set_error):
2635 * dbus/dbus-errors.h:
2636 Add a few errors and make dbus_set_error void.
2638 * dbus/dbus-sysdeps.c:
2639 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2640 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2641 * dbus/dbus-sysdeps.h:
2642 Add _dbus_spawn_async.
2644 * test/spawn-test.c: (main):
2645 Test for _dbus_spawn_async.
2647 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2649 * dbus/dbus-internals.h:
2650 Fix build without tests.
2652 * dbus/dbus-list.c: (alloc_link):
2653 Fix a segfault when a malloc fails.
2655 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2656 (dbus_malloc0), (dbus_realloc):
2657 Add support for malloc debugging.
2659 2003-02-15 Alexander Larsson <alexl@redhat.com>
2661 * dbus/dbus-threads.c:
2662 * dbus/dbus-threads.h:
2663 Add condvars. Remove static mutext from API.
2664 Implement static mutexes by initializing them from threads_init.
2666 * glib/dbus-gthread.c:
2667 * qt/dbus-qthread.cpp:
2668 Update with the thread api changes.
2673 Turn StaticMutex into normal mutex + init function.
2674 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2675 _dbus_list_append_link, _dbus_list_prepend_link
2678 * dbus/dbus-sysdeps.c:
2679 * dbus/dbus-sysdeps.h:
2680 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2681 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2683 * dbus/dbus-protocol.h:
2684 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2686 * dbus/dbus-message.c:
2687 Make ref/unref atomic.
2690 * dbus/dbus-connection-internal.h:
2691 * dbus/dbus-connection.c:
2692 * dbus/dbus-connection.h:
2694 Change _peek to _borrow,_return & _steal_borrowed.
2695 Change disconnect callback to event.
2696 Make dbus_connection_dispatch_messages reentrant.
2698 * dbus/dbus-transport.c:
2699 Don't ref the connection on calls to the transport
2702 * dbus/dbus-message-handler.c:
2705 * glib/dbus-gmain.c:
2706 Don't use peek_message anymore
2709 * test/debug-thread.c:
2710 * test/debug-thread.h:
2711 Simple thread implementation that asserts() on deadlocks in
2712 single-threaded code.
2715 (main) Call debug_threads_init.
2718 Use disconnect message instead of disconnect callback.
2722 Don't call dbus_connection_set_disconnect_function. Instead export
2723 bus_connection_disconnect.
2726 Call bus_connection_disconnect when we get a disconnected message.
2728 2003-02-15 Havoc Pennington <hp@pobox.com>
2730 * dbus/dbus-message.c (dbus_message_new): fool around with the
2733 2003-02-14 Havoc Pennington <hp@pobox.com>
2735 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2737 * dbus/dbus-memory.c: fail if the debug functions indicate we
2740 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2741 (_dbus_decrement_fail_alloc_counter): debug functions to
2742 simulate memory allocation failures
2744 2003-02-14 Havoc Pennington <hp@pobox.com>
2746 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2749 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2751 * bus/driver.c: (bus_driver_handle_hello):
2753 * bus/services.c: (bus_service_lookup):
2754 Reorder message sending so we get a more sane order.
2756 * test/bus-test.c: (message_handler):
2759 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2761 * bus/driver.c: (bus_driver_send_service_deleted),
2762 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2763 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2764 (bus_driver_send_welcome_message),
2765 (bus_driver_handle_list_services),
2766 (bus_driver_handle_acquire_service),
2767 (bus_driver_handle_service_exists):
2768 * dbus/dbus-bus.c: (dbus_bus_register_client),
2769 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2770 * dbus/dbus-errors.c: (dbus_result_to_string):
2771 * dbus/dbus-errors.h:
2772 * dbus/dbus-message.c: (dbus_message_append_args),
2773 (dbus_message_append_args_valist), (dbus_message_get_args),
2774 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2775 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2776 (dbus_message_iter_get_byte_array),
2777 (dbus_message_iter_get_string_array), (message_iter_test),
2778 (check_message_handling), (_dbus_message_test):
2779 * dbus/dbus-message.h:
2780 * test/bus-test.c: (main):
2781 Change fields to arguments in messages, so that they won't be
2782 confused with header fields.
2784 * glib/test-dbus-glib.c: (main):
2785 Remove append_fields from hello message.
2787 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2789 * dbus/dbus-errors.c:
2790 * dbus/dbus-message.c:
2791 * dbus/dbus-string.c:
2792 Documentation fixes.
2794 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2796 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2798 Implement support for timeouts in dbus-glib.
2800 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2802 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2803 * dbus/dbus-message.c: (process_test_subdir):
2804 * test/break-loader.c: (find_breaks_based_on):
2805 Plug some memory leaks.
2807 2003-02-13 Richard Hult <rhult@codefactory.se>
2809 * bus/main.c: Fix build.
2811 * dbus/dbus-errors.h:
2812 * dbus/dbus-errors.c: Fix copyright for Anders.
2814 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2819 * bus/connection.c: (bus_connection_foreach):
2822 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2823 (unescape_string), (new_section), (parse_section_start),
2824 (parse_key_value), (report_error), (bus_desktop_file_load),
2825 (bus_desktop_file_get_string):
2826 * bus/desktop-file.h:
2827 Use DBusError for error reporting.
2829 * bus/dispatch.c: (send_one_message),
2830 (bus_dispatch_message_handler):
2831 * bus/driver.c: (bus_driver_send_service_deleted),
2832 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2833 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2834 (bus_driver_send_welcome_message),
2835 (bus_driver_handle_list_services),
2836 (bus_driver_handle_acquire_service),
2837 (bus_driver_handle_service_exists):
2838 * bus/loop.c: (bus_loop_run):
2840 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2842 * bus/utils.c: (bus_wait_for_memory):
2844 New files with general utility functions.
2846 * dbus/dbus-internals.h:
2847 Remove _DBUS_HANDLE_OOM.
2849 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2851 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2852 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2853 * dbus/dbus-errors.h:
2854 Add DBusError structure.
2856 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2858 * test/data/valid-messages/standard-acquire-service.message:
2859 * test/data/valid-messages/standard-hello.message:
2860 * test/data/valid-messages/standard-list-services.message:
2861 * test/data/valid-messages/standard-service-exists.message:
2862 Add some standard messages.
2864 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2866 * bus/driver.c: (bus_driver_send_welcome_message),
2867 (bus_driver_handle_list_services),
2868 (bus_driver_handle_acquire_service),
2869 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2870 Update for API changes in libdbus.
2872 * dbus/dbus-message.c: (dbus_message_new_reply):
2873 * dbus/dbus-message.h:
2874 Remove the name argument. The spec states that replies shouldn't
2877 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2879 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2880 (report_error), (bus_desktop_file_load), (lookup_section),
2881 (lookup_line), (bus_desktop_file_get_raw),
2882 (bus_desktop_file_get_string):
2883 * bus/desktop-file.h:
2884 Some fixes, and new functions for getting a key value from a section.
2886 2003-02-13 Havoc Pennington <hp@pobox.com>
2888 * test/data/auth/fail-after-n-attempts.auth-script: new test
2890 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2893 2003-02-13 Havoc Pennington <hp@pobox.com>
2895 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2896 dbus_credentials_match were backward
2898 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2899 NO_CREDENTIALS and ROOT_CREDENTIALS
2901 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2902 into here. Never process more commands after we've reached an
2903 end state; store further data as unused bytes.
2905 * test/data/auth/*: add more auth tests
2907 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2908 command to match exact string and EXPECT_UNUSED to match unused
2911 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2913 2003-02-12 Havoc Pennington <hp@pobox.com>
2915 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2916 \r off of popped lines
2918 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2921 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2924 2003-02-12 Havoc Pennington <hp@pobox.com>
2926 * dbus/Makefile.am: remove break-loader from the build, since it
2929 * configure.in: add --enable-gcov to turn on coverage profiling
2930 flags and disable optimization
2932 2003-02-10 Havoc Pennington <hp@pobox.com>
2934 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2935 initial cut at test framework for DBusAuth from laptop.
2936 Doesn't quite work yet but it compiles and I need to get
2937 it off the 266mhz laptop. ;-)
2939 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2940 fix a memleak in error case
2942 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2945 * bus/desktop-file.c:
2946 * bus/desktop-file.h:
2947 Add a desktop file parser.
2949 2003-02-11 Zack Rusin <zack@kde.org>
2951 * qt/message.[h|cpp]: sample implementation
2952 of the KDE wrapper for DBusMessage
2954 2003-02-09 Zack Rusin <zack@kde.org>
2956 * test/bus-test.c: make_it_compile
2957 * doc/dbus-specification.sgml: minimal semantic fix
2959 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2965 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2968 * dbus/dbus-break-loader.c:
2970 * test/break-loader.c:
2971 Move dbus-break-loader to test/ and rename it to break-loader.
2973 2003-02-02 Havoc Pennington <hp@pobox.com>
2975 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2976 for code to manage cookies in your home directory
2978 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2980 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2981 to authenticate, then disconnect the client.
2983 2003-02-03 Alexander Larsson <alexl@redhat.com>
2985 * dbus/dbus-message.c (dbus_message_append_fields):
2988 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2990 * doc/dbus-specification.sgml:
2991 Update address format section.
2993 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2996 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2997 (message_handler), (new_connection_callback), (loop_quit),
3001 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3003 * bus/driver.c: (bus_driver_handle_service_exists):
3004 Simplify the code a bit.
3006 * dbus/dbus-bus.c: (dbus_bus_service_exists):
3009 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3012 Add libdbus-daemon.la and link to it.
3014 2003-02-01 James Willcox <jwillcox@gnome.org>
3016 * bus/driver.c: (bus_driver_handle_own_service):
3017 Actually include the service reply code in the message.
3019 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3021 * bus/driver.c: (bus_driver_handle_service_exists):
3022 Don't unref the incoming message.
3024 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3026 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3028 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3030 * dbus/dbus-server.c: (dbus_server_listen):
3031 * dbus/dbus-transport.c: (_dbus_transport_open):
3032 ifdef out the calls to the debug transport and server.
3034 2003-02-02 Alexander Larsson <alexl@redhat.com>
3036 * dbus/dbus-watch.c (dbus_watch_get_flags):
3037 Add note in the docs that ERROR or HANGUP won't be returned
3038 and are assumed always on.
3040 * glib/dbus-gmain.c (add_watch):
3041 Always add IO_ERR | IO_HUP
3043 * dbus/dbus-message.h:
3044 Add semicolon after dbus_message_iter_get_string_array().
3045 Makes qt code build again
3047 2003-02-01 Anders Carlsson <andersca@codefactory.se>
3049 * bus/driver.c: (create_unique_client_name),
3050 (bus_driver_handle_hello):
3051 Don't take a name, just use a numeric id to identify
3055 * dbus/dbus-bus.c: (dbus_bus_register_client),
3056 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3058 Add new convenience functions for communicating with the bus.
3060 * dbus/dbus-message.h:
3062 * dbus/dbus-protocol.h:
3065 2003-02-01 Alexander Larsson <alexl@redhat.com>
3067 * dbus/dbus-message.c (dbus_message_append_fields):
3068 Add some more doc comments.
3070 2003-02-01 Havoc Pennington <hp@pobox.com>
3072 * dbus/dbus-break-loader.c (randomly_modify_length): change
3073 a 4-byte value in the message as if it were a length
3075 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3076 execute bit on saved files
3078 2003-02-01 Havoc Pennington <hp@pobox.com>
3080 * dbus/dbus-break-loader.c (main): new program to find messages
3081 that break the loader.
3083 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3084 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3086 * dbus/dbus-string.c (_dbus_string_set_byte): new
3088 2003-01-31 Havoc Pennington <hp@pobox.com>
3090 * dbus/dbus-message.c: refactor the test code to be more general,
3091 in preparation for writing a "randomly permute test cases to
3092 try to break the loader" program.
3094 2003-01-31 Havoc Pennington <hp@pobox.com>
3096 * doc/dbus-specification.sgml: work on the specification
3098 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
3099 the protocol version of the message.
3101 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
3102 no longer specifies that.
3103 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
3106 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3107 "break" for DBUS_TYPE_NIL, remove @todo
3109 2003-01-31 Havoc Pennington <hp@pobox.com>
3111 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
3112 just set_is_error/get_is_error as this is a commonly-used
3113 function, and write docs.
3115 2003-01-31 Anders Carlsson <andersca@codefactory.se>
3117 * dbus/dbus-address.c: (dbus_address_entry_free):
3118 Free key and value lists.
3120 * dbus/dbus-internals.c: (_dbus_type_to_string):
3121 Add the types we didn't have.
3123 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3124 (_dbus_marshal_validate_arg):
3127 * dbus/dbus-message.c: (dbus_message_set_sender):
3128 Remove todo about being able to set sender to NULL.
3130 (dbus_message_set_is_error_reply),
3131 (dbus_message_get_is_error_reply):
3132 * dbus/dbus-message.h:
3135 * dbus/dbus-protocol.h:
3136 Add error reply flag.
3138 * test/data/valid-messages/opposite-endian.message:
3139 Add NIL type to test.
3141 2003-01-31 Havoc Pennington <hp@pobox.com>
3143 * doc/dbus-specification.sgml: fully specify the header. Add
3144 flags and major protocol version, and change header/body len to
3147 * dbus/dbus-message-builder.c (append_saved_length): append length
3150 * dbus/dbus-message.c (dbus_message_create_header): change header
3151 length and body length to unsigned. Add the new fields from the
3153 (_dbus_message_loader_return_buffer): unsigned header/body len
3155 2003-01-30 Havoc Pennington <hp@pobox.com>
3157 * dbus/dbus-auth.c: rework to use only REJECTED, no
3160 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
3161 use REJECTED, suggested by Mark McLoughlin
3163 2003-01-30 Havoc Pennington <hp@pobox.com>
3165 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3166 a better way to report errors here. e.g. "unix address lacks
3167 path" or something. also "no such file" when the path doesn't
3170 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3172 (dbus_parse_address): add @todo about documenting address format,
3173 and allowing , and ; to be escaped
3175 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3178 Add dbus-address.[ch]
3180 * dbus/dbus-address.c: (dbus_address_entry_free),
3181 (dbus_address_entries_free), (create_entry),
3182 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3183 (dbus_parse_address), (_dbus_address_test):
3184 * dbus/dbus-address.h:
3185 New files for dealing with address parsing.
3187 * dbus/dbus-connection.c:
3188 Document timeout functions.
3190 * dbus/dbus-message.c:
3191 Document dbus_message_new_from_message.
3193 * dbus/dbus-server-debug.c:
3196 * dbus/dbus-server.c: (dbus_server_listen):
3197 Parse address and use correct server implementation.
3199 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3200 * dbus/dbus-string.h:
3201 New function with test.
3203 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3207 * dbus/dbus-transport-debug.c:
3210 * dbus/dbus-transport.c: (_dbus_transport_open):
3211 Parse address and use correct transport implementation.
3213 2003-01-30 Havoc Pennington <hp@pobox.com>
3215 * dbus/dbus-message.c: use message->byte_order instead of
3216 DBUS_COMPILER_BYTE_ORDER throughout.
3217 (dbus_message_create_header): pad header to align the
3218 start of the body of the message to 8-byte boundary
3220 * dbus/dbus-marshal.h: make all the demarshalers take const
3221 DBusString arguments.
3223 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3224 validate message args here, so we don't have to do slow validation
3225 later, and so we catch bad messages as they are incoming. Also add
3226 better checks on header_len and body_len. Also fill in
3229 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3230 implemented properly)
3231 (_dbus_string_validate_nul): new function to check all-nul
3233 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3234 get_arg_end_pos and remove all validation
3235 (_dbus_marshal_validate_arg): actually do validation here.
3237 2003-01-29 Havoc Pennington <hp@pobox.com>
3239 * dbus/dbus-message.c (check_message_handling): fix assertion
3240 failure on set_client_serial
3242 2003-01-28 Havoc Pennington <hp@pobox.com>
3244 * dbus/dbus-server-debug.c: Add doc section comments
3246 * dbus/dbus-transport-debug.c: add doc section comments
3248 2003-01-28 Havoc Pennington <hp@redhat.com>
3250 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3251 the reverse order from how I had it
3252 (_dbus_string_base64_encode): reverse encoding order. I was
3253 basically byteswapping everything during encoding.
3255 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3257 * dbus/dbus-connection-internal.h:
3258 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3259 (_dbus_connection_remove_timeout):
3260 Add functions for adding and removing timeouts.
3262 * dbus/dbus-message.c: (dbus_message_new_from_message):
3263 Add new function that takes a message and creates an exact
3264 copy of it, but with the refcount set to 1.
3265 (check_message_handling):
3268 * dbus/dbus-server-protected.h:
3269 * dbus/dbus-server.c: (_dbus_server_init_base),
3270 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3271 (dbus_server_set_timeout_functions):
3272 (_dbus_server_remove_timeout):
3273 New functions so that a server can add and remove timeouts.
3275 (dbus_server_listen):
3276 Add commented out call to dbus_server_debug_new.
3278 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3279 Actually set the handler, doh.
3281 * dbus/dbus-transport.c: (_dbus_transport_open):
3282 Add commented out call to dbus_transport_debug_client_new.
3285 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3287 2003-01-28 Havoc Pennington <hp@pobox.com>
3289 * dbus/dbus-message.c (check_message_handling): function to check
3290 on the loaded message, iterates over it etc.
3292 2003-01-28 Havoc Pennington <hp@pobox.com>
3294 * test/Makefile.am (dist-hook): fix make distdir
3296 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3298 2003-01-27 Havoc Pennington <hp@pobox.com>
3300 * dbus/dbus-mempool.c (time_for_size): replace printf with
3303 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3304 empty lines; fix the SAVE_LENGTH stuff to be
3305 START_LENGTH/END_LENGTH so it actually works; couple other
3308 * test/Makefile.am (dist-hook): add dist-hook for .message files
3310 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3311 can be constant or locked.
3312 (_dbus_string_free): allow freeing a const string as
3315 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3317 * dbus/dbus-test-main.c (main): take an argument which is the
3318 directory containing test data
3320 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3321 argument to this and load all the messages in test/data/
3322 checking that they can be loaded or not loaded as appropriate.
3324 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3326 * bus/dispatch.c: (bus_dispatch_message_handler):
3327 Dispatch messages sent to services.
3329 * bus/driver.c: (bus_driver_send_service_deleted),
3330 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3331 (bus_driver_send_service_acquired):
3332 Add helper functions for sending service related messages.
3334 (bus_driver_send_welcome_message):
3335 Send HELLO_REPLY instead of WELCOME.
3337 (bus_driver_handle_list_services):
3338 Send LIST_SERVICES_REPLY instead of SERVICES.
3340 (bus_driver_handle_own_service),
3341 (bus_driver_handle_service_exists):
3342 New message handlers.
3344 (bus_driver_handle_message):
3345 Invoke new message handlers.
3347 (bus_driver_remove_connection):
3348 Don't remove any services here since that's done automatically
3349 by bus_service_remove_owner now.
3352 New function signatures.
3354 * bus/services.c: (bus_service_add_owner):
3355 Send ServiceAcquired message if we're the only primary owner.
3357 (bus_service_remove_owner):
3358 Send ServiceAcquired/ServiceLost messages.
3360 (bus_service_set_prohibit_replacement),
3361 (bus_service_get_prohibit_replacement):
3362 Functions for setting prohibit replacement.
3364 (bus_service_has_owner):
3365 New function that checks if a connection is in the owner queue of
3369 Add new function signatures.
3371 * dbus/dbus-list.c: (_dbus_list_test):
3372 Add tests for _dbus_list_remove_last and traversing the list backwards.
3375 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3376 go any further, so return NULL then.
3378 * dbus/dbus-protocol.h:
3379 Add new messages, service flags and service replies.
3381 2003-01-26 Havoc Pennington <hp@pobox.com>
3383 * dbus/dbus-message-builder.c: implement, completely untested.
3385 * test/data/*: add data to be used in testing.
3386 ".message" files are our simple loadable text format.
3387 ".message-raw" will be binary dumps of messages.
3389 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3391 2003-01-26 Havoc Pennington <hp@pobox.com>
3393 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3395 * dbus/dbus-errors.c (dbus_result_to_string): add
3398 * dbus/dbus-message-builder.c: new file, will contain code to load
3399 up messages from files. Not implemented yet.
3401 2003-01-26 Havoc Pennington <hp@pobox.com>
3403 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3404 the sender by setting to NULL
3406 2003-01-26 Havoc Pennington <hp@pobox.com>
3408 The unit tests pass, but otherwise untested. If it breaks, the
3409 tests should have been better. ;-)
3411 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3414 * dbus/dbus-message.c: redo everything so we maintain
3415 message->header as the only copy of the various fields.
3416 This avoids the possibility of out-of-memory in some cases,
3417 for example dbus_message_lock() can't run out of memory anymore,
3418 and avoids extra copying. Figured I may as well go ahead and do
3419 this since it was busted for dbus_message_lock to not return
3420 failure on OOM, and dbus_message_write_header was totally
3421 unchecked for OOM. Also fixed some random other bugs.
3423 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3424 that strings are nul-terminated. Also, end_pos can be equal
3425 to string length just not greater than, I think.
3426 (_dbus_marshal_set_int32): new function
3427 (_dbus_marshal_set_uint32): new function
3428 (_dbus_marshal_set_string): new function
3430 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3431 a warning, init timeout_list to NULL
3432 (dbus_connection_send_message): don't use uninitialized variable
3435 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3437 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3439 * bus/driver.c: (bus_driver_handle_hello),
3440 (bus_driver_send_welcome_message):
3443 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3445 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3446 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3447 (dbus_connection_unref):
3448 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3449 * dbus/dbus-message.c: (dbus_message_unref),
3452 (dbus_message_get_fields):
3453 Remove debugging printout.
3455 (_dbus_message_loader_return_buffer):
3456 Don't store the header string.
3458 (_dbus_message_test):
3461 2003-01-26 Richard Hult <rhult@codefactory.se>
3463 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3464 the file descriptor list, since it can change under us.
3466 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3468 * glib/dbus-gmain.c: (dbus_connection_prepare),
3469 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3470 (remove_watch), (dbus_connection_hookup_with_g_main):
3471 Rewrite the glib handling to use its own GSource instead of a
3472 GIOChannel so we can catch messages put in the queue while waiting
3475 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3478 * bus/connection.c: (connection_disconnect_handler),
3479 (connection_watch_callback), (bus_connection_setup):
3480 * bus/dispatch.c: (send_one_message),
3481 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3482 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3484 * bus/driver.c: (bus_driver_send_service_deleted),
3485 (bus_driver_send_service_created), (bus_driver_handle_hello),
3486 (bus_driver_send_welcome_message),
3487 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3488 (bus_driver_handle_message):
3490 Refactor code, put the message dispatching in its own file. Use
3491 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3494 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3496 * dbus/dbus-internals.h:
3497 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3499 * dbus/dbus-message.c: (dbus_message_get_sender):
3500 * dbus/dbus-message.h:
3501 Implement dbus_message_get_sender.
3503 * dbus/dbus-protocol.h:
3504 Add message and service defines.
3506 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3508 * dbus/dbus-connection.c: (dbus_connection_send_message):
3509 * dbus/dbus-message-internal.h:
3510 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3511 (dbus_message_write_header):
3512 Remove _dbus_messag_unlock and don't set the client serial on a
3513 message if one already exists.
3515 2003-01-24 Havoc Pennington <hp@pobox.com>
3517 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3520 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3523 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3525 * dbus/dbus-list.c: (alloc_link), (free_link):
3526 Use a memory pool for the links.
3528 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3530 * bus/connection.c: (bus_connection_foreach):
3532 Add new bus_connection_foreach function.
3534 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3535 Add function that broadcasts a message to all clients.
3537 (bus_driver_send_service_created), (bus_driver_handle_hello),
3538 (bus_driver_send_welcome_message),
3539 (bus_driver_handle_list_services), (bus_driver_message_handler):
3540 Implement functions that take care of listing services, and notifying
3541 clients when new services are created.
3543 * bus/services.c: (bus_services_list):
3545 Add new function that returns an array of strings with the currently
3546 registered services.
3549 * glib/dbus-gmain.c:
3550 Update copyright year.
3552 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3554 * dbus/dbus-connection.c: (dbus_connection_send_message):
3555 Unlock the message in case it was sent earlier.
3557 (dbus_connection_send_message_with_reply_and_block):
3558 Remove the reply message from the list.
3560 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3561 Set array_len and new_pos correctly.
3563 (_dbus_marshal_test):
3564 Remove debug output.
3566 * dbus/dbus-message-internal.h:
3567 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3568 New function that returns the reply serial.
3570 (_dbus_message_unlock):
3571 New function that unlocks a message and resets its header.
3573 (dbus_message_append_string_array),
3574 (dbus_message_get_fields_valist),
3575 (dbus_message_iter_get_field_type),
3576 (dbus_message_iter_get_string_array),
3577 (dbus_message_get_fields),
3578 (dbus_message_append_fields_valist):
3579 Handle string arrays.
3581 (dbus_message_set_sender):
3582 Make this function public since the bus daemon needs it.
3584 (decode_header_data):
3585 Set the reply serial to -1 initially.
3587 * dbus/dbus-message.h:
3588 Add dbus_message_set_sender.
3590 2003-01-24 Havoc Pennington <hp@pobox.com>
3592 * doc/dbus-specification.sgml: add some stuff
3594 2003-01-22 Havoc Pennington <hp@pobox.com>
3596 * doc/dbus-specification.sgml: Start to document the protocol.
3598 2003-01-22 Havoc Pennington <hp@pobox.com>
3600 * dbus/dbus-connection.c
3601 (dbus_connection_send_message_with_reply_and_block): add some @todo
3603 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3605 2003-01-21 Havoc Pennington <hp@pobox.com>
3607 (patch untested because can't compile)
3609 * bus/driver.c (create_unique_client_name): make this function
3610 never recycle client names. Also, caller should initialize
3613 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3615 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3617 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3618 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3619 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3620 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3621 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3622 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3623 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3624 * dbus/dbus-marshal.h:
3625 * dbus/dbus-protocol.h:
3626 Add support for marshalling and demarshalling integer, double
3629 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3634 * bus/connection.c: (connection_disconnect_handler):
3635 Remove the connection from the bus driver's list.
3637 (connection_watch_callback): Dispatch messages.
3639 (free_connection_data): Free connection name.
3641 (bus_connection_setup): Add connection to the bus driver's list.
3642 (bus_connection_remove_owned_service):
3643 (bus_connection_set_name), (bus_connection_get_name):
3644 Add functions for setting and getting the connection's name.
3647 Add function headers.
3649 * bus/driver.c: (create_unique_client_name),
3650 (bus_driver_handle_hello_message),
3651 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3652 (bus_driver_add_connection), (bus_driver_remove_connection):
3655 * bus/services.c: (bus_service_free):
3657 New file that handles communication and registreation with the bus
3660 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3662 * dbus/dbus-connection.c: (dbus_connection_send_message):
3663 Add a new client_serial parameter.
3665 (dbus_connection_send_message_with_reply):
3666 Remove a @todo since we've implemented the blocking function.
3668 (dbus_connection_send_message_with_reply_and_block):
3669 New function that sends a message and waits for a reply and
3670 then returns the reply.
3672 * dbus/dbus-connection.h:
3675 * dbus/dbus-errors.c: (dbus_result_to_string):
3676 * dbus/dbus-errors.h:
3677 Add new DBUS_RESULT.
3679 * dbus/dbus-message-internal.h:
3680 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3681 (_dbus_message_set_sender), (dbus_message_write_header),
3682 (dbus_message_new_reply), (decode_header_data),
3683 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3684 * dbus/dbus-message.h:
3685 Add new functions that set the reply serial and sender.
3686 Also marshal and demarshal them correctly and add test.
3688 * dbus/dbus-protocol.h:
3689 Add new DBUS_MESSAGE_TYPE_SENDER.
3692 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3693 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3694 (dbus_connection_hookup_with_g_main):
3695 * glib/test-dbus-glib.c: (main):
3696 Rewrite to use GIOChannel and remove the GSource crack.
3698 * test/echo-client.c: (main):
3699 * test/watch.c: (check_messages):
3700 Update for changed APIs
3702 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3704 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3706 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3707 Create a DBusTimeoutList.
3708 (dbus_connection_set_timeout_functions): Add new function to
3709 set timeout callbacks
3711 * dbus/dbus-connection.h: Add public DBusTimeout API.
3713 * dbus/dbus-message.c: (dbus_message_get_service):
3714 * dbus/dbus-message.h: New function.
3716 * dbus/dbus-server.c: Fix small doc typo.
3718 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3720 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3722 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3723 of the string, just as long as specified.
3725 2003-01-19 Havoc Pennington <hp@pobox.com>
3727 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3730 * dbus/dbus-server.c (dbus_server_set_max_connections)
3731 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3732 keep track of current number of connections, and add API for
3733 setting a max (but haven't implemented enforcing the max yet)
3735 2003-01-18 Havoc Pennington <hp@pobox.com>
3737 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3738 reading/writing if read_watch != NULL or write_watch != NULL.
3740 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3741 the message loader code to actually load message->header and
3742 message->body into the newly-created message.
3744 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3747 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3748 (dbus_connection_get_max_message_size)
3749 (dbus_connection_set_max_live_messages_size)
3750 (dbus_connection_get_max_live_messages_size): implement some
3751 resource limitation functions
3753 * dbus/dbus-resources.c: new file implementing some of the
3754 resource limits stuff
3756 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3757 missing docs, add @todo to handle OOM etc.
3759 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3762 2003-01-18 Havoc Pennington <hp@pobox.com>
3764 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3765 connection if it hasn't been already.
3767 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3768 replace with DisconnectFunction.
3770 2003-01-18 Havoc Pennington <hp@pobox.com>
3772 Building --disable-verbose-mode --disable-asserts --disable-tests
3773 cuts the library from 112K to 45K or so
3775 * configure.in: check for varargs macro support,
3776 add --enable-verbose-mode, --enable-asserts.
3778 * dbus/dbus-internals.h (_dbus_assert): support
3780 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3782 2003-01-18 Havoc Pennington <hp@pobox.com>
3784 * dbus/dbus-test.c: include config.h so that tests actually run
3786 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3787 so the failure mode when that assumption fails will be plenty
3790 2003-01-18 Havoc Pennington <hp@pobox.com>
3792 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3794 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3797 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3798 since we don't want to use those in make check
3800 2003-01-15 Havoc Pennington <hp@redhat.com>
3806 2003-01-15 Havoc Pennington <hp@redhat.com>
3808 * test/Makefile.am: fix so that test source code ends up in the
3809 distribution on make distcheck
3811 2003-01-15 Havoc Pennington <hp@redhat.com>
3817 2003-01-15 Havoc Pennington <hp@redhat.com>
3819 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3820 fix build when --disable-tests
3822 * Makefile.am (EXTRA_DIST): put HACKING in here
3824 * HACKING: document procedure for making a tarball release.
3826 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3828 * bus/connection.c: (connection_error_handler),
3829 (bus_connection_setup):
3830 * bus/main.c: (main):
3831 Make sure that the DBusConnectionData struct is NULLed
3832 out to prevent a segfault.
3834 * dbus/dbus-errors.c: (dbus_result_to_string):
3835 * dbus/dbus-errors.h:
3836 * dbus/dbus-message.c: (dbus_message_get_fields),
3837 (dbus_message_get_fields_valist), (_dbus_message_test):
3838 * dbus/dbus-message.h:
3839 Make dbus_message_get_fields return a result code so we can
3840 track invalid fields as well as oom.
3842 2003-01-11 Havoc Pennington <hp@pobox.com>
3844 * configure.in: change --enable-test/--enable-ansi action-if-given
3845 to enable_foo=$enableval instead of enable_foo=yes
3847 2003-01-08 Havoc Pennington <hp@pobox.com>
3849 * dbus/dbus-string.c (_dbus_string_align_length): new function
3851 * dbus/dbus-test-main.c: move main() for test app here
3853 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3854 symbol to run tests, because dbus-test isn't in the main
3857 Code review nitpicks.
3859 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3860 for people with narrow emacs ;-). Assert client_serial was filled
3861 in. Assert message->name != NULL.
3862 (dbus_message_append_fields): have "first_field_type" arg separate
3863 from va list, needed for C++ binding that also uses varargs IIRC
3864 and helps with type safety
3865 (dbus_message_new): add @todo about using DBusString to store
3866 service/name internally
3867 (dbus_message_new): don't leak ->service and ->name on OOM later
3869 (dbus_message_unref): free the service name
3870 (dbus_message_get_fields): same change to varargs
3871 i.e. first_field_type
3872 (_dbus_message_loader_return_buffer): assert that the message data
3873 is aligned (if not it's a bug in our code). Put in verbose griping
3874 about why we set corrupted = TRUE.
3875 (decode_header_data): add FIXME that char* is evil. Was going to
3876 add FIXME about evil locale-specific string.h strncmp, but just
3877 switched to wacky string-as-uint32 optimization. Move check for
3878 "no room for field name" above get_const_data_len() to avoid
3879 assertion failure in get_const_data_len if we have trailing 2
3880 bytes or the like. Check for service and name fields being
3881 provided twice. Don't leak service/name on error. Require field
3882 names to be aligned to 4 bytes.
3884 * dbus/dbus-marshal.c: move byte swap stuff to header
3885 (_dbus_pack_int32): uscore-prefix
3886 (_dbus_unpack_int32): uscore-prefix
3887 (_dbus_unpack_uint32): export
3888 (_dbus_demarshal_string): add @todo complaining about use of
3890 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3891 handling allowing corrupt data to go unchecked
3893 2003-01-08 Havoc Pennington <hp@redhat.com>
3895 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3896 to the select() as needed for authentication. (should be using
3897 _dbus_poll() not select, but for another day)
3899 * dbus/dbus.h: include dbus/dbus-protocol.h
3901 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3903 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3906 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3908 * dbus/dbus-internals.c: (_dbus_type_to_string):
3909 New function that returns a string describing a type.
3911 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3912 * dbus/dbus-marshal.h:
3913 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3914 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3915 (dbus_message_iter_get_byte_array):
3916 * dbus/dbus-message.h:
3917 Add new convenience functions for appending and getting message fields.
3918 Also add demarshalling routines for byte arrays.
3920 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3922 * dbus/dbus-connection-internal.h:
3923 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3924 (_dbus_connection_get_next_client_serial),
3925 (dbus_connection_send_message):
3926 * dbus/dbus-internals.h:
3927 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3928 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3929 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3930 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3931 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3932 (_dbus_verbose_bytes), (_dbus_marshal_test):
3933 * dbus/dbus-marshal.h:
3934 * dbus/dbus-message-internal.h:
3935 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3936 (dbus_message_write_header), (_dbus_message_lock),
3937 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3938 (dbus_message_get_name), (dbus_message_append_int32),
3939 (dbus_message_append_uint32), (dbus_message_append_double),
3940 (dbus_message_append_string), (dbus_message_append_byte_array),
3941 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3942 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3943 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3944 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3945 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3946 (decode_header_data), (_dbus_message_loader_return_buffer),
3947 (message_iter_test), (_dbus_message_test):
3948 * dbus/dbus-message.h:
3949 * dbus/dbus-protocol.h:
3950 * dbus/dbus-test.c: (main):
3952 * glib/test-dbus-glib.c: (message_handler), (main):
3953 * test/echo-client.c: (main):
3954 * test/watch.c: (check_messages):
3955 Make messages sendable and receivable for real.
3957 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3959 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3960 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3961 * dbus/dbus-message.c: (dbus_message_append_int32),
3962 (dbus_message_append_uint32), (dbus_message_append_double),
3963 (dbus_message_append_string), (dbus_message_append_byte_array):
3964 Handle OOM restoration.
3966 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3968 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3969 (_dbus_demarshal_string), (_dbus_marshal_test):
3970 * dbus/dbus-marshal.h:
3971 * dbus/dbus-message.c: (dbus_message_get_name),
3972 Document these functions.
3974 (dbus_message_append_int32), (dbus_message_append_uint32),
3975 (dbus_message_append_double), (dbus_message_append_string),
3976 (dbus_message_append_byte_array):
3977 * dbus/dbus-message.h:
3978 Add functions for adding message fields of different types.
3980 * dbus/dbus-protocol.h:
3981 Add the different types.
3983 2003-01-05 Havoc Pennington <hp@pobox.com>
3985 * bus/connection.c: implement routines for handling connections,
3986 first thing is keeping a list of owned services on each connection
3987 and setting up watches etc.
3989 * bus/services.c: implement a mapping from service names to lists
3992 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3994 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3995 to use static mutexes for global data
3997 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3998 collection of functions to set/get application-specific data
3999 on the DBusConnection.
4001 2003-01-04 Havoc Pennington <hp@pobox.com>
4003 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4004 (_dbus_poll): new function
4006 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4009 * bus/loop.c: initial code for the daemon main loop
4011 2003-01-04 Havoc Pennington <hp@pobox.com>
4013 * test/watch.c (error_handler): make it safe if the error handler
4014 is called multiple times (if we s/error handler/disconnect
4015 handler/ we should just guarantee it's called only once)
4017 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4018 error handler on disconnect (it's quite possible we should
4019 just change the error handler to a "disconnect handler," I'm
4020 not sure we have any other meaningful errors)
4022 * configure.in: check for getpwnam_r
4024 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4025 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4026 mechanism as in SASL spec, using socket credentials
4028 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4029 (_dbus_send_credentials_unix_socket): new function
4031 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4033 (_dbus_write): only check errno if <0 returned
4034 (_dbus_write_two): ditto
4036 2003-01-02 Anders Carlsson <andersca@codefactory.se>
4038 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4039 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4040 (_dbus_marshal_test):
4041 * dbus/dbus-marshal.h:
4042 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4043 to _dbus_marshal_utf8_string. Also fix some tests.
4045 2002-12-28 Harri Porten <porten@kde.org>
4047 * configure.in: added check for C++ compiler and a very cheesy
4048 check for the Qt integration
4050 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4052 * qt/Makefile.am: added
4054 * qt/.cvsignore: added
4056 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4057 latter, added #ifdef QT_THREAD_SUPPORT guard.
4059 * dbus/Makefile.am: added missing headers for make dist
4061 2002-12-28 Kristian Rietveld <kris@gtk.org>
4063 * dbus/Makefile.am: fixup export-symbols-regex.
4065 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4067 * acinclude.m4: Add this file and put the
4068 PKG_CHECK_MODULE macro in it.
4070 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4072 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4073 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4074 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4075 (_dbus_marshal_test):
4076 Make the demarshalling routines align the pos argument.
4077 Add string marshalling tests and fix the obvious bugs
4080 2002-12-26 Havoc Pennington <hp@pobox.com>
4082 * dbus/dbus-auth.c: fixes fixes fixes
4084 * dbus/dbus-transport-unix.c: wire up support for
4085 encoding/decoding data on the wire
4087 * dbus/dbus-auth.c (_dbus_auth_encode_data)
4088 (_dbus_auth_decode_data): append to target string
4089 instead of nuking it.
4091 2002-12-26 Havoc Pennington <hp@pobox.com>
4093 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4094 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4097 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4098 avoid swap_bytes() overhead (ignoring possible assembly stuff for
4099 now). Main point is because I wanted unpack_uint32 to implement
4101 (_dbus_verbose_bytes): new function
4103 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4105 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4106 mechanism to handle a corrupt message stream
4107 (_dbus_message_loader_new): fix preallocation to only prealloc,
4110 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4111 (_dbus_string_test): enhance tests for copy/move and fix the
4114 * dbus/dbus-transport-unix.c: Hold references in more places to
4115 avoid reentrancy problems
4117 * dbus/dbus-transport.c: ditto
4119 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4120 leak reference count in no-message case
4122 * test/watch.c (do_mainloop): handle adding/removing watches
4123 during iteration over the watches. Also, ref the connection/server
4124 stored on a watch, so we don't try to mangle a destroyed one.
4126 * dbus/dbus-transport-unix.c (do_authentication): perform
4129 * dbus/dbus-auth.c (get_state): add a state
4130 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4131 (_dbus_auth_get_unused_bytes): append the unused bytes
4132 to the passed in string, rather than prepend
4134 * dbus/dbus-transport.c (_dbus_transport_init_base): create
4135 the auth conversation DBusAuth
4137 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4138 (_dbus_transport_new_for_domain_socket): when creating a
4139 transport, pass in whether it's a client-side or server-side
4140 transport so we know which DBusAuth to create
4142 2002-12-03 Havoc Pennington <hp@pobox.com>
4144 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4145 _after_ finalizing the derived members
4146 (unix_connection_set): unref watch if we fail to add it
4148 * dbus/dbus-connection.c (dbus_connection_unref): delete the
4149 transport first, so that the connection owned by the
4150 transport will be valid as the transport finalizes.
4152 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4153 if necessary, and remove watches from the connection.
4155 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4157 2002-12-26 Anders Carlsson <andersca@codefactory.se>
4159 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4160 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4161 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4162 (_dbus_marshal_test):
4163 * dbus/dbus-marshal.h:
4164 Add string marshal functions and have the demarshal functions
4165 return the new position.
4167 2002-12-25 Havoc Pennington <hp@pobox.com>
4169 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
4170 it is a simple protocol that just maps directly to SASL.
4172 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4173 initial implementation, not actually used yet.
4175 * dbus/dbus-string.c (_dbus_string_find): new function
4176 (_dbus_string_equal): new function
4177 (_dbus_string_base64_encode): new function
4178 (_dbus_string_base64_decode): new function
4180 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4183 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4184 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4185 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4186 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4187 * dbus/dbus-marshal.h:
4188 * dbus/dbus-protocol.h:
4189 * dbus/dbus-test.c: (main):
4191 Add un-optimized marshalling/demarshalling routines.
4193 2002-12-25 Harri Porten <porten@kde.org>
4195 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4197 2002-12-24 Zack Rusin <zack@kde.org>
4199 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4200 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4203 2002-12-24 Havoc Pennington <hp@pobox.com>
4205 * glib/dbus-gthread.c: fix include
4207 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4208 I think glib API needs to change, though, as you don't
4209 want to use DBusMessageFunction, you want to use the
4210 DBusMessageHandler object. Probably
4211 dbus_connection_open_with_g_main_loop()
4212 and dbus_connection_setup_g_main_loop() or something like that
4213 (but think of better names...) that just create a connection
4214 that has watch/timeout functions etc. already set up.
4216 * dbus/dbus-connection.c
4217 (dbus_connection_send_message_with_reply): new function just to
4218 show how the message handler helps us deal with replies.
4220 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4222 * dbus/dbus-string.c (_dbus_string_test): free a string that
4225 * dbus/dbus-hash.c: use memory pools for the hash entries
4226 (rebuild_table): be more paranoid about overflow, and
4227 shrink table when we can
4228 (_dbus_hash_test): reduce number of sprintfs and write
4229 valid C89. Add tests for case where we grow and then
4230 shrink the hash table.
4232 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4234 * dbus/dbus-connection.c (dbus_connection_register_handler)
4235 (dbus_connection_unregister_handler): new functions
4237 * dbus/dbus-message.c (dbus_message_get_name): new
4239 * dbus/dbus-list.c: fix docs typo
4241 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4242 an object representing a handler for messages.
4244 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4247 * glib/dbus-gthread.c: (dbus_gthread_init):
4248 Don't use the gdbus prefix for public functions.
4250 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4254 Add GLib checks and fixup .pc files
4258 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4259 (gdbus_connection_check), (gdbus_connection_dispatch),
4260 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4261 (dbus_connection_gsource_new):
4262 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4263 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4264 * glib/test-dbus-glib.c: (message_handler), (main):
4267 2002-12-15 Harri Porten <porten@kde.org>
4269 * autogen.sh: check for libtoolize before attempting to use it
4271 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4274 * .cvsignore: ignore more stamp files
4276 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4278 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4279 without make install.
4281 2002-12-15 Havoc Pennington <hp@pobox.com>
4283 * dbus/dbus-threads.c: add thread stubs that a higher library
4284 layer can fill in. e.g. the GLib wrapper might fill them in with
4285 GThread stuff. We still need to use this thread API to
4286 thread-safe-ize the library.
4288 2002-12-12 Havoc Pennington <hp@pobox.com>
4290 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4291 below new interfaces and include fewer system headers.
4293 * dbus/dbus-sysdeps.c (_dbus_read): new function
4294 (_dbus_write): new function
4295 (_dbus_write_two): new function
4296 (_dbus_connect_unix_socket): new function
4297 (_dbus_listen_unix_socket): new function
4299 * dbus/dbus-message-internal.h: change interfaces to use
4302 2002-12-11 Havoc Pennington <hp@pobox.com>
4304 * dbus/dbus-types.h: add dbus_unichar
4306 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4308 * dbus/dbus-connection.c (dbus_connection_send_message): return
4311 * dbus/dbus-transport.c: include dbus-watch.h
4313 * dbus/dbus-connection.c: include dbus-message-internal.h
4315 * HACKING: add file with coding guidelines stuff.
4317 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4318 handling here, for security purposes (as in vsftpd). Not actually
4319 using this class yet.
4321 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4322 system/libc usage here, as in vsftpd, for ease of auditing (and
4323 should also simplify portability). Haven't actually moved all the
4324 system/libc usage into here yet.
4326 2002-11-25 Havoc Pennington <hp@pobox.com>
4328 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4329 always print the first verbose message.
4331 2002-11-24 Havoc Pennington <hp@pobox.com>
4333 * test/echo-client.c, test/echo-server.c: cheesy test
4336 * configure.in (AC_CHECK_FUNCS): check for writev
4338 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4341 * dbus/dbus-list.c (_dbus_list_foreach): new function
4343 * dbus/dbus-internals.c (_dbus_verbose): new function
4345 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4346 representing a server that listens for connections.
4348 * dbus/.cvsignore: create
4350 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4351 public API for reporting errors
4353 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4354 public object representing a connection that
4355 sends/receives messages. (Same object used for
4356 both client and server.)
4358 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4359 Basic abstraction for different kinds of stream
4360 that we might read/write messages from.
4362 2002-11-23 Havoc Pennington <hp@pobox.com>
4364 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4367 * dbus/dbus-test.c (main): add list test, and include
4368 dbus-test.h as intended
4370 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4371 (_dbus_hash_table_remove_int): return value indicates
4372 whether the entry existed to remove
4374 * dbus/dbus-list.c: add linked list utility class,
4377 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4380 2002-11-23 Havoc Pennington <hp@pobox.com>
4382 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4383 DBUS_END_DECLS to nothing, that should fix this once and for all
4385 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4387 * dbus/dbus-message.c, dbus/dbus-hash.c:
4388 add some missing @brief
4390 2002-11-23 Havoc Pennington <hp@pobox.com>
4392 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4393 to avoid confusing Doxygen
4395 * dbus/dbus-hash.c: @} not }@
4397 * dbus/dbus-message.c (struct DBusMessage): split out
4400 2002-11-23 Havoc Pennington <hp@pobox.com>
4402 * configure.in: pile on more warning flags if using gcc
4404 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4405 to document static functions
4407 * configure.in: add summary to end of configure so it
4408 looks nice and attractive
4410 * dbus/dbus-hash.c: finish implementation and write unit
4413 * configure.in: add --enable-tests to enable unit tests
4415 * dbus/dbus-test.c: test program to run unit tests
4416 for all files in dbus/*, initially runs a test for
4419 * dbus/dbus-internals.h: file to hold some internal utility stuff
4421 2002-11-22 Havoc Pennington <hp@redhat.com>
4423 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4424 "ported" away from Tcl
4426 * dbus/dbus-types.h: header for types such as dbus_bool_t
4428 2002-11-22 Havoc Pennington <hp@redhat.com>
4430 * dbus/dbus.h: fixups for doc warnings
4432 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4434 (QUIET): make it quiet so we can see warnings
4436 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4438 2002-11-22 Havoc Pennington <hp@redhat.com>
4440 * Makefile.am: include "Doxyfile" target in all-local
4442 * configure.in: generate the Doxyfile
4444 * Doxyfile.in: move Doxyfile here, so we can use
4445 configure to generate a Doxyfile with the right
4448 2002-11-22 Havoc Pennington <hp@redhat.com>
4450 * dbus/dbus-message.c: move inline docs into .c file
4452 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4453 so all docs are under doc/
4454 (MAN_EXTENSION): generate man pages. Use extension
4455 ".3dbus" which matches ".3qt" on my system,
4456 I guess this is OK, I don't know really.
4457 (FILE_PATTERNS): look for .c files not .h, makes sense
4460 2002-11-22 Havoc Pennington <hp@pobox.com>
4462 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4463 because any app can be a server, and any app can be a client,
4464 the bus is a special kind of server.
4466 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4468 * Doxyfile : adding. Still needs Makefile rules to be generated
4469 automatically (just run "doxygen" in the toplevel dir for now to
4472 * dbus/dbus-message.h : Adding sample docs (javadoc since
4473 resembles gtk-doc a little more)
4475 * dbus/dbus.h : Adding sample docs
4477 2002-11-21 Havoc Pennington <hp@redhat.com>
4479 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4480 so we can allow ourselves to include files directly,
4481 instead of having to use dbus.h
4483 * dbus/dbus.h: fill in
4485 * dbus/dbus-message.h: sketch out a sample header file.
4486 Include griping if you include it directly instead of
4489 * dbus/dbus-macros.h: new file with macros for extern "C",
4490 TRUE/FALSE, NULL, etc.
4492 * doc/file-boilerplate.c: put include guards in here
4494 2002-11-21 Havoc Pennington <hp@redhat.com>
4496 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4498 * COPYING: include the GPL as well, and license code
4499 under both AFL and GPL.
4501 2002-11-21 Havoc Pennington <hp@redhat.com>
4503 * acconfig.h: get rid of this
4505 * autogen.sh (run_configure): add --no-configure option
4507 * configure.in: remove AC_ARG_PROGRAM to make
4508 autoconf complain less. add AC_PREREQ.
4509 add AC_DEFINE third arg.
4511 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4514 Fix references so we can distcheck.
4516 2002-11-21 Havoc Pennington <hp@redhat.com>
4518 * Initial module creation