1 2003-05-18 Anders Carlsson <andersca@codefactory.se>
3 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
5 2003-05-17 Colin Walters <walters@gnu.org>
7 * tools/dbus-send.c: Don't exit with an error code if --help was
8 passed. Default to using the session bus instead of the system
11 * tools/dbus-launch.c: Ditto.
13 * tools/dbus-monitor.c: Ditto.
15 * tools/dbus-send.1: Update with new arguments.
17 * tools/dbus-launch.c: Emit code to export variables. New
18 arguments -s and -c to specify shell syntax, and a bit of code to
19 autodetect syntax. Also, allow specifying a program to run.
21 * tools/dbus-launch.1: Update with new arguments.
23 * tools/dbus-send.1: Ditto.
25 * tools/dbus-monitor.1: Ditto.
27 2003-05-17 Havoc Pennington <hp@pobox.com>
29 * bus/config-parser.c (merge_included): merge in policies from
30 child configuration file.
32 * bus/policy.c (bus_policy_merge): function to merge two policies
35 2003-05-16 Havoc Pennington <hp@redhat.com>
37 * dbus/dbus-connection.c: disable verbose lock spew
39 * tools/dbus-send.c: add --print-reply command line option
41 * tools/dbus-print-message.h (print_message): new util function
42 shared by dbus-send and dbus-monitor
44 * tools/dbus-monitor.c (handler_func): exit on disconnect
46 * dbus/dbus-transport-unix.c (do_reading): if the transport is
47 disconnected, don't try to use the read_watch
49 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
50 so we can find this bug more easily
52 2003-05-16 Havoc Pennington <hp@redhat.com>
54 * bus/policy.c (free_rule_list_func): avoid a crash when passed
55 NULL as DBusHashTable is annoyingly likely to do.
57 2003-05-16 Colin Walters <walters@verbum.org>
59 * tools/dbus-monitor.c: Add --session argument and usage()
62 * tools/dbus-monitor.1: Update with new --session arg.
64 * bus/Makefile.am (install-data-hook): Create
65 $(libdir)/dbus-1.0/services so that the session bus is happy.
67 2003-05-15 Havoc Pennington <hp@redhat.com>
69 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
70 on non-x86. ifdef's are evil.
72 2003-05-15 Havoc Pennington <hp@redhat.com>
78 * bus/Makefile.am (initddir): apparently we are supposed to put
79 init scripts in /etc/rc.d/init.d not /etc/init.d
81 * bus/Makefile.am: remove the "you must --enable-tests to make
82 check" as it broke distcheck
84 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
86 2003-05-13 James Willcox <jwillcox@gnome.org>
89 * bus/activation.c: (bus_activation_service_created),
90 (bus_activation_activate_service):
91 * bus/driver.c: (bus_driver_send_service_deleted),
92 (bus_driver_send_service_created), (bus_driver_send_service_lost),
93 (bus_driver_send_service_acquired),
94 (bus_driver_send_welcome_message),
95 (bus_driver_handle_list_services):
96 * bus/session.conf.in:
97 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
98 (dbus_bus_service_exists), (dbus_bus_activate_service):
101 Add some convenience API which lets you activate a service, and did a
102 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
103 and dbus_message_get_args()
105 2003-05-11 Havoc Pennington <hp@pobox.com>
107 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
108 calling _dbus_marshal_validate_arg() for every byte in a byte
111 * dbus/dbus-message-handler.c: use atomic reference counting to
112 reduce number of locks slightly; the global lock in here sucks
114 * dbus/dbus-connection.c
115 (_dbus_connection_update_dispatch_status_and_unlock): variant of
116 update_dispatch_status that can be called with lock held; then use
117 in a couple places to reduce locking/unlocking
118 (dbus_connection_send): hold the lock over the whole function
119 instead of acquiring it twice.
121 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
123 * bus/connection.c (bus_connections_setup_connection): fix access
124 to already-freed memory.
126 * dbus/dbus-connection.c: keep a little cache of linked list
127 nodes, to avoid using the global linked list alloc lock in the
128 normal send-message case. Instead we just use the connection lock
129 that we already have to take.
131 * dbus/dbus-list.c (_dbus_list_find_last): new function
133 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
134 change to use a struct for the atomic type; fix docs,
135 they return value before increment, not after increment.
137 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
138 (_dbus_string_append_8_aligned): new functions to try to
139 microoptimize this operation.
140 (reallocate_for_length): break this out of set_length(), to
141 improve profile info, and also so we can consider inlining the
144 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
145 strings with some preallocation, cuts down on our calls to realloc
146 a fair bit. Though if we can get the "move entire string to empty
147 string" optimization below to kick in here, it would be better.
149 * dbus/dbus-string.c (_dbus_string_move): just call
150 _dbus_string_move_len
151 (_dbus_string_move_len): add a special case for moving
152 an entire string into an empty string; we can just
153 swap the string data instead of doing any reallocs.
154 (_dbus_string_init_preallocated): new function
156 2003-05-11 Havoc Pennington <hp@pobox.com>
158 Write a "test-profile" that does echo client-server with threads;
159 profile reveals lock contention, memcpy/realloc of buffers, and
160 UTF-8 validation as hot spots. 20% of lock contention eliminated
161 with dbus_atomic_inc/dec implementation on x86. Much remaining
162 contention is global mempool locks for GList and DBusList.
164 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
167 * dbus/dbus-connection.c (struct DBusConnection): use
168 dbus_atomic_t for the reference count
170 * dbus/dbus-message.c (struct DBusMessage): declare
171 dbus_atomic_t values as volatile
173 * configure.in: code to detect ability to use atomic integer
174 operations in assembly, from GLib patch
176 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
177 time, tired of it being wrong in threads and forked processes
179 * glib/test-profile.c: a little program to bounce messages back
180 and forth between threads and eat CPU
182 * dbus/dbus-connection.c: add debug spew macros for debugging
183 thread locks; include config.h at top; fix deadlock in
184 dbus_connection_flush()
186 2003-05-08 Havoc Pennington <hp@pobox.com>
188 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
189 data from getting written, and there wasn't a good reason to
192 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
193 dbus_verbose lines in test coverage
194 (main): add list of functions sorted by # of untested blocks
195 to the coverage report
197 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
199 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
201 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
204 * test/data/auth/cancel.auth-script: test canceling an
207 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
208 aren't used. in CVS history if we end up needing them.
210 2003-05-04 Havoc Pennington <hp@pobox.com>
212 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
215 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
216 function, which assumed length was in # of strings, not bytes
218 * dbus/dbus-message.c (_dbus_message_test): add tests for some
221 * dbus/dbus-connection.c
222 (_dbus_connection_queue_received_message): disable function for
223 now, we are only using it in test mode
225 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
226 remove a mistaken FIXME
228 2003-05-04 Havoc Pennington <hp@pobox.com>
230 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
231 unlock mutex on successful return, patch from Anders Gustafsson
233 2003-05-04 Havoc Pennington <hp@pobox.com>
235 * dbus-glib-1.pc.in (Requires): fix dependencies, from
238 2003-05-04 Havoc Pennington <hp@pobox.com>
240 * tools/dbus-launch.c: implement
242 * bus/main.c (main), bus/bus.c (bus_context_new):
243 implement --print-pid and --fork
245 2003-05-03 Havoc Pennington <hp@redhat.com>
247 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
248 the address had no value, and add to test suite. Fix and
249 regression test from Miloslav Trmac
251 2003-05-03 Havoc Pennington <hp@pobox.com>
253 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
254 watch is invalid when handled
256 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
257 dbus-launch utility to launch the bus from a shell script. Didn't
258 actually implement dbus-launch yet, it's just a placeholder still.
260 2003-05-03 Havoc Pennington <hp@pobox.com>
262 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
263 daemon; also documents daemon config file, so replaces
264 doc/config-file.txt. Corrected some stuff from config-file.txt in
265 the process of moving it.
267 2003-05-03 Havoc Pennington <hp@pobox.com>
269 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
272 2003-05-03 Colin Walters <walters@verbum.org>
274 * dbus/dbus-sysdeps.c (fill_user_info): Test against
275 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
277 * Makefile.am: Update to use new .pc versioning scheme.
279 2003-05-02 Havoc Pennington <hp@redhat.com>
281 * bus/system.conf.in: allow send/receive to/from message bus
284 2003-04-30 Havoc Pennington <hp@redhat.com>
286 * configure.in: print a note when building with unit tests and
289 2003-04-30 Havoc Pennington <hp@redhat.com>
291 * Makefile.am: add a check-local that complains if you didn't
292 configure with --enable-tests
294 2003-04-29 Havoc Pennington <hp@redhat.com>
296 * glib/dbus-gmain.c: docs cleanups
298 * dbus/dbus-types.h: add docs on int64 types
300 * dbus/dbus-memory.c: fix docs to avoid putting private API in
301 public API docs section
303 2003-04-29 Havoc Pennington <hp@redhat.com>
305 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
306 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
307 parallel install API version, not with the D-BUS package version.
309 * HACKING: move some of README over here
311 * README: updates, and document API/ABI policy
313 * configure.in: reindentation
315 2003-04-29 Havoc Pennington <hp@redhat.com>
317 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
318 to use this library" to be sure people have the right
321 2003-04-28 Havoc Pennington <hp@redhat.com>
323 * configure.in: add --enable-docs which by default is auto yes if
324 doxygen and db2html found, no otherwise; but can be forced on/off
326 * doc/Makefile.am: conditionalize whether to build docs on
329 2003-04-28 Havoc Pennington <hp@redhat.com>
335 * bus/system.conf.in: add <includedir>system.d</includedir>
337 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
338 username was provided but not uid
340 * bus/config-parser.c (struct BusConfigParser): keep track of
341 whether the parser is toplevel or was included; change some
342 of the error handling if it's included.
344 2003-04-27 Havoc Pennington <hp@pobox.com>
348 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
349 report correct status if we finish processing authentication
350 inside this function.
352 * bus/activation.c (try_send_activation_failure): use
353 bus_transaction_send_error_reply
355 * bus/connection.c (bus_connection_get_groups): return an error
356 explaining the problem
358 * bus/bus.c (bus_context_check_security_policy): implement
359 restriction here that inactive connections can only send the
360 hello message. Also, allow bus driver to send anything to
363 * bus/connection.c (bus_connection_complete): create the
364 BusClientPolicy here instead of on-demand.
365 (bus_connection_get_policy): don't return an error
367 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
368 sender field in message being replied to
370 * bus/bus.c (bus_context_check_security_policy): fix silly typo
371 causing it to return FALSE always
373 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
374 we checked sender rather than destination
376 2003-04-25 Havoc Pennington <hp@redhat.com>
378 test suite is slightly hosed at the moment, will fix soon
380 * bus/connection.c (bus_connections_expire_incomplete): fix to
381 properly disable the timeout when required
382 (bus_connection_set_name): check whether we can remove incomplete
383 connections timeout after we complete each connection.
385 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
386 probably still broken.
388 * bus/services.c (bus_registry_acquire_service): implement max
389 number of services owned, and honor allow/deny rules on which
390 services a connection can own.
392 * bus/connection.c (bus_connection_get_policy): report errors here
394 * bus/activation.c: implement limit on number of pending
397 2003-04-25 Havoc Pennington <hp@redhat.com>
399 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
400 where we used >= 0 instead of != DBUS_UID_UNSET.
402 2003-04-25 Havoc Pennington <hp@redhat.com>
404 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
405 were toggled without add/remove, fix from Anders Gustafsson
407 2003-04-24 Havoc Pennington <hp@redhat.com>
409 * test/data/valid-config-files/basic.conf: add <limit> tags to
412 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
413 <limit> tag in configuration file.
415 2003-04-24 Havoc Pennington <hp@redhat.com>
417 * bus/dispatch.c: somehow missed some name_is
419 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
420 (_dbus_timeout_set_interval): new
422 * bus/connection.c (bus_connections_setup_connection): record time
423 when each connection is first set up, and expire them after the
426 2003-04-24 Havoc Pennington <hp@redhat.com>
428 * dbus/dbus-message.c (dbus_message_name_is): rename
429 (dbus_message_service_is): rename
430 (dbus_message_sender_is): rename
431 (dbus_message_get_service): rename
433 2003-04-24 Havoc Pennington <hp@redhat.com>
435 * configure.in: add --enable-checks
437 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
439 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
441 (_dbus_connection_handler_destroyed_locked): move some private
442 functions into proper docs group
444 * dbus/dbus-internals.h: add _dbus_return_if_fail,
445 _dbus_return_val_if_fail
447 Throughout: use dbus_return_if_fail
449 2003-04-23 James Willcox <jwillcox@gnome.org>
452 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
453 (dbus_connection_setup_with_g_main),
454 (dbus_server_setup_with_g_main):
455 * glib/test-dbus-glib.c: (main):
456 * glib/test-thread-client.c: (main):
457 * glib/test-thread-server.c: (new_connection_callback), (main):
458 * tools/dbus-monitor.c: (main):
460 Added a GMainContext argument to dbus_connection_setup_with_g_main()
461 and dbus_server_setup_with_g_main().
463 2003-04-20 Havoc Pennington <hp@pobox.com>
465 * doc/dbus-specification.sgml: document the restrictions on
466 message and service names
468 2003-04-22 Havoc Pennington <hp@redhat.com>
470 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
471 support, and do some code cleanups to share more code and
472 speed up array marshal/demarshal.
474 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
476 * configure.in: generate dbus-arch-deps.h
478 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
481 2003-04-22 Havoc Pennington <hp@redhat.com>
483 * test/data/valid-messages/opposite-endian.message: fix test
484 to use proper type for rply field
486 * test/data/invalid-messages: add tests for below validation
488 * dbus/dbus-message.c (decode_header_data): validate field types,
489 and validate that named fields are valid names
490 (decode_name_field): consider messages in the
491 org.freedesktop.Local. namespace to be invalid.
493 * dbus/dbus-string.c (_dbus_string_validate_name): new
495 2003-04-19 Havoc Pennington <hp@pobox.com>
497 * bus/driver.c (bus_driver_handle_hello): check limits and
498 return an error if they are exceeded.
500 * bus/connection.c: maintain separate lists of active and inactive
501 connections, and a count of each. Maintain count of completed
502 connections per user. Implement code to check connection limits.
504 * dbus/dbus-list.c (_dbus_list_unlink): export
506 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
507 number of bytes in the message queue for a connection
509 2003-04-18 Havoc Pennington <hp@pobox.com>
511 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
513 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
516 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
517 on realloc be sure to update the pointer in the keyring
519 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
520 offset to avoid writing to unallocated memory
522 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
523 try the next mechanism, so we properly handle OOM
525 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
527 (_dbus_keyring_new): fix OOM bug
528 (_dbus_keyring_new_homedir): always set error; impose a maximum
529 number of keys we'll load from the file, mostly to speed up the
530 test suite and make its OOM checks more useful, but also for
533 * dbus/dbus-auth.c (process_error_server): reject authentication
534 if we get an error from the client
535 (process_cancel): on cancel, send REJECTED, per the spec
536 (process_error_client): send CANCEL if we get an error from the
539 2003-04-18 Havoc Pennington <hp@pobox.com>
541 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
544 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
547 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
548 about DBUS_TEST_HOMEDIR once
550 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
553 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
554 config file so we test the right thing
556 Throughout: assorted docs improvements
558 2003-04-18 Havoc Pennington <hp@pobox.com>
560 * glib/dbus-gmain.c: adapt to watch changes
562 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
564 * dbus/dbus-server.h: remove dbus_server_handle_watch
566 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
568 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
569 like DBusTimeout, so we don't need dbus_connection_handle_watch
572 2003-04-17 Havoc Pennington <hp@redhat.com>
574 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
575 database usage so it all goes via the DBusUserDatabase cache.
577 2003-04-17 Havoc Pennington <hp@redhat.com>
579 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
580 there was an OOM watch we skipped, we always return TRUE so we
581 iterate again to have a look at it again. Fixes test suite hang.
582 Code rearrangement also lets us lose some memset and only iterate
585 * bus/driver.c (bus_driver_handle_message): sense of test for
588 2003-04-16 Havoc Pennington <hp@pobox.com>
590 * doc/dbus-specification.sgml: make spec say serials are unsigned
592 * dbus/dbus-message.h: change message serials to unsigned
594 * dbus/dbus-connection.c: adapt to message serials being unsigned
596 2003-04-15 Havoc Pennington <hp@pobox.com>
598 * bus/bus.c: create and keep around a shared DBusUserDatabase
601 * bus/connection.c (bus_connection_get_groups): don't cache
602 groups for user in the connection object, since user database
603 object now does that.
605 2003-04-16 Havoc Pennington <hp@redhat.com>
607 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
608 list of size counters
609 (_dbus_message_loader_putback_message_link): put back a popped link
611 * dbus/dbus-connection.c
612 (dbus_connection_set_max_live_messages_size): rename
614 (dbus_connection_get_outgoing_size): get size of outgoing
616 (_dbus_connection_set_connection_counter): remove this cruft
618 2003-04-14 Havoc Pennington <hp@redhat.com>
620 * dbus/dbus-userdb.c: user database abstraction, mostly to get
621 caching, but at some point we might want to be able to use a
624 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
625 SHA1 conf file to test the sha1 auth mechanism, since the regular
626 test always uses EXTERNAL when available.
629 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
630 add conf file that requires use of sha1 auth
632 2003-04-13 Havoc Pennington <hp@pobox.com>
634 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
635 from Philip Blundell to send messages and monitor them.
637 2003-04-13 Havoc Pennington <hp@pobox.com>
639 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
642 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
645 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
646 fix to only recover unused bytes if we're already authenticated
647 (_dbus_transport_get_is_authenticated): fix to still mark us
648 authenticated if there are unused bytes.
650 * bus/dispatch.c: implement security policy checking
652 * bus/connection.c (bus_transaction_send_from_driver): new
654 * bus/bus.c (bus_context_check_security_policy): new
656 * bus/dispatch.c (send_service_nonexistent_error): delete this,
657 now we just set the DBusError and it gets converted to an error
660 * bus/connection.c (allow_user_function): enable code using actual
661 data from the config file
663 * bus/policy.c (list_allows_user): handle wildcard rules for
664 user/group connection perms
666 2003-04-13 Havoc Pennington <hp@pobox.com>
668 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
670 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
672 * bus/policy.c (bus_policy_append_mandatory_rule)
673 (bus_policy_append_default_rule, bus_policy_append_user_rule)
674 (bus_policy_append_group_rule): new functions
676 2003-04-12 Havoc Pennington <hp@pobox.com>
678 * bus/config-parser.c (bus_config_parser_new): fix a memleak
680 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
681 the pid/gid/uid, just for paranoia.
683 * test/break-loader.c (randomly_do_n_things): find a byte
684 containing a type code, and randomly change it to a different
687 2003-04-12 Havoc Pennington <hp@pobox.com>
689 * bus/policy.h: change BusPolicy to be the thing from the config
690 file, and rename old BusPolicy to BusClientPolicy
692 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
693 match change in how policy works
695 * dbus/dbus-internals.h: mark assert_not_reached as
696 __attribute((noreturn))__
698 2003-04-11 Havoc Pennington <hp@redhat.com>
700 * doc/dbus-specification.sgml: fix a spot with the wrong name for
701 the broadcast service. Use boolean return for ServiceExists.
703 2003-04-11 Havoc Pennington <hp@redhat.com>
705 * configure.in: add another directory to look for qt in.
707 2003-04-11 Havoc Pennington <hp@redhat.com>
709 * AUTHORS: add Colin Walters
711 2003-04-11 Havoc Pennington <hp@redhat.com>
717 2003-04-11 Havoc Pennington <hp@redhat.com>
719 * bus/messagebus.in: remove pid file when stopping the
720 message bus, since the bus won't have privileges to remove it
723 2003-04-11 Havoc Pennington <hp@redhat.com>
725 * bus/bus.c (bus_context_new): move credentials change after
728 2003-04-11 Havoc Pennington <hp@pobox.com>
730 * test/decode-gcov.c: add "below average functions" to the
731 coverage report, and change how some of the code works.
733 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
734 not in the coverage stats.
736 * test/test-service.c (main): use _dbus_verbose not fprintf in a
737 couple places so running the test suite doesn't result in megaspam.
739 2003-04-11 Havoc Pennington <hp@pobox.com>
741 * bus/dispatch.c (check_existent_service_activation): accept a no
742 memory error in a place we didn't before
744 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
745 in case the first one failed," since the test suite is less
748 2003-04-10 Havoc Pennington <hp@pobox.com>
750 * bus/dispatch.c (check_segfault_service_activation): add test
751 for launching an executable that just crashes.
753 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
754 don't leave a million cores. We'll see how portable this is.
756 2003-04-10 Havoc Pennington <hp@pobox.com>
758 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
759 the possible parent failures before we fork, so that we don't
760 fail to create a babysitter after creating the child.
762 * bus/activation.c (bus_activation_activate_service): kill child
763 if we don't successfully complete the activation.
765 2003-04-10 Havoc Pennington <hp@redhat.com>
767 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
768 the connection if it's disconnected
770 * bus/activation.c (bus_activation_service_created): use new
771 transaction features to roll back removal of pending activation if
772 we don't successfully create the service after all. Don't remove
773 pending activation if the function fails.
775 * dbus/dbus-list.c (_dbus_list_insert_before_link)
776 (_dbus_list_insert_after_link): new code to facilitate
779 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
780 new functionality, so we can preallocate the ability to insert
783 * bus/connection.c (bus_transaction_add_cancel_hook): new function
784 allowing us to put custom hooks in a transaction to be used for
785 cancelling said transaction
787 * doc/dbus-specification.sgml: add some discussion of secondary
788 service owners, and disallow zero-length service names
790 * bus/services.c (bus_registry_acquire_service): new function,
791 splits out part of bus_driver_handle_acquire_service() and fixes
792 a bug where we didn't remove the service doing the acquiring
793 from the secondary queue if we failed to remove the current owner
794 from the front of the queue.
796 2003-04-10 Alexander Larsson <alexl@redhat.com>
798 * doc/dbus-specification.sgml:
799 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
801 2003-04-10 Alexander Larsson <alexl@redhat.com>
806 Added files to cvsignore
808 * dbus/dbus-message.h:
809 * dbus/dbus-message.c: (dbus_message_iter_get_named):
810 Make get_named() take two out argument and return a boolean.
811 (dbus_message_iter_get_args_valist):
812 Update usage of get_named().
813 (dbus_message_iter_append_byte):
815 (dbus_message_iter_append_named)
817 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
820 2003-04-10 Alexander Larsson <alexl@redhat.com>
822 * dbus/dbus-marshal.[ch]:
823 Add array_type_pos argument to _dbus_marshal_validate_arg.
824 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
826 * dbus/dbus-message.[ch]:
827 Multi-dimensional arrays have full type specification in the
828 outermost array. Iter code re-arranged to handle this.
829 Added some more iter tests.
831 * doc/dbus-specification.sgml:
834 Update new array encoding description.
835 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
837 * test/data/invalid-messages/array-with-mixed-types.message:
838 * test/data/valid-messages/array-of-array-of-uint32.message:
839 Change to the new array format.
841 * test/data/invalid-messages/too-short-dict.message:
844 * test/data/valid-messages/recursive-types.message:
845 Fix up and extend test.
847 2003-04-10 Havoc Pennington <hp@pobox.com>
849 * bus/dispatch.c: lots of fixes
851 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
852 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
853 that was crack, broke the test service.
855 * dbus/dbus-transport.c (_dbus_transport_open): fix error
856 handling to avoid piling up errors if we get a failure on the
859 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
860 pid in assertion failures.
862 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
863 to some fixed size of file descriptor array. Don't return TRUE
864 anytime a timeout exists, that led to lots of busy loop silliness
867 2003-04-09 Havoc Pennington <hp@redhat.com>
869 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
870 I'd checked this in earlier but hadn't.
872 2003-04-09 Havoc Pennington <hp@redhat.com>
874 * bus/dispatch.c (bus_dispatch_test): get a bit further through
875 the activation test (man this is getting old!)
877 2003-04-09 Havoc Pennington <hp@redhat.com>
879 * test/test-utils.c: use dispatch status function to fix this up
881 * bus/connection.c (connection_watch_callback): don't dispatch
883 (connection_timeout_callback): don't dispatch from here
884 (bus_connections_setup_connection): set the dispatch status function
885 (bus_connection_disconnected): unset it
887 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
888 used to add a connection to be dispatched
889 (_dbus_loop_iterate): do the dispatching at the end of each
892 * dbus/dbus-connection.c
893 (dbus_connection_set_dispatch_status_function): new function
894 allowing us to fix up main loop usage
895 (_dbus_connection_last_unref): free all the various function
897 (dbus_connection_dispatch): call the DispatchStatusFunction
898 whenever this function returns
899 (dbus_connection_handle_watch): call DispatchStatusFunction
900 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
901 (reply_handler_timeout): call DispatchStatusFunction
902 (dbus_connection_flush): call DispatchStatusFunction
904 2003-04-09 Havoc Pennington <hp@redhat.com>
906 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
909 * bus/dispatch.c (check_service_activated): fix bug in test
911 * dbus/dbus-mainloop.c (check_timeout): fix this up
913 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
914 verbose output so we can sort out output from different processes,
915 e.g. in the activation case.
917 2003-04-08 Colin Walters <walters@gnu.org>
919 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
921 (bus_context_new): Set it.
922 (bus_context_unref): Use it to delete the pid file.
924 2003-04-08 Havoc Pennington <hp@redhat.com>
926 * test/data/invalid-messages/array-with-mixed-types.message:
927 regression test that fails for the moment
929 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
930 tests for convenience
932 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
933 array of nil, it broke things.
935 * test/data/invalid-messages/array-of-nil.message: regression test
937 * test/data/valid-messages/array-of-array-of-uint32.message:
938 happened to write this so added it to suite
940 2003-04-08 Havoc Pennington <hp@redhat.com>
942 * bus/driver.c (bus_driver_handle_acquire_service): init
943 retval/reply before checking name
945 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
946 recursion depth argument
948 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
949 in the public struct for future extension
951 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
954 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
957 * doc/dbus-specification.sgml: fix typo
959 2003-04-08 Alexander Larsson <alexl@redhat.com>
961 Implemented recursive types, named types and new-style iters
964 * glib/test-thread-client.c: (thread_func):
965 * glib/test-thread-server.c: (handle_test_message):
966 * test/test-service.c: (handle_echo):
975 * dbus/dbus-internals.c: (_dbus_type_to_string):
976 Update for new types.
978 * dbus/dbus-marshal.[ch]:
979 Implement recursive types and the new marshalling format.
980 Remove hardcoded dict marshalling.
983 * dbus/dbus-message-builder.c:
985 Remove references to old types
987 * dbus/dbus-message.[ch]:
988 New non-refcounted iter API that supports recursive iters.
989 Use iters for appending, including support for recursive
991 Add byte and named type support.
992 Update everything to new marshalling formats.
993 Add tests for new API.
995 * dbus/dbus-protocol.h:
996 Remove old array types.
997 Add types: BYTE, ARRAY, DICT, NAMED
999 * dbus/dbus-string.c:
1000 * dbus/dbus-sysdeps.c:
1001 Make parse_double locale safe.
1003 * dbus/dbus-test-main.c:
1009 * doc/dbus-specification.sgml:
1012 * test/data/incomplete-messages/missing-body.message:
1013 * test/data/invalid-messages/bad-boolean.message:
1014 * test/data/invalid-messages/bad-boolean-array.message:
1015 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
1016 * test/data/invalid-messages/boolean-has-no-value.message-raw:
1017 * test/data/invalid-messages/too-short-dict.message:
1018 * test/data/valid-messages/dict-simple.message:
1019 * test/data/valid-messages/dict.message:
1020 * test/data/valid-messages/emptiness.message:
1021 * test/data/valid-messages/lots-of-arguments.message:
1022 * test/data/valid-messages/no-padding.message:
1023 * test/data/valid-messages/recursive-types.message:
1024 Add missing NAME fields
1025 Fix up dicts & arrays
1027 * test/data/invalid-messages/dict-with-nil-value.message:
1028 Removed, this is not invalid anymore.
1030 * test/data/valid-messages/recursive-types.message:
1031 Add new test for deeply recursive types.
1033 2003-04-07 Havoc Pennington <hp@pobox.com>
1035 * bus/driver.c (bus_driver_handle_acquire_service): return an
1036 error if you try to acquire a service that starts with ':'
1038 2003-04-07 Havoc Pennington <hp@redhat.com>
1040 * doc/dbus-specification.sgml: require that base service names
1041 start with ':' and that the base service is created/deleted
1042 as first and last things a connection does on the bus
1044 * bus/dispatch.c (check_existent_service_activation): lots more
1045 work on the activation test; it doesn't fully pass yet...
1047 * test/test-service.c (main): fix so we don't memleak the
1048 connection to the message bus
1049 (filter_func): accept a message asking us to exit
1051 2003-04-06 Havoc Pennington <hp@pobox.com>
1053 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
1056 * configure.in: fixes to Qt detection from Colin Walters
1058 * doc/Makefile.am: Only remove generated docbook dirs if they
1059 exist, from Colin Walters
1061 * dbus/dbus-bus.c: change how we set well-known connections to
1062 NULL, so that it works if a single connection is stored in
1063 two well-known array slots.
1065 * test/Makefile.am: remove a lot of stuff that isn't immediately
1066 useful, it's in CVS history if we want it.
1068 * test/test-service.c: use dbus-mainloop instead of that
1071 2003-04-06 Havoc Pennington <hp@pobox.com>
1073 * dbus/Makefile.am: split lists of sources into stuff that goes in
1074 the library, util functions that go in the lib and are also used
1075 elsewhere, and util functions that are used in tests/daemon but
1076 don't go in the lib.
1078 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
1079 here so it can be used in test binaries also
1081 2003-04-06 Havoc Pennington <hp@pobox.com>
1083 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
1084 here in the parent process, so we can return an error if it
1085 fails. Also, move some of the code into the child so the parent
1086 is less hosed if we fail midway through.
1088 * bus/bus.c (bus_context_new): move pidfile detection further up
1089 in the function, before we start overwriting sockets and such.
1091 * bus/messagebus.in: adjust this a bit, not sure if it will work.
1093 * configure.in: add --with-system-pid-file and --with-system-socket
1095 2003-04-06 Colin Walters <walters@verbum.org>
1097 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
1099 * bus/system.conf.in: Declare a pidfile.
1101 * bus/bus.c (bus_context_new): Test for an existing pid file, and
1102 create one (if appropriate).
1104 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
1105 (struct BusConfigParser) [pidfile]: New.
1106 (element_type_to_name, merge_included, start_busconfig_child)
1107 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
1108 (bus_config_parser_unref): Free it.
1109 (bus_config_parser_get_pidfile): New function.
1111 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
1113 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
1115 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
1117 * dbus/dbus-sysdeps.h: Prototype it.
1119 2003-04-06 Havoc Pennington <hp@pobox.com>
1121 * bus/bus.c (bus_context_new): print the address in here, rather
1122 than in main(), because we need to do it before forking the daemon
1124 * bus/dispatch.c (send_service_nonexistent_error): set the sender
1125 on the service nonexistent error
1127 * bus/driver.c (bus_driver_handle_acquire_service): set the
1128 sender on the AcquireService reply
1130 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
1131 server also listen on a UNIX socket so services can connect to it.
1133 2003-04-06 Havoc Pennington <hp@pobox.com>
1135 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
1136 so it detects deadlocks and also we actually init threads when
1139 2003-04-06 Havoc Pennington <hp@pobox.com>
1141 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1142 save the domain socket name, and unlink it when we disconnect the
1143 server. Means that at least when we exit normally, we won't leave
1144 a bunch of junk in /tmp
1146 * dbus/dbus-transport-unix.c
1147 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
1148 memory management). (I was making a real change here but then
1151 2003-04-06 Havoc Pennington <hp@pobox.com>
1153 * bus/bus.c (bus_context_new): fix wrong handling of
1154 server_data_slot_unref() in the error case.
1156 * dbus/dbus-internals.h (_dbus_assert): change so it passes
1157 "(condition) != 0" to _dbus_real_assert so that
1158 "_dbus_assert (pointer)" doesn't cause a warning
1160 * bus/main.c (main): accept --print-address option to print out
1161 the message bus address
1163 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
1165 * dbus/dbus-transport.c (_dbus_transport_open): special error for
1166 "tmpdir" option to unix: address on client side
1168 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
1171 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
1172 we can use to create sockets in the test suite.
1174 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
1175 cleanly. To be used for testing.
1177 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
1179 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
1181 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1182 handle trying to call this when there's no servers active
1184 2003-04-05 Havoc Pennington <hp@pobox.com>
1190 2003-04-05 Havoc Pennington <hp@pobox.com>
1192 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
1193 crash on startup. Need to get "try starting the daemon"
1194 in the test suite I guess. ;-)
1196 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
1197 tracked the number of open connections; it's better done in
1198 application-specific code as you want it to span all servers etc.
1200 2003-04-05 Havoc Pennington <hp@pobox.com>
1202 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
1203 patch from Colin Walters
1205 2003-04-05 Havoc Pennington <hp@pobox.com>
1207 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
1208 reality; in fact multiple mechanisms are allowed.
1210 * dbus/dbus-internals.c (_dbus_real_assert)
1211 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
1212 _dbus_assert_not_reached() into functions, so that they don't show
1213 up in basic block counts for test coverage, and don't use up as
1214 much disk space. Does mean slower execution speed though, so
1215 assumes --disable-asserts is the normal production case.
1217 2003-04-05 Havoc Pennington <hp@pobox.com>
1219 * test/Makefile.am (dist-hook): also dist *.in files
1225 2003-04-05 Havoc Pennington <hp@pobox.com>
1227 * dbus/dbus-string.c: docs warning
1229 * dbus/dbus-spawn.c: missing docs
1231 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
1233 2003-04-05 Havoc Pennington <hp@pobox.com>
1235 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
1238 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
1239 to -1 once we've reaped the babysitter
1240 (_dbus_babysitter_handle_watch): do as much work as we can, not
1243 * bus/activation.c: add code using DBusBabysitter so that we
1244 handle it when a service fails to start up properly.
1245 (bus_activation_service_created): don't remove the activation
1246 entries as we go, just let them get removed when we free the pending
1247 activation. Unref reply messages after sending them.
1249 2003-04-05 Havoc Pennington <hp@pobox.com>
1251 * test/decode-gcov.c (main): print per-directory stats in the report
1253 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
1255 2003-04-05 Havoc Pennington <hp@pobox.com>
1257 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
1259 * test/decode-gcov.c: hack up a little program to suck data
1260 out of gcov files. Yes this is sort of silly.
1262 * configure.in: define something in config.h and do an
1263 AM_CONDITIONAL when gcov is enabled
1265 2003-04-04 Havoc Pennington <hp@redhat.com>
1267 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
1268 return a "babysitter" object that is used to monitor the status of
1269 the spawned process and reap it when required.
1271 * test/test-segfault.c, test/test-exit.c,
1272 test/test-sleep-forever.c: binaries that do various lame things,
1273 used in the test suite.
1275 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
1277 2003-04-03 Havoc Pennington <hp@pobox.com>
1279 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
1280 in preparation for modifying it, dbus-sysdeps is getting
1283 2003-04-03 Havoc Pennington <hp@redhat.com>
1285 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1288 * bus/*.[hc]: adapt to mainloop change
1290 2003-04-03 Havoc Pennington <hp@redhat.com>
1292 * bus/activation.c (load_directory): fix up memleaks
1293 (bus_activation_entry_free): free the entry
1295 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1296 we get one from the message bus; fix memleaks.
1298 * dbus/dbus-message.c (dbus_set_error_from_message): new function
1300 2003-04-03 Havoc Pennington <hp@pobox.com>
1302 * bus/config-parser.c (bus_config_parser_unref): free
1303 list of mechanisms, bug discovered by test suite enhancements
1304 (putting system.conf and session.conf into suite)
1306 * test/Makefile.am, test/test-service.c: add placeholder for a
1307 test service that we'll activate as part of test suite. Doesn't
1310 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
1311 setting NULL value, and use system malloc not dbus_malloc()
1312 when we have unavoidable memleakage.
1314 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1315 didn't work, and support DBUS_BUS_ACTIVATION.
1317 * bus/activation.c (child_setup): pass our well-known bus type to
1320 * bus/config-parser.c: support <type> to specify well-known type
1322 * doc/dbus-specification.sgml: document the env variables to
1323 locate well-known buses and find service activator
1325 2003-04-02 Havoc Pennington <hp@redhat.com>
1327 * test/Makefile.am (all-local): add a rule to copy tests to
1328 builddir, so we can have generated tests. Use this to remove the
1329 silly hack for testing system.conf and session.conf. Will use this
1330 shortly to generate .service files pointing to test binaries.
1332 2003-04-02 Havoc Pennington <hp@redhat.com>
1334 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1335 current alloc and needed new length, not max of the doubled
1336 allocation and needed new length. Also, when building tests,
1337 don't do the double-allocation stuff, just realloc every time.
1339 2003-04-02 Havoc Pennington <hp@redhat.com>
1341 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1343 (_dbus_string_get_dirname): new
1344 (_dbus_sysdeps_test): new
1345 (_dbus_directory_open): include dirnames in error messages
1347 * bus/config-parser.c: interpret <include> and <includedir> and
1348 <servicedir> relative to config file location if the given
1349 filename is not absolute.
1351 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1353 2003-04-02 Havoc Pennington <hp@redhat.com>
1355 * bus/connection.c (bus_transaction_send_error_reply): set sender
1356 service for the error, and unref the reply on success
1358 * bus/activation.c: convert to use BusTransaction so OOM can be
1360 (bus_activation_service_created): set sender of the message
1362 2003-04-01 Havoc Pennington <hp@redhat.com>
1364 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1365 <includedir> (at least mostly)
1367 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1368 first, then the user ID
1370 2003-04-01 Havoc Pennington <hp@pobox.com>
1372 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1375 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1377 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1379 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1380 socket 0777, and unlink any existing socket.
1382 * bus/bus.c (bus_context_new): change our UID/GID and fork if
1383 the configuration file so specifies; set up auth mechanism
1386 * bus/config-parser.c (bus_config_parser_content): add support
1387 for <fork> option and fill in code for <auth>
1389 * bus/system.conf.in: add <fork/> to default configuration,
1390 and limit auth mechanisms to EXTERNAL
1392 * doc/config-file.txt (Elements): add <fork>
1394 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1395 (_dbus_change_identity): new function
1397 2003-03-31 Havoc Pennington <hp@redhat.com>
1399 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
1400 (_dbus_listen_unix_socket): fix off-by-one error in null
1401 termination spotted by Nalin
1403 2003-03-31 Havoc Pennington <hp@redhat.com>
1405 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1406 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1407 having a real home directory available.
1409 2003-03-31 Havoc Pennington <hp@redhat.com>
1411 * bus/Makefile.am (install-data-hook): create /var/run/dbus
1413 * bus/messagebus.in: add init script for Red Hat /etc/init.d
1415 * configure.in: add support for specifying a style of init script
1418 2003-03-31 Havoc Pennington <hp@redhat.com>
1420 Fix some annoying DBusString API and fix all affected code.
1422 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1424 (_dbus_string_get_data): change to return string instead of using
1426 (_dbus_string_get_const_data): ditto
1427 (_dbus_string_get_data_len): ditto
1428 (_dbus_string_get_const_data_len): ditto
1430 2003-03-31 Havoc Pennington <hp@redhat.com>
1432 * bus/main.c (main): fix up the command line arguments to be nicer
1434 2003-03-31 Havoc Pennington <hp@redhat.com>
1436 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1437 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
1438 final location that lands in the config file
1440 * bus/config-loader-expat.c (bus_config_load): fix type of
1443 * doc/TODO: remove TODO item for dbus_bus_get()
1445 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1447 2003-03-31 Havoc Pennington <hp@pobox.com>
1449 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1450 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1451 argument since they are always client side
1453 * dbus/dbus-server.c (dbus_server_get_address): new function
1455 * bus/main.c (main): take the configuration file as an argument.
1457 * test/data/valid-config-files/debug-allow-all.conf: new file to
1458 use with dispatch.c tests for example
1460 * bus/test-main.c (main): require test data dir
1462 * bus/bus.c (bus_context_new): change this to take a
1463 configuration file name as argument
1465 * doc/config-file.txt (Elements): add <servicedir>
1467 * bus/system.conf, bus/session.conf: new files
1469 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1470 well-known socket if none set
1472 * configure.in: create system.conf and session.conf
1474 2003-03-30 Havoc Pennington <hp@pobox.com>
1476 * bus/config-parser.c: hacking
1478 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1479 to shut down, since it could cause weirdness with the DBusList
1482 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1483 link-oriented stack routines
1484 (alloc_link): free the mempool if the first alloc from it fails
1486 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1488 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1490 (_dbus_string_skip_white): new
1492 * doc/config-file.txt (Elements): add <includedir>
1494 2003-03-28 Havoc Pennington <hp@pobox.com>
1496 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1497 (_dbus_string_copy_data): new functions
1499 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1501 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1505 * dbus/dbus-memory.c:
1508 2003-03-28 Havoc Pennington <hp@pobox.com>
1510 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1511 I think it may have just been superstition. Not sure.
1513 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1514 failures that were not being handled.
1516 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1518 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1519 row that will fail on out-of-memory.
1521 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1522 function for testing out-of-memory handling.
1524 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1525 allocation functions, they do map exactly to the expat ones.
1527 2003-03-27 Havoc Pennington <hp@redhat.com>
1529 * bus/config-loader-libxml.c (bus_config_load): add another error
1532 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1535 Add note about automatic service activation.
1537 * doc/dbus-specification.sgml:
1538 Rename the specification and clarify a few things.
1540 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1543 * dbus/dbus-address.c:
1545 * dbus/dbus-marshal.c:
1546 * dbus/dbus-server-debug-pipe.c:
1547 * dbus/dbus-transport-unix.c:
1548 Fix documentation warnings.
1550 2003-03-26 Havoc Pennington <hp@pobox.com>
1552 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1553 after every test so it's quick and easy to see which leaked, and
1554 so we test multiple dbus_shutdown() calls
1556 * configure.in: change configure.in XML stuff to also support
1559 * config-loader-libxml.c: some hacking
1561 * config-loader-expat.c: some hacking
1563 * config-parser.c: some hacking, plus tests
1565 2003-03-25 Havoc Pennington <hp@redhat.com>
1567 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1569 * configure.in: add --with-xml option to specify XML library,
1570 right now only libxml is supported.
1572 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1573 nonworking code between home and work, still just stubs
1575 2003-03-24 Havoc Pennington <hp@redhat.com>
1577 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1580 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1581 NULL argument for "message" if the error is a well-known one,
1582 fill in a generic message in this case.
1584 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1587 * bus/test.c (bus_test_flush_bus): add
1589 * bus/policy.c (bus_policy_test): test code stub
1591 2003-03-24 Havoc Pennington <hp@pobox.com>
1593 * bus/connection.c (bus_connections_setup_connection): set up
1594 the "can this user connect" function, but it always returns
1595 TRUE until we have a config file parser so we can have a config
1596 file that allows connections.
1598 2003-03-23 Havoc Pennington <hp@pobox.com>
1600 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1601 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1602 the mutex, so we can check for proper memory management
1605 * dbus/dbus-dataslot.c: remove the mutex from
1606 DBusDataSlotAllocator and lock it manually when using it,
1607 to simplify fitting it into the global slots framework.
1609 * dbus/dbus-threads.c (init_static_locks): rework how we're
1610 handling global locks so they are easily shut down.
1612 * bus/policy.c (bus_policy_append_rule): fix
1614 * bus/test-main.c (main): check for memleaks
1616 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1617 test suite check for memleaks
1619 * dbus/dbus-memory.c: add support in test mode for tracking
1620 number of outstanding blocks
1622 2003-03-23 Havoc Pennington <hp@pobox.com>
1624 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1627 * dbus/dbus-hash.h: add ULONG hash keys
1629 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1630 (_dbus_get_group_id): new function
1632 2003-03-20 Havoc Pennington <hp@redhat.com>
1634 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1636 (dbus_connection_get_unix_user): new function
1638 2003-03-20 Havoc Pennington <hp@pobox.com>
1640 * bus/connection.c (bus_connection_send_oom_error): assert that
1641 message has a sender
1642 (connection_execute_transaction): ditto
1643 (bus_connection_preallocate_oom_error): fix to set the sender, and
1644 set recipient to the destination service, not the bus driver
1646 * bus/policy.c: hacking
1648 * dbus/dbus-message.c (dbus_message_service_is): new function
1649 (dbus_message_sender_is): new
1651 2003-03-19 Havoc Pennington <hp@redhat.com>
1653 * bus/policy.c: start sketching code for policy restrictions on
1654 what connections can do.
1656 2003-03-18 Havoc Pennington <hp@redhat.com>
1658 * doc/TODO: some notes on high-level todo items. Little nitpick
1659 stuff is all in @todo, so no need to add it here.
1661 * doc/config-file.txt: some notes on how config file might look
1663 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1669 2003-03-17 Havoc Pennington <hp@redhat.com>
1671 * dbus/dbus-internals.h: add gcc attributes so that
1672 our printf-style functions warn on bad arguments to
1675 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1678 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1681 2003-03-17 Havoc Pennington <hp@redhat.com>
1683 * bus/test-main.c (main): make it print something as it runs
1684 so make check doesn't look stuck
1686 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1687 from CVS, now obsolete
1689 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1691 * bus/dispatch.c: (bus_dispatch):
1692 Refetch the service name since it may have been reallocated
1693 when dbus_message_set_sender was called.
1695 * dbus/dbus-sysdeps.c: (_dbus_accept):
1696 Add address and address length variables and use them to stop
1697 valgrind from complaining.
1699 2003-03-17 Havoc Pennington <hp@pobox.com>
1701 All tests pass, no memleaks, no valgrind complaints.
1703 * bus/test.c: refcount handler_slot
1705 * bus/connection.c (bus_connections_new): refcount
1706 connection_data_slot
1708 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1709 bytes so that auth scripts pass.
1711 * bus/dispatch.c: init message_handler_slot so it gets allocated
1714 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1716 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1717 dealloc server_pipe_hash when no longer used for benefit of
1720 * dbus/dbus-auth.c (process_command): memleak fix
1722 * bus/dispatch.c (check_hello_message): memleak fix
1724 2003-03-16 Havoc Pennington <hp@pobox.com>
1726 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1728 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1730 * bus/activation.c (bus_activation_activate_service): Append
1731 the pending activation entry to the list of pending activations.
1733 2003-03-16 Havoc Pennington <hp@pobox.com>
1735 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1738 * dbus/dbus-address.c (create_entry): fix OOM handling when
1739 failing to alloc entry->method
1741 2003-03-16 Havoc Pennington <hp@pobox.com>
1743 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1746 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1747 add some missing dbus_set_result
1749 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1750 alloc the DBusMessageHandler
1752 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1753 the transport here, since we call this from the finalizer; it
1754 resulted in a double-finalize.
1756 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1757 where we tried to use transport->connection that was NULL,
1758 happened when transport was disconnected early on due to OOM
1760 * bus/*.c: adapt to handle OOM for watches/timeouts
1762 * dbus/dbus-transport-unix.c: port to handle OOM during
1765 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1766 reference to unused bytes instead of a copy
1768 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1771 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1774 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1777 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1779 * doc/dbus-specification.sgml:
1780 Document reply message for ActivateService.
1782 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1784 * bus/activation.c: (bus_pending_activation_entry_free),
1785 (bus_pending_activation_free), (bus_activation_new),
1786 (bus_activation_unref), (bus_activation_service_created),
1787 (bus_activation_activate_service):
1789 * bus/bus.c: (bus_context_new):
1790 * bus/desktop-file.c: (new_section):
1791 * bus/driver.c: (bus_driver_send_service_deleted),
1792 (bus_driver_handle_activate_service):
1793 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1795 * dbus/dbus-connection.c:
1796 (dbus_connection_send_with_reply_and_block):
1797 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1798 * dbus/dbus-protocol.h:
1799 Make activation work better. Now pending activations will be queued
1800 and the daemon won't try to activate services that are already registered.
1802 2003-03-16 Havoc Pennington <hp@pobox.com>
1804 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1807 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1808 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1810 2003-03-16 Havoc Pennington <hp@pobox.com>
1812 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1813 this. always run the test suite before commit...
1815 * bus/*: adapt to DBusConnection API changes
1817 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1818 requires renaming stuff to avoid dbus_connection_dispatch name
1821 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1824 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1825 separate from _dbus_message_loader_return_buffer()
1827 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1828 this, because it's now always broken to use; the number of
1829 messages in queue vs. the number still buffered by the message
1830 loader is undefined/meaningless. Should use
1831 dbus_connection_get_dispatch_state().
1832 (dbus_connection_dispatch): rename from
1833 dbus_connection_dispatch_message
1835 2003-03-16 Havoc Pennington <hp@pobox.com>
1837 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1840 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1842 * dbus/dbus-connection.c:
1843 (dbus_connection_send_with_reply_and_block):
1844 Decrease connection->n_incoming when removing an entry
1846 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1847 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1848 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1849 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1850 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1851 (dbus_dict_get_byte_array):
1852 Handle NULL arrays and strings. Also add support for byte arrays.
1854 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1855 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1856 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1857 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1858 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1859 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1860 * dbus/dbus-marshal.h:
1861 Add support for marshalling and demarshalling empty arrays and strings.
1863 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1864 (dbus_message_append_string_array),
1865 (dbus_message_iter_get_boolean),
1866 (dbus_message_iter_get_boolean_array),
1867 (dbus_message_iter_get_int32_array),
1868 (dbus_message_iter_get_uint32_array),
1869 (dbus_message_iter_get_double_array),
1870 (dbus_message_iter_get_byte_array),
1871 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1872 (check_message_handling):
1873 Add support for getting empty arrays and dicts.
1875 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1876 Don't do any validation at all for now, that's better than just checking
1879 * test/data/valid-messages/emptiness.message:
1880 New test message with lots of empty arrays.
1882 2003-03-16 Havoc Pennington <hp@pobox.com>
1884 * dbus/dbus-connection.c
1885 (_dbus_connection_queue_received_message_link): new function that
1886 can't fail due to OOM
1888 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1889 new function pops a message together with a list link
1892 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1893 message queuing functions to avoid needing to alloc memory
1895 2003-03-16 Havoc Pennington <hp@pobox.com>
1897 Oops - test code was only testing failure of around 30 of the
1898 mallocs in the test path, but it turns out there are 500+
1899 mallocs. I believe this was due to misguided linking setup such
1900 that there was one copy of dbus_malloc etc. in the daemon and one
1901 in the shared lib, and only daemon mallocs were tested. In any
1902 case, the test case now tests all 500+ mallocs, and doesn't pass
1903 yet, though there are lots of fixes in this patch.
1905 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1906 this so that it doesn't need to allocate memory, since it
1907 has no way of indicating failure due to OOM (and would be
1908 annoying if it did).
1910 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1912 * bus/Makefile.am: rearrange to create two self-contained
1913 libraries, to avoid having libraries with overlapping symbols.
1914 that was resulting in weirdness, e.g. I'm pretty sure there
1915 were two copies of global static variables.
1917 * dbus/dbus-internals.c: move the malloc debug stuff to
1920 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1923 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1925 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1928 * bus/dispatch.c (bus_dispatch_add_connection): free
1929 message_handler_slot when no longer using it, so
1930 memory leak checkers are happy for the test suite.
1932 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1934 * bus/bus.c (new_connection_callback): disconnect in here if
1935 bus_connections_setup_connection fails.
1937 * bus/connection.c (bus_connections_unref): fix to free the
1939 (bus_connections_setup_connection): if this fails, don't
1940 disconnect the connection, just be sure there are no side
1943 * dbus/dbus-string.c (undo_alignment): unbreak this
1945 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1947 (_dbus_auth_new): fix the order in which we free strings
1950 * bus/connection.c (bus_connection_disconnected): fix to
1951 not send ServiceDeleted multiple times in case of memory
1954 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1955 get the base service name
1956 (dbus_bus_register_client): don't return base service name,
1957 instead store it on the DBusConnection and have an accessor
1959 (dbus_bus_register_client): rename dbus_bus_register()
1961 * bus/dispatch.c (check_hello_message): verify that other
1962 connections on the bus also got the correct results, not
1963 just the one sending hello
1965 2003-03-15 Havoc Pennington <hp@pobox.com>
1967 Make it pass the Hello handling test including all OOM codepaths.
1968 Now to do other messages...
1970 * bus/services.c (bus_service_remove_owner): fix crash when
1971 removing owner from an empty list of owners
1972 (bus_registry_ensure): don't leave service in the list of
1973 a connection's owned services if we fail to put the service
1976 * bus/connection.c (bus_connection_preallocate_oom_error): set
1977 error flag on the OOM error.
1979 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1980 handle _dbus_transport_set_connection failure
1982 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1983 to create watches up front and simply enable/disable them as
1985 (unix_connection_set): this can now fail on OOM
1987 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1988 of enabling/disabling a watch or timeout.
1990 * bus/loop.c (bus_loop_iterate): don't touch disabled
1993 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1995 2003-03-15 Havoc Pennington <hp@pobox.com>
1997 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1998 write useful test code, after all that futzing around ;-)
2000 Test does not yet pass because we can't handle OOM in
2001 _dbus_transport_messages_pending (basically,
2002 dbus_connection_preallocate_send() does not prealloc the write
2003 watch). To fix this, I think we need to add new stuff to
2004 set_watch_functions, namely a SetEnabled function so we can alloc
2005 the watch earlier, then enable it later.
2007 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
2008 dbus-memory.c to the convenience lib
2010 * bus/test.c: rename some static functions to keep them clearly
2011 distinct from stuff in connection.c. Handle client disconnection.
2013 2003-03-14 Havoc Pennington <hp@pobox.com>
2015 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
2016 transport, tests more of the real codepath. Set up clients
2017 with bus_setup_debug_client.
2019 * bus/test.c (bus_setup_debug_client): function to set up debug
2020 "clients" on the main loop
2022 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
2025 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
2028 * dbus/dbus-server-debug.c: support a debug server based on pipes
2030 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
2031 (_dbus_close): new function
2033 * configure.in: check for socketpair
2035 2003-03-14 Havoc Pennington <hp@redhat.com>
2037 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
2040 * dbus/dbus-transport-debug.c: rework this a good bit to be
2041 less complicated. hopefully still works.
2043 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
2046 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
2049 * dbus/dbus-message.c (dbus_message_copy): rename from
2050 dbus_message_new_from_message, fix it up to copy
2051 all the message fields, add test case
2053 * bus/dispatch.c (bus_dispatch_test): add some more test code,
2054 not quite passing yet
2056 2003-03-14 Havoc Pennington <hp@pobox.com>
2058 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
2059 until no work remains" in test code. (the large diff here
2060 is just code movement, no actual changes)
2062 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
2063 1, no point waiting around for test code.
2064 (_dbus_server_debug_accept_transport): unref the timeout
2065 after adding it (right?)
2067 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
2069 2003-03-13 Havoc Pennington <hp@redhat.com>
2071 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
2074 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
2077 * dbus/dbus-connection.h: Make AddWatchFunction and
2078 AddTimeoutFunction return a bool so they can fail on out-of-memory
2080 * bus/bus.c (bus_context_new): set up timeout handlers
2082 * bus/connection.c (bus_connections_setup_connection): set up
2085 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
2088 * bus/bus.c (bus_context_new): adapt to changes
2090 * bus/connection.c: adapt to changes
2092 * test/watch.c: adapt to DBusWatch changes
2094 * bus/dispatch.c (bus_dispatch_test): started adding this but
2097 2003-03-14 Anders Carlsson <andersca@codefactory.se>
2099 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
2101 2003-03-13 Havoc Pennington <hp@pobox.com>
2103 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
2104 set up a test framework as for the library
2106 2003-03-12 Havoc Pennington <hp@pobox.com>
2108 Throughout: purge global variables, introduce BusActivation,
2109 BusConnections, BusRegistry, etc. objects instead.
2111 * bus/bus.h, bus/bus.c: introduce BusContext as a global
2114 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
2115 going to redo this a bit differently I think
2117 2003-03-12 Havoc Pennington <hp@redhat.com>
2119 Mega-patch that gets the message bus daemon initially handling
2120 out-of-memory. Work still needed. Also lots of random
2121 moving stuff to DBusError instead of ResultCode.
2123 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
2125 * dbus/dbus-connection.c
2126 (dbus_connection_send_with_reply_and_block): use DBusError
2128 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
2131 * dbus/dbus-connection.c (dbus_connection_send): drop the result
2132 code here, as the only failure possible is OOM.
2134 * bus/connection.c (bus_connection_disconnect):
2135 rename bus_connection_disconnected as it's a notification only
2137 * bus/driver.c (bus_driver_handle_acquire_service): don't free
2138 "name" on get_args failure, should be done by get_args;
2139 don't disconnect client for bad args, just return an error.
2140 (bus_driver_handle_service_exists): ditto
2142 * bus/services.c (bus_services_list): NULL-terminate returned array
2144 * bus/driver.c (bus_driver_send_service_lost)
2145 (bus_driver_send_service_acquired): send messages from driver to a
2146 specific client to the client's unique name, not to the broadcast
2149 * dbus/dbus-message.c (decode_header_data): reject messages that
2150 contain no name field
2151 (_dbus_message_get_client_serial): rename to
2152 dbus_message_get_serial and make public
2153 (_dbus_message_set_serial): rename from set_client_serial
2154 (_dbus_message_set_reply_serial): make public
2155 (_dbus_message_get_reply_serial): make public
2157 * bus/connection.c (bus_connection_foreach): allow stopping
2158 iteration by returning FALSE from foreach function.
2160 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
2161 (dbus_connection_free_preallocated_send)
2162 (dbus_connection_preallocate_send): new API for sending a message
2163 without possibility of malloc failure.
2164 (dbus_connection_send_message): rename to just
2165 dbus_connection_send (and same for whole function family)
2167 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
2169 * dbus/dbus-sysdeps.c (_dbus_exit): new function
2171 * bus/activation.c: handle/return errors
2173 * dbus/dbus-errors.h: add more DBUS_ERROR #define
2175 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
2176 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
2177 (_dbus_result_from_errno): move to this file
2179 2003-03-10 Anders Carlsson <andersca@codefactory.se>
2181 * dbus/dbus-marshal.c:
2182 (_dbus_marshal_set_string):
2183 Take a length argument so we can marshal the correct string
2186 (_dbus_marshal_dict), (_dbus_demarshal_dict),
2187 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
2188 (_dbus_marshal_test):
2189 * dbus/dbus-marshal.h:
2190 Add support for marshalling and demarshalling dicts.
2192 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2193 Add support for TYPE DICT.
2195 * dbus/dbus-message.c: (set_string_field):
2196 Adjust header padding.
2198 (dbus_message_append_args_valist), (dbus_message_append_dict),
2199 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
2200 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
2201 (check_message_handling), (check_have_valid_message):
2202 * dbus/dbus-message.h:
2203 Add functions for setting and getting dicts.
2205 * dbus/dbus-protocol.h:
2211 * doc/dbus-specification.sgml:
2212 Add information about how dicts are marshalled.
2214 * test/data/invalid-messages/dict-with-nil-value.message:
2215 * test/data/invalid-messages/too-short-dict.message:
2216 * test/data/valid-messages/dict-simple.message:
2217 * test/data/valid-messages/dict.message:
2218 Add sample messages containing dicts.
2220 2003-03-08 Anders Carlsson <andersca@codefactory.se>
2222 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
2224 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2227 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2228 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
2229 (dbus_dict_set_int32), (dbus_dict_set_uint32),
2230 (dbus_dict_set_double), (dbus_dict_set_string),
2231 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2232 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2233 (dbus_dict_set_string_array), (_dbus_dict_test):
2235 Fix according to comments from Havoc.
2237 2003-03-06 Michael Meeks <michael@server.home>
2239 * configure.in: if we don't have kde-config, disable have_qt.
2241 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2246 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2247 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
2248 (dbus_dict_remove), (dbus_dict_get_value_type),
2249 (dbus_dict_get_keys), (dbus_dict_put_boolean),
2250 (dbus_dict_put_int32), (dbus_dict_put_uint32),
2251 (dbus_dict_put_double), (dbus_dict_put_string),
2252 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
2253 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
2254 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
2255 (dbus_dict_get_int32), (dbus_dict_get_uint32),
2256 (dbus_dict_get_double), (dbus_dict_get_string),
2257 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
2258 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
2259 (dbus_dict_get_string_array), (_dbus_dict_test):
2261 Add DBusDict implementation
2263 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
2267 2003-03-04 Havoc Pennington <hp@pobox.com>
2269 * test/data/auth/*: adapt to changes
2271 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
2272 USERID_BASE64 and change USERNAME_BASE64 to put in username not
2275 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
2276 more stuff from being in a context name, to make the protocol
2277 simpler to deal with
2279 * dbus/dbus-errors.c (dbus_error_has_name): new function
2280 (dbus_error_is_set): new function
2282 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
2283 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
2285 * dbus/dbus-connection.c (dbus_connection_flush): also read
2286 messages during a flush operation
2288 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2290 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2292 * configure.in: Check for gethostbyname on Solaris.
2294 * dbus/dbus-transport.c: (_dbus_transport_open):
2295 Remove duplicate "tcp" entry.
2297 * doc/dbus-specification.sgml:
2298 Clarify some things.
2300 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2302 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2303 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2304 (_dbus_keyring_test):
2305 * dbus/dbus-md5.c: (_dbus_md5_compute):
2306 * dbus/dbus-sha.c: (_dbus_sha_compute):
2309 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2311 * README: Add some things.
2313 2003-03-04 Anders Carlsson <andersca@codefactory.se>
2315 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2316 after case DBUS_TYPE_BOOELAN.
2318 2003-03-02 Havoc Pennington <hp@pobox.com>
2320 * test/break-loader.c (randomly_set_extreme_ints): add test that
2321 sets really huge and small integers
2323 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2324 that length of boolean array fits in the string, and that
2325 string has room for boolean value in single-bool case.
2327 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2328 optional value to "ALIGN" command which is what to fill the
2331 * test/data/valid-messages/no-padding.message: add regression
2332 test for the message padding problem
2334 2003-03-02 Havoc Pennington <hp@pobox.com>
2336 * dbus/dbus-message.c (decode_header_data): fix to always init
2337 message_padding, from Benjamin Dauvergne
2339 2003-03-02 Havoc Pennington <hp@pobox.com>
2345 2003-03-01 Joe Shaw <joe@assbarn.com>
2347 * configure.in: Check for "struct cmsgcred" and try to access its
2348 members for BSD-like unices.
2350 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2351 _dbus_read_credentials_unix_socket().
2352 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2353 read() for reading the credential byte off the unix socket. Use
2354 struct cmsgcred on systems that support it.
2356 2003-02-27 Alexander Larsson <alexl@redhat.com>
2360 Make gthreads-2.0 dependency optional. Don't build thread test if
2363 2003-02-27 Havoc Pennington <hp@pobox.com>
2365 * dbus/dbus-connection.c
2366 (dbus_connection_send_message_with_reply_and_block): fix doh!
2367 doh! doh! bug that resulted in never removing a reply from the
2368 queue, no wonder we called get_reply_serial so much ;-)
2370 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2371 and client serial instead of demarshaling them every time
2373 2003-02-27 Havoc Pennington <hp@pobox.com>
2375 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2376 more inlined, using dbus-string-private.h, speeds things up
2379 * dbus/dbus-string.c (_dbus_string_free): apply align offset
2380 when freeing the string
2381 (_dbus_string_steal_data): fix for align offset
2382 (undo_alignment): new function
2384 2003-02-26 Havoc Pennington <hp@redhat.com>
2386 All kinds of audit fixes from Owen, plus initial attempt to
2387 handle unaligned memory returned from malloc.
2389 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
2390 leave room for align_offset and nul byte
2391 (fixup_alignment): function to track an align_offset and
2392 ensure real->str is aligned
2393 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
2394 to allow a nul byte plus align offset
2395 (_dbus_string_lock): fix overflow issue
2396 (_dbus_string_init_const_len): add assertions on sanity of len,
2397 assign allocated to be ALLOCATION_PADDING larger than len
2398 (set_length): fixup the overflow handling
2399 (_dbus_string_get_data_len): fix overflow in assertion
2400 (open_gap): detect overflow in size of gap to be opened
2401 (_dbus_string_lengthen): add overflow check
2402 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2403 (_dbus_string_append): add overflow check
2404 (_dbus_string_append_unichar): overflow
2405 (_dbus_string_delete): fix overflow in assertion
2406 (_dbus_string_copy_len): overflow in assertion
2407 (_dbus_string_replace_len): overflows in assertions
2408 (_dbus_string_find): change to implement in terms of
2409 _dbus_string_find_to
2410 (_dbus_string_find_to): assorted fixage
2411 (_dbus_string_equal_c_str): assert c_str != NULL,
2412 fix logic so the function works
2413 (_dbus_string_ends_with_c_str): fix overflow thingy
2414 (_dbus_string_base64_encode): overflow fix
2415 (_dbus_string_validate_ascii): overflow
2416 (_dbus_string_validate_nul): overflow
2418 2003-02-26 Havoc Pennington <hp@redhat.com>
2420 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2422 2003-02-26 Alexander Larsson <alexl@redhat.com>
2425 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2427 * dbus/dbus-connection.c:
2428 * dbus/dbus-connection.h:
2429 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2430 Add dbus_connection_set_wakeup_main_function and use it when queueing
2431 incoming and outgoing messages.
2434 * dbus/dbus-dataslot.c:
2435 Threadsafe usage of DBusDataSlotAllocator
2437 * dbus/dbus-message.c: (dbus_message_get_args_iter):
2440 * dbus/dbus-server-unix.c:
2443 * glib/dbus-gmain.c:
2444 Implement the new wakeup functions for glib.
2447 * glib/test-thread-client.c:
2448 * glib/test-thread-server.c:
2449 * glib/test-thread.h:
2450 Initial cut at some thread test code. Not really done yet.
2452 2003-02-26 Havoc Pennington <hp@pobox.com>
2454 * dbus/dbus-connection.c
2455 (dbus_connection_send_message_with_reply_and_block): fix crash
2456 where we ref'd the outgoing message instead of the returned reply
2458 * dbus/dbus-transport-unix.c (do_authentication): check read watch
2459 at the end of this function, so if we didn't need to read for
2460 authentication, we reinstall it for receiving messages
2462 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2463 a NULL sender for peer-to-peer case
2465 * dbus/dbus-transport-unix.c (check_read_watch): handle
2466 !authenticated case correctly
2468 * glib/dbus-gmain.c: add support for DBusServer
2470 * dbus/dbus-server.c: add data slot support
2472 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2473 return values and handle errors
2475 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2478 * Doxyfile.in (INPUT): add glib subdir
2480 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2481 setup_with_g_main instead of hookup_with_g_main; write docs
2483 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2485 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2486 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2487 * dbus/dbus-message.c: (dbus_message_append_boolean),
2488 (dbus_message_append_boolean_array),
2489 (dbus_message_get_args_valist), (_dbus_message_test):
2490 * dbus/dbus-message.h:
2491 * doc/dbus-specification.sgml:
2492 Various fixes as pointed out by Havoc.
2494 * test/data/invalid-messages/bad-boolean-array.message:
2495 * test/data/invalid-messages/bad-boolean.message:
2496 Add invalid boolean value test cases.
2498 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2500 * dbus/dbus-internals.c: (_dbus_type_to_string):
2501 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2502 (_dbus_marshal_validate_arg):
2503 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2504 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2505 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2506 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2507 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2508 (dbus_message_iter_get_double),
2509 (dbus_message_iter_get_boolean_array), (message_iter_test):
2510 * dbus/dbus-message.h:
2511 * dbus/dbus-protocol.h:
2512 * doc/dbus-specification.sgml:
2513 * test/data/valid-messages/lots-of-arguments.message:
2514 Add support for boolean and boolean array types.
2516 2003-02-23 Havoc Pennington <hp@pobox.com>
2518 * dbus/dbus-keyring.c: finish most of this implementation and
2521 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2522 these barf if the error isn't cleared to NULL
2524 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2525 (_dbus_create_directory): new function
2527 * dbus/dbus-errors.c (dbus_set_error): fix warning
2529 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2530 (_dbus_string_hex_decode): new function
2531 (test_hex_roundtrip): test code
2533 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2535 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2537 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2538 the save-to-temp/rename trick to atomically write the new file
2539 (_dbus_string_parse_uint): new function
2541 2003-02-22 Havoc Pennington <hp@pobox.com>
2543 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2545 2003-02-22 Havoc Pennington <hp@pobox.com>
2547 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2548 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2550 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2552 * dbus/test/data/sha-1: add US government test suite for SHA-1
2554 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2556 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2557 Make string arrays NULL-terminated.
2559 * dbus/dbus-memory.c: (dbus_free_string_array):
2560 * dbus/dbus-memory.h:
2561 New function for freeing NULL-terminated string arrays.
2563 * dbus/dbus-message-builder.c: (append_quoted_string),
2564 (_dbus_message_data_load):
2565 Add support for array types.
2567 * dbus/dbus-message.c: (check_message_handling):
2568 Add more types as test cases.
2570 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2571 (_dbus_string_parse_double):
2572 Add the start offset to the end offset.
2574 * test/data/valid-messages/lots-of-arguments.message:
2575 New test message with lots of arguments.
2577 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2579 * dbus/dbus-message.c: (dbus_message_append_nil),
2580 (dbus_message_append_int32), (dbus_message_append_uint32),
2581 (dbus_message_append_double), (dbus_message_append_string),
2582 (dbus_message_append_int32_array),
2583 (dbus_message_append_uint32_array),
2584 (dbus_message_append_double_array),
2585 (dbus_message_append_byte_array),
2586 (dbus_message_append_string_array):
2587 Fix all out-of-memory handling in these functions.
2589 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2591 * dbus/dbus-message.c: (dbus_message_append_nil):
2594 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2596 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2597 (dbus_message_append_nil), (dbus_message_append_int32_array),
2598 (dbus_message_append_uint32_array),
2599 (dbus_message_append_double_array),
2600 (dbus_message_append_byte_array),
2601 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2602 (dbus_message_iter_get_int32_array),
2603 (dbus_message_iter_get_uint32_array),
2604 (dbus_message_iter_get_double_array),
2605 (dbus_message_iter_get_byte_array),
2606 (dbus_message_iter_get_string_array):
2608 * dbus/dbus-message.h:
2609 Add functions for appending and getting arrays.
2611 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2613 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2614 element size at least 8 bytes, fixes mempool tests on
2617 2003-02-20 Alexander Larsson <alexl@redhat.com>
2619 * dbus/dbus-transport-unix.c (unix_do_iteration):
2620 Unlock the connection mutex during a blocking select call.
2621 Add todo about how we need a way to wake up the select.
2623 * dbus/dbus-connection-internal.h:
2624 * dbus/dbus-connection.c:
2625 Add _dbus_connection_lock and _dbus_connection_unlock.
2627 2003-02-19 Havoc Pennington <hp@pobox.com>
2629 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2630 Doxyfile.in, not Doxyfile
2632 * dbus/dbus-keyring.c: do some hacking on this
2634 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2636 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2638 (dbus_set_error): remove dbus_error_init, check for message ==
2639 NULL *before* we sprintf into it, and add @todo about including
2640 system headers in this file
2642 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2644 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2646 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2647 get various bits of user information based on either username
2649 (_dbus_homedir_from_username): new function
2651 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2654 Add check for nonposix getpwnam_r
2656 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2657 Align the pool element size to a sizeof (void *) boundary.
2659 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2660 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2661 General Solaris fixes.
2663 * test/data/valid-messages/simplest-manual.message:
2664 Explicitly state that we want little-endian packing.
2666 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2668 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2670 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2671 Added to create a transport connecting using a tcp/ip socket.
2673 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2674 to a tcp socket at given host and port.
2675 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2678 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2680 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2681 Added to create a server listening on a TCP/IP socket.
2683 2003-02-19 Havoc Pennington <hp@pobox.com>
2685 Throughout: mop up all the Doxygen warnings and undocumented
2688 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2689 to search any paths.
2691 * dbus/dbus-threads.c: move global mutex initializers to
2692 dbus-internals.h, multiple prototypes was confusing doxygen
2693 besides being kind of ugly
2695 * Doxyfile (PREDEFINED): have Doxygen define
2696 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2697 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2698 (do not abuse the feature! it's for stuff like the autogenerated
2699 macros in dbus-md5.c, not just for things you don't feel like
2702 2003-02-18 Havoc Pennington <hp@pobox.com>
2704 * dbus/dbus-string.c (_dbus_string_zero): new function
2706 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2707 wrap it in some dbus-friendly API
2709 * dbus/dbus-types.h: add 16-bit types
2711 2003-02-18 Joe Shaw <joe@assbarn.com>
2713 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2714 credentials from our currently running process.
2715 (get_word): Fix a buglet where we were copying the entire length
2716 instead of relative to our position.
2718 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2719 keys on the stack... it's 640k of data.
2721 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2722 read the credentials byte off the socket, even if we don't have
2724 (_dbus_poll): Implement poll() using select() for systems which
2727 * glib/test-dbus-glib.c (main): Print out an error if no
2728 parameters are given.
2730 * test/data/auth/fallback.auth-script: Added. Tests that a client
2731 can fallback to a secondary auth mechanism if the first fails.
2733 2003-02-18 Havoc Pennington <hp@pobox.com>
2737 2003-02-17 Havoc Pennington <hp@pobox.com>
2739 * doc/dbus-specification.sgml: lots of cosmetic
2740 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2741 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2742 s/server/bus/ (except in authentication section). Add a section
2743 "Message Bus Message Routing"
2745 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2751 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2753 * doc/dbus-specification.sgml:
2754 Specification updates.
2756 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2758 * bus/activation.c: (bus_activation_init), (child_setup),
2759 (bus_activation_activate_service):
2761 * bus/main.c: (main):
2762 Set DBUS_ADDRESS environment variable.
2764 * dbus/dbus-errors.c: (dbus_set_error):
2765 Don't use va_copy since that's a C99 feature.
2767 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2768 (_dbus_spawn_async):
2769 * dbus/dbus-sysdeps.h:
2770 Add child_setup_func to _dbus_spawn_async.
2772 * doc/dbus-specification.sgml:
2773 Update specification.
2775 * test/spawn-test.c: (setup_func), (main):
2778 2003-02-17 Alexander Larsson <alexl@redhat.com>
2780 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2783 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2787 * doc/dbus-test-plan.sgml:
2788 Add test plan document.
2793 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2795 * dbus/dbus-message.c: (decode_header_data),
2796 (_dbus_message_loader_return_buffer):
2797 Set the header padding amount when loading a message.
2799 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2801 * bus/dispatch.c: (send_one_message):
2802 Only send broadcast messages to registered connections.
2804 * dbus/dbus-message.c: (dbus_message_name_is):
2805 * dbus/dbus-message.h:
2806 New convenience function.
2808 * dbus/dbus-transport-debug.c: (do_reading):
2809 Only dispatch one message per run.
2812 * test/bus-test.c: (new_connection_callback), (die),
2813 (test_hello_client1_handler), (test_hello_client2_handler),
2814 (test_hello_replies), (main):
2816 * test/bus-test-loop.[ch]:
2819 2003-02-16 Havoc Pennington <hp@pobox.com>
2821 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2822 backward conditional
2824 2003-02-16 Alexander Larsson <alexl@redhat.com>
2826 * dbus/dbus-connection.c:
2827 Implement sent_message_with_reply. (with_reply_and block is still
2829 Made dispatch_message not lose message if OOM.
2831 * dbus/dbus-errors.h:
2832 Add NoReply error (for reply timeouts).
2834 2003-02-16 Alexander Larsson <alexl@redhat.com>
2836 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2837 Actually free keys and values when destroying hashtable.
2839 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2841 * dbus/dbus-auth.c: (client_try_next_mechanism):
2844 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2845 Return TRUE if there's no thread implementation around.
2847 * glib/dbus-gmain.c: (free_source),
2848 (dbus_connection_hookup_with_g_main):
2849 Make sure to remove the GSource when the connection is finalized.
2851 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2853 * bus/dispatch.c: (bus_dispatch_message_handler):
2854 * dbus/dbus-errors.h:
2855 Return an error if someone tries to send a message to a service
2858 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2860 * bus/activation.c: (load_directory), (bus_activation_init),
2861 (bus_activation_activate_service):
2864 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2865 More work on the activation handling.
2867 * dbus/dbus-errors.h:
2868 Add some error messages
2870 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2871 * dbus/dbus-message.h:
2872 New function that creates an error message.
2874 * dbus/dbus-protocol.h:
2875 Add ACTIVATE_SERVER message.
2877 * dbus/dbus-server-unix.c: (unix_handle_watch),
2878 (_dbus_server_new_for_domain_socket):
2879 Call _dbus_fd_set_close_on_exec.
2881 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2882 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2883 (_dbus_fd_set_close_on_exec):
2884 * dbus/dbus-sysdeps.h:
2885 Add _dbus_fd_set_close_on exec function. Also add function that checks
2886 that all open fds are set to close-on-exec and warns otherwise.
2888 * dbus/dbus-transport-unix.c:
2889 (_dbus_transport_new_for_domain_socket):
2890 Call _dbus_fd_set_close_on_exec.
2892 2003-02-16 Havoc Pennington <hp@pobox.com>
2894 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2895 allow people to avoid setting SIGPIPE to SIG_IGN
2896 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2897 we've been asked not to
2899 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2901 * dbus/dbus-list.c: (_dbus_list_append_link),
2902 (_dbus_list_prepend_link):
2903 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2907 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2910 * bus/activation.c: (bus_activation_entry_free),
2911 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2913 * bus/main.c: (main):
2914 Add simple activation support, doesn't work yet though.
2916 2003-02-15 Zack Rusin <zack@kde.org>
2918 * qt/dbus-qthread.cpp: small casting fix
2920 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2922 * dbus/dbus-errors.c: (dbus_set_error):
2923 * dbus/dbus-errors.h:
2924 Add a few errors and make dbus_set_error void.
2926 * dbus/dbus-sysdeps.c:
2927 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2928 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2929 * dbus/dbus-sysdeps.h:
2930 Add _dbus_spawn_async.
2932 * test/spawn-test.c: (main):
2933 Test for _dbus_spawn_async.
2935 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2937 * dbus/dbus-internals.h:
2938 Fix build without tests.
2940 * dbus/dbus-list.c: (alloc_link):
2941 Fix a segfault when a malloc fails.
2943 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2944 (dbus_malloc0), (dbus_realloc):
2945 Add support for malloc debugging.
2947 2003-02-15 Alexander Larsson <alexl@redhat.com>
2949 * dbus/dbus-threads.c:
2950 * dbus/dbus-threads.h:
2951 Add condvars. Remove static mutext from API.
2952 Implement static mutexes by initializing them from threads_init.
2954 * glib/dbus-gthread.c:
2955 * qt/dbus-qthread.cpp:
2956 Update with the thread api changes.
2961 Turn StaticMutex into normal mutex + init function.
2962 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2963 _dbus_list_append_link, _dbus_list_prepend_link
2966 * dbus/dbus-sysdeps.c:
2967 * dbus/dbus-sysdeps.h:
2968 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2969 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2971 * dbus/dbus-protocol.h:
2972 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2974 * dbus/dbus-message.c:
2975 Make ref/unref atomic.
2978 * dbus/dbus-connection-internal.h:
2979 * dbus/dbus-connection.c:
2980 * dbus/dbus-connection.h:
2982 Change _peek to _borrow,_return & _steal_borrowed.
2983 Change disconnect callback to event.
2984 Make dbus_connection_dispatch_messages reentrant.
2986 * dbus/dbus-transport.c:
2987 Don't ref the connection on calls to the transport
2990 * dbus/dbus-message-handler.c:
2993 * glib/dbus-gmain.c:
2994 Don't use peek_message anymore
2997 * test/debug-thread.c:
2998 * test/debug-thread.h:
2999 Simple thread implementation that asserts() on deadlocks in
3000 single-threaded code.
3003 (main) Call debug_threads_init.
3006 Use disconnect message instead of disconnect callback.
3010 Don't call dbus_connection_set_disconnect_function. Instead export
3011 bus_connection_disconnect.
3014 Call bus_connection_disconnect when we get a disconnected message.
3016 2003-02-15 Havoc Pennington <hp@pobox.com>
3018 * dbus/dbus-message.c (dbus_message_new): fool around with the
3021 2003-02-14 Havoc Pennington <hp@pobox.com>
3023 * dbus/dbus-mempool.c: fail if the debug functions so indicate
3025 * dbus/dbus-memory.c: fail if the debug functions indicate we
3028 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
3029 (_dbus_decrement_fail_alloc_counter): debug functions to
3030 simulate memory allocation failures
3032 2003-02-14 Havoc Pennington <hp@pobox.com>
3034 * dbus/dbus-errors.h (struct DBusError): add a word of padding
3037 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3039 * bus/driver.c: (bus_driver_handle_hello):
3041 * bus/services.c: (bus_service_lookup):
3042 Reorder message sending so we get a more sane order.
3044 * test/bus-test.c: (message_handler):
3047 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3049 * bus/driver.c: (bus_driver_send_service_deleted),
3050 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3051 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3052 (bus_driver_send_welcome_message),
3053 (bus_driver_handle_list_services),
3054 (bus_driver_handle_acquire_service),
3055 (bus_driver_handle_service_exists):
3056 * dbus/dbus-bus.c: (dbus_bus_register_client),
3057 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3058 * dbus/dbus-errors.c: (dbus_result_to_string):
3059 * dbus/dbus-errors.h:
3060 * dbus/dbus-message.c: (dbus_message_append_args),
3061 (dbus_message_append_args_valist), (dbus_message_get_args),
3062 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
3063 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
3064 (dbus_message_iter_get_byte_array),
3065 (dbus_message_iter_get_string_array), (message_iter_test),
3066 (check_message_handling), (_dbus_message_test):
3067 * dbus/dbus-message.h:
3068 * test/bus-test.c: (main):
3069 Change fields to arguments in messages, so that they won't be
3070 confused with header fields.
3072 * glib/test-dbus-glib.c: (main):
3073 Remove append_fields from hello message.
3075 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3077 * dbus/dbus-errors.c:
3078 * dbus/dbus-message.c:
3079 * dbus/dbus-string.c:
3080 Documentation fixes.
3082 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3084 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
3086 Implement support for timeouts in dbus-glib.
3088 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3090 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3091 * dbus/dbus-message.c: (process_test_subdir):
3092 * test/break-loader.c: (find_breaks_based_on):
3093 Plug some memory leaks.
3095 2003-02-13 Richard Hult <rhult@codefactory.se>
3097 * bus/main.c: Fix build.
3099 * dbus/dbus-errors.h:
3100 * dbus/dbus-errors.c: Fix copyright for Anders.
3102 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3107 * bus/connection.c: (bus_connection_foreach):
3110 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
3111 (unescape_string), (new_section), (parse_section_start),
3112 (parse_key_value), (report_error), (bus_desktop_file_load),
3113 (bus_desktop_file_get_string):
3114 * bus/desktop-file.h:
3115 Use DBusError for error reporting.
3117 * bus/dispatch.c: (send_one_message),
3118 (bus_dispatch_message_handler):
3119 * bus/driver.c: (bus_driver_send_service_deleted),
3120 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3121 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3122 (bus_driver_send_welcome_message),
3123 (bus_driver_handle_list_services),
3124 (bus_driver_handle_acquire_service),
3125 (bus_driver_handle_service_exists):
3126 * bus/loop.c: (bus_loop_run):
3128 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
3130 * bus/utils.c: (bus_wait_for_memory):
3132 New files with general utility functions.
3134 * dbus/dbus-internals.h:
3135 Remove _DBUS_HANDLE_OOM.
3137 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3139 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
3140 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
3141 * dbus/dbus-errors.h:
3142 Add DBusError structure.
3144 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3146 * test/data/valid-messages/standard-acquire-service.message:
3147 * test/data/valid-messages/standard-hello.message:
3148 * test/data/valid-messages/standard-list-services.message:
3149 * test/data/valid-messages/standard-service-exists.message:
3150 Add some standard messages.
3152 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3154 * bus/driver.c: (bus_driver_send_welcome_message),
3155 (bus_driver_handle_list_services),
3156 (bus_driver_handle_acquire_service),
3157 (bus_driver_handle_service_exists), (bus_driver_handle_message):
3158 Update for API changes in libdbus.
3160 * dbus/dbus-message.c: (dbus_message_new_reply):
3161 * dbus/dbus-message.h:
3162 Remove the name argument. The spec states that replies shouldn't
3165 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3167 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
3168 (report_error), (bus_desktop_file_load), (lookup_section),
3169 (lookup_line), (bus_desktop_file_get_raw),
3170 (bus_desktop_file_get_string):
3171 * bus/desktop-file.h:
3172 Some fixes, and new functions for getting a key value from a section.
3174 2003-02-13 Havoc Pennington <hp@pobox.com>
3176 * test/data/auth/fail-after-n-attempts.auth-script: new test
3178 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
3181 2003-02-13 Havoc Pennington <hp@pobox.com>
3183 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
3184 dbus_credentials_match were backward
3186 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
3187 NO_CREDENTIALS and ROOT_CREDENTIALS
3189 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
3190 into here. Never process more commands after we've reached an
3191 end state; store further data as unused bytes.
3193 * test/data/auth/*: add more auth tests
3195 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
3196 command to match exact string and EXPECT_UNUSED to match unused
3199 * test/Makefile.am (dist-hook): fix to dist all the test stuff
3201 2003-02-12 Havoc Pennington <hp@pobox.com>
3203 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
3204 \r off of popped lines
3206 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
3209 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
3212 2003-02-12 Havoc Pennington <hp@pobox.com>
3214 * dbus/Makefile.am: remove break-loader from the build, since it
3217 * configure.in: add --enable-gcov to turn on coverage profiling
3218 flags and disable optimization
3220 2003-02-10 Havoc Pennington <hp@pobox.com>
3222 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
3223 initial cut at test framework for DBusAuth from laptop.
3224 Doesn't quite work yet but it compiles and I need to get
3225 it off the 266mhz laptop. ;-)
3227 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
3228 fix a memleak in error case
3230 2003-02-12 Anders Carlsson <andersca@codefactory.se>
3233 * bus/desktop-file.c:
3234 * bus/desktop-file.h:
3235 Add a desktop file parser.
3237 2003-02-11 Zack Rusin <zack@kde.org>
3239 * qt/message.[h|cpp]: sample implementation
3240 of the KDE wrapper for DBusMessage
3242 2003-02-09 Zack Rusin <zack@kde.org>
3244 * test/bus-test.c: make_it_compile
3245 * doc/dbus-specification.sgml: minimal semantic fix
3247 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3253 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3256 * dbus/dbus-break-loader.c:
3258 * test/break-loader.c:
3259 Move dbus-break-loader to test/ and rename it to break-loader.
3261 2003-02-02 Havoc Pennington <hp@pobox.com>
3263 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
3264 for code to manage cookies in your home directory
3266 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
3268 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
3269 to authenticate, then disconnect the client.
3271 2003-02-03 Alexander Larsson <alexl@redhat.com>
3273 * dbus/dbus-message.c (dbus_message_append_fields):
3276 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3278 * doc/dbus-specification.sgml:
3279 Update address format section.
3281 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3284 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
3285 (message_handler), (new_connection_callback), (loop_quit),
3289 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3291 * bus/driver.c: (bus_driver_handle_service_exists):
3292 Simplify the code a bit.
3294 * dbus/dbus-bus.c: (dbus_bus_service_exists):
3297 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3300 Add libdbus-daemon.la and link to it.
3302 2003-02-01 James Willcox <jwillcox@gnome.org>
3304 * bus/driver.c: (bus_driver_handle_own_service):
3305 Actually include the service reply code in the message.
3307 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3309 * bus/driver.c: (bus_driver_handle_service_exists):
3310 Don't unref the incoming message.
3312 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3314 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3316 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3318 * dbus/dbus-server.c: (dbus_server_listen):
3319 * dbus/dbus-transport.c: (_dbus_transport_open):
3320 ifdef out the calls to the debug transport and server.
3322 2003-02-02 Alexander Larsson <alexl@redhat.com>
3324 * dbus/dbus-watch.c (dbus_watch_get_flags):
3325 Add note in the docs that ERROR or HANGUP won't be returned
3326 and are assumed always on.
3328 * glib/dbus-gmain.c (add_watch):
3329 Always add IO_ERR | IO_HUP
3331 * dbus/dbus-message.h:
3332 Add semicolon after dbus_message_iter_get_string_array().
3333 Makes qt code build again
3335 2003-02-01 Anders Carlsson <andersca@codefactory.se>
3337 * bus/driver.c: (create_unique_client_name),
3338 (bus_driver_handle_hello):
3339 Don't take a name, just use a numeric id to identify
3343 * dbus/dbus-bus.c: (dbus_bus_register_client),
3344 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3346 Add new convenience functions for communicating with the bus.
3348 * dbus/dbus-message.h:
3350 * dbus/dbus-protocol.h:
3353 2003-02-01 Alexander Larsson <alexl@redhat.com>
3355 * dbus/dbus-message.c (dbus_message_append_fields):
3356 Add some more doc comments.
3358 2003-02-01 Havoc Pennington <hp@pobox.com>
3360 * dbus/dbus-break-loader.c (randomly_modify_length): change
3361 a 4-byte value in the message as if it were a length
3363 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3364 execute bit on saved files
3366 2003-02-01 Havoc Pennington <hp@pobox.com>
3368 * dbus/dbus-break-loader.c (main): new program to find messages
3369 that break the loader.
3371 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3372 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3374 * dbus/dbus-string.c (_dbus_string_set_byte): new
3376 2003-01-31 Havoc Pennington <hp@pobox.com>
3378 * dbus/dbus-message.c: refactor the test code to be more general,
3379 in preparation for writing a "randomly permute test cases to
3380 try to break the loader" program.
3382 2003-01-31 Havoc Pennington <hp@pobox.com>
3384 * doc/dbus-specification.sgml: work on the specification
3386 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
3387 the protocol version of the message.
3389 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
3390 no longer specifies that.
3391 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
3394 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3395 "break" for DBUS_TYPE_NIL, remove @todo
3397 2003-01-31 Havoc Pennington <hp@pobox.com>
3399 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
3400 just set_is_error/get_is_error as this is a commonly-used
3401 function, and write docs.
3403 2003-01-31 Anders Carlsson <andersca@codefactory.se>
3405 * dbus/dbus-address.c: (dbus_address_entry_free):
3406 Free key and value lists.
3408 * dbus/dbus-internals.c: (_dbus_type_to_string):
3409 Add the types we didn't have.
3411 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3412 (_dbus_marshal_validate_arg):
3415 * dbus/dbus-message.c: (dbus_message_set_sender):
3416 Remove todo about being able to set sender to NULL.
3418 (dbus_message_set_is_error_reply),
3419 (dbus_message_get_is_error_reply):
3420 * dbus/dbus-message.h:
3423 * dbus/dbus-protocol.h:
3424 Add error reply flag.
3426 * test/data/valid-messages/opposite-endian.message:
3427 Add NIL type to test.
3429 2003-01-31 Havoc Pennington <hp@pobox.com>
3431 * doc/dbus-specification.sgml: fully specify the header. Add
3432 flags and major protocol version, and change header/body len to
3435 * dbus/dbus-message-builder.c (append_saved_length): append length
3438 * dbus/dbus-message.c (dbus_message_create_header): change header
3439 length and body length to unsigned. Add the new fields from the
3441 (_dbus_message_loader_return_buffer): unsigned header/body len
3443 2003-01-30 Havoc Pennington <hp@pobox.com>
3445 * dbus/dbus-auth.c: rework to use only REJECTED, no
3448 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
3449 use REJECTED, suggested by Mark McLoughlin
3451 2003-01-30 Havoc Pennington <hp@pobox.com>
3453 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3454 a better way to report errors here. e.g. "unix address lacks
3455 path" or something. also "no such file" when the path doesn't
3458 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3460 (dbus_parse_address): add @todo about documenting address format,
3461 and allowing , and ; to be escaped
3463 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3466 Add dbus-address.[ch]
3468 * dbus/dbus-address.c: (dbus_address_entry_free),
3469 (dbus_address_entries_free), (create_entry),
3470 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3471 (dbus_parse_address), (_dbus_address_test):
3472 * dbus/dbus-address.h:
3473 New files for dealing with address parsing.
3475 * dbus/dbus-connection.c:
3476 Document timeout functions.
3478 * dbus/dbus-message.c:
3479 Document dbus_message_new_from_message.
3481 * dbus/dbus-server-debug.c:
3484 * dbus/dbus-server.c: (dbus_server_listen):
3485 Parse address and use correct server implementation.
3487 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3488 * dbus/dbus-string.h:
3489 New function with test.
3491 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3495 * dbus/dbus-transport-debug.c:
3498 * dbus/dbus-transport.c: (_dbus_transport_open):
3499 Parse address and use correct transport implementation.
3501 2003-01-30 Havoc Pennington <hp@pobox.com>
3503 * dbus/dbus-message.c: use message->byte_order instead of
3504 DBUS_COMPILER_BYTE_ORDER throughout.
3505 (dbus_message_create_header): pad header to align the
3506 start of the body of the message to 8-byte boundary
3508 * dbus/dbus-marshal.h: make all the demarshalers take const
3509 DBusString arguments.
3511 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3512 validate message args here, so we don't have to do slow validation
3513 later, and so we catch bad messages as they are incoming. Also add
3514 better checks on header_len and body_len. Also fill in
3517 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3518 implemented properly)
3519 (_dbus_string_validate_nul): new function to check all-nul
3521 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3522 get_arg_end_pos and remove all validation
3523 (_dbus_marshal_validate_arg): actually do validation here.
3525 2003-01-29 Havoc Pennington <hp@pobox.com>
3527 * dbus/dbus-message.c (check_message_handling): fix assertion
3528 failure on set_client_serial
3530 2003-01-28 Havoc Pennington <hp@pobox.com>
3532 * dbus/dbus-server-debug.c: Add doc section comments
3534 * dbus/dbus-transport-debug.c: add doc section comments
3536 2003-01-28 Havoc Pennington <hp@redhat.com>
3538 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3539 the reverse order from how I had it
3540 (_dbus_string_base64_encode): reverse encoding order. I was
3541 basically byteswapping everything during encoding.
3543 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3545 * dbus/dbus-connection-internal.h:
3546 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3547 (_dbus_connection_remove_timeout):
3548 Add functions for adding and removing timeouts.
3550 * dbus/dbus-message.c: (dbus_message_new_from_message):
3551 Add new function that takes a message and creates an exact
3552 copy of it, but with the refcount set to 1.
3553 (check_message_handling):
3556 * dbus/dbus-server-protected.h:
3557 * dbus/dbus-server.c: (_dbus_server_init_base),
3558 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3559 (dbus_server_set_timeout_functions):
3560 (_dbus_server_remove_timeout):
3561 New functions so that a server can add and remove timeouts.
3563 (dbus_server_listen):
3564 Add commented out call to dbus_server_debug_new.
3566 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3567 Actually set the handler, doh.
3569 * dbus/dbus-transport.c: (_dbus_transport_open):
3570 Add commented out call to dbus_transport_debug_client_new.
3573 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3575 2003-01-28 Havoc Pennington <hp@pobox.com>
3577 * dbus/dbus-message.c (check_message_handling): function to check
3578 on the loaded message, iterates over it etc.
3580 2003-01-28 Havoc Pennington <hp@pobox.com>
3582 * test/Makefile.am (dist-hook): fix make distdir
3584 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3586 2003-01-27 Havoc Pennington <hp@pobox.com>
3588 * dbus/dbus-mempool.c (time_for_size): replace printf with
3591 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3592 empty lines; fix the SAVE_LENGTH stuff to be
3593 START_LENGTH/END_LENGTH so it actually works; couple other
3596 * test/Makefile.am (dist-hook): add dist-hook for .message files
3598 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3599 can be constant or locked.
3600 (_dbus_string_free): allow freeing a const string as
3603 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3605 * dbus/dbus-test-main.c (main): take an argument which is the
3606 directory containing test data
3608 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3609 argument to this and load all the messages in test/data/
3610 checking that they can be loaded or not loaded as appropriate.
3612 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3614 * bus/dispatch.c: (bus_dispatch_message_handler):
3615 Dispatch messages sent to services.
3617 * bus/driver.c: (bus_driver_send_service_deleted),
3618 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3619 (bus_driver_send_service_acquired):
3620 Add helper functions for sending service related messages.
3622 (bus_driver_send_welcome_message):
3623 Send HELLO_REPLY instead of WELCOME.
3625 (bus_driver_handle_list_services):
3626 Send LIST_SERVICES_REPLY instead of SERVICES.
3628 (bus_driver_handle_own_service),
3629 (bus_driver_handle_service_exists):
3630 New message handlers.
3632 (bus_driver_handle_message):
3633 Invoke new message handlers.
3635 (bus_driver_remove_connection):
3636 Don't remove any services here since that's done automatically
3637 by bus_service_remove_owner now.
3640 New function signatures.
3642 * bus/services.c: (bus_service_add_owner):
3643 Send ServiceAcquired message if we're the only primary owner.
3645 (bus_service_remove_owner):
3646 Send ServiceAcquired/ServiceLost messages.
3648 (bus_service_set_prohibit_replacement),
3649 (bus_service_get_prohibit_replacement):
3650 Functions for setting prohibit replacement.
3652 (bus_service_has_owner):
3653 New function that checks if a connection is in the owner queue of
3657 Add new function signatures.
3659 * dbus/dbus-list.c: (_dbus_list_test):
3660 Add tests for _dbus_list_remove_last and traversing the list backwards.
3663 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3664 go any further, so return NULL then.
3666 * dbus/dbus-protocol.h:
3667 Add new messages, service flags and service replies.
3669 2003-01-26 Havoc Pennington <hp@pobox.com>
3671 * dbus/dbus-message-builder.c: implement, completely untested.
3673 * test/data/*: add data to be used in testing.
3674 ".message" files are our simple loadable text format.
3675 ".message-raw" will be binary dumps of messages.
3677 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3679 2003-01-26 Havoc Pennington <hp@pobox.com>
3681 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3683 * dbus/dbus-errors.c (dbus_result_to_string): add
3686 * dbus/dbus-message-builder.c: new file, will contain code to load
3687 up messages from files. Not implemented yet.
3689 2003-01-26 Havoc Pennington <hp@pobox.com>
3691 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3692 the sender by setting to NULL
3694 2003-01-26 Havoc Pennington <hp@pobox.com>
3696 The unit tests pass, but otherwise untested. If it breaks, the
3697 tests should have been better. ;-)
3699 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3702 * dbus/dbus-message.c: redo everything so we maintain
3703 message->header as the only copy of the various fields.
3704 This avoids the possibility of out-of-memory in some cases,
3705 for example dbus_message_lock() can't run out of memory anymore,
3706 and avoids extra copying. Figured I may as well go ahead and do
3707 this since it was busted for dbus_message_lock to not return
3708 failure on OOM, and dbus_message_write_header was totally
3709 unchecked for OOM. Also fixed some random other bugs.
3711 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3712 that strings are nul-terminated. Also, end_pos can be equal
3713 to string length just not greater than, I think.
3714 (_dbus_marshal_set_int32): new function
3715 (_dbus_marshal_set_uint32): new function
3716 (_dbus_marshal_set_string): new function
3718 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3719 a warning, init timeout_list to NULL
3720 (dbus_connection_send_message): don't use uninitialized variable
3723 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3725 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3727 * bus/driver.c: (bus_driver_handle_hello),
3728 (bus_driver_send_welcome_message):
3731 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3733 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3734 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3735 (dbus_connection_unref):
3736 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3737 * dbus/dbus-message.c: (dbus_message_unref),
3740 (dbus_message_get_fields):
3741 Remove debugging printout.
3743 (_dbus_message_loader_return_buffer):
3744 Don't store the header string.
3746 (_dbus_message_test):
3749 2003-01-26 Richard Hult <rhult@codefactory.se>
3751 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3752 the file descriptor list, since it can change under us.
3754 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3756 * glib/dbus-gmain.c: (dbus_connection_prepare),
3757 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3758 (remove_watch), (dbus_connection_hookup_with_g_main):
3759 Rewrite the glib handling to use its own GSource instead of a
3760 GIOChannel so we can catch messages put in the queue while waiting
3763 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3766 * bus/connection.c: (connection_disconnect_handler),
3767 (connection_watch_callback), (bus_connection_setup):
3768 * bus/dispatch.c: (send_one_message),
3769 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3770 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3772 * bus/driver.c: (bus_driver_send_service_deleted),
3773 (bus_driver_send_service_created), (bus_driver_handle_hello),
3774 (bus_driver_send_welcome_message),
3775 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3776 (bus_driver_handle_message):
3778 Refactor code, put the message dispatching in its own file. Use
3779 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3782 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3784 * dbus/dbus-internals.h:
3785 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3787 * dbus/dbus-message.c: (dbus_message_get_sender):
3788 * dbus/dbus-message.h:
3789 Implement dbus_message_get_sender.
3791 * dbus/dbus-protocol.h:
3792 Add message and service defines.
3794 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3796 * dbus/dbus-connection.c: (dbus_connection_send_message):
3797 * dbus/dbus-message-internal.h:
3798 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3799 (dbus_message_write_header):
3800 Remove _dbus_messag_unlock and don't set the client serial on a
3801 message if one already exists.
3803 2003-01-24 Havoc Pennington <hp@pobox.com>
3805 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3808 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3811 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3813 * dbus/dbus-list.c: (alloc_link), (free_link):
3814 Use a memory pool for the links.
3816 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3818 * bus/connection.c: (bus_connection_foreach):
3820 Add new bus_connection_foreach function.
3822 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3823 Add function that broadcasts a message to all clients.
3825 (bus_driver_send_service_created), (bus_driver_handle_hello),
3826 (bus_driver_send_welcome_message),
3827 (bus_driver_handle_list_services), (bus_driver_message_handler):
3828 Implement functions that take care of listing services, and notifying
3829 clients when new services are created.
3831 * bus/services.c: (bus_services_list):
3833 Add new function that returns an array of strings with the currently
3834 registered services.
3837 * glib/dbus-gmain.c:
3838 Update copyright year.
3840 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3842 * dbus/dbus-connection.c: (dbus_connection_send_message):
3843 Unlock the message in case it was sent earlier.
3845 (dbus_connection_send_message_with_reply_and_block):
3846 Remove the reply message from the list.
3848 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3849 Set array_len and new_pos correctly.
3851 (_dbus_marshal_test):
3852 Remove debug output.
3854 * dbus/dbus-message-internal.h:
3855 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3856 New function that returns the reply serial.
3858 (_dbus_message_unlock):
3859 New function that unlocks a message and resets its header.
3861 (dbus_message_append_string_array),
3862 (dbus_message_get_fields_valist),
3863 (dbus_message_iter_get_field_type),
3864 (dbus_message_iter_get_string_array),
3865 (dbus_message_get_fields),
3866 (dbus_message_append_fields_valist):
3867 Handle string arrays.
3869 (dbus_message_set_sender):
3870 Make this function public since the bus daemon needs it.
3872 (decode_header_data):
3873 Set the reply serial to -1 initially.
3875 * dbus/dbus-message.h:
3876 Add dbus_message_set_sender.
3878 2003-01-24 Havoc Pennington <hp@pobox.com>
3880 * doc/dbus-specification.sgml: add some stuff
3882 2003-01-22 Havoc Pennington <hp@pobox.com>
3884 * doc/dbus-specification.sgml: Start to document the protocol.
3886 2003-01-22 Havoc Pennington <hp@pobox.com>
3888 * dbus/dbus-connection.c
3889 (dbus_connection_send_message_with_reply_and_block): add some @todo
3891 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3893 2003-01-21 Havoc Pennington <hp@pobox.com>
3895 (patch untested because can't compile)
3897 * bus/driver.c (create_unique_client_name): make this function
3898 never recycle client names. Also, caller should initialize
3901 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3903 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3905 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3906 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3907 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3908 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3909 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3910 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3911 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3912 * dbus/dbus-marshal.h:
3913 * dbus/dbus-protocol.h:
3914 Add support for marshalling and demarshalling integer, double
3917 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3922 * bus/connection.c: (connection_disconnect_handler):
3923 Remove the connection from the bus driver's list.
3925 (connection_watch_callback): Dispatch messages.
3927 (free_connection_data): Free connection name.
3929 (bus_connection_setup): Add connection to the bus driver's list.
3930 (bus_connection_remove_owned_service):
3931 (bus_connection_set_name), (bus_connection_get_name):
3932 Add functions for setting and getting the connection's name.
3935 Add function headers.
3937 * bus/driver.c: (create_unique_client_name),
3938 (bus_driver_handle_hello_message),
3939 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3940 (bus_driver_add_connection), (bus_driver_remove_connection):
3943 * bus/services.c: (bus_service_free):
3945 New file that handles communication and registreation with the bus
3948 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3950 * dbus/dbus-connection.c: (dbus_connection_send_message):
3951 Add a new client_serial parameter.
3953 (dbus_connection_send_message_with_reply):
3954 Remove a @todo since we've implemented the blocking function.
3956 (dbus_connection_send_message_with_reply_and_block):
3957 New function that sends a message and waits for a reply and
3958 then returns the reply.
3960 * dbus/dbus-connection.h:
3963 * dbus/dbus-errors.c: (dbus_result_to_string):
3964 * dbus/dbus-errors.h:
3965 Add new DBUS_RESULT.
3967 * dbus/dbus-message-internal.h:
3968 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3969 (_dbus_message_set_sender), (dbus_message_write_header),
3970 (dbus_message_new_reply), (decode_header_data),
3971 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3972 * dbus/dbus-message.h:
3973 Add new functions that set the reply serial and sender.
3974 Also marshal and demarshal them correctly and add test.
3976 * dbus/dbus-protocol.h:
3977 Add new DBUS_MESSAGE_TYPE_SENDER.
3980 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3981 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3982 (dbus_connection_hookup_with_g_main):
3983 * glib/test-dbus-glib.c: (main):
3984 Rewrite to use GIOChannel and remove the GSource crack.
3986 * test/echo-client.c: (main):
3987 * test/watch.c: (check_messages):
3988 Update for changed APIs
3990 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3992 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3994 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3995 Create a DBusTimeoutList.
3996 (dbus_connection_set_timeout_functions): Add new function to
3997 set timeout callbacks
3999 * dbus/dbus-connection.h: Add public DBusTimeout API.
4001 * dbus/dbus-message.c: (dbus_message_get_service):
4002 * dbus/dbus-message.h: New function.
4004 * dbus/dbus-server.c: Fix small doc typo.
4006 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
4008 2003-01-19 Anders Carlsson <andersca@codefactory.se>
4010 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
4011 of the string, just as long as specified.
4013 2003-01-19 Havoc Pennington <hp@pobox.com>
4015 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
4018 * dbus/dbus-server.c (dbus_server_set_max_connections)
4019 (dbus_server_get_max_connections, dbus_server_get_n_connections):
4020 keep track of current number of connections, and add API for
4021 setting a max (but haven't implemented enforcing the max yet)
4023 2003-01-18 Havoc Pennington <hp@pobox.com>
4025 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
4026 reading/writing if read_watch != NULL or write_watch != NULL.
4028 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
4029 the message loader code to actually load message->header and
4030 message->body into the newly-created message.
4032 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
4035 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
4036 (dbus_connection_get_max_message_size)
4037 (dbus_connection_set_max_live_messages_size)
4038 (dbus_connection_get_max_live_messages_size): implement some
4039 resource limitation functions
4041 * dbus/dbus-resources.c: new file implementing some of the
4042 resource limits stuff
4044 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
4045 missing docs, add @todo to handle OOM etc.
4047 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
4050 2003-01-18 Havoc Pennington <hp@pobox.com>
4052 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
4053 connection if it hasn't been already.
4055 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
4056 replace with DisconnectFunction.
4058 2003-01-18 Havoc Pennington <hp@pobox.com>
4060 Building --disable-verbose-mode --disable-asserts --disable-tests
4061 cuts the library from 112K to 45K or so
4063 * configure.in: check for varargs macro support,
4064 add --enable-verbose-mode, --enable-asserts.
4066 * dbus/dbus-internals.h (_dbus_assert): support
4068 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
4070 2003-01-18 Havoc Pennington <hp@pobox.com>
4072 * dbus/dbus-test.c: include config.h so that tests actually run
4074 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
4075 so the failure mode when that assumption fails will be plenty
4078 2003-01-18 Havoc Pennington <hp@pobox.com>
4080 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
4082 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
4085 * test/Makefile.am: don't use special variable "TESTS" for echo-*
4086 since we don't want to use those in make check
4088 2003-01-15 Havoc Pennington <hp@redhat.com>
4094 2003-01-15 Havoc Pennington <hp@redhat.com>
4096 * test/Makefile.am: fix so that test source code ends up in the
4097 distribution on make distcheck
4099 2003-01-15 Havoc Pennington <hp@redhat.com>
4105 2003-01-15 Havoc Pennington <hp@redhat.com>
4107 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
4108 fix build when --disable-tests
4110 * Makefile.am (EXTRA_DIST): put HACKING in here
4112 * HACKING: document procedure for making a tarball release.
4114 2003-01-14 Anders Carlsson <andersca@codefactory.se>
4116 * bus/connection.c: (connection_error_handler),
4117 (bus_connection_setup):
4118 * bus/main.c: (main):
4119 Make sure that the DBusConnectionData struct is NULLed
4120 out to prevent a segfault.
4122 * dbus/dbus-errors.c: (dbus_result_to_string):
4123 * dbus/dbus-errors.h:
4124 * dbus/dbus-message.c: (dbus_message_get_fields),
4125 (dbus_message_get_fields_valist), (_dbus_message_test):
4126 * dbus/dbus-message.h:
4127 Make dbus_message_get_fields return a result code so we can
4128 track invalid fields as well as oom.
4130 2003-01-11 Havoc Pennington <hp@pobox.com>
4132 * configure.in: change --enable-test/--enable-ansi action-if-given
4133 to enable_foo=$enableval instead of enable_foo=yes
4135 2003-01-08 Havoc Pennington <hp@pobox.com>
4137 * dbus/dbus-string.c (_dbus_string_align_length): new function
4139 * dbus/dbus-test-main.c: move main() for test app here
4141 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
4142 symbol to run tests, because dbus-test isn't in the main
4145 Code review nitpicks.
4147 * dbus/dbus-message.c (dbus_message_write_header): add newlines
4148 for people with narrow emacs ;-). Assert client_serial was filled
4149 in. Assert message->name != NULL.
4150 (dbus_message_append_fields): have "first_field_type" arg separate
4151 from va list, needed for C++ binding that also uses varargs IIRC
4152 and helps with type safety
4153 (dbus_message_new): add @todo about using DBusString to store
4154 service/name internally
4155 (dbus_message_new): don't leak ->service and ->name on OOM later
4157 (dbus_message_unref): free the service name
4158 (dbus_message_get_fields): same change to varargs
4159 i.e. first_field_type
4160 (_dbus_message_loader_return_buffer): assert that the message data
4161 is aligned (if not it's a bug in our code). Put in verbose griping
4162 about why we set corrupted = TRUE.
4163 (decode_header_data): add FIXME that char* is evil. Was going to
4164 add FIXME about evil locale-specific string.h strncmp, but just
4165 switched to wacky string-as-uint32 optimization. Move check for
4166 "no room for field name" above get_const_data_len() to avoid
4167 assertion failure in get_const_data_len if we have trailing 2
4168 bytes or the like. Check for service and name fields being
4169 provided twice. Don't leak service/name on error. Require field
4170 names to be aligned to 4 bytes.
4172 * dbus/dbus-marshal.c: move byte swap stuff to header
4173 (_dbus_pack_int32): uscore-prefix
4174 (_dbus_unpack_int32): uscore-prefix
4175 (_dbus_unpack_uint32): export
4176 (_dbus_demarshal_string): add @todo complaining about use of
4178 (_dbus_marshal_get_field_end_pos): add @todo about bad error
4179 handling allowing corrupt data to go unchecked
4181 2003-01-08 Havoc Pennington <hp@redhat.com>
4183 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
4184 to the select() as needed for authentication. (should be using
4185 _dbus_poll() not select, but for another day)
4187 * dbus/dbus.h: include dbus/dbus-protocol.h
4189 2003-01-08 Anders Carlsson <andersca@codefactory.se>
4191 * dbus/Makefile.am (dbusinclude_HEADERS): Install
4194 2003-01-08 Anders Carlsson <andersca@codefactory.se>
4196 * dbus/dbus-internals.c: (_dbus_type_to_string):
4197 New function that returns a string describing a type.
4199 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
4200 * dbus/dbus-marshal.h:
4201 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
4202 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
4203 (dbus_message_iter_get_byte_array):
4204 * dbus/dbus-message.h:
4205 Add new convenience functions for appending and getting message fields.
4206 Also add demarshalling routines for byte arrays.
4208 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4210 * dbus/dbus-connection-internal.h:
4211 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4212 (_dbus_connection_get_next_client_serial),
4213 (dbus_connection_send_message):
4214 * dbus/dbus-internals.h:
4215 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
4216 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
4217 (_dbus_marshal_uint32), (_dbus_demarshal_double),
4218 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
4219 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
4220 (_dbus_verbose_bytes), (_dbus_marshal_test):
4221 * dbus/dbus-marshal.h:
4222 * dbus/dbus-message-internal.h:
4223 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
4224 (dbus_message_write_header), (_dbus_message_lock),
4225 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
4226 (dbus_message_get_name), (dbus_message_append_int32),
4227 (dbus_message_append_uint32), (dbus_message_append_double),
4228 (dbus_message_append_string), (dbus_message_append_byte_array),
4229 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
4230 (dbus_message_iter_unref), (dbus_message_iter_has_next),
4231 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
4232 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
4233 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
4234 (decode_header_data), (_dbus_message_loader_return_buffer),
4235 (message_iter_test), (_dbus_message_test):
4236 * dbus/dbus-message.h:
4237 * dbus/dbus-protocol.h:
4238 * dbus/dbus-test.c: (main):
4240 * glib/test-dbus-glib.c: (message_handler), (main):
4241 * test/echo-client.c: (main):
4242 * test/watch.c: (check_messages):
4243 Make messages sendable and receivable for real.
4245 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4247 * dbus/dbus-marshal.c: (_dbus_marshal_double),
4248 (_dbus_marshal_string), (_dbus_marshal_byte_array):
4249 * dbus/dbus-message.c: (dbus_message_append_int32),
4250 (dbus_message_append_uint32), (dbus_message_append_double),
4251 (dbus_message_append_string), (dbus_message_append_byte_array):
4252 Handle OOM restoration.
4254 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4256 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4257 (_dbus_demarshal_string), (_dbus_marshal_test):
4258 * dbus/dbus-marshal.h:
4259 * dbus/dbus-message.c: (dbus_message_get_name),
4260 Document these functions.
4262 (dbus_message_append_int32), (dbus_message_append_uint32),
4263 (dbus_message_append_double), (dbus_message_append_string),
4264 (dbus_message_append_byte_array):
4265 * dbus/dbus-message.h:
4266 Add functions for adding message fields of different types.
4268 * dbus/dbus-protocol.h:
4269 Add the different types.
4271 2003-01-05 Havoc Pennington <hp@pobox.com>
4273 * bus/connection.c: implement routines for handling connections,
4274 first thing is keeping a list of owned services on each connection
4275 and setting up watches etc.
4277 * bus/services.c: implement a mapping from service names to lists
4280 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
4282 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
4283 to use static mutexes for global data
4285 * dbus/dbus-connection.c (dbus_connection_set_data): add new
4286 collection of functions to set/get application-specific data
4287 on the DBusConnection.
4289 2003-01-04 Havoc Pennington <hp@pobox.com>
4291 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4292 (_dbus_poll): new function
4294 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4297 * bus/loop.c: initial code for the daemon main loop
4299 2003-01-04 Havoc Pennington <hp@pobox.com>
4301 * test/watch.c (error_handler): make it safe if the error handler
4302 is called multiple times (if we s/error handler/disconnect
4303 handler/ we should just guarantee it's called only once)
4305 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4306 error handler on disconnect (it's quite possible we should
4307 just change the error handler to a "disconnect handler," I'm
4308 not sure we have any other meaningful errors)
4310 * configure.in: check for getpwnam_r
4312 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4313 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4314 mechanism as in SASL spec, using socket credentials
4316 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4317 (_dbus_send_credentials_unix_socket): new function
4319 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4321 (_dbus_write): only check errno if <0 returned
4322 (_dbus_write_two): ditto
4324 2003-01-02 Anders Carlsson <andersca@codefactory.se>
4326 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4327 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4328 (_dbus_marshal_test):
4329 * dbus/dbus-marshal.h:
4330 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4331 to _dbus_marshal_utf8_string. Also fix some tests.
4333 2002-12-28 Harri Porten <porten@kde.org>
4335 * configure.in: added check for C++ compiler and a very cheesy
4336 check for the Qt integration
4338 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4340 * qt/Makefile.am: added
4342 * qt/.cvsignore: added
4344 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4345 latter, added #ifdef QT_THREAD_SUPPORT guard.
4347 * dbus/Makefile.am: added missing headers for make dist
4349 2002-12-28 Kristian Rietveld <kris@gtk.org>
4351 * dbus/Makefile.am: fixup export-symbols-regex.
4353 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4355 * acinclude.m4: Add this file and put the
4356 PKG_CHECK_MODULE macro in it.
4358 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4360 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4361 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4362 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4363 (_dbus_marshal_test):
4364 Make the demarshalling routines align the pos argument.
4365 Add string marshalling tests and fix the obvious bugs
4368 2002-12-26 Havoc Pennington <hp@pobox.com>
4370 * dbus/dbus-auth.c: fixes fixes fixes
4372 * dbus/dbus-transport-unix.c: wire up support for
4373 encoding/decoding data on the wire
4375 * dbus/dbus-auth.c (_dbus_auth_encode_data)
4376 (_dbus_auth_decode_data): append to target string
4377 instead of nuking it.
4379 2002-12-26 Havoc Pennington <hp@pobox.com>
4381 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4382 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4385 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4386 avoid swap_bytes() overhead (ignoring possible assembly stuff for
4387 now). Main point is because I wanted unpack_uint32 to implement
4389 (_dbus_verbose_bytes): new function
4391 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4393 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4394 mechanism to handle a corrupt message stream
4395 (_dbus_message_loader_new): fix preallocation to only prealloc,
4398 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4399 (_dbus_string_test): enhance tests for copy/move and fix the
4402 * dbus/dbus-transport-unix.c: Hold references in more places to
4403 avoid reentrancy problems
4405 * dbus/dbus-transport.c: ditto
4407 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4408 leak reference count in no-message case
4410 * test/watch.c (do_mainloop): handle adding/removing watches
4411 during iteration over the watches. Also, ref the connection/server
4412 stored on a watch, so we don't try to mangle a destroyed one.
4414 * dbus/dbus-transport-unix.c (do_authentication): perform
4417 * dbus/dbus-auth.c (get_state): add a state
4418 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4419 (_dbus_auth_get_unused_bytes): append the unused bytes
4420 to the passed in string, rather than prepend
4422 * dbus/dbus-transport.c (_dbus_transport_init_base): create
4423 the auth conversation DBusAuth
4425 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4426 (_dbus_transport_new_for_domain_socket): when creating a
4427 transport, pass in whether it's a client-side or server-side
4428 transport so we know which DBusAuth to create
4430 2002-12-03 Havoc Pennington <hp@pobox.com>
4432 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4433 _after_ finalizing the derived members
4434 (unix_connection_set): unref watch if we fail to add it
4436 * dbus/dbus-connection.c (dbus_connection_unref): delete the
4437 transport first, so that the connection owned by the
4438 transport will be valid as the transport finalizes.
4440 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4441 if necessary, and remove watches from the connection.
4443 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4445 2002-12-26 Anders Carlsson <andersca@codefactory.se>
4447 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4448 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4449 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4450 (_dbus_marshal_test):
4451 * dbus/dbus-marshal.h:
4452 Add string marshal functions and have the demarshal functions
4453 return the new position.
4455 2002-12-25 Havoc Pennington <hp@pobox.com>
4457 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
4458 it is a simple protocol that just maps directly to SASL.
4460 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4461 initial implementation, not actually used yet.
4463 * dbus/dbus-string.c (_dbus_string_find): new function
4464 (_dbus_string_equal): new function
4465 (_dbus_string_base64_encode): new function
4466 (_dbus_string_base64_decode): new function
4468 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4471 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4472 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4473 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4474 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4475 * dbus/dbus-marshal.h:
4476 * dbus/dbus-protocol.h:
4477 * dbus/dbus-test.c: (main):
4479 Add un-optimized marshalling/demarshalling routines.
4481 2002-12-25 Harri Porten <porten@kde.org>
4483 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4485 2002-12-24 Zack Rusin <zack@kde.org>
4487 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4488 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4491 2002-12-24 Havoc Pennington <hp@pobox.com>
4493 * glib/dbus-gthread.c: fix include
4495 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4496 I think glib API needs to change, though, as you don't
4497 want to use DBusMessageFunction, you want to use the
4498 DBusMessageHandler object. Probably
4499 dbus_connection_open_with_g_main_loop()
4500 and dbus_connection_setup_g_main_loop() or something like that
4501 (but think of better names...) that just create a connection
4502 that has watch/timeout functions etc. already set up.
4504 * dbus/dbus-connection.c
4505 (dbus_connection_send_message_with_reply): new function just to
4506 show how the message handler helps us deal with replies.
4508 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4510 * dbus/dbus-string.c (_dbus_string_test): free a string that
4513 * dbus/dbus-hash.c: use memory pools for the hash entries
4514 (rebuild_table): be more paranoid about overflow, and
4515 shrink table when we can
4516 (_dbus_hash_test): reduce number of sprintfs and write
4517 valid C89. Add tests for case where we grow and then
4518 shrink the hash table.
4520 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4522 * dbus/dbus-connection.c (dbus_connection_register_handler)
4523 (dbus_connection_unregister_handler): new functions
4525 * dbus/dbus-message.c (dbus_message_get_name): new
4527 * dbus/dbus-list.c: fix docs typo
4529 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4530 an object representing a handler for messages.
4532 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4535 * glib/dbus-gthread.c: (dbus_gthread_init):
4536 Don't use the gdbus prefix for public functions.
4538 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4542 Add GLib checks and fixup .pc files
4546 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4547 (gdbus_connection_check), (gdbus_connection_dispatch),
4548 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4549 (dbus_connection_gsource_new):
4550 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4551 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4552 * glib/test-dbus-glib.c: (message_handler), (main):
4555 2002-12-15 Harri Porten <porten@kde.org>
4557 * autogen.sh: check for libtoolize before attempting to use it
4559 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4562 * .cvsignore: ignore more stamp files
4564 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4566 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4567 without make install.
4569 2002-12-15 Havoc Pennington <hp@pobox.com>
4571 * dbus/dbus-threads.c: add thread stubs that a higher library
4572 layer can fill in. e.g. the GLib wrapper might fill them in with
4573 GThread stuff. We still need to use this thread API to
4574 thread-safe-ize the library.
4576 2002-12-12 Havoc Pennington <hp@pobox.com>
4578 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4579 below new interfaces and include fewer system headers.
4581 * dbus/dbus-sysdeps.c (_dbus_read): new function
4582 (_dbus_write): new function
4583 (_dbus_write_two): new function
4584 (_dbus_connect_unix_socket): new function
4585 (_dbus_listen_unix_socket): new function
4587 * dbus/dbus-message-internal.h: change interfaces to use
4590 2002-12-11 Havoc Pennington <hp@pobox.com>
4592 * dbus/dbus-types.h: add dbus_unichar
4594 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4596 * dbus/dbus-connection.c (dbus_connection_send_message): return
4599 * dbus/dbus-transport.c: include dbus-watch.h
4601 * dbus/dbus-connection.c: include dbus-message-internal.h
4603 * HACKING: add file with coding guidelines stuff.
4605 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4606 handling here, for security purposes (as in vsftpd). Not actually
4607 using this class yet.
4609 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4610 system/libc usage here, as in vsftpd, for ease of auditing (and
4611 should also simplify portability). Haven't actually moved all the
4612 system/libc usage into here yet.
4614 2002-11-25 Havoc Pennington <hp@pobox.com>
4616 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4617 always print the first verbose message.
4619 2002-11-24 Havoc Pennington <hp@pobox.com>
4621 * test/echo-client.c, test/echo-server.c: cheesy test
4624 * configure.in (AC_CHECK_FUNCS): check for writev
4626 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4629 * dbus/dbus-list.c (_dbus_list_foreach): new function
4631 * dbus/dbus-internals.c (_dbus_verbose): new function
4633 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4634 representing a server that listens for connections.
4636 * dbus/.cvsignore: create
4638 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4639 public API for reporting errors
4641 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4642 public object representing a connection that
4643 sends/receives messages. (Same object used for
4644 both client and server.)
4646 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4647 Basic abstraction for different kinds of stream
4648 that we might read/write messages from.
4650 2002-11-23 Havoc Pennington <hp@pobox.com>
4652 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4655 * dbus/dbus-test.c (main): add list test, and include
4656 dbus-test.h as intended
4658 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4659 (_dbus_hash_table_remove_int): return value indicates
4660 whether the entry existed to remove
4662 * dbus/dbus-list.c: add linked list utility class,
4665 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4668 2002-11-23 Havoc Pennington <hp@pobox.com>
4670 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4671 DBUS_END_DECLS to nothing, that should fix this once and for all
4673 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4675 * dbus/dbus-message.c, dbus/dbus-hash.c:
4676 add some missing @brief
4678 2002-11-23 Havoc Pennington <hp@pobox.com>
4680 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4681 to avoid confusing Doxygen
4683 * dbus/dbus-hash.c: @} not }@
4685 * dbus/dbus-message.c (struct DBusMessage): split out
4688 2002-11-23 Havoc Pennington <hp@pobox.com>
4690 * configure.in: pile on more warning flags if using gcc
4692 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4693 to document static functions
4695 * configure.in: add summary to end of configure so it
4696 looks nice and attractive
4698 * dbus/dbus-hash.c: finish implementation and write unit
4701 * configure.in: add --enable-tests to enable unit tests
4703 * dbus/dbus-test.c: test program to run unit tests
4704 for all files in dbus/*, initially runs a test for
4707 * dbus/dbus-internals.h: file to hold some internal utility stuff
4709 2002-11-22 Havoc Pennington <hp@redhat.com>
4711 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4712 "ported" away from Tcl
4714 * dbus/dbus-types.h: header for types such as dbus_bool_t
4716 2002-11-22 Havoc Pennington <hp@redhat.com>
4718 * dbus/dbus.h: fixups for doc warnings
4720 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4722 (QUIET): make it quiet so we can see warnings
4724 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4726 2002-11-22 Havoc Pennington <hp@redhat.com>
4728 * Makefile.am: include "Doxyfile" target in all-local
4730 * configure.in: generate the Doxyfile
4732 * Doxyfile.in: move Doxyfile here, so we can use
4733 configure to generate a Doxyfile with the right
4736 2002-11-22 Havoc Pennington <hp@redhat.com>
4738 * dbus/dbus-message.c: move inline docs into .c file
4740 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4741 so all docs are under doc/
4742 (MAN_EXTENSION): generate man pages. Use extension
4743 ".3dbus" which matches ".3qt" on my system,
4744 I guess this is OK, I don't know really.
4745 (FILE_PATTERNS): look for .c files not .h, makes sense
4748 2002-11-22 Havoc Pennington <hp@pobox.com>
4750 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4751 because any app can be a server, and any app can be a client,
4752 the bus is a special kind of server.
4754 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4756 * Doxyfile : adding. Still needs Makefile rules to be generated
4757 automatically (just run "doxygen" in the toplevel dir for now to
4760 * dbus/dbus-message.h : Adding sample docs (javadoc since
4761 resembles gtk-doc a little more)
4763 * dbus/dbus.h : Adding sample docs
4765 2002-11-21 Havoc Pennington <hp@redhat.com>
4767 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4768 so we can allow ourselves to include files directly,
4769 instead of having to use dbus.h
4771 * dbus/dbus.h: fill in
4773 * dbus/dbus-message.h: sketch out a sample header file.
4774 Include griping if you include it directly instead of
4777 * dbus/dbus-macros.h: new file with macros for extern "C",
4778 TRUE/FALSE, NULL, etc.
4780 * doc/file-boilerplate.c: put include guards in here
4782 2002-11-21 Havoc Pennington <hp@redhat.com>
4784 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4786 * COPYING: include the GPL as well, and license code
4787 under both AFL and GPL.
4789 2002-11-21 Havoc Pennington <hp@redhat.com>
4791 * acconfig.h: get rid of this
4793 * autogen.sh (run_configure): add --no-configure option
4795 * configure.in: remove AC_ARG_PROGRAM to make
4796 autoconf complain less. add AC_PREREQ.
4797 add AC_DEFINE third arg.
4799 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4802 Fix references so we can distcheck.
4804 2002-11-21 Havoc Pennington <hp@redhat.com>
4806 * Initial module creation