1 2003-04-22 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4 support, and do some code cleanups to share more code and
5 speed up array marshal/demarshal.
7 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
9 * configure.in: generate dbus-arch-deps.h
11 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
14 2003-04-22 Havoc Pennington <hp@redhat.com>
16 * test/data/valid-messages/opposite-endian.message: fix test
17 to use proper type for rply field
19 * test/data/invalid-messages: add tests for below validation
21 * dbus/dbus-message.c (decode_header_data): validate field types,
22 and validate that named fields are valid names
23 (decode_name_field): consider messages in the
24 org.freedesktop.Local. namespace to be invalid.
26 * dbus/dbus-string.c (_dbus_string_validate_name): new
28 2003-04-19 Havoc Pennington <hp@pobox.com>
30 * bus/driver.c (bus_driver_handle_hello): check limits and
31 return an error if they are exceeded.
33 * bus/connection.c: maintain separate lists of active and inactive
34 connections, and a count of each. Maintain count of completed
35 connections per user. Implement code to check connection limits.
37 * dbus/dbus-list.c (_dbus_list_unlink): export
39 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
40 number of bytes in the message queue for a connection
42 2003-04-18 Havoc Pennington <hp@pobox.com>
44 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
46 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
49 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
50 on realloc be sure to update the pointer in the keyring
52 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
53 offset to avoid writing to unallocated memory
55 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
56 try the next mechanism, so we properly handle OOM
58 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
60 (_dbus_keyring_new): fix OOM bug
61 (_dbus_keyring_new_homedir): always set error; impose a maximum
62 number of keys we'll load from the file, mostly to speed up the
63 test suite and make its OOM checks more useful, but also for
66 * dbus/dbus-auth.c (process_error_server): reject authentication
67 if we get an error from the client
68 (process_cancel): on cancel, send REJECTED, per the spec
69 (process_error_client): send CANCEL if we get an error from the
72 2003-04-18 Havoc Pennington <hp@pobox.com>
74 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
77 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
80 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
81 about DBUS_TEST_HOMEDIR once
83 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
86 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
87 config file so we test the right thing
89 Throughout: assorted docs improvements
91 2003-04-18 Havoc Pennington <hp@pobox.com>
93 * glib/dbus-gmain.c: adapt to watch changes
95 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
97 * dbus/dbus-server.h: remove dbus_server_handle_watch
99 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
101 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
102 like DBusTimeout, so we don't need dbus_connection_handle_watch
105 2003-04-17 Havoc Pennington <hp@redhat.com>
107 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
108 database usage so it all goes via the DBusUserDatabase cache.
110 2003-04-17 Havoc Pennington <hp@redhat.com>
112 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
113 there was an OOM watch we skipped, we always return TRUE so we
114 iterate again to have a look at it again. Fixes test suite hang.
115 Code rearrangement also lets us lose some memset and only iterate
118 * bus/driver.c (bus_driver_handle_message): sense of test for
121 2003-04-16 Havoc Pennington <hp@pobox.com>
123 * doc/dbus-specification.sgml: make spec say serials are unsigned
125 * dbus/dbus-message.h: change message serials to unsigned
127 * dbus/dbus-connection.c: adapt to message serials being unsigned
129 2003-04-15 Havoc Pennington <hp@pobox.com>
131 * bus/bus.c: create and keep around a shared DBusUserDatabase
134 * bus/connection.c (bus_connection_get_groups): don't cache
135 groups for user in the connection object, since user database
136 object now does that.
138 2003-04-16 Havoc Pennington <hp@redhat.com>
140 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
141 list of size counters
142 (_dbus_message_loader_putback_message_link): put back a popped link
144 * dbus/dbus-connection.c
145 (dbus_connection_set_max_live_messages_size): rename
147 (dbus_connection_get_outgoing_size): get size of outgoing
149 (_dbus_connection_set_connection_counter): remove this cruft
151 2003-04-14 Havoc Pennington <hp@redhat.com>
153 * dbus/dbus-userdb.c: user database abstraction, mostly to get
154 caching, but at some point we might want to be able to use a
157 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
158 SHA1 conf file to test the sha1 auth mechanism, since the regular
159 test always uses EXTERNAL when available.
162 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
163 add conf file that requires use of sha1 auth
165 2003-04-13 Havoc Pennington <hp@pobox.com>
167 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
168 from Philip Blundell to send messages and monitor them.
170 2003-04-13 Havoc Pennington <hp@pobox.com>
172 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
175 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
178 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
179 fix to only recover unused bytes if we're already authenticated
180 (_dbus_transport_get_is_authenticated): fix to still mark us
181 authenticated if there are unused bytes.
183 * bus/dispatch.c: implement security policy checking
185 * bus/connection.c (bus_transaction_send_from_driver): new
187 * bus/bus.c (bus_context_check_security_policy): new
189 * bus/dispatch.c (send_service_nonexistent_error): delete this,
190 now we just set the DBusError and it gets converted to an error
193 * bus/connection.c (allow_user_function): enable code using actual
194 data from the config file
196 * bus/policy.c (list_allows_user): handle wildcard rules for
197 user/group connection perms
199 2003-04-13 Havoc Pennington <hp@pobox.com>
201 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
203 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
205 * bus/policy.c (bus_policy_append_mandatory_rule)
206 (bus_policy_append_default_rule, bus_policy_append_user_rule)
207 (bus_policy_append_group_rule): new functions
209 2003-04-12 Havoc Pennington <hp@pobox.com>
211 * bus/config-parser.c (bus_config_parser_new): fix a memleak
213 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
214 the pid/gid/uid, just for paranoia.
216 * test/break-loader.c (randomly_do_n_things): find a byte
217 containing a type code, and randomly change it to a different
220 2003-04-12 Havoc Pennington <hp@pobox.com>
222 * bus/policy.h: change BusPolicy to be the thing from the config
223 file, and rename old BusPolicy to BusClientPolicy
225 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
226 match change in how policy works
228 * dbus/dbus-internals.h: mark assert_not_reached as
229 __attribute((noreturn))__
231 2003-04-11 Havoc Pennington <hp@redhat.com>
233 * doc/dbus-specification.sgml: fix a spot with the wrong name for
234 the broadcast service. Use boolean return for ServiceExists.
236 2003-04-11 Havoc Pennington <hp@redhat.com>
238 * configure.in: add another directory to look for qt in.
240 2003-04-11 Havoc Pennington <hp@redhat.com>
242 * AUTHORS: add Colin Walters
244 2003-04-11 Havoc Pennington <hp@redhat.com>
250 2003-04-11 Havoc Pennington <hp@redhat.com>
252 * bus/messagebus.in: remove pid file when stopping the
253 message bus, since the bus won't have privileges to remove it
256 2003-04-11 Havoc Pennington <hp@redhat.com>
258 * bus/bus.c (bus_context_new): move credentials change after
261 2003-04-11 Havoc Pennington <hp@pobox.com>
263 * test/decode-gcov.c: add "below average functions" to the
264 coverage report, and change how some of the code works.
266 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
267 not in the coverage stats.
269 * test/test-service.c (main): use _dbus_verbose not fprintf in a
270 couple places so running the test suite doesn't result in megaspam.
272 2003-04-11 Havoc Pennington <hp@pobox.com>
274 * bus/dispatch.c (check_existent_service_activation): accept a no
275 memory error in a place we didn't before
277 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
278 in case the first one failed," since the test suite is less
281 2003-04-10 Havoc Pennington <hp@pobox.com>
283 * bus/dispatch.c (check_segfault_service_activation): add test
284 for launching an executable that just crashes.
286 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
287 don't leave a million cores. We'll see how portable this is.
289 2003-04-10 Havoc Pennington <hp@pobox.com>
291 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
292 the possible parent failures before we fork, so that we don't
293 fail to create a babysitter after creating the child.
295 * bus/activation.c (bus_activation_activate_service): kill child
296 if we don't successfully complete the activation.
298 2003-04-10 Havoc Pennington <hp@redhat.com>
300 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
301 the connection if it's disconnected
303 * bus/activation.c (bus_activation_service_created): use new
304 transaction features to roll back removal of pending activation if
305 we don't successfully create the service after all. Don't remove
306 pending activation if the function fails.
308 * dbus/dbus-list.c (_dbus_list_insert_before_link)
309 (_dbus_list_insert_after_link): new code to facilitate
312 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
313 new functionality, so we can preallocate the ability to insert
316 * bus/connection.c (bus_transaction_add_cancel_hook): new function
317 allowing us to put custom hooks in a transaction to be used for
318 cancelling said transaction
320 * doc/dbus-specification.sgml: add some discussion of secondary
321 service owners, and disallow zero-length service names
323 * bus/services.c (bus_registry_acquire_service): new function,
324 splits out part of bus_driver_handle_acquire_service() and fixes
325 a bug where we didn't remove the service doing the acquiring
326 from the secondary queue if we failed to remove the current owner
327 from the front of the queue.
329 2003-04-10 Alexander Larsson <alexl@redhat.com>
331 * doc/dbus-specification.sgml:
332 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
334 2003-04-10 Alexander Larsson <alexl@redhat.com>
339 Added files to cvsignore
341 * dbus/dbus-message.h:
342 * dbus/dbus-message.c: (dbus_message_iter_get_named):
343 Make get_named() take two out argument and return a boolean.
344 (dbus_message_iter_get_args_valist):
345 Update usage of get_named().
346 (dbus_message_iter_append_byte):
348 (dbus_message_iter_append_named)
350 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
353 2003-04-10 Alexander Larsson <alexl@redhat.com>
355 * dbus/dbus-marshal.[ch]:
356 Add array_type_pos argument to _dbus_marshal_validate_arg.
357 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
359 * dbus/dbus-message.[ch]:
360 Multi-dimensional arrays have full type specification in the
361 outermost array. Iter code re-arranged to handle this.
362 Added some more iter tests.
364 * doc/dbus-specification.sgml:
367 Update new array encoding description.
368 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
370 * test/data/invalid-messages/array-with-mixed-types.message:
371 * test/data/valid-messages/array-of-array-of-uint32.message:
372 Change to the new array format.
374 * test/data/invalid-messages/too-short-dict.message:
377 * test/data/valid-messages/recursive-types.message:
378 Fix up and extend test.
380 2003-04-10 Havoc Pennington <hp@pobox.com>
382 * bus/dispatch.c: lots of fixes
384 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
385 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
386 that was crack, broke the test service.
388 * dbus/dbus-transport.c (_dbus_transport_open): fix error
389 handling to avoid piling up errors if we get a failure on the
392 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
393 pid in assertion failures.
395 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
396 to some fixed size of file descriptor array. Don't return TRUE
397 anytime a timeout exists, that led to lots of busy loop silliness
400 2003-04-09 Havoc Pennington <hp@redhat.com>
402 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
403 I'd checked this in earlier but hadn't.
405 2003-04-09 Havoc Pennington <hp@redhat.com>
407 * bus/dispatch.c (bus_dispatch_test): get a bit further through
408 the activation test (man this is getting old!)
410 2003-04-09 Havoc Pennington <hp@redhat.com>
412 * test/test-utils.c: use dispatch status function to fix this up
414 * bus/connection.c (connection_watch_callback): don't dispatch
416 (connection_timeout_callback): don't dispatch from here
417 (bus_connections_setup_connection): set the dispatch status function
418 (bus_connection_disconnected): unset it
420 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
421 used to add a connection to be dispatched
422 (_dbus_loop_iterate): do the dispatching at the end of each
425 * dbus/dbus-connection.c
426 (dbus_connection_set_dispatch_status_function): new function
427 allowing us to fix up main loop usage
428 (_dbus_connection_last_unref): free all the various function
430 (dbus_connection_dispatch): call the DispatchStatusFunction
431 whenever this function returns
432 (dbus_connection_handle_watch): call DispatchStatusFunction
433 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
434 (reply_handler_timeout): call DispatchStatusFunction
435 (dbus_connection_flush): call DispatchStatusFunction
437 2003-04-09 Havoc Pennington <hp@redhat.com>
439 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
442 * bus/dispatch.c (check_service_activated): fix bug in test
444 * dbus/dbus-mainloop.c (check_timeout): fix this up
446 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
447 verbose output so we can sort out output from different processes,
448 e.g. in the activation case.
450 2003-04-08 Colin Walters <walters@gnu.org>
452 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
454 (bus_context_new): Set it.
455 (bus_context_unref): Use it to delete the pid file.
457 2003-04-08 Havoc Pennington <hp@redhat.com>
459 * test/data/invalid-messages/array-with-mixed-types.message:
460 regression test that fails for the moment
462 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
463 tests for convenience
465 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
466 array of nil, it broke things.
468 * test/data/invalid-messages/array-of-nil.message: regression test
470 * test/data/valid-messages/array-of-array-of-uint32.message:
471 happened to write this so added it to suite
473 2003-04-08 Havoc Pennington <hp@redhat.com>
475 * bus/driver.c (bus_driver_handle_acquire_service): init
476 retval/reply before checking name
478 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
479 recursion depth argument
481 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
482 in the public struct for future extension
484 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
487 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
490 * doc/dbus-specification.sgml: fix typo
492 2003-04-08 Alexander Larsson <alexl@redhat.com>
494 Implemented recursive types, named types and new-style iters
497 * glib/test-thread-client.c: (thread_func):
498 * glib/test-thread-server.c: (handle_test_message):
499 * test/test-service.c: (handle_echo):
508 * dbus/dbus-internals.c: (_dbus_type_to_string):
509 Update for new types.
511 * dbus/dbus-marshal.[ch]:
512 Implement recursive types and the new marshalling format.
513 Remove hardcoded dict marshalling.
516 * dbus/dbus-message-builder.c:
518 Remove references to old types
520 * dbus/dbus-message.[ch]:
521 New non-refcounted iter API that supports recursive iters.
522 Use iters for appending, including support for recursive
524 Add byte and named type support.
525 Update everything to new marshalling formats.
526 Add tests for new API.
528 * dbus/dbus-protocol.h:
529 Remove old array types.
530 Add types: BYTE, ARRAY, DICT, NAMED
532 * dbus/dbus-string.c:
533 * dbus/dbus-sysdeps.c:
534 Make parse_double locale safe.
536 * dbus/dbus-test-main.c:
542 * doc/dbus-specification.sgml:
545 * test/data/incomplete-messages/missing-body.message:
546 * test/data/invalid-messages/bad-boolean.message:
547 * test/data/invalid-messages/bad-boolean-array.message:
548 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
549 * test/data/invalid-messages/boolean-has-no-value.message-raw:
550 * test/data/invalid-messages/too-short-dict.message:
551 * test/data/valid-messages/dict-simple.message:
552 * test/data/valid-messages/dict.message:
553 * test/data/valid-messages/emptiness.message:
554 * test/data/valid-messages/lots-of-arguments.message:
555 * test/data/valid-messages/no-padding.message:
556 * test/data/valid-messages/recursive-types.message:
557 Add missing NAME fields
558 Fix up dicts & arrays
560 * test/data/invalid-messages/dict-with-nil-value.message:
561 Removed, this is not invalid anymore.
563 * test/data/valid-messages/recursive-types.message:
564 Add new test for deeply recursive types.
566 2003-04-07 Havoc Pennington <hp@pobox.com>
568 * bus/driver.c (bus_driver_handle_acquire_service): return an
569 error if you try to acquire a service that starts with ':'
571 2003-04-07 Havoc Pennington <hp@redhat.com>
573 * doc/dbus-specification.sgml: require that base service names
574 start with ':' and that the base service is created/deleted
575 as first and last things a connection does on the bus
577 * bus/dispatch.c (check_existent_service_activation): lots more
578 work on the activation test; it doesn't fully pass yet...
580 * test/test-service.c (main): fix so we don't memleak the
581 connection to the message bus
582 (filter_func): accept a message asking us to exit
584 2003-04-06 Havoc Pennington <hp@pobox.com>
586 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
589 * configure.in: fixes to Qt detection from Colin Walters
591 * doc/Makefile.am: Only remove generated docbook dirs if they
592 exist, from Colin Walters
594 * dbus/dbus-bus.c: change how we set well-known connections to
595 NULL, so that it works if a single connection is stored in
596 two well-known array slots.
598 * test/Makefile.am: remove a lot of stuff that isn't immediately
599 useful, it's in CVS history if we want it.
601 * test/test-service.c: use dbus-mainloop instead of that
604 2003-04-06 Havoc Pennington <hp@pobox.com>
606 * dbus/Makefile.am: split lists of sources into stuff that goes in
607 the library, util functions that go in the lib and are also used
608 elsewhere, and util functions that are used in tests/daemon but
611 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
612 here so it can be used in test binaries also
614 2003-04-06 Havoc Pennington <hp@pobox.com>
616 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
617 here in the parent process, so we can return an error if it
618 fails. Also, move some of the code into the child so the parent
619 is less hosed if we fail midway through.
621 * bus/bus.c (bus_context_new): move pidfile detection further up
622 in the function, before we start overwriting sockets and such.
624 * bus/messagebus.in: adjust this a bit, not sure if it will work.
626 * configure.in: add --with-system-pid-file and --with-system-socket
628 2003-04-06 Colin Walters <walters@verbum.org>
630 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
632 * bus/system.conf.in: Declare a pidfile.
634 * bus/bus.c (bus_context_new): Test for an existing pid file, and
635 create one (if appropriate).
637 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
638 (struct BusConfigParser) [pidfile]: New.
639 (element_type_to_name, merge_included, start_busconfig_child)
640 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
641 (bus_config_parser_unref): Free it.
642 (bus_config_parser_get_pidfile): New function.
644 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
646 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
648 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
650 * dbus/dbus-sysdeps.h: Prototype it.
652 2003-04-06 Havoc Pennington <hp@pobox.com>
654 * bus/bus.c (bus_context_new): print the address in here, rather
655 than in main(), because we need to do it before forking the daemon
657 * bus/dispatch.c (send_service_nonexistent_error): set the sender
658 on the service nonexistent error
660 * bus/driver.c (bus_driver_handle_acquire_service): set the
661 sender on the AcquireService reply
663 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
664 server also listen on a UNIX socket so services can connect to it.
666 2003-04-06 Havoc Pennington <hp@pobox.com>
668 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
669 so it detects deadlocks and also we actually init threads when
672 2003-04-06 Havoc Pennington <hp@pobox.com>
674 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
675 save the domain socket name, and unlink it when we disconnect the
676 server. Means that at least when we exit normally, we won't leave
677 a bunch of junk in /tmp
679 * dbus/dbus-transport-unix.c
680 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
681 memory management). (I was making a real change here but then
684 2003-04-06 Havoc Pennington <hp@pobox.com>
686 * bus/bus.c (bus_context_new): fix wrong handling of
687 server_data_slot_unref() in the error case.
689 * dbus/dbus-internals.h (_dbus_assert): change so it passes
690 "(condition) != 0" to _dbus_real_assert so that
691 "_dbus_assert (pointer)" doesn't cause a warning
693 * bus/main.c (main): accept --print-address option to print out
694 the message bus address
696 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
698 * dbus/dbus-transport.c (_dbus_transport_open): special error for
699 "tmpdir" option to unix: address on client side
701 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
704 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
705 we can use to create sockets in the test suite.
707 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
708 cleanly. To be used for testing.
710 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
712 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
714 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
715 handle trying to call this when there's no servers active
717 2003-04-05 Havoc Pennington <hp@pobox.com>
723 2003-04-05 Havoc Pennington <hp@pobox.com>
725 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
726 crash on startup. Need to get "try starting the daemon"
727 in the test suite I guess. ;-)
729 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
730 tracked the number of open connections; it's better done in
731 application-specific code as you want it to span all servers etc.
733 2003-04-05 Havoc Pennington <hp@pobox.com>
735 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
736 patch from Colin Walters
738 2003-04-05 Havoc Pennington <hp@pobox.com>
740 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
741 reality; in fact multiple mechanisms are allowed.
743 * dbus/dbus-internals.c (_dbus_real_assert)
744 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
745 _dbus_assert_not_reached() into functions, so that they don't show
746 up in basic block counts for test coverage, and don't use up as
747 much disk space. Does mean slower execution speed though, so
748 assumes --disable-asserts is the normal production case.
750 2003-04-05 Havoc Pennington <hp@pobox.com>
752 * test/Makefile.am (dist-hook): also dist *.in files
758 2003-04-05 Havoc Pennington <hp@pobox.com>
760 * dbus/dbus-string.c: docs warning
762 * dbus/dbus-spawn.c: missing docs
764 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
766 2003-04-05 Havoc Pennington <hp@pobox.com>
768 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
771 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
772 to -1 once we've reaped the babysitter
773 (_dbus_babysitter_handle_watch): do as much work as we can, not
776 * bus/activation.c: add code using DBusBabysitter so that we
777 handle it when a service fails to start up properly.
778 (bus_activation_service_created): don't remove the activation
779 entries as we go, just let them get removed when we free the pending
780 activation. Unref reply messages after sending them.
782 2003-04-05 Havoc Pennington <hp@pobox.com>
784 * test/decode-gcov.c (main): print per-directory stats in the report
786 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
788 2003-04-05 Havoc Pennington <hp@pobox.com>
790 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
792 * test/decode-gcov.c: hack up a little program to suck data
793 out of gcov files. Yes this is sort of silly.
795 * configure.in: define something in config.h and do an
796 AM_CONDITIONAL when gcov is enabled
798 2003-04-04 Havoc Pennington <hp@redhat.com>
800 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
801 return a "babysitter" object that is used to monitor the status of
802 the spawned process and reap it when required.
804 * test/test-segfault.c, test/test-exit.c,
805 test/test-sleep-forever.c: binaries that do various lame things,
806 used in the test suite.
808 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
810 2003-04-03 Havoc Pennington <hp@pobox.com>
812 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
813 in preparation for modifying it, dbus-sysdeps is getting
816 2003-04-03 Havoc Pennington <hp@redhat.com>
818 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
821 * bus/*.[hc]: adapt to mainloop change
823 2003-04-03 Havoc Pennington <hp@redhat.com>
825 * bus/activation.c (load_directory): fix up memleaks
826 (bus_activation_entry_free): free the entry
828 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
829 we get one from the message bus; fix memleaks.
831 * dbus/dbus-message.c (dbus_set_error_from_message): new function
833 2003-04-03 Havoc Pennington <hp@pobox.com>
835 * bus/config-parser.c (bus_config_parser_unref): free
836 list of mechanisms, bug discovered by test suite enhancements
837 (putting system.conf and session.conf into suite)
839 * test/Makefile.am, test/test-service.c: add placeholder for a
840 test service that we'll activate as part of test suite. Doesn't
843 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
844 setting NULL value, and use system malloc not dbus_malloc()
845 when we have unavoidable memleakage.
847 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
848 didn't work, and support DBUS_BUS_ACTIVATION.
850 * bus/activation.c (child_setup): pass our well-known bus type to
853 * bus/config-parser.c: support <type> to specify well-known type
855 * doc/dbus-specification.sgml: document the env variables to
856 locate well-known buses and find service activator
858 2003-04-02 Havoc Pennington <hp@redhat.com>
860 * test/Makefile.am (all-local): add a rule to copy tests to
861 builddir, so we can have generated tests. Use this to remove the
862 silly hack for testing system.conf and session.conf. Will use this
863 shortly to generate .service files pointing to test binaries.
865 2003-04-02 Havoc Pennington <hp@redhat.com>
867 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
868 current alloc and needed new length, not max of the doubled
869 allocation and needed new length. Also, when building tests,
870 don't do the double-allocation stuff, just realloc every time.
872 2003-04-02 Havoc Pennington <hp@redhat.com>
874 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
876 (_dbus_string_get_dirname): new
877 (_dbus_sysdeps_test): new
878 (_dbus_directory_open): include dirnames in error messages
880 * bus/config-parser.c: interpret <include> and <includedir> and
881 <servicedir> relative to config file location if the given
882 filename is not absolute.
884 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
886 2003-04-02 Havoc Pennington <hp@redhat.com>
888 * bus/connection.c (bus_transaction_send_error_reply): set sender
889 service for the error, and unref the reply on success
891 * bus/activation.c: convert to use BusTransaction so OOM can be
893 (bus_activation_service_created): set sender of the message
895 2003-04-01 Havoc Pennington <hp@redhat.com>
897 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
898 <includedir> (at least mostly)
900 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
901 first, then the user ID
903 2003-04-01 Havoc Pennington <hp@pobox.com>
905 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
908 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
910 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
912 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
913 socket 0777, and unlink any existing socket.
915 * bus/bus.c (bus_context_new): change our UID/GID and fork if
916 the configuration file so specifies; set up auth mechanism
919 * bus/config-parser.c (bus_config_parser_content): add support
920 for <fork> option and fill in code for <auth>
922 * bus/system.conf.in: add <fork/> to default configuration,
923 and limit auth mechanisms to EXTERNAL
925 * doc/config-file.txt (Elements): add <fork>
927 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
928 (_dbus_change_identity): new function
930 2003-03-31 Havoc Pennington <hp@redhat.com>
932 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
933 (_dbus_listen_unix_socket): fix off-by-one error in null
934 termination spotted by Nalin
936 2003-03-31 Havoc Pennington <hp@redhat.com>
938 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
939 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
940 having a real home directory available.
942 2003-03-31 Havoc Pennington <hp@redhat.com>
944 * bus/Makefile.am (install-data-hook): create /var/run/dbus
946 * bus/messagebus.in: add init script for Red Hat /etc/init.d
948 * configure.in: add support for specifying a style of init script
951 2003-03-31 Havoc Pennington <hp@redhat.com>
953 Fix some annoying DBusString API and fix all affected code.
955 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
957 (_dbus_string_get_data): change to return string instead of using
959 (_dbus_string_get_const_data): ditto
960 (_dbus_string_get_data_len): ditto
961 (_dbus_string_get_const_data_len): ditto
963 2003-03-31 Havoc Pennington <hp@redhat.com>
965 * bus/main.c (main): fix up the command line arguments to be nicer
967 2003-03-31 Havoc Pennington <hp@redhat.com>
969 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
970 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
971 final location that lands in the config file
973 * bus/config-loader-expat.c (bus_config_load): fix type of
976 * doc/TODO: remove TODO item for dbus_bus_get()
978 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
980 2003-03-31 Havoc Pennington <hp@pobox.com>
982 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
983 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
984 argument since they are always client side
986 * dbus/dbus-server.c (dbus_server_get_address): new function
988 * bus/main.c (main): take the configuration file as an argument.
990 * test/data/valid-config-files/debug-allow-all.conf: new file to
991 use with dispatch.c tests for example
993 * bus/test-main.c (main): require test data dir
995 * bus/bus.c (bus_context_new): change this to take a
996 configuration file name as argument
998 * doc/config-file.txt (Elements): add <servicedir>
1000 * bus/system.conf, bus/session.conf: new files
1002 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1003 well-known socket if none set
1005 * configure.in: create system.conf and session.conf
1007 2003-03-30 Havoc Pennington <hp@pobox.com>
1009 * bus/config-parser.c: hacking
1011 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1012 to shut down, since it could cause weirdness with the DBusList
1015 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1016 link-oriented stack routines
1017 (alloc_link): free the mempool if the first alloc from it fails
1019 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1021 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1023 (_dbus_string_skip_white): new
1025 * doc/config-file.txt (Elements): add <includedir>
1027 2003-03-28 Havoc Pennington <hp@pobox.com>
1029 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1030 (_dbus_string_copy_data): new functions
1032 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1034 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1038 * dbus/dbus-memory.c:
1041 2003-03-28 Havoc Pennington <hp@pobox.com>
1043 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1044 I think it may have just been superstition. Not sure.
1046 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1047 failures that were not being handled.
1049 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1051 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1052 row that will fail on out-of-memory.
1054 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1055 function for testing out-of-memory handling.
1057 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1058 allocation functions, they do map exactly to the expat ones.
1060 2003-03-27 Havoc Pennington <hp@redhat.com>
1062 * bus/config-loader-libxml.c (bus_config_load): add another error
1065 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1068 Add note about automatic service activation.
1070 * doc/dbus-specification.sgml:
1071 Rename the specification and clarify a few things.
1073 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1076 * dbus/dbus-address.c:
1078 * dbus/dbus-marshal.c:
1079 * dbus/dbus-server-debug-pipe.c:
1080 * dbus/dbus-transport-unix.c:
1081 Fix documentation warnings.
1083 2003-03-26 Havoc Pennington <hp@pobox.com>
1085 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1086 after every test so it's quick and easy to see which leaked, and
1087 so we test multiple dbus_shutdown() calls
1089 * configure.in: change configure.in XML stuff to also support
1092 * config-loader-libxml.c: some hacking
1094 * config-loader-expat.c: some hacking
1096 * config-parser.c: some hacking, plus tests
1098 2003-03-25 Havoc Pennington <hp@redhat.com>
1100 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1102 * configure.in: add --with-xml option to specify XML library,
1103 right now only libxml is supported.
1105 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1106 nonworking code between home and work, still just stubs
1108 2003-03-24 Havoc Pennington <hp@redhat.com>
1110 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1113 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1114 NULL argument for "message" if the error is a well-known one,
1115 fill in a generic message in this case.
1117 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1120 * bus/test.c (bus_test_flush_bus): add
1122 * bus/policy.c (bus_policy_test): test code stub
1124 2003-03-24 Havoc Pennington <hp@pobox.com>
1126 * bus/connection.c (bus_connections_setup_connection): set up
1127 the "can this user connect" function, but it always returns
1128 TRUE until we have a config file parser so we can have a config
1129 file that allows connections.
1131 2003-03-23 Havoc Pennington <hp@pobox.com>
1133 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1134 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1135 the mutex, so we can check for proper memory management
1138 * dbus/dbus-dataslot.c: remove the mutex from
1139 DBusDataSlotAllocator and lock it manually when using it,
1140 to simplify fitting it into the global slots framework.
1142 * dbus/dbus-threads.c (init_static_locks): rework how we're
1143 handling global locks so they are easily shut down.
1145 * bus/policy.c (bus_policy_append_rule): fix
1147 * bus/test-main.c (main): check for memleaks
1149 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1150 test suite check for memleaks
1152 * dbus/dbus-memory.c: add support in test mode for tracking
1153 number of outstanding blocks
1155 2003-03-23 Havoc Pennington <hp@pobox.com>
1157 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1160 * dbus/dbus-hash.h: add ULONG hash keys
1162 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1163 (_dbus_get_group_id): new function
1165 2003-03-20 Havoc Pennington <hp@redhat.com>
1167 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1169 (dbus_connection_get_unix_user): new function
1171 2003-03-20 Havoc Pennington <hp@pobox.com>
1173 * bus/connection.c (bus_connection_send_oom_error): assert that
1174 message has a sender
1175 (connection_execute_transaction): ditto
1176 (bus_connection_preallocate_oom_error): fix to set the sender, and
1177 set recipient to the destination service, not the bus driver
1179 * bus/policy.c: hacking
1181 * dbus/dbus-message.c (dbus_message_service_is): new function
1182 (dbus_message_sender_is): new
1184 2003-03-19 Havoc Pennington <hp@redhat.com>
1186 * bus/policy.c: start sketching code for policy restrictions on
1187 what connections can do.
1189 2003-03-18 Havoc Pennington <hp@redhat.com>
1191 * doc/TODO: some notes on high-level todo items. Little nitpick
1192 stuff is all in @todo, so no need to add it here.
1194 * doc/config-file.txt: some notes on how config file might look
1196 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1202 2003-03-17 Havoc Pennington <hp@redhat.com>
1204 * dbus/dbus-internals.h: add gcc attributes so that
1205 our printf-style functions warn on bad arguments to
1208 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1211 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1214 2003-03-17 Havoc Pennington <hp@redhat.com>
1216 * bus/test-main.c (main): make it print something as it runs
1217 so make check doesn't look stuck
1219 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1220 from CVS, now obsolete
1222 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1224 * bus/dispatch.c: (bus_dispatch):
1225 Refetch the service name since it may have been reallocated
1226 when dbus_message_set_sender was called.
1228 * dbus/dbus-sysdeps.c: (_dbus_accept):
1229 Add address and address length variables and use them to stop
1230 valgrind from complaining.
1232 2003-03-17 Havoc Pennington <hp@pobox.com>
1234 All tests pass, no memleaks, no valgrind complaints.
1236 * bus/test.c: refcount handler_slot
1238 * bus/connection.c (bus_connections_new): refcount
1239 connection_data_slot
1241 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1242 bytes so that auth scripts pass.
1244 * bus/dispatch.c: init message_handler_slot so it gets allocated
1247 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1249 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1250 dealloc server_pipe_hash when no longer used for benefit of
1253 * dbus/dbus-auth.c (process_command): memleak fix
1255 * bus/dispatch.c (check_hello_message): memleak fix
1257 2003-03-16 Havoc Pennington <hp@pobox.com>
1259 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1261 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1263 * bus/activation.c (bus_activation_activate_service): Append
1264 the pending activation entry to the list of pending activations.
1266 2003-03-16 Havoc Pennington <hp@pobox.com>
1268 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1271 * dbus/dbus-address.c (create_entry): fix OOM handling when
1272 failing to alloc entry->method
1274 2003-03-16 Havoc Pennington <hp@pobox.com>
1276 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1279 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1280 add some missing dbus_set_result
1282 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1283 alloc the DBusMessageHandler
1285 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1286 the transport here, since we call this from the finalizer; it
1287 resulted in a double-finalize.
1289 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1290 where we tried to use transport->connection that was NULL,
1291 happened when transport was disconnected early on due to OOM
1293 * bus/*.c: adapt to handle OOM for watches/timeouts
1295 * dbus/dbus-transport-unix.c: port to handle OOM during
1298 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1299 reference to unused bytes instead of a copy
1301 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1304 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1307 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1310 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1312 * doc/dbus-specification.sgml:
1313 Document reply message for ActivateService.
1315 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1317 * bus/activation.c: (bus_pending_activation_entry_free),
1318 (bus_pending_activation_free), (bus_activation_new),
1319 (bus_activation_unref), (bus_activation_service_created),
1320 (bus_activation_activate_service):
1322 * bus/bus.c: (bus_context_new):
1323 * bus/desktop-file.c: (new_section):
1324 * bus/driver.c: (bus_driver_send_service_deleted),
1325 (bus_driver_handle_activate_service):
1326 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1328 * dbus/dbus-connection.c:
1329 (dbus_connection_send_with_reply_and_block):
1330 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1331 * dbus/dbus-protocol.h:
1332 Make activation work better. Now pending activations will be queued
1333 and the daemon won't try to activate services that are already registered.
1335 2003-03-16 Havoc Pennington <hp@pobox.com>
1337 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1340 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1341 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1343 2003-03-16 Havoc Pennington <hp@pobox.com>
1345 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1346 this. always run the test suite before commit...
1348 * bus/*: adapt to DBusConnection API changes
1350 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1351 requires renaming stuff to avoid dbus_connection_dispatch name
1354 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1357 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1358 separate from _dbus_message_loader_return_buffer()
1360 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1361 this, because it's now always broken to use; the number of
1362 messages in queue vs. the number still buffered by the message
1363 loader is undefined/meaningless. Should use
1364 dbus_connection_get_dispatch_state().
1365 (dbus_connection_dispatch): rename from
1366 dbus_connection_dispatch_message
1368 2003-03-16 Havoc Pennington <hp@pobox.com>
1370 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1373 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1375 * dbus/dbus-connection.c:
1376 (dbus_connection_send_with_reply_and_block):
1377 Decrease connection->n_incoming when removing an entry
1379 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1380 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1381 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1382 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1383 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1384 (dbus_dict_get_byte_array):
1385 Handle NULL arrays and strings. Also add support for byte arrays.
1387 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1388 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1389 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1390 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1391 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1392 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1393 * dbus/dbus-marshal.h:
1394 Add support for marshalling and demarshalling empty arrays and strings.
1396 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1397 (dbus_message_append_string_array),
1398 (dbus_message_iter_get_boolean),
1399 (dbus_message_iter_get_boolean_array),
1400 (dbus_message_iter_get_int32_array),
1401 (dbus_message_iter_get_uint32_array),
1402 (dbus_message_iter_get_double_array),
1403 (dbus_message_iter_get_byte_array),
1404 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1405 (check_message_handling):
1406 Add support for getting empty arrays and dicts.
1408 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1409 Don't do any validation at all for now, that's better than just checking
1412 * test/data/valid-messages/emptiness.message:
1413 New test message with lots of empty arrays.
1415 2003-03-16 Havoc Pennington <hp@pobox.com>
1417 * dbus/dbus-connection.c
1418 (_dbus_connection_queue_received_message_link): new function that
1419 can't fail due to OOM
1421 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1422 new function pops a message together with a list link
1425 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1426 message queuing functions to avoid needing to alloc memory
1428 2003-03-16 Havoc Pennington <hp@pobox.com>
1430 Oops - test code was only testing failure of around 30 of the
1431 mallocs in the test path, but it turns out there are 500+
1432 mallocs. I believe this was due to misguided linking setup such
1433 that there was one copy of dbus_malloc etc. in the daemon and one
1434 in the shared lib, and only daemon mallocs were tested. In any
1435 case, the test case now tests all 500+ mallocs, and doesn't pass
1436 yet, though there are lots of fixes in this patch.
1438 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1439 this so that it doesn't need to allocate memory, since it
1440 has no way of indicating failure due to OOM (and would be
1441 annoying if it did).
1443 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1445 * bus/Makefile.am: rearrange to create two self-contained
1446 libraries, to avoid having libraries with overlapping symbols.
1447 that was resulting in weirdness, e.g. I'm pretty sure there
1448 were two copies of global static variables.
1450 * dbus/dbus-internals.c: move the malloc debug stuff to
1453 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1456 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1458 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1461 * bus/dispatch.c (bus_dispatch_add_connection): free
1462 message_handler_slot when no longer using it, so
1463 memory leak checkers are happy for the test suite.
1465 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1467 * bus/bus.c (new_connection_callback): disconnect in here if
1468 bus_connections_setup_connection fails.
1470 * bus/connection.c (bus_connections_unref): fix to free the
1472 (bus_connections_setup_connection): if this fails, don't
1473 disconnect the connection, just be sure there are no side
1476 * dbus/dbus-string.c (undo_alignment): unbreak this
1478 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1480 (_dbus_auth_new): fix the order in which we free strings
1483 * bus/connection.c (bus_connection_disconnected): fix to
1484 not send ServiceDeleted multiple times in case of memory
1487 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1488 get the base service name
1489 (dbus_bus_register_client): don't return base service name,
1490 instead store it on the DBusConnection and have an accessor
1492 (dbus_bus_register_client): rename dbus_bus_register()
1494 * bus/dispatch.c (check_hello_message): verify that other
1495 connections on the bus also got the correct results, not
1496 just the one sending hello
1498 2003-03-15 Havoc Pennington <hp@pobox.com>
1500 Make it pass the Hello handling test including all OOM codepaths.
1501 Now to do other messages...
1503 * bus/services.c (bus_service_remove_owner): fix crash when
1504 removing owner from an empty list of owners
1505 (bus_registry_ensure): don't leave service in the list of
1506 a connection's owned services if we fail to put the service
1509 * bus/connection.c (bus_connection_preallocate_oom_error): set
1510 error flag on the OOM error.
1512 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1513 handle _dbus_transport_set_connection failure
1515 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1516 to create watches up front and simply enable/disable them as
1518 (unix_connection_set): this can now fail on OOM
1520 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1521 of enabling/disabling a watch or timeout.
1523 * bus/loop.c (bus_loop_iterate): don't touch disabled
1526 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1528 2003-03-15 Havoc Pennington <hp@pobox.com>
1530 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1531 write useful test code, after all that futzing around ;-)
1533 Test does not yet pass because we can't handle OOM in
1534 _dbus_transport_messages_pending (basically,
1535 dbus_connection_preallocate_send() does not prealloc the write
1536 watch). To fix this, I think we need to add new stuff to
1537 set_watch_functions, namely a SetEnabled function so we can alloc
1538 the watch earlier, then enable it later.
1540 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1541 dbus-memory.c to the convenience lib
1543 * bus/test.c: rename some static functions to keep them clearly
1544 distinct from stuff in connection.c. Handle client disconnection.
1546 2003-03-14 Havoc Pennington <hp@pobox.com>
1548 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1549 transport, tests more of the real codepath. Set up clients
1550 with bus_setup_debug_client.
1552 * bus/test.c (bus_setup_debug_client): function to set up debug
1553 "clients" on the main loop
1555 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1558 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1561 * dbus/dbus-server-debug.c: support a debug server based on pipes
1563 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1564 (_dbus_close): new function
1566 * configure.in: check for socketpair
1568 2003-03-14 Havoc Pennington <hp@redhat.com>
1570 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1573 * dbus/dbus-transport-debug.c: rework this a good bit to be
1574 less complicated. hopefully still works.
1576 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1579 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1582 * dbus/dbus-message.c (dbus_message_copy): rename from
1583 dbus_message_new_from_message, fix it up to copy
1584 all the message fields, add test case
1586 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1587 not quite passing yet
1589 2003-03-14 Havoc Pennington <hp@pobox.com>
1591 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1592 until no work remains" in test code. (the large diff here
1593 is just code movement, no actual changes)
1595 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1596 1, no point waiting around for test code.
1597 (_dbus_server_debug_accept_transport): unref the timeout
1598 after adding it (right?)
1600 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1602 2003-03-13 Havoc Pennington <hp@redhat.com>
1604 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1607 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1610 * dbus/dbus-connection.h: Make AddWatchFunction and
1611 AddTimeoutFunction return a bool so they can fail on out-of-memory
1613 * bus/bus.c (bus_context_new): set up timeout handlers
1615 * bus/connection.c (bus_connections_setup_connection): set up
1618 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1621 * bus/bus.c (bus_context_new): adapt to changes
1623 * bus/connection.c: adapt to changes
1625 * test/watch.c: adapt to DBusWatch changes
1627 * bus/dispatch.c (bus_dispatch_test): started adding this but
1630 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1632 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1634 2003-03-13 Havoc Pennington <hp@pobox.com>
1636 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1637 set up a test framework as for the library
1639 2003-03-12 Havoc Pennington <hp@pobox.com>
1641 Throughout: purge global variables, introduce BusActivation,
1642 BusConnections, BusRegistry, etc. objects instead.
1644 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1647 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1648 going to redo this a bit differently I think
1650 2003-03-12 Havoc Pennington <hp@redhat.com>
1652 Mega-patch that gets the message bus daemon initially handling
1653 out-of-memory. Work still needed. Also lots of random
1654 moving stuff to DBusError instead of ResultCode.
1656 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1658 * dbus/dbus-connection.c
1659 (dbus_connection_send_with_reply_and_block): use DBusError
1661 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1664 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1665 code here, as the only failure possible is OOM.
1667 * bus/connection.c (bus_connection_disconnect):
1668 rename bus_connection_disconnected as it's a notification only
1670 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1671 "name" on get_args failure, should be done by get_args;
1672 don't disconnect client for bad args, just return an error.
1673 (bus_driver_handle_service_exists): ditto
1675 * bus/services.c (bus_services_list): NULL-terminate returned array
1677 * bus/driver.c (bus_driver_send_service_lost)
1678 (bus_driver_send_service_acquired): send messages from driver to a
1679 specific client to the client's unique name, not to the broadcast
1682 * dbus/dbus-message.c (decode_header_data): reject messages that
1683 contain no name field
1684 (_dbus_message_get_client_serial): rename to
1685 dbus_message_get_serial and make public
1686 (_dbus_message_set_serial): rename from set_client_serial
1687 (_dbus_message_set_reply_serial): make public
1688 (_dbus_message_get_reply_serial): make public
1690 * bus/connection.c (bus_connection_foreach): allow stopping
1691 iteration by returning FALSE from foreach function.
1693 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1694 (dbus_connection_free_preallocated_send)
1695 (dbus_connection_preallocate_send): new API for sending a message
1696 without possibility of malloc failure.
1697 (dbus_connection_send_message): rename to just
1698 dbus_connection_send (and same for whole function family)
1700 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1702 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1704 * bus/activation.c: handle/return errors
1706 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1708 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1709 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1710 (_dbus_result_from_errno): move to this file
1712 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1714 * dbus/dbus-marshal.c:
1715 (_dbus_marshal_set_string):
1716 Take a length argument so we can marshal the correct string
1719 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1720 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1721 (_dbus_marshal_test):
1722 * dbus/dbus-marshal.h:
1723 Add support for marshalling and demarshalling dicts.
1725 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1726 Add support for TYPE DICT.
1728 * dbus/dbus-message.c: (set_string_field):
1729 Adjust header padding.
1731 (dbus_message_append_args_valist), (dbus_message_append_dict),
1732 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1733 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1734 (check_message_handling), (check_have_valid_message):
1735 * dbus/dbus-message.h:
1736 Add functions for setting and getting dicts.
1738 * dbus/dbus-protocol.h:
1744 * doc/dbus-specification.sgml:
1745 Add information about how dicts are marshalled.
1747 * test/data/invalid-messages/dict-with-nil-value.message:
1748 * test/data/invalid-messages/too-short-dict.message:
1749 * test/data/valid-messages/dict-simple.message:
1750 * test/data/valid-messages/dict.message:
1751 Add sample messages containing dicts.
1753 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1755 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1757 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1760 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1761 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1762 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1763 (dbus_dict_set_double), (dbus_dict_set_string),
1764 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1765 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1766 (dbus_dict_set_string_array), (_dbus_dict_test):
1768 Fix according to comments from Havoc.
1770 2003-03-06 Michael Meeks <michael@server.home>
1772 * configure.in: if we don't have kde-config, disable have_qt.
1774 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1779 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1780 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1781 (dbus_dict_remove), (dbus_dict_get_value_type),
1782 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1783 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1784 (dbus_dict_put_double), (dbus_dict_put_string),
1785 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1786 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1787 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1788 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1789 (dbus_dict_get_double), (dbus_dict_get_string),
1790 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1791 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1792 (dbus_dict_get_string_array), (_dbus_dict_test):
1794 Add DBusDict implementation
1796 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1800 2003-03-04 Havoc Pennington <hp@pobox.com>
1802 * test/data/auth/*: adapt to changes
1804 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1805 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1808 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1809 more stuff from being in a context name, to make the protocol
1810 simpler to deal with
1812 * dbus/dbus-errors.c (dbus_error_has_name): new function
1813 (dbus_error_is_set): new function
1815 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1816 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1818 * dbus/dbus-connection.c (dbus_connection_flush): also read
1819 messages during a flush operation
1821 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1823 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1825 * configure.in: Check for gethostbyname on Solaris.
1827 * dbus/dbus-transport.c: (_dbus_transport_open):
1828 Remove duplicate "tcp" entry.
1830 * doc/dbus-specification.sgml:
1831 Clarify some things.
1833 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1835 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1836 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1837 (_dbus_keyring_test):
1838 * dbus/dbus-md5.c: (_dbus_md5_compute):
1839 * dbus/dbus-sha.c: (_dbus_sha_compute):
1842 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1844 * README: Add some things.
1846 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1848 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1849 after case DBUS_TYPE_BOOELAN.
1851 2003-03-02 Havoc Pennington <hp@pobox.com>
1853 * test/break-loader.c (randomly_set_extreme_ints): add test that
1854 sets really huge and small integers
1856 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1857 that length of boolean array fits in the string, and that
1858 string has room for boolean value in single-bool case.
1860 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1861 optional value to "ALIGN" command which is what to fill the
1864 * test/data/valid-messages/no-padding.message: add regression
1865 test for the message padding problem
1867 2003-03-02 Havoc Pennington <hp@pobox.com>
1869 * dbus/dbus-message.c (decode_header_data): fix to always init
1870 message_padding, from Benjamin Dauvergne
1872 2003-03-02 Havoc Pennington <hp@pobox.com>
1878 2003-03-01 Joe Shaw <joe@assbarn.com>
1880 * configure.in: Check for "struct cmsgcred" and try to access its
1881 members for BSD-like unices.
1883 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1884 _dbus_read_credentials_unix_socket().
1885 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1886 read() for reading the credential byte off the unix socket. Use
1887 struct cmsgcred on systems that support it.
1889 2003-02-27 Alexander Larsson <alexl@redhat.com>
1893 Make gthreads-2.0 dependency optional. Don't build thread test if
1896 2003-02-27 Havoc Pennington <hp@pobox.com>
1898 * dbus/dbus-connection.c
1899 (dbus_connection_send_message_with_reply_and_block): fix doh!
1900 doh! doh! bug that resulted in never removing a reply from the
1901 queue, no wonder we called get_reply_serial so much ;-)
1903 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1904 and client serial instead of demarshaling them every time
1906 2003-02-27 Havoc Pennington <hp@pobox.com>
1908 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1909 more inlined, using dbus-string-private.h, speeds things up
1912 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1913 when freeing the string
1914 (_dbus_string_steal_data): fix for align offset
1915 (undo_alignment): new function
1917 2003-02-26 Havoc Pennington <hp@redhat.com>
1919 All kinds of audit fixes from Owen, plus initial attempt to
1920 handle unaligned memory returned from malloc.
1922 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1923 leave room for align_offset and nul byte
1924 (fixup_alignment): function to track an align_offset and
1925 ensure real->str is aligned
1926 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1927 to allow a nul byte plus align offset
1928 (_dbus_string_lock): fix overflow issue
1929 (_dbus_string_init_const_len): add assertions on sanity of len,
1930 assign allocated to be ALLOCATION_PADDING larger than len
1931 (set_length): fixup the overflow handling
1932 (_dbus_string_get_data_len): fix overflow in assertion
1933 (open_gap): detect overflow in size of gap to be opened
1934 (_dbus_string_lengthen): add overflow check
1935 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1936 (_dbus_string_append): add overflow check
1937 (_dbus_string_append_unichar): overflow
1938 (_dbus_string_delete): fix overflow in assertion
1939 (_dbus_string_copy_len): overflow in assertion
1940 (_dbus_string_replace_len): overflows in assertions
1941 (_dbus_string_find): change to implement in terms of
1942 _dbus_string_find_to
1943 (_dbus_string_find_to): assorted fixage
1944 (_dbus_string_equal_c_str): assert c_str != NULL,
1945 fix logic so the function works
1946 (_dbus_string_ends_with_c_str): fix overflow thingy
1947 (_dbus_string_base64_encode): overflow fix
1948 (_dbus_string_validate_ascii): overflow
1949 (_dbus_string_validate_nul): overflow
1951 2003-02-26 Havoc Pennington <hp@redhat.com>
1953 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1955 2003-02-26 Alexander Larsson <alexl@redhat.com>
1958 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1960 * dbus/dbus-connection.c:
1961 * dbus/dbus-connection.h:
1962 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1963 Add dbus_connection_set_wakeup_main_function and use it when queueing
1964 incoming and outgoing messages.
1967 * dbus/dbus-dataslot.c:
1968 Threadsafe usage of DBusDataSlotAllocator
1970 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1973 * dbus/dbus-server-unix.c:
1976 * glib/dbus-gmain.c:
1977 Implement the new wakeup functions for glib.
1980 * glib/test-thread-client.c:
1981 * glib/test-thread-server.c:
1982 * glib/test-thread.h:
1983 Initial cut at some thread test code. Not really done yet.
1985 2003-02-26 Havoc Pennington <hp@pobox.com>
1987 * dbus/dbus-connection.c
1988 (dbus_connection_send_message_with_reply_and_block): fix crash
1989 where we ref'd the outgoing message instead of the returned reply
1991 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1992 at the end of this function, so if we didn't need to read for
1993 authentication, we reinstall it for receiving messages
1995 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1996 a NULL sender for peer-to-peer case
1998 * dbus/dbus-transport-unix.c (check_read_watch): handle
1999 !authenticated case correctly
2001 * glib/dbus-gmain.c: add support for DBusServer
2003 * dbus/dbus-server.c: add data slot support
2005 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2006 return values and handle errors
2008 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2011 * Doxyfile.in (INPUT): add glib subdir
2013 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2014 setup_with_g_main instead of hookup_with_g_main; write docs
2016 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2018 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2019 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2020 * dbus/dbus-message.c: (dbus_message_append_boolean),
2021 (dbus_message_append_boolean_array),
2022 (dbus_message_get_args_valist), (_dbus_message_test):
2023 * dbus/dbus-message.h:
2024 * doc/dbus-specification.sgml:
2025 Various fixes as pointed out by Havoc.
2027 * test/data/invalid-messages/bad-boolean-array.message:
2028 * test/data/invalid-messages/bad-boolean.message:
2029 Add invalid boolean value test cases.
2031 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2033 * dbus/dbus-internals.c: (_dbus_type_to_string):
2034 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2035 (_dbus_marshal_validate_arg):
2036 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2037 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2038 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2039 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2040 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2041 (dbus_message_iter_get_double),
2042 (dbus_message_iter_get_boolean_array), (message_iter_test):
2043 * dbus/dbus-message.h:
2044 * dbus/dbus-protocol.h:
2045 * doc/dbus-specification.sgml:
2046 * test/data/valid-messages/lots-of-arguments.message:
2047 Add support for boolean and boolean array types.
2049 2003-02-23 Havoc Pennington <hp@pobox.com>
2051 * dbus/dbus-keyring.c: finish most of this implementation and
2054 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2055 these barf if the error isn't cleared to NULL
2057 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2058 (_dbus_create_directory): new function
2060 * dbus/dbus-errors.c (dbus_set_error): fix warning
2062 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2063 (_dbus_string_hex_decode): new function
2064 (test_hex_roundtrip): test code
2066 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2068 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2070 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2071 the save-to-temp/rename trick to atomically write the new file
2072 (_dbus_string_parse_uint): new function
2074 2003-02-22 Havoc Pennington <hp@pobox.com>
2076 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2078 2003-02-22 Havoc Pennington <hp@pobox.com>
2080 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2081 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2083 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2085 * dbus/test/data/sha-1: add US government test suite for SHA-1
2087 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2089 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2090 Make string arrays NULL-terminated.
2092 * dbus/dbus-memory.c: (dbus_free_string_array):
2093 * dbus/dbus-memory.h:
2094 New function for freeing NULL-terminated string arrays.
2096 * dbus/dbus-message-builder.c: (append_quoted_string),
2097 (_dbus_message_data_load):
2098 Add support for array types.
2100 * dbus/dbus-message.c: (check_message_handling):
2101 Add more types as test cases.
2103 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2104 (_dbus_string_parse_double):
2105 Add the start offset to the end offset.
2107 * test/data/valid-messages/lots-of-arguments.message:
2108 New test message with lots of arguments.
2110 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2112 * dbus/dbus-message.c: (dbus_message_append_nil),
2113 (dbus_message_append_int32), (dbus_message_append_uint32),
2114 (dbus_message_append_double), (dbus_message_append_string),
2115 (dbus_message_append_int32_array),
2116 (dbus_message_append_uint32_array),
2117 (dbus_message_append_double_array),
2118 (dbus_message_append_byte_array),
2119 (dbus_message_append_string_array):
2120 Fix all out-of-memory handling in these functions.
2122 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2124 * dbus/dbus-message.c: (dbus_message_append_nil):
2127 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2129 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2130 (dbus_message_append_nil), (dbus_message_append_int32_array),
2131 (dbus_message_append_uint32_array),
2132 (dbus_message_append_double_array),
2133 (dbus_message_append_byte_array),
2134 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2135 (dbus_message_iter_get_int32_array),
2136 (dbus_message_iter_get_uint32_array),
2137 (dbus_message_iter_get_double_array),
2138 (dbus_message_iter_get_byte_array),
2139 (dbus_message_iter_get_string_array):
2141 * dbus/dbus-message.h:
2142 Add functions for appending and getting arrays.
2144 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2146 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2147 element size at least 8 bytes, fixes mempool tests on
2150 2003-02-20 Alexander Larsson <alexl@redhat.com>
2152 * dbus/dbus-transport-unix.c (unix_do_iteration):
2153 Unlock the connection mutex during a blocking select call.
2154 Add todo about how we need a way to wake up the select.
2156 * dbus/dbus-connection-internal.h:
2157 * dbus/dbus-connection.c:
2158 Add _dbus_connection_lock and _dbus_connection_unlock.
2160 2003-02-19 Havoc Pennington <hp@pobox.com>
2162 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2163 Doxyfile.in, not Doxyfile
2165 * dbus/dbus-keyring.c: do some hacking on this
2167 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2169 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2171 (dbus_set_error): remove dbus_error_init, check for message ==
2172 NULL *before* we sprintf into it, and add @todo about including
2173 system headers in this file
2175 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2177 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2179 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2180 get various bits of user information based on either username
2182 (_dbus_homedir_from_username): new function
2184 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2187 Add check for nonposix getpwnam_r
2189 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2190 Align the pool element size to a sizeof (void *) boundary.
2192 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2193 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2194 General Solaris fixes.
2196 * test/data/valid-messages/simplest-manual.message:
2197 Explicitly state that we want little-endian packing.
2199 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2201 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2203 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2204 Added to create a transport connecting using a tcp/ip socket.
2206 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2207 to a tcp socket at given host and port.
2208 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2211 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2213 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2214 Added to create a server listening on a TCP/IP socket.
2216 2003-02-19 Havoc Pennington <hp@pobox.com>
2218 Throughout: mop up all the Doxygen warnings and undocumented
2221 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2222 to search any paths.
2224 * dbus/dbus-threads.c: move global mutex initializers to
2225 dbus-internals.h, multiple prototypes was confusing doxygen
2226 besides being kind of ugly
2228 * Doxyfile (PREDEFINED): have Doxygen define
2229 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2230 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2231 (do not abuse the feature! it's for stuff like the autogenerated
2232 macros in dbus-md5.c, not just for things you don't feel like
2235 2003-02-18 Havoc Pennington <hp@pobox.com>
2237 * dbus/dbus-string.c (_dbus_string_zero): new function
2239 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2240 wrap it in some dbus-friendly API
2242 * dbus/dbus-types.h: add 16-bit types
2244 2003-02-18 Joe Shaw <joe@assbarn.com>
2246 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2247 credentials from our currently running process.
2248 (get_word): Fix a buglet where we were copying the entire length
2249 instead of relative to our position.
2251 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2252 keys on the stack... it's 640k of data.
2254 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2255 read the credentials byte off the socket, even if we don't have
2257 (_dbus_poll): Implement poll() using select() for systems which
2260 * glib/test-dbus-glib.c (main): Print out an error if no
2261 parameters are given.
2263 * test/data/auth/fallback.auth-script: Added. Tests that a client
2264 can fallback to a secondary auth mechanism if the first fails.
2266 2003-02-18 Havoc Pennington <hp@pobox.com>
2270 2003-02-17 Havoc Pennington <hp@pobox.com>
2272 * doc/dbus-specification.sgml: lots of cosmetic
2273 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2274 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2275 s/server/bus/ (except in authentication section). Add a section
2276 "Message Bus Message Routing"
2278 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2284 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2286 * doc/dbus-specification.sgml:
2287 Specification updates.
2289 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2291 * bus/activation.c: (bus_activation_init), (child_setup),
2292 (bus_activation_activate_service):
2294 * bus/main.c: (main):
2295 Set DBUS_ADDRESS environment variable.
2297 * dbus/dbus-errors.c: (dbus_set_error):
2298 Don't use va_copy since that's a C99 feature.
2300 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2301 (_dbus_spawn_async):
2302 * dbus/dbus-sysdeps.h:
2303 Add child_setup_func to _dbus_spawn_async.
2305 * doc/dbus-specification.sgml:
2306 Update specification.
2308 * test/spawn-test.c: (setup_func), (main):
2311 2003-02-17 Alexander Larsson <alexl@redhat.com>
2313 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2316 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2320 * doc/dbus-test-plan.sgml:
2321 Add test plan document.
2326 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2328 * dbus/dbus-message.c: (decode_header_data),
2329 (_dbus_message_loader_return_buffer):
2330 Set the header padding amount when loading a message.
2332 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2334 * bus/dispatch.c: (send_one_message):
2335 Only send broadcast messages to registered connections.
2337 * dbus/dbus-message.c: (dbus_message_name_is):
2338 * dbus/dbus-message.h:
2339 New convenience function.
2341 * dbus/dbus-transport-debug.c: (do_reading):
2342 Only dispatch one message per run.
2345 * test/bus-test.c: (new_connection_callback), (die),
2346 (test_hello_client1_handler), (test_hello_client2_handler),
2347 (test_hello_replies), (main):
2349 * test/bus-test-loop.[ch]:
2352 2003-02-16 Havoc Pennington <hp@pobox.com>
2354 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2355 backward conditional
2357 2003-02-16 Alexander Larsson <alexl@redhat.com>
2359 * dbus/dbus-connection.c:
2360 Implement sent_message_with_reply. (with_reply_and block is still
2362 Made dispatch_message not lose message if OOM.
2364 * dbus/dbus-errors.h:
2365 Add NoReply error (for reply timeouts).
2367 2003-02-16 Alexander Larsson <alexl@redhat.com>
2369 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2370 Actually free keys and values when destroying hashtable.
2372 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2374 * dbus/dbus-auth.c: (client_try_next_mechanism):
2377 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2378 Return TRUE if there's no thread implementation around.
2380 * glib/dbus-gmain.c: (free_source),
2381 (dbus_connection_hookup_with_g_main):
2382 Make sure to remove the GSource when the connection is finalized.
2384 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2386 * bus/dispatch.c: (bus_dispatch_message_handler):
2387 * dbus/dbus-errors.h:
2388 Return an error if someone tries to send a message to a service
2391 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2393 * bus/activation.c: (load_directory), (bus_activation_init),
2394 (bus_activation_activate_service):
2397 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2398 More work on the activation handling.
2400 * dbus/dbus-errors.h:
2401 Add some error messages
2403 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2404 * dbus/dbus-message.h:
2405 New function that creates an error message.
2407 * dbus/dbus-protocol.h:
2408 Add ACTIVATE_SERVER message.
2410 * dbus/dbus-server-unix.c: (unix_handle_watch),
2411 (_dbus_server_new_for_domain_socket):
2412 Call _dbus_fd_set_close_on_exec.
2414 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2415 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2416 (_dbus_fd_set_close_on_exec):
2417 * dbus/dbus-sysdeps.h:
2418 Add _dbus_fd_set_close_on exec function. Also add function that checks
2419 that all open fds are set to close-on-exec and warns otherwise.
2421 * dbus/dbus-transport-unix.c:
2422 (_dbus_transport_new_for_domain_socket):
2423 Call _dbus_fd_set_close_on_exec.
2425 2003-02-16 Havoc Pennington <hp@pobox.com>
2427 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2428 allow people to avoid setting SIGPIPE to SIG_IGN
2429 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2430 we've been asked not to
2432 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2434 * dbus/dbus-list.c: (_dbus_list_append_link),
2435 (_dbus_list_prepend_link):
2436 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2440 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2443 * bus/activation.c: (bus_activation_entry_free),
2444 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2446 * bus/main.c: (main):
2447 Add simple activation support, doesn't work yet though.
2449 2003-02-15 Zack Rusin <zack@kde.org>
2451 * qt/dbus-qthread.cpp: small casting fix
2453 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2455 * dbus/dbus-errors.c: (dbus_set_error):
2456 * dbus/dbus-errors.h:
2457 Add a few errors and make dbus_set_error void.
2459 * dbus/dbus-sysdeps.c:
2460 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2461 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2462 * dbus/dbus-sysdeps.h:
2463 Add _dbus_spawn_async.
2465 * test/spawn-test.c: (main):
2466 Test for _dbus_spawn_async.
2468 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2470 * dbus/dbus-internals.h:
2471 Fix build without tests.
2473 * dbus/dbus-list.c: (alloc_link):
2474 Fix a segfault when a malloc fails.
2476 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2477 (dbus_malloc0), (dbus_realloc):
2478 Add support for malloc debugging.
2480 2003-02-15 Alexander Larsson <alexl@redhat.com>
2482 * dbus/dbus-threads.c:
2483 * dbus/dbus-threads.h:
2484 Add condvars. Remove static mutext from API.
2485 Implement static mutexes by initializing them from threads_init.
2487 * glib/dbus-gthread.c:
2488 * qt/dbus-qthread.cpp:
2489 Update with the thread api changes.
2494 Turn StaticMutex into normal mutex + init function.
2495 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2496 _dbus_list_append_link, _dbus_list_prepend_link
2499 * dbus/dbus-sysdeps.c:
2500 * dbus/dbus-sysdeps.h:
2501 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2502 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2504 * dbus/dbus-protocol.h:
2505 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2507 * dbus/dbus-message.c:
2508 Make ref/unref atomic.
2511 * dbus/dbus-connection-internal.h:
2512 * dbus/dbus-connection.c:
2513 * dbus/dbus-connection.h:
2515 Change _peek to _borrow,_return & _steal_borrowed.
2516 Change disconnect callback to event.
2517 Make dbus_connection_dispatch_messages reentrant.
2519 * dbus/dbus-transport.c:
2520 Don't ref the connection on calls to the transport
2523 * dbus/dbus-message-handler.c:
2526 * glib/dbus-gmain.c:
2527 Don't use peek_message anymore
2530 * test/debug-thread.c:
2531 * test/debug-thread.h:
2532 Simple thread implementation that asserts() on deadlocks in
2533 single-threaded code.
2536 (main) Call debug_threads_init.
2539 Use disconnect message instead of disconnect callback.
2543 Don't call dbus_connection_set_disconnect_function. Instead export
2544 bus_connection_disconnect.
2547 Call bus_connection_disconnect when we get a disconnected message.
2549 2003-02-15 Havoc Pennington <hp@pobox.com>
2551 * dbus/dbus-message.c (dbus_message_new): fool around with the
2554 2003-02-14 Havoc Pennington <hp@pobox.com>
2556 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2558 * dbus/dbus-memory.c: fail if the debug functions indicate we
2561 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2562 (_dbus_decrement_fail_alloc_counter): debug functions to
2563 simulate memory allocation failures
2565 2003-02-14 Havoc Pennington <hp@pobox.com>
2567 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2570 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2572 * bus/driver.c: (bus_driver_handle_hello):
2574 * bus/services.c: (bus_service_lookup):
2575 Reorder message sending so we get a more sane order.
2577 * test/bus-test.c: (message_handler):
2580 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2582 * bus/driver.c: (bus_driver_send_service_deleted),
2583 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2584 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2585 (bus_driver_send_welcome_message),
2586 (bus_driver_handle_list_services),
2587 (bus_driver_handle_acquire_service),
2588 (bus_driver_handle_service_exists):
2589 * dbus/dbus-bus.c: (dbus_bus_register_client),
2590 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2591 * dbus/dbus-errors.c: (dbus_result_to_string):
2592 * dbus/dbus-errors.h:
2593 * dbus/dbus-message.c: (dbus_message_append_args),
2594 (dbus_message_append_args_valist), (dbus_message_get_args),
2595 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2596 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2597 (dbus_message_iter_get_byte_array),
2598 (dbus_message_iter_get_string_array), (message_iter_test),
2599 (check_message_handling), (_dbus_message_test):
2600 * dbus/dbus-message.h:
2601 * test/bus-test.c: (main):
2602 Change fields to arguments in messages, so that they won't be
2603 confused with header fields.
2605 * glib/test-dbus-glib.c: (main):
2606 Remove append_fields from hello message.
2608 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2610 * dbus/dbus-errors.c:
2611 * dbus/dbus-message.c:
2612 * dbus/dbus-string.c:
2613 Documentation fixes.
2615 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2617 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2619 Implement support for timeouts in dbus-glib.
2621 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2623 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2624 * dbus/dbus-message.c: (process_test_subdir):
2625 * test/break-loader.c: (find_breaks_based_on):
2626 Plug some memory leaks.
2628 2003-02-13 Richard Hult <rhult@codefactory.se>
2630 * bus/main.c: Fix build.
2632 * dbus/dbus-errors.h:
2633 * dbus/dbus-errors.c: Fix copyright for Anders.
2635 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2640 * bus/connection.c: (bus_connection_foreach):
2643 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2644 (unescape_string), (new_section), (parse_section_start),
2645 (parse_key_value), (report_error), (bus_desktop_file_load),
2646 (bus_desktop_file_get_string):
2647 * bus/desktop-file.h:
2648 Use DBusError for error reporting.
2650 * bus/dispatch.c: (send_one_message),
2651 (bus_dispatch_message_handler):
2652 * bus/driver.c: (bus_driver_send_service_deleted),
2653 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2654 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2655 (bus_driver_send_welcome_message),
2656 (bus_driver_handle_list_services),
2657 (bus_driver_handle_acquire_service),
2658 (bus_driver_handle_service_exists):
2659 * bus/loop.c: (bus_loop_run):
2661 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2663 * bus/utils.c: (bus_wait_for_memory):
2665 New files with general utility functions.
2667 * dbus/dbus-internals.h:
2668 Remove _DBUS_HANDLE_OOM.
2670 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2672 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2673 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2674 * dbus/dbus-errors.h:
2675 Add DBusError structure.
2677 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2679 * test/data/valid-messages/standard-acquire-service.message:
2680 * test/data/valid-messages/standard-hello.message:
2681 * test/data/valid-messages/standard-list-services.message:
2682 * test/data/valid-messages/standard-service-exists.message:
2683 Add some standard messages.
2685 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2687 * bus/driver.c: (bus_driver_send_welcome_message),
2688 (bus_driver_handle_list_services),
2689 (bus_driver_handle_acquire_service),
2690 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2691 Update for API changes in libdbus.
2693 * dbus/dbus-message.c: (dbus_message_new_reply):
2694 * dbus/dbus-message.h:
2695 Remove the name argument. The spec states that replies shouldn't
2698 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2700 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2701 (report_error), (bus_desktop_file_load), (lookup_section),
2702 (lookup_line), (bus_desktop_file_get_raw),
2703 (bus_desktop_file_get_string):
2704 * bus/desktop-file.h:
2705 Some fixes, and new functions for getting a key value from a section.
2707 2003-02-13 Havoc Pennington <hp@pobox.com>
2709 * test/data/auth/fail-after-n-attempts.auth-script: new test
2711 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2714 2003-02-13 Havoc Pennington <hp@pobox.com>
2716 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2717 dbus_credentials_match were backward
2719 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2720 NO_CREDENTIALS and ROOT_CREDENTIALS
2722 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2723 into here. Never process more commands after we've reached an
2724 end state; store further data as unused bytes.
2726 * test/data/auth/*: add more auth tests
2728 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2729 command to match exact string and EXPECT_UNUSED to match unused
2732 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2734 2003-02-12 Havoc Pennington <hp@pobox.com>
2736 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2737 \r off of popped lines
2739 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2742 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2745 2003-02-12 Havoc Pennington <hp@pobox.com>
2747 * dbus/Makefile.am: remove break-loader from the build, since it
2750 * configure.in: add --enable-gcov to turn on coverage profiling
2751 flags and disable optimization
2753 2003-02-10 Havoc Pennington <hp@pobox.com>
2755 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2756 initial cut at test framework for DBusAuth from laptop.
2757 Doesn't quite work yet but it compiles and I need to get
2758 it off the 266mhz laptop. ;-)
2760 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2761 fix a memleak in error case
2763 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2766 * bus/desktop-file.c:
2767 * bus/desktop-file.h:
2768 Add a desktop file parser.
2770 2003-02-11 Zack Rusin <zack@kde.org>
2772 * qt/message.[h|cpp]: sample implementation
2773 of the KDE wrapper for DBusMessage
2775 2003-02-09 Zack Rusin <zack@kde.org>
2777 * test/bus-test.c: make_it_compile
2778 * doc/dbus-specification.sgml: minimal semantic fix
2780 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2786 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2789 * dbus/dbus-break-loader.c:
2791 * test/break-loader.c:
2792 Move dbus-break-loader to test/ and rename it to break-loader.
2794 2003-02-02 Havoc Pennington <hp@pobox.com>
2796 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2797 for code to manage cookies in your home directory
2799 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2801 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2802 to authenticate, then disconnect the client.
2804 2003-02-03 Alexander Larsson <alexl@redhat.com>
2806 * dbus/dbus-message.c (dbus_message_append_fields):
2809 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2811 * doc/dbus-specification.sgml:
2812 Update address format section.
2814 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2817 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2818 (message_handler), (new_connection_callback), (loop_quit),
2822 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2824 * bus/driver.c: (bus_driver_handle_service_exists):
2825 Simplify the code a bit.
2827 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2830 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2833 Add libdbus-daemon.la and link to it.
2835 2003-02-01 James Willcox <jwillcox@gnome.org>
2837 * bus/driver.c: (bus_driver_handle_own_service):
2838 Actually include the service reply code in the message.
2840 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2842 * bus/driver.c: (bus_driver_handle_service_exists):
2843 Don't unref the incoming message.
2845 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2847 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2849 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2851 * dbus/dbus-server.c: (dbus_server_listen):
2852 * dbus/dbus-transport.c: (_dbus_transport_open):
2853 ifdef out the calls to the debug transport and server.
2855 2003-02-02 Alexander Larsson <alexl@redhat.com>
2857 * dbus/dbus-watch.c (dbus_watch_get_flags):
2858 Add note in the docs that ERROR or HANGUP won't be returned
2859 and are assumed always on.
2861 * glib/dbus-gmain.c (add_watch):
2862 Always add IO_ERR | IO_HUP
2864 * dbus/dbus-message.h:
2865 Add semicolon after dbus_message_iter_get_string_array().
2866 Makes qt code build again
2868 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2870 * bus/driver.c: (create_unique_client_name),
2871 (bus_driver_handle_hello):
2872 Don't take a name, just use a numeric id to identify
2876 * dbus/dbus-bus.c: (dbus_bus_register_client),
2877 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2879 Add new convenience functions for communicating with the bus.
2881 * dbus/dbus-message.h:
2883 * dbus/dbus-protocol.h:
2886 2003-02-01 Alexander Larsson <alexl@redhat.com>
2888 * dbus/dbus-message.c (dbus_message_append_fields):
2889 Add some more doc comments.
2891 2003-02-01 Havoc Pennington <hp@pobox.com>
2893 * dbus/dbus-break-loader.c (randomly_modify_length): change
2894 a 4-byte value in the message as if it were a length
2896 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2897 execute bit on saved files
2899 2003-02-01 Havoc Pennington <hp@pobox.com>
2901 * dbus/dbus-break-loader.c (main): new program to find messages
2902 that break the loader.
2904 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2905 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2907 * dbus/dbus-string.c (_dbus_string_set_byte): new
2909 2003-01-31 Havoc Pennington <hp@pobox.com>
2911 * dbus/dbus-message.c: refactor the test code to be more general,
2912 in preparation for writing a "randomly permute test cases to
2913 try to break the loader" program.
2915 2003-01-31 Havoc Pennington <hp@pobox.com>
2917 * doc/dbus-specification.sgml: work on the specification
2919 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2920 the protocol version of the message.
2922 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2923 no longer specifies that.
2924 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2927 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2928 "break" for DBUS_TYPE_NIL, remove @todo
2930 2003-01-31 Havoc Pennington <hp@pobox.com>
2932 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2933 just set_is_error/get_is_error as this is a commonly-used
2934 function, and write docs.
2936 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2938 * dbus/dbus-address.c: (dbus_address_entry_free):
2939 Free key and value lists.
2941 * dbus/dbus-internals.c: (_dbus_type_to_string):
2942 Add the types we didn't have.
2944 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2945 (_dbus_marshal_validate_arg):
2948 * dbus/dbus-message.c: (dbus_message_set_sender):
2949 Remove todo about being able to set sender to NULL.
2951 (dbus_message_set_is_error_reply),
2952 (dbus_message_get_is_error_reply):
2953 * dbus/dbus-message.h:
2956 * dbus/dbus-protocol.h:
2957 Add error reply flag.
2959 * test/data/valid-messages/opposite-endian.message:
2960 Add NIL type to test.
2962 2003-01-31 Havoc Pennington <hp@pobox.com>
2964 * doc/dbus-specification.sgml: fully specify the header. Add
2965 flags and major protocol version, and change header/body len to
2968 * dbus/dbus-message-builder.c (append_saved_length): append length
2971 * dbus/dbus-message.c (dbus_message_create_header): change header
2972 length and body length to unsigned. Add the new fields from the
2974 (_dbus_message_loader_return_buffer): unsigned header/body len
2976 2003-01-30 Havoc Pennington <hp@pobox.com>
2978 * dbus/dbus-auth.c: rework to use only REJECTED, no
2981 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2982 use REJECTED, suggested by Mark McLoughlin
2984 2003-01-30 Havoc Pennington <hp@pobox.com>
2986 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2987 a better way to report errors here. e.g. "unix address lacks
2988 path" or something. also "no such file" when the path doesn't
2991 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2993 (dbus_parse_address): add @todo about documenting address format,
2994 and allowing , and ; to be escaped
2996 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2999 Add dbus-address.[ch]
3001 * dbus/dbus-address.c: (dbus_address_entry_free),
3002 (dbus_address_entries_free), (create_entry),
3003 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3004 (dbus_parse_address), (_dbus_address_test):
3005 * dbus/dbus-address.h:
3006 New files for dealing with address parsing.
3008 * dbus/dbus-connection.c:
3009 Document timeout functions.
3011 * dbus/dbus-message.c:
3012 Document dbus_message_new_from_message.
3014 * dbus/dbus-server-debug.c:
3017 * dbus/dbus-server.c: (dbus_server_listen):
3018 Parse address and use correct server implementation.
3020 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3021 * dbus/dbus-string.h:
3022 New function with test.
3024 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3028 * dbus/dbus-transport-debug.c:
3031 * dbus/dbus-transport.c: (_dbus_transport_open):
3032 Parse address and use correct transport implementation.
3034 2003-01-30 Havoc Pennington <hp@pobox.com>
3036 * dbus/dbus-message.c: use message->byte_order instead of
3037 DBUS_COMPILER_BYTE_ORDER throughout.
3038 (dbus_message_create_header): pad header to align the
3039 start of the body of the message to 8-byte boundary
3041 * dbus/dbus-marshal.h: make all the demarshalers take const
3042 DBusString arguments.
3044 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3045 validate message args here, so we don't have to do slow validation
3046 later, and so we catch bad messages as they are incoming. Also add
3047 better checks on header_len and body_len. Also fill in
3050 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3051 implemented properly)
3052 (_dbus_string_validate_nul): new function to check all-nul
3054 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3055 get_arg_end_pos and remove all validation
3056 (_dbus_marshal_validate_arg): actually do validation here.
3058 2003-01-29 Havoc Pennington <hp@pobox.com>
3060 * dbus/dbus-message.c (check_message_handling): fix assertion
3061 failure on set_client_serial
3063 2003-01-28 Havoc Pennington <hp@pobox.com>
3065 * dbus/dbus-server-debug.c: Add doc section comments
3067 * dbus/dbus-transport-debug.c: add doc section comments
3069 2003-01-28 Havoc Pennington <hp@redhat.com>
3071 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3072 the reverse order from how I had it
3073 (_dbus_string_base64_encode): reverse encoding order. I was
3074 basically byteswapping everything during encoding.
3076 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3078 * dbus/dbus-connection-internal.h:
3079 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3080 (_dbus_connection_remove_timeout):
3081 Add functions for adding and removing timeouts.
3083 * dbus/dbus-message.c: (dbus_message_new_from_message):
3084 Add new function that takes a message and creates an exact
3085 copy of it, but with the refcount set to 1.
3086 (check_message_handling):
3089 * dbus/dbus-server-protected.h:
3090 * dbus/dbus-server.c: (_dbus_server_init_base),
3091 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3092 (dbus_server_set_timeout_functions):
3093 (_dbus_server_remove_timeout):
3094 New functions so that a server can add and remove timeouts.
3096 (dbus_server_listen):
3097 Add commented out call to dbus_server_debug_new.
3099 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3100 Actually set the handler, doh.
3102 * dbus/dbus-transport.c: (_dbus_transport_open):
3103 Add commented out call to dbus_transport_debug_client_new.
3106 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3108 2003-01-28 Havoc Pennington <hp@pobox.com>
3110 * dbus/dbus-message.c (check_message_handling): function to check
3111 on the loaded message, iterates over it etc.
3113 2003-01-28 Havoc Pennington <hp@pobox.com>
3115 * test/Makefile.am (dist-hook): fix make distdir
3117 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3119 2003-01-27 Havoc Pennington <hp@pobox.com>
3121 * dbus/dbus-mempool.c (time_for_size): replace printf with
3124 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3125 empty lines; fix the SAVE_LENGTH stuff to be
3126 START_LENGTH/END_LENGTH so it actually works; couple other
3129 * test/Makefile.am (dist-hook): add dist-hook for .message files
3131 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3132 can be constant or locked.
3133 (_dbus_string_free): allow freeing a const string as
3136 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3138 * dbus/dbus-test-main.c (main): take an argument which is the
3139 directory containing test data
3141 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3142 argument to this and load all the messages in test/data/
3143 checking that they can be loaded or not loaded as appropriate.
3145 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3147 * bus/dispatch.c: (bus_dispatch_message_handler):
3148 Dispatch messages sent to services.
3150 * bus/driver.c: (bus_driver_send_service_deleted),
3151 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3152 (bus_driver_send_service_acquired):
3153 Add helper functions for sending service related messages.
3155 (bus_driver_send_welcome_message):
3156 Send HELLO_REPLY instead of WELCOME.
3158 (bus_driver_handle_list_services):
3159 Send LIST_SERVICES_REPLY instead of SERVICES.
3161 (bus_driver_handle_own_service),
3162 (bus_driver_handle_service_exists):
3163 New message handlers.
3165 (bus_driver_handle_message):
3166 Invoke new message handlers.
3168 (bus_driver_remove_connection):
3169 Don't remove any services here since that's done automatically
3170 by bus_service_remove_owner now.
3173 New function signatures.
3175 * bus/services.c: (bus_service_add_owner):
3176 Send ServiceAcquired message if we're the only primary owner.
3178 (bus_service_remove_owner):
3179 Send ServiceAcquired/ServiceLost messages.
3181 (bus_service_set_prohibit_replacement),
3182 (bus_service_get_prohibit_replacement):
3183 Functions for setting prohibit replacement.
3185 (bus_service_has_owner):
3186 New function that checks if a connection is in the owner queue of
3190 Add new function signatures.
3192 * dbus/dbus-list.c: (_dbus_list_test):
3193 Add tests for _dbus_list_remove_last and traversing the list backwards.
3196 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3197 go any further, so return NULL then.
3199 * dbus/dbus-protocol.h:
3200 Add new messages, service flags and service replies.
3202 2003-01-26 Havoc Pennington <hp@pobox.com>
3204 * dbus/dbus-message-builder.c: implement, completely untested.
3206 * test/data/*: add data to be used in testing.
3207 ".message" files are our simple loadable text format.
3208 ".message-raw" will be binary dumps of messages.
3210 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3212 2003-01-26 Havoc Pennington <hp@pobox.com>
3214 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3216 * dbus/dbus-errors.c (dbus_result_to_string): add
3219 * dbus/dbus-message-builder.c: new file, will contain code to load
3220 up messages from files. Not implemented yet.
3222 2003-01-26 Havoc Pennington <hp@pobox.com>
3224 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3225 the sender by setting to NULL
3227 2003-01-26 Havoc Pennington <hp@pobox.com>
3229 The unit tests pass, but otherwise untested. If it breaks, the
3230 tests should have been better. ;-)
3232 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3235 * dbus/dbus-message.c: redo everything so we maintain
3236 message->header as the only copy of the various fields.
3237 This avoids the possibility of out-of-memory in some cases,
3238 for example dbus_message_lock() can't run out of memory anymore,
3239 and avoids extra copying. Figured I may as well go ahead and do
3240 this since it was busted for dbus_message_lock to not return
3241 failure on OOM, and dbus_message_write_header was totally
3242 unchecked for OOM. Also fixed some random other bugs.
3244 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3245 that strings are nul-terminated. Also, end_pos can be equal
3246 to string length just not greater than, I think.
3247 (_dbus_marshal_set_int32): new function
3248 (_dbus_marshal_set_uint32): new function
3249 (_dbus_marshal_set_string): new function
3251 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3252 a warning, init timeout_list to NULL
3253 (dbus_connection_send_message): don't use uninitialized variable
3256 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3258 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3260 * bus/driver.c: (bus_driver_handle_hello),
3261 (bus_driver_send_welcome_message):
3264 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3266 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3267 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3268 (dbus_connection_unref):
3269 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3270 * dbus/dbus-message.c: (dbus_message_unref),
3273 (dbus_message_get_fields):
3274 Remove debugging printout.
3276 (_dbus_message_loader_return_buffer):
3277 Don't store the header string.
3279 (_dbus_message_test):
3282 2003-01-26 Richard Hult <rhult@codefactory.se>
3284 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3285 the file descriptor list, since it can change under us.
3287 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3289 * glib/dbus-gmain.c: (dbus_connection_prepare),
3290 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3291 (remove_watch), (dbus_connection_hookup_with_g_main):
3292 Rewrite the glib handling to use its own GSource instead of a
3293 GIOChannel so we can catch messages put in the queue while waiting
3296 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3299 * bus/connection.c: (connection_disconnect_handler),
3300 (connection_watch_callback), (bus_connection_setup):
3301 * bus/dispatch.c: (send_one_message),
3302 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3303 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3305 * bus/driver.c: (bus_driver_send_service_deleted),
3306 (bus_driver_send_service_created), (bus_driver_handle_hello),
3307 (bus_driver_send_welcome_message),
3308 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3309 (bus_driver_handle_message):
3311 Refactor code, put the message dispatching in its own file. Use
3312 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3315 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3317 * dbus/dbus-internals.h:
3318 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3320 * dbus/dbus-message.c: (dbus_message_get_sender):
3321 * dbus/dbus-message.h:
3322 Implement dbus_message_get_sender.
3324 * dbus/dbus-protocol.h:
3325 Add message and service defines.
3327 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3329 * dbus/dbus-connection.c: (dbus_connection_send_message):
3330 * dbus/dbus-message-internal.h:
3331 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3332 (dbus_message_write_header):
3333 Remove _dbus_messag_unlock and don't set the client serial on a
3334 message if one already exists.
3336 2003-01-24 Havoc Pennington <hp@pobox.com>
3338 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3341 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3344 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3346 * dbus/dbus-list.c: (alloc_link), (free_link):
3347 Use a memory pool for the links.
3349 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3351 * bus/connection.c: (bus_connection_foreach):
3353 Add new bus_connection_foreach function.
3355 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3356 Add function that broadcasts a message to all clients.
3358 (bus_driver_send_service_created), (bus_driver_handle_hello),
3359 (bus_driver_send_welcome_message),
3360 (bus_driver_handle_list_services), (bus_driver_message_handler):
3361 Implement functions that take care of listing services, and notifying
3362 clients when new services are created.
3364 * bus/services.c: (bus_services_list):
3366 Add new function that returns an array of strings with the currently
3367 registered services.
3370 * glib/dbus-gmain.c:
3371 Update copyright year.
3373 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3375 * dbus/dbus-connection.c: (dbus_connection_send_message):
3376 Unlock the message in case it was sent earlier.
3378 (dbus_connection_send_message_with_reply_and_block):
3379 Remove the reply message from the list.
3381 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3382 Set array_len and new_pos correctly.
3384 (_dbus_marshal_test):
3385 Remove debug output.
3387 * dbus/dbus-message-internal.h:
3388 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3389 New function that returns the reply serial.
3391 (_dbus_message_unlock):
3392 New function that unlocks a message and resets its header.
3394 (dbus_message_append_string_array),
3395 (dbus_message_get_fields_valist),
3396 (dbus_message_iter_get_field_type),
3397 (dbus_message_iter_get_string_array),
3398 (dbus_message_get_fields),
3399 (dbus_message_append_fields_valist):
3400 Handle string arrays.
3402 (dbus_message_set_sender):
3403 Make this function public since the bus daemon needs it.
3405 (decode_header_data):
3406 Set the reply serial to -1 initially.
3408 * dbus/dbus-message.h:
3409 Add dbus_message_set_sender.
3411 2003-01-24 Havoc Pennington <hp@pobox.com>
3413 * doc/dbus-specification.sgml: add some stuff
3415 2003-01-22 Havoc Pennington <hp@pobox.com>
3417 * doc/dbus-specification.sgml: Start to document the protocol.
3419 2003-01-22 Havoc Pennington <hp@pobox.com>
3421 * dbus/dbus-connection.c
3422 (dbus_connection_send_message_with_reply_and_block): add some @todo
3424 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3426 2003-01-21 Havoc Pennington <hp@pobox.com>
3428 (patch untested because can't compile)
3430 * bus/driver.c (create_unique_client_name): make this function
3431 never recycle client names. Also, caller should initialize
3434 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3436 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3438 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3439 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3440 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3441 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3442 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3443 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3444 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3445 * dbus/dbus-marshal.h:
3446 * dbus/dbus-protocol.h:
3447 Add support for marshalling and demarshalling integer, double
3450 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3455 * bus/connection.c: (connection_disconnect_handler):
3456 Remove the connection from the bus driver's list.
3458 (connection_watch_callback): Dispatch messages.
3460 (free_connection_data): Free connection name.
3462 (bus_connection_setup): Add connection to the bus driver's list.
3463 (bus_connection_remove_owned_service):
3464 (bus_connection_set_name), (bus_connection_get_name):
3465 Add functions for setting and getting the connection's name.
3468 Add function headers.
3470 * bus/driver.c: (create_unique_client_name),
3471 (bus_driver_handle_hello_message),
3472 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3473 (bus_driver_add_connection), (bus_driver_remove_connection):
3476 * bus/services.c: (bus_service_free):
3478 New file that handles communication and registreation with the bus
3481 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3483 * dbus/dbus-connection.c: (dbus_connection_send_message):
3484 Add a new client_serial parameter.
3486 (dbus_connection_send_message_with_reply):
3487 Remove a @todo since we've implemented the blocking function.
3489 (dbus_connection_send_message_with_reply_and_block):
3490 New function that sends a message and waits for a reply and
3491 then returns the reply.
3493 * dbus/dbus-connection.h:
3496 * dbus/dbus-errors.c: (dbus_result_to_string):
3497 * dbus/dbus-errors.h:
3498 Add new DBUS_RESULT.
3500 * dbus/dbus-message-internal.h:
3501 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3502 (_dbus_message_set_sender), (dbus_message_write_header),
3503 (dbus_message_new_reply), (decode_header_data),
3504 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3505 * dbus/dbus-message.h:
3506 Add new functions that set the reply serial and sender.
3507 Also marshal and demarshal them correctly and add test.
3509 * dbus/dbus-protocol.h:
3510 Add new DBUS_MESSAGE_TYPE_SENDER.
3513 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3514 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3515 (dbus_connection_hookup_with_g_main):
3516 * glib/test-dbus-glib.c: (main):
3517 Rewrite to use GIOChannel and remove the GSource crack.
3519 * test/echo-client.c: (main):
3520 * test/watch.c: (check_messages):
3521 Update for changed APIs
3523 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3525 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3527 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3528 Create a DBusTimeoutList.
3529 (dbus_connection_set_timeout_functions): Add new function to
3530 set timeout callbacks
3532 * dbus/dbus-connection.h: Add public DBusTimeout API.
3534 * dbus/dbus-message.c: (dbus_message_get_service):
3535 * dbus/dbus-message.h: New function.
3537 * dbus/dbus-server.c: Fix small doc typo.
3539 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3541 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3543 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3544 of the string, just as long as specified.
3546 2003-01-19 Havoc Pennington <hp@pobox.com>
3548 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3551 * dbus/dbus-server.c (dbus_server_set_max_connections)
3552 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3553 keep track of current number of connections, and add API for
3554 setting a max (but haven't implemented enforcing the max yet)
3556 2003-01-18 Havoc Pennington <hp@pobox.com>
3558 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3559 reading/writing if read_watch != NULL or write_watch != NULL.
3561 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3562 the message loader code to actually load message->header and
3563 message->body into the newly-created message.
3565 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3568 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3569 (dbus_connection_get_max_message_size)
3570 (dbus_connection_set_max_live_messages_size)
3571 (dbus_connection_get_max_live_messages_size): implement some
3572 resource limitation functions
3574 * dbus/dbus-resources.c: new file implementing some of the
3575 resource limits stuff
3577 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3578 missing docs, add @todo to handle OOM etc.
3580 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3583 2003-01-18 Havoc Pennington <hp@pobox.com>
3585 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3586 connection if it hasn't been already.
3588 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3589 replace with DisconnectFunction.
3591 2003-01-18 Havoc Pennington <hp@pobox.com>
3593 Building --disable-verbose-mode --disable-asserts --disable-tests
3594 cuts the library from 112K to 45K or so
3596 * configure.in: check for varargs macro support,
3597 add --enable-verbose-mode, --enable-asserts.
3599 * dbus/dbus-internals.h (_dbus_assert): support
3601 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3603 2003-01-18 Havoc Pennington <hp@pobox.com>
3605 * dbus/dbus-test.c: include config.h so that tests actually run
3607 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3608 so the failure mode when that assumption fails will be plenty
3611 2003-01-18 Havoc Pennington <hp@pobox.com>
3613 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3615 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3618 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3619 since we don't want to use those in make check
3621 2003-01-15 Havoc Pennington <hp@redhat.com>
3627 2003-01-15 Havoc Pennington <hp@redhat.com>
3629 * test/Makefile.am: fix so that test source code ends up in the
3630 distribution on make distcheck
3632 2003-01-15 Havoc Pennington <hp@redhat.com>
3638 2003-01-15 Havoc Pennington <hp@redhat.com>
3640 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3641 fix build when --disable-tests
3643 * Makefile.am (EXTRA_DIST): put HACKING in here
3645 * HACKING: document procedure for making a tarball release.
3647 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3649 * bus/connection.c: (connection_error_handler),
3650 (bus_connection_setup):
3651 * bus/main.c: (main):
3652 Make sure that the DBusConnectionData struct is NULLed
3653 out to prevent a segfault.
3655 * dbus/dbus-errors.c: (dbus_result_to_string):
3656 * dbus/dbus-errors.h:
3657 * dbus/dbus-message.c: (dbus_message_get_fields),
3658 (dbus_message_get_fields_valist), (_dbus_message_test):
3659 * dbus/dbus-message.h:
3660 Make dbus_message_get_fields return a result code so we can
3661 track invalid fields as well as oom.
3663 2003-01-11 Havoc Pennington <hp@pobox.com>
3665 * configure.in: change --enable-test/--enable-ansi action-if-given
3666 to enable_foo=$enableval instead of enable_foo=yes
3668 2003-01-08 Havoc Pennington <hp@pobox.com>
3670 * dbus/dbus-string.c (_dbus_string_align_length): new function
3672 * dbus/dbus-test-main.c: move main() for test app here
3674 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3675 symbol to run tests, because dbus-test isn't in the main
3678 Code review nitpicks.
3680 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3681 for people with narrow emacs ;-). Assert client_serial was filled
3682 in. Assert message->name != NULL.
3683 (dbus_message_append_fields): have "first_field_type" arg separate
3684 from va list, needed for C++ binding that also uses varargs IIRC
3685 and helps with type safety
3686 (dbus_message_new): add @todo about using DBusString to store
3687 service/name internally
3688 (dbus_message_new): don't leak ->service and ->name on OOM later
3690 (dbus_message_unref): free the service name
3691 (dbus_message_get_fields): same change to varargs
3692 i.e. first_field_type
3693 (_dbus_message_loader_return_buffer): assert that the message data
3694 is aligned (if not it's a bug in our code). Put in verbose griping
3695 about why we set corrupted = TRUE.
3696 (decode_header_data): add FIXME that char* is evil. Was going to
3697 add FIXME about evil locale-specific string.h strncmp, but just
3698 switched to wacky string-as-uint32 optimization. Move check for
3699 "no room for field name" above get_const_data_len() to avoid
3700 assertion failure in get_const_data_len if we have trailing 2
3701 bytes or the like. Check for service and name fields being
3702 provided twice. Don't leak service/name on error. Require field
3703 names to be aligned to 4 bytes.
3705 * dbus/dbus-marshal.c: move byte swap stuff to header
3706 (_dbus_pack_int32): uscore-prefix
3707 (_dbus_unpack_int32): uscore-prefix
3708 (_dbus_unpack_uint32): export
3709 (_dbus_demarshal_string): add @todo complaining about use of
3711 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3712 handling allowing corrupt data to go unchecked
3714 2003-01-08 Havoc Pennington <hp@redhat.com>
3716 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3717 to the select() as needed for authentication. (should be using
3718 _dbus_poll() not select, but for another day)
3720 * dbus/dbus.h: include dbus/dbus-protocol.h
3722 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3724 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3727 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3729 * dbus/dbus-internals.c: (_dbus_type_to_string):
3730 New function that returns a string describing a type.
3732 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3733 * dbus/dbus-marshal.h:
3734 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3735 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3736 (dbus_message_iter_get_byte_array):
3737 * dbus/dbus-message.h:
3738 Add new convenience functions for appending and getting message fields.
3739 Also add demarshalling routines for byte arrays.
3741 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3743 * dbus/dbus-connection-internal.h:
3744 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3745 (_dbus_connection_get_next_client_serial),
3746 (dbus_connection_send_message):
3747 * dbus/dbus-internals.h:
3748 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3749 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3750 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3751 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3752 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3753 (_dbus_verbose_bytes), (_dbus_marshal_test):
3754 * dbus/dbus-marshal.h:
3755 * dbus/dbus-message-internal.h:
3756 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3757 (dbus_message_write_header), (_dbus_message_lock),
3758 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3759 (dbus_message_get_name), (dbus_message_append_int32),
3760 (dbus_message_append_uint32), (dbus_message_append_double),
3761 (dbus_message_append_string), (dbus_message_append_byte_array),
3762 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3763 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3764 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3765 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3766 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3767 (decode_header_data), (_dbus_message_loader_return_buffer),
3768 (message_iter_test), (_dbus_message_test):
3769 * dbus/dbus-message.h:
3770 * dbus/dbus-protocol.h:
3771 * dbus/dbus-test.c: (main):
3773 * glib/test-dbus-glib.c: (message_handler), (main):
3774 * test/echo-client.c: (main):
3775 * test/watch.c: (check_messages):
3776 Make messages sendable and receivable for real.
3778 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3780 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3781 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3782 * dbus/dbus-message.c: (dbus_message_append_int32),
3783 (dbus_message_append_uint32), (dbus_message_append_double),
3784 (dbus_message_append_string), (dbus_message_append_byte_array):
3785 Handle OOM restoration.
3787 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3789 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3790 (_dbus_demarshal_string), (_dbus_marshal_test):
3791 * dbus/dbus-marshal.h:
3792 * dbus/dbus-message.c: (dbus_message_get_name),
3793 Document these functions.
3795 (dbus_message_append_int32), (dbus_message_append_uint32),
3796 (dbus_message_append_double), (dbus_message_append_string),
3797 (dbus_message_append_byte_array):
3798 * dbus/dbus-message.h:
3799 Add functions for adding message fields of different types.
3801 * dbus/dbus-protocol.h:
3802 Add the different types.
3804 2003-01-05 Havoc Pennington <hp@pobox.com>
3806 * bus/connection.c: implement routines for handling connections,
3807 first thing is keeping a list of owned services on each connection
3808 and setting up watches etc.
3810 * bus/services.c: implement a mapping from service names to lists
3813 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3815 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3816 to use static mutexes for global data
3818 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3819 collection of functions to set/get application-specific data
3820 on the DBusConnection.
3822 2003-01-04 Havoc Pennington <hp@pobox.com>
3824 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3825 (_dbus_poll): new function
3827 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3830 * bus/loop.c: initial code for the daemon main loop
3832 2003-01-04 Havoc Pennington <hp@pobox.com>
3834 * test/watch.c (error_handler): make it safe if the error handler
3835 is called multiple times (if we s/error handler/disconnect
3836 handler/ we should just guarantee it's called only once)
3838 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3839 error handler on disconnect (it's quite possible we should
3840 just change the error handler to a "disconnect handler," I'm
3841 not sure we have any other meaningful errors)
3843 * configure.in: check for getpwnam_r
3845 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3846 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3847 mechanism as in SASL spec, using socket credentials
3849 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3850 (_dbus_send_credentials_unix_socket): new function
3852 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3854 (_dbus_write): only check errno if <0 returned
3855 (_dbus_write_two): ditto
3857 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3859 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3860 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3861 (_dbus_marshal_test):
3862 * dbus/dbus-marshal.h:
3863 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3864 to _dbus_marshal_utf8_string. Also fix some tests.
3866 2002-12-28 Harri Porten <porten@kde.org>
3868 * configure.in: added check for C++ compiler and a very cheesy
3869 check for the Qt integration
3871 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3873 * qt/Makefile.am: added
3875 * qt/.cvsignore: added
3877 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3878 latter, added #ifdef QT_THREAD_SUPPORT guard.
3880 * dbus/Makefile.am: added missing headers for make dist
3882 2002-12-28 Kristian Rietveld <kris@gtk.org>
3884 * dbus/Makefile.am: fixup export-symbols-regex.
3886 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3888 * acinclude.m4: Add this file and put the
3889 PKG_CHECK_MODULE macro in it.
3891 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3893 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3894 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3895 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3896 (_dbus_marshal_test):
3897 Make the demarshalling routines align the pos argument.
3898 Add string marshalling tests and fix the obvious bugs
3901 2002-12-26 Havoc Pennington <hp@pobox.com>
3903 * dbus/dbus-auth.c: fixes fixes fixes
3905 * dbus/dbus-transport-unix.c: wire up support for
3906 encoding/decoding data on the wire
3908 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3909 (_dbus_auth_decode_data): append to target string
3910 instead of nuking it.
3912 2002-12-26 Havoc Pennington <hp@pobox.com>
3914 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3915 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3918 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3919 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3920 now). Main point is because I wanted unpack_uint32 to implement
3922 (_dbus_verbose_bytes): new function
3924 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3926 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3927 mechanism to handle a corrupt message stream
3928 (_dbus_message_loader_new): fix preallocation to only prealloc,
3931 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3932 (_dbus_string_test): enhance tests for copy/move and fix the
3935 * dbus/dbus-transport-unix.c: Hold references in more places to
3936 avoid reentrancy problems
3938 * dbus/dbus-transport.c: ditto
3940 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3941 leak reference count in no-message case
3943 * test/watch.c (do_mainloop): handle adding/removing watches
3944 during iteration over the watches. Also, ref the connection/server
3945 stored on a watch, so we don't try to mangle a destroyed one.
3947 * dbus/dbus-transport-unix.c (do_authentication): perform
3950 * dbus/dbus-auth.c (get_state): add a state
3951 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3952 (_dbus_auth_get_unused_bytes): append the unused bytes
3953 to the passed in string, rather than prepend
3955 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3956 the auth conversation DBusAuth
3958 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3959 (_dbus_transport_new_for_domain_socket): when creating a
3960 transport, pass in whether it's a client-side or server-side
3961 transport so we know which DBusAuth to create
3963 2002-12-03 Havoc Pennington <hp@pobox.com>
3965 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3966 _after_ finalizing the derived members
3967 (unix_connection_set): unref watch if we fail to add it
3969 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3970 transport first, so that the connection owned by the
3971 transport will be valid as the transport finalizes.
3973 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3974 if necessary, and remove watches from the connection.
3976 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3978 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3980 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3981 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3982 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3983 (_dbus_marshal_test):
3984 * dbus/dbus-marshal.h:
3985 Add string marshal functions and have the demarshal functions
3986 return the new position.
3988 2002-12-25 Havoc Pennington <hp@pobox.com>
3990 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3991 it is a simple protocol that just maps directly to SASL.
3993 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3994 initial implementation, not actually used yet.
3996 * dbus/dbus-string.c (_dbus_string_find): new function
3997 (_dbus_string_equal): new function
3998 (_dbus_string_base64_encode): new function
3999 (_dbus_string_base64_decode): new function
4001 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4004 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4005 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4006 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4007 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4008 * dbus/dbus-marshal.h:
4009 * dbus/dbus-protocol.h:
4010 * dbus/dbus-test.c: (main):
4012 Add un-optimized marshalling/demarshalling routines.
4014 2002-12-25 Harri Porten <porten@kde.org>
4016 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4018 2002-12-24 Zack Rusin <zack@kde.org>
4020 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4021 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4024 2002-12-24 Havoc Pennington <hp@pobox.com>
4026 * glib/dbus-gthread.c: fix include
4028 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4029 I think glib API needs to change, though, as you don't
4030 want to use DBusMessageFunction, you want to use the
4031 DBusMessageHandler object. Probably
4032 dbus_connection_open_with_g_main_loop()
4033 and dbus_connection_setup_g_main_loop() or something like that
4034 (but think of better names...) that just create a connection
4035 that has watch/timeout functions etc. already set up.
4037 * dbus/dbus-connection.c
4038 (dbus_connection_send_message_with_reply): new function just to
4039 show how the message handler helps us deal with replies.
4041 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4043 * dbus/dbus-string.c (_dbus_string_test): free a string that
4046 * dbus/dbus-hash.c: use memory pools for the hash entries
4047 (rebuild_table): be more paranoid about overflow, and
4048 shrink table when we can
4049 (_dbus_hash_test): reduce number of sprintfs and write
4050 valid C89. Add tests for case where we grow and then
4051 shrink the hash table.
4053 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4055 * dbus/dbus-connection.c (dbus_connection_register_handler)
4056 (dbus_connection_unregister_handler): new functions
4058 * dbus/dbus-message.c (dbus_message_get_name): new
4060 * dbus/dbus-list.c: fix docs typo
4062 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4063 an object representing a handler for messages.
4065 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4068 * glib/dbus-gthread.c: (dbus_gthread_init):
4069 Don't use the gdbus prefix for public functions.
4071 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4075 Add GLib checks and fixup .pc files
4079 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4080 (gdbus_connection_check), (gdbus_connection_dispatch),
4081 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4082 (dbus_connection_gsource_new):
4083 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4084 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4085 * glib/test-dbus-glib.c: (message_handler), (main):
4088 2002-12-15 Harri Porten <porten@kde.org>
4090 * autogen.sh: check for libtoolize before attempting to use it
4092 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4095 * .cvsignore: ignore more stamp files
4097 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4099 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4100 without make install.
4102 2002-12-15 Havoc Pennington <hp@pobox.com>
4104 * dbus/dbus-threads.c: add thread stubs that a higher library
4105 layer can fill in. e.g. the GLib wrapper might fill them in with
4106 GThread stuff. We still need to use this thread API to
4107 thread-safe-ize the library.
4109 2002-12-12 Havoc Pennington <hp@pobox.com>
4111 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4112 below new interfaces and include fewer system headers.
4114 * dbus/dbus-sysdeps.c (_dbus_read): new function
4115 (_dbus_write): new function
4116 (_dbus_write_two): new function
4117 (_dbus_connect_unix_socket): new function
4118 (_dbus_listen_unix_socket): new function
4120 * dbus/dbus-message-internal.h: change interfaces to use
4123 2002-12-11 Havoc Pennington <hp@pobox.com>
4125 * dbus/dbus-types.h: add dbus_unichar
4127 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4129 * dbus/dbus-connection.c (dbus_connection_send_message): return
4132 * dbus/dbus-transport.c: include dbus-watch.h
4134 * dbus/dbus-connection.c: include dbus-message-internal.h
4136 * HACKING: add file with coding guidelines stuff.
4138 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4139 handling here, for security purposes (as in vsftpd). Not actually
4140 using this class yet.
4142 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4143 system/libc usage here, as in vsftpd, for ease of auditing (and
4144 should also simplify portability). Haven't actually moved all the
4145 system/libc usage into here yet.
4147 2002-11-25 Havoc Pennington <hp@pobox.com>
4149 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4150 always print the first verbose message.
4152 2002-11-24 Havoc Pennington <hp@pobox.com>
4154 * test/echo-client.c, test/echo-server.c: cheesy test
4157 * configure.in (AC_CHECK_FUNCS): check for writev
4159 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4162 * dbus/dbus-list.c (_dbus_list_foreach): new function
4164 * dbus/dbus-internals.c (_dbus_verbose): new function
4166 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4167 representing a server that listens for connections.
4169 * dbus/.cvsignore: create
4171 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4172 public API for reporting errors
4174 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4175 public object representing a connection that
4176 sends/receives messages. (Same object used for
4177 both client and server.)
4179 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4180 Basic abstraction for different kinds of stream
4181 that we might read/write messages from.
4183 2002-11-23 Havoc Pennington <hp@pobox.com>
4185 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4188 * dbus/dbus-test.c (main): add list test, and include
4189 dbus-test.h as intended
4191 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4192 (_dbus_hash_table_remove_int): return value indicates
4193 whether the entry existed to remove
4195 * dbus/dbus-list.c: add linked list utility class,
4198 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4201 2002-11-23 Havoc Pennington <hp@pobox.com>
4203 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4204 DBUS_END_DECLS to nothing, that should fix this once and for all
4206 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4208 * dbus/dbus-message.c, dbus/dbus-hash.c:
4209 add some missing @brief
4211 2002-11-23 Havoc Pennington <hp@pobox.com>
4213 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4214 to avoid confusing Doxygen
4216 * dbus/dbus-hash.c: @} not }@
4218 * dbus/dbus-message.c (struct DBusMessage): split out
4221 2002-11-23 Havoc Pennington <hp@pobox.com>
4223 * configure.in: pile on more warning flags if using gcc
4225 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4226 to document static functions
4228 * configure.in: add summary to end of configure so it
4229 looks nice and attractive
4231 * dbus/dbus-hash.c: finish implementation and write unit
4234 * configure.in: add --enable-tests to enable unit tests
4236 * dbus/dbus-test.c: test program to run unit tests
4237 for all files in dbus/*, initially runs a test for
4240 * dbus/dbus-internals.h: file to hold some internal utility stuff
4242 2002-11-22 Havoc Pennington <hp@redhat.com>
4244 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4245 "ported" away from Tcl
4247 * dbus/dbus-types.h: header for types such as dbus_bool_t
4249 2002-11-22 Havoc Pennington <hp@redhat.com>
4251 * dbus/dbus.h: fixups for doc warnings
4253 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4255 (QUIET): make it quiet so we can see warnings
4257 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4259 2002-11-22 Havoc Pennington <hp@redhat.com>
4261 * Makefile.am: include "Doxyfile" target in all-local
4263 * configure.in: generate the Doxyfile
4265 * Doxyfile.in: move Doxyfile here, so we can use
4266 configure to generate a Doxyfile with the right
4269 2002-11-22 Havoc Pennington <hp@redhat.com>
4271 * dbus/dbus-message.c: move inline docs into .c file
4273 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4274 so all docs are under doc/
4275 (MAN_EXTENSION): generate man pages. Use extension
4276 ".3dbus" which matches ".3qt" on my system,
4277 I guess this is OK, I don't know really.
4278 (FILE_PATTERNS): look for .c files not .h, makes sense
4281 2002-11-22 Havoc Pennington <hp@pobox.com>
4283 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4284 because any app can be a server, and any app can be a client,
4285 the bus is a special kind of server.
4287 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4289 * Doxyfile : adding. Still needs Makefile rules to be generated
4290 automatically (just run "doxygen" in the toplevel dir for now to
4293 * dbus/dbus-message.h : Adding sample docs (javadoc since
4294 resembles gtk-doc a little more)
4296 * dbus/dbus.h : Adding sample docs
4298 2002-11-21 Havoc Pennington <hp@redhat.com>
4300 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4301 so we can allow ourselves to include files directly,
4302 instead of having to use dbus.h
4304 * dbus/dbus.h: fill in
4306 * dbus/dbus-message.h: sketch out a sample header file.
4307 Include griping if you include it directly instead of
4310 * dbus/dbus-macros.h: new file with macros for extern "C",
4311 TRUE/FALSE, NULL, etc.
4313 * doc/file-boilerplate.c: put include guards in here
4315 2002-11-21 Havoc Pennington <hp@redhat.com>
4317 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4319 * COPYING: include the GPL as well, and license code
4320 under both AFL and GPL.
4322 2002-11-21 Havoc Pennington <hp@redhat.com>
4324 * acconfig.h: get rid of this
4326 * autogen.sh (run_configure): add --no-configure option
4328 * configure.in: remove AC_ARG_PROGRAM to make
4329 autoconf complain less. add AC_PREREQ.
4330 add AC_DEFINE third arg.
4332 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4335 Fix references so we can distcheck.
4337 2002-11-21 Havoc Pennington <hp@redhat.com>
4339 * Initial module creation