1 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3 * bus/activation.c: (bus_activation_init), (child_setup),
4 (bus_activation_activate_service):
7 Set DBUS_ADDRESS environment variable.
9 * dbus/dbus-errors.c: (dbus_set_error):
10 Don't use va_copy since that's a C99 feature.
12 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
14 * dbus/dbus-sysdeps.h:
15 Add child_setup_func to _dbus_spawn_async.
17 * doc/dbus-specification.sgml:
20 * test/spawn-test.c: (setup_func), (main):
23 2003-02-17 Alexander Larsson <alexl@redhat.com>
25 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
28 2003-02-17 Anders Carlsson <andersca@codefactory.se>
32 * doc/dbus-test-plan.sgml:
33 Add test plan document.
38 2003-02-17 Anders Carlsson <andersca@codefactory.se>
40 * dbus/dbus-message.c: (decode_header_data),
41 (_dbus_message_loader_return_buffer):
42 Set the header padding amount when loading a message.
44 2003-02-16 Anders Carlsson <andersca@codefactory.se>
46 * bus/dispatch.c: (send_one_message):
47 Only send broadcast messages to registered connections.
49 * dbus/dbus-message.c: (dbus_message_name_is):
50 * dbus/dbus-message.h:
51 New convenience function.
53 * dbus/dbus-transport-debug.c: (do_reading):
54 Only dispatch one message per run.
57 * test/bus-test.c: (new_connection_callback), (die),
58 (test_hello_client1_handler), (test_hello_client2_handler),
59 (test_hello_replies), (main):
61 * test/bus-test-loop.[ch]:
64 2003-02-16 Havoc Pennington <hp@pobox.com>
66 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
69 2003-02-16 Alexander Larsson <alexl@redhat.com>
71 * dbus/dbus-connection.c:
72 Implement sent_message_with_reply. (with_reply_and block is still
74 Made dispatch_message not lose message if OOM.
77 Add NoReply error (for reply timeouts).
79 2003-02-16 Alexander Larsson <alexl@redhat.com>
81 * dbus/dbus-hash.c (_dbus_hash_table_unref):
82 Actually free keys and values when destroying hashtable.
84 2003-02-16 Anders Carlsson <andersca@codefactory.se>
86 * dbus/dbus-auth.c: (client_try_next_mechanism):
89 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
90 Return TRUE if there's no thread implementation around.
92 * glib/dbus-gmain.c: (free_source),
93 (dbus_connection_hookup_with_g_main):
94 Make sure to remove the GSource when the connection is finalized.
96 2003-02-16 Anders Carlsson <andersca@codefactory.se>
98 * bus/dispatch.c: (bus_dispatch_message_handler):
100 Return an error if someone tries to send a message to a service
103 2003-02-16 Anders Carlsson <andersca@codefactory.se>
105 * bus/activation.c: (load_directory), (bus_activation_init),
106 (bus_activation_activate_service):
109 (bus_driver_handle_activate_service), (bus_driver_handle_message):
110 More work on the activation handling.
112 * dbus/dbus-errors.h:
113 Add some error messages
115 * dbus/dbus-message.c: (dbus_message_new_error_reply):
116 * dbus/dbus-message.h:
117 New function that creates an error message.
119 * dbus/dbus-protocol.h:
120 Add ACTIVATE_SERVER message.
122 * dbus/dbus-server-unix.c: (unix_handle_watch),
123 (_dbus_server_new_for_domain_socket):
124 Call _dbus_fd_set_close_on_exec.
126 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
127 (_dbus_spawn_async), (_dbus_disable_sigpipe),
128 (_dbus_fd_set_close_on_exec):
129 * dbus/dbus-sysdeps.h:
130 Add _dbus_fd_set_close_on exec function. Also add function that checks
131 that all open fds are set to close-on-exec and warns otherwise.
133 * dbus/dbus-transport-unix.c:
134 (_dbus_transport_new_for_domain_socket):
135 Call _dbus_fd_set_close_on_exec.
137 2003-02-16 Havoc Pennington <hp@pobox.com>
139 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
140 allow people to avoid setting SIGPIPE to SIG_IGN
141 (_dbus_connection_new_for_transport): disable SIGPIPE unless
142 we've been asked not to
144 2003-02-15 Anders Carlsson <andersca@codefactory.se>
146 * dbus/dbus-list.c: (_dbus_list_append_link),
147 (_dbus_list_prepend_link):
148 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
152 2003-02-15 Anders Carlsson <andersca@codefactory.se>
155 * bus/activation.c: (bus_activation_entry_free),
156 (add_desktop_file_entry), (load_directory), (bus_activation_init):
158 * bus/main.c: (main):
159 Add simple activation support, doesn't work yet though.
161 2003-02-15 Zack Rusin <zack@kde.org>
163 * qt/dbus-qthread.cpp: small casting fix
165 2003-02-15 Anders Carlsson <andersca@codefactory.se>
167 * dbus/dbus-errors.c: (dbus_set_error):
168 * dbus/dbus-errors.h:
169 Add a few errors and make dbus_set_error void.
171 * dbus/dbus-sysdeps.c:
172 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
173 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
174 * dbus/dbus-sysdeps.h:
175 Add _dbus_spawn_async.
177 * test/spawn-test.c: (main):
178 Test for _dbus_spawn_async.
180 2003-02-15 Anders Carlsson <andersca@codefactory.se>
182 * dbus/dbus-internals.h:
183 Fix build without tests.
185 * dbus/dbus-list.c: (alloc_link):
186 Fix a segfault when a malloc fails.
188 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
189 (dbus_malloc0), (dbus_realloc):
190 Add support for malloc debugging.
192 2003-02-15 Alexander Larsson <alexl@redhat.com>
194 * dbus/dbus-threads.c:
195 * dbus/dbus-threads.h:
196 Add condvars. Remove static mutext from API.
197 Implement static mutexes by initializing them from threads_init.
199 * glib/dbus-gthread.c:
200 * qt/dbus-qthread.cpp:
201 Update with the thread api changes.
206 Turn StaticMutex into normal mutex + init function.
207 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
208 _dbus_list_append_link, _dbus_list_prepend_link
211 * dbus/dbus-sysdeps.c:
212 * dbus/dbus-sysdeps.h:
213 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
214 _dbus_atomic_dec. Only slow fallback implementation at the moment.
216 * dbus/dbus-protocol.h:
217 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
219 * dbus/dbus-message.c:
220 Make ref/unref atomic.
223 * dbus/dbus-connection-internal.h:
224 * dbus/dbus-connection.c:
225 * dbus/dbus-connection.h:
227 Change _peek to _borrow,_return & _steal_borrowed.
228 Change disconnect callback to event.
229 Make dbus_connection_dispatch_messages reentrant.
231 * dbus/dbus-transport.c:
232 Don't ref the connection on calls to the transport
235 * dbus/dbus-message-handler.c:
239 Don't use peek_message anymore
242 * test/debug-thread.c:
243 * test/debug-thread.h:
244 Simple thread implementation that asserts() on deadlocks in
245 single-threaded code.
248 (main) Call debug_threads_init.
251 Use disconnect message instead of disconnect callback.
255 Don't call dbus_connection_set_disconnect_function. Instead export
256 bus_connection_disconnect.
259 Call bus_connection_disconnect when we get a disconnected message.
261 2003-02-15 Havoc Pennington <hp@pobox.com>
263 * dbus/dbus-message.c (dbus_message_new): fool around with the
266 2003-02-14 Havoc Pennington <hp@pobox.com>
268 * dbus/dbus-mempool.c: fail if the debug functions so indicate
270 * dbus/dbus-memory.c: fail if the debug functions indicate we
273 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
274 (_dbus_decrement_fail_alloc_counter): debug functions to
275 simulate memory allocation failures
277 2003-02-14 Havoc Pennington <hp@pobox.com>
279 * dbus/dbus-errors.h (struct DBusError): add a word of padding
282 2003-02-13 Anders Carlsson <andersca@codefactory.se>
284 * bus/driver.c: (bus_driver_handle_hello):
286 * bus/services.c: (bus_service_lookup):
287 Reorder message sending so we get a more sane order.
289 * test/bus-test.c: (message_handler):
292 2003-02-13 Anders Carlsson <andersca@codefactory.se>
294 * bus/driver.c: (bus_driver_send_service_deleted),
295 (bus_driver_send_service_created), (bus_driver_send_service_lost),
296 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
297 (bus_driver_send_welcome_message),
298 (bus_driver_handle_list_services),
299 (bus_driver_handle_acquire_service),
300 (bus_driver_handle_service_exists):
301 * dbus/dbus-bus.c: (dbus_bus_register_client),
302 (dbus_bus_acquire_service), (dbus_bus_service_exists):
303 * dbus/dbus-errors.c: (dbus_result_to_string):
304 * dbus/dbus-errors.h:
305 * dbus/dbus-message.c: (dbus_message_append_args),
306 (dbus_message_append_args_valist), (dbus_message_get_args),
307 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
308 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
309 (dbus_message_iter_get_byte_array),
310 (dbus_message_iter_get_string_array), (message_iter_test),
311 (check_message_handling), (_dbus_message_test):
312 * dbus/dbus-message.h:
313 * test/bus-test.c: (main):
314 Change fields to arguments in messages, so that they won't be
315 confused with header fields.
317 * glib/test-dbus-glib.c: (main):
318 Remove append_fields from hello message.
320 2003-02-13 Anders Carlsson <andersca@codefactory.se>
322 * dbus/dbus-errors.c:
323 * dbus/dbus-message.c:
324 * dbus/dbus-string.c:
327 2003-02-13 Anders Carlsson <andersca@codefactory.se>
329 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
331 Implement support for timeouts in dbus-glib.
333 2003-02-13 Anders Carlsson <andersca@codefactory.se>
335 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
336 * dbus/dbus-message.c: (process_test_subdir):
337 * test/break-loader.c: (find_breaks_based_on):
338 Plug some memory leaks.
340 2003-02-13 Richard Hult <rhult@codefactory.se>
342 * bus/main.c: Fix build.
344 * dbus/dbus-errors.h:
345 * dbus/dbus-errors.c: Fix copyright for Anders.
347 2003-02-13 Anders Carlsson <andersca@codefactory.se>
352 * bus/connection.c: (bus_connection_foreach):
355 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
356 (unescape_string), (new_section), (parse_section_start),
357 (parse_key_value), (report_error), (bus_desktop_file_load),
358 (bus_desktop_file_get_string):
359 * bus/desktop-file.h:
360 Use DBusError for error reporting.
362 * bus/dispatch.c: (send_one_message),
363 (bus_dispatch_message_handler):
364 * bus/driver.c: (bus_driver_send_service_deleted),
365 (bus_driver_send_service_created), (bus_driver_send_service_lost),
366 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
367 (bus_driver_send_welcome_message),
368 (bus_driver_handle_list_services),
369 (bus_driver_handle_acquire_service),
370 (bus_driver_handle_service_exists):
371 * bus/loop.c: (bus_loop_run):
373 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
375 * bus/utils.c: (bus_wait_for_memory):
377 New files with general utility functions.
379 * dbus/dbus-internals.h:
380 Remove _DBUS_HANDLE_OOM.
382 2003-02-13 Anders Carlsson <andersca@codefactory.se>
384 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
385 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
386 * dbus/dbus-errors.h:
387 Add DBusError structure.
389 2003-02-13 Anders Carlsson <andersca@codefactory.se>
391 * test/data/valid-messages/standard-acquire-service.message:
392 * test/data/valid-messages/standard-hello.message:
393 * test/data/valid-messages/standard-list-services.message:
394 * test/data/valid-messages/standard-service-exists.message:
395 Add some standard messages.
397 2003-02-13 Anders Carlsson <andersca@codefactory.se>
399 * bus/driver.c: (bus_driver_send_welcome_message),
400 (bus_driver_handle_list_services),
401 (bus_driver_handle_acquire_service),
402 (bus_driver_handle_service_exists), (bus_driver_handle_message):
403 Update for API changes in libdbus.
405 * dbus/dbus-message.c: (dbus_message_new_reply):
406 * dbus/dbus-message.h:
407 Remove the name argument. The spec states that replies shouldn't
410 2003-02-13 Anders Carlsson <andersca@codefactory.se>
412 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
413 (report_error), (bus_desktop_file_load), (lookup_section),
414 (lookup_line), (bus_desktop_file_get_raw),
415 (bus_desktop_file_get_string):
416 * bus/desktop-file.h:
417 Some fixes, and new functions for getting a key value from a section.
419 2003-02-13 Havoc Pennington <hp@pobox.com>
421 * test/data/auth/fail-after-n-attempts.auth-script: new test
423 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
426 2003-02-13 Havoc Pennington <hp@pobox.com>
428 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
429 dbus_credentials_match were backward
431 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
432 NO_CREDENTIALS and ROOT_CREDENTIALS
434 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
435 into here. Never process more commands after we've reached an
436 end state; store further data as unused bytes.
438 * test/data/auth/*: add more auth tests
440 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
441 command to match exact string and EXPECT_UNUSED to match unused
444 * test/Makefile.am (dist-hook): fix to dist all the test stuff
446 2003-02-12 Havoc Pennington <hp@pobox.com>
448 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
449 \r off of popped lines
451 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
454 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
457 2003-02-12 Havoc Pennington <hp@pobox.com>
459 * dbus/Makefile.am: remove break-loader from the build, since it
462 * configure.in: add --enable-gcov to turn on coverage profiling
463 flags and disable optimization
465 2003-02-10 Havoc Pennington <hp@pobox.com>
467 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
468 initial cut at test framework for DBusAuth from laptop.
469 Doesn't quite work yet but it compiles and I need to get
470 it off the 266mhz laptop. ;-)
472 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
473 fix a memleak in error case
475 2003-02-12 Anders Carlsson <andersca@codefactory.se>
478 * bus/desktop-file.c:
479 * bus/desktop-file.h:
480 Add a desktop file parser.
482 2003-02-11 Zack Rusin <zack@kde.org>
484 * qt/message.[h|cpp]: sample implementation
485 of the KDE wrapper for DBusMessage
487 2003-02-09 Zack Rusin <zack@kde.org>
489 * test/bus-test.c: make_it_compile
490 * doc/dbus-specification.sgml: minimal semantic fix
492 2003-02-06 Anders Carlsson <andersca@codefactory.se>
498 2003-02-06 Anders Carlsson <andersca@codefactory.se>
501 * dbus/dbus-break-loader.c:
503 * test/break-loader.c:
504 Move dbus-break-loader to test/ and rename it to break-loader.
506 2003-02-02 Havoc Pennington <hp@pobox.com>
508 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
509 for code to manage cookies in your home directory
511 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
513 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
514 to authenticate, then disconnect the client.
516 2003-02-03 Alexander Larsson <alexl@redhat.com>
518 * dbus/dbus-message.c (dbus_message_append_fields):
521 2003-02-02 Anders Carlsson <andersca@codefactory.se>
523 * doc/dbus-specification.sgml:
524 Update address format section.
526 2003-02-02 Anders Carlsson <andersca@codefactory.se>
529 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
530 (message_handler), (new_connection_callback), (loop_quit),
534 2003-02-02 Anders Carlsson <andersca@codefactory.se>
536 * bus/driver.c: (bus_driver_handle_service_exists):
537 Simplify the code a bit.
539 * dbus/dbus-bus.c: (dbus_bus_service_exists):
542 2003-02-02 Anders Carlsson <andersca@codefactory.se>
545 Add libdbus-daemon.la and link to it.
547 2003-02-01 James Willcox <jwillcox@gnome.org>
549 * bus/driver.c: (bus_driver_handle_own_service):
550 Actually include the service reply code in the message.
552 2003-02-02 Anders Carlsson <andersca@codefactory.se>
554 * bus/driver.c: (bus_driver_handle_service_exists):
555 Don't unref the incoming message.
557 2003-02-02 Anders Carlsson <andersca@codefactory.se>
559 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
561 2003-02-02 Anders Carlsson <andersca@codefactory.se>
563 * dbus/dbus-server.c: (dbus_server_listen):
564 * dbus/dbus-transport.c: (_dbus_transport_open):
565 ifdef out the calls to the debug transport and server.
567 2003-02-02 Alexander Larsson <alexl@redhat.com>
569 * dbus/dbus-watch.c (dbus_watch_get_flags):
570 Add note in the docs that ERROR or HANGUP won't be returned
571 and are assumed always on.
573 * glib/dbus-gmain.c (add_watch):
574 Always add IO_ERR | IO_HUP
576 * dbus/dbus-message.h:
577 Add semicolon after dbus_message_iter_get_string_array().
578 Makes qt code build again
580 2003-02-01 Anders Carlsson <andersca@codefactory.se>
582 * bus/driver.c: (create_unique_client_name),
583 (bus_driver_handle_hello):
584 Don't take a name, just use a numeric id to identify
588 * dbus/dbus-bus.c: (dbus_bus_register_client),
589 (dbus_bus_acquire_service), (dbus_bus_service_exists):
591 Add new convenience functions for communicating with the bus.
593 * dbus/dbus-message.h:
595 * dbus/dbus-protocol.h:
598 2003-02-01 Alexander Larsson <alexl@redhat.com>
600 * dbus/dbus-message.c (dbus_message_append_fields):
601 Add some more doc comments.
603 2003-02-01 Havoc Pennington <hp@pobox.com>
605 * dbus/dbus-break-loader.c (randomly_modify_length): change
606 a 4-byte value in the message as if it were a length
608 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
609 execute bit on saved files
611 2003-02-01 Havoc Pennington <hp@pobox.com>
613 * dbus/dbus-break-loader.c (main): new program to find messages
614 that break the loader.
616 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
617 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
619 * dbus/dbus-string.c (_dbus_string_set_byte): new
621 2003-01-31 Havoc Pennington <hp@pobox.com>
623 * dbus/dbus-message.c: refactor the test code to be more general,
624 in preparation for writing a "randomly permute test cases to
625 try to break the loader" program.
627 2003-01-31 Havoc Pennington <hp@pobox.com>
629 * doc/dbus-specification.sgml: work on the specification
631 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
632 the protocol version of the message.
634 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
635 no longer specifies that.
636 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
639 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
640 "break" for DBUS_TYPE_NIL, remove @todo
642 2003-01-31 Havoc Pennington <hp@pobox.com>
644 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
645 just set_is_error/get_is_error as this is a commonly-used
646 function, and write docs.
648 2003-01-31 Anders Carlsson <andersca@codefactory.se>
650 * dbus/dbus-address.c: (dbus_address_entry_free):
651 Free key and value lists.
653 * dbus/dbus-internals.c: (_dbus_type_to_string):
654 Add the types we didn't have.
656 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
657 (_dbus_marshal_validate_arg):
660 * dbus/dbus-message.c: (dbus_message_set_sender):
661 Remove todo about being able to set sender to NULL.
663 (dbus_message_set_is_error_reply),
664 (dbus_message_get_is_error_reply):
665 * dbus/dbus-message.h:
668 * dbus/dbus-protocol.h:
669 Add error reply flag.
671 * test/data/valid-messages/opposite-endian.message:
672 Add NIL type to test.
674 2003-01-31 Havoc Pennington <hp@pobox.com>
676 * doc/dbus-specification.sgml: fully specify the header. Add
677 flags and major protocol version, and change header/body len to
680 * dbus/dbus-message-builder.c (append_saved_length): append length
683 * dbus/dbus-message.c (dbus_message_create_header): change header
684 length and body length to unsigned. Add the new fields from the
686 (_dbus_message_loader_return_buffer): unsigned header/body len
688 2003-01-30 Havoc Pennington <hp@pobox.com>
690 * dbus/dbus-auth.c: rework to use only REJECTED, no
693 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
694 use REJECTED, suggested by Mark McLoughlin
696 2003-01-30 Havoc Pennington <hp@pobox.com>
698 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
699 a better way to report errors here. e.g. "unix address lacks
700 path" or something. also "no such file" when the path doesn't
703 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
705 (dbus_parse_address): add @todo about documenting address format,
706 and allowing , and ; to be escaped
708 2003-01-30 Anders Carlsson <andersca@codefactory.se>
711 Add dbus-address.[ch]
713 * dbus/dbus-address.c: (dbus_address_entry_free),
714 (dbus_address_entries_free), (create_entry),
715 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
716 (dbus_parse_address), (_dbus_address_test):
717 * dbus/dbus-address.h:
718 New files for dealing with address parsing.
720 * dbus/dbus-connection.c:
721 Document timeout functions.
723 * dbus/dbus-message.c:
724 Document dbus_message_new_from_message.
726 * dbus/dbus-server-debug.c:
729 * dbus/dbus-server.c: (dbus_server_listen):
730 Parse address and use correct server implementation.
732 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
733 * dbus/dbus-string.h:
734 New function with test.
736 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
740 * dbus/dbus-transport-debug.c:
743 * dbus/dbus-transport.c: (_dbus_transport_open):
744 Parse address and use correct transport implementation.
746 2003-01-30 Havoc Pennington <hp@pobox.com>
748 * dbus/dbus-message.c: use message->byte_order instead of
749 DBUS_COMPILER_BYTE_ORDER throughout.
750 (dbus_message_create_header): pad header to align the
751 start of the body of the message to 8-byte boundary
753 * dbus/dbus-marshal.h: make all the demarshalers take const
754 DBusString arguments.
756 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
757 validate message args here, so we don't have to do slow validation
758 later, and so we catch bad messages as they are incoming. Also add
759 better checks on header_len and body_len. Also fill in
762 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
763 implemented properly)
764 (_dbus_string_validate_nul): new function to check all-nul
766 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
767 get_arg_end_pos and remove all validation
768 (_dbus_marshal_validate_arg): actually do validation here.
770 2003-01-29 Havoc Pennington <hp@pobox.com>
772 * dbus/dbus-message.c (check_message_handling): fix assertion
773 failure on set_client_serial
775 2003-01-28 Havoc Pennington <hp@pobox.com>
777 * dbus/dbus-server-debug.c: Add doc section comments
779 * dbus/dbus-transport-debug.c: add doc section comments
781 2003-01-28 Havoc Pennington <hp@redhat.com>
783 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
784 the reverse order from how I had it
785 (_dbus_string_base64_encode): reverse encoding order. I was
786 basically byteswapping everything during encoding.
788 2003-01-28 Anders Carlsson <andersca@codefactory.se>
790 * dbus/dbus-connection-internal.h:
791 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
792 (_dbus_connection_remove_timeout):
793 Add functions for adding and removing timeouts.
795 * dbus/dbus-message.c: (dbus_message_new_from_message):
796 Add new function that takes a message and creates an exact
797 copy of it, but with the refcount set to 1.
798 (check_message_handling):
801 * dbus/dbus-server-protected.h:
802 * dbus/dbus-server.c: (_dbus_server_init_base),
803 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
804 (dbus_server_set_timeout_functions):
805 (_dbus_server_remove_timeout):
806 New functions so that a server can add and remove timeouts.
808 (dbus_server_listen):
809 Add commented out call to dbus_server_debug_new.
811 * dbus/dbus-timeout.c: (_dbus_timeout_new):
812 Actually set the handler, doh.
814 * dbus/dbus-transport.c: (_dbus_transport_open):
815 Add commented out call to dbus_transport_debug_client_new.
818 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
820 2003-01-28 Havoc Pennington <hp@pobox.com>
822 * dbus/dbus-message.c (check_message_handling): function to check
823 on the loaded message, iterates over it etc.
825 2003-01-28 Havoc Pennington <hp@pobox.com>
827 * test/Makefile.am (dist-hook): fix make distdir
829 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
831 2003-01-27 Havoc Pennington <hp@pobox.com>
833 * dbus/dbus-mempool.c (time_for_size): replace printf with
836 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
837 empty lines; fix the SAVE_LENGTH stuff to be
838 START_LENGTH/END_LENGTH so it actually works; couple other
841 * test/Makefile.am (dist-hook): add dist-hook for .message files
843 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
844 can be constant or locked.
845 (_dbus_string_free): allow freeing a const string as
848 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
850 * dbus/dbus-test-main.c (main): take an argument which is the
851 directory containing test data
853 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
854 argument to this and load all the messages in test/data/
855 checking that they can be loaded or not loaded as appropriate.
857 2003-01-27 Anders Carlsson <andersca@codefactory.se>
859 * bus/dispatch.c: (bus_dispatch_message_handler):
860 Dispatch messages sent to services.
862 * bus/driver.c: (bus_driver_send_service_deleted),
863 (bus_driver_send_service_created), (bus_driver_send_service_lost),
864 (bus_driver_send_service_acquired):
865 Add helper functions for sending service related messages.
867 (bus_driver_send_welcome_message):
868 Send HELLO_REPLY instead of WELCOME.
870 (bus_driver_handle_list_services):
871 Send LIST_SERVICES_REPLY instead of SERVICES.
873 (bus_driver_handle_own_service),
874 (bus_driver_handle_service_exists):
875 New message handlers.
877 (bus_driver_handle_message):
878 Invoke new message handlers.
880 (bus_driver_remove_connection):
881 Don't remove any services here since that's done automatically
882 by bus_service_remove_owner now.
885 New function signatures.
887 * bus/services.c: (bus_service_add_owner):
888 Send ServiceAcquired message if we're the only primary owner.
890 (bus_service_remove_owner):
891 Send ServiceAcquired/ServiceLost messages.
893 (bus_service_set_prohibit_replacement),
894 (bus_service_get_prohibit_replacement):
895 Functions for setting prohibit replacement.
897 (bus_service_has_owner):
898 New function that checks if a connection is in the owner queue of
902 Add new function signatures.
904 * dbus/dbus-list.c: (_dbus_list_test):
905 Add tests for _dbus_list_remove_last and traversing the list backwards.
908 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
909 go any further, so return NULL then.
911 * dbus/dbus-protocol.h:
912 Add new messages, service flags and service replies.
914 2003-01-26 Havoc Pennington <hp@pobox.com>
916 * dbus/dbus-message-builder.c: implement, completely untested.
918 * test/data/*: add data to be used in testing.
919 ".message" files are our simple loadable text format.
920 ".message-raw" will be binary dumps of messages.
922 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
924 2003-01-26 Havoc Pennington <hp@pobox.com>
926 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
928 * dbus/dbus-errors.c (dbus_result_to_string): add
931 * dbus/dbus-message-builder.c: new file, will contain code to load
932 up messages from files. Not implemented yet.
934 2003-01-26 Havoc Pennington <hp@pobox.com>
936 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
937 the sender by setting to NULL
939 2003-01-26 Havoc Pennington <hp@pobox.com>
941 The unit tests pass, but otherwise untested. If it breaks, the
942 tests should have been better. ;-)
944 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
947 * dbus/dbus-message.c: redo everything so we maintain
948 message->header as the only copy of the various fields.
949 This avoids the possibility of out-of-memory in some cases,
950 for example dbus_message_lock() can't run out of memory anymore,
951 and avoids extra copying. Figured I may as well go ahead and do
952 this since it was busted for dbus_message_lock to not return
953 failure on OOM, and dbus_message_write_header was totally
954 unchecked for OOM. Also fixed some random other bugs.
956 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
957 that strings are nul-terminated. Also, end_pos can be equal
958 to string length just not greater than, I think.
959 (_dbus_marshal_set_int32): new function
960 (_dbus_marshal_set_uint32): new function
961 (_dbus_marshal_set_string): new function
963 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
964 a warning, init timeout_list to NULL
965 (dbus_connection_send_message): don't use uninitialized variable
968 * dbus/dbus-string.c (_dbus_string_replace_len): new function
970 2003-01-26 Anders Carlsson <andersca@codefactory.se>
972 * bus/driver.c: (bus_driver_handle_hello),
973 (bus_driver_send_welcome_message):
976 2003-01-26 Anders Carlsson <andersca@codefactory.se>
978 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
979 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
980 (dbus_connection_unref):
981 * dbus/dbus-marshal.c: (_dbus_marshal_test):
982 * dbus/dbus-message.c: (dbus_message_unref),
985 (dbus_message_get_fields):
986 Remove debugging printout.
988 (_dbus_message_loader_return_buffer):
989 Don't store the header string.
991 (_dbus_message_test):
994 2003-01-26 Richard Hult <rhult@codefactory.se>
996 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
997 the file descriptor list, since it can change under us.
999 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1001 * glib/dbus-gmain.c: (dbus_connection_prepare),
1002 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1003 (remove_watch), (dbus_connection_hookup_with_g_main):
1004 Rewrite the glib handling to use its own GSource instead of a
1005 GIOChannel so we can catch messages put in the queue while waiting
1008 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1011 * bus/connection.c: (connection_disconnect_handler),
1012 (connection_watch_callback), (bus_connection_setup):
1013 * bus/dispatch.c: (send_one_message),
1014 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1015 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1017 * bus/driver.c: (bus_driver_send_service_deleted),
1018 (bus_driver_send_service_created), (bus_driver_handle_hello),
1019 (bus_driver_send_welcome_message),
1020 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1021 (bus_driver_handle_message):
1023 Refactor code, put the message dispatching in its own file. Use
1024 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1027 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1029 * dbus/dbus-internals.h:
1030 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1032 * dbus/dbus-message.c: (dbus_message_get_sender):
1033 * dbus/dbus-message.h:
1034 Implement dbus_message_get_sender.
1036 * dbus/dbus-protocol.h:
1037 Add message and service defines.
1039 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1041 * dbus/dbus-connection.c: (dbus_connection_send_message):
1042 * dbus/dbus-message-internal.h:
1043 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1044 (dbus_message_write_header):
1045 Remove _dbus_messag_unlock and don't set the client serial on a
1046 message if one already exists.
1048 2003-01-24 Havoc Pennington <hp@pobox.com>
1050 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1053 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1056 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1058 * dbus/dbus-list.c: (alloc_link), (free_link):
1059 Use a memory pool for the links.
1061 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1063 * bus/connection.c: (bus_connection_foreach):
1065 Add new bus_connection_foreach function.
1067 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1068 Add function that broadcasts a message to all clients.
1070 (bus_driver_send_service_created), (bus_driver_handle_hello),
1071 (bus_driver_send_welcome_message),
1072 (bus_driver_handle_list_services), (bus_driver_message_handler):
1073 Implement functions that take care of listing services, and notifying
1074 clients when new services are created.
1076 * bus/services.c: (bus_services_list):
1078 Add new function that returns an array of strings with the currently
1079 registered services.
1082 * glib/dbus-gmain.c:
1083 Update copyright year.
1085 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1087 * dbus/dbus-connection.c: (dbus_connection_send_message):
1088 Unlock the message in case it was sent earlier.
1090 (dbus_connection_send_message_with_reply_and_block):
1091 Remove the reply message from the list.
1093 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1094 Set array_len and new_pos correctly.
1096 (_dbus_marshal_test):
1097 Remove debug output.
1099 * dbus/dbus-message-internal.h:
1100 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1101 New function that returns the reply serial.
1103 (_dbus_message_unlock):
1104 New function that unlocks a message and resets its header.
1106 (dbus_message_append_string_array),
1107 (dbus_message_get_fields_valist),
1108 (dbus_message_iter_get_field_type),
1109 (dbus_message_iter_get_string_array),
1110 (dbus_message_get_fields),
1111 (dbus_message_append_fields_valist):
1112 Handle string arrays.
1114 (dbus_message_set_sender):
1115 Make this function public since the bus daemon needs it.
1117 (decode_header_data):
1118 Set the reply serial to -1 initially.
1120 * dbus/dbus-message.h:
1121 Add dbus_message_set_sender.
1123 2003-01-24 Havoc Pennington <hp@pobox.com>
1125 * doc/dbus-specification.sgml: add some stuff
1127 2003-01-22 Havoc Pennington <hp@pobox.com>
1129 * doc/dbus-specification.sgml: Start to document the protocol.
1131 2003-01-22 Havoc Pennington <hp@pobox.com>
1133 * dbus/dbus-connection.c
1134 (dbus_connection_send_message_with_reply_and_block): add some @todo
1136 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1138 2003-01-21 Havoc Pennington <hp@pobox.com>
1140 (patch untested because can't compile)
1142 * bus/driver.c (create_unique_client_name): make this function
1143 never recycle client names. Also, caller should initialize
1146 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1148 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1150 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1151 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1152 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1153 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1154 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1155 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1156 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1157 * dbus/dbus-marshal.h:
1158 * dbus/dbus-protocol.h:
1159 Add support for marshalling and demarshalling integer, double
1162 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1167 * bus/connection.c: (connection_disconnect_handler):
1168 Remove the connection from the bus driver's list.
1170 (connection_watch_callback): Dispatch messages.
1172 (free_connection_data): Free connection name.
1174 (bus_connection_setup): Add connection to the bus driver's list.
1175 (bus_connection_remove_owned_service):
1176 (bus_connection_set_name), (bus_connection_get_name):
1177 Add functions for setting and getting the connection's name.
1180 Add function headers.
1182 * bus/driver.c: (create_unique_client_name),
1183 (bus_driver_handle_hello_message),
1184 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1185 (bus_driver_add_connection), (bus_driver_remove_connection):
1188 * bus/services.c: (bus_service_free):
1190 New file that handles communication and registreation with the bus
1193 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1195 * dbus/dbus-connection.c: (dbus_connection_send_message):
1196 Add a new client_serial parameter.
1198 (dbus_connection_send_message_with_reply):
1199 Remove a @todo since we've implemented the blocking function.
1201 (dbus_connection_send_message_with_reply_and_block):
1202 New function that sends a message and waits for a reply and
1203 then returns the reply.
1205 * dbus/dbus-connection.h:
1208 * dbus/dbus-errors.c: (dbus_result_to_string):
1209 * dbus/dbus-errors.h:
1210 Add new DBUS_RESULT.
1212 * dbus/dbus-message-internal.h:
1213 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1214 (_dbus_message_set_sender), (dbus_message_write_header),
1215 (dbus_message_new_reply), (decode_header_data),
1216 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1217 * dbus/dbus-message.h:
1218 Add new functions that set the reply serial and sender.
1219 Also marshal and demarshal them correctly and add test.
1221 * dbus/dbus-protocol.h:
1222 Add new DBUS_MESSAGE_TYPE_SENDER.
1225 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1226 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1227 (dbus_connection_hookup_with_g_main):
1228 * glib/test-dbus-glib.c: (main):
1229 Rewrite to use GIOChannel and remove the GSource crack.
1231 * test/echo-client.c: (main):
1232 * test/watch.c: (check_messages):
1233 Update for changed APIs
1235 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1237 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1239 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1240 Create a DBusTimeoutList.
1241 (dbus_connection_set_timeout_functions): Add new function to
1242 set timeout callbacks
1244 * dbus/dbus-connection.h: Add public DBusTimeout API.
1246 * dbus/dbus-message.c: (dbus_message_get_service):
1247 * dbus/dbus-message.h: New function.
1249 * dbus/dbus-server.c: Fix small doc typo.
1251 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1253 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1255 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1256 of the string, just as long as specified.
1258 2003-01-19 Havoc Pennington <hp@pobox.com>
1260 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1263 * dbus/dbus-server.c (dbus_server_set_max_connections)
1264 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1265 keep track of current number of connections, and add API for
1266 setting a max (but haven't implemented enforcing the max yet)
1268 2003-01-18 Havoc Pennington <hp@pobox.com>
1270 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1271 reading/writing if read_watch != NULL or write_watch != NULL.
1273 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1274 the message loader code to actually load message->header and
1275 message->body into the newly-created message.
1277 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1280 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1281 (dbus_connection_get_max_message_size)
1282 (dbus_connection_set_max_live_messages_size)
1283 (dbus_connection_get_max_live_messages_size): implement some
1284 resource limitation functions
1286 * dbus/dbus-resources.c: new file implementing some of the
1287 resource limits stuff
1289 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1290 missing docs, add @todo to handle OOM etc.
1292 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1295 2003-01-18 Havoc Pennington <hp@pobox.com>
1297 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1298 connection if it hasn't been already.
1300 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1301 replace with DisconnectFunction.
1303 2003-01-18 Havoc Pennington <hp@pobox.com>
1305 Building --disable-verbose-mode --disable-asserts --disable-tests
1306 cuts the library from 112K to 45K or so
1308 * configure.in: check for varargs macro support,
1309 add --enable-verbose-mode, --enable-asserts.
1311 * dbus/dbus-internals.h (_dbus_assert): support
1313 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1315 2003-01-18 Havoc Pennington <hp@pobox.com>
1317 * dbus/dbus-test.c: include config.h so that tests actually run
1319 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1320 so the failure mode when that assumption fails will be plenty
1323 2003-01-18 Havoc Pennington <hp@pobox.com>
1325 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1327 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1330 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1331 since we don't want to use those in make check
1333 2003-01-15 Havoc Pennington <hp@redhat.com>
1339 2003-01-15 Havoc Pennington <hp@redhat.com>
1341 * test/Makefile.am: fix so that test source code ends up in the
1342 distribution on make distcheck
1344 2003-01-15 Havoc Pennington <hp@redhat.com>
1350 2003-01-15 Havoc Pennington <hp@redhat.com>
1352 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1353 fix build when --disable-tests
1355 * Makefile.am (EXTRA_DIST): put HACKING in here
1357 * HACKING: document procedure for making a tarball release.
1359 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1361 * bus/connection.c: (connection_error_handler),
1362 (bus_connection_setup):
1363 * bus/main.c: (main):
1364 Make sure that the DBusConnectionData struct is NULLed
1365 out to prevent a segfault.
1367 * dbus/dbus-errors.c: (dbus_result_to_string):
1368 * dbus/dbus-errors.h:
1369 * dbus/dbus-message.c: (dbus_message_get_fields),
1370 (dbus_message_get_fields_valist), (_dbus_message_test):
1371 * dbus/dbus-message.h:
1372 Make dbus_message_get_fields return a result code so we can
1373 track invalid fields as well as oom.
1375 2003-01-11 Havoc Pennington <hp@pobox.com>
1377 * configure.in: change --enable-test/--enable-ansi action-if-given
1378 to enable_foo=$enableval instead of enable_foo=yes
1380 2003-01-08 Havoc Pennington <hp@pobox.com>
1382 * dbus/dbus-string.c (_dbus_string_align_length): new function
1384 * dbus/dbus-test-main.c: move main() for test app here
1386 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1387 symbol to run tests, because dbus-test isn't in the main
1390 Code review nitpicks.
1392 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1393 for people with narrow emacs ;-). Assert client_serial was filled
1394 in. Assert message->name != NULL.
1395 (dbus_message_append_fields): have "first_field_type" arg separate
1396 from va list, needed for C++ binding that also uses varargs IIRC
1397 and helps with type safety
1398 (dbus_message_new): add @todo about using DBusString to store
1399 service/name internally
1400 (dbus_message_new): don't leak ->service and ->name on OOM later
1402 (dbus_message_unref): free the service name
1403 (dbus_message_get_fields): same change to varargs
1404 i.e. first_field_type
1405 (_dbus_message_loader_return_buffer): assert that the message data
1406 is aligned (if not it's a bug in our code). Put in verbose griping
1407 about why we set corrupted = TRUE.
1408 (decode_header_data): add FIXME that char* is evil. Was going to
1409 add FIXME about evil locale-specific string.h strncmp, but just
1410 switched to wacky string-as-uint32 optimization. Move check for
1411 "no room for field name" above get_const_data_len() to avoid
1412 assertion failure in get_const_data_len if we have trailing 2
1413 bytes or the like. Check for service and name fields being
1414 provided twice. Don't leak service/name on error. Require field
1415 names to be aligned to 4 bytes.
1417 * dbus/dbus-marshal.c: move byte swap stuff to header
1418 (_dbus_pack_int32): uscore-prefix
1419 (_dbus_unpack_int32): uscore-prefix
1420 (_dbus_unpack_uint32): export
1421 (_dbus_demarshal_string): add @todo complaining about use of
1423 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1424 handling allowing corrupt data to go unchecked
1426 2003-01-08 Havoc Pennington <hp@redhat.com>
1428 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1429 to the select() as needed for authentication. (should be using
1430 _dbus_poll() not select, but for another day)
1432 * dbus/dbus.h: include dbus/dbus-protocol.h
1434 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1436 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1439 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1441 * dbus/dbus-internals.c: (_dbus_type_to_string):
1442 New function that returns a string describing a type.
1444 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1445 * dbus/dbus-marshal.h:
1446 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1447 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1448 (dbus_message_iter_get_byte_array):
1449 * dbus/dbus-message.h:
1450 Add new convenience functions for appending and getting message fields.
1451 Also add demarshalling routines for byte arrays.
1453 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1455 * dbus/dbus-connection-internal.h:
1456 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1457 (_dbus_connection_get_next_client_serial),
1458 (dbus_connection_send_message):
1459 * dbus/dbus-internals.h:
1460 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1461 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1462 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1463 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1464 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1465 (_dbus_verbose_bytes), (_dbus_marshal_test):
1466 * dbus/dbus-marshal.h:
1467 * dbus/dbus-message-internal.h:
1468 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1469 (dbus_message_write_header), (_dbus_message_lock),
1470 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1471 (dbus_message_get_name), (dbus_message_append_int32),
1472 (dbus_message_append_uint32), (dbus_message_append_double),
1473 (dbus_message_append_string), (dbus_message_append_byte_array),
1474 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1475 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1476 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1477 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1478 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1479 (decode_header_data), (_dbus_message_loader_return_buffer),
1480 (message_iter_test), (_dbus_message_test):
1481 * dbus/dbus-message.h:
1482 * dbus/dbus-protocol.h:
1483 * dbus/dbus-test.c: (main):
1485 * glib/test-dbus-glib.c: (message_handler), (main):
1486 * test/echo-client.c: (main):
1487 * test/watch.c: (check_messages):
1488 Make messages sendable and receivable for real.
1490 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1492 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1493 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1494 * dbus/dbus-message.c: (dbus_message_append_int32),
1495 (dbus_message_append_uint32), (dbus_message_append_double),
1496 (dbus_message_append_string), (dbus_message_append_byte_array):
1497 Handle OOM restoration.
1499 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1501 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1502 (_dbus_demarshal_string), (_dbus_marshal_test):
1503 * dbus/dbus-marshal.h:
1504 * dbus/dbus-message.c: (dbus_message_get_name),
1505 Document these functions.
1507 (dbus_message_append_int32), (dbus_message_append_uint32),
1508 (dbus_message_append_double), (dbus_message_append_string),
1509 (dbus_message_append_byte_array):
1510 * dbus/dbus-message.h:
1511 Add functions for adding message fields of different types.
1513 * dbus/dbus-protocol.h:
1514 Add the different types.
1516 2003-01-05 Havoc Pennington <hp@pobox.com>
1518 * bus/connection.c: implement routines for handling connections,
1519 first thing is keeping a list of owned services on each connection
1520 and setting up watches etc.
1522 * bus/services.c: implement a mapping from service names to lists
1525 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1527 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1528 to use static mutexes for global data
1530 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1531 collection of functions to set/get application-specific data
1532 on the DBusConnection.
1534 2003-01-04 Havoc Pennington <hp@pobox.com>
1536 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1537 (_dbus_poll): new function
1539 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1542 * bus/loop.c: initial code for the daemon main loop
1544 2003-01-04 Havoc Pennington <hp@pobox.com>
1546 * test/watch.c (error_handler): make it safe if the error handler
1547 is called multiple times (if we s/error handler/disconnect
1548 handler/ we should just guarantee it's called only once)
1550 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1551 error handler on disconnect (it's quite possible we should
1552 just change the error handler to a "disconnect handler," I'm
1553 not sure we have any other meaningful errors)
1555 * configure.in: check for getpwnam_r
1557 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1558 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1559 mechanism as in SASL spec, using socket credentials
1561 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1562 (_dbus_send_credentials_unix_socket): new function
1564 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1566 (_dbus_write): only check errno if <0 returned
1567 (_dbus_write_two): ditto
1569 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1571 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1572 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1573 (_dbus_marshal_test):
1574 * dbus/dbus-marshal.h:
1575 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1576 to _dbus_marshal_utf8_string. Also fix some tests.
1578 2002-12-28 Harri Porten <porten@kde.org>
1580 * configure.in: added check for C++ compiler and a very cheesy
1581 check for the Qt integration
1583 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1585 * qt/Makefile.am: added
1587 * qt/.cvsignore: added
1589 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1590 latter, added #ifdef QT_THREAD_SUPPORT guard.
1592 * dbus/Makefile.am: added missing headers for make dist
1594 2002-12-28 Kristian Rietveld <kris@gtk.org>
1596 * dbus/Makefile.am: fixup export-symbols-regex.
1598 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1600 * acinclude.m4: Add this file and put the
1601 PKG_CHECK_MODULE macro in it.
1603 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1605 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1606 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1607 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1608 (_dbus_marshal_test):
1609 Make the demarshalling routines align the pos argument.
1610 Add string marshalling tests and fix the obvious bugs
1613 2002-12-26 Havoc Pennington <hp@pobox.com>
1615 * dbus/dbus-auth.c: fixes fixes fixes
1617 * dbus/dbus-transport-unix.c: wire up support for
1618 encoding/decoding data on the wire
1620 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1621 (_dbus_auth_decode_data): append to target string
1622 instead of nuking it.
1624 2002-12-26 Havoc Pennington <hp@pobox.com>
1626 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1627 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1630 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1631 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1632 now). Main point is because I wanted unpack_uint32 to implement
1634 (_dbus_verbose_bytes): new function
1636 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1638 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1639 mechanism to handle a corrupt message stream
1640 (_dbus_message_loader_new): fix preallocation to only prealloc,
1643 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1644 (_dbus_string_test): enhance tests for copy/move and fix the
1647 * dbus/dbus-transport-unix.c: Hold references in more places to
1648 avoid reentrancy problems
1650 * dbus/dbus-transport.c: ditto
1652 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1653 leak reference count in no-message case
1655 * test/watch.c (do_mainloop): handle adding/removing watches
1656 during iteration over the watches. Also, ref the connection/server
1657 stored on a watch, so we don't try to mangle a destroyed one.
1659 * dbus/dbus-transport-unix.c (do_authentication): perform
1662 * dbus/dbus-auth.c (get_state): add a state
1663 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1664 (_dbus_auth_get_unused_bytes): append the unused bytes
1665 to the passed in string, rather than prepend
1667 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1668 the auth conversation DBusAuth
1670 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1671 (_dbus_transport_new_for_domain_socket): when creating a
1672 transport, pass in whether it's a client-side or server-side
1673 transport so we know which DBusAuth to create
1675 2002-12-03 Havoc Pennington <hp@pobox.com>
1677 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1678 _after_ finalizing the derived members
1679 (unix_connection_set): unref watch if we fail to add it
1681 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1682 transport first, so that the connection owned by the
1683 transport will be valid as the transport finalizes.
1685 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1686 if necessary, and remove watches from the connection.
1688 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1690 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1692 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1693 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1694 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1695 (_dbus_marshal_test):
1696 * dbus/dbus-marshal.h:
1697 Add string marshal functions and have the demarshal functions
1698 return the new position.
1700 2002-12-25 Havoc Pennington <hp@pobox.com>
1702 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1703 it is a simple protocol that just maps directly to SASL.
1705 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1706 initial implementation, not actually used yet.
1708 * dbus/dbus-string.c (_dbus_string_find): new function
1709 (_dbus_string_equal): new function
1710 (_dbus_string_base64_encode): new function
1711 (_dbus_string_base64_decode): new function
1713 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1716 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1717 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1718 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1719 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1720 * dbus/dbus-marshal.h:
1721 * dbus/dbus-protocol.h:
1722 * dbus/dbus-test.c: (main):
1724 Add un-optimized marshalling/demarshalling routines.
1726 2002-12-25 Harri Porten <porten@kde.org>
1728 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1730 2002-12-24 Zack Rusin <zack@kde.org>
1732 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1733 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1736 2002-12-24 Havoc Pennington <hp@pobox.com>
1738 * glib/dbus-gthread.c: fix include
1740 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1741 I think glib API needs to change, though, as you don't
1742 want to use DBusMessageFunction, you want to use the
1743 DBusMessageHandler object. Probably
1744 dbus_connection_open_with_g_main_loop()
1745 and dbus_connection_setup_g_main_loop() or something like that
1746 (but think of better names...) that just create a connection
1747 that has watch/timeout functions etc. already set up.
1749 * dbus/dbus-connection.c
1750 (dbus_connection_send_message_with_reply): new function just to
1751 show how the message handler helps us deal with replies.
1753 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1755 * dbus/dbus-string.c (_dbus_string_test): free a string that
1758 * dbus/dbus-hash.c: use memory pools for the hash entries
1759 (rebuild_table): be more paranoid about overflow, and
1760 shrink table when we can
1761 (_dbus_hash_test): reduce number of sprintfs and write
1762 valid C89. Add tests for case where we grow and then
1763 shrink the hash table.
1765 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1767 * dbus/dbus-connection.c (dbus_connection_register_handler)
1768 (dbus_connection_unregister_handler): new functions
1770 * dbus/dbus-message.c (dbus_message_get_name): new
1772 * dbus/dbus-list.c: fix docs typo
1774 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1775 an object representing a handler for messages.
1777 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1780 * glib/dbus-gthread.c: (dbus_gthread_init):
1781 Don't use the gdbus prefix for public functions.
1783 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1787 Add GLib checks and fixup .pc files
1791 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1792 (gdbus_connection_check), (gdbus_connection_dispatch),
1793 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1794 (dbus_connection_gsource_new):
1795 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1796 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1797 * glib/test-dbus-glib.c: (message_handler), (main):
1800 2002-12-15 Harri Porten <porten@kde.org>
1802 * autogen.sh: check for libtoolize before attempting to use it
1804 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1807 * .cvsignore: ignore more stamp files
1809 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1811 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1812 without make install.
1814 2002-12-15 Havoc Pennington <hp@pobox.com>
1816 * dbus/dbus-threads.c: add thread stubs that a higher library
1817 layer can fill in. e.g. the GLib wrapper might fill them in with
1818 GThread stuff. We still need to use this thread API to
1819 thread-safe-ize the library.
1821 2002-12-12 Havoc Pennington <hp@pobox.com>
1823 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1824 below new interfaces and include fewer system headers.
1826 * dbus/dbus-sysdeps.c (_dbus_read): new function
1827 (_dbus_write): new function
1828 (_dbus_write_two): new function
1829 (_dbus_connect_unix_socket): new function
1830 (_dbus_listen_unix_socket): new function
1832 * dbus/dbus-message-internal.h: change interfaces to use
1835 2002-12-11 Havoc Pennington <hp@pobox.com>
1837 * dbus/dbus-types.h: add dbus_unichar
1839 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1841 * dbus/dbus-connection.c (dbus_connection_send_message): return
1844 * dbus/dbus-transport.c: include dbus-watch.h
1846 * dbus/dbus-connection.c: include dbus-message-internal.h
1848 * HACKING: add file with coding guidelines stuff.
1850 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1851 handling here, for security purposes (as in vsftpd). Not actually
1852 using this class yet.
1854 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1855 system/libc usage here, as in vsftpd, for ease of auditing (and
1856 should also simplify portability). Haven't actually moved all the
1857 system/libc usage into here yet.
1859 2002-11-25 Havoc Pennington <hp@pobox.com>
1861 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1862 always print the first verbose message.
1864 2002-11-24 Havoc Pennington <hp@pobox.com>
1866 * test/echo-client.c, test/echo-server.c: cheesy test
1869 * configure.in (AC_CHECK_FUNCS): check for writev
1871 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1874 * dbus/dbus-list.c (_dbus_list_foreach): new function
1876 * dbus/dbus-internals.c (_dbus_verbose): new function
1878 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1879 representing a server that listens for connections.
1881 * dbus/.cvsignore: create
1883 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1884 public API for reporting errors
1886 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1887 public object representing a connection that
1888 sends/receives messages. (Same object used for
1889 both client and server.)
1891 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1892 Basic abstraction for different kinds of stream
1893 that we might read/write messages from.
1895 2002-11-23 Havoc Pennington <hp@pobox.com>
1897 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1900 * dbus/dbus-test.c (main): add list test, and include
1901 dbus-test.h as intended
1903 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1904 (_dbus_hash_table_remove_int): return value indicates
1905 whether the entry existed to remove
1907 * dbus/dbus-list.c: add linked list utility class,
1910 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1913 2002-11-23 Havoc Pennington <hp@pobox.com>
1915 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1916 DBUS_END_DECLS to nothing, that should fix this once and for all
1918 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1920 * dbus/dbus-message.c, dbus/dbus-hash.c:
1921 add some missing @brief
1923 2002-11-23 Havoc Pennington <hp@pobox.com>
1925 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1926 to avoid confusing Doxygen
1928 * dbus/dbus-hash.c: @} not }@
1930 * dbus/dbus-message.c (struct DBusMessage): split out
1933 2002-11-23 Havoc Pennington <hp@pobox.com>
1935 * configure.in: pile on more warning flags if using gcc
1937 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1938 to document static functions
1940 * configure.in: add summary to end of configure so it
1941 looks nice and attractive
1943 * dbus/dbus-hash.c: finish implementation and write unit
1946 * configure.in: add --enable-tests to enable unit tests
1948 * dbus/dbus-test.c: test program to run unit tests
1949 for all files in dbus/*, initially runs a test for
1952 * dbus/dbus-internals.h: file to hold some internal utility stuff
1954 2002-11-22 Havoc Pennington <hp@redhat.com>
1956 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1957 "ported" away from Tcl
1959 * dbus/dbus-types.h: header for types such as dbus_bool_t
1961 2002-11-22 Havoc Pennington <hp@redhat.com>
1963 * dbus/dbus.h: fixups for doc warnings
1965 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1967 (QUIET): make it quiet so we can see warnings
1969 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1971 2002-11-22 Havoc Pennington <hp@redhat.com>
1973 * Makefile.am: include "Doxyfile" target in all-local
1975 * configure.in: generate the Doxyfile
1977 * Doxyfile.in: move Doxyfile here, so we can use
1978 configure to generate a Doxyfile with the right
1981 2002-11-22 Havoc Pennington <hp@redhat.com>
1983 * dbus/dbus-message.c: move inline docs into .c file
1985 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1986 so all docs are under doc/
1987 (MAN_EXTENSION): generate man pages. Use extension
1988 ".3dbus" which matches ".3qt" on my system,
1989 I guess this is OK, I don't know really.
1990 (FILE_PATTERNS): look for .c files not .h, makes sense
1993 2002-11-22 Havoc Pennington <hp@pobox.com>
1995 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1996 because any app can be a server, and any app can be a client,
1997 the bus is a special kind of server.
1999 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2001 * Doxyfile : adding. Still needs Makefile rules to be generated
2002 automatically (just run "doxygen" in the toplevel dir for now to
2005 * dbus/dbus-message.h : Adding sample docs (javadoc since
2006 resembles gtk-doc a little more)
2008 * dbus/dbus.h : Adding sample docs
2010 2002-11-21 Havoc Pennington <hp@redhat.com>
2012 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2013 so we can allow ourselves to include files directly,
2014 instead of having to use dbus.h
2016 * dbus/dbus.h: fill in
2018 * dbus/dbus-message.h: sketch out a sample header file.
2019 Include griping if you include it directly instead of
2022 * dbus/dbus-macros.h: new file with macros for extern "C",
2023 TRUE/FALSE, NULL, etc.
2025 * doc/file-boilerplate.c: put include guards in here
2027 2002-11-21 Havoc Pennington <hp@redhat.com>
2029 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2031 * COPYING: include the GPL as well, and license code
2032 under both AFL and GPL.
2034 2002-11-21 Havoc Pennington <hp@redhat.com>
2036 * acconfig.h: get rid of this
2038 * autogen.sh (run_configure): add --no-configure option
2040 * configure.in: remove AC_ARG_PROGRAM to make
2041 autoconf complain less. add AC_PREREQ.
2042 add AC_DEFINE third arg.
2044 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2047 Fix references so we can distcheck.
2049 2002-11-21 Havoc Pennington <hp@redhat.com>
2051 * Initial module creation