1 2003-05-16 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-connection.c: disable verbose lock spew
5 * tools/dbus-send.c: add --print-reply command line option
7 * tools/dbus-print-message.h (print_message): new util function
8 shared by dbus-send and dbus-monitor
10 * tools/dbus-monitor.c (handler_func): exit on disconnect
12 * dbus/dbus-transport-unix.c (do_reading): if the transport is
13 disconnected, don't try to use the read_watch
15 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
16 so we can find this bug more easily
18 2003-05-16 Havoc Pennington <hp@redhat.com>
20 * bus/policy.c (free_rule_list_func): avoid a crash when passed
21 NULL as DBusHashTable is annoyingly likely to do.
23 2003-05-16 Colin Walters <walters@verbum.org>
25 * tools/dbus-monitor.c: Add --session argument and usage()
28 * tools/dbus-monitor.1: Update with new --session arg.
30 * bus/Makefile.am (install-data-hook): Create
31 $(libdir)/dbus-1.0/services so that the session bus is happy.
33 2003-05-15 Havoc Pennington <hp@redhat.com>
35 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
36 on non-x86. ifdef's are evil.
38 2003-05-15 Havoc Pennington <hp@redhat.com>
44 * bus/Makefile.am (initddir): apparently we are supposed to put
45 init scripts in /etc/rc.d/init.d not /etc/init.d
47 * bus/Makefile.am: remove the "you must --enable-tests to make
48 check" as it broke distcheck
50 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
52 2003-05-13 James Willcox <jwillcox@gnome.org>
55 * bus/activation.c: (bus_activation_service_created),
56 (bus_activation_activate_service):
57 * bus/driver.c: (bus_driver_send_service_deleted),
58 (bus_driver_send_service_created), (bus_driver_send_service_lost),
59 (bus_driver_send_service_acquired),
60 (bus_driver_send_welcome_message),
61 (bus_driver_handle_list_services):
62 * bus/session.conf.in:
63 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
64 (dbus_bus_service_exists), (dbus_bus_activate_service):
67 Add some convenience API which lets you activate a service, and did a
68 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
69 and dbus_message_get_args()
71 2003-05-11 Havoc Pennington <hp@pobox.com>
73 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
74 calling _dbus_marshal_validate_arg() for every byte in a byte
77 * dbus/dbus-message-handler.c: use atomic reference counting to
78 reduce number of locks slightly; the global lock in here sucks
80 * dbus/dbus-connection.c
81 (_dbus_connection_update_dispatch_status_and_unlock): variant of
82 update_dispatch_status that can be called with lock held; then use
83 in a couple places to reduce locking/unlocking
84 (dbus_connection_send): hold the lock over the whole function
85 instead of acquiring it twice.
87 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
89 * bus/connection.c (bus_connections_setup_connection): fix access
90 to already-freed memory.
92 * dbus/dbus-connection.c: keep a little cache of linked list
93 nodes, to avoid using the global linked list alloc lock in the
94 normal send-message case. Instead we just use the connection lock
95 that we already have to take.
97 * dbus/dbus-list.c (_dbus_list_find_last): new function
99 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
100 change to use a struct for the atomic type; fix docs,
101 they return value before increment, not after increment.
103 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
104 (_dbus_string_append_8_aligned): new functions to try to
105 microoptimize this operation.
106 (reallocate_for_length): break this out of set_length(), to
107 improve profile info, and also so we can consider inlining the
110 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
111 strings with some preallocation, cuts down on our calls to realloc
112 a fair bit. Though if we can get the "move entire string to empty
113 string" optimization below to kick in here, it would be better.
115 * dbus/dbus-string.c (_dbus_string_move): just call
116 _dbus_string_move_len
117 (_dbus_string_move_len): add a special case for moving
118 an entire string into an empty string; we can just
119 swap the string data instead of doing any reallocs.
120 (_dbus_string_init_preallocated): new function
122 2003-05-11 Havoc Pennington <hp@pobox.com>
124 Write a "test-profile" that does echo client-server with threads;
125 profile reveals lock contention, memcpy/realloc of buffers, and
126 UTF-8 validation as hot spots. 20% of lock contention eliminated
127 with dbus_atomic_inc/dec implementation on x86. Much remaining
128 contention is global mempool locks for GList and DBusList.
130 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
133 * dbus/dbus-connection.c (struct DBusConnection): use
134 dbus_atomic_t for the reference count
136 * dbus/dbus-message.c (struct DBusMessage): declare
137 dbus_atomic_t values as volatile
139 * configure.in: code to detect ability to use atomic integer
140 operations in assembly, from GLib patch
142 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
143 time, tired of it being wrong in threads and forked processes
145 * glib/test-profile.c: a little program to bounce messages back
146 and forth between threads and eat CPU
148 * dbus/dbus-connection.c: add debug spew macros for debugging
149 thread locks; include config.h at top; fix deadlock in
150 dbus_connection_flush()
152 2003-05-08 Havoc Pennington <hp@pobox.com>
154 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
155 data from getting written, and there wasn't a good reason to
158 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
159 dbus_verbose lines in test coverage
160 (main): add list of functions sorted by # of untested blocks
161 to the coverage report
163 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
165 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
167 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
170 * test/data/auth/cancel.auth-script: test canceling an
173 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
174 aren't used. in CVS history if we end up needing them.
176 2003-05-04 Havoc Pennington <hp@pobox.com>
178 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
181 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
182 function, which assumed length was in # of strings, not bytes
184 * dbus/dbus-message.c (_dbus_message_test): add tests for some
187 * dbus/dbus-connection.c
188 (_dbus_connection_queue_received_message): disable function for
189 now, we are only using it in test mode
191 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
192 remove a mistaken FIXME
194 2003-05-04 Havoc Pennington <hp@pobox.com>
196 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
197 unlock mutex on successful return, patch from Anders Gustafsson
199 2003-05-04 Havoc Pennington <hp@pobox.com>
201 * dbus-glib-1.pc.in (Requires): fix dependencies, from
204 2003-05-04 Havoc Pennington <hp@pobox.com>
206 * tools/dbus-launch.c: implement
208 * bus/main.c (main), bus/bus.c (bus_context_new):
209 implement --print-pid and --fork
211 2003-05-03 Havoc Pennington <hp@redhat.com>
213 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
214 the address had no value, and add to test suite. Fix and
215 regression test from Miloslav Trmac
217 2003-05-03 Havoc Pennington <hp@pobox.com>
219 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
220 watch is invalid when handled
222 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
223 dbus-launch utility to launch the bus from a shell script. Didn't
224 actually implement dbus-launch yet, it's just a placeholder still.
226 2003-05-03 Havoc Pennington <hp@pobox.com>
228 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
229 daemon; also documents daemon config file, so replaces
230 doc/config-file.txt. Corrected some stuff from config-file.txt in
231 the process of moving it.
233 2003-05-03 Havoc Pennington <hp@pobox.com>
235 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
238 2003-05-03 Colin Walters <walters@verbum.org>
240 * dbus/dbus-sysdeps.c (fill_user_info): Test against
241 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
243 * Makefile.am: Update to use new .pc versioning scheme.
245 2003-05-02 Havoc Pennington <hp@redhat.com>
247 * bus/system.conf.in: allow send/receive to/from message bus
250 2003-04-30 Havoc Pennington <hp@redhat.com>
252 * configure.in: print a note when building with unit tests and
255 2003-04-30 Havoc Pennington <hp@redhat.com>
257 * Makefile.am: add a check-local that complains if you didn't
258 configure with --enable-tests
260 2003-04-29 Havoc Pennington <hp@redhat.com>
262 * glib/dbus-gmain.c: docs cleanups
264 * dbus/dbus-types.h: add docs on int64 types
266 * dbus/dbus-memory.c: fix docs to avoid putting private API in
267 public API docs section
269 2003-04-29 Havoc Pennington <hp@redhat.com>
271 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
272 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
273 parallel install API version, not with the D-BUS package version.
275 * HACKING: move some of README over here
277 * README: updates, and document API/ABI policy
279 * configure.in: reindentation
281 2003-04-29 Havoc Pennington <hp@redhat.com>
283 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
284 to use this library" to be sure people have the right
287 2003-04-28 Havoc Pennington <hp@redhat.com>
289 * configure.in: add --enable-docs which by default is auto yes if
290 doxygen and db2html found, no otherwise; but can be forced on/off
292 * doc/Makefile.am: conditionalize whether to build docs on
295 2003-04-28 Havoc Pennington <hp@redhat.com>
301 * bus/system.conf.in: add <includedir>system.d</includedir>
303 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
304 username was provided but not uid
306 * bus/config-parser.c (struct BusConfigParser): keep track of
307 whether the parser is toplevel or was included; change some
308 of the error handling if it's included.
310 2003-04-27 Havoc Pennington <hp@pobox.com>
314 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
315 report correct status if we finish processing authentication
316 inside this function.
318 * bus/activation.c (try_send_activation_failure): use
319 bus_transaction_send_error_reply
321 * bus/connection.c (bus_connection_get_groups): return an error
322 explaining the problem
324 * bus/bus.c (bus_context_check_security_policy): implement
325 restriction here that inactive connections can only send the
326 hello message. Also, allow bus driver to send anything to
329 * bus/connection.c (bus_connection_complete): create the
330 BusClientPolicy here instead of on-demand.
331 (bus_connection_get_policy): don't return an error
333 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
334 sender field in message being replied to
336 * bus/bus.c (bus_context_check_security_policy): fix silly typo
337 causing it to return FALSE always
339 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
340 we checked sender rather than destination
342 2003-04-25 Havoc Pennington <hp@redhat.com>
344 test suite is slightly hosed at the moment, will fix soon
346 * bus/connection.c (bus_connections_expire_incomplete): fix to
347 properly disable the timeout when required
348 (bus_connection_set_name): check whether we can remove incomplete
349 connections timeout after we complete each connection.
351 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
352 probably still broken.
354 * bus/services.c (bus_registry_acquire_service): implement max
355 number of services owned, and honor allow/deny rules on which
356 services a connection can own.
358 * bus/connection.c (bus_connection_get_policy): report errors here
360 * bus/activation.c: implement limit on number of pending
363 2003-04-25 Havoc Pennington <hp@redhat.com>
365 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
366 where we used >= 0 instead of != DBUS_UID_UNSET.
368 2003-04-25 Havoc Pennington <hp@redhat.com>
370 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
371 were toggled without add/remove, fix from Anders Gustafsson
373 2003-04-24 Havoc Pennington <hp@redhat.com>
375 * test/data/valid-config-files/basic.conf: add <limit> tags to
378 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
379 <limit> tag in configuration file.
381 2003-04-24 Havoc Pennington <hp@redhat.com>
383 * bus/dispatch.c: somehow missed some name_is
385 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
386 (_dbus_timeout_set_interval): new
388 * bus/connection.c (bus_connections_setup_connection): record time
389 when each connection is first set up, and expire them after the
392 2003-04-24 Havoc Pennington <hp@redhat.com>
394 * dbus/dbus-message.c (dbus_message_name_is): rename
395 (dbus_message_service_is): rename
396 (dbus_message_sender_is): rename
397 (dbus_message_get_service): rename
399 2003-04-24 Havoc Pennington <hp@redhat.com>
401 * configure.in: add --enable-checks
403 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
405 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
407 (_dbus_connection_handler_destroyed_locked): move some private
408 functions into proper docs group
410 * dbus/dbus-internals.h: add _dbus_return_if_fail,
411 _dbus_return_val_if_fail
413 Throughout: use dbus_return_if_fail
415 2003-04-23 James Willcox <jwillcox@gnome.org>
418 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
419 (dbus_connection_setup_with_g_main),
420 (dbus_server_setup_with_g_main):
421 * glib/test-dbus-glib.c: (main):
422 * glib/test-thread-client.c: (main):
423 * glib/test-thread-server.c: (new_connection_callback), (main):
424 * tools/dbus-monitor.c: (main):
426 Added a GMainContext argument to dbus_connection_setup_with_g_main()
427 and dbus_server_setup_with_g_main().
429 2003-04-20 Havoc Pennington <hp@pobox.com>
431 * doc/dbus-specification.sgml: document the restrictions on
432 message and service names
434 2003-04-22 Havoc Pennington <hp@redhat.com>
436 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
437 support, and do some code cleanups to share more code and
438 speed up array marshal/demarshal.
440 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
442 * configure.in: generate dbus-arch-deps.h
444 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
447 2003-04-22 Havoc Pennington <hp@redhat.com>
449 * test/data/valid-messages/opposite-endian.message: fix test
450 to use proper type for rply field
452 * test/data/invalid-messages: add tests for below validation
454 * dbus/dbus-message.c (decode_header_data): validate field types,
455 and validate that named fields are valid names
456 (decode_name_field): consider messages in the
457 org.freedesktop.Local. namespace to be invalid.
459 * dbus/dbus-string.c (_dbus_string_validate_name): new
461 2003-04-19 Havoc Pennington <hp@pobox.com>
463 * bus/driver.c (bus_driver_handle_hello): check limits and
464 return an error if they are exceeded.
466 * bus/connection.c: maintain separate lists of active and inactive
467 connections, and a count of each. Maintain count of completed
468 connections per user. Implement code to check connection limits.
470 * dbus/dbus-list.c (_dbus_list_unlink): export
472 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
473 number of bytes in the message queue for a connection
475 2003-04-18 Havoc Pennington <hp@pobox.com>
477 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
479 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
482 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
483 on realloc be sure to update the pointer in the keyring
485 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
486 offset to avoid writing to unallocated memory
488 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
489 try the next mechanism, so we properly handle OOM
491 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
493 (_dbus_keyring_new): fix OOM bug
494 (_dbus_keyring_new_homedir): always set error; impose a maximum
495 number of keys we'll load from the file, mostly to speed up the
496 test suite and make its OOM checks more useful, but also for
499 * dbus/dbus-auth.c (process_error_server): reject authentication
500 if we get an error from the client
501 (process_cancel): on cancel, send REJECTED, per the spec
502 (process_error_client): send CANCEL if we get an error from the
505 2003-04-18 Havoc Pennington <hp@pobox.com>
507 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
510 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
513 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
514 about DBUS_TEST_HOMEDIR once
516 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
519 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
520 config file so we test the right thing
522 Throughout: assorted docs improvements
524 2003-04-18 Havoc Pennington <hp@pobox.com>
526 * glib/dbus-gmain.c: adapt to watch changes
528 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
530 * dbus/dbus-server.h: remove dbus_server_handle_watch
532 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
534 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
535 like DBusTimeout, so we don't need dbus_connection_handle_watch
538 2003-04-17 Havoc Pennington <hp@redhat.com>
540 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
541 database usage so it all goes via the DBusUserDatabase cache.
543 2003-04-17 Havoc Pennington <hp@redhat.com>
545 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
546 there was an OOM watch we skipped, we always return TRUE so we
547 iterate again to have a look at it again. Fixes test suite hang.
548 Code rearrangement also lets us lose some memset and only iterate
551 * bus/driver.c (bus_driver_handle_message): sense of test for
554 2003-04-16 Havoc Pennington <hp@pobox.com>
556 * doc/dbus-specification.sgml: make spec say serials are unsigned
558 * dbus/dbus-message.h: change message serials to unsigned
560 * dbus/dbus-connection.c: adapt to message serials being unsigned
562 2003-04-15 Havoc Pennington <hp@pobox.com>
564 * bus/bus.c: create and keep around a shared DBusUserDatabase
567 * bus/connection.c (bus_connection_get_groups): don't cache
568 groups for user in the connection object, since user database
569 object now does that.
571 2003-04-16 Havoc Pennington <hp@redhat.com>
573 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
574 list of size counters
575 (_dbus_message_loader_putback_message_link): put back a popped link
577 * dbus/dbus-connection.c
578 (dbus_connection_set_max_live_messages_size): rename
580 (dbus_connection_get_outgoing_size): get size of outgoing
582 (_dbus_connection_set_connection_counter): remove this cruft
584 2003-04-14 Havoc Pennington <hp@redhat.com>
586 * dbus/dbus-userdb.c: user database abstraction, mostly to get
587 caching, but at some point we might want to be able to use a
590 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
591 SHA1 conf file to test the sha1 auth mechanism, since the regular
592 test always uses EXTERNAL when available.
595 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
596 add conf file that requires use of sha1 auth
598 2003-04-13 Havoc Pennington <hp@pobox.com>
600 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
601 from Philip Blundell to send messages and monitor them.
603 2003-04-13 Havoc Pennington <hp@pobox.com>
605 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
608 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
611 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
612 fix to only recover unused bytes if we're already authenticated
613 (_dbus_transport_get_is_authenticated): fix to still mark us
614 authenticated if there are unused bytes.
616 * bus/dispatch.c: implement security policy checking
618 * bus/connection.c (bus_transaction_send_from_driver): new
620 * bus/bus.c (bus_context_check_security_policy): new
622 * bus/dispatch.c (send_service_nonexistent_error): delete this,
623 now we just set the DBusError and it gets converted to an error
626 * bus/connection.c (allow_user_function): enable code using actual
627 data from the config file
629 * bus/policy.c (list_allows_user): handle wildcard rules for
630 user/group connection perms
632 2003-04-13 Havoc Pennington <hp@pobox.com>
634 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
636 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
638 * bus/policy.c (bus_policy_append_mandatory_rule)
639 (bus_policy_append_default_rule, bus_policy_append_user_rule)
640 (bus_policy_append_group_rule): new functions
642 2003-04-12 Havoc Pennington <hp@pobox.com>
644 * bus/config-parser.c (bus_config_parser_new): fix a memleak
646 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
647 the pid/gid/uid, just for paranoia.
649 * test/break-loader.c (randomly_do_n_things): find a byte
650 containing a type code, and randomly change it to a different
653 2003-04-12 Havoc Pennington <hp@pobox.com>
655 * bus/policy.h: change BusPolicy to be the thing from the config
656 file, and rename old BusPolicy to BusClientPolicy
658 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
659 match change in how policy works
661 * dbus/dbus-internals.h: mark assert_not_reached as
662 __attribute((noreturn))__
664 2003-04-11 Havoc Pennington <hp@redhat.com>
666 * doc/dbus-specification.sgml: fix a spot with the wrong name for
667 the broadcast service. Use boolean return for ServiceExists.
669 2003-04-11 Havoc Pennington <hp@redhat.com>
671 * configure.in: add another directory to look for qt in.
673 2003-04-11 Havoc Pennington <hp@redhat.com>
675 * AUTHORS: add Colin Walters
677 2003-04-11 Havoc Pennington <hp@redhat.com>
683 2003-04-11 Havoc Pennington <hp@redhat.com>
685 * bus/messagebus.in: remove pid file when stopping the
686 message bus, since the bus won't have privileges to remove it
689 2003-04-11 Havoc Pennington <hp@redhat.com>
691 * bus/bus.c (bus_context_new): move credentials change after
694 2003-04-11 Havoc Pennington <hp@pobox.com>
696 * test/decode-gcov.c: add "below average functions" to the
697 coverage report, and change how some of the code works.
699 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
700 not in the coverage stats.
702 * test/test-service.c (main): use _dbus_verbose not fprintf in a
703 couple places so running the test suite doesn't result in megaspam.
705 2003-04-11 Havoc Pennington <hp@pobox.com>
707 * bus/dispatch.c (check_existent_service_activation): accept a no
708 memory error in a place we didn't before
710 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
711 in case the first one failed," since the test suite is less
714 2003-04-10 Havoc Pennington <hp@pobox.com>
716 * bus/dispatch.c (check_segfault_service_activation): add test
717 for launching an executable that just crashes.
719 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
720 don't leave a million cores. We'll see how portable this is.
722 2003-04-10 Havoc Pennington <hp@pobox.com>
724 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
725 the possible parent failures before we fork, so that we don't
726 fail to create a babysitter after creating the child.
728 * bus/activation.c (bus_activation_activate_service): kill child
729 if we don't successfully complete the activation.
731 2003-04-10 Havoc Pennington <hp@redhat.com>
733 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
734 the connection if it's disconnected
736 * bus/activation.c (bus_activation_service_created): use new
737 transaction features to roll back removal of pending activation if
738 we don't successfully create the service after all. Don't remove
739 pending activation if the function fails.
741 * dbus/dbus-list.c (_dbus_list_insert_before_link)
742 (_dbus_list_insert_after_link): new code to facilitate
745 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
746 new functionality, so we can preallocate the ability to insert
749 * bus/connection.c (bus_transaction_add_cancel_hook): new function
750 allowing us to put custom hooks in a transaction to be used for
751 cancelling said transaction
753 * doc/dbus-specification.sgml: add some discussion of secondary
754 service owners, and disallow zero-length service names
756 * bus/services.c (bus_registry_acquire_service): new function,
757 splits out part of bus_driver_handle_acquire_service() and fixes
758 a bug where we didn't remove the service doing the acquiring
759 from the secondary queue if we failed to remove the current owner
760 from the front of the queue.
762 2003-04-10 Alexander Larsson <alexl@redhat.com>
764 * doc/dbus-specification.sgml:
765 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
767 2003-04-10 Alexander Larsson <alexl@redhat.com>
772 Added files to cvsignore
774 * dbus/dbus-message.h:
775 * dbus/dbus-message.c: (dbus_message_iter_get_named):
776 Make get_named() take two out argument and return a boolean.
777 (dbus_message_iter_get_args_valist):
778 Update usage of get_named().
779 (dbus_message_iter_append_byte):
781 (dbus_message_iter_append_named)
783 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
786 2003-04-10 Alexander Larsson <alexl@redhat.com>
788 * dbus/dbus-marshal.[ch]:
789 Add array_type_pos argument to _dbus_marshal_validate_arg.
790 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
792 * dbus/dbus-message.[ch]:
793 Multi-dimensional arrays have full type specification in the
794 outermost array. Iter code re-arranged to handle this.
795 Added some more iter tests.
797 * doc/dbus-specification.sgml:
800 Update new array encoding description.
801 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
803 * test/data/invalid-messages/array-with-mixed-types.message:
804 * test/data/valid-messages/array-of-array-of-uint32.message:
805 Change to the new array format.
807 * test/data/invalid-messages/too-short-dict.message:
810 * test/data/valid-messages/recursive-types.message:
811 Fix up and extend test.
813 2003-04-10 Havoc Pennington <hp@pobox.com>
815 * bus/dispatch.c: lots of fixes
817 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
818 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
819 that was crack, broke the test service.
821 * dbus/dbus-transport.c (_dbus_transport_open): fix error
822 handling to avoid piling up errors if we get a failure on the
825 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
826 pid in assertion failures.
828 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
829 to some fixed size of file descriptor array. Don't return TRUE
830 anytime a timeout exists, that led to lots of busy loop silliness
833 2003-04-09 Havoc Pennington <hp@redhat.com>
835 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
836 I'd checked this in earlier but hadn't.
838 2003-04-09 Havoc Pennington <hp@redhat.com>
840 * bus/dispatch.c (bus_dispatch_test): get a bit further through
841 the activation test (man this is getting old!)
843 2003-04-09 Havoc Pennington <hp@redhat.com>
845 * test/test-utils.c: use dispatch status function to fix this up
847 * bus/connection.c (connection_watch_callback): don't dispatch
849 (connection_timeout_callback): don't dispatch from here
850 (bus_connections_setup_connection): set the dispatch status function
851 (bus_connection_disconnected): unset it
853 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
854 used to add a connection to be dispatched
855 (_dbus_loop_iterate): do the dispatching at the end of each
858 * dbus/dbus-connection.c
859 (dbus_connection_set_dispatch_status_function): new function
860 allowing us to fix up main loop usage
861 (_dbus_connection_last_unref): free all the various function
863 (dbus_connection_dispatch): call the DispatchStatusFunction
864 whenever this function returns
865 (dbus_connection_handle_watch): call DispatchStatusFunction
866 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
867 (reply_handler_timeout): call DispatchStatusFunction
868 (dbus_connection_flush): call DispatchStatusFunction
870 2003-04-09 Havoc Pennington <hp@redhat.com>
872 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
875 * bus/dispatch.c (check_service_activated): fix bug in test
877 * dbus/dbus-mainloop.c (check_timeout): fix this up
879 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
880 verbose output so we can sort out output from different processes,
881 e.g. in the activation case.
883 2003-04-08 Colin Walters <walters@gnu.org>
885 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
887 (bus_context_new): Set it.
888 (bus_context_unref): Use it to delete the pid file.
890 2003-04-08 Havoc Pennington <hp@redhat.com>
892 * test/data/invalid-messages/array-with-mixed-types.message:
893 regression test that fails for the moment
895 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
896 tests for convenience
898 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
899 array of nil, it broke things.
901 * test/data/invalid-messages/array-of-nil.message: regression test
903 * test/data/valid-messages/array-of-array-of-uint32.message:
904 happened to write this so added it to suite
906 2003-04-08 Havoc Pennington <hp@redhat.com>
908 * bus/driver.c (bus_driver_handle_acquire_service): init
909 retval/reply before checking name
911 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
912 recursion depth argument
914 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
915 in the public struct for future extension
917 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
920 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
923 * doc/dbus-specification.sgml: fix typo
925 2003-04-08 Alexander Larsson <alexl@redhat.com>
927 Implemented recursive types, named types and new-style iters
930 * glib/test-thread-client.c: (thread_func):
931 * glib/test-thread-server.c: (handle_test_message):
932 * test/test-service.c: (handle_echo):
941 * dbus/dbus-internals.c: (_dbus_type_to_string):
942 Update for new types.
944 * dbus/dbus-marshal.[ch]:
945 Implement recursive types and the new marshalling format.
946 Remove hardcoded dict marshalling.
949 * dbus/dbus-message-builder.c:
951 Remove references to old types
953 * dbus/dbus-message.[ch]:
954 New non-refcounted iter API that supports recursive iters.
955 Use iters for appending, including support for recursive
957 Add byte and named type support.
958 Update everything to new marshalling formats.
959 Add tests for new API.
961 * dbus/dbus-protocol.h:
962 Remove old array types.
963 Add types: BYTE, ARRAY, DICT, NAMED
965 * dbus/dbus-string.c:
966 * dbus/dbus-sysdeps.c:
967 Make parse_double locale safe.
969 * dbus/dbus-test-main.c:
975 * doc/dbus-specification.sgml:
978 * test/data/incomplete-messages/missing-body.message:
979 * test/data/invalid-messages/bad-boolean.message:
980 * test/data/invalid-messages/bad-boolean-array.message:
981 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
982 * test/data/invalid-messages/boolean-has-no-value.message-raw:
983 * test/data/invalid-messages/too-short-dict.message:
984 * test/data/valid-messages/dict-simple.message:
985 * test/data/valid-messages/dict.message:
986 * test/data/valid-messages/emptiness.message:
987 * test/data/valid-messages/lots-of-arguments.message:
988 * test/data/valid-messages/no-padding.message:
989 * test/data/valid-messages/recursive-types.message:
990 Add missing NAME fields
991 Fix up dicts & arrays
993 * test/data/invalid-messages/dict-with-nil-value.message:
994 Removed, this is not invalid anymore.
996 * test/data/valid-messages/recursive-types.message:
997 Add new test for deeply recursive types.
999 2003-04-07 Havoc Pennington <hp@pobox.com>
1001 * bus/driver.c (bus_driver_handle_acquire_service): return an
1002 error if you try to acquire a service that starts with ':'
1004 2003-04-07 Havoc Pennington <hp@redhat.com>
1006 * doc/dbus-specification.sgml: require that base service names
1007 start with ':' and that the base service is created/deleted
1008 as first and last things a connection does on the bus
1010 * bus/dispatch.c (check_existent_service_activation): lots more
1011 work on the activation test; it doesn't fully pass yet...
1013 * test/test-service.c (main): fix so we don't memleak the
1014 connection to the message bus
1015 (filter_func): accept a message asking us to exit
1017 2003-04-06 Havoc Pennington <hp@pobox.com>
1019 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
1022 * configure.in: fixes to Qt detection from Colin Walters
1024 * doc/Makefile.am: Only remove generated docbook dirs if they
1025 exist, from Colin Walters
1027 * dbus/dbus-bus.c: change how we set well-known connections to
1028 NULL, so that it works if a single connection is stored in
1029 two well-known array slots.
1031 * test/Makefile.am: remove a lot of stuff that isn't immediately
1032 useful, it's in CVS history if we want it.
1034 * test/test-service.c: use dbus-mainloop instead of that
1037 2003-04-06 Havoc Pennington <hp@pobox.com>
1039 * dbus/Makefile.am: split lists of sources into stuff that goes in
1040 the library, util functions that go in the lib and are also used
1041 elsewhere, and util functions that are used in tests/daemon but
1042 don't go in the lib.
1044 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
1045 here so it can be used in test binaries also
1047 2003-04-06 Havoc Pennington <hp@pobox.com>
1049 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
1050 here in the parent process, so we can return an error if it
1051 fails. Also, move some of the code into the child so the parent
1052 is less hosed if we fail midway through.
1054 * bus/bus.c (bus_context_new): move pidfile detection further up
1055 in the function, before we start overwriting sockets and such.
1057 * bus/messagebus.in: adjust this a bit, not sure if it will work.
1059 * configure.in: add --with-system-pid-file and --with-system-socket
1061 2003-04-06 Colin Walters <walters@verbum.org>
1063 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
1065 * bus/system.conf.in: Declare a pidfile.
1067 * bus/bus.c (bus_context_new): Test for an existing pid file, and
1068 create one (if appropriate).
1070 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
1071 (struct BusConfigParser) [pidfile]: New.
1072 (element_type_to_name, merge_included, start_busconfig_child)
1073 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
1074 (bus_config_parser_unref): Free it.
1075 (bus_config_parser_get_pidfile): New function.
1077 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
1079 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
1081 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
1083 * dbus/dbus-sysdeps.h: Prototype it.
1085 2003-04-06 Havoc Pennington <hp@pobox.com>
1087 * bus/bus.c (bus_context_new): print the address in here, rather
1088 than in main(), because we need to do it before forking the daemon
1090 * bus/dispatch.c (send_service_nonexistent_error): set the sender
1091 on the service nonexistent error
1093 * bus/driver.c (bus_driver_handle_acquire_service): set the
1094 sender on the AcquireService reply
1096 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
1097 server also listen on a UNIX socket so services can connect to it.
1099 2003-04-06 Havoc Pennington <hp@pobox.com>
1101 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
1102 so it detects deadlocks and also we actually init threads when
1105 2003-04-06 Havoc Pennington <hp@pobox.com>
1107 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1108 save the domain socket name, and unlink it when we disconnect the
1109 server. Means that at least when we exit normally, we won't leave
1110 a bunch of junk in /tmp
1112 * dbus/dbus-transport-unix.c
1113 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
1114 memory management). (I was making a real change here but then
1117 2003-04-06 Havoc Pennington <hp@pobox.com>
1119 * bus/bus.c (bus_context_new): fix wrong handling of
1120 server_data_slot_unref() in the error case.
1122 * dbus/dbus-internals.h (_dbus_assert): change so it passes
1123 "(condition) != 0" to _dbus_real_assert so that
1124 "_dbus_assert (pointer)" doesn't cause a warning
1126 * bus/main.c (main): accept --print-address option to print out
1127 the message bus address
1129 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
1131 * dbus/dbus-transport.c (_dbus_transport_open): special error for
1132 "tmpdir" option to unix: address on client side
1134 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
1137 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
1138 we can use to create sockets in the test suite.
1140 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
1141 cleanly. To be used for testing.
1143 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
1145 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
1147 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1148 handle trying to call this when there's no servers active
1150 2003-04-05 Havoc Pennington <hp@pobox.com>
1156 2003-04-05 Havoc Pennington <hp@pobox.com>
1158 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
1159 crash on startup. Need to get "try starting the daemon"
1160 in the test suite I guess. ;-)
1162 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
1163 tracked the number of open connections; it's better done in
1164 application-specific code as you want it to span all servers etc.
1166 2003-04-05 Havoc Pennington <hp@pobox.com>
1168 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
1169 patch from Colin Walters
1171 2003-04-05 Havoc Pennington <hp@pobox.com>
1173 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
1174 reality; in fact multiple mechanisms are allowed.
1176 * dbus/dbus-internals.c (_dbus_real_assert)
1177 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
1178 _dbus_assert_not_reached() into functions, so that they don't show
1179 up in basic block counts for test coverage, and don't use up as
1180 much disk space. Does mean slower execution speed though, so
1181 assumes --disable-asserts is the normal production case.
1183 2003-04-05 Havoc Pennington <hp@pobox.com>
1185 * test/Makefile.am (dist-hook): also dist *.in files
1191 2003-04-05 Havoc Pennington <hp@pobox.com>
1193 * dbus/dbus-string.c: docs warning
1195 * dbus/dbus-spawn.c: missing docs
1197 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
1199 2003-04-05 Havoc Pennington <hp@pobox.com>
1201 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
1204 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
1205 to -1 once we've reaped the babysitter
1206 (_dbus_babysitter_handle_watch): do as much work as we can, not
1209 * bus/activation.c: add code using DBusBabysitter so that we
1210 handle it when a service fails to start up properly.
1211 (bus_activation_service_created): don't remove the activation
1212 entries as we go, just let them get removed when we free the pending
1213 activation. Unref reply messages after sending them.
1215 2003-04-05 Havoc Pennington <hp@pobox.com>
1217 * test/decode-gcov.c (main): print per-directory stats in the report
1219 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
1221 2003-04-05 Havoc Pennington <hp@pobox.com>
1223 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
1225 * test/decode-gcov.c: hack up a little program to suck data
1226 out of gcov files. Yes this is sort of silly.
1228 * configure.in: define something in config.h and do an
1229 AM_CONDITIONAL when gcov is enabled
1231 2003-04-04 Havoc Pennington <hp@redhat.com>
1233 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
1234 return a "babysitter" object that is used to monitor the status of
1235 the spawned process and reap it when required.
1237 * test/test-segfault.c, test/test-exit.c,
1238 test/test-sleep-forever.c: binaries that do various lame things,
1239 used in the test suite.
1241 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
1243 2003-04-03 Havoc Pennington <hp@pobox.com>
1245 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
1246 in preparation for modifying it, dbus-sysdeps is getting
1249 2003-04-03 Havoc Pennington <hp@redhat.com>
1251 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1254 * bus/*.[hc]: adapt to mainloop change
1256 2003-04-03 Havoc Pennington <hp@redhat.com>
1258 * bus/activation.c (load_directory): fix up memleaks
1259 (bus_activation_entry_free): free the entry
1261 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1262 we get one from the message bus; fix memleaks.
1264 * dbus/dbus-message.c (dbus_set_error_from_message): new function
1266 2003-04-03 Havoc Pennington <hp@pobox.com>
1268 * bus/config-parser.c (bus_config_parser_unref): free
1269 list of mechanisms, bug discovered by test suite enhancements
1270 (putting system.conf and session.conf into suite)
1272 * test/Makefile.am, test/test-service.c: add placeholder for a
1273 test service that we'll activate as part of test suite. Doesn't
1276 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
1277 setting NULL value, and use system malloc not dbus_malloc()
1278 when we have unavoidable memleakage.
1280 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1281 didn't work, and support DBUS_BUS_ACTIVATION.
1283 * bus/activation.c (child_setup): pass our well-known bus type to
1286 * bus/config-parser.c: support <type> to specify well-known type
1288 * doc/dbus-specification.sgml: document the env variables to
1289 locate well-known buses and find service activator
1291 2003-04-02 Havoc Pennington <hp@redhat.com>
1293 * test/Makefile.am (all-local): add a rule to copy tests to
1294 builddir, so we can have generated tests. Use this to remove the
1295 silly hack for testing system.conf and session.conf. Will use this
1296 shortly to generate .service files pointing to test binaries.
1298 2003-04-02 Havoc Pennington <hp@redhat.com>
1300 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1301 current alloc and needed new length, not max of the doubled
1302 allocation and needed new length. Also, when building tests,
1303 don't do the double-allocation stuff, just realloc every time.
1305 2003-04-02 Havoc Pennington <hp@redhat.com>
1307 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1309 (_dbus_string_get_dirname): new
1310 (_dbus_sysdeps_test): new
1311 (_dbus_directory_open): include dirnames in error messages
1313 * bus/config-parser.c: interpret <include> and <includedir> and
1314 <servicedir> relative to config file location if the given
1315 filename is not absolute.
1317 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1319 2003-04-02 Havoc Pennington <hp@redhat.com>
1321 * bus/connection.c (bus_transaction_send_error_reply): set sender
1322 service for the error, and unref the reply on success
1324 * bus/activation.c: convert to use BusTransaction so OOM can be
1326 (bus_activation_service_created): set sender of the message
1328 2003-04-01 Havoc Pennington <hp@redhat.com>
1330 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1331 <includedir> (at least mostly)
1333 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1334 first, then the user ID
1336 2003-04-01 Havoc Pennington <hp@pobox.com>
1338 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1341 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1343 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1345 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1346 socket 0777, and unlink any existing socket.
1348 * bus/bus.c (bus_context_new): change our UID/GID and fork if
1349 the configuration file so specifies; set up auth mechanism
1352 * bus/config-parser.c (bus_config_parser_content): add support
1353 for <fork> option and fill in code for <auth>
1355 * bus/system.conf.in: add <fork/> to default configuration,
1356 and limit auth mechanisms to EXTERNAL
1358 * doc/config-file.txt (Elements): add <fork>
1360 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1361 (_dbus_change_identity): new function
1363 2003-03-31 Havoc Pennington <hp@redhat.com>
1365 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
1366 (_dbus_listen_unix_socket): fix off-by-one error in null
1367 termination spotted by Nalin
1369 2003-03-31 Havoc Pennington <hp@redhat.com>
1371 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1372 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1373 having a real home directory available.
1375 2003-03-31 Havoc Pennington <hp@redhat.com>
1377 * bus/Makefile.am (install-data-hook): create /var/run/dbus
1379 * bus/messagebus.in: add init script for Red Hat /etc/init.d
1381 * configure.in: add support for specifying a style of init script
1384 2003-03-31 Havoc Pennington <hp@redhat.com>
1386 Fix some annoying DBusString API and fix all affected code.
1388 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1390 (_dbus_string_get_data): change to return string instead of using
1392 (_dbus_string_get_const_data): ditto
1393 (_dbus_string_get_data_len): ditto
1394 (_dbus_string_get_const_data_len): ditto
1396 2003-03-31 Havoc Pennington <hp@redhat.com>
1398 * bus/main.c (main): fix up the command line arguments to be nicer
1400 2003-03-31 Havoc Pennington <hp@redhat.com>
1402 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1403 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
1404 final location that lands in the config file
1406 * bus/config-loader-expat.c (bus_config_load): fix type of
1409 * doc/TODO: remove TODO item for dbus_bus_get()
1411 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1413 2003-03-31 Havoc Pennington <hp@pobox.com>
1415 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1416 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1417 argument since they are always client side
1419 * dbus/dbus-server.c (dbus_server_get_address): new function
1421 * bus/main.c (main): take the configuration file as an argument.
1423 * test/data/valid-config-files/debug-allow-all.conf: new file to
1424 use with dispatch.c tests for example
1426 * bus/test-main.c (main): require test data dir
1428 * bus/bus.c (bus_context_new): change this to take a
1429 configuration file name as argument
1431 * doc/config-file.txt (Elements): add <servicedir>
1433 * bus/system.conf, bus/session.conf: new files
1435 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1436 well-known socket if none set
1438 * configure.in: create system.conf and session.conf
1440 2003-03-30 Havoc Pennington <hp@pobox.com>
1442 * bus/config-parser.c: hacking
1444 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
1445 to shut down, since it could cause weirdness with the DBusList
1448 * dbus/dbus-list.c (_dbus_list_test): add tests for the
1449 link-oriented stack routines
1450 (alloc_link): free the mempool if the first alloc from it fails
1452 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1454 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1456 (_dbus_string_skip_white): new
1458 * doc/config-file.txt (Elements): add <includedir>
1460 2003-03-28 Havoc Pennington <hp@pobox.com>
1462 * dbus/dbus-string.c (_dbus_string_copy_data_len)
1463 (_dbus_string_copy_data): new functions
1465 2003-03-28 Anders Carlsson <andersca@codefactory.se>
1467 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1471 * dbus/dbus-memory.c:
1474 2003-03-28 Havoc Pennington <hp@pobox.com>
1476 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
1477 I think it may have just been superstition. Not sure.
1479 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1480 failures that were not being handled.
1482 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1484 * dbus/dbus-memory.c: add ability to set number of mallocs in a
1485 row that will fail on out-of-memory.
1487 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1488 function for testing out-of-memory handling.
1490 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1491 allocation functions, they do map exactly to the expat ones.
1493 2003-03-27 Havoc Pennington <hp@redhat.com>
1495 * bus/config-loader-libxml.c (bus_config_load): add another error
1498 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1501 Add note about automatic service activation.
1503 * doc/dbus-specification.sgml:
1504 Rename the specification and clarify a few things.
1506 2003-03-26 Anders Carlsson <andersca@codefactory.se>
1509 * dbus/dbus-address.c:
1511 * dbus/dbus-marshal.c:
1512 * dbus/dbus-server-debug-pipe.c:
1513 * dbus/dbus-transport-unix.c:
1514 Fix documentation warnings.
1516 2003-03-26 Havoc Pennington <hp@pobox.com>
1518 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1519 after every test so it's quick and easy to see which leaked, and
1520 so we test multiple dbus_shutdown() calls
1522 * configure.in: change configure.in XML stuff to also support
1525 * config-loader-libxml.c: some hacking
1527 * config-loader-expat.c: some hacking
1529 * config-parser.c: some hacking, plus tests
1531 2003-03-25 Havoc Pennington <hp@redhat.com>
1533 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1535 * configure.in: add --with-xml option to specify XML library,
1536 right now only libxml is supported.
1538 * bus/config-loader-libxml.c, config-parser.c: sync some minor
1539 nonworking code between home and work, still just stubs
1541 2003-03-24 Havoc Pennington <hp@redhat.com>
1543 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1546 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
1547 NULL argument for "message" if the error is a well-known one,
1548 fill in a generic message in this case.
1550 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1553 * bus/test.c (bus_test_flush_bus): add
1555 * bus/policy.c (bus_policy_test): test code stub
1557 2003-03-24 Havoc Pennington <hp@pobox.com>
1559 * bus/connection.c (bus_connections_setup_connection): set up
1560 the "can this user connect" function, but it always returns
1561 TRUE until we have a config file parser so we can have a config
1562 file that allows connections.
1564 2003-03-23 Havoc Pennington <hp@pobox.com>
1566 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
1567 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
1568 the mutex, so we can check for proper memory management
1571 * dbus/dbus-dataslot.c: remove the mutex from
1572 DBusDataSlotAllocator and lock it manually when using it,
1573 to simplify fitting it into the global slots framework.
1575 * dbus/dbus-threads.c (init_static_locks): rework how we're
1576 handling global locks so they are easily shut down.
1578 * bus/policy.c (bus_policy_append_rule): fix
1580 * bus/test-main.c (main): check for memleaks
1582 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
1583 test suite check for memleaks
1585 * dbus/dbus-memory.c: add support in test mode for tracking
1586 number of outstanding blocks
1588 2003-03-23 Havoc Pennington <hp@pobox.com>
1590 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1593 * dbus/dbus-hash.h: add ULONG hash keys
1595 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1596 (_dbus_get_group_id): new function
1598 2003-03-20 Havoc Pennington <hp@redhat.com>
1600 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1602 (dbus_connection_get_unix_user): new function
1604 2003-03-20 Havoc Pennington <hp@pobox.com>
1606 * bus/connection.c (bus_connection_send_oom_error): assert that
1607 message has a sender
1608 (connection_execute_transaction): ditto
1609 (bus_connection_preallocate_oom_error): fix to set the sender, and
1610 set recipient to the destination service, not the bus driver
1612 * bus/policy.c: hacking
1614 * dbus/dbus-message.c (dbus_message_service_is): new function
1615 (dbus_message_sender_is): new
1617 2003-03-19 Havoc Pennington <hp@redhat.com>
1619 * bus/policy.c: start sketching code for policy restrictions on
1620 what connections can do.
1622 2003-03-18 Havoc Pennington <hp@redhat.com>
1624 * doc/TODO: some notes on high-level todo items. Little nitpick
1625 stuff is all in @todo, so no need to add it here.
1627 * doc/config-file.txt: some notes on how config file might look
1629 2003-03-18 Anders Carlsson <andersca@codefactory.se>
1635 2003-03-17 Havoc Pennington <hp@redhat.com>
1637 * dbus/dbus-internals.h: add gcc attributes so that
1638 our printf-style functions warn on bad arguments to
1641 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
1644 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1647 2003-03-17 Havoc Pennington <hp@redhat.com>
1649 * bus/test-main.c (main): make it print something as it runs
1650 so make check doesn't look stuck
1652 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
1653 from CVS, now obsolete
1655 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1657 * bus/dispatch.c: (bus_dispatch):
1658 Refetch the service name since it may have been reallocated
1659 when dbus_message_set_sender was called.
1661 * dbus/dbus-sysdeps.c: (_dbus_accept):
1662 Add address and address length variables and use them to stop
1663 valgrind from complaining.
1665 2003-03-17 Havoc Pennington <hp@pobox.com>
1667 All tests pass, no memleaks, no valgrind complaints.
1669 * bus/test.c: refcount handler_slot
1671 * bus/connection.c (bus_connections_new): refcount
1672 connection_data_slot
1674 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1675 bytes so that auth scripts pass.
1677 * bus/dispatch.c: init message_handler_slot so it gets allocated
1680 * bus/dispatch.c (message_handler_slot_ref): fix memleak
1682 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1683 dealloc server_pipe_hash when no longer used for benefit of
1686 * dbus/dbus-auth.c (process_command): memleak fix
1688 * bus/dispatch.c (check_hello_message): memleak fix
1690 2003-03-16 Havoc Pennington <hp@pobox.com>
1692 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1694 2003-03-17 Anders Carlsson <andersca@codefactory.se>
1696 * bus/activation.c (bus_activation_activate_service): Append
1697 the pending activation entry to the list of pending activations.
1699 2003-03-16 Havoc Pennington <hp@pobox.com>
1701 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1704 * dbus/dbus-address.c (create_entry): fix OOM handling when
1705 failing to alloc entry->method
1707 2003-03-16 Havoc Pennington <hp@pobox.com>
1709 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1712 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1713 add some missing dbus_set_result
1715 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
1716 alloc the DBusMessageHandler
1718 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1719 the transport here, since we call this from the finalizer; it
1720 resulted in a double-finalize.
1722 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
1723 where we tried to use transport->connection that was NULL,
1724 happened when transport was disconnected early on due to OOM
1726 * bus/*.c: adapt to handle OOM for watches/timeouts
1728 * dbus/dbus-transport-unix.c: port to handle OOM during
1731 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1732 reference to unused bytes instead of a copy
1734 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1737 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1740 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1743 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1745 * doc/dbus-specification.sgml:
1746 Document reply message for ActivateService.
1748 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1750 * bus/activation.c: (bus_pending_activation_entry_free),
1751 (bus_pending_activation_free), (bus_activation_new),
1752 (bus_activation_unref), (bus_activation_service_created),
1753 (bus_activation_activate_service):
1755 * bus/bus.c: (bus_context_new):
1756 * bus/desktop-file.c: (new_section):
1757 * bus/driver.c: (bus_driver_send_service_deleted),
1758 (bus_driver_handle_activate_service):
1759 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1761 * dbus/dbus-connection.c:
1762 (dbus_connection_send_with_reply_and_block):
1763 * dbus/dbus-message.c: (dbus_message_append_args_valist):
1764 * dbus/dbus-protocol.h:
1765 Make activation work better. Now pending activations will be queued
1766 and the daemon won't try to activate services that are already registered.
1768 2003-03-16 Havoc Pennington <hp@pobox.com>
1770 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1773 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1774 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1776 2003-03-16 Havoc Pennington <hp@pobox.com>
1778 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1779 this. always run the test suite before commit...
1781 * bus/*: adapt to DBusConnection API changes
1783 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
1784 requires renaming stuff to avoid dbus_connection_dispatch name
1787 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1790 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1791 separate from _dbus_message_loader_return_buffer()
1793 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1794 this, because it's now always broken to use; the number of
1795 messages in queue vs. the number still buffered by the message
1796 loader is undefined/meaningless. Should use
1797 dbus_connection_get_dispatch_state().
1798 (dbus_connection_dispatch): rename from
1799 dbus_connection_dispatch_message
1801 2003-03-16 Havoc Pennington <hp@pobox.com>
1803 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1806 2003-03-16 Anders Carlsson <andersca@codefactory.se>
1808 * dbus/dbus-connection.c:
1809 (dbus_connection_send_with_reply_and_block):
1810 Decrease connection->n_incoming when removing an entry
1812 * dbus/dbus-dict.c: (dbus_dict_entry_free),
1813 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1814 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1815 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1816 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1817 (dbus_dict_get_byte_array):
1818 Handle NULL arrays and strings. Also add support for byte arrays.
1820 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1821 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1822 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1823 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1824 (_dbus_demarshal_dict), (demarshal_and_validate_len),
1825 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1826 * dbus/dbus-marshal.h:
1827 Add support for marshalling and demarshalling empty arrays and strings.
1829 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1830 (dbus_message_append_string_array),
1831 (dbus_message_iter_get_boolean),
1832 (dbus_message_iter_get_boolean_array),
1833 (dbus_message_iter_get_int32_array),
1834 (dbus_message_iter_get_uint32_array),
1835 (dbus_message_iter_get_double_array),
1836 (dbus_message_iter_get_byte_array),
1837 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1838 (check_message_handling):
1839 Add support for getting empty arrays and dicts.
1841 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1842 Don't do any validation at all for now, that's better than just checking
1845 * test/data/valid-messages/emptiness.message:
1846 New test message with lots of empty arrays.
1848 2003-03-16 Havoc Pennington <hp@pobox.com>
1850 * dbus/dbus-connection.c
1851 (_dbus_connection_queue_received_message_link): new function that
1852 can't fail due to OOM
1854 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1855 new function pops a message together with a list link
1858 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1859 message queuing functions to avoid needing to alloc memory
1861 2003-03-16 Havoc Pennington <hp@pobox.com>
1863 Oops - test code was only testing failure of around 30 of the
1864 mallocs in the test path, but it turns out there are 500+
1865 mallocs. I believe this was due to misguided linking setup such
1866 that there was one copy of dbus_malloc etc. in the daemon and one
1867 in the shared lib, and only daemon mallocs were tested. In any
1868 case, the test case now tests all 500+ mallocs, and doesn't pass
1869 yet, though there are lots of fixes in this patch.
1871 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1872 this so that it doesn't need to allocate memory, since it
1873 has no way of indicating failure due to OOM (and would be
1874 annoying if it did).
1876 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1878 * bus/Makefile.am: rearrange to create two self-contained
1879 libraries, to avoid having libraries with overlapping symbols.
1880 that was resulting in weirdness, e.g. I'm pretty sure there
1881 were two copies of global static variables.
1883 * dbus/dbus-internals.c: move the malloc debug stuff to
1886 * dbus/dbus-list.c (free_link): free list mempool if it becomes
1889 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1891 * dbus/dbus-address.c (dbus_parse_address): free list nodes
1894 * bus/dispatch.c (bus_dispatch_add_connection): free
1895 message_handler_slot when no longer using it, so
1896 memory leak checkers are happy for the test suite.
1898 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1900 * bus/bus.c (new_connection_callback): disconnect in here if
1901 bus_connections_setup_connection fails.
1903 * bus/connection.c (bus_connections_unref): fix to free the
1905 (bus_connections_setup_connection): if this fails, don't
1906 disconnect the connection, just be sure there are no side
1909 * dbus/dbus-string.c (undo_alignment): unbreak this
1911 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1913 (_dbus_auth_new): fix the order in which we free strings
1916 * bus/connection.c (bus_connection_disconnected): fix to
1917 not send ServiceDeleted multiple times in case of memory
1920 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1921 get the base service name
1922 (dbus_bus_register_client): don't return base service name,
1923 instead store it on the DBusConnection and have an accessor
1925 (dbus_bus_register_client): rename dbus_bus_register()
1927 * bus/dispatch.c (check_hello_message): verify that other
1928 connections on the bus also got the correct results, not
1929 just the one sending hello
1931 2003-03-15 Havoc Pennington <hp@pobox.com>
1933 Make it pass the Hello handling test including all OOM codepaths.
1934 Now to do other messages...
1936 * bus/services.c (bus_service_remove_owner): fix crash when
1937 removing owner from an empty list of owners
1938 (bus_registry_ensure): don't leave service in the list of
1939 a connection's owned services if we fail to put the service
1942 * bus/connection.c (bus_connection_preallocate_oom_error): set
1943 error flag on the OOM error.
1945 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1946 handle _dbus_transport_set_connection failure
1948 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1949 to create watches up front and simply enable/disable them as
1951 (unix_connection_set): this can now fail on OOM
1953 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1954 of enabling/disabling a watch or timeout.
1956 * bus/loop.c (bus_loop_iterate): don't touch disabled
1959 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1961 2003-03-15 Havoc Pennington <hp@pobox.com>
1963 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1964 write useful test code, after all that futzing around ;-)
1966 Test does not yet pass because we can't handle OOM in
1967 _dbus_transport_messages_pending (basically,
1968 dbus_connection_preallocate_send() does not prealloc the write
1969 watch). To fix this, I think we need to add new stuff to
1970 set_watch_functions, namely a SetEnabled function so we can alloc
1971 the watch earlier, then enable it later.
1973 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1974 dbus-memory.c to the convenience lib
1976 * bus/test.c: rename some static functions to keep them clearly
1977 distinct from stuff in connection.c. Handle client disconnection.
1979 2003-03-14 Havoc Pennington <hp@pobox.com>
1981 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1982 transport, tests more of the real codepath. Set up clients
1983 with bus_setup_debug_client.
1985 * bus/test.c (bus_setup_debug_client): function to set up debug
1986 "clients" on the main loop
1988 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1991 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1994 * dbus/dbus-server-debug.c: support a debug server based on pipes
1996 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1997 (_dbus_close): new function
1999 * configure.in: check for socketpair
2001 2003-03-14 Havoc Pennington <hp@redhat.com>
2003 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
2006 * dbus/dbus-transport-debug.c: rework this a good bit to be
2007 less complicated. hopefully still works.
2009 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
2012 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
2015 * dbus/dbus-message.c (dbus_message_copy): rename from
2016 dbus_message_new_from_message, fix it up to copy
2017 all the message fields, add test case
2019 * bus/dispatch.c (bus_dispatch_test): add some more test code,
2020 not quite passing yet
2022 2003-03-14 Havoc Pennington <hp@pobox.com>
2024 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
2025 until no work remains" in test code. (the large diff here
2026 is just code movement, no actual changes)
2028 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
2029 1, no point waiting around for test code.
2030 (_dbus_server_debug_accept_transport): unref the timeout
2031 after adding it (right?)
2033 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
2035 2003-03-13 Havoc Pennington <hp@redhat.com>
2037 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
2040 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
2043 * dbus/dbus-connection.h: Make AddWatchFunction and
2044 AddTimeoutFunction return a bool so they can fail on out-of-memory
2046 * bus/bus.c (bus_context_new): set up timeout handlers
2048 * bus/connection.c (bus_connections_setup_connection): set up
2051 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
2054 * bus/bus.c (bus_context_new): adapt to changes
2056 * bus/connection.c: adapt to changes
2058 * test/watch.c: adapt to DBusWatch changes
2060 * bus/dispatch.c (bus_dispatch_test): started adding this but
2063 2003-03-14 Anders Carlsson <andersca@codefactory.se>
2065 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
2067 2003-03-13 Havoc Pennington <hp@pobox.com>
2069 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
2070 set up a test framework as for the library
2072 2003-03-12 Havoc Pennington <hp@pobox.com>
2074 Throughout: purge global variables, introduce BusActivation,
2075 BusConnections, BusRegistry, etc. objects instead.
2077 * bus/bus.h, bus/bus.c: introduce BusContext as a global
2080 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
2081 going to redo this a bit differently I think
2083 2003-03-12 Havoc Pennington <hp@redhat.com>
2085 Mega-patch that gets the message bus daemon initially handling
2086 out-of-memory. Work still needed. Also lots of random
2087 moving stuff to DBusError instead of ResultCode.
2089 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
2091 * dbus/dbus-connection.c
2092 (dbus_connection_send_with_reply_and_block): use DBusError
2094 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
2097 * dbus/dbus-connection.c (dbus_connection_send): drop the result
2098 code here, as the only failure possible is OOM.
2100 * bus/connection.c (bus_connection_disconnect):
2101 rename bus_connection_disconnected as it's a notification only
2103 * bus/driver.c (bus_driver_handle_acquire_service): don't free
2104 "name" on get_args failure, should be done by get_args;
2105 don't disconnect client for bad args, just return an error.
2106 (bus_driver_handle_service_exists): ditto
2108 * bus/services.c (bus_services_list): NULL-terminate returned array
2110 * bus/driver.c (bus_driver_send_service_lost)
2111 (bus_driver_send_service_acquired): send messages from driver to a
2112 specific client to the client's unique name, not to the broadcast
2115 * dbus/dbus-message.c (decode_header_data): reject messages that
2116 contain no name field
2117 (_dbus_message_get_client_serial): rename to
2118 dbus_message_get_serial and make public
2119 (_dbus_message_set_serial): rename from set_client_serial
2120 (_dbus_message_set_reply_serial): make public
2121 (_dbus_message_get_reply_serial): make public
2123 * bus/connection.c (bus_connection_foreach): allow stopping
2124 iteration by returning FALSE from foreach function.
2126 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
2127 (dbus_connection_free_preallocated_send)
2128 (dbus_connection_preallocate_send): new API for sending a message
2129 without possibility of malloc failure.
2130 (dbus_connection_send_message): rename to just
2131 dbus_connection_send (and same for whole function family)
2133 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
2135 * dbus/dbus-sysdeps.c (_dbus_exit): new function
2137 * bus/activation.c: handle/return errors
2139 * dbus/dbus-errors.h: add more DBUS_ERROR #define
2141 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
2142 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
2143 (_dbus_result_from_errno): move to this file
2145 2003-03-10 Anders Carlsson <andersca@codefactory.se>
2147 * dbus/dbus-marshal.c:
2148 (_dbus_marshal_set_string):
2149 Take a length argument so we can marshal the correct string
2152 (_dbus_marshal_dict), (_dbus_demarshal_dict),
2153 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
2154 (_dbus_marshal_test):
2155 * dbus/dbus-marshal.h:
2156 Add support for marshalling and demarshalling dicts.
2158 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2159 Add support for TYPE DICT.
2161 * dbus/dbus-message.c: (set_string_field):
2162 Adjust header padding.
2164 (dbus_message_append_args_valist), (dbus_message_append_dict),
2165 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
2166 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
2167 (check_message_handling), (check_have_valid_message):
2168 * dbus/dbus-message.h:
2169 Add functions for setting and getting dicts.
2171 * dbus/dbus-protocol.h:
2177 * doc/dbus-specification.sgml:
2178 Add information about how dicts are marshalled.
2180 * test/data/invalid-messages/dict-with-nil-value.message:
2181 * test/data/invalid-messages/too-short-dict.message:
2182 * test/data/valid-messages/dict-simple.message:
2183 * test/data/valid-messages/dict.message:
2184 Add sample messages containing dicts.
2186 2003-03-08 Anders Carlsson <andersca@codefactory.se>
2188 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
2190 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2193 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2194 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
2195 (dbus_dict_set_int32), (dbus_dict_set_uint32),
2196 (dbus_dict_set_double), (dbus_dict_set_string),
2197 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2198 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2199 (dbus_dict_set_string_array), (_dbus_dict_test):
2201 Fix according to comments from Havoc.
2203 2003-03-06 Michael Meeks <michael@server.home>
2205 * configure.in: if we don't have kde-config, disable have_qt.
2207 2003-03-07 Anders Carlsson <andersca@codefactory.se>
2212 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2213 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
2214 (dbus_dict_remove), (dbus_dict_get_value_type),
2215 (dbus_dict_get_keys), (dbus_dict_put_boolean),
2216 (dbus_dict_put_int32), (dbus_dict_put_uint32),
2217 (dbus_dict_put_double), (dbus_dict_put_string),
2218 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
2219 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
2220 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
2221 (dbus_dict_get_int32), (dbus_dict_get_uint32),
2222 (dbus_dict_get_double), (dbus_dict_get_string),
2223 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
2224 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
2225 (dbus_dict_get_string_array), (_dbus_dict_test):
2227 Add DBusDict implementation
2229 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
2233 2003-03-04 Havoc Pennington <hp@pobox.com>
2235 * test/data/auth/*: adapt to changes
2237 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
2238 USERID_BASE64 and change USERNAME_BASE64 to put in username not
2241 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
2242 more stuff from being in a context name, to make the protocol
2243 simpler to deal with
2245 * dbus/dbus-errors.c (dbus_error_has_name): new function
2246 (dbus_error_is_set): new function
2248 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
2249 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
2251 * dbus/dbus-connection.c (dbus_connection_flush): also read
2252 messages during a flush operation
2254 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2256 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2258 * configure.in: Check for gethostbyname on Solaris.
2260 * dbus/dbus-transport.c: (_dbus_transport_open):
2261 Remove duplicate "tcp" entry.
2263 * doc/dbus-specification.sgml:
2264 Clarify some things.
2266 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2268 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2269 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2270 (_dbus_keyring_test):
2271 * dbus/dbus-md5.c: (_dbus_md5_compute):
2272 * dbus/dbus-sha.c: (_dbus_sha_compute):
2275 2003-03-05 Anders Carlsson <andersca@codefactory.se>
2277 * README: Add some things.
2279 2003-03-04 Anders Carlsson <andersca@codefactory.se>
2281 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2282 after case DBUS_TYPE_BOOELAN.
2284 2003-03-02 Havoc Pennington <hp@pobox.com>
2286 * test/break-loader.c (randomly_set_extreme_ints): add test that
2287 sets really huge and small integers
2289 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2290 that length of boolean array fits in the string, and that
2291 string has room for boolean value in single-bool case.
2293 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2294 optional value to "ALIGN" command which is what to fill the
2297 * test/data/valid-messages/no-padding.message: add regression
2298 test for the message padding problem
2300 2003-03-02 Havoc Pennington <hp@pobox.com>
2302 * dbus/dbus-message.c (decode_header_data): fix to always init
2303 message_padding, from Benjamin Dauvergne
2305 2003-03-02 Havoc Pennington <hp@pobox.com>
2311 2003-03-01 Joe Shaw <joe@assbarn.com>
2313 * configure.in: Check for "struct cmsgcred" and try to access its
2314 members for BSD-like unices.
2316 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2317 _dbus_read_credentials_unix_socket().
2318 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2319 read() for reading the credential byte off the unix socket. Use
2320 struct cmsgcred on systems that support it.
2322 2003-02-27 Alexander Larsson <alexl@redhat.com>
2326 Make gthreads-2.0 dependency optional. Don't build thread test if
2329 2003-02-27 Havoc Pennington <hp@pobox.com>
2331 * dbus/dbus-connection.c
2332 (dbus_connection_send_message_with_reply_and_block): fix doh!
2333 doh! doh! bug that resulted in never removing a reply from the
2334 queue, no wonder we called get_reply_serial so much ;-)
2336 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2337 and client serial instead of demarshaling them every time
2339 2003-02-27 Havoc Pennington <hp@pobox.com>
2341 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2342 more inlined, using dbus-string-private.h, speeds things up
2345 * dbus/dbus-string.c (_dbus_string_free): apply align offset
2346 when freeing the string
2347 (_dbus_string_steal_data): fix for align offset
2348 (undo_alignment): new function
2350 2003-02-26 Havoc Pennington <hp@redhat.com>
2352 All kinds of audit fixes from Owen, plus initial attempt to
2353 handle unaligned memory returned from malloc.
2355 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
2356 leave room for align_offset and nul byte
2357 (fixup_alignment): function to track an align_offset and
2358 ensure real->str is aligned
2359 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
2360 to allow a nul byte plus align offset
2361 (_dbus_string_lock): fix overflow issue
2362 (_dbus_string_init_const_len): add assertions on sanity of len,
2363 assign allocated to be ALLOCATION_PADDING larger than len
2364 (set_length): fixup the overflow handling
2365 (_dbus_string_get_data_len): fix overflow in assertion
2366 (open_gap): detect overflow in size of gap to be opened
2367 (_dbus_string_lengthen): add overflow check
2368 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2369 (_dbus_string_append): add overflow check
2370 (_dbus_string_append_unichar): overflow
2371 (_dbus_string_delete): fix overflow in assertion
2372 (_dbus_string_copy_len): overflow in assertion
2373 (_dbus_string_replace_len): overflows in assertions
2374 (_dbus_string_find): change to implement in terms of
2375 _dbus_string_find_to
2376 (_dbus_string_find_to): assorted fixage
2377 (_dbus_string_equal_c_str): assert c_str != NULL,
2378 fix logic so the function works
2379 (_dbus_string_ends_with_c_str): fix overflow thingy
2380 (_dbus_string_base64_encode): overflow fix
2381 (_dbus_string_validate_ascii): overflow
2382 (_dbus_string_validate_nul): overflow
2384 2003-02-26 Havoc Pennington <hp@redhat.com>
2386 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2388 2003-02-26 Alexander Larsson <alexl@redhat.com>
2391 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2393 * dbus/dbus-connection.c:
2394 * dbus/dbus-connection.h:
2395 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2396 Add dbus_connection_set_wakeup_main_function and use it when queueing
2397 incoming and outgoing messages.
2400 * dbus/dbus-dataslot.c:
2401 Threadsafe usage of DBusDataSlotAllocator
2403 * dbus/dbus-message.c: (dbus_message_get_args_iter):
2406 * dbus/dbus-server-unix.c:
2409 * glib/dbus-gmain.c:
2410 Implement the new wakeup functions for glib.
2413 * glib/test-thread-client.c:
2414 * glib/test-thread-server.c:
2415 * glib/test-thread.h:
2416 Initial cut at some thread test code. Not really done yet.
2418 2003-02-26 Havoc Pennington <hp@pobox.com>
2420 * dbus/dbus-connection.c
2421 (dbus_connection_send_message_with_reply_and_block): fix crash
2422 where we ref'd the outgoing message instead of the returned reply
2424 * dbus/dbus-transport-unix.c (do_authentication): check read watch
2425 at the end of this function, so if we didn't need to read for
2426 authentication, we reinstall it for receiving messages
2428 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
2429 a NULL sender for peer-to-peer case
2431 * dbus/dbus-transport-unix.c (check_read_watch): handle
2432 !authenticated case correctly
2434 * glib/dbus-gmain.c: add support for DBusServer
2436 * dbus/dbus-server.c: add data slot support
2438 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2439 return values and handle errors
2441 * dbus/dbus-dataslot.c: factor out the data slot stuff from
2444 * Doxyfile.in (INPUT): add glib subdir
2446 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
2447 setup_with_g_main instead of hookup_with_g_main; write docs
2449 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2451 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2452 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2453 * dbus/dbus-message.c: (dbus_message_append_boolean),
2454 (dbus_message_append_boolean_array),
2455 (dbus_message_get_args_valist), (_dbus_message_test):
2456 * dbus/dbus-message.h:
2457 * doc/dbus-specification.sgml:
2458 Various fixes as pointed out by Havoc.
2460 * test/data/invalid-messages/bad-boolean-array.message:
2461 * test/data/invalid-messages/bad-boolean.message:
2462 Add invalid boolean value test cases.
2464 2003-02-24 Anders Carlsson <andersca@codefactory.se>
2466 * dbus/dbus-internals.c: (_dbus_type_to_string):
2467 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2468 (_dbus_marshal_validate_arg):
2469 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2470 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2471 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2472 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2473 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2474 (dbus_message_iter_get_double),
2475 (dbus_message_iter_get_boolean_array), (message_iter_test):
2476 * dbus/dbus-message.h:
2477 * dbus/dbus-protocol.h:
2478 * doc/dbus-specification.sgml:
2479 * test/data/valid-messages/lots-of-arguments.message:
2480 Add support for boolean and boolean array types.
2482 2003-02-23 Havoc Pennington <hp@pobox.com>
2484 * dbus/dbus-keyring.c: finish most of this implementation and
2487 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2488 these barf if the error isn't cleared to NULL
2490 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2491 (_dbus_create_directory): new function
2493 * dbus/dbus-errors.c (dbus_set_error): fix warning
2495 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2496 (_dbus_string_hex_decode): new function
2497 (test_hex_roundtrip): test code
2499 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2501 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2503 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
2504 the save-to-temp/rename trick to atomically write the new file
2505 (_dbus_string_parse_uint): new function
2507 2003-02-22 Havoc Pennington <hp@pobox.com>
2509 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2511 2003-02-22 Havoc Pennington <hp@pobox.com>
2513 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2514 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2516 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2518 * dbus/test/data/sha-1: add US government test suite for SHA-1
2520 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2522 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2523 Make string arrays NULL-terminated.
2525 * dbus/dbus-memory.c: (dbus_free_string_array):
2526 * dbus/dbus-memory.h:
2527 New function for freeing NULL-terminated string arrays.
2529 * dbus/dbus-message-builder.c: (append_quoted_string),
2530 (_dbus_message_data_load):
2531 Add support for array types.
2533 * dbus/dbus-message.c: (check_message_handling):
2534 Add more types as test cases.
2536 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2537 (_dbus_string_parse_double):
2538 Add the start offset to the end offset.
2540 * test/data/valid-messages/lots-of-arguments.message:
2541 New test message with lots of arguments.
2543 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2545 * dbus/dbus-message.c: (dbus_message_append_nil),
2546 (dbus_message_append_int32), (dbus_message_append_uint32),
2547 (dbus_message_append_double), (dbus_message_append_string),
2548 (dbus_message_append_int32_array),
2549 (dbus_message_append_uint32_array),
2550 (dbus_message_append_double_array),
2551 (dbus_message_append_byte_array),
2552 (dbus_message_append_string_array):
2553 Fix all out-of-memory handling in these functions.
2555 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2557 * dbus/dbus-message.c: (dbus_message_append_nil):
2560 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2562 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2563 (dbus_message_append_nil), (dbus_message_append_int32_array),
2564 (dbus_message_append_uint32_array),
2565 (dbus_message_append_double_array),
2566 (dbus_message_append_byte_array),
2567 (dbus_message_append_string_array), (dbus_message_get_args_valist),
2568 (dbus_message_iter_get_int32_array),
2569 (dbus_message_iter_get_uint32_array),
2570 (dbus_message_iter_get_double_array),
2571 (dbus_message_iter_get_byte_array),
2572 (dbus_message_iter_get_string_array):
2574 * dbus/dbus-message.h:
2575 Add functions for appending and getting arrays.
2577 2003-02-21 Anders Carlsson <andersca@codefactory.se>
2579 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2580 element size at least 8 bytes, fixes mempool tests on
2583 2003-02-20 Alexander Larsson <alexl@redhat.com>
2585 * dbus/dbus-transport-unix.c (unix_do_iteration):
2586 Unlock the connection mutex during a blocking select call.
2587 Add todo about how we need a way to wake up the select.
2589 * dbus/dbus-connection-internal.h:
2590 * dbus/dbus-connection.c:
2591 Add _dbus_connection_lock and _dbus_connection_unlock.
2593 2003-02-19 Havoc Pennington <hp@pobox.com>
2595 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2596 Doxyfile.in, not Doxyfile
2598 * dbus/dbus-keyring.c: do some hacking on this
2600 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2602 * dbus/dbus-errors.c (dbus_set_error_const): do not call
2604 (dbus_set_error): remove dbus_error_init, check for message ==
2605 NULL *before* we sprintf into it, and add @todo about including
2606 system headers in this file
2608 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2610 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2612 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2613 get various bits of user information based on either username
2615 (_dbus_homedir_from_username): new function
2617 2003-02-19 Anders Carlsson <andersca@codefactory.se>
2620 Add check for nonposix getpwnam_r
2622 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2623 Align the pool element size to a sizeof (void *) boundary.
2625 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2626 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2627 General Solaris fixes.
2629 * test/data/valid-messages/simplest-manual.message:
2630 Explicitly state that we want little-endian packing.
2632 2003-02-19 Mikael Hallendal <micke@codefactory.se>
2634 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2636 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
2637 Added to create a transport connecting using a tcp/ip socket.
2639 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2640 to a tcp socket at given host and port.
2641 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2644 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2646 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
2647 Added to create a server listening on a TCP/IP socket.
2649 2003-02-19 Havoc Pennington <hp@pobox.com>
2651 Throughout: mop up all the Doxygen warnings and undocumented
2654 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2655 to search any paths.
2657 * dbus/dbus-threads.c: move global mutex initializers to
2658 dbus-internals.h, multiple prototypes was confusing doxygen
2659 besides being kind of ugly
2661 * Doxyfile (PREDEFINED): have Doxygen define
2662 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
2663 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2664 (do not abuse the feature! it's for stuff like the autogenerated
2665 macros in dbus-md5.c, not just for things you don't feel like
2668 2003-02-18 Havoc Pennington <hp@pobox.com>
2670 * dbus/dbus-string.c (_dbus_string_zero): new function
2672 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2673 wrap it in some dbus-friendly API
2675 * dbus/dbus-types.h: add 16-bit types
2677 2003-02-18 Joe Shaw <joe@assbarn.com>
2679 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2680 credentials from our currently running process.
2681 (get_word): Fix a buglet where we were copying the entire length
2682 instead of relative to our position.
2684 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2685 keys on the stack... it's 640k of data.
2687 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2688 read the credentials byte off the socket, even if we don't have
2690 (_dbus_poll): Implement poll() using select() for systems which
2693 * glib/test-dbus-glib.c (main): Print out an error if no
2694 parameters are given.
2696 * test/data/auth/fallback.auth-script: Added. Tests that a client
2697 can fallback to a secondary auth mechanism if the first fails.
2699 2003-02-18 Havoc Pennington <hp@pobox.com>
2703 2003-02-17 Havoc Pennington <hp@pobox.com>
2705 * doc/dbus-specification.sgml: lots of cosmetic
2706 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2707 env variable to DBUS_BUS_ADDRESS, s/client/application/,
2708 s/server/bus/ (except in authentication section). Add a section
2709 "Message Bus Message Routing"
2711 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
2717 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2719 * doc/dbus-specification.sgml:
2720 Specification updates.
2722 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2724 * bus/activation.c: (bus_activation_init), (child_setup),
2725 (bus_activation_activate_service):
2727 * bus/main.c: (main):
2728 Set DBUS_ADDRESS environment variable.
2730 * dbus/dbus-errors.c: (dbus_set_error):
2731 Don't use va_copy since that's a C99 feature.
2733 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2734 (_dbus_spawn_async):
2735 * dbus/dbus-sysdeps.h:
2736 Add child_setup_func to _dbus_spawn_async.
2738 * doc/dbus-specification.sgml:
2739 Update specification.
2741 * test/spawn-test.c: (setup_func), (main):
2744 2003-02-17 Alexander Larsson <alexl@redhat.com>
2746 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2749 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2753 * doc/dbus-test-plan.sgml:
2754 Add test plan document.
2759 2003-02-17 Anders Carlsson <andersca@codefactory.se>
2761 * dbus/dbus-message.c: (decode_header_data),
2762 (_dbus_message_loader_return_buffer):
2763 Set the header padding amount when loading a message.
2765 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2767 * bus/dispatch.c: (send_one_message):
2768 Only send broadcast messages to registered connections.
2770 * dbus/dbus-message.c: (dbus_message_name_is):
2771 * dbus/dbus-message.h:
2772 New convenience function.
2774 * dbus/dbus-transport-debug.c: (do_reading):
2775 Only dispatch one message per run.
2778 * test/bus-test.c: (new_connection_callback), (die),
2779 (test_hello_client1_handler), (test_hello_client2_handler),
2780 (test_hello_replies), (main):
2782 * test/bus-test-loop.[ch]:
2785 2003-02-16 Havoc Pennington <hp@pobox.com>
2787 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2788 backward conditional
2790 2003-02-16 Alexander Larsson <alexl@redhat.com>
2792 * dbus/dbus-connection.c:
2793 Implement sent_message_with_reply. (with_reply_and block is still
2795 Made dispatch_message not lose message if OOM.
2797 * dbus/dbus-errors.h:
2798 Add NoReply error (for reply timeouts).
2800 2003-02-16 Alexander Larsson <alexl@redhat.com>
2802 * dbus/dbus-hash.c (_dbus_hash_table_unref):
2803 Actually free keys and values when destroying hashtable.
2805 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2807 * dbus/dbus-auth.c: (client_try_next_mechanism):
2810 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2811 Return TRUE if there's no thread implementation around.
2813 * glib/dbus-gmain.c: (free_source),
2814 (dbus_connection_hookup_with_g_main):
2815 Make sure to remove the GSource when the connection is finalized.
2817 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2819 * bus/dispatch.c: (bus_dispatch_message_handler):
2820 * dbus/dbus-errors.h:
2821 Return an error if someone tries to send a message to a service
2824 2003-02-16 Anders Carlsson <andersca@codefactory.se>
2826 * bus/activation.c: (load_directory), (bus_activation_init),
2827 (bus_activation_activate_service):
2830 (bus_driver_handle_activate_service), (bus_driver_handle_message):
2831 More work on the activation handling.
2833 * dbus/dbus-errors.h:
2834 Add some error messages
2836 * dbus/dbus-message.c: (dbus_message_new_error_reply):
2837 * dbus/dbus-message.h:
2838 New function that creates an error message.
2840 * dbus/dbus-protocol.h:
2841 Add ACTIVATE_SERVER message.
2843 * dbus/dbus-server-unix.c: (unix_handle_watch),
2844 (_dbus_server_new_for_domain_socket):
2845 Call _dbus_fd_set_close_on_exec.
2847 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2848 (_dbus_spawn_async), (_dbus_disable_sigpipe),
2849 (_dbus_fd_set_close_on_exec):
2850 * dbus/dbus-sysdeps.h:
2851 Add _dbus_fd_set_close_on exec function. Also add function that checks
2852 that all open fds are set to close-on-exec and warns otherwise.
2854 * dbus/dbus-transport-unix.c:
2855 (_dbus_transport_new_for_domain_socket):
2856 Call _dbus_fd_set_close_on_exec.
2858 2003-02-16 Havoc Pennington <hp@pobox.com>
2860 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2861 allow people to avoid setting SIGPIPE to SIG_IGN
2862 (_dbus_connection_new_for_transport): disable SIGPIPE unless
2863 we've been asked not to
2865 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2867 * dbus/dbus-list.c: (_dbus_list_append_link),
2868 (_dbus_list_prepend_link):
2869 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2873 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2876 * bus/activation.c: (bus_activation_entry_free),
2877 (add_desktop_file_entry), (load_directory), (bus_activation_init):
2879 * bus/main.c: (main):
2880 Add simple activation support, doesn't work yet though.
2882 2003-02-15 Zack Rusin <zack@kde.org>
2884 * qt/dbus-qthread.cpp: small casting fix
2886 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2888 * dbus/dbus-errors.c: (dbus_set_error):
2889 * dbus/dbus-errors.h:
2890 Add a few errors and make dbus_set_error void.
2892 * dbus/dbus-sysdeps.c:
2893 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2894 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2895 * dbus/dbus-sysdeps.h:
2896 Add _dbus_spawn_async.
2898 * test/spawn-test.c: (main):
2899 Test for _dbus_spawn_async.
2901 2003-02-15 Anders Carlsson <andersca@codefactory.se>
2903 * dbus/dbus-internals.h:
2904 Fix build without tests.
2906 * dbus/dbus-list.c: (alloc_link):
2907 Fix a segfault when a malloc fails.
2909 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2910 (dbus_malloc0), (dbus_realloc):
2911 Add support for malloc debugging.
2913 2003-02-15 Alexander Larsson <alexl@redhat.com>
2915 * dbus/dbus-threads.c:
2916 * dbus/dbus-threads.h:
2917 Add condvars. Remove static mutext from API.
2918 Implement static mutexes by initializing them from threads_init.
2920 * glib/dbus-gthread.c:
2921 * qt/dbus-qthread.cpp:
2922 Update with the thread api changes.
2927 Turn StaticMutex into normal mutex + init function.
2928 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2929 _dbus_list_append_link, _dbus_list_prepend_link
2932 * dbus/dbus-sysdeps.c:
2933 * dbus/dbus-sysdeps.h:
2934 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2935 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2937 * dbus/dbus-protocol.h:
2938 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2940 * dbus/dbus-message.c:
2941 Make ref/unref atomic.
2944 * dbus/dbus-connection-internal.h:
2945 * dbus/dbus-connection.c:
2946 * dbus/dbus-connection.h:
2948 Change _peek to _borrow,_return & _steal_borrowed.
2949 Change disconnect callback to event.
2950 Make dbus_connection_dispatch_messages reentrant.
2952 * dbus/dbus-transport.c:
2953 Don't ref the connection on calls to the transport
2956 * dbus/dbus-message-handler.c:
2959 * glib/dbus-gmain.c:
2960 Don't use peek_message anymore
2963 * test/debug-thread.c:
2964 * test/debug-thread.h:
2965 Simple thread implementation that asserts() on deadlocks in
2966 single-threaded code.
2969 (main) Call debug_threads_init.
2972 Use disconnect message instead of disconnect callback.
2976 Don't call dbus_connection_set_disconnect_function. Instead export
2977 bus_connection_disconnect.
2980 Call bus_connection_disconnect when we get a disconnected message.
2982 2003-02-15 Havoc Pennington <hp@pobox.com>
2984 * dbus/dbus-message.c (dbus_message_new): fool around with the
2987 2003-02-14 Havoc Pennington <hp@pobox.com>
2989 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2991 * dbus/dbus-memory.c: fail if the debug functions indicate we
2994 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2995 (_dbus_decrement_fail_alloc_counter): debug functions to
2996 simulate memory allocation failures
2998 2003-02-14 Havoc Pennington <hp@pobox.com>
3000 * dbus/dbus-errors.h (struct DBusError): add a word of padding
3003 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3005 * bus/driver.c: (bus_driver_handle_hello):
3007 * bus/services.c: (bus_service_lookup):
3008 Reorder message sending so we get a more sane order.
3010 * test/bus-test.c: (message_handler):
3013 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3015 * bus/driver.c: (bus_driver_send_service_deleted),
3016 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3017 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3018 (bus_driver_send_welcome_message),
3019 (bus_driver_handle_list_services),
3020 (bus_driver_handle_acquire_service),
3021 (bus_driver_handle_service_exists):
3022 * dbus/dbus-bus.c: (dbus_bus_register_client),
3023 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3024 * dbus/dbus-errors.c: (dbus_result_to_string):
3025 * dbus/dbus-errors.h:
3026 * dbus/dbus-message.c: (dbus_message_append_args),
3027 (dbus_message_append_args_valist), (dbus_message_get_args),
3028 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
3029 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
3030 (dbus_message_iter_get_byte_array),
3031 (dbus_message_iter_get_string_array), (message_iter_test),
3032 (check_message_handling), (_dbus_message_test):
3033 * dbus/dbus-message.h:
3034 * test/bus-test.c: (main):
3035 Change fields to arguments in messages, so that they won't be
3036 confused with header fields.
3038 * glib/test-dbus-glib.c: (main):
3039 Remove append_fields from hello message.
3041 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3043 * dbus/dbus-errors.c:
3044 * dbus/dbus-message.c:
3045 * dbus/dbus-string.c:
3046 Documentation fixes.
3048 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3050 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
3052 Implement support for timeouts in dbus-glib.
3054 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3056 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3057 * dbus/dbus-message.c: (process_test_subdir):
3058 * test/break-loader.c: (find_breaks_based_on):
3059 Plug some memory leaks.
3061 2003-02-13 Richard Hult <rhult@codefactory.se>
3063 * bus/main.c: Fix build.
3065 * dbus/dbus-errors.h:
3066 * dbus/dbus-errors.c: Fix copyright for Anders.
3068 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3073 * bus/connection.c: (bus_connection_foreach):
3076 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
3077 (unescape_string), (new_section), (parse_section_start),
3078 (parse_key_value), (report_error), (bus_desktop_file_load),
3079 (bus_desktop_file_get_string):
3080 * bus/desktop-file.h:
3081 Use DBusError for error reporting.
3083 * bus/dispatch.c: (send_one_message),
3084 (bus_dispatch_message_handler):
3085 * bus/driver.c: (bus_driver_send_service_deleted),
3086 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3087 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3088 (bus_driver_send_welcome_message),
3089 (bus_driver_handle_list_services),
3090 (bus_driver_handle_acquire_service),
3091 (bus_driver_handle_service_exists):
3092 * bus/loop.c: (bus_loop_run):
3094 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
3096 * bus/utils.c: (bus_wait_for_memory):
3098 New files with general utility functions.
3100 * dbus/dbus-internals.h:
3101 Remove _DBUS_HANDLE_OOM.
3103 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3105 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
3106 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
3107 * dbus/dbus-errors.h:
3108 Add DBusError structure.
3110 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3112 * test/data/valid-messages/standard-acquire-service.message:
3113 * test/data/valid-messages/standard-hello.message:
3114 * test/data/valid-messages/standard-list-services.message:
3115 * test/data/valid-messages/standard-service-exists.message:
3116 Add some standard messages.
3118 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3120 * bus/driver.c: (bus_driver_send_welcome_message),
3121 (bus_driver_handle_list_services),
3122 (bus_driver_handle_acquire_service),
3123 (bus_driver_handle_service_exists), (bus_driver_handle_message):
3124 Update for API changes in libdbus.
3126 * dbus/dbus-message.c: (dbus_message_new_reply):
3127 * dbus/dbus-message.h:
3128 Remove the name argument. The spec states that replies shouldn't
3131 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3133 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
3134 (report_error), (bus_desktop_file_load), (lookup_section),
3135 (lookup_line), (bus_desktop_file_get_raw),
3136 (bus_desktop_file_get_string):
3137 * bus/desktop-file.h:
3138 Some fixes, and new functions for getting a key value from a section.
3140 2003-02-13 Havoc Pennington <hp@pobox.com>
3142 * test/data/auth/fail-after-n-attempts.auth-script: new test
3144 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
3147 2003-02-13 Havoc Pennington <hp@pobox.com>
3149 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
3150 dbus_credentials_match were backward
3152 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
3153 NO_CREDENTIALS and ROOT_CREDENTIALS
3155 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
3156 into here. Never process more commands after we've reached an
3157 end state; store further data as unused bytes.
3159 * test/data/auth/*: add more auth tests
3161 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
3162 command to match exact string and EXPECT_UNUSED to match unused
3165 * test/Makefile.am (dist-hook): fix to dist all the test stuff
3167 2003-02-12 Havoc Pennington <hp@pobox.com>
3169 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
3170 \r off of popped lines
3172 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
3175 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
3178 2003-02-12 Havoc Pennington <hp@pobox.com>
3180 * dbus/Makefile.am: remove break-loader from the build, since it
3183 * configure.in: add --enable-gcov to turn on coverage profiling
3184 flags and disable optimization
3186 2003-02-10 Havoc Pennington <hp@pobox.com>
3188 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
3189 initial cut at test framework for DBusAuth from laptop.
3190 Doesn't quite work yet but it compiles and I need to get
3191 it off the 266mhz laptop. ;-)
3193 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
3194 fix a memleak in error case
3196 2003-02-12 Anders Carlsson <andersca@codefactory.se>
3199 * bus/desktop-file.c:
3200 * bus/desktop-file.h:
3201 Add a desktop file parser.
3203 2003-02-11 Zack Rusin <zack@kde.org>
3205 * qt/message.[h|cpp]: sample implementation
3206 of the KDE wrapper for DBusMessage
3208 2003-02-09 Zack Rusin <zack@kde.org>
3210 * test/bus-test.c: make_it_compile
3211 * doc/dbus-specification.sgml: minimal semantic fix
3213 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3219 2003-02-06 Anders Carlsson <andersca@codefactory.se>
3222 * dbus/dbus-break-loader.c:
3224 * test/break-loader.c:
3225 Move dbus-break-loader to test/ and rename it to break-loader.
3227 2003-02-02 Havoc Pennington <hp@pobox.com>
3229 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
3230 for code to manage cookies in your home directory
3232 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
3234 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
3235 to authenticate, then disconnect the client.
3237 2003-02-03 Alexander Larsson <alexl@redhat.com>
3239 * dbus/dbus-message.c (dbus_message_append_fields):
3242 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3244 * doc/dbus-specification.sgml:
3245 Update address format section.
3247 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3250 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
3251 (message_handler), (new_connection_callback), (loop_quit),
3255 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3257 * bus/driver.c: (bus_driver_handle_service_exists):
3258 Simplify the code a bit.
3260 * dbus/dbus-bus.c: (dbus_bus_service_exists):
3263 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3266 Add libdbus-daemon.la and link to it.
3268 2003-02-01 James Willcox <jwillcox@gnome.org>
3270 * bus/driver.c: (bus_driver_handle_own_service):
3271 Actually include the service reply code in the message.
3273 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3275 * bus/driver.c: (bus_driver_handle_service_exists):
3276 Don't unref the incoming message.
3278 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3280 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3282 2003-02-02 Anders Carlsson <andersca@codefactory.se>
3284 * dbus/dbus-server.c: (dbus_server_listen):
3285 * dbus/dbus-transport.c: (_dbus_transport_open):
3286 ifdef out the calls to the debug transport and server.
3288 2003-02-02 Alexander Larsson <alexl@redhat.com>
3290 * dbus/dbus-watch.c (dbus_watch_get_flags):
3291 Add note in the docs that ERROR or HANGUP won't be returned
3292 and are assumed always on.
3294 * glib/dbus-gmain.c (add_watch):
3295 Always add IO_ERR | IO_HUP
3297 * dbus/dbus-message.h:
3298 Add semicolon after dbus_message_iter_get_string_array().
3299 Makes qt code build again
3301 2003-02-01 Anders Carlsson <andersca@codefactory.se>
3303 * bus/driver.c: (create_unique_client_name),
3304 (bus_driver_handle_hello):
3305 Don't take a name, just use a numeric id to identify
3309 * dbus/dbus-bus.c: (dbus_bus_register_client),
3310 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3312 Add new convenience functions for communicating with the bus.
3314 * dbus/dbus-message.h:
3316 * dbus/dbus-protocol.h:
3319 2003-02-01 Alexander Larsson <alexl@redhat.com>
3321 * dbus/dbus-message.c (dbus_message_append_fields):
3322 Add some more doc comments.
3324 2003-02-01 Havoc Pennington <hp@pobox.com>
3326 * dbus/dbus-break-loader.c (randomly_modify_length): change
3327 a 4-byte value in the message as if it were a length
3329 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3330 execute bit on saved files
3332 2003-02-01 Havoc Pennington <hp@pobox.com>
3334 * dbus/dbus-break-loader.c (main): new program to find messages
3335 that break the loader.
3337 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3338 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3340 * dbus/dbus-string.c (_dbus_string_set_byte): new
3342 2003-01-31 Havoc Pennington <hp@pobox.com>
3344 * dbus/dbus-message.c: refactor the test code to be more general,
3345 in preparation for writing a "randomly permute test cases to
3346 try to break the loader" program.
3348 2003-01-31 Havoc Pennington <hp@pobox.com>
3350 * doc/dbus-specification.sgml: work on the specification
3352 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
3353 the protocol version of the message.
3355 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
3356 no longer specifies that.
3357 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
3360 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3361 "break" for DBUS_TYPE_NIL, remove @todo
3363 2003-01-31 Havoc Pennington <hp@pobox.com>
3365 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
3366 just set_is_error/get_is_error as this is a commonly-used
3367 function, and write docs.
3369 2003-01-31 Anders Carlsson <andersca@codefactory.se>
3371 * dbus/dbus-address.c: (dbus_address_entry_free):
3372 Free key and value lists.
3374 * dbus/dbus-internals.c: (_dbus_type_to_string):
3375 Add the types we didn't have.
3377 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3378 (_dbus_marshal_validate_arg):
3381 * dbus/dbus-message.c: (dbus_message_set_sender):
3382 Remove todo about being able to set sender to NULL.
3384 (dbus_message_set_is_error_reply),
3385 (dbus_message_get_is_error_reply):
3386 * dbus/dbus-message.h:
3389 * dbus/dbus-protocol.h:
3390 Add error reply flag.
3392 * test/data/valid-messages/opposite-endian.message:
3393 Add NIL type to test.
3395 2003-01-31 Havoc Pennington <hp@pobox.com>
3397 * doc/dbus-specification.sgml: fully specify the header. Add
3398 flags and major protocol version, and change header/body len to
3401 * dbus/dbus-message-builder.c (append_saved_length): append length
3404 * dbus/dbus-message.c (dbus_message_create_header): change header
3405 length and body length to unsigned. Add the new fields from the
3407 (_dbus_message_loader_return_buffer): unsigned header/body len
3409 2003-01-30 Havoc Pennington <hp@pobox.com>
3411 * dbus/dbus-auth.c: rework to use only REJECTED, no
3414 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
3415 use REJECTED, suggested by Mark McLoughlin
3417 2003-01-30 Havoc Pennington <hp@pobox.com>
3419 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3420 a better way to report errors here. e.g. "unix address lacks
3421 path" or something. also "no such file" when the path doesn't
3424 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3426 (dbus_parse_address): add @todo about documenting address format,
3427 and allowing , and ; to be escaped
3429 2003-01-30 Anders Carlsson <andersca@codefactory.se>
3432 Add dbus-address.[ch]
3434 * dbus/dbus-address.c: (dbus_address_entry_free),
3435 (dbus_address_entries_free), (create_entry),
3436 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3437 (dbus_parse_address), (_dbus_address_test):
3438 * dbus/dbus-address.h:
3439 New files for dealing with address parsing.
3441 * dbus/dbus-connection.c:
3442 Document timeout functions.
3444 * dbus/dbus-message.c:
3445 Document dbus_message_new_from_message.
3447 * dbus/dbus-server-debug.c:
3450 * dbus/dbus-server.c: (dbus_server_listen):
3451 Parse address and use correct server implementation.
3453 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3454 * dbus/dbus-string.h:
3455 New function with test.
3457 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3461 * dbus/dbus-transport-debug.c:
3464 * dbus/dbus-transport.c: (_dbus_transport_open):
3465 Parse address and use correct transport implementation.
3467 2003-01-30 Havoc Pennington <hp@pobox.com>
3469 * dbus/dbus-message.c: use message->byte_order instead of
3470 DBUS_COMPILER_BYTE_ORDER throughout.
3471 (dbus_message_create_header): pad header to align the
3472 start of the body of the message to 8-byte boundary
3474 * dbus/dbus-marshal.h: make all the demarshalers take const
3475 DBusString arguments.
3477 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3478 validate message args here, so we don't have to do slow validation
3479 later, and so we catch bad messages as they are incoming. Also add
3480 better checks on header_len and body_len. Also fill in
3483 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3484 implemented properly)
3485 (_dbus_string_validate_nul): new function to check all-nul
3487 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
3488 get_arg_end_pos and remove all validation
3489 (_dbus_marshal_validate_arg): actually do validation here.
3491 2003-01-29 Havoc Pennington <hp@pobox.com>
3493 * dbus/dbus-message.c (check_message_handling): fix assertion
3494 failure on set_client_serial
3496 2003-01-28 Havoc Pennington <hp@pobox.com>
3498 * dbus/dbus-server-debug.c: Add doc section comments
3500 * dbus/dbus-transport-debug.c: add doc section comments
3502 2003-01-28 Havoc Pennington <hp@redhat.com>
3504 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3505 the reverse order from how I had it
3506 (_dbus_string_base64_encode): reverse encoding order. I was
3507 basically byteswapping everything during encoding.
3509 2003-01-28 Anders Carlsson <andersca@codefactory.se>
3511 * dbus/dbus-connection-internal.h:
3512 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3513 (_dbus_connection_remove_timeout):
3514 Add functions for adding and removing timeouts.
3516 * dbus/dbus-message.c: (dbus_message_new_from_message):
3517 Add new function that takes a message and creates an exact
3518 copy of it, but with the refcount set to 1.
3519 (check_message_handling):
3522 * dbus/dbus-server-protected.h:
3523 * dbus/dbus-server.c: (_dbus_server_init_base),
3524 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3525 (dbus_server_set_timeout_functions):
3526 (_dbus_server_remove_timeout):
3527 New functions so that a server can add and remove timeouts.
3529 (dbus_server_listen):
3530 Add commented out call to dbus_server_debug_new.
3532 * dbus/dbus-timeout.c: (_dbus_timeout_new):
3533 Actually set the handler, doh.
3535 * dbus/dbus-transport.c: (_dbus_transport_open):
3536 Add commented out call to dbus_transport_debug_client_new.
3539 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3541 2003-01-28 Havoc Pennington <hp@pobox.com>
3543 * dbus/dbus-message.c (check_message_handling): function to check
3544 on the loaded message, iterates over it etc.
3546 2003-01-28 Havoc Pennington <hp@pobox.com>
3548 * test/Makefile.am (dist-hook): fix make distdir
3550 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3552 2003-01-27 Havoc Pennington <hp@pobox.com>
3554 * dbus/dbus-mempool.c (time_for_size): replace printf with
3557 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3558 empty lines; fix the SAVE_LENGTH stuff to be
3559 START_LENGTH/END_LENGTH so it actually works; couple other
3562 * test/Makefile.am (dist-hook): add dist-hook for .message files
3564 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3565 can be constant or locked.
3566 (_dbus_string_free): allow freeing a const string as
3569 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3571 * dbus/dbus-test-main.c (main): take an argument which is the
3572 directory containing test data
3574 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3575 argument to this and load all the messages in test/data/
3576 checking that they can be loaded or not loaded as appropriate.
3578 2003-01-27 Anders Carlsson <andersca@codefactory.se>
3580 * bus/dispatch.c: (bus_dispatch_message_handler):
3581 Dispatch messages sent to services.
3583 * bus/driver.c: (bus_driver_send_service_deleted),
3584 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3585 (bus_driver_send_service_acquired):
3586 Add helper functions for sending service related messages.
3588 (bus_driver_send_welcome_message):
3589 Send HELLO_REPLY instead of WELCOME.
3591 (bus_driver_handle_list_services):
3592 Send LIST_SERVICES_REPLY instead of SERVICES.
3594 (bus_driver_handle_own_service),
3595 (bus_driver_handle_service_exists):
3596 New message handlers.
3598 (bus_driver_handle_message):
3599 Invoke new message handlers.
3601 (bus_driver_remove_connection):
3602 Don't remove any services here since that's done automatically
3603 by bus_service_remove_owner now.
3606 New function signatures.
3608 * bus/services.c: (bus_service_add_owner):
3609 Send ServiceAcquired message if we're the only primary owner.
3611 (bus_service_remove_owner):
3612 Send ServiceAcquired/ServiceLost messages.
3614 (bus_service_set_prohibit_replacement),
3615 (bus_service_get_prohibit_replacement):
3616 Functions for setting prohibit replacement.
3618 (bus_service_has_owner):
3619 New function that checks if a connection is in the owner queue of
3623 Add new function signatures.
3625 * dbus/dbus-list.c: (_dbus_list_test):
3626 Add tests for _dbus_list_remove_last and traversing the list backwards.
3629 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3630 go any further, so return NULL then.
3632 * dbus/dbus-protocol.h:
3633 Add new messages, service flags and service replies.
3635 2003-01-26 Havoc Pennington <hp@pobox.com>
3637 * dbus/dbus-message-builder.c: implement, completely untested.
3639 * test/data/*: add data to be used in testing.
3640 ".message" files are our simple loadable text format.
3641 ".message-raw" will be binary dumps of messages.
3643 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3645 2003-01-26 Havoc Pennington <hp@pobox.com>
3647 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3649 * dbus/dbus-errors.c (dbus_result_to_string): add
3652 * dbus/dbus-message-builder.c: new file, will contain code to load
3653 up messages from files. Not implemented yet.
3655 2003-01-26 Havoc Pennington <hp@pobox.com>
3657 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3658 the sender by setting to NULL
3660 2003-01-26 Havoc Pennington <hp@pobox.com>
3662 The unit tests pass, but otherwise untested. If it breaks, the
3663 tests should have been better. ;-)
3665 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3668 * dbus/dbus-message.c: redo everything so we maintain
3669 message->header as the only copy of the various fields.
3670 This avoids the possibility of out-of-memory in some cases,
3671 for example dbus_message_lock() can't run out of memory anymore,
3672 and avoids extra copying. Figured I may as well go ahead and do
3673 this since it was busted for dbus_message_lock to not return
3674 failure on OOM, and dbus_message_write_header was totally
3675 unchecked for OOM. Also fixed some random other bugs.
3677 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3678 that strings are nul-terminated. Also, end_pos can be equal
3679 to string length just not greater than, I think.
3680 (_dbus_marshal_set_int32): new function
3681 (_dbus_marshal_set_uint32): new function
3682 (_dbus_marshal_set_string): new function
3684 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3685 a warning, init timeout_list to NULL
3686 (dbus_connection_send_message): don't use uninitialized variable
3689 * dbus/dbus-string.c (_dbus_string_replace_len): new function
3691 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3693 * bus/driver.c: (bus_driver_handle_hello),
3694 (bus_driver_send_welcome_message):
3697 2003-01-26 Anders Carlsson <andersca@codefactory.se>
3699 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3700 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3701 (dbus_connection_unref):
3702 * dbus/dbus-marshal.c: (_dbus_marshal_test):
3703 * dbus/dbus-message.c: (dbus_message_unref),
3706 (dbus_message_get_fields):
3707 Remove debugging printout.
3709 (_dbus_message_loader_return_buffer):
3710 Don't store the header string.
3712 (_dbus_message_test):
3715 2003-01-26 Richard Hult <rhult@codefactory.se>
3717 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3718 the file descriptor list, since it can change under us.
3720 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3722 * glib/dbus-gmain.c: (dbus_connection_prepare),
3723 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3724 (remove_watch), (dbus_connection_hookup_with_g_main):
3725 Rewrite the glib handling to use its own GSource instead of a
3726 GIOChannel so we can catch messages put in the queue while waiting
3729 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3732 * bus/connection.c: (connection_disconnect_handler),
3733 (connection_watch_callback), (bus_connection_setup):
3734 * bus/dispatch.c: (send_one_message),
3735 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3736 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3738 * bus/driver.c: (bus_driver_send_service_deleted),
3739 (bus_driver_send_service_created), (bus_driver_handle_hello),
3740 (bus_driver_send_welcome_message),
3741 (bus_driver_handle_list_services), (bus_driver_remove_connection),
3742 (bus_driver_handle_message):
3744 Refactor code, put the message dispatching in its own file. Use
3745 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3748 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3750 * dbus/dbus-internals.h:
3751 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3753 * dbus/dbus-message.c: (dbus_message_get_sender):
3754 * dbus/dbus-message.h:
3755 Implement dbus_message_get_sender.
3757 * dbus/dbus-protocol.h:
3758 Add message and service defines.
3760 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3762 * dbus/dbus-connection.c: (dbus_connection_send_message):
3763 * dbus/dbus-message-internal.h:
3764 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3765 (dbus_message_write_header):
3766 Remove _dbus_messag_unlock and don't set the client serial on a
3767 message if one already exists.
3769 2003-01-24 Havoc Pennington <hp@pobox.com>
3771 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3774 * bus/driver.c (bus_driver_handle_list_services): fix a leak
3777 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3779 * dbus/dbus-list.c: (alloc_link), (free_link):
3780 Use a memory pool for the links.
3782 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3784 * bus/connection.c: (bus_connection_foreach):
3786 Add new bus_connection_foreach function.
3788 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3789 Add function that broadcasts a message to all clients.
3791 (bus_driver_send_service_created), (bus_driver_handle_hello),
3792 (bus_driver_send_welcome_message),
3793 (bus_driver_handle_list_services), (bus_driver_message_handler):
3794 Implement functions that take care of listing services, and notifying
3795 clients when new services are created.
3797 * bus/services.c: (bus_services_list):
3799 Add new function that returns an array of strings with the currently
3800 registered services.
3803 * glib/dbus-gmain.c:
3804 Update copyright year.
3806 2003-01-25 Anders Carlsson <andersca@codefactory.se>
3808 * dbus/dbus-connection.c: (dbus_connection_send_message):
3809 Unlock the message in case it was sent earlier.
3811 (dbus_connection_send_message_with_reply_and_block):
3812 Remove the reply message from the list.
3814 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3815 Set array_len and new_pos correctly.
3817 (_dbus_marshal_test):
3818 Remove debug output.
3820 * dbus/dbus-message-internal.h:
3821 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3822 New function that returns the reply serial.
3824 (_dbus_message_unlock):
3825 New function that unlocks a message and resets its header.
3827 (dbus_message_append_string_array),
3828 (dbus_message_get_fields_valist),
3829 (dbus_message_iter_get_field_type),
3830 (dbus_message_iter_get_string_array),
3831 (dbus_message_get_fields),
3832 (dbus_message_append_fields_valist):
3833 Handle string arrays.
3835 (dbus_message_set_sender):
3836 Make this function public since the bus daemon needs it.
3838 (decode_header_data):
3839 Set the reply serial to -1 initially.
3841 * dbus/dbus-message.h:
3842 Add dbus_message_set_sender.
3844 2003-01-24 Havoc Pennington <hp@pobox.com>
3846 * doc/dbus-specification.sgml: add some stuff
3848 2003-01-22 Havoc Pennington <hp@pobox.com>
3850 * doc/dbus-specification.sgml: Start to document the protocol.
3852 2003-01-22 Havoc Pennington <hp@pobox.com>
3854 * dbus/dbus-connection.c
3855 (dbus_connection_send_message_with_reply_and_block): add some @todo
3857 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3859 2003-01-21 Havoc Pennington <hp@pobox.com>
3861 (patch untested because can't compile)
3863 * bus/driver.c (create_unique_client_name): make this function
3864 never recycle client names. Also, caller should initialize
3867 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3869 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3871 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3872 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3873 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3874 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3875 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3876 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3877 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3878 * dbus/dbus-marshal.h:
3879 * dbus/dbus-protocol.h:
3880 Add support for marshalling and demarshalling integer, double
3883 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3888 * bus/connection.c: (connection_disconnect_handler):
3889 Remove the connection from the bus driver's list.
3891 (connection_watch_callback): Dispatch messages.
3893 (free_connection_data): Free connection name.
3895 (bus_connection_setup): Add connection to the bus driver's list.
3896 (bus_connection_remove_owned_service):
3897 (bus_connection_set_name), (bus_connection_get_name):
3898 Add functions for setting and getting the connection's name.
3901 Add function headers.
3903 * bus/driver.c: (create_unique_client_name),
3904 (bus_driver_handle_hello_message),
3905 (bus_driver_send_welcome_message), (bus_driver_message_handler),
3906 (bus_driver_add_connection), (bus_driver_remove_connection):
3909 * bus/services.c: (bus_service_free):
3911 New file that handles communication and registreation with the bus
3914 2003-01-21 Anders Carlsson <andersca@codefactory.se>
3916 * dbus/dbus-connection.c: (dbus_connection_send_message):
3917 Add a new client_serial parameter.
3919 (dbus_connection_send_message_with_reply):
3920 Remove a @todo since we've implemented the blocking function.
3922 (dbus_connection_send_message_with_reply_and_block):
3923 New function that sends a message and waits for a reply and
3924 then returns the reply.
3926 * dbus/dbus-connection.h:
3929 * dbus/dbus-errors.c: (dbus_result_to_string):
3930 * dbus/dbus-errors.h:
3931 Add new DBUS_RESULT.
3933 * dbus/dbus-message-internal.h:
3934 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3935 (_dbus_message_set_sender), (dbus_message_write_header),
3936 (dbus_message_new_reply), (decode_header_data),
3937 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3938 * dbus/dbus-message.h:
3939 Add new functions that set the reply serial and sender.
3940 Also marshal and demarshal them correctly and add test.
3942 * dbus/dbus-protocol.h:
3943 Add new DBUS_MESSAGE_TYPE_SENDER.
3946 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3947 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3948 (dbus_connection_hookup_with_g_main):
3949 * glib/test-dbus-glib.c: (main):
3950 Rewrite to use GIOChannel and remove the GSource crack.
3952 * test/echo-client.c: (main):
3953 * test/watch.c: (check_messages):
3954 Update for changed APIs
3956 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3958 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3960 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3961 Create a DBusTimeoutList.
3962 (dbus_connection_set_timeout_functions): Add new function to
3963 set timeout callbacks
3965 * dbus/dbus-connection.h: Add public DBusTimeout API.
3967 * dbus/dbus-message.c: (dbus_message_get_service):
3968 * dbus/dbus-message.h: New function.
3970 * dbus/dbus-server.c: Fix small doc typo.
3972 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3974 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3976 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3977 of the string, just as long as specified.
3979 2003-01-19 Havoc Pennington <hp@pobox.com>
3981 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3984 * dbus/dbus-server.c (dbus_server_set_max_connections)
3985 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3986 keep track of current number of connections, and add API for
3987 setting a max (but haven't implemented enforcing the max yet)
3989 2003-01-18 Havoc Pennington <hp@pobox.com>
3991 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3992 reading/writing if read_watch != NULL or write_watch != NULL.
3994 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3995 the message loader code to actually load message->header and
3996 message->body into the newly-created message.
3998 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
4001 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
4002 (dbus_connection_get_max_message_size)
4003 (dbus_connection_set_max_live_messages_size)
4004 (dbus_connection_get_max_live_messages_size): implement some
4005 resource limitation functions
4007 * dbus/dbus-resources.c: new file implementing some of the
4008 resource limits stuff
4010 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
4011 missing docs, add @todo to handle OOM etc.
4013 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
4016 2003-01-18 Havoc Pennington <hp@pobox.com>
4018 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
4019 connection if it hasn't been already.
4021 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
4022 replace with DisconnectFunction.
4024 2003-01-18 Havoc Pennington <hp@pobox.com>
4026 Building --disable-verbose-mode --disable-asserts --disable-tests
4027 cuts the library from 112K to 45K or so
4029 * configure.in: check for varargs macro support,
4030 add --enable-verbose-mode, --enable-asserts.
4032 * dbus/dbus-internals.h (_dbus_assert): support
4034 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
4036 2003-01-18 Havoc Pennington <hp@pobox.com>
4038 * dbus/dbus-test.c: include config.h so that tests actually run
4040 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
4041 so the failure mode when that assumption fails will be plenty
4044 2003-01-18 Havoc Pennington <hp@pobox.com>
4046 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
4048 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
4051 * test/Makefile.am: don't use special variable "TESTS" for echo-*
4052 since we don't want to use those in make check
4054 2003-01-15 Havoc Pennington <hp@redhat.com>
4060 2003-01-15 Havoc Pennington <hp@redhat.com>
4062 * test/Makefile.am: fix so that test source code ends up in the
4063 distribution on make distcheck
4065 2003-01-15 Havoc Pennington <hp@redhat.com>
4071 2003-01-15 Havoc Pennington <hp@redhat.com>
4073 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
4074 fix build when --disable-tests
4076 * Makefile.am (EXTRA_DIST): put HACKING in here
4078 * HACKING: document procedure for making a tarball release.
4080 2003-01-14 Anders Carlsson <andersca@codefactory.se>
4082 * bus/connection.c: (connection_error_handler),
4083 (bus_connection_setup):
4084 * bus/main.c: (main):
4085 Make sure that the DBusConnectionData struct is NULLed
4086 out to prevent a segfault.
4088 * dbus/dbus-errors.c: (dbus_result_to_string):
4089 * dbus/dbus-errors.h:
4090 * dbus/dbus-message.c: (dbus_message_get_fields),
4091 (dbus_message_get_fields_valist), (_dbus_message_test):
4092 * dbus/dbus-message.h:
4093 Make dbus_message_get_fields return a result code so we can
4094 track invalid fields as well as oom.
4096 2003-01-11 Havoc Pennington <hp@pobox.com>
4098 * configure.in: change --enable-test/--enable-ansi action-if-given
4099 to enable_foo=$enableval instead of enable_foo=yes
4101 2003-01-08 Havoc Pennington <hp@pobox.com>
4103 * dbus/dbus-string.c (_dbus_string_align_length): new function
4105 * dbus/dbus-test-main.c: move main() for test app here
4107 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
4108 symbol to run tests, because dbus-test isn't in the main
4111 Code review nitpicks.
4113 * dbus/dbus-message.c (dbus_message_write_header): add newlines
4114 for people with narrow emacs ;-). Assert client_serial was filled
4115 in. Assert message->name != NULL.
4116 (dbus_message_append_fields): have "first_field_type" arg separate
4117 from va list, needed for C++ binding that also uses varargs IIRC
4118 and helps with type safety
4119 (dbus_message_new): add @todo about using DBusString to store
4120 service/name internally
4121 (dbus_message_new): don't leak ->service and ->name on OOM later
4123 (dbus_message_unref): free the service name
4124 (dbus_message_get_fields): same change to varargs
4125 i.e. first_field_type
4126 (_dbus_message_loader_return_buffer): assert that the message data
4127 is aligned (if not it's a bug in our code). Put in verbose griping
4128 about why we set corrupted = TRUE.
4129 (decode_header_data): add FIXME that char* is evil. Was going to
4130 add FIXME about evil locale-specific string.h strncmp, but just
4131 switched to wacky string-as-uint32 optimization. Move check for
4132 "no room for field name" above get_const_data_len() to avoid
4133 assertion failure in get_const_data_len if we have trailing 2
4134 bytes or the like. Check for service and name fields being
4135 provided twice. Don't leak service/name on error. Require field
4136 names to be aligned to 4 bytes.
4138 * dbus/dbus-marshal.c: move byte swap stuff to header
4139 (_dbus_pack_int32): uscore-prefix
4140 (_dbus_unpack_int32): uscore-prefix
4141 (_dbus_unpack_uint32): export
4142 (_dbus_demarshal_string): add @todo complaining about use of
4144 (_dbus_marshal_get_field_end_pos): add @todo about bad error
4145 handling allowing corrupt data to go unchecked
4147 2003-01-08 Havoc Pennington <hp@redhat.com>
4149 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
4150 to the select() as needed for authentication. (should be using
4151 _dbus_poll() not select, but for another day)
4153 * dbus/dbus.h: include dbus/dbus-protocol.h
4155 2003-01-08 Anders Carlsson <andersca@codefactory.se>
4157 * dbus/Makefile.am (dbusinclude_HEADERS): Install
4160 2003-01-08 Anders Carlsson <andersca@codefactory.se>
4162 * dbus/dbus-internals.c: (_dbus_type_to_string):
4163 New function that returns a string describing a type.
4165 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
4166 * dbus/dbus-marshal.h:
4167 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
4168 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
4169 (dbus_message_iter_get_byte_array):
4170 * dbus/dbus-message.h:
4171 Add new convenience functions for appending and getting message fields.
4172 Also add demarshalling routines for byte arrays.
4174 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4176 * dbus/dbus-connection-internal.h:
4177 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4178 (_dbus_connection_get_next_client_serial),
4179 (dbus_connection_send_message):
4180 * dbus/dbus-internals.h:
4181 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
4182 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
4183 (_dbus_marshal_uint32), (_dbus_demarshal_double),
4184 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
4185 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
4186 (_dbus_verbose_bytes), (_dbus_marshal_test):
4187 * dbus/dbus-marshal.h:
4188 * dbus/dbus-message-internal.h:
4189 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
4190 (dbus_message_write_header), (_dbus_message_lock),
4191 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
4192 (dbus_message_get_name), (dbus_message_append_int32),
4193 (dbus_message_append_uint32), (dbus_message_append_double),
4194 (dbus_message_append_string), (dbus_message_append_byte_array),
4195 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
4196 (dbus_message_iter_unref), (dbus_message_iter_has_next),
4197 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
4198 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
4199 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
4200 (decode_header_data), (_dbus_message_loader_return_buffer),
4201 (message_iter_test), (_dbus_message_test):
4202 * dbus/dbus-message.h:
4203 * dbus/dbus-protocol.h:
4204 * dbus/dbus-test.c: (main):
4206 * glib/test-dbus-glib.c: (message_handler), (main):
4207 * test/echo-client.c: (main):
4208 * test/watch.c: (check_messages):
4209 Make messages sendable and receivable for real.
4211 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4213 * dbus/dbus-marshal.c: (_dbus_marshal_double),
4214 (_dbus_marshal_string), (_dbus_marshal_byte_array):
4215 * dbus/dbus-message.c: (dbus_message_append_int32),
4216 (dbus_message_append_uint32), (dbus_message_append_double),
4217 (dbus_message_append_string), (dbus_message_append_byte_array):
4218 Handle OOM restoration.
4220 2003-01-07 Anders Carlsson <andersca@codefactory.se>
4222 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4223 (_dbus_demarshal_string), (_dbus_marshal_test):
4224 * dbus/dbus-marshal.h:
4225 * dbus/dbus-message.c: (dbus_message_get_name),
4226 Document these functions.
4228 (dbus_message_append_int32), (dbus_message_append_uint32),
4229 (dbus_message_append_double), (dbus_message_append_string),
4230 (dbus_message_append_byte_array):
4231 * dbus/dbus-message.h:
4232 Add functions for adding message fields of different types.
4234 * dbus/dbus-protocol.h:
4235 Add the different types.
4237 2003-01-05 Havoc Pennington <hp@pobox.com>
4239 * bus/connection.c: implement routines for handling connections,
4240 first thing is keeping a list of owned services on each connection
4241 and setting up watches etc.
4243 * bus/services.c: implement a mapping from service names to lists
4246 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
4248 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
4249 to use static mutexes for global data
4251 * dbus/dbus-connection.c (dbus_connection_set_data): add new
4252 collection of functions to set/get application-specific data
4253 on the DBusConnection.
4255 2003-01-04 Havoc Pennington <hp@pobox.com>
4257 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4258 (_dbus_poll): new function
4260 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4263 * bus/loop.c: initial code for the daemon main loop
4265 2003-01-04 Havoc Pennington <hp@pobox.com>
4267 * test/watch.c (error_handler): make it safe if the error handler
4268 is called multiple times (if we s/error handler/disconnect
4269 handler/ we should just guarantee it's called only once)
4271 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4272 error handler on disconnect (it's quite possible we should
4273 just change the error handler to a "disconnect handler," I'm
4274 not sure we have any other meaningful errors)
4276 * configure.in: check for getpwnam_r
4278 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4279 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4280 mechanism as in SASL spec, using socket credentials
4282 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4283 (_dbus_send_credentials_unix_socket): new function
4285 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4287 (_dbus_write): only check errno if <0 returned
4288 (_dbus_write_two): ditto
4290 2003-01-02 Anders Carlsson <andersca@codefactory.se>
4292 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4293 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4294 (_dbus_marshal_test):
4295 * dbus/dbus-marshal.h:
4296 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4297 to _dbus_marshal_utf8_string. Also fix some tests.
4299 2002-12-28 Harri Porten <porten@kde.org>
4301 * configure.in: added check for C++ compiler and a very cheesy
4302 check for the Qt integration
4304 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4306 * qt/Makefile.am: added
4308 * qt/.cvsignore: added
4310 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4311 latter, added #ifdef QT_THREAD_SUPPORT guard.
4313 * dbus/Makefile.am: added missing headers for make dist
4315 2002-12-28 Kristian Rietveld <kris@gtk.org>
4317 * dbus/Makefile.am: fixup export-symbols-regex.
4319 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4321 * acinclude.m4: Add this file and put the
4322 PKG_CHECK_MODULE macro in it.
4324 2002-12-27 Anders Carlsson <andersca@codefactory.se>
4326 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4327 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4328 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4329 (_dbus_marshal_test):
4330 Make the demarshalling routines align the pos argument.
4331 Add string marshalling tests and fix the obvious bugs
4334 2002-12-26 Havoc Pennington <hp@pobox.com>
4336 * dbus/dbus-auth.c: fixes fixes fixes
4338 * dbus/dbus-transport-unix.c: wire up support for
4339 encoding/decoding data on the wire
4341 * dbus/dbus-auth.c (_dbus_auth_encode_data)
4342 (_dbus_auth_decode_data): append to target string
4343 instead of nuking it.
4345 2002-12-26 Havoc Pennington <hp@pobox.com>
4347 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4348 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4351 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4352 avoid swap_bytes() overhead (ignoring possible assembly stuff for
4353 now). Main point is because I wanted unpack_uint32 to implement
4355 (_dbus_verbose_bytes): new function
4357 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4359 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4360 mechanism to handle a corrupt message stream
4361 (_dbus_message_loader_new): fix preallocation to only prealloc,
4364 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4365 (_dbus_string_test): enhance tests for copy/move and fix the
4368 * dbus/dbus-transport-unix.c: Hold references in more places to
4369 avoid reentrancy problems
4371 * dbus/dbus-transport.c: ditto
4373 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4374 leak reference count in no-message case
4376 * test/watch.c (do_mainloop): handle adding/removing watches
4377 during iteration over the watches. Also, ref the connection/server
4378 stored on a watch, so we don't try to mangle a destroyed one.
4380 * dbus/dbus-transport-unix.c (do_authentication): perform
4383 * dbus/dbus-auth.c (get_state): add a state
4384 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4385 (_dbus_auth_get_unused_bytes): append the unused bytes
4386 to the passed in string, rather than prepend
4388 * dbus/dbus-transport.c (_dbus_transport_init_base): create
4389 the auth conversation DBusAuth
4391 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4392 (_dbus_transport_new_for_domain_socket): when creating a
4393 transport, pass in whether it's a client-side or server-side
4394 transport so we know which DBusAuth to create
4396 2002-12-03 Havoc Pennington <hp@pobox.com>
4398 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4399 _after_ finalizing the derived members
4400 (unix_connection_set): unref watch if we fail to add it
4402 * dbus/dbus-connection.c (dbus_connection_unref): delete the
4403 transport first, so that the connection owned by the
4404 transport will be valid as the transport finalizes.
4406 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4407 if necessary, and remove watches from the connection.
4409 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4411 2002-12-26 Anders Carlsson <andersca@codefactory.se>
4413 * dbus/dbus-marshal.c: (_dbus_marshal_string),
4414 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4415 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4416 (_dbus_marshal_test):
4417 * dbus/dbus-marshal.h:
4418 Add string marshal functions and have the demarshal functions
4419 return the new position.
4421 2002-12-25 Havoc Pennington <hp@pobox.com>
4423 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
4424 it is a simple protocol that just maps directly to SASL.
4426 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4427 initial implementation, not actually used yet.
4429 * dbus/dbus-string.c (_dbus_string_find): new function
4430 (_dbus_string_equal): new function
4431 (_dbus_string_base64_encode): new function
4432 (_dbus_string_base64_decode): new function
4434 2002-12-25 Anders Carlsson <andersca@codefactory.se>
4437 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4438 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4439 (_dbus_demarshal_double), (_dbus_demarshal_int32),
4440 (_dbus_demarshal_uint32), (_dbus_marshal_test):
4441 * dbus/dbus-marshal.h:
4442 * dbus/dbus-protocol.h:
4443 * dbus/dbus-test.c: (main):
4445 Add un-optimized marshalling/demarshalling routines.
4447 2002-12-25 Harri Porten <porten@kde.org>
4449 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4451 2002-12-24 Zack Rusin <zack@kde.org>
4453 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4454 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4457 2002-12-24 Havoc Pennington <hp@pobox.com>
4459 * glib/dbus-gthread.c: fix include
4461 * glib/dbus-glib.h: rename DBusMessageHandler for now.
4462 I think glib API needs to change, though, as you don't
4463 want to use DBusMessageFunction, you want to use the
4464 DBusMessageHandler object. Probably
4465 dbus_connection_open_with_g_main_loop()
4466 and dbus_connection_setup_g_main_loop() or something like that
4467 (but think of better names...) that just create a connection
4468 that has watch/timeout functions etc. already set up.
4470 * dbus/dbus-connection.c
4471 (dbus_connection_send_message_with_reply): new function just to
4472 show how the message handler helps us deal with replies.
4474 * dbus/dbus-list.c (_dbus_list_remove_last): new function
4476 * dbus/dbus-string.c (_dbus_string_test): free a string that
4479 * dbus/dbus-hash.c: use memory pools for the hash entries
4480 (rebuild_table): be more paranoid about overflow, and
4481 shrink table when we can
4482 (_dbus_hash_test): reduce number of sprintfs and write
4483 valid C89. Add tests for case where we grow and then
4484 shrink the hash table.
4486 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4488 * dbus/dbus-connection.c (dbus_connection_register_handler)
4489 (dbus_connection_unregister_handler): new functions
4491 * dbus/dbus-message.c (dbus_message_get_name): new
4493 * dbus/dbus-list.c: fix docs typo
4495 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4496 an object representing a handler for messages.
4498 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4501 * glib/dbus-gthread.c: (dbus_gthread_init):
4502 Don't use the gdbus prefix for public functions.
4504 2002-12-16 Anders Carlsson <andersca@codefactory.se>
4508 Add GLib checks and fixup .pc files
4512 * glib/dbus-gmain.c: (gdbus_connection_prepare),
4513 (gdbus_connection_check), (gdbus_connection_dispatch),
4514 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4515 (dbus_connection_gsource_new):
4516 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4517 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4518 * glib/test-dbus-glib.c: (message_handler), (main):
4521 2002-12-15 Harri Porten <porten@kde.org>
4523 * autogen.sh: check for libtoolize before attempting to use it
4525 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4528 * .cvsignore: ignore more stamp files
4530 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4532 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4533 without make install.
4535 2002-12-15 Havoc Pennington <hp@pobox.com>
4537 * dbus/dbus-threads.c: add thread stubs that a higher library
4538 layer can fill in. e.g. the GLib wrapper might fill them in with
4539 GThread stuff. We still need to use this thread API to
4540 thread-safe-ize the library.
4542 2002-12-12 Havoc Pennington <hp@pobox.com>
4544 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4545 below new interfaces and include fewer system headers.
4547 * dbus/dbus-sysdeps.c (_dbus_read): new function
4548 (_dbus_write): new function
4549 (_dbus_write_two): new function
4550 (_dbus_connect_unix_socket): new function
4551 (_dbus_listen_unix_socket): new function
4553 * dbus/dbus-message-internal.h: change interfaces to use
4556 2002-12-11 Havoc Pennington <hp@pobox.com>
4558 * dbus/dbus-types.h: add dbus_unichar
4560 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4562 * dbus/dbus-connection.c (dbus_connection_send_message): return
4565 * dbus/dbus-transport.c: include dbus-watch.h
4567 * dbus/dbus-connection.c: include dbus-message-internal.h
4569 * HACKING: add file with coding guidelines stuff.
4571 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4572 handling here, for security purposes (as in vsftpd). Not actually
4573 using this class yet.
4575 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4576 system/libc usage here, as in vsftpd, for ease of auditing (and
4577 should also simplify portability). Haven't actually moved all the
4578 system/libc usage into here yet.
4580 2002-11-25 Havoc Pennington <hp@pobox.com>
4582 * dbus/dbus-internals.c (_dbus_verbose): fix to not
4583 always print the first verbose message.
4585 2002-11-24 Havoc Pennington <hp@pobox.com>
4587 * test/echo-client.c, test/echo-server.c: cheesy test
4590 * configure.in (AC_CHECK_FUNCS): check for writev
4592 * dbus/dbus-message.c (_dbus_message_get_network_data): new
4595 * dbus/dbus-list.c (_dbus_list_foreach): new function
4597 * dbus/dbus-internals.c (_dbus_verbose): new function
4599 * dbus/dbus-server.c, dbus/dbus-server.h: public object
4600 representing a server that listens for connections.
4602 * dbus/.cvsignore: create
4604 * dbus/dbus-errors.h, dbus/dbus-errors.c:
4605 public API for reporting errors
4607 * dbus/dbus-connection.h, dbus/dbus-connection.c:
4608 public object representing a connection that
4609 sends/receives messages. (Same object used for
4610 both client and server.)
4612 * dbus/dbus-transport.h, dbus/dbus-transport.c:
4613 Basic abstraction for different kinds of stream
4614 that we might read/write messages from.
4616 2002-11-23 Havoc Pennington <hp@pobox.com>
4618 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
4621 * dbus/dbus-test.c (main): add list test, and include
4622 dbus-test.h as intended
4624 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
4625 (_dbus_hash_table_remove_int): return value indicates
4626 whether the entry existed to remove
4628 * dbus/dbus-list.c: add linked list utility class,
4631 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
4634 2002-11-23 Havoc Pennington <hp@pobox.com>
4636 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4637 DBUS_END_DECLS to nothing, that should fix this once and for all
4639 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4641 * dbus/dbus-message.c, dbus/dbus-hash.c:
4642 add some missing @brief
4644 2002-11-23 Havoc Pennington <hp@pobox.com>
4646 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
4647 to avoid confusing Doxygen
4649 * dbus/dbus-hash.c: @} not }@
4651 * dbus/dbus-message.c (struct DBusMessage): split out
4654 2002-11-23 Havoc Pennington <hp@pobox.com>
4656 * configure.in: pile on more warning flags if using gcc
4658 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
4659 to document static functions
4661 * configure.in: add summary to end of configure so it
4662 looks nice and attractive
4664 * dbus/dbus-hash.c: finish implementation and write unit
4667 * configure.in: add --enable-tests to enable unit tests
4669 * dbus/dbus-test.c: test program to run unit tests
4670 for all files in dbus/*, initially runs a test for
4673 * dbus/dbus-internals.h: file to hold some internal utility stuff
4675 2002-11-22 Havoc Pennington <hp@redhat.com>
4677 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
4678 "ported" away from Tcl
4680 * dbus/dbus-types.h: header for types such as dbus_bool_t
4682 2002-11-22 Havoc Pennington <hp@redhat.com>
4684 * dbus/dbus.h: fixups for doc warnings
4686 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
4688 (QUIET): make it quiet so we can see warnings
4690 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4692 2002-11-22 Havoc Pennington <hp@redhat.com>
4694 * Makefile.am: include "Doxyfile" target in all-local
4696 * configure.in: generate the Doxyfile
4698 * Doxyfile.in: move Doxyfile here, so we can use
4699 configure to generate a Doxyfile with the right
4702 2002-11-22 Havoc Pennington <hp@redhat.com>
4704 * dbus/dbus-message.c: move inline docs into .c file
4706 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4707 so all docs are under doc/
4708 (MAN_EXTENSION): generate man pages. Use extension
4709 ".3dbus" which matches ".3qt" on my system,
4710 I guess this is OK, I don't know really.
4711 (FILE_PATTERNS): look for .c files not .h, makes sense
4714 2002-11-22 Havoc Pennington <hp@pobox.com>
4716 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
4717 because any app can be a server, and any app can be a client,
4718 the bus is a special kind of server.
4720 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
4722 * Doxyfile : adding. Still needs Makefile rules to be generated
4723 automatically (just run "doxygen" in the toplevel dir for now to
4726 * dbus/dbus-message.h : Adding sample docs (javadoc since
4727 resembles gtk-doc a little more)
4729 * dbus/dbus.h : Adding sample docs
4731 2002-11-21 Havoc Pennington <hp@redhat.com>
4733 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
4734 so we can allow ourselves to include files directly,
4735 instead of having to use dbus.h
4737 * dbus/dbus.h: fill in
4739 * dbus/dbus-message.h: sketch out a sample header file.
4740 Include griping if you include it directly instead of
4743 * dbus/dbus-macros.h: new file with macros for extern "C",
4744 TRUE/FALSE, NULL, etc.
4746 * doc/file-boilerplate.c: put include guards in here
4748 2002-11-21 Havoc Pennington <hp@redhat.com>
4750 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4752 * COPYING: include the GPL as well, and license code
4753 under both AFL and GPL.
4755 2002-11-21 Havoc Pennington <hp@redhat.com>
4757 * acconfig.h: get rid of this
4759 * autogen.sh (run_configure): add --no-configure option
4761 * configure.in: remove AC_ARG_PROGRAM to make
4762 autoconf complain less. add AC_PREREQ.
4763 add AC_DEFINE third arg.
4765 2002-11-21 Anders Carlsson <andersca@codefactory.se>
4768 Fix references so we can distcheck.
4770 2002-11-21 Havoc Pennington <hp@redhat.com>
4772 * Initial module creation