1 2003-04-20 Havoc Pennington <hp@pobox.com>
3 * doc/dbus-specification.sgml: document the restrictions on
4 message and service names
6 2003-04-22 Havoc Pennington <hp@redhat.com>
8 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
9 support, and do some code cleanups to share more code and
10 speed up array marshal/demarshal.
12 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
14 * configure.in: generate dbus-arch-deps.h
16 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
19 2003-04-22 Havoc Pennington <hp@redhat.com>
21 * test/data/valid-messages/opposite-endian.message: fix test
22 to use proper type for rply field
24 * test/data/invalid-messages: add tests for below validation
26 * dbus/dbus-message.c (decode_header_data): validate field types,
27 and validate that named fields are valid names
28 (decode_name_field): consider messages in the
29 org.freedesktop.Local. namespace to be invalid.
31 * dbus/dbus-string.c (_dbus_string_validate_name): new
33 2003-04-19 Havoc Pennington <hp@pobox.com>
35 * bus/driver.c (bus_driver_handle_hello): check limits and
36 return an error if they are exceeded.
38 * bus/connection.c: maintain separate lists of active and inactive
39 connections, and a count of each. Maintain count of completed
40 connections per user. Implement code to check connection limits.
42 * dbus/dbus-list.c (_dbus_list_unlink): export
44 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
45 number of bytes in the message queue for a connection
47 2003-04-18 Havoc Pennington <hp@pobox.com>
49 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
51 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
54 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
55 on realloc be sure to update the pointer in the keyring
57 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
58 offset to avoid writing to unallocated memory
60 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
61 try the next mechanism, so we properly handle OOM
63 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
65 (_dbus_keyring_new): fix OOM bug
66 (_dbus_keyring_new_homedir): always set error; impose a maximum
67 number of keys we'll load from the file, mostly to speed up the
68 test suite and make its OOM checks more useful, but also for
71 * dbus/dbus-auth.c (process_error_server): reject authentication
72 if we get an error from the client
73 (process_cancel): on cancel, send REJECTED, per the spec
74 (process_error_client): send CANCEL if we get an error from the
77 2003-04-18 Havoc Pennington <hp@pobox.com>
79 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
82 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
85 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
86 about DBUS_TEST_HOMEDIR once
88 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
91 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
92 config file so we test the right thing
94 Throughout: assorted docs improvements
96 2003-04-18 Havoc Pennington <hp@pobox.com>
98 * glib/dbus-gmain.c: adapt to watch changes
100 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
102 * dbus/dbus-server.h: remove dbus_server_handle_watch
104 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
106 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
107 like DBusTimeout, so we don't need dbus_connection_handle_watch
110 2003-04-17 Havoc Pennington <hp@redhat.com>
112 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
113 database usage so it all goes via the DBusUserDatabase cache.
115 2003-04-17 Havoc Pennington <hp@redhat.com>
117 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
118 there was an OOM watch we skipped, we always return TRUE so we
119 iterate again to have a look at it again. Fixes test suite hang.
120 Code rearrangement also lets us lose some memset and only iterate
123 * bus/driver.c (bus_driver_handle_message): sense of test for
126 2003-04-16 Havoc Pennington <hp@pobox.com>
128 * doc/dbus-specification.sgml: make spec say serials are unsigned
130 * dbus/dbus-message.h: change message serials to unsigned
132 * dbus/dbus-connection.c: adapt to message serials being unsigned
134 2003-04-15 Havoc Pennington <hp@pobox.com>
136 * bus/bus.c: create and keep around a shared DBusUserDatabase
139 * bus/connection.c (bus_connection_get_groups): don't cache
140 groups for user in the connection object, since user database
141 object now does that.
143 2003-04-16 Havoc Pennington <hp@redhat.com>
145 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
146 list of size counters
147 (_dbus_message_loader_putback_message_link): put back a popped link
149 * dbus/dbus-connection.c
150 (dbus_connection_set_max_live_messages_size): rename
152 (dbus_connection_get_outgoing_size): get size of outgoing
154 (_dbus_connection_set_connection_counter): remove this cruft
156 2003-04-14 Havoc Pennington <hp@redhat.com>
158 * dbus/dbus-userdb.c: user database abstraction, mostly to get
159 caching, but at some point we might want to be able to use a
162 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
163 SHA1 conf file to test the sha1 auth mechanism, since the regular
164 test always uses EXTERNAL when available.
167 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
168 add conf file that requires use of sha1 auth
170 2003-04-13 Havoc Pennington <hp@pobox.com>
172 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
173 from Philip Blundell to send messages and monitor them.
175 2003-04-13 Havoc Pennington <hp@pobox.com>
177 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
180 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
183 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
184 fix to only recover unused bytes if we're already authenticated
185 (_dbus_transport_get_is_authenticated): fix to still mark us
186 authenticated if there are unused bytes.
188 * bus/dispatch.c: implement security policy checking
190 * bus/connection.c (bus_transaction_send_from_driver): new
192 * bus/bus.c (bus_context_check_security_policy): new
194 * bus/dispatch.c (send_service_nonexistent_error): delete this,
195 now we just set the DBusError and it gets converted to an error
198 * bus/connection.c (allow_user_function): enable code using actual
199 data from the config file
201 * bus/policy.c (list_allows_user): handle wildcard rules for
202 user/group connection perms
204 2003-04-13 Havoc Pennington <hp@pobox.com>
206 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
208 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
210 * bus/policy.c (bus_policy_append_mandatory_rule)
211 (bus_policy_append_default_rule, bus_policy_append_user_rule)
212 (bus_policy_append_group_rule): new functions
214 2003-04-12 Havoc Pennington <hp@pobox.com>
216 * bus/config-parser.c (bus_config_parser_new): fix a memleak
218 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
219 the pid/gid/uid, just for paranoia.
221 * test/break-loader.c (randomly_do_n_things): find a byte
222 containing a type code, and randomly change it to a different
225 2003-04-12 Havoc Pennington <hp@pobox.com>
227 * bus/policy.h: change BusPolicy to be the thing from the config
228 file, and rename old BusPolicy to BusClientPolicy
230 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
231 match change in how policy works
233 * dbus/dbus-internals.h: mark assert_not_reached as
234 __attribute((noreturn))__
236 2003-04-11 Havoc Pennington <hp@redhat.com>
238 * doc/dbus-specification.sgml: fix a spot with the wrong name for
239 the broadcast service. Use boolean return for ServiceExists.
241 2003-04-11 Havoc Pennington <hp@redhat.com>
243 * configure.in: add another directory to look for qt in.
245 2003-04-11 Havoc Pennington <hp@redhat.com>
247 * AUTHORS: add Colin Walters
249 2003-04-11 Havoc Pennington <hp@redhat.com>
255 2003-04-11 Havoc Pennington <hp@redhat.com>
257 * bus/messagebus.in: remove pid file when stopping the
258 message bus, since the bus won't have privileges to remove it
261 2003-04-11 Havoc Pennington <hp@redhat.com>
263 * bus/bus.c (bus_context_new): move credentials change after
266 2003-04-11 Havoc Pennington <hp@pobox.com>
268 * test/decode-gcov.c: add "below average functions" to the
269 coverage report, and change how some of the code works.
271 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
272 not in the coverage stats.
274 * test/test-service.c (main): use _dbus_verbose not fprintf in a
275 couple places so running the test suite doesn't result in megaspam.
277 2003-04-11 Havoc Pennington <hp@pobox.com>
279 * bus/dispatch.c (check_existent_service_activation): accept a no
280 memory error in a place we didn't before
282 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
283 in case the first one failed," since the test suite is less
286 2003-04-10 Havoc Pennington <hp@pobox.com>
288 * bus/dispatch.c (check_segfault_service_activation): add test
289 for launching an executable that just crashes.
291 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
292 don't leave a million cores. We'll see how portable this is.
294 2003-04-10 Havoc Pennington <hp@pobox.com>
296 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
297 the possible parent failures before we fork, so that we don't
298 fail to create a babysitter after creating the child.
300 * bus/activation.c (bus_activation_activate_service): kill child
301 if we don't successfully complete the activation.
303 2003-04-10 Havoc Pennington <hp@redhat.com>
305 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
306 the connection if it's disconnected
308 * bus/activation.c (bus_activation_service_created): use new
309 transaction features to roll back removal of pending activation if
310 we don't successfully create the service after all. Don't remove
311 pending activation if the function fails.
313 * dbus/dbus-list.c (_dbus_list_insert_before_link)
314 (_dbus_list_insert_after_link): new code to facilitate
317 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
318 new functionality, so we can preallocate the ability to insert
321 * bus/connection.c (bus_transaction_add_cancel_hook): new function
322 allowing us to put custom hooks in a transaction to be used for
323 cancelling said transaction
325 * doc/dbus-specification.sgml: add some discussion of secondary
326 service owners, and disallow zero-length service names
328 * bus/services.c (bus_registry_acquire_service): new function,
329 splits out part of bus_driver_handle_acquire_service() and fixes
330 a bug where we didn't remove the service doing the acquiring
331 from the secondary queue if we failed to remove the current owner
332 from the front of the queue.
334 2003-04-10 Alexander Larsson <alexl@redhat.com>
336 * doc/dbus-specification.sgml:
337 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
339 2003-04-10 Alexander Larsson <alexl@redhat.com>
344 Added files to cvsignore
346 * dbus/dbus-message.h:
347 * dbus/dbus-message.c: (dbus_message_iter_get_named):
348 Make get_named() take two out argument and return a boolean.
349 (dbus_message_iter_get_args_valist):
350 Update usage of get_named().
351 (dbus_message_iter_append_byte):
353 (dbus_message_iter_append_named)
355 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
358 2003-04-10 Alexander Larsson <alexl@redhat.com>
360 * dbus/dbus-marshal.[ch]:
361 Add array_type_pos argument to _dbus_marshal_validate_arg.
362 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
364 * dbus/dbus-message.[ch]:
365 Multi-dimensional arrays have full type specification in the
366 outermost array. Iter code re-arranged to handle this.
367 Added some more iter tests.
369 * doc/dbus-specification.sgml:
372 Update new array encoding description.
373 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
375 * test/data/invalid-messages/array-with-mixed-types.message:
376 * test/data/valid-messages/array-of-array-of-uint32.message:
377 Change to the new array format.
379 * test/data/invalid-messages/too-short-dict.message:
382 * test/data/valid-messages/recursive-types.message:
383 Fix up and extend test.
385 2003-04-10 Havoc Pennington <hp@pobox.com>
387 * bus/dispatch.c: lots of fixes
389 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
390 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
391 that was crack, broke the test service.
393 * dbus/dbus-transport.c (_dbus_transport_open): fix error
394 handling to avoid piling up errors if we get a failure on the
397 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
398 pid in assertion failures.
400 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
401 to some fixed size of file descriptor array. Don't return TRUE
402 anytime a timeout exists, that led to lots of busy loop silliness
405 2003-04-09 Havoc Pennington <hp@redhat.com>
407 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
408 I'd checked this in earlier but hadn't.
410 2003-04-09 Havoc Pennington <hp@redhat.com>
412 * bus/dispatch.c (bus_dispatch_test): get a bit further through
413 the activation test (man this is getting old!)
415 2003-04-09 Havoc Pennington <hp@redhat.com>
417 * test/test-utils.c: use dispatch status function to fix this up
419 * bus/connection.c (connection_watch_callback): don't dispatch
421 (connection_timeout_callback): don't dispatch from here
422 (bus_connections_setup_connection): set the dispatch status function
423 (bus_connection_disconnected): unset it
425 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
426 used to add a connection to be dispatched
427 (_dbus_loop_iterate): do the dispatching at the end of each
430 * dbus/dbus-connection.c
431 (dbus_connection_set_dispatch_status_function): new function
432 allowing us to fix up main loop usage
433 (_dbus_connection_last_unref): free all the various function
435 (dbus_connection_dispatch): call the DispatchStatusFunction
436 whenever this function returns
437 (dbus_connection_handle_watch): call DispatchStatusFunction
438 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
439 (reply_handler_timeout): call DispatchStatusFunction
440 (dbus_connection_flush): call DispatchStatusFunction
442 2003-04-09 Havoc Pennington <hp@redhat.com>
444 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
447 * bus/dispatch.c (check_service_activated): fix bug in test
449 * dbus/dbus-mainloop.c (check_timeout): fix this up
451 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
452 verbose output so we can sort out output from different processes,
453 e.g. in the activation case.
455 2003-04-08 Colin Walters <walters@gnu.org>
457 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
459 (bus_context_new): Set it.
460 (bus_context_unref): Use it to delete the pid file.
462 2003-04-08 Havoc Pennington <hp@redhat.com>
464 * test/data/invalid-messages/array-with-mixed-types.message:
465 regression test that fails for the moment
467 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
468 tests for convenience
470 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
471 array of nil, it broke things.
473 * test/data/invalid-messages/array-of-nil.message: regression test
475 * test/data/valid-messages/array-of-array-of-uint32.message:
476 happened to write this so added it to suite
478 2003-04-08 Havoc Pennington <hp@redhat.com>
480 * bus/driver.c (bus_driver_handle_acquire_service): init
481 retval/reply before checking name
483 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
484 recursion depth argument
486 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
487 in the public struct for future extension
489 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
492 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
495 * doc/dbus-specification.sgml: fix typo
497 2003-04-08 Alexander Larsson <alexl@redhat.com>
499 Implemented recursive types, named types and new-style iters
502 * glib/test-thread-client.c: (thread_func):
503 * glib/test-thread-server.c: (handle_test_message):
504 * test/test-service.c: (handle_echo):
513 * dbus/dbus-internals.c: (_dbus_type_to_string):
514 Update for new types.
516 * dbus/dbus-marshal.[ch]:
517 Implement recursive types and the new marshalling format.
518 Remove hardcoded dict marshalling.
521 * dbus/dbus-message-builder.c:
523 Remove references to old types
525 * dbus/dbus-message.[ch]:
526 New non-refcounted iter API that supports recursive iters.
527 Use iters for appending, including support for recursive
529 Add byte and named type support.
530 Update everything to new marshalling formats.
531 Add tests for new API.
533 * dbus/dbus-protocol.h:
534 Remove old array types.
535 Add types: BYTE, ARRAY, DICT, NAMED
537 * dbus/dbus-string.c:
538 * dbus/dbus-sysdeps.c:
539 Make parse_double locale safe.
541 * dbus/dbus-test-main.c:
547 * doc/dbus-specification.sgml:
550 * test/data/incomplete-messages/missing-body.message:
551 * test/data/invalid-messages/bad-boolean.message:
552 * test/data/invalid-messages/bad-boolean-array.message:
553 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
554 * test/data/invalid-messages/boolean-has-no-value.message-raw:
555 * test/data/invalid-messages/too-short-dict.message:
556 * test/data/valid-messages/dict-simple.message:
557 * test/data/valid-messages/dict.message:
558 * test/data/valid-messages/emptiness.message:
559 * test/data/valid-messages/lots-of-arguments.message:
560 * test/data/valid-messages/no-padding.message:
561 * test/data/valid-messages/recursive-types.message:
562 Add missing NAME fields
563 Fix up dicts & arrays
565 * test/data/invalid-messages/dict-with-nil-value.message:
566 Removed, this is not invalid anymore.
568 * test/data/valid-messages/recursive-types.message:
569 Add new test for deeply recursive types.
571 2003-04-07 Havoc Pennington <hp@pobox.com>
573 * bus/driver.c (bus_driver_handle_acquire_service): return an
574 error if you try to acquire a service that starts with ':'
576 2003-04-07 Havoc Pennington <hp@redhat.com>
578 * doc/dbus-specification.sgml: require that base service names
579 start with ':' and that the base service is created/deleted
580 as first and last things a connection does on the bus
582 * bus/dispatch.c (check_existent_service_activation): lots more
583 work on the activation test; it doesn't fully pass yet...
585 * test/test-service.c (main): fix so we don't memleak the
586 connection to the message bus
587 (filter_func): accept a message asking us to exit
589 2003-04-06 Havoc Pennington <hp@pobox.com>
591 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
594 * configure.in: fixes to Qt detection from Colin Walters
596 * doc/Makefile.am: Only remove generated docbook dirs if they
597 exist, from Colin Walters
599 * dbus/dbus-bus.c: change how we set well-known connections to
600 NULL, so that it works if a single connection is stored in
601 two well-known array slots.
603 * test/Makefile.am: remove a lot of stuff that isn't immediately
604 useful, it's in CVS history if we want it.
606 * test/test-service.c: use dbus-mainloop instead of that
609 2003-04-06 Havoc Pennington <hp@pobox.com>
611 * dbus/Makefile.am: split lists of sources into stuff that goes in
612 the library, util functions that go in the lib and are also used
613 elsewhere, and util functions that are used in tests/daemon but
616 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
617 here so it can be used in test binaries also
619 2003-04-06 Havoc Pennington <hp@pobox.com>
621 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
622 here in the parent process, so we can return an error if it
623 fails. Also, move some of the code into the child so the parent
624 is less hosed if we fail midway through.
626 * bus/bus.c (bus_context_new): move pidfile detection further up
627 in the function, before we start overwriting sockets and such.
629 * bus/messagebus.in: adjust this a bit, not sure if it will work.
631 * configure.in: add --with-system-pid-file and --with-system-socket
633 2003-04-06 Colin Walters <walters@verbum.org>
635 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
637 * bus/system.conf.in: Declare a pidfile.
639 * bus/bus.c (bus_context_new): Test for an existing pid file, and
640 create one (if appropriate).
642 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
643 (struct BusConfigParser) [pidfile]: New.
644 (element_type_to_name, merge_included, start_busconfig_child)
645 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
646 (bus_config_parser_unref): Free it.
647 (bus_config_parser_get_pidfile): New function.
649 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
651 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
653 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
655 * dbus/dbus-sysdeps.h: Prototype it.
657 2003-04-06 Havoc Pennington <hp@pobox.com>
659 * bus/bus.c (bus_context_new): print the address in here, rather
660 than in main(), because we need to do it before forking the daemon
662 * bus/dispatch.c (send_service_nonexistent_error): set the sender
663 on the service nonexistent error
665 * bus/driver.c (bus_driver_handle_acquire_service): set the
666 sender on the AcquireService reply
668 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
669 server also listen on a UNIX socket so services can connect to it.
671 2003-04-06 Havoc Pennington <hp@pobox.com>
673 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
674 so it detects deadlocks and also we actually init threads when
677 2003-04-06 Havoc Pennington <hp@pobox.com>
679 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
680 save the domain socket name, and unlink it when we disconnect the
681 server. Means that at least when we exit normally, we won't leave
682 a bunch of junk in /tmp
684 * dbus/dbus-transport-unix.c
685 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
686 memory management). (I was making a real change here but then
689 2003-04-06 Havoc Pennington <hp@pobox.com>
691 * bus/bus.c (bus_context_new): fix wrong handling of
692 server_data_slot_unref() in the error case.
694 * dbus/dbus-internals.h (_dbus_assert): change so it passes
695 "(condition) != 0" to _dbus_real_assert so that
696 "_dbus_assert (pointer)" doesn't cause a warning
698 * bus/main.c (main): accept --print-address option to print out
699 the message bus address
701 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
703 * dbus/dbus-transport.c (_dbus_transport_open): special error for
704 "tmpdir" option to unix: address on client side
706 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
709 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
710 we can use to create sockets in the test suite.
712 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
713 cleanly. To be used for testing.
715 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
717 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
719 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
720 handle trying to call this when there's no servers active
722 2003-04-05 Havoc Pennington <hp@pobox.com>
728 2003-04-05 Havoc Pennington <hp@pobox.com>
730 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
731 crash on startup. Need to get "try starting the daemon"
732 in the test suite I guess. ;-)
734 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
735 tracked the number of open connections; it's better done in
736 application-specific code as you want it to span all servers etc.
738 2003-04-05 Havoc Pennington <hp@pobox.com>
740 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
741 patch from Colin Walters
743 2003-04-05 Havoc Pennington <hp@pobox.com>
745 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
746 reality; in fact multiple mechanisms are allowed.
748 * dbus/dbus-internals.c (_dbus_real_assert)
749 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
750 _dbus_assert_not_reached() into functions, so that they don't show
751 up in basic block counts for test coverage, and don't use up as
752 much disk space. Does mean slower execution speed though, so
753 assumes --disable-asserts is the normal production case.
755 2003-04-05 Havoc Pennington <hp@pobox.com>
757 * test/Makefile.am (dist-hook): also dist *.in files
763 2003-04-05 Havoc Pennington <hp@pobox.com>
765 * dbus/dbus-string.c: docs warning
767 * dbus/dbus-spawn.c: missing docs
769 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
771 2003-04-05 Havoc Pennington <hp@pobox.com>
773 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
776 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
777 to -1 once we've reaped the babysitter
778 (_dbus_babysitter_handle_watch): do as much work as we can, not
781 * bus/activation.c: add code using DBusBabysitter so that we
782 handle it when a service fails to start up properly.
783 (bus_activation_service_created): don't remove the activation
784 entries as we go, just let them get removed when we free the pending
785 activation. Unref reply messages after sending them.
787 2003-04-05 Havoc Pennington <hp@pobox.com>
789 * test/decode-gcov.c (main): print per-directory stats in the report
791 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
793 2003-04-05 Havoc Pennington <hp@pobox.com>
795 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
797 * test/decode-gcov.c: hack up a little program to suck data
798 out of gcov files. Yes this is sort of silly.
800 * configure.in: define something in config.h and do an
801 AM_CONDITIONAL when gcov is enabled
803 2003-04-04 Havoc Pennington <hp@redhat.com>
805 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
806 return a "babysitter" object that is used to monitor the status of
807 the spawned process and reap it when required.
809 * test/test-segfault.c, test/test-exit.c,
810 test/test-sleep-forever.c: binaries that do various lame things,
811 used in the test suite.
813 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
815 2003-04-03 Havoc Pennington <hp@pobox.com>
817 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
818 in preparation for modifying it, dbus-sysdeps is getting
821 2003-04-03 Havoc Pennington <hp@redhat.com>
823 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
826 * bus/*.[hc]: adapt to mainloop change
828 2003-04-03 Havoc Pennington <hp@redhat.com>
830 * bus/activation.c (load_directory): fix up memleaks
831 (bus_activation_entry_free): free the entry
833 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
834 we get one from the message bus; fix memleaks.
836 * dbus/dbus-message.c (dbus_set_error_from_message): new function
838 2003-04-03 Havoc Pennington <hp@pobox.com>
840 * bus/config-parser.c (bus_config_parser_unref): free
841 list of mechanisms, bug discovered by test suite enhancements
842 (putting system.conf and session.conf into suite)
844 * test/Makefile.am, test/test-service.c: add placeholder for a
845 test service that we'll activate as part of test suite. Doesn't
848 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
849 setting NULL value, and use system malloc not dbus_malloc()
850 when we have unavoidable memleakage.
852 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
853 didn't work, and support DBUS_BUS_ACTIVATION.
855 * bus/activation.c (child_setup): pass our well-known bus type to
858 * bus/config-parser.c: support <type> to specify well-known type
860 * doc/dbus-specification.sgml: document the env variables to
861 locate well-known buses and find service activator
863 2003-04-02 Havoc Pennington <hp@redhat.com>
865 * test/Makefile.am (all-local): add a rule to copy tests to
866 builddir, so we can have generated tests. Use this to remove the
867 silly hack for testing system.conf and session.conf. Will use this
868 shortly to generate .service files pointing to test binaries.
870 2003-04-02 Havoc Pennington <hp@redhat.com>
872 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
873 current alloc and needed new length, not max of the doubled
874 allocation and needed new length. Also, when building tests,
875 don't do the double-allocation stuff, just realloc every time.
877 2003-04-02 Havoc Pennington <hp@redhat.com>
879 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
881 (_dbus_string_get_dirname): new
882 (_dbus_sysdeps_test): new
883 (_dbus_directory_open): include dirnames in error messages
885 * bus/config-parser.c: interpret <include> and <includedir> and
886 <servicedir> relative to config file location if the given
887 filename is not absolute.
889 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
891 2003-04-02 Havoc Pennington <hp@redhat.com>
893 * bus/connection.c (bus_transaction_send_error_reply): set sender
894 service for the error, and unref the reply on success
896 * bus/activation.c: convert to use BusTransaction so OOM can be
898 (bus_activation_service_created): set sender of the message
900 2003-04-01 Havoc Pennington <hp@redhat.com>
902 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
903 <includedir> (at least mostly)
905 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
906 first, then the user ID
908 2003-04-01 Havoc Pennington <hp@pobox.com>
910 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
913 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
915 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
917 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
918 socket 0777, and unlink any existing socket.
920 * bus/bus.c (bus_context_new): change our UID/GID and fork if
921 the configuration file so specifies; set up auth mechanism
924 * bus/config-parser.c (bus_config_parser_content): add support
925 for <fork> option and fill in code for <auth>
927 * bus/system.conf.in: add <fork/> to default configuration,
928 and limit auth mechanisms to EXTERNAL
930 * doc/config-file.txt (Elements): add <fork>
932 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
933 (_dbus_change_identity): new function
935 2003-03-31 Havoc Pennington <hp@redhat.com>
937 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
938 (_dbus_listen_unix_socket): fix off-by-one error in null
939 termination spotted by Nalin
941 2003-03-31 Havoc Pennington <hp@redhat.com>
943 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
944 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
945 having a real home directory available.
947 2003-03-31 Havoc Pennington <hp@redhat.com>
949 * bus/Makefile.am (install-data-hook): create /var/run/dbus
951 * bus/messagebus.in: add init script for Red Hat /etc/init.d
953 * configure.in: add support for specifying a style of init script
956 2003-03-31 Havoc Pennington <hp@redhat.com>
958 Fix some annoying DBusString API and fix all affected code.
960 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
962 (_dbus_string_get_data): change to return string instead of using
964 (_dbus_string_get_const_data): ditto
965 (_dbus_string_get_data_len): ditto
966 (_dbus_string_get_const_data_len): ditto
968 2003-03-31 Havoc Pennington <hp@redhat.com>
970 * bus/main.c (main): fix up the command line arguments to be nicer
972 2003-03-31 Havoc Pennington <hp@redhat.com>
974 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
975 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
976 final location that lands in the config file
978 * bus/config-loader-expat.c (bus_config_load): fix type of
981 * doc/TODO: remove TODO item for dbus_bus_get()
983 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
985 2003-03-31 Havoc Pennington <hp@pobox.com>
987 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
988 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
989 argument since they are always client side
991 * dbus/dbus-server.c (dbus_server_get_address): new function
993 * bus/main.c (main): take the configuration file as an argument.
995 * test/data/valid-config-files/debug-allow-all.conf: new file to
996 use with dispatch.c tests for example
998 * bus/test-main.c (main): require test data dir
1000 * bus/bus.c (bus_context_new): change this to take a
1001 configuration file name as argument
1003 * doc/config-file.txt (Elements): add <servicedir>
1005 * bus/system.conf, bus/session.conf: new files
1007 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1008 well-known socket if none set
1010 * configure.in: create system.conf and session.conf
1012 2003-03-30 Havoc Pennington <hp@pobox.com>
1014 * bus/config-parser.c: hacking
1016 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1017 to shut down, since it could cause weirdness with the DBusList
1020 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1021 link-oriented stack routines
1022 (alloc_link): free the mempool if the first alloc from it fails
1024 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1026 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1028 (_dbus_string_skip_white): new
1030 * doc/config-file.txt (Elements): add <includedir>
1032 2003-03-28 Havoc Pennington <hp@pobox.com>
1034 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1035 (_dbus_string_copy_data): new functions
1037 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1039 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1043 * dbus/dbus-memory.c:
1046 2003-03-28 Havoc Pennington <hp@pobox.com>
1048 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1049 I think it may have just been superstition. Not sure.
1051 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1052 failures that were not being handled.
1054 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1056 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1057 row that will fail on out-of-memory.
1059 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1060 function for testing out-of-memory handling.
1062 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1063 allocation functions, they do map exactly to the expat ones.
1065 2003-03-27 Havoc Pennington <hp@redhat.com>
1067 * bus/config-loader-libxml.c (bus_config_load): add another error
1070 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1073 Add note about automatic service activation.
1075 * doc/dbus-specification.sgml:
1076 Rename the specification and clarify a few things.
1078 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1081 * dbus/dbus-address.c:
1083 * dbus/dbus-marshal.c:
1084 * dbus/dbus-server-debug-pipe.c:
1085 * dbus/dbus-transport-unix.c:
1086 Fix documentation warnings.
1088 2003-03-26 Havoc Pennington <hp@pobox.com>
1090 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1091 after every test so it's quick and easy to see which leaked, and
1092 so we test multiple dbus_shutdown() calls
1094 * configure.in: change configure.in XML stuff to also support
1097 * config-loader-libxml.c: some hacking
1099 * config-loader-expat.c: some hacking
1101 * config-parser.c: some hacking, plus tests
1103 2003-03-25 Havoc Pennington <hp@redhat.com>
1105 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1107 * configure.in: add --with-xml option to specify XML library,
1108 right now only libxml is supported.
1110 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1111 nonworking code between home and work, still just stubs
1113 2003-03-24 Havoc Pennington <hp@redhat.com>
1115 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1118 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1119 NULL argument for "message" if the error is a well-known one,
1120 fill in a generic message in this case.
1122 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1125 * bus/test.c (bus_test_flush_bus): add
1127 * bus/policy.c (bus_policy_test): test code stub
1129 2003-03-24 Havoc Pennington <hp@pobox.com>
1131 * bus/connection.c (bus_connections_setup_connection): set up
1132 the "can this user connect" function, but it always returns
1133 TRUE until we have a config file parser so we can have a config
1134 file that allows connections.
1136 2003-03-23 Havoc Pennington <hp@pobox.com>
1138 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1139 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1140 the mutex, so we can check for proper memory management
1143 * dbus/dbus-dataslot.c: remove the mutex from
1144 DBusDataSlotAllocator and lock it manually when using it,
1145 to simplify fitting it into the global slots framework.
1147 * dbus/dbus-threads.c (init_static_locks): rework how we're
1148 handling global locks so they are easily shut down.
1150 * bus/policy.c (bus_policy_append_rule): fix
1152 * bus/test-main.c (main): check for memleaks
1154 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1155 test suite check for memleaks
1157 * dbus/dbus-memory.c: add support in test mode for tracking
1158 number of outstanding blocks
1160 2003-03-23 Havoc Pennington <hp@pobox.com>
1162 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1165 * dbus/dbus-hash.h: add ULONG hash keys
1167 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1168 (_dbus_get_group_id): new function
1170 2003-03-20 Havoc Pennington <hp@redhat.com>
1172 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1174 (dbus_connection_get_unix_user): new function
1176 2003-03-20 Havoc Pennington <hp@pobox.com>
1178 * bus/connection.c (bus_connection_send_oom_error): assert that
1179 message has a sender
1180 (connection_execute_transaction): ditto
1181 (bus_connection_preallocate_oom_error): fix to set the sender, and
1182 set recipient to the destination service, not the bus driver
1184 * bus/policy.c: hacking
1186 * dbus/dbus-message.c (dbus_message_service_is): new function
1187 (dbus_message_sender_is): new
1189 2003-03-19 Havoc Pennington <hp@redhat.com>
1191 * bus/policy.c: start sketching code for policy restrictions on
1192 what connections can do.
1194 2003-03-18 Havoc Pennington <hp@redhat.com>
1196 * doc/TODO: some notes on high-level todo items. Little nitpick
1197 stuff is all in @todo, so no need to add it here.
1199 * doc/config-file.txt: some notes on how config file might look
1201 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1207 2003-03-17 Havoc Pennington <hp@redhat.com>
1209 * dbus/dbus-internals.h: add gcc attributes so that
1210 our printf-style functions warn on bad arguments to
1213 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1216 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1219 2003-03-17 Havoc Pennington <hp@redhat.com>
1221 * bus/test-main.c (main): make it print something as it runs
1222 so make check doesn't look stuck
1224 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1225 from CVS, now obsolete
1227 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1229 * bus/dispatch.c: (bus_dispatch):
1230 Refetch the service name since it may have been reallocated
1231 when dbus_message_set_sender was called.
1233 * dbus/dbus-sysdeps.c: (_dbus_accept):
1234 Add address and address length variables and use them to stop
1235 valgrind from complaining.
1237 2003-03-17 Havoc Pennington <hp@pobox.com>
1239 All tests pass, no memleaks, no valgrind complaints.
1241 * bus/test.c: refcount handler_slot
1243 * bus/connection.c (bus_connections_new): refcount
1244 connection_data_slot
1246 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1247 bytes so that auth scripts pass.
1249 * bus/dispatch.c: init message_handler_slot so it gets allocated
1252 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1254 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1255 dealloc server_pipe_hash when no longer used for benefit of
1258 * dbus/dbus-auth.c (process_command): memleak fix
1260 * bus/dispatch.c (check_hello_message): memleak fix
1262 2003-03-16 Havoc Pennington <hp@pobox.com>
1264 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1266 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1268 * bus/activation.c (bus_activation_activate_service): Append
1269 the pending activation entry to the list of pending activations.
1271 2003-03-16 Havoc Pennington <hp@pobox.com>
1273 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1276 * dbus/dbus-address.c (create_entry): fix OOM handling when
1277 failing to alloc entry->method
1279 2003-03-16 Havoc Pennington <hp@pobox.com>
1281 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1284 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1285 add some missing dbus_set_result
1287 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1288 alloc the DBusMessageHandler
1290 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1291 the transport here, since we call this from the finalizer; it
1292 resulted in a double-finalize.
1294 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1295 where we tried to use transport->connection that was NULL,
1296 happened when transport was disconnected early on due to OOM
1298 * bus/*.c: adapt to handle OOM for watches/timeouts
1300 * dbus/dbus-transport-unix.c: port to handle OOM during
1303 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1304 reference to unused bytes instead of a copy
1306 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1309 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1312 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1315 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1317 * doc/dbus-specification.sgml:
1318 Document reply message for ActivateService.
1320 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1322 * bus/activation.c: (bus_pending_activation_entry_free),
1323 (bus_pending_activation_free), (bus_activation_new),
1324 (bus_activation_unref), (bus_activation_service_created),
1325 (bus_activation_activate_service):
1327 * bus/bus.c: (bus_context_new):
1328 * bus/desktop-file.c: (new_section):
1329 * bus/driver.c: (bus_driver_send_service_deleted),
1330 (bus_driver_handle_activate_service):
1331 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1333 * dbus/dbus-connection.c:
1334 (dbus_connection_send_with_reply_and_block):
1335 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1336 * dbus/dbus-protocol.h:
1337 Make activation work better. Now pending activations will be queued
1338 and the daemon won't try to activate services that are already registered.
1340 2003-03-16 Havoc Pennington <hp@pobox.com>
1342 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1345 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1346 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1348 2003-03-16 Havoc Pennington <hp@pobox.com>
1350 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1351 this. always run the test suite before commit...
1353 * bus/*: adapt to DBusConnection API changes
1355 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1356 requires renaming stuff to avoid dbus_connection_dispatch name
1359 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1362 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1363 separate from _dbus_message_loader_return_buffer()
1365 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1366 this, because it's now always broken to use; the number of
1367 messages in queue vs. the number still buffered by the message
1368 loader is undefined/meaningless. Should use
1369 dbus_connection_get_dispatch_state().
1370 (dbus_connection_dispatch): rename from
1371 dbus_connection_dispatch_message
1373 2003-03-16 Havoc Pennington <hp@pobox.com>
1375 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1378 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1380 * dbus/dbus-connection.c:
1381 (dbus_connection_send_with_reply_and_block):
1382 Decrease connection->n_incoming when removing an entry
1384 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1385 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1386 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1387 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1388 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1389 (dbus_dict_get_byte_array):
1390 Handle NULL arrays and strings. Also add support for byte arrays.
1392 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1393 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1394 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1395 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1396 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1397 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1398 * dbus/dbus-marshal.h:
1399 Add support for marshalling and demarshalling empty arrays and strings.
1401 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1402 (dbus_message_append_string_array),
1403 (dbus_message_iter_get_boolean),
1404 (dbus_message_iter_get_boolean_array),
1405 (dbus_message_iter_get_int32_array),
1406 (dbus_message_iter_get_uint32_array),
1407 (dbus_message_iter_get_double_array),
1408 (dbus_message_iter_get_byte_array),
1409 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1410 (check_message_handling):
1411 Add support for getting empty arrays and dicts.
1413 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1414 Don't do any validation at all for now, that's better than just checking
1417 * test/data/valid-messages/emptiness.message:
1418 New test message with lots of empty arrays.
1420 2003-03-16 Havoc Pennington <hp@pobox.com>
1422 * dbus/dbus-connection.c
1423 (_dbus_connection_queue_received_message_link): new function that
1424 can't fail due to OOM
1426 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1427 new function pops a message together with a list link
1430 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1431 message queuing functions to avoid needing to alloc memory
1433 2003-03-16 Havoc Pennington <hp@pobox.com>
1435 Oops - test code was only testing failure of around 30 of the
1436 mallocs in the test path, but it turns out there are 500+
1437 mallocs. I believe this was due to misguided linking setup such
1438 that there was one copy of dbus_malloc etc. in the daemon and one
1439 in the shared lib, and only daemon mallocs were tested. In any
1440 case, the test case now tests all 500+ mallocs, and doesn't pass
1441 yet, though there are lots of fixes in this patch.
1443 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1444 this so that it doesn't need to allocate memory, since it
1445 has no way of indicating failure due to OOM (and would be
1446 annoying if it did).
1448 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1450 * bus/Makefile.am: rearrange to create two self-contained
1451 libraries, to avoid having libraries with overlapping symbols.
1452 that was resulting in weirdness, e.g. I'm pretty sure there
1453 were two copies of global static variables.
1455 * dbus/dbus-internals.c: move the malloc debug stuff to
1458 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1461 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1463 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1466 * bus/dispatch.c (bus_dispatch_add_connection): free
1467 message_handler_slot when no longer using it, so
1468 memory leak checkers are happy for the test suite.
1470 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1472 * bus/bus.c (new_connection_callback): disconnect in here if
1473 bus_connections_setup_connection fails.
1475 * bus/connection.c (bus_connections_unref): fix to free the
1477 (bus_connections_setup_connection): if this fails, don't
1478 disconnect the connection, just be sure there are no side
1481 * dbus/dbus-string.c (undo_alignment): unbreak this
1483 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1485 (_dbus_auth_new): fix the order in which we free strings
1488 * bus/connection.c (bus_connection_disconnected): fix to
1489 not send ServiceDeleted multiple times in case of memory
1492 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1493 get the base service name
1494 (dbus_bus_register_client): don't return base service name,
1495 instead store it on the DBusConnection and have an accessor
1497 (dbus_bus_register_client): rename dbus_bus_register()
1499 * bus/dispatch.c (check_hello_message): verify that other
1500 connections on the bus also got the correct results, not
1501 just the one sending hello
1503 2003-03-15 Havoc Pennington <hp@pobox.com>
1505 Make it pass the Hello handling test including all OOM codepaths.
1506 Now to do other messages...
1508 * bus/services.c (bus_service_remove_owner): fix crash when
1509 removing owner from an empty list of owners
1510 (bus_registry_ensure): don't leave service in the list of
1511 a connection's owned services if we fail to put the service
1514 * bus/connection.c (bus_connection_preallocate_oom_error): set
1515 error flag on the OOM error.
1517 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1518 handle _dbus_transport_set_connection failure
1520 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1521 to create watches up front and simply enable/disable them as
1523 (unix_connection_set): this can now fail on OOM
1525 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1526 of enabling/disabling a watch or timeout.
1528 * bus/loop.c (bus_loop_iterate): don't touch disabled
1531 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1533 2003-03-15 Havoc Pennington <hp@pobox.com>
1535 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1536 write useful test code, after all that futzing around ;-)
1538 Test does not yet pass because we can't handle OOM in
1539 _dbus_transport_messages_pending (basically,
1540 dbus_connection_preallocate_send() does not prealloc the write
1541 watch). To fix this, I think we need to add new stuff to
1542 set_watch_functions, namely a SetEnabled function so we can alloc
1543 the watch earlier, then enable it later.
1545 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1546 dbus-memory.c to the convenience lib
1548 * bus/test.c: rename some static functions to keep them clearly
1549 distinct from stuff in connection.c. Handle client disconnection.
1551 2003-03-14 Havoc Pennington <hp@pobox.com>
1553 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1554 transport, tests more of the real codepath. Set up clients
1555 with bus_setup_debug_client.
1557 * bus/test.c (bus_setup_debug_client): function to set up debug
1558 "clients" on the main loop
1560 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1563 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1566 * dbus/dbus-server-debug.c: support a debug server based on pipes
1568 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1569 (_dbus_close): new function
1571 * configure.in: check for socketpair
1573 2003-03-14 Havoc Pennington <hp@redhat.com>
1575 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1578 * dbus/dbus-transport-debug.c: rework this a good bit to be
1579 less complicated. hopefully still works.
1581 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1584 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1587 * dbus/dbus-message.c (dbus_message_copy): rename from
1588 dbus_message_new_from_message, fix it up to copy
1589 all the message fields, add test case
1591 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1592 not quite passing yet
1594 2003-03-14 Havoc Pennington <hp@pobox.com>
1596 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1597 until no work remains" in test code. (the large diff here
1598 is just code movement, no actual changes)
1600 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1601 1, no point waiting around for test code.
1602 (_dbus_server_debug_accept_transport): unref the timeout
1603 after adding it (right?)
1605 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1607 2003-03-13 Havoc Pennington <hp@redhat.com>
1609 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1612 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1615 * dbus/dbus-connection.h: Make AddWatchFunction and
1616 AddTimeoutFunction return a bool so they can fail on out-of-memory
1618 * bus/bus.c (bus_context_new): set up timeout handlers
1620 * bus/connection.c (bus_connections_setup_connection): set up
1623 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1626 * bus/bus.c (bus_context_new): adapt to changes
1628 * bus/connection.c: adapt to changes
1630 * test/watch.c: adapt to DBusWatch changes
1632 * bus/dispatch.c (bus_dispatch_test): started adding this but
1635 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1637 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1639 2003-03-13 Havoc Pennington <hp@pobox.com>
1641 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1642 set up a test framework as for the library
1644 2003-03-12 Havoc Pennington <hp@pobox.com>
1646 Throughout: purge global variables, introduce BusActivation,
1647 BusConnections, BusRegistry, etc. objects instead.
1649 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1652 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1653 going to redo this a bit differently I think
1655 2003-03-12 Havoc Pennington <hp@redhat.com>
1657 Mega-patch that gets the message bus daemon initially handling
1658 out-of-memory. Work still needed. Also lots of random
1659 moving stuff to DBusError instead of ResultCode.
1661 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1663 * dbus/dbus-connection.c
1664 (dbus_connection_send_with_reply_and_block): use DBusError
1666 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1669 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1670 code here, as the only failure possible is OOM.
1672 * bus/connection.c (bus_connection_disconnect):
1673 rename bus_connection_disconnected as it's a notification only
1675 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1676 "name" on get_args failure, should be done by get_args;
1677 don't disconnect client for bad args, just return an error.
1678 (bus_driver_handle_service_exists): ditto
1680 * bus/services.c (bus_services_list): NULL-terminate returned array
1682 * bus/driver.c (bus_driver_send_service_lost)
1683 (bus_driver_send_service_acquired): send messages from driver to a
1684 specific client to the client's unique name, not to the broadcast
1687 * dbus/dbus-message.c (decode_header_data): reject messages that
1688 contain no name field
1689 (_dbus_message_get_client_serial): rename to
1690 dbus_message_get_serial and make public
1691 (_dbus_message_set_serial): rename from set_client_serial
1692 (_dbus_message_set_reply_serial): make public
1693 (_dbus_message_get_reply_serial): make public
1695 * bus/connection.c (bus_connection_foreach): allow stopping
1696 iteration by returning FALSE from foreach function.
1698 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1699 (dbus_connection_free_preallocated_send)
1700 (dbus_connection_preallocate_send): new API for sending a message
1701 without possibility of malloc failure.
1702 (dbus_connection_send_message): rename to just
1703 dbus_connection_send (and same for whole function family)
1705 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1707 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1709 * bus/activation.c: handle/return errors
1711 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1713 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1714 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1715 (_dbus_result_from_errno): move to this file
1717 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1719 * dbus/dbus-marshal.c:
1720 (_dbus_marshal_set_string):
1721 Take a length argument so we can marshal the correct string
1724 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1725 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1726 (_dbus_marshal_test):
1727 * dbus/dbus-marshal.h:
1728 Add support for marshalling and demarshalling dicts.
1730 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1731 Add support for TYPE DICT.
1733 * dbus/dbus-message.c: (set_string_field):
1734 Adjust header padding.
1736 (dbus_message_append_args_valist), (dbus_message_append_dict),
1737 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1738 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1739 (check_message_handling), (check_have_valid_message):
1740 * dbus/dbus-message.h:
1741 Add functions for setting and getting dicts.
1743 * dbus/dbus-protocol.h:
1749 * doc/dbus-specification.sgml:
1750 Add information about how dicts are marshalled.
1752 * test/data/invalid-messages/dict-with-nil-value.message:
1753 * test/data/invalid-messages/too-short-dict.message:
1754 * test/data/valid-messages/dict-simple.message:
1755 * test/data/valid-messages/dict.message:
1756 Add sample messages containing dicts.
1758 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1760 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1762 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1765 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1766 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1767 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1768 (dbus_dict_set_double), (dbus_dict_set_string),
1769 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1770 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1771 (dbus_dict_set_string_array), (_dbus_dict_test):
1773 Fix according to comments from Havoc.
1775 2003-03-06 Michael Meeks <michael@server.home>
1777 * configure.in: if we don't have kde-config, disable have_qt.
1779 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1784 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1785 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1786 (dbus_dict_remove), (dbus_dict_get_value_type),
1787 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1788 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1789 (dbus_dict_put_double), (dbus_dict_put_string),
1790 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1791 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1792 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1793 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1794 (dbus_dict_get_double), (dbus_dict_get_string),
1795 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1796 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1797 (dbus_dict_get_string_array), (_dbus_dict_test):
1799 Add DBusDict implementation
1801 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1805 2003-03-04 Havoc Pennington <hp@pobox.com>
1807 * test/data/auth/*: adapt to changes
1809 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1810 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1813 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1814 more stuff from being in a context name, to make the protocol
1815 simpler to deal with
1817 * dbus/dbus-errors.c (dbus_error_has_name): new function
1818 (dbus_error_is_set): new function
1820 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1821 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1823 * dbus/dbus-connection.c (dbus_connection_flush): also read
1824 messages during a flush operation
1826 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1828 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1830 * configure.in: Check for gethostbyname on Solaris.
1832 * dbus/dbus-transport.c: (_dbus_transport_open):
1833 Remove duplicate "tcp" entry.
1835 * doc/dbus-specification.sgml:
1836 Clarify some things.
1838 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1840 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1841 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1842 (_dbus_keyring_test):
1843 * dbus/dbus-md5.c: (_dbus_md5_compute):
1844 * dbus/dbus-sha.c: (_dbus_sha_compute):
1847 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1849 * README: Add some things.
1851 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1853 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1854 after case DBUS_TYPE_BOOELAN.
1856 2003-03-02 Havoc Pennington <hp@pobox.com>
1858 * test/break-loader.c (randomly_set_extreme_ints): add test that
1859 sets really huge and small integers
1861 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1862 that length of boolean array fits in the string, and that
1863 string has room for boolean value in single-bool case.
1865 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1866 optional value to "ALIGN" command which is what to fill the
1869 * test/data/valid-messages/no-padding.message: add regression
1870 test for the message padding problem
1872 2003-03-02 Havoc Pennington <hp@pobox.com>
1874 * dbus/dbus-message.c (decode_header_data): fix to always init
1875 message_padding, from Benjamin Dauvergne
1877 2003-03-02 Havoc Pennington <hp@pobox.com>
1883 2003-03-01 Joe Shaw <joe@assbarn.com>
1885 * configure.in: Check for "struct cmsgcred" and try to access its
1886 members for BSD-like unices.
1888 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1889 _dbus_read_credentials_unix_socket().
1890 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1891 read() for reading the credential byte off the unix socket. Use
1892 struct cmsgcred on systems that support it.
1894 2003-02-27 Alexander Larsson <alexl@redhat.com>
1898 Make gthreads-2.0 dependency optional. Don't build thread test if
1901 2003-02-27 Havoc Pennington <hp@pobox.com>
1903 * dbus/dbus-connection.c
1904 (dbus_connection_send_message_with_reply_and_block): fix doh!
1905 doh! doh! bug that resulted in never removing a reply from the
1906 queue, no wonder we called get_reply_serial so much ;-)
1908 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1909 and client serial instead of demarshaling them every time
1911 2003-02-27 Havoc Pennington <hp@pobox.com>
1913 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1914 more inlined, using dbus-string-private.h, speeds things up
1917 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1918 when freeing the string
1919 (_dbus_string_steal_data): fix for align offset
1920 (undo_alignment): new function
1922 2003-02-26 Havoc Pennington <hp@redhat.com>
1924 All kinds of audit fixes from Owen, plus initial attempt to
1925 handle unaligned memory returned from malloc.
1927 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1928 leave room for align_offset and nul byte
1929 (fixup_alignment): function to track an align_offset and
1930 ensure real->str is aligned
1931 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1932 to allow a nul byte plus align offset
1933 (_dbus_string_lock): fix overflow issue
1934 (_dbus_string_init_const_len): add assertions on sanity of len,
1935 assign allocated to be ALLOCATION_PADDING larger than len
1936 (set_length): fixup the overflow handling
1937 (_dbus_string_get_data_len): fix overflow in assertion
1938 (open_gap): detect overflow in size of gap to be opened
1939 (_dbus_string_lengthen): add overflow check
1940 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1941 (_dbus_string_append): add overflow check
1942 (_dbus_string_append_unichar): overflow
1943 (_dbus_string_delete): fix overflow in assertion
1944 (_dbus_string_copy_len): overflow in assertion
1945 (_dbus_string_replace_len): overflows in assertions
1946 (_dbus_string_find): change to implement in terms of
1947 _dbus_string_find_to
1948 (_dbus_string_find_to): assorted fixage
1949 (_dbus_string_equal_c_str): assert c_str != NULL,
1950 fix logic so the function works
1951 (_dbus_string_ends_with_c_str): fix overflow thingy
1952 (_dbus_string_base64_encode): overflow fix
1953 (_dbus_string_validate_ascii): overflow
1954 (_dbus_string_validate_nul): overflow
1956 2003-02-26 Havoc Pennington <hp@redhat.com>
1958 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1960 2003-02-26 Alexander Larsson <alexl@redhat.com>
1963 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1965 * dbus/dbus-connection.c:
1966 * dbus/dbus-connection.h:
1967 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1968 Add dbus_connection_set_wakeup_main_function and use it when queueing
1969 incoming and outgoing messages.
1972 * dbus/dbus-dataslot.c:
1973 Threadsafe usage of DBusDataSlotAllocator
1975 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1978 * dbus/dbus-server-unix.c:
1981 * glib/dbus-gmain.c:
1982 Implement the new wakeup functions for glib.
1985 * glib/test-thread-client.c:
1986 * glib/test-thread-server.c:
1987 * glib/test-thread.h:
1988 Initial cut at some thread test code. Not really done yet.
1990 2003-02-26 Havoc Pennington <hp@pobox.com>
1992 * dbus/dbus-connection.c
1993 (dbus_connection_send_message_with_reply_and_block): fix crash
1994 where we ref'd the outgoing message instead of the returned reply
1996 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1997 at the end of this function, so if we didn't need to read for
1998 authentication, we reinstall it for receiving messages
2000 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2001 a NULL sender for peer-to-peer case
2003 * dbus/dbus-transport-unix.c (check_read_watch): handle
2004 !authenticated case correctly
2006 * glib/dbus-gmain.c: add support for DBusServer
2008 * dbus/dbus-server.c: add data slot support
2010 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2011 return values and handle errors
2013 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2016 * Doxyfile.in (INPUT): add glib subdir
2018 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2019 setup_with_g_main instead of hookup_with_g_main; write docs
2021 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2023 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2024 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2025 * dbus/dbus-message.c: (dbus_message_append_boolean),
2026 (dbus_message_append_boolean_array),
2027 (dbus_message_get_args_valist), (_dbus_message_test):
2028 * dbus/dbus-message.h:
2029 * doc/dbus-specification.sgml:
2030 Various fixes as pointed out by Havoc.
2032 * test/data/invalid-messages/bad-boolean-array.message:
2033 * test/data/invalid-messages/bad-boolean.message:
2034 Add invalid boolean value test cases.
2036 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2038 * dbus/dbus-internals.c: (_dbus_type_to_string):
2039 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2040 (_dbus_marshal_validate_arg):
2041 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2042 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2043 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2044 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2045 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2046 (dbus_message_iter_get_double),
2047 (dbus_message_iter_get_boolean_array), (message_iter_test):
2048 * dbus/dbus-message.h:
2049 * dbus/dbus-protocol.h:
2050 * doc/dbus-specification.sgml:
2051 * test/data/valid-messages/lots-of-arguments.message:
2052 Add support for boolean and boolean array types.
2054 2003-02-23 Havoc Pennington <hp@pobox.com>
2056 * dbus/dbus-keyring.c: finish most of this implementation and
2059 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2060 these barf if the error isn't cleared to NULL
2062 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2063 (_dbus_create_directory): new function
2065 * dbus/dbus-errors.c (dbus_set_error): fix warning
2067 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2068 (_dbus_string_hex_decode): new function
2069 (test_hex_roundtrip): test code
2071 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2073 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2075 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2076 the save-to-temp/rename trick to atomically write the new file
2077 (_dbus_string_parse_uint): new function
2079 2003-02-22 Havoc Pennington <hp@pobox.com>
2081 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2083 2003-02-22 Havoc Pennington <hp@pobox.com>
2085 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2086 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2088 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2090 * dbus/test/data/sha-1: add US government test suite for SHA-1
2092 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2094 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2095 Make string arrays NULL-terminated.
2097 * dbus/dbus-memory.c: (dbus_free_string_array):
2098 * dbus/dbus-memory.h:
2099 New function for freeing NULL-terminated string arrays.
2101 * dbus/dbus-message-builder.c: (append_quoted_string),
2102 (_dbus_message_data_load):
2103 Add support for array types.
2105 * dbus/dbus-message.c: (check_message_handling):
2106 Add more types as test cases.
2108 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2109 (_dbus_string_parse_double):
2110 Add the start offset to the end offset.
2112 * test/data/valid-messages/lots-of-arguments.message:
2113 New test message with lots of arguments.
2115 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2117 * dbus/dbus-message.c: (dbus_message_append_nil),
2118 (dbus_message_append_int32), (dbus_message_append_uint32),
2119 (dbus_message_append_double), (dbus_message_append_string),
2120 (dbus_message_append_int32_array),
2121 (dbus_message_append_uint32_array),
2122 (dbus_message_append_double_array),
2123 (dbus_message_append_byte_array),
2124 (dbus_message_append_string_array):
2125 Fix all out-of-memory handling in these functions.
2127 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2129 * dbus/dbus-message.c: (dbus_message_append_nil):
2132 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2134 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2135 (dbus_message_append_nil), (dbus_message_append_int32_array),
2136 (dbus_message_append_uint32_array),
2137 (dbus_message_append_double_array),
2138 (dbus_message_append_byte_array),
2139 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2140 (dbus_message_iter_get_int32_array),
2141 (dbus_message_iter_get_uint32_array),
2142 (dbus_message_iter_get_double_array),
2143 (dbus_message_iter_get_byte_array),
2144 (dbus_message_iter_get_string_array):
2146 * dbus/dbus-message.h:
2147 Add functions for appending and getting arrays.
2149 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2151 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2152 element size at least 8 bytes, fixes mempool tests on
2155 2003-02-20 Alexander Larsson <alexl@redhat.com>
2157 * dbus/dbus-transport-unix.c (unix_do_iteration):
2158 Unlock the connection mutex during a blocking select call.
2159 Add todo about how we need a way to wake up the select.
2161 * dbus/dbus-connection-internal.h:
2162 * dbus/dbus-connection.c:
2163 Add _dbus_connection_lock and _dbus_connection_unlock.
2165 2003-02-19 Havoc Pennington <hp@pobox.com>
2167 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2168 Doxyfile.in, not Doxyfile
2170 * dbus/dbus-keyring.c: do some hacking on this
2172 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2174 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2176 (dbus_set_error): remove dbus_error_init, check for message ==
2177 NULL *before* we sprintf into it, and add @todo about including
2178 system headers in this file
2180 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2182 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2184 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2185 get various bits of user information based on either username
2187 (_dbus_homedir_from_username): new function
2189 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2192 Add check for nonposix getpwnam_r
2194 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2195 Align the pool element size to a sizeof (void *) boundary.
2197 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2198 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2199 General Solaris fixes.
2201 * test/data/valid-messages/simplest-manual.message:
2202 Explicitly state that we want little-endian packing.
2204 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2206 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2208 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2209 Added to create a transport connecting using a tcp/ip socket.
2211 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2212 to a tcp socket at given host and port.
2213 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2216 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2218 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2219 Added to create a server listening on a TCP/IP socket.
2221 2003-02-19 Havoc Pennington <hp@pobox.com>
2223 Throughout: mop up all the Doxygen warnings and undocumented
2226 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2227 to search any paths.
2229 * dbus/dbus-threads.c: move global mutex initializers to
2230 dbus-internals.h, multiple prototypes was confusing doxygen
2231 besides being kind of ugly
2233 * Doxyfile (PREDEFINED): have Doxygen define
2234 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2235 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2236 (do not abuse the feature! it's for stuff like the autogenerated
2237 macros in dbus-md5.c, not just for things you don't feel like
2240 2003-02-18 Havoc Pennington <hp@pobox.com>
2242 * dbus/dbus-string.c (_dbus_string_zero): new function
2244 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2245 wrap it in some dbus-friendly API
2247 * dbus/dbus-types.h: add 16-bit types
2249 2003-02-18 Joe Shaw <joe@assbarn.com>
2251 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2252 credentials from our currently running process.
2253 (get_word): Fix a buglet where we were copying the entire length
2254 instead of relative to our position.
2256 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2257 keys on the stack... it's 640k of data.
2259 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2260 read the credentials byte off the socket, even if we don't have
2262 (_dbus_poll): Implement poll() using select() for systems which
2265 * glib/test-dbus-glib.c (main): Print out an error if no
2266 parameters are given.
2268 * test/data/auth/fallback.auth-script: Added. Tests that a client
2269 can fallback to a secondary auth mechanism if the first fails.
2271 2003-02-18 Havoc Pennington <hp@pobox.com>
2275 2003-02-17 Havoc Pennington <hp@pobox.com>
2277 * doc/dbus-specification.sgml: lots of cosmetic
2278 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2279 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2280 s/server/bus/ (except in authentication section). Add a section
2281 "Message Bus Message Routing"
2283 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2289 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2291 * doc/dbus-specification.sgml:
2292 Specification updates.
2294 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2296 * bus/activation.c: (bus_activation_init), (child_setup),
2297 (bus_activation_activate_service):
2299 * bus/main.c: (main):
2300 Set DBUS_ADDRESS environment variable.
2302 * dbus/dbus-errors.c: (dbus_set_error):
2303 Don't use va_copy since that's a C99 feature.
2305 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2306 (_dbus_spawn_async):
2307 * dbus/dbus-sysdeps.h:
2308 Add child_setup_func to _dbus_spawn_async.
2310 * doc/dbus-specification.sgml:
2311 Update specification.
2313 * test/spawn-test.c: (setup_func), (main):
2316 2003-02-17 Alexander Larsson <alexl@redhat.com>
2318 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2321 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2325 * doc/dbus-test-plan.sgml:
2326 Add test plan document.
2331 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2333 * dbus/dbus-message.c: (decode_header_data),
2334 (_dbus_message_loader_return_buffer):
2335 Set the header padding amount when loading a message.
2337 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2339 * bus/dispatch.c: (send_one_message):
2340 Only send broadcast messages to registered connections.
2342 * dbus/dbus-message.c: (dbus_message_name_is):
2343 * dbus/dbus-message.h:
2344 New convenience function.
2346 * dbus/dbus-transport-debug.c: (do_reading):
2347 Only dispatch one message per run.
2350 * test/bus-test.c: (new_connection_callback), (die),
2351 (test_hello_client1_handler), (test_hello_client2_handler),
2352 (test_hello_replies), (main):
2354 * test/bus-test-loop.[ch]:
2357 2003-02-16 Havoc Pennington <hp@pobox.com>
2359 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2360 backward conditional
2362 2003-02-16 Alexander Larsson <alexl@redhat.com>
2364 * dbus/dbus-connection.c:
2365 Implement sent_message_with_reply. (with_reply_and block is still
2367 Made dispatch_message not lose message if OOM.
2369 * dbus/dbus-errors.h:
2370 Add NoReply error (for reply timeouts).
2372 2003-02-16 Alexander Larsson <alexl@redhat.com>
2374 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2375 Actually free keys and values when destroying hashtable.
2377 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2379 * dbus/dbus-auth.c: (client_try_next_mechanism):
2382 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2383 Return TRUE if there's no thread implementation around.
2385 * glib/dbus-gmain.c: (free_source),
2386 (dbus_connection_hookup_with_g_main):
2387 Make sure to remove the GSource when the connection is finalized.
2389 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2391 * bus/dispatch.c: (bus_dispatch_message_handler):
2392 * dbus/dbus-errors.h:
2393 Return an error if someone tries to send a message to a service
2396 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2398 * bus/activation.c: (load_directory), (bus_activation_init),
2399 (bus_activation_activate_service):
2402 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2403 More work on the activation handling.
2405 * dbus/dbus-errors.h:
2406 Add some error messages
2408 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2409 * dbus/dbus-message.h:
2410 New function that creates an error message.
2412 * dbus/dbus-protocol.h:
2413 Add ACTIVATE_SERVER message.
2415 * dbus/dbus-server-unix.c: (unix_handle_watch),
2416 (_dbus_server_new_for_domain_socket):
2417 Call _dbus_fd_set_close_on_exec.
2419 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2420 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2421 (_dbus_fd_set_close_on_exec):
2422 * dbus/dbus-sysdeps.h:
2423 Add _dbus_fd_set_close_on exec function. Also add function that checks
2424 that all open fds are set to close-on-exec and warns otherwise.
2426 * dbus/dbus-transport-unix.c:
2427 (_dbus_transport_new_for_domain_socket):
2428 Call _dbus_fd_set_close_on_exec.
2430 2003-02-16 Havoc Pennington <hp@pobox.com>
2432 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2433 allow people to avoid setting SIGPIPE to SIG_IGN
2434 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2435 we've been asked not to
2437 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2439 * dbus/dbus-list.c: (_dbus_list_append_link),
2440 (_dbus_list_prepend_link):
2441 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2445 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2448 * bus/activation.c: (bus_activation_entry_free),
2449 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2451 * bus/main.c: (main):
2452 Add simple activation support, doesn't work yet though.
2454 2003-02-15 Zack Rusin <zack@kde.org>
2456 * qt/dbus-qthread.cpp: small casting fix
2458 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2460 * dbus/dbus-errors.c: (dbus_set_error):
2461 * dbus/dbus-errors.h:
2462 Add a few errors and make dbus_set_error void.
2464 * dbus/dbus-sysdeps.c:
2465 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2466 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2467 * dbus/dbus-sysdeps.h:
2468 Add _dbus_spawn_async.
2470 * test/spawn-test.c: (main):
2471 Test for _dbus_spawn_async.
2473 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2475 * dbus/dbus-internals.h:
2476 Fix build without tests.
2478 * dbus/dbus-list.c: (alloc_link):
2479 Fix a segfault when a malloc fails.
2481 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2482 (dbus_malloc0), (dbus_realloc):
2483 Add support for malloc debugging.
2485 2003-02-15 Alexander Larsson <alexl@redhat.com>
2487 * dbus/dbus-threads.c:
2488 * dbus/dbus-threads.h:
2489 Add condvars. Remove static mutext from API.
2490 Implement static mutexes by initializing them from threads_init.
2492 * glib/dbus-gthread.c:
2493 * qt/dbus-qthread.cpp:
2494 Update with the thread api changes.
2499 Turn StaticMutex into normal mutex + init function.
2500 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2501 _dbus_list_append_link, _dbus_list_prepend_link
2504 * dbus/dbus-sysdeps.c:
2505 * dbus/dbus-sysdeps.h:
2506 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2507 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2509 * dbus/dbus-protocol.h:
2510 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2512 * dbus/dbus-message.c:
2513 Make ref/unref atomic.
2516 * dbus/dbus-connection-internal.h:
2517 * dbus/dbus-connection.c:
2518 * dbus/dbus-connection.h:
2520 Change _peek to _borrow,_return & _steal_borrowed.
2521 Change disconnect callback to event.
2522 Make dbus_connection_dispatch_messages reentrant.
2524 * dbus/dbus-transport.c:
2525 Don't ref the connection on calls to the transport
2528 * dbus/dbus-message-handler.c:
2531 * glib/dbus-gmain.c:
2532 Don't use peek_message anymore
2535 * test/debug-thread.c:
2536 * test/debug-thread.h:
2537 Simple thread implementation that asserts() on deadlocks in
2538 single-threaded code.
2541 (main) Call debug_threads_init.
2544 Use disconnect message instead of disconnect callback.
2548 Don't call dbus_connection_set_disconnect_function. Instead export
2549 bus_connection_disconnect.
2552 Call bus_connection_disconnect when we get a disconnected message.
2554 2003-02-15 Havoc Pennington <hp@pobox.com>
2556 * dbus/dbus-message.c (dbus_message_new): fool around with the
2559 2003-02-14 Havoc Pennington <hp@pobox.com>
2561 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2563 * dbus/dbus-memory.c: fail if the debug functions indicate we
2566 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2567 (_dbus_decrement_fail_alloc_counter): debug functions to
2568 simulate memory allocation failures
2570 2003-02-14 Havoc Pennington <hp@pobox.com>
2572 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2575 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2577 * bus/driver.c: (bus_driver_handle_hello):
2579 * bus/services.c: (bus_service_lookup):
2580 Reorder message sending so we get a more sane order.
2582 * test/bus-test.c: (message_handler):
2585 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2587 * bus/driver.c: (bus_driver_send_service_deleted),
2588 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2589 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2590 (bus_driver_send_welcome_message),
2591 (bus_driver_handle_list_services),
2592 (bus_driver_handle_acquire_service),
2593 (bus_driver_handle_service_exists):
2594 * dbus/dbus-bus.c: (dbus_bus_register_client),
2595 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2596 * dbus/dbus-errors.c: (dbus_result_to_string):
2597 * dbus/dbus-errors.h:
2598 * dbus/dbus-message.c: (dbus_message_append_args),
2599 (dbus_message_append_args_valist), (dbus_message_get_args),
2600 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2601 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2602 (dbus_message_iter_get_byte_array),
2603 (dbus_message_iter_get_string_array), (message_iter_test),
2604 (check_message_handling), (_dbus_message_test):
2605 * dbus/dbus-message.h:
2606 * test/bus-test.c: (main):
2607 Change fields to arguments in messages, so that they won't be
2608 confused with header fields.
2610 * glib/test-dbus-glib.c: (main):
2611 Remove append_fields from hello message.
2613 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2615 * dbus/dbus-errors.c:
2616 * dbus/dbus-message.c:
2617 * dbus/dbus-string.c:
2618 Documentation fixes.
2620 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2622 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2624 Implement support for timeouts in dbus-glib.
2626 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2628 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2629 * dbus/dbus-message.c: (process_test_subdir):
2630 * test/break-loader.c: (find_breaks_based_on):
2631 Plug some memory leaks.
2633 2003-02-13 Richard Hult <rhult@codefactory.se>
2635 * bus/main.c: Fix build.
2637 * dbus/dbus-errors.h:
2638 * dbus/dbus-errors.c: Fix copyright for Anders.
2640 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2645 * bus/connection.c: (bus_connection_foreach):
2648 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2649 (unescape_string), (new_section), (parse_section_start),
2650 (parse_key_value), (report_error), (bus_desktop_file_load),
2651 (bus_desktop_file_get_string):
2652 * bus/desktop-file.h:
2653 Use DBusError for error reporting.
2655 * bus/dispatch.c: (send_one_message),
2656 (bus_dispatch_message_handler):
2657 * bus/driver.c: (bus_driver_send_service_deleted),
2658 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2659 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2660 (bus_driver_send_welcome_message),
2661 (bus_driver_handle_list_services),
2662 (bus_driver_handle_acquire_service),
2663 (bus_driver_handle_service_exists):
2664 * bus/loop.c: (bus_loop_run):
2666 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2668 * bus/utils.c: (bus_wait_for_memory):
2670 New files with general utility functions.
2672 * dbus/dbus-internals.h:
2673 Remove _DBUS_HANDLE_OOM.
2675 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2677 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2678 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2679 * dbus/dbus-errors.h:
2680 Add DBusError structure.
2682 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2684 * test/data/valid-messages/standard-acquire-service.message:
2685 * test/data/valid-messages/standard-hello.message:
2686 * test/data/valid-messages/standard-list-services.message:
2687 * test/data/valid-messages/standard-service-exists.message:
2688 Add some standard messages.
2690 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2692 * bus/driver.c: (bus_driver_send_welcome_message),
2693 (bus_driver_handle_list_services),
2694 (bus_driver_handle_acquire_service),
2695 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2696 Update for API changes in libdbus.
2698 * dbus/dbus-message.c: (dbus_message_new_reply):
2699 * dbus/dbus-message.h:
2700 Remove the name argument. The spec states that replies shouldn't
2703 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2705 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2706 (report_error), (bus_desktop_file_load), (lookup_section),
2707 (lookup_line), (bus_desktop_file_get_raw),
2708 (bus_desktop_file_get_string):
2709 * bus/desktop-file.h:
2710 Some fixes, and new functions for getting a key value from a section.
2712 2003-02-13 Havoc Pennington <hp@pobox.com>
2714 * test/data/auth/fail-after-n-attempts.auth-script: new test
2716 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2719 2003-02-13 Havoc Pennington <hp@pobox.com>
2721 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2722 dbus_credentials_match were backward
2724 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2725 NO_CREDENTIALS and ROOT_CREDENTIALS
2727 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2728 into here. Never process more commands after we've reached an
2729 end state; store further data as unused bytes.
2731 * test/data/auth/*: add more auth tests
2733 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2734 command to match exact string and EXPECT_UNUSED to match unused
2737 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2739 2003-02-12 Havoc Pennington <hp@pobox.com>
2741 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2742 \r off of popped lines
2744 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2747 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2750 2003-02-12 Havoc Pennington <hp@pobox.com>
2752 * dbus/Makefile.am: remove break-loader from the build, since it
2755 * configure.in: add --enable-gcov to turn on coverage profiling
2756 flags and disable optimization
2758 2003-02-10 Havoc Pennington <hp@pobox.com>
2760 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2761 initial cut at test framework for DBusAuth from laptop.
2762 Doesn't quite work yet but it compiles and I need to get
2763 it off the 266mhz laptop. ;-)
2765 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2766 fix a memleak in error case
2768 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2771 * bus/desktop-file.c:
2772 * bus/desktop-file.h:
2773 Add a desktop file parser.
2775 2003-02-11 Zack Rusin <zack@kde.org>
2777 * qt/message.[h|cpp]: sample implementation
2778 of the KDE wrapper for DBusMessage
2780 2003-02-09 Zack Rusin <zack@kde.org>
2782 * test/bus-test.c: make_it_compile
2783 * doc/dbus-specification.sgml: minimal semantic fix
2785 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2791 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2794 * dbus/dbus-break-loader.c:
2796 * test/break-loader.c:
2797 Move dbus-break-loader to test/ and rename it to break-loader.
2799 2003-02-02 Havoc Pennington <hp@pobox.com>
2801 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2802 for code to manage cookies in your home directory
2804 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2806 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2807 to authenticate, then disconnect the client.
2809 2003-02-03 Alexander Larsson <alexl@redhat.com>
2811 * dbus/dbus-message.c (dbus_message_append_fields):
2814 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2816 * doc/dbus-specification.sgml:
2817 Update address format section.
2819 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2822 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2823 (message_handler), (new_connection_callback), (loop_quit),
2827 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2829 * bus/driver.c: (bus_driver_handle_service_exists):
2830 Simplify the code a bit.
2832 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2835 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2838 Add libdbus-daemon.la and link to it.
2840 2003-02-01 James Willcox <jwillcox@gnome.org>
2842 * bus/driver.c: (bus_driver_handle_own_service):
2843 Actually include the service reply code in the message.
2845 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2847 * bus/driver.c: (bus_driver_handle_service_exists):
2848 Don't unref the incoming message.
2850 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2852 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2854 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2856 * dbus/dbus-server.c: (dbus_server_listen):
2857 * dbus/dbus-transport.c: (_dbus_transport_open):
2858 ifdef out the calls to the debug transport and server.
2860 2003-02-02 Alexander Larsson <alexl@redhat.com>
2862 * dbus/dbus-watch.c (dbus_watch_get_flags):
2863 Add note in the docs that ERROR or HANGUP won't be returned
2864 and are assumed always on.
2866 * glib/dbus-gmain.c (add_watch):
2867 Always add IO_ERR | IO_HUP
2869 * dbus/dbus-message.h:
2870 Add semicolon after dbus_message_iter_get_string_array().
2871 Makes qt code build again
2873 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2875 * bus/driver.c: (create_unique_client_name),
2876 (bus_driver_handle_hello):
2877 Don't take a name, just use a numeric id to identify
2881 * dbus/dbus-bus.c: (dbus_bus_register_client),
2882 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2884 Add new convenience functions for communicating with the bus.
2886 * dbus/dbus-message.h:
2888 * dbus/dbus-protocol.h:
2891 2003-02-01 Alexander Larsson <alexl@redhat.com>
2893 * dbus/dbus-message.c (dbus_message_append_fields):
2894 Add some more doc comments.
2896 2003-02-01 Havoc Pennington <hp@pobox.com>
2898 * dbus/dbus-break-loader.c (randomly_modify_length): change
2899 a 4-byte value in the message as if it were a length
2901 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2902 execute bit on saved files
2904 2003-02-01 Havoc Pennington <hp@pobox.com>
2906 * dbus/dbus-break-loader.c (main): new program to find messages
2907 that break the loader.
2909 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2910 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2912 * dbus/dbus-string.c (_dbus_string_set_byte): new
2914 2003-01-31 Havoc Pennington <hp@pobox.com>
2916 * dbus/dbus-message.c: refactor the test code to be more general,
2917 in preparation for writing a "randomly permute test cases to
2918 try to break the loader" program.
2920 2003-01-31 Havoc Pennington <hp@pobox.com>
2922 * doc/dbus-specification.sgml: work on the specification
2924 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2925 the protocol version of the message.
2927 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2928 no longer specifies that.
2929 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2932 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2933 "break" for DBUS_TYPE_NIL, remove @todo
2935 2003-01-31 Havoc Pennington <hp@pobox.com>
2937 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2938 just set_is_error/get_is_error as this is a commonly-used
2939 function, and write docs.
2941 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2943 * dbus/dbus-address.c: (dbus_address_entry_free):
2944 Free key and value lists.
2946 * dbus/dbus-internals.c: (_dbus_type_to_string):
2947 Add the types we didn't have.
2949 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2950 (_dbus_marshal_validate_arg):
2953 * dbus/dbus-message.c: (dbus_message_set_sender):
2954 Remove todo about being able to set sender to NULL.
2956 (dbus_message_set_is_error_reply),
2957 (dbus_message_get_is_error_reply):
2958 * dbus/dbus-message.h:
2961 * dbus/dbus-protocol.h:
2962 Add error reply flag.
2964 * test/data/valid-messages/opposite-endian.message:
2965 Add NIL type to test.
2967 2003-01-31 Havoc Pennington <hp@pobox.com>
2969 * doc/dbus-specification.sgml: fully specify the header. Add
2970 flags and major protocol version, and change header/body len to
2973 * dbus/dbus-message-builder.c (append_saved_length): append length
2976 * dbus/dbus-message.c (dbus_message_create_header): change header
2977 length and body length to unsigned. Add the new fields from the
2979 (_dbus_message_loader_return_buffer): unsigned header/body len
2981 2003-01-30 Havoc Pennington <hp@pobox.com>
2983 * dbus/dbus-auth.c: rework to use only REJECTED, no
2986 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2987 use REJECTED, suggested by Mark McLoughlin
2989 2003-01-30 Havoc Pennington <hp@pobox.com>
2991 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2992 a better way to report errors here. e.g. "unix address lacks
2993 path" or something. also "no such file" when the path doesn't
2996 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2998 (dbus_parse_address): add @todo about documenting address format,
2999 and allowing , and ; to be escaped
3001 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3004 Add dbus-address.[ch]
3006 * dbus/dbus-address.c: (dbus_address_entry_free),
3007 (dbus_address_entries_free), (create_entry),
3008 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3009 (dbus_parse_address), (_dbus_address_test):
3010 * dbus/dbus-address.h:
3011 New files for dealing with address parsing.
3013 * dbus/dbus-connection.c:
3014 Document timeout functions.
3016 * dbus/dbus-message.c:
3017 Document dbus_message_new_from_message.
3019 * dbus/dbus-server-debug.c:
3022 * dbus/dbus-server.c: (dbus_server_listen):
3023 Parse address and use correct server implementation.
3025 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3026 * dbus/dbus-string.h:
3027 New function with test.
3029 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3033 * dbus/dbus-transport-debug.c:
3036 * dbus/dbus-transport.c: (_dbus_transport_open):
3037 Parse address and use correct transport implementation.
3039 2003-01-30 Havoc Pennington <hp@pobox.com>
3041 * dbus/dbus-message.c: use message->byte_order instead of
3042 DBUS_COMPILER_BYTE_ORDER throughout.
3043 (dbus_message_create_header): pad header to align the
3044 start of the body of the message to 8-byte boundary
3046 * dbus/dbus-marshal.h: make all the demarshalers take const
3047 DBusString arguments.
3049 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3050 validate message args here, so we don't have to do slow validation
3051 later, and so we catch bad messages as they are incoming. Also add
3052 better checks on header_len and body_len. Also fill in
3055 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3056 implemented properly)
3057 (_dbus_string_validate_nul): new function to check all-nul
3059 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3060 get_arg_end_pos and remove all validation
3061 (_dbus_marshal_validate_arg): actually do validation here.
3063 2003-01-29 Havoc Pennington <hp@pobox.com>
3065 * dbus/dbus-message.c (check_message_handling): fix assertion
3066 failure on set_client_serial
3068 2003-01-28 Havoc Pennington <hp@pobox.com>
3070 * dbus/dbus-server-debug.c: Add doc section comments
3072 * dbus/dbus-transport-debug.c: add doc section comments
3074 2003-01-28 Havoc Pennington <hp@redhat.com>
3076 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3077 the reverse order from how I had it
3078 (_dbus_string_base64_encode): reverse encoding order. I was
3079 basically byteswapping everything during encoding.
3081 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3083 * dbus/dbus-connection-internal.h:
3084 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3085 (_dbus_connection_remove_timeout):
3086 Add functions for adding and removing timeouts.
3088 * dbus/dbus-message.c: (dbus_message_new_from_message):
3089 Add new function that takes a message and creates an exact
3090 copy of it, but with the refcount set to 1.
3091 (check_message_handling):
3094 * dbus/dbus-server-protected.h:
3095 * dbus/dbus-server.c: (_dbus_server_init_base),
3096 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3097 (dbus_server_set_timeout_functions):
3098 (_dbus_server_remove_timeout):
3099 New functions so that a server can add and remove timeouts.
3101 (dbus_server_listen):
3102 Add commented out call to dbus_server_debug_new.
3104 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3105 Actually set the handler, doh.
3107 * dbus/dbus-transport.c: (_dbus_transport_open):
3108 Add commented out call to dbus_transport_debug_client_new.
3111 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3113 2003-01-28 Havoc Pennington <hp@pobox.com>
3115 * dbus/dbus-message.c (check_message_handling): function to check
3116 on the loaded message, iterates over it etc.
3118 2003-01-28 Havoc Pennington <hp@pobox.com>
3120 * test/Makefile.am (dist-hook): fix make distdir
3122 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3124 2003-01-27 Havoc Pennington <hp@pobox.com>
3126 * dbus/dbus-mempool.c (time_for_size): replace printf with
3129 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3130 empty lines; fix the SAVE_LENGTH stuff to be
3131 START_LENGTH/END_LENGTH so it actually works; couple other
3134 * test/Makefile.am (dist-hook): add dist-hook for .message files
3136 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3137 can be constant or locked.
3138 (_dbus_string_free): allow freeing a const string as
3141 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3143 * dbus/dbus-test-main.c (main): take an argument which is the
3144 directory containing test data
3146 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3147 argument to this and load all the messages in test/data/
3148 checking that they can be loaded or not loaded as appropriate.
3150 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3152 * bus/dispatch.c: (bus_dispatch_message_handler):
3153 Dispatch messages sent to services.
3155 * bus/driver.c: (bus_driver_send_service_deleted),
3156 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3157 (bus_driver_send_service_acquired):
3158 Add helper functions for sending service related messages.
3160 (bus_driver_send_welcome_message):
3161 Send HELLO_REPLY instead of WELCOME.
3163 (bus_driver_handle_list_services):
3164 Send LIST_SERVICES_REPLY instead of SERVICES.
3166 (bus_driver_handle_own_service),
3167 (bus_driver_handle_service_exists):
3168 New message handlers.
3170 (bus_driver_handle_message):
3171 Invoke new message handlers.
3173 (bus_driver_remove_connection):
3174 Don't remove any services here since that's done automatically
3175 by bus_service_remove_owner now.
3178 New function signatures.
3180 * bus/services.c: (bus_service_add_owner):
3181 Send ServiceAcquired message if we're the only primary owner.
3183 (bus_service_remove_owner):
3184 Send ServiceAcquired/ServiceLost messages.
3186 (bus_service_set_prohibit_replacement),
3187 (bus_service_get_prohibit_replacement):
3188 Functions for setting prohibit replacement.
3190 (bus_service_has_owner):
3191 New function that checks if a connection is in the owner queue of
3195 Add new function signatures.
3197 * dbus/dbus-list.c: (_dbus_list_test):
3198 Add tests for _dbus_list_remove_last and traversing the list backwards.
3201 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3202 go any further, so return NULL then.
3204 * dbus/dbus-protocol.h:
3205 Add new messages, service flags and service replies.
3207 2003-01-26 Havoc Pennington <hp@pobox.com>
3209 * dbus/dbus-message-builder.c: implement, completely untested.
3211 * test/data/*: add data to be used in testing.
3212 ".message" files are our simple loadable text format.
3213 ".message-raw" will be binary dumps of messages.
3215 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3217 2003-01-26 Havoc Pennington <hp@pobox.com>
3219 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3221 * dbus/dbus-errors.c (dbus_result_to_string): add
3224 * dbus/dbus-message-builder.c: new file, will contain code to load
3225 up messages from files. Not implemented yet.
3227 2003-01-26 Havoc Pennington <hp@pobox.com>
3229 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3230 the sender by setting to NULL
3232 2003-01-26 Havoc Pennington <hp@pobox.com>
3234 The unit tests pass, but otherwise untested. If it breaks, the
3235 tests should have been better. ;-)
3237 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3240 * dbus/dbus-message.c: redo everything so we maintain
3241 message->header as the only copy of the various fields.
3242 This avoids the possibility of out-of-memory in some cases,
3243 for example dbus_message_lock() can't run out of memory anymore,
3244 and avoids extra copying. Figured I may as well go ahead and do
3245 this since it was busted for dbus_message_lock to not return
3246 failure on OOM, and dbus_message_write_header was totally
3247 unchecked for OOM. Also fixed some random other bugs.
3249 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3250 that strings are nul-terminated. Also, end_pos can be equal
3251 to string length just not greater than, I think.
3252 (_dbus_marshal_set_int32): new function
3253 (_dbus_marshal_set_uint32): new function
3254 (_dbus_marshal_set_string): new function
3256 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3257 a warning, init timeout_list to NULL
3258 (dbus_connection_send_message): don't use uninitialized variable
3261 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3263 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3265 * bus/driver.c: (bus_driver_handle_hello),
3266 (bus_driver_send_welcome_message):
3269 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3271 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3272 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3273 (dbus_connection_unref):
3274 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3275 * dbus/dbus-message.c: (dbus_message_unref),
3278 (dbus_message_get_fields):
3279 Remove debugging printout.
3281 (_dbus_message_loader_return_buffer):
3282 Don't store the header string.
3284 (_dbus_message_test):
3287 2003-01-26 Richard Hult <rhult@codefactory.se>
3289 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3290 the file descriptor list, since it can change under us.
3292 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3294 * glib/dbus-gmain.c: (dbus_connection_prepare),
3295 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3296 (remove_watch), (dbus_connection_hookup_with_g_main):
3297 Rewrite the glib handling to use its own GSource instead of a
3298 GIOChannel so we can catch messages put in the queue while waiting
3301 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3304 * bus/connection.c: (connection_disconnect_handler),
3305 (connection_watch_callback), (bus_connection_setup):
3306 * bus/dispatch.c: (send_one_message),
3307 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3308 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3310 * bus/driver.c: (bus_driver_send_service_deleted),
3311 (bus_driver_send_service_created), (bus_driver_handle_hello),
3312 (bus_driver_send_welcome_message),
3313 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3314 (bus_driver_handle_message):
3316 Refactor code, put the message dispatching in its own file. Use
3317 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3320 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3322 * dbus/dbus-internals.h:
3323 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3325 * dbus/dbus-message.c: (dbus_message_get_sender):
3326 * dbus/dbus-message.h:
3327 Implement dbus_message_get_sender.
3329 * dbus/dbus-protocol.h:
3330 Add message and service defines.
3332 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3334 * dbus/dbus-connection.c: (dbus_connection_send_message):
3335 * dbus/dbus-message-internal.h:
3336 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3337 (dbus_message_write_header):
3338 Remove _dbus_messag_unlock and don't set the client serial on a
3339 message if one already exists.
3341 2003-01-24 Havoc Pennington <hp@pobox.com>
3343 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3346 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3349 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3351 * dbus/dbus-list.c: (alloc_link), (free_link):
3352 Use a memory pool for the links.
3354 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3356 * bus/connection.c: (bus_connection_foreach):
3358 Add new bus_connection_foreach function.
3360 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3361 Add function that broadcasts a message to all clients.
3363 (bus_driver_send_service_created), (bus_driver_handle_hello),
3364 (bus_driver_send_welcome_message),
3365 (bus_driver_handle_list_services), (bus_driver_message_handler):
3366 Implement functions that take care of listing services, and notifying
3367 clients when new services are created.
3369 * bus/services.c: (bus_services_list):
3371 Add new function that returns an array of strings with the currently
3372 registered services.
3375 * glib/dbus-gmain.c:
3376 Update copyright year.
3378 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3380 * dbus/dbus-connection.c: (dbus_connection_send_message):
3381 Unlock the message in case it was sent earlier.
3383 (dbus_connection_send_message_with_reply_and_block):
3384 Remove the reply message from the list.
3386 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3387 Set array_len and new_pos correctly.
3389 (_dbus_marshal_test):
3390 Remove debug output.
3392 * dbus/dbus-message-internal.h:
3393 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3394 New function that returns the reply serial.
3396 (_dbus_message_unlock):
3397 New function that unlocks a message and resets its header.
3399 (dbus_message_append_string_array),
3400 (dbus_message_get_fields_valist),
3401 (dbus_message_iter_get_field_type),
3402 (dbus_message_iter_get_string_array),
3403 (dbus_message_get_fields),
3404 (dbus_message_append_fields_valist):
3405 Handle string arrays.
3407 (dbus_message_set_sender):
3408 Make this function public since the bus daemon needs it.
3410 (decode_header_data):
3411 Set the reply serial to -1 initially.
3413 * dbus/dbus-message.h:
3414 Add dbus_message_set_sender.
3416 2003-01-24 Havoc Pennington <hp@pobox.com>
3418 * doc/dbus-specification.sgml: add some stuff
3420 2003-01-22 Havoc Pennington <hp@pobox.com>
3422 * doc/dbus-specification.sgml: Start to document the protocol.
3424 2003-01-22 Havoc Pennington <hp@pobox.com>
3426 * dbus/dbus-connection.c
3427 (dbus_connection_send_message_with_reply_and_block): add some @todo
3429 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3431 2003-01-21 Havoc Pennington <hp@pobox.com>
3433 (patch untested because can't compile)
3435 * bus/driver.c (create_unique_client_name): make this function
3436 never recycle client names. Also, caller should initialize
3439 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3441 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3443 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3444 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3445 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3446 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3447 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3448 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3449 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3450 * dbus/dbus-marshal.h:
3451 * dbus/dbus-protocol.h:
3452 Add support for marshalling and demarshalling integer, double
3455 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3460 * bus/connection.c: (connection_disconnect_handler):
3461 Remove the connection from the bus driver's list.
3463 (connection_watch_callback): Dispatch messages.
3465 (free_connection_data): Free connection name.
3467 (bus_connection_setup): Add connection to the bus driver's list.
3468 (bus_connection_remove_owned_service):
3469 (bus_connection_set_name), (bus_connection_get_name):
3470 Add functions for setting and getting the connection's name.
3473 Add function headers.
3475 * bus/driver.c: (create_unique_client_name),
3476 (bus_driver_handle_hello_message),
3477 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3478 (bus_driver_add_connection), (bus_driver_remove_connection):
3481 * bus/services.c: (bus_service_free):
3483 New file that handles communication and registreation with the bus
3486 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3488 * dbus/dbus-connection.c: (dbus_connection_send_message):
3489 Add a new client_serial parameter.
3491 (dbus_connection_send_message_with_reply):
3492 Remove a @todo since we've implemented the blocking function.
3494 (dbus_connection_send_message_with_reply_and_block):
3495 New function that sends a message and waits for a reply and
3496 then returns the reply.
3498 * dbus/dbus-connection.h:
3501 * dbus/dbus-errors.c: (dbus_result_to_string):
3502 * dbus/dbus-errors.h:
3503 Add new DBUS_RESULT.
3505 * dbus/dbus-message-internal.h:
3506 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3507 (_dbus_message_set_sender), (dbus_message_write_header),
3508 (dbus_message_new_reply), (decode_header_data),
3509 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3510 * dbus/dbus-message.h:
3511 Add new functions that set the reply serial and sender.
3512 Also marshal and demarshal them correctly and add test.
3514 * dbus/dbus-protocol.h:
3515 Add new DBUS_MESSAGE_TYPE_SENDER.
3518 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3519 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3520 (dbus_connection_hookup_with_g_main):
3521 * glib/test-dbus-glib.c: (main):
3522 Rewrite to use GIOChannel and remove the GSource crack.
3524 * test/echo-client.c: (main):
3525 * test/watch.c: (check_messages):
3526 Update for changed APIs
3528 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3530 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3532 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3533 Create a DBusTimeoutList.
3534 (dbus_connection_set_timeout_functions): Add new function to
3535 set timeout callbacks
3537 * dbus/dbus-connection.h: Add public DBusTimeout API.
3539 * dbus/dbus-message.c: (dbus_message_get_service):
3540 * dbus/dbus-message.h: New function.
3542 * dbus/dbus-server.c: Fix small doc typo.
3544 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3546 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3548 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3549 of the string, just as long as specified.
3551 2003-01-19 Havoc Pennington <hp@pobox.com>
3553 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3556 * dbus/dbus-server.c (dbus_server_set_max_connections)
3557 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3558 keep track of current number of connections, and add API for
3559 setting a max (but haven't implemented enforcing the max yet)
3561 2003-01-18 Havoc Pennington <hp@pobox.com>
3563 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3564 reading/writing if read_watch != NULL or write_watch != NULL.
3566 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3567 the message loader code to actually load message->header and
3568 message->body into the newly-created message.
3570 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3573 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3574 (dbus_connection_get_max_message_size)
3575 (dbus_connection_set_max_live_messages_size)
3576 (dbus_connection_get_max_live_messages_size): implement some
3577 resource limitation functions
3579 * dbus/dbus-resources.c: new file implementing some of the
3580 resource limits stuff
3582 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3583 missing docs, add @todo to handle OOM etc.
3585 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3588 2003-01-18 Havoc Pennington <hp@pobox.com>
3590 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3591 connection if it hasn't been already.
3593 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3594 replace with DisconnectFunction.
3596 2003-01-18 Havoc Pennington <hp@pobox.com>
3598 Building --disable-verbose-mode --disable-asserts --disable-tests
3599 cuts the library from 112K to 45K or so
3601 * configure.in: check for varargs macro support,
3602 add --enable-verbose-mode, --enable-asserts.
3604 * dbus/dbus-internals.h (_dbus_assert): support
3606 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3608 2003-01-18 Havoc Pennington <hp@pobox.com>
3610 * dbus/dbus-test.c: include config.h so that tests actually run
3612 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3613 so the failure mode when that assumption fails will be plenty
3616 2003-01-18 Havoc Pennington <hp@pobox.com>
3618 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3620 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3623 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3624 since we don't want to use those in make check
3626 2003-01-15 Havoc Pennington <hp@redhat.com>
3632 2003-01-15 Havoc Pennington <hp@redhat.com>
3634 * test/Makefile.am: fix so that test source code ends up in the
3635 distribution on make distcheck
3637 2003-01-15 Havoc Pennington <hp@redhat.com>
3643 2003-01-15 Havoc Pennington <hp@redhat.com>
3645 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3646 fix build when --disable-tests
3648 * Makefile.am (EXTRA_DIST): put HACKING in here
3650 * HACKING: document procedure for making a tarball release.
3652 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3654 * bus/connection.c: (connection_error_handler),
3655 (bus_connection_setup):
3656 * bus/main.c: (main):
3657 Make sure that the DBusConnectionData struct is NULLed
3658 out to prevent a segfault.
3660 * dbus/dbus-errors.c: (dbus_result_to_string):
3661 * dbus/dbus-errors.h:
3662 * dbus/dbus-message.c: (dbus_message_get_fields),
3663 (dbus_message_get_fields_valist), (_dbus_message_test):
3664 * dbus/dbus-message.h:
3665 Make dbus_message_get_fields return a result code so we can
3666 track invalid fields as well as oom.
3668 2003-01-11 Havoc Pennington <hp@pobox.com>
3670 * configure.in: change --enable-test/--enable-ansi action-if-given
3671 to enable_foo=$enableval instead of enable_foo=yes
3673 2003-01-08 Havoc Pennington <hp@pobox.com>
3675 * dbus/dbus-string.c (_dbus_string_align_length): new function
3677 * dbus/dbus-test-main.c: move main() for test app here
3679 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3680 symbol to run tests, because dbus-test isn't in the main
3683 Code review nitpicks.
3685 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3686 for people with narrow emacs ;-). Assert client_serial was filled
3687 in. Assert message->name != NULL.
3688 (dbus_message_append_fields): have "first_field_type" arg separate
3689 from va list, needed for C++ binding that also uses varargs IIRC
3690 and helps with type safety
3691 (dbus_message_new): add @todo about using DBusString to store
3692 service/name internally
3693 (dbus_message_new): don't leak ->service and ->name on OOM later
3695 (dbus_message_unref): free the service name
3696 (dbus_message_get_fields): same change to varargs
3697 i.e. first_field_type
3698 (_dbus_message_loader_return_buffer): assert that the message data
3699 is aligned (if not it's a bug in our code). Put in verbose griping
3700 about why we set corrupted = TRUE.
3701 (decode_header_data): add FIXME that char* is evil. Was going to
3702 add FIXME about evil locale-specific string.h strncmp, but just
3703 switched to wacky string-as-uint32 optimization. Move check for
3704 "no room for field name" above get_const_data_len() to avoid
3705 assertion failure in get_const_data_len if we have trailing 2
3706 bytes or the like. Check for service and name fields being
3707 provided twice. Don't leak service/name on error. Require field
3708 names to be aligned to 4 bytes.
3710 * dbus/dbus-marshal.c: move byte swap stuff to header
3711 (_dbus_pack_int32): uscore-prefix
3712 (_dbus_unpack_int32): uscore-prefix
3713 (_dbus_unpack_uint32): export
3714 (_dbus_demarshal_string): add @todo complaining about use of
3716 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3717 handling allowing corrupt data to go unchecked
3719 2003-01-08 Havoc Pennington <hp@redhat.com>
3721 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3722 to the select() as needed for authentication. (should be using
3723 _dbus_poll() not select, but for another day)
3725 * dbus/dbus.h: include dbus/dbus-protocol.h
3727 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3729 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3732 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3734 * dbus/dbus-internals.c: (_dbus_type_to_string):
3735 New function that returns a string describing a type.
3737 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3738 * dbus/dbus-marshal.h:
3739 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3740 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3741 (dbus_message_iter_get_byte_array):
3742 * dbus/dbus-message.h:
3743 Add new convenience functions for appending and getting message fields.
3744 Also add demarshalling routines for byte arrays.
3746 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3748 * dbus/dbus-connection-internal.h:
3749 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3750 (_dbus_connection_get_next_client_serial),
3751 (dbus_connection_send_message):
3752 * dbus/dbus-internals.h:
3753 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3754 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3755 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3756 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3757 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3758 (_dbus_verbose_bytes), (_dbus_marshal_test):
3759 * dbus/dbus-marshal.h:
3760 * dbus/dbus-message-internal.h:
3761 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3762 (dbus_message_write_header), (_dbus_message_lock),
3763 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3764 (dbus_message_get_name), (dbus_message_append_int32),
3765 (dbus_message_append_uint32), (dbus_message_append_double),
3766 (dbus_message_append_string), (dbus_message_append_byte_array),
3767 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3768 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3769 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3770 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3771 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3772 (decode_header_data), (_dbus_message_loader_return_buffer),
3773 (message_iter_test), (_dbus_message_test):
3774 * dbus/dbus-message.h:
3775 * dbus/dbus-protocol.h:
3776 * dbus/dbus-test.c: (main):
3778 * glib/test-dbus-glib.c: (message_handler), (main):
3779 * test/echo-client.c: (main):
3780 * test/watch.c: (check_messages):
3781 Make messages sendable and receivable for real.
3783 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3785 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3786 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3787 * dbus/dbus-message.c: (dbus_message_append_int32),
3788 (dbus_message_append_uint32), (dbus_message_append_double),
3789 (dbus_message_append_string), (dbus_message_append_byte_array):
3790 Handle OOM restoration.
3792 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3794 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3795 (_dbus_demarshal_string), (_dbus_marshal_test):
3796 * dbus/dbus-marshal.h:
3797 * dbus/dbus-message.c: (dbus_message_get_name),
3798 Document these functions.
3800 (dbus_message_append_int32), (dbus_message_append_uint32),
3801 (dbus_message_append_double), (dbus_message_append_string),
3802 (dbus_message_append_byte_array):
3803 * dbus/dbus-message.h:
3804 Add functions for adding message fields of different types.
3806 * dbus/dbus-protocol.h:
3807 Add the different types.
3809 2003-01-05 Havoc Pennington <hp@pobox.com>
3811 * bus/connection.c: implement routines for handling connections,
3812 first thing is keeping a list of owned services on each connection
3813 and setting up watches etc.
3815 * bus/services.c: implement a mapping from service names to lists
3818 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3820 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3821 to use static mutexes for global data
3823 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3824 collection of functions to set/get application-specific data
3825 on the DBusConnection.
3827 2003-01-04 Havoc Pennington <hp@pobox.com>
3829 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3830 (_dbus_poll): new function
3832 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3835 * bus/loop.c: initial code for the daemon main loop
3837 2003-01-04 Havoc Pennington <hp@pobox.com>
3839 * test/watch.c (error_handler): make it safe if the error handler
3840 is called multiple times (if we s/error handler/disconnect
3841 handler/ we should just guarantee it's called only once)
3843 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3844 error handler on disconnect (it's quite possible we should
3845 just change the error handler to a "disconnect handler," I'm
3846 not sure we have any other meaningful errors)
3848 * configure.in: check for getpwnam_r
3850 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3851 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3852 mechanism as in SASL spec, using socket credentials
3854 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3855 (_dbus_send_credentials_unix_socket): new function
3857 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3859 (_dbus_write): only check errno if <0 returned
3860 (_dbus_write_two): ditto
3862 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3864 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3865 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3866 (_dbus_marshal_test):
3867 * dbus/dbus-marshal.h:
3868 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3869 to _dbus_marshal_utf8_string. Also fix some tests.
3871 2002-12-28 Harri Porten <porten@kde.org>
3873 * configure.in: added check for C++ compiler and a very cheesy
3874 check for the Qt integration
3876 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3878 * qt/Makefile.am: added
3880 * qt/.cvsignore: added
3882 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3883 latter, added #ifdef QT_THREAD_SUPPORT guard.
3885 * dbus/Makefile.am: added missing headers for make dist
3887 2002-12-28 Kristian Rietveld <kris@gtk.org>
3889 * dbus/Makefile.am: fixup export-symbols-regex.
3891 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3893 * acinclude.m4: Add this file and put the
3894 PKG_CHECK_MODULE macro in it.
3896 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3898 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3899 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3900 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3901 (_dbus_marshal_test):
3902 Make the demarshalling routines align the pos argument.
3903 Add string marshalling tests and fix the obvious bugs
3906 2002-12-26 Havoc Pennington <hp@pobox.com>
3908 * dbus/dbus-auth.c: fixes fixes fixes
3910 * dbus/dbus-transport-unix.c: wire up support for
3911 encoding/decoding data on the wire
3913 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3914 (_dbus_auth_decode_data): append to target string
3915 instead of nuking it.
3917 2002-12-26 Havoc Pennington <hp@pobox.com>
3919 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3920 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3923 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3924 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3925 now). Main point is because I wanted unpack_uint32 to implement
3927 (_dbus_verbose_bytes): new function
3929 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3931 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3932 mechanism to handle a corrupt message stream
3933 (_dbus_message_loader_new): fix preallocation to only prealloc,
3936 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3937 (_dbus_string_test): enhance tests for copy/move and fix the
3940 * dbus/dbus-transport-unix.c: Hold references in more places to
3941 avoid reentrancy problems
3943 * dbus/dbus-transport.c: ditto
3945 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3946 leak reference count in no-message case
3948 * test/watch.c (do_mainloop): handle adding/removing watches
3949 during iteration over the watches. Also, ref the connection/server
3950 stored on a watch, so we don't try to mangle a destroyed one.
3952 * dbus/dbus-transport-unix.c (do_authentication): perform
3955 * dbus/dbus-auth.c (get_state): add a state
3956 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3957 (_dbus_auth_get_unused_bytes): append the unused bytes
3958 to the passed in string, rather than prepend
3960 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3961 the auth conversation DBusAuth
3963 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3964 (_dbus_transport_new_for_domain_socket): when creating a
3965 transport, pass in whether it's a client-side or server-side
3966 transport so we know which DBusAuth to create
3968 2002-12-03 Havoc Pennington <hp@pobox.com>
3970 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3971 _after_ finalizing the derived members
3972 (unix_connection_set): unref watch if we fail to add it
3974 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3975 transport first, so that the connection owned by the
3976 transport will be valid as the transport finalizes.
3978 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3979 if necessary, and remove watches from the connection.
3981 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3983 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3985 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3986 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3987 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3988 (_dbus_marshal_test):
3989 * dbus/dbus-marshal.h:
3990 Add string marshal functions and have the demarshal functions
3991 return the new position.
3993 2002-12-25 Havoc Pennington <hp@pobox.com>
3995 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3996 it is a simple protocol that just maps directly to SASL.
3998 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3999 initial implementation, not actually used yet.
4001 * dbus/dbus-string.c (_dbus_string_find): new function
4002 (_dbus_string_equal): new function
4003 (_dbus_string_base64_encode): new function
4004 (_dbus_string_base64_decode): new function
4006 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4009 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4010 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4011 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4012 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4013 * dbus/dbus-marshal.h:
4014 * dbus/dbus-protocol.h:
4015 * dbus/dbus-test.c: (main):
4017 Add un-optimized marshalling/demarshalling routines.
4019 2002-12-25 Harri Porten <porten@kde.org>
4021 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4023 2002-12-24 Zack Rusin <zack@kde.org>
4025 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4026 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4029 2002-12-24 Havoc Pennington <hp@pobox.com>
4031 * glib/dbus-gthread.c: fix include
4033 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4034 I think glib API needs to change, though, as you don't
4035 want to use DBusMessageFunction, you want to use the
4036 DBusMessageHandler object. Probably
4037 dbus_connection_open_with_g_main_loop()
4038 and dbus_connection_setup_g_main_loop() or something like that
4039 (but think of better names...) that just create a connection
4040 that has watch/timeout functions etc. already set up.
4042 * dbus/dbus-connection.c
4043 (dbus_connection_send_message_with_reply): new function just to
4044 show how the message handler helps us deal with replies.
4046 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4048 * dbus/dbus-string.c (_dbus_string_test): free a string that
4051 * dbus/dbus-hash.c: use memory pools for the hash entries
4052 (rebuild_table): be more paranoid about overflow, and
4053 shrink table when we can
4054 (_dbus_hash_test): reduce number of sprintfs and write
4055 valid C89. Add tests for case where we grow and then
4056 shrink the hash table.
4058 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4060 * dbus/dbus-connection.c (dbus_connection_register_handler)
4061 (dbus_connection_unregister_handler): new functions
4063 * dbus/dbus-message.c (dbus_message_get_name): new
4065 * dbus/dbus-list.c: fix docs typo
4067 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4068 an object representing a handler for messages.
4070 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4073 * glib/dbus-gthread.c: (dbus_gthread_init):
4074 Don't use the gdbus prefix for public functions.
4076 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4080 Add GLib checks and fixup .pc files
4084 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4085 (gdbus_connection_check), (gdbus_connection_dispatch),
4086 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4087 (dbus_connection_gsource_new):
4088 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4089 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4090 * glib/test-dbus-glib.c: (message_handler), (main):
4093 2002-12-15 Harri Porten <porten@kde.org>
4095 * autogen.sh: check for libtoolize before attempting to use it
4097 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4100 * .cvsignore: ignore more stamp files
4102 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4104 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4105 without make install.
4107 2002-12-15 Havoc Pennington <hp@pobox.com>
4109 * dbus/dbus-threads.c: add thread stubs that a higher library
4110 layer can fill in. e.g. the GLib wrapper might fill them in with
4111 GThread stuff. We still need to use this thread API to
4112 thread-safe-ize the library.
4114 2002-12-12 Havoc Pennington <hp@pobox.com>
4116 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4117 below new interfaces and include fewer system headers.
4119 * dbus/dbus-sysdeps.c (_dbus_read): new function
4120 (_dbus_write): new function
4121 (_dbus_write_two): new function
4122 (_dbus_connect_unix_socket): new function
4123 (_dbus_listen_unix_socket): new function
4125 * dbus/dbus-message-internal.h: change interfaces to use
4128 2002-12-11 Havoc Pennington <hp@pobox.com>
4130 * dbus/dbus-types.h: add dbus_unichar
4132 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4134 * dbus/dbus-connection.c (dbus_connection_send_message): return
4137 * dbus/dbus-transport.c: include dbus-watch.h
4139 * dbus/dbus-connection.c: include dbus-message-internal.h
4141 * HACKING: add file with coding guidelines stuff.
4143 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4144 handling here, for security purposes (as in vsftpd). Not actually
4145 using this class yet.
4147 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4148 system/libc usage here, as in vsftpd, for ease of auditing (and
4149 should also simplify portability). Haven't actually moved all the
4150 system/libc usage into here yet.
4152 2002-11-25 Havoc Pennington <hp@pobox.com>
4154 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4155 always print the first verbose message.
4157 2002-11-24 Havoc Pennington <hp@pobox.com>
4159 * test/echo-client.c, test/echo-server.c: cheesy test
4162 * configure.in (AC_CHECK_FUNCS): check for writev
4164 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4167 * dbus/dbus-list.c (_dbus_list_foreach): new function
4169 * dbus/dbus-internals.c (_dbus_verbose): new function
4171 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4172 representing a server that listens for connections.
4174 * dbus/.cvsignore: create
4176 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4177 public API for reporting errors
4179 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4180 public object representing a connection that
4181 sends/receives messages. (Same object used for
4182 both client and server.)
4184 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4185 Basic abstraction for different kinds of stream
4186 that we might read/write messages from.
4188 2002-11-23 Havoc Pennington <hp@pobox.com>
4190 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4193 * dbus/dbus-test.c (main): add list test, and include
4194 dbus-test.h as intended
4196 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4197 (_dbus_hash_table_remove_int): return value indicates
4198 whether the entry existed to remove
4200 * dbus/dbus-list.c: add linked list utility class,
4203 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4206 2002-11-23 Havoc Pennington <hp@pobox.com>
4208 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4209 DBUS_END_DECLS to nothing, that should fix this once and for all
4211 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4213 * dbus/dbus-message.c, dbus/dbus-hash.c:
4214 add some missing @brief
4216 2002-11-23 Havoc Pennington <hp@pobox.com>
4218 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4219 to avoid confusing Doxygen
4221 * dbus/dbus-hash.c: @} not }@
4223 * dbus/dbus-message.c (struct DBusMessage): split out
4226 2002-11-23 Havoc Pennington <hp@pobox.com>
4228 * configure.in: pile on more warning flags if using gcc
4230 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4231 to document static functions
4233 * configure.in: add summary to end of configure so it
4234 looks nice and attractive
4236 * dbus/dbus-hash.c: finish implementation and write unit
4239 * configure.in: add --enable-tests to enable unit tests
4241 * dbus/dbus-test.c: test program to run unit tests
4242 for all files in dbus/*, initially runs a test for
4245 * dbus/dbus-internals.h: file to hold some internal utility stuff
4247 2002-11-22 Havoc Pennington <hp@redhat.com>
4249 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4250 "ported" away from Tcl
4252 * dbus/dbus-types.h: header for types such as dbus_bool_t
4254 2002-11-22 Havoc Pennington <hp@redhat.com>
4256 * dbus/dbus.h: fixups for doc warnings
4258 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4260 (QUIET): make it quiet so we can see warnings
4262 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4264 2002-11-22 Havoc Pennington <hp@redhat.com>
4266 * Makefile.am: include "Doxyfile" target in all-local
4268 * configure.in: generate the Doxyfile
4270 * Doxyfile.in: move Doxyfile here, so we can use
4271 configure to generate a Doxyfile with the right
4274 2002-11-22 Havoc Pennington <hp@redhat.com>
4276 * dbus/dbus-message.c: move inline docs into .c file
4278 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4279 so all docs are under doc/
4280 (MAN_EXTENSION): generate man pages. Use extension
4281 ".3dbus" which matches ".3qt" on my system,
4282 I guess this is OK, I don't know really.
4283 (FILE_PATTERNS): look for .c files not .h, makes sense
4286 2002-11-22 Havoc Pennington <hp@pobox.com>
4288 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4289 because any app can be a server, and any app can be a client,
4290 the bus is a special kind of server.
4292 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4294 * Doxyfile : adding. Still needs Makefile rules to be generated
4295 automatically (just run "doxygen" in the toplevel dir for now to
4298 * dbus/dbus-message.h : Adding sample docs (javadoc since
4299 resembles gtk-doc a little more)
4301 * dbus/dbus.h : Adding sample docs
4303 2002-11-21 Havoc Pennington <hp@redhat.com>
4305 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4306 so we can allow ourselves to include files directly,
4307 instead of having to use dbus.h
4309 * dbus/dbus.h: fill in
4311 * dbus/dbus-message.h: sketch out a sample header file.
4312 Include griping if you include it directly instead of
4315 * dbus/dbus-macros.h: new file with macros for extern "C",
4316 TRUE/FALSE, NULL, etc.
4318 * doc/file-boilerplate.c: put include guards in here
4320 2002-11-21 Havoc Pennington <hp@redhat.com>
4322 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4324 * COPYING: include the GPL as well, and license code
4325 under both AFL and GPL.
4327 2002-11-21 Havoc Pennington <hp@redhat.com>
4329 * acconfig.h: get rid of this
4331 * autogen.sh (run_configure): add --no-configure option
4333 * configure.in: remove AC_ARG_PROGRAM to make
4334 autoconf complain less. add AC_PREREQ.
4335 add AC_DEFINE third arg.
4337 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4340 Fix references so we can distcheck.
4342 2002-11-21 Havoc Pennington <hp@redhat.com>
4344 * Initial module creation