1 2003-02-26 Havoc Pennington <hp@redhat.com>
3 All kinds of audit fixes from Owen, plus initial attempt to
4 handle unaligned memory returned from malloc.
6 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7 leave room for align_offset and nul byte
8 (fixup_alignment): function to track an align_offset and
9 ensure real->str is aligned
10 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
11 to allow a nul byte plus align offset
12 (_dbus_string_lock): fix overflow issue
13 (_dbus_string_init_const_len): add assertions on sanity of len,
14 assign allocated to be ALLOCATION_PADDING larger than len
15 (set_length): fixup the overflow handling
16 (_dbus_string_get_data_len): fix overflow in assertion
17 (open_gap): detect overflow in size of gap to be opened
18 (_dbus_string_lengthen): add overflow check
19 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
20 (_dbus_string_append): add overflow check
21 (_dbus_string_append_unichar): overflow
22 (_dbus_string_delete): fix overflow in assertion
23 (_dbus_string_copy_len): overflow in assertion
24 (_dbus_string_replace_len): overflows in assertions
25 (_dbus_string_find): change to implement in terms of
27 (_dbus_string_find_to): assorted fixage
28 (_dbus_string_equal_c_str): assert c_str != NULL,
29 fix logic so the function works
30 (_dbus_string_ends_with_c_str): fix overflow thingy
31 (_dbus_string_base64_encode): overflow fix
32 (_dbus_string_validate_ascii): overflow
33 (_dbus_string_validate_nul): overflow
35 2003-02-26 Havoc Pennington <hp@redhat.com>
37 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
39 2003-02-26 Alexander Larsson <alexl@redhat.com>
42 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
44 * dbus/dbus-connection.c:
45 * dbus/dbus-connection.h:
46 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
47 Add dbus_connection_set_wakeup_main_function and use it when queueing
48 incoming and outgoing messages.
51 * dbus/dbus-dataslot.c:
52 Threadsafe usage of DBusDataSlotAllocator
54 * dbus/dbus-message.c: (dbus_message_get_args_iter):
57 * dbus/dbus-server-unix.c:
61 Implement the new wakeup functions for glib.
64 * glib/test-thread-client.c:
65 * glib/test-thread-server.c:
67 Initial cut at some thread test code. Not really done yet.
69 2003-02-26 Havoc Pennington <hp@pobox.com>
71 * dbus/dbus-connection.c
72 (dbus_connection_send_message_with_reply_and_block): fix crash
73 where we ref'd the outgoing message instead of the returned reply
75 * dbus/dbus-transport-unix.c (do_authentication): check read watch
76 at the end of this function, so if we didn't need to read for
77 authentication, we reinstall it for receiving messages
79 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
80 a NULL sender for peer-to-peer case
82 * dbus/dbus-transport-unix.c (check_read_watch): handle
83 !authenticated case correctly
85 * glib/dbus-gmain.c: add support for DBusServer
87 * dbus/dbus-server.c: add data slot support
89 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
90 return values and handle errors
92 * dbus/dbus-dataslot.c: factor out the data slot stuff from
95 * Doxyfile.in (INPUT): add glib subdir
97 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
98 setup_with_g_main instead of hookup_with_g_main; write docs
100 2003-02-24 Anders Carlsson <andersca@codefactory.se>
102 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
103 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
104 * dbus/dbus-message.c: (dbus_message_append_boolean),
105 (dbus_message_append_boolean_array),
106 (dbus_message_get_args_valist), (_dbus_message_test):
107 * dbus/dbus-message.h:
108 * doc/dbus-specification.sgml:
109 Various fixes as pointed out by Havoc.
111 * test/data/invalid-messages/bad-boolean-array.message:
112 * test/data/invalid-messages/bad-boolean.message:
113 Add invalid boolean value test cases.
115 2003-02-24 Anders Carlsson <andersca@codefactory.se>
117 * dbus/dbus-internals.c: (_dbus_type_to_string):
118 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
119 (_dbus_marshal_validate_arg):
120 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
121 * dbus/dbus-message.c: (dbus_message_append_args_valist),
122 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
123 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
124 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
125 (dbus_message_iter_get_double),
126 (dbus_message_iter_get_boolean_array), (message_iter_test):
127 * dbus/dbus-message.h:
128 * dbus/dbus-protocol.h:
129 * doc/dbus-specification.sgml:
130 * test/data/valid-messages/lots-of-arguments.message:
131 Add support for boolean and boolean array types.
133 2003-02-23 Havoc Pennington <hp@pobox.com>
135 * dbus/dbus-keyring.c: finish most of this implementation and
138 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
139 these barf if the error isn't cleared to NULL
141 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
142 (_dbus_create_directory): new function
144 * dbus/dbus-errors.c (dbus_set_error): fix warning
146 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
147 (_dbus_string_hex_decode): new function
148 (test_hex_roundtrip): test code
150 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
152 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
154 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
155 the save-to-temp/rename trick to atomically write the new file
156 (_dbus_string_parse_uint): new function
158 2003-02-22 Havoc Pennington <hp@pobox.com>
160 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
162 2003-02-22 Havoc Pennington <hp@pobox.com>
164 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
165 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
167 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
169 * dbus/test/data/sha-1: add US government test suite for SHA-1
171 2003-02-21 Anders Carlsson <andersca@codefactory.se>
173 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
174 Make string arrays NULL-terminated.
176 * dbus/dbus-memory.c: (dbus_free_string_array):
177 * dbus/dbus-memory.h:
178 New function for freeing NULL-terminated string arrays.
180 * dbus/dbus-message-builder.c: (append_quoted_string),
181 (_dbus_message_data_load):
182 Add support for array types.
184 * dbus/dbus-message.c: (check_message_handling):
185 Add more types as test cases.
187 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
188 (_dbus_string_parse_double):
189 Add the start offset to the end offset.
191 * test/data/valid-messages/lots-of-arguments.message:
192 New test message with lots of arguments.
194 2003-02-21 Anders Carlsson <andersca@codefactory.se>
196 * dbus/dbus-message.c: (dbus_message_append_nil),
197 (dbus_message_append_int32), (dbus_message_append_uint32),
198 (dbus_message_append_double), (dbus_message_append_string),
199 (dbus_message_append_int32_array),
200 (dbus_message_append_uint32_array),
201 (dbus_message_append_double_array),
202 (dbus_message_append_byte_array),
203 (dbus_message_append_string_array):
204 Fix all out-of-memory handling in these functions.
206 2003-02-21 Anders Carlsson <andersca@codefactory.se>
208 * dbus/dbus-message.c: (dbus_message_append_nil):
211 2003-02-21 Anders Carlsson <andersca@codefactory.se>
213 * dbus/dbus-message.c: (dbus_message_append_args_valist),
214 (dbus_message_append_nil), (dbus_message_append_int32_array),
215 (dbus_message_append_uint32_array),
216 (dbus_message_append_double_array),
217 (dbus_message_append_byte_array),
218 (dbus_message_append_string_array), (dbus_message_get_args_valist),
219 (dbus_message_iter_get_int32_array),
220 (dbus_message_iter_get_uint32_array),
221 (dbus_message_iter_get_double_array),
222 (dbus_message_iter_get_byte_array),
223 (dbus_message_iter_get_string_array):
225 * dbus/dbus-message.h:
226 Add functions for appending and getting arrays.
228 2003-02-21 Anders Carlsson <andersca@codefactory.se>
230 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
231 element size at least 8 bytes, fixes mempool tests on
234 2003-02-20 Alexander Larsson <alexl@redhat.com>
236 * dbus/dbus-transport-unix.c (unix_do_iteration):
237 Unlock the connection mutex during a blocking select call.
238 Add todo about how we need a way to wake up the select.
240 * dbus/dbus-connection-internal.h:
241 * dbus/dbus-connection.c:
242 Add _dbus_connection_lock and _dbus_connection_unlock.
244 2003-02-19 Havoc Pennington <hp@pobox.com>
246 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
247 Doxyfile.in, not Doxyfile
249 * dbus/dbus-keyring.c: do some hacking on this
251 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
253 * dbus/dbus-errors.c (dbus_set_error_const): do not call
255 (dbus_set_error): remove dbus_error_init, check for message ==
256 NULL *before* we sprintf into it, and add @todo about including
257 system headers in this file
259 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
261 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
263 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
264 get various bits of user information based on either username
266 (_dbus_homedir_from_username): new function
268 2003-02-19 Anders Carlsson <andersca@codefactory.se>
271 Add check for nonposix getpwnam_r
273 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
274 Align the pool element size to a sizeof (void *) boundary.
276 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
277 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
278 General Solaris fixes.
280 * test/data/valid-messages/simplest-manual.message:
281 Explicitly state that we want little-endian packing.
283 2003-02-19 Mikael Hallendal <micke@codefactory.se>
285 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
287 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
288 Added to create a transport connecting using a tcp/ip socket.
290 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
291 to a tcp socket at given host and port.
292 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
295 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
297 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
298 Added to create a server listening on a TCP/IP socket.
300 2003-02-19 Havoc Pennington <hp@pobox.com>
302 Throughout: mop up all the Doxygen warnings and undocumented
305 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
308 * dbus/dbus-threads.c: move global mutex initializers to
309 dbus-internals.h, multiple prototypes was confusing doxygen
310 besides being kind of ugly
312 * Doxyfile (PREDEFINED): have Doxygen define
313 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
314 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
315 (do not abuse the feature! it's for stuff like the autogenerated
316 macros in dbus-md5.c, not just for things you don't feel like
319 2003-02-18 Havoc Pennington <hp@pobox.com>
321 * dbus/dbus-string.c (_dbus_string_zero): new function
323 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
324 wrap it in some dbus-friendly API
326 * dbus/dbus-types.h: add 16-bit types
328 2003-02-18 Joe Shaw <joe@assbarn.com>
330 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
331 credentials from our currently running process.
332 (get_word): Fix a buglet where we were copying the entire length
333 instead of relative to our position.
335 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
336 keys on the stack... it's 640k of data.
338 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
339 read the credentials byte off the socket, even if we don't have
341 (_dbus_poll): Implement poll() using select() for systems which
344 * glib/test-dbus-glib.c (main): Print out an error if no
345 parameters are given.
347 * test/data/auth/fallback.auth-script: Added. Tests that a client
348 can fallback to a secondary auth mechanism if the first fails.
350 2003-02-18 Havoc Pennington <hp@pobox.com>
354 2003-02-17 Havoc Pennington <hp@pobox.com>
356 * doc/dbus-specification.sgml: lots of cosmetic
357 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
358 env variable to DBUS_BUS_ADDRESS, s/client/application/,
359 s/server/bus/ (except in authentication section). Add a section
360 "Message Bus Message Routing"
362 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
368 2003-02-17 Anders Carlsson <andersca@codefactory.se>
370 * doc/dbus-specification.sgml:
371 Specification updates.
373 2003-02-17 Anders Carlsson <andersca@codefactory.se>
375 * bus/activation.c: (bus_activation_init), (child_setup),
376 (bus_activation_activate_service):
378 * bus/main.c: (main):
379 Set DBUS_ADDRESS environment variable.
381 * dbus/dbus-errors.c: (dbus_set_error):
382 Don't use va_copy since that's a C99 feature.
384 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
386 * dbus/dbus-sysdeps.h:
387 Add child_setup_func to _dbus_spawn_async.
389 * doc/dbus-specification.sgml:
390 Update specification.
392 * test/spawn-test.c: (setup_func), (main):
395 2003-02-17 Alexander Larsson <alexl@redhat.com>
397 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
400 2003-02-17 Anders Carlsson <andersca@codefactory.se>
404 * doc/dbus-test-plan.sgml:
405 Add test plan document.
410 2003-02-17 Anders Carlsson <andersca@codefactory.se>
412 * dbus/dbus-message.c: (decode_header_data),
413 (_dbus_message_loader_return_buffer):
414 Set the header padding amount when loading a message.
416 2003-02-16 Anders Carlsson <andersca@codefactory.se>
418 * bus/dispatch.c: (send_one_message):
419 Only send broadcast messages to registered connections.
421 * dbus/dbus-message.c: (dbus_message_name_is):
422 * dbus/dbus-message.h:
423 New convenience function.
425 * dbus/dbus-transport-debug.c: (do_reading):
426 Only dispatch one message per run.
429 * test/bus-test.c: (new_connection_callback), (die),
430 (test_hello_client1_handler), (test_hello_client2_handler),
431 (test_hello_replies), (main):
433 * test/bus-test-loop.[ch]:
436 2003-02-16 Havoc Pennington <hp@pobox.com>
438 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
441 2003-02-16 Alexander Larsson <alexl@redhat.com>
443 * dbus/dbus-connection.c:
444 Implement sent_message_with_reply. (with_reply_and block is still
446 Made dispatch_message not lose message if OOM.
448 * dbus/dbus-errors.h:
449 Add NoReply error (for reply timeouts).
451 2003-02-16 Alexander Larsson <alexl@redhat.com>
453 * dbus/dbus-hash.c (_dbus_hash_table_unref):
454 Actually free keys and values when destroying hashtable.
456 2003-02-16 Anders Carlsson <andersca@codefactory.se>
458 * dbus/dbus-auth.c: (client_try_next_mechanism):
461 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
462 Return TRUE if there's no thread implementation around.
464 * glib/dbus-gmain.c: (free_source),
465 (dbus_connection_hookup_with_g_main):
466 Make sure to remove the GSource when the connection is finalized.
468 2003-02-16 Anders Carlsson <andersca@codefactory.se>
470 * bus/dispatch.c: (bus_dispatch_message_handler):
471 * dbus/dbus-errors.h:
472 Return an error if someone tries to send a message to a service
475 2003-02-16 Anders Carlsson <andersca@codefactory.se>
477 * bus/activation.c: (load_directory), (bus_activation_init),
478 (bus_activation_activate_service):
481 (bus_driver_handle_activate_service), (bus_driver_handle_message):
482 More work on the activation handling.
484 * dbus/dbus-errors.h:
485 Add some error messages
487 * dbus/dbus-message.c: (dbus_message_new_error_reply):
488 * dbus/dbus-message.h:
489 New function that creates an error message.
491 * dbus/dbus-protocol.h:
492 Add ACTIVATE_SERVER message.
494 * dbus/dbus-server-unix.c: (unix_handle_watch),
495 (_dbus_server_new_for_domain_socket):
496 Call _dbus_fd_set_close_on_exec.
498 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
499 (_dbus_spawn_async), (_dbus_disable_sigpipe),
500 (_dbus_fd_set_close_on_exec):
501 * dbus/dbus-sysdeps.h:
502 Add _dbus_fd_set_close_on exec function. Also add function that checks
503 that all open fds are set to close-on-exec and warns otherwise.
505 * dbus/dbus-transport-unix.c:
506 (_dbus_transport_new_for_domain_socket):
507 Call _dbus_fd_set_close_on_exec.
509 2003-02-16 Havoc Pennington <hp@pobox.com>
511 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
512 allow people to avoid setting SIGPIPE to SIG_IGN
513 (_dbus_connection_new_for_transport): disable SIGPIPE unless
514 we've been asked not to
516 2003-02-15 Anders Carlsson <andersca@codefactory.se>
518 * dbus/dbus-list.c: (_dbus_list_append_link),
519 (_dbus_list_prepend_link):
520 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
524 2003-02-15 Anders Carlsson <andersca@codefactory.se>
527 * bus/activation.c: (bus_activation_entry_free),
528 (add_desktop_file_entry), (load_directory), (bus_activation_init):
530 * bus/main.c: (main):
531 Add simple activation support, doesn't work yet though.
533 2003-02-15 Zack Rusin <zack@kde.org>
535 * qt/dbus-qthread.cpp: small casting fix
537 2003-02-15 Anders Carlsson <andersca@codefactory.se>
539 * dbus/dbus-errors.c: (dbus_set_error):
540 * dbus/dbus-errors.h:
541 Add a few errors and make dbus_set_error void.
543 * dbus/dbus-sysdeps.c:
544 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
545 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
546 * dbus/dbus-sysdeps.h:
547 Add _dbus_spawn_async.
549 * test/spawn-test.c: (main):
550 Test for _dbus_spawn_async.
552 2003-02-15 Anders Carlsson <andersca@codefactory.se>
554 * dbus/dbus-internals.h:
555 Fix build without tests.
557 * dbus/dbus-list.c: (alloc_link):
558 Fix a segfault when a malloc fails.
560 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
561 (dbus_malloc0), (dbus_realloc):
562 Add support for malloc debugging.
564 2003-02-15 Alexander Larsson <alexl@redhat.com>
566 * dbus/dbus-threads.c:
567 * dbus/dbus-threads.h:
568 Add condvars. Remove static mutext from API.
569 Implement static mutexes by initializing them from threads_init.
571 * glib/dbus-gthread.c:
572 * qt/dbus-qthread.cpp:
573 Update with the thread api changes.
578 Turn StaticMutex into normal mutex + init function.
579 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
580 _dbus_list_append_link, _dbus_list_prepend_link
583 * dbus/dbus-sysdeps.c:
584 * dbus/dbus-sysdeps.h:
585 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
586 _dbus_atomic_dec. Only slow fallback implementation at the moment.
588 * dbus/dbus-protocol.h:
589 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
591 * dbus/dbus-message.c:
592 Make ref/unref atomic.
595 * dbus/dbus-connection-internal.h:
596 * dbus/dbus-connection.c:
597 * dbus/dbus-connection.h:
599 Change _peek to _borrow,_return & _steal_borrowed.
600 Change disconnect callback to event.
601 Make dbus_connection_dispatch_messages reentrant.
603 * dbus/dbus-transport.c:
604 Don't ref the connection on calls to the transport
607 * dbus/dbus-message-handler.c:
611 Don't use peek_message anymore
614 * test/debug-thread.c:
615 * test/debug-thread.h:
616 Simple thread implementation that asserts() on deadlocks in
617 single-threaded code.
620 (main) Call debug_threads_init.
623 Use disconnect message instead of disconnect callback.
627 Don't call dbus_connection_set_disconnect_function. Instead export
628 bus_connection_disconnect.
631 Call bus_connection_disconnect when we get a disconnected message.
633 2003-02-15 Havoc Pennington <hp@pobox.com>
635 * dbus/dbus-message.c (dbus_message_new): fool around with the
638 2003-02-14 Havoc Pennington <hp@pobox.com>
640 * dbus/dbus-mempool.c: fail if the debug functions so indicate
642 * dbus/dbus-memory.c: fail if the debug functions indicate we
645 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
646 (_dbus_decrement_fail_alloc_counter): debug functions to
647 simulate memory allocation failures
649 2003-02-14 Havoc Pennington <hp@pobox.com>
651 * dbus/dbus-errors.h (struct DBusError): add a word of padding
654 2003-02-13 Anders Carlsson <andersca@codefactory.se>
656 * bus/driver.c: (bus_driver_handle_hello):
658 * bus/services.c: (bus_service_lookup):
659 Reorder message sending so we get a more sane order.
661 * test/bus-test.c: (message_handler):
664 2003-02-13 Anders Carlsson <andersca@codefactory.se>
666 * bus/driver.c: (bus_driver_send_service_deleted),
667 (bus_driver_send_service_created), (bus_driver_send_service_lost),
668 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
669 (bus_driver_send_welcome_message),
670 (bus_driver_handle_list_services),
671 (bus_driver_handle_acquire_service),
672 (bus_driver_handle_service_exists):
673 * dbus/dbus-bus.c: (dbus_bus_register_client),
674 (dbus_bus_acquire_service), (dbus_bus_service_exists):
675 * dbus/dbus-errors.c: (dbus_result_to_string):
676 * dbus/dbus-errors.h:
677 * dbus/dbus-message.c: (dbus_message_append_args),
678 (dbus_message_append_args_valist), (dbus_message_get_args),
679 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
680 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
681 (dbus_message_iter_get_byte_array),
682 (dbus_message_iter_get_string_array), (message_iter_test),
683 (check_message_handling), (_dbus_message_test):
684 * dbus/dbus-message.h:
685 * test/bus-test.c: (main):
686 Change fields to arguments in messages, so that they won't be
687 confused with header fields.
689 * glib/test-dbus-glib.c: (main):
690 Remove append_fields from hello message.
692 2003-02-13 Anders Carlsson <andersca@codefactory.se>
694 * dbus/dbus-errors.c:
695 * dbus/dbus-message.c:
696 * dbus/dbus-string.c:
699 2003-02-13 Anders Carlsson <andersca@codefactory.se>
701 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
703 Implement support for timeouts in dbus-glib.
705 2003-02-13 Anders Carlsson <andersca@codefactory.se>
707 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
708 * dbus/dbus-message.c: (process_test_subdir):
709 * test/break-loader.c: (find_breaks_based_on):
710 Plug some memory leaks.
712 2003-02-13 Richard Hult <rhult@codefactory.se>
714 * bus/main.c: Fix build.
716 * dbus/dbus-errors.h:
717 * dbus/dbus-errors.c: Fix copyright for Anders.
719 2003-02-13 Anders Carlsson <andersca@codefactory.se>
724 * bus/connection.c: (bus_connection_foreach):
727 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
728 (unescape_string), (new_section), (parse_section_start),
729 (parse_key_value), (report_error), (bus_desktop_file_load),
730 (bus_desktop_file_get_string):
731 * bus/desktop-file.h:
732 Use DBusError for error reporting.
734 * bus/dispatch.c: (send_one_message),
735 (bus_dispatch_message_handler):
736 * bus/driver.c: (bus_driver_send_service_deleted),
737 (bus_driver_send_service_created), (bus_driver_send_service_lost),
738 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
739 (bus_driver_send_welcome_message),
740 (bus_driver_handle_list_services),
741 (bus_driver_handle_acquire_service),
742 (bus_driver_handle_service_exists):
743 * bus/loop.c: (bus_loop_run):
745 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
747 * bus/utils.c: (bus_wait_for_memory):
749 New files with general utility functions.
751 * dbus/dbus-internals.h:
752 Remove _DBUS_HANDLE_OOM.
754 2003-02-13 Anders Carlsson <andersca@codefactory.se>
756 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
757 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
758 * dbus/dbus-errors.h:
759 Add DBusError structure.
761 2003-02-13 Anders Carlsson <andersca@codefactory.se>
763 * test/data/valid-messages/standard-acquire-service.message:
764 * test/data/valid-messages/standard-hello.message:
765 * test/data/valid-messages/standard-list-services.message:
766 * test/data/valid-messages/standard-service-exists.message:
767 Add some standard messages.
769 2003-02-13 Anders Carlsson <andersca@codefactory.se>
771 * bus/driver.c: (bus_driver_send_welcome_message),
772 (bus_driver_handle_list_services),
773 (bus_driver_handle_acquire_service),
774 (bus_driver_handle_service_exists), (bus_driver_handle_message):
775 Update for API changes in libdbus.
777 * dbus/dbus-message.c: (dbus_message_new_reply):
778 * dbus/dbus-message.h:
779 Remove the name argument. The spec states that replies shouldn't
782 2003-02-13 Anders Carlsson <andersca@codefactory.se>
784 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
785 (report_error), (bus_desktop_file_load), (lookup_section),
786 (lookup_line), (bus_desktop_file_get_raw),
787 (bus_desktop_file_get_string):
788 * bus/desktop-file.h:
789 Some fixes, and new functions for getting a key value from a section.
791 2003-02-13 Havoc Pennington <hp@pobox.com>
793 * test/data/auth/fail-after-n-attempts.auth-script: new test
795 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
798 2003-02-13 Havoc Pennington <hp@pobox.com>
800 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
801 dbus_credentials_match were backward
803 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
804 NO_CREDENTIALS and ROOT_CREDENTIALS
806 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
807 into here. Never process more commands after we've reached an
808 end state; store further data as unused bytes.
810 * test/data/auth/*: add more auth tests
812 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
813 command to match exact string and EXPECT_UNUSED to match unused
816 * test/Makefile.am (dist-hook): fix to dist all the test stuff
818 2003-02-12 Havoc Pennington <hp@pobox.com>
820 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
821 \r off of popped lines
823 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
826 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
829 2003-02-12 Havoc Pennington <hp@pobox.com>
831 * dbus/Makefile.am: remove break-loader from the build, since it
834 * configure.in: add --enable-gcov to turn on coverage profiling
835 flags and disable optimization
837 2003-02-10 Havoc Pennington <hp@pobox.com>
839 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
840 initial cut at test framework for DBusAuth from laptop.
841 Doesn't quite work yet but it compiles and I need to get
842 it off the 266mhz laptop. ;-)
844 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
845 fix a memleak in error case
847 2003-02-12 Anders Carlsson <andersca@codefactory.se>
850 * bus/desktop-file.c:
851 * bus/desktop-file.h:
852 Add a desktop file parser.
854 2003-02-11 Zack Rusin <zack@kde.org>
856 * qt/message.[h|cpp]: sample implementation
857 of the KDE wrapper for DBusMessage
859 2003-02-09 Zack Rusin <zack@kde.org>
861 * test/bus-test.c: make_it_compile
862 * doc/dbus-specification.sgml: minimal semantic fix
864 2003-02-06 Anders Carlsson <andersca@codefactory.se>
870 2003-02-06 Anders Carlsson <andersca@codefactory.se>
873 * dbus/dbus-break-loader.c:
875 * test/break-loader.c:
876 Move dbus-break-loader to test/ and rename it to break-loader.
878 2003-02-02 Havoc Pennington <hp@pobox.com>
880 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
881 for code to manage cookies in your home directory
883 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
885 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
886 to authenticate, then disconnect the client.
888 2003-02-03 Alexander Larsson <alexl@redhat.com>
890 * dbus/dbus-message.c (dbus_message_append_fields):
893 2003-02-02 Anders Carlsson <andersca@codefactory.se>
895 * doc/dbus-specification.sgml:
896 Update address format section.
898 2003-02-02 Anders Carlsson <andersca@codefactory.se>
901 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
902 (message_handler), (new_connection_callback), (loop_quit),
906 2003-02-02 Anders Carlsson <andersca@codefactory.se>
908 * bus/driver.c: (bus_driver_handle_service_exists):
909 Simplify the code a bit.
911 * dbus/dbus-bus.c: (dbus_bus_service_exists):
914 2003-02-02 Anders Carlsson <andersca@codefactory.se>
917 Add libdbus-daemon.la and link to it.
919 2003-02-01 James Willcox <jwillcox@gnome.org>
921 * bus/driver.c: (bus_driver_handle_own_service):
922 Actually include the service reply code in the message.
924 2003-02-02 Anders Carlsson <andersca@codefactory.se>
926 * bus/driver.c: (bus_driver_handle_service_exists):
927 Don't unref the incoming message.
929 2003-02-02 Anders Carlsson <andersca@codefactory.se>
931 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
933 2003-02-02 Anders Carlsson <andersca@codefactory.se>
935 * dbus/dbus-server.c: (dbus_server_listen):
936 * dbus/dbus-transport.c: (_dbus_transport_open):
937 ifdef out the calls to the debug transport and server.
939 2003-02-02 Alexander Larsson <alexl@redhat.com>
941 * dbus/dbus-watch.c (dbus_watch_get_flags):
942 Add note in the docs that ERROR or HANGUP won't be returned
943 and are assumed always on.
945 * glib/dbus-gmain.c (add_watch):
946 Always add IO_ERR | IO_HUP
948 * dbus/dbus-message.h:
949 Add semicolon after dbus_message_iter_get_string_array().
950 Makes qt code build again
952 2003-02-01 Anders Carlsson <andersca@codefactory.se>
954 * bus/driver.c: (create_unique_client_name),
955 (bus_driver_handle_hello):
956 Don't take a name, just use a numeric id to identify
960 * dbus/dbus-bus.c: (dbus_bus_register_client),
961 (dbus_bus_acquire_service), (dbus_bus_service_exists):
963 Add new convenience functions for communicating with the bus.
965 * dbus/dbus-message.h:
967 * dbus/dbus-protocol.h:
970 2003-02-01 Alexander Larsson <alexl@redhat.com>
972 * dbus/dbus-message.c (dbus_message_append_fields):
973 Add some more doc comments.
975 2003-02-01 Havoc Pennington <hp@pobox.com>
977 * dbus/dbus-break-loader.c (randomly_modify_length): change
978 a 4-byte value in the message as if it were a length
980 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
981 execute bit on saved files
983 2003-02-01 Havoc Pennington <hp@pobox.com>
985 * dbus/dbus-break-loader.c (main): new program to find messages
986 that break the loader.
988 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
989 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
991 * dbus/dbus-string.c (_dbus_string_set_byte): new
993 2003-01-31 Havoc Pennington <hp@pobox.com>
995 * dbus/dbus-message.c: refactor the test code to be more general,
996 in preparation for writing a "randomly permute test cases to
997 try to break the loader" program.
999 2003-01-31 Havoc Pennington <hp@pobox.com>
1001 * doc/dbus-specification.sgml: work on the specification
1003 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1004 the protocol version of the message.
1006 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1007 no longer specifies that.
1008 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1011 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1012 "break" for DBUS_TYPE_NIL, remove @todo
1014 2003-01-31 Havoc Pennington <hp@pobox.com>
1016 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1017 just set_is_error/get_is_error as this is a commonly-used
1018 function, and write docs.
1020 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1022 * dbus/dbus-address.c: (dbus_address_entry_free):
1023 Free key and value lists.
1025 * dbus/dbus-internals.c: (_dbus_type_to_string):
1026 Add the types we didn't have.
1028 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1029 (_dbus_marshal_validate_arg):
1032 * dbus/dbus-message.c: (dbus_message_set_sender):
1033 Remove todo about being able to set sender to NULL.
1035 (dbus_message_set_is_error_reply),
1036 (dbus_message_get_is_error_reply):
1037 * dbus/dbus-message.h:
1040 * dbus/dbus-protocol.h:
1041 Add error reply flag.
1043 * test/data/valid-messages/opposite-endian.message:
1044 Add NIL type to test.
1046 2003-01-31 Havoc Pennington <hp@pobox.com>
1048 * doc/dbus-specification.sgml: fully specify the header. Add
1049 flags and major protocol version, and change header/body len to
1052 * dbus/dbus-message-builder.c (append_saved_length): append length
1055 * dbus/dbus-message.c (dbus_message_create_header): change header
1056 length and body length to unsigned. Add the new fields from the
1058 (_dbus_message_loader_return_buffer): unsigned header/body len
1060 2003-01-30 Havoc Pennington <hp@pobox.com>
1062 * dbus/dbus-auth.c: rework to use only REJECTED, no
1065 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1066 use REJECTED, suggested by Mark McLoughlin
1068 2003-01-30 Havoc Pennington <hp@pobox.com>
1070 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1071 a better way to report errors here. e.g. "unix address lacks
1072 path" or something. also "no such file" when the path doesn't
1075 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1077 (dbus_parse_address): add @todo about documenting address format,
1078 and allowing , and ; to be escaped
1080 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1083 Add dbus-address.[ch]
1085 * dbus/dbus-address.c: (dbus_address_entry_free),
1086 (dbus_address_entries_free), (create_entry),
1087 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1088 (dbus_parse_address), (_dbus_address_test):
1089 * dbus/dbus-address.h:
1090 New files for dealing with address parsing.
1092 * dbus/dbus-connection.c:
1093 Document timeout functions.
1095 * dbus/dbus-message.c:
1096 Document dbus_message_new_from_message.
1098 * dbus/dbus-server-debug.c:
1101 * dbus/dbus-server.c: (dbus_server_listen):
1102 Parse address and use correct server implementation.
1104 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1105 * dbus/dbus-string.h:
1106 New function with test.
1108 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1112 * dbus/dbus-transport-debug.c:
1115 * dbus/dbus-transport.c: (_dbus_transport_open):
1116 Parse address and use correct transport implementation.
1118 2003-01-30 Havoc Pennington <hp@pobox.com>
1120 * dbus/dbus-message.c: use message->byte_order instead of
1121 DBUS_COMPILER_BYTE_ORDER throughout.
1122 (dbus_message_create_header): pad header to align the
1123 start of the body of the message to 8-byte boundary
1125 * dbus/dbus-marshal.h: make all the demarshalers take const
1126 DBusString arguments.
1128 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1129 validate message args here, so we don't have to do slow validation
1130 later, and so we catch bad messages as they are incoming. Also add
1131 better checks on header_len and body_len. Also fill in
1134 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1135 implemented properly)
1136 (_dbus_string_validate_nul): new function to check all-nul
1138 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1139 get_arg_end_pos and remove all validation
1140 (_dbus_marshal_validate_arg): actually do validation here.
1142 2003-01-29 Havoc Pennington <hp@pobox.com>
1144 * dbus/dbus-message.c (check_message_handling): fix assertion
1145 failure on set_client_serial
1147 2003-01-28 Havoc Pennington <hp@pobox.com>
1149 * dbus/dbus-server-debug.c: Add doc section comments
1151 * dbus/dbus-transport-debug.c: add doc section comments
1153 2003-01-28 Havoc Pennington <hp@redhat.com>
1155 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1156 the reverse order from how I had it
1157 (_dbus_string_base64_encode): reverse encoding order. I was
1158 basically byteswapping everything during encoding.
1160 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1162 * dbus/dbus-connection-internal.h:
1163 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1164 (_dbus_connection_remove_timeout):
1165 Add functions for adding and removing timeouts.
1167 * dbus/dbus-message.c: (dbus_message_new_from_message):
1168 Add new function that takes a message and creates an exact
1169 copy of it, but with the refcount set to 1.
1170 (check_message_handling):
1173 * dbus/dbus-server-protected.h:
1174 * dbus/dbus-server.c: (_dbus_server_init_base),
1175 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1176 (dbus_server_set_timeout_functions):
1177 (_dbus_server_remove_timeout):
1178 New functions so that a server can add and remove timeouts.
1180 (dbus_server_listen):
1181 Add commented out call to dbus_server_debug_new.
1183 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1184 Actually set the handler, doh.
1186 * dbus/dbus-transport.c: (_dbus_transport_open):
1187 Add commented out call to dbus_transport_debug_client_new.
1190 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1192 2003-01-28 Havoc Pennington <hp@pobox.com>
1194 * dbus/dbus-message.c (check_message_handling): function to check
1195 on the loaded message, iterates over it etc.
1197 2003-01-28 Havoc Pennington <hp@pobox.com>
1199 * test/Makefile.am (dist-hook): fix make distdir
1201 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1203 2003-01-27 Havoc Pennington <hp@pobox.com>
1205 * dbus/dbus-mempool.c (time_for_size): replace printf with
1208 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1209 empty lines; fix the SAVE_LENGTH stuff to be
1210 START_LENGTH/END_LENGTH so it actually works; couple other
1213 * test/Makefile.am (dist-hook): add dist-hook for .message files
1215 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1216 can be constant or locked.
1217 (_dbus_string_free): allow freeing a const string as
1220 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1222 * dbus/dbus-test-main.c (main): take an argument which is the
1223 directory containing test data
1225 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1226 argument to this and load all the messages in test/data/
1227 checking that they can be loaded or not loaded as appropriate.
1229 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1231 * bus/dispatch.c: (bus_dispatch_message_handler):
1232 Dispatch messages sent to services.
1234 * bus/driver.c: (bus_driver_send_service_deleted),
1235 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1236 (bus_driver_send_service_acquired):
1237 Add helper functions for sending service related messages.
1239 (bus_driver_send_welcome_message):
1240 Send HELLO_REPLY instead of WELCOME.
1242 (bus_driver_handle_list_services):
1243 Send LIST_SERVICES_REPLY instead of SERVICES.
1245 (bus_driver_handle_own_service),
1246 (bus_driver_handle_service_exists):
1247 New message handlers.
1249 (bus_driver_handle_message):
1250 Invoke new message handlers.
1252 (bus_driver_remove_connection):
1253 Don't remove any services here since that's done automatically
1254 by bus_service_remove_owner now.
1257 New function signatures.
1259 * bus/services.c: (bus_service_add_owner):
1260 Send ServiceAcquired message if we're the only primary owner.
1262 (bus_service_remove_owner):
1263 Send ServiceAcquired/ServiceLost messages.
1265 (bus_service_set_prohibit_replacement),
1266 (bus_service_get_prohibit_replacement):
1267 Functions for setting prohibit replacement.
1269 (bus_service_has_owner):
1270 New function that checks if a connection is in the owner queue of
1274 Add new function signatures.
1276 * dbus/dbus-list.c: (_dbus_list_test):
1277 Add tests for _dbus_list_remove_last and traversing the list backwards.
1280 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1281 go any further, so return NULL then.
1283 * dbus/dbus-protocol.h:
1284 Add new messages, service flags and service replies.
1286 2003-01-26 Havoc Pennington <hp@pobox.com>
1288 * dbus/dbus-message-builder.c: implement, completely untested.
1290 * test/data/*: add data to be used in testing.
1291 ".message" files are our simple loadable text format.
1292 ".message-raw" will be binary dumps of messages.
1294 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1296 2003-01-26 Havoc Pennington <hp@pobox.com>
1298 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1300 * dbus/dbus-errors.c (dbus_result_to_string): add
1303 * dbus/dbus-message-builder.c: new file, will contain code to load
1304 up messages from files. Not implemented yet.
1306 2003-01-26 Havoc Pennington <hp@pobox.com>
1308 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1309 the sender by setting to NULL
1311 2003-01-26 Havoc Pennington <hp@pobox.com>
1313 The unit tests pass, but otherwise untested. If it breaks, the
1314 tests should have been better. ;-)
1316 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1319 * dbus/dbus-message.c: redo everything so we maintain
1320 message->header as the only copy of the various fields.
1321 This avoids the possibility of out-of-memory in some cases,
1322 for example dbus_message_lock() can't run out of memory anymore,
1323 and avoids extra copying. Figured I may as well go ahead and do
1324 this since it was busted for dbus_message_lock to not return
1325 failure on OOM, and dbus_message_write_header was totally
1326 unchecked for OOM. Also fixed some random other bugs.
1328 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1329 that strings are nul-terminated. Also, end_pos can be equal
1330 to string length just not greater than, I think.
1331 (_dbus_marshal_set_int32): new function
1332 (_dbus_marshal_set_uint32): new function
1333 (_dbus_marshal_set_string): new function
1335 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1336 a warning, init timeout_list to NULL
1337 (dbus_connection_send_message): don't use uninitialized variable
1340 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1342 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1344 * bus/driver.c: (bus_driver_handle_hello),
1345 (bus_driver_send_welcome_message):
1348 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1350 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1351 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1352 (dbus_connection_unref):
1353 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1354 * dbus/dbus-message.c: (dbus_message_unref),
1357 (dbus_message_get_fields):
1358 Remove debugging printout.
1360 (_dbus_message_loader_return_buffer):
1361 Don't store the header string.
1363 (_dbus_message_test):
1366 2003-01-26 Richard Hult <rhult@codefactory.se>
1368 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1369 the file descriptor list, since it can change under us.
1371 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1373 * glib/dbus-gmain.c: (dbus_connection_prepare),
1374 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1375 (remove_watch), (dbus_connection_hookup_with_g_main):
1376 Rewrite the glib handling to use its own GSource instead of a
1377 GIOChannel so we can catch messages put in the queue while waiting
1380 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1383 * bus/connection.c: (connection_disconnect_handler),
1384 (connection_watch_callback), (bus_connection_setup):
1385 * bus/dispatch.c: (send_one_message),
1386 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1387 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1389 * bus/driver.c: (bus_driver_send_service_deleted),
1390 (bus_driver_send_service_created), (bus_driver_handle_hello),
1391 (bus_driver_send_welcome_message),
1392 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1393 (bus_driver_handle_message):
1395 Refactor code, put the message dispatching in its own file. Use
1396 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1399 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1401 * dbus/dbus-internals.h:
1402 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1404 * dbus/dbus-message.c: (dbus_message_get_sender):
1405 * dbus/dbus-message.h:
1406 Implement dbus_message_get_sender.
1408 * dbus/dbus-protocol.h:
1409 Add message and service defines.
1411 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1413 * dbus/dbus-connection.c: (dbus_connection_send_message):
1414 * dbus/dbus-message-internal.h:
1415 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1416 (dbus_message_write_header):
1417 Remove _dbus_messag_unlock and don't set the client serial on a
1418 message if one already exists.
1420 2003-01-24 Havoc Pennington <hp@pobox.com>
1422 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1425 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1428 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1430 * dbus/dbus-list.c: (alloc_link), (free_link):
1431 Use a memory pool for the links.
1433 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1435 * bus/connection.c: (bus_connection_foreach):
1437 Add new bus_connection_foreach function.
1439 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1440 Add function that broadcasts a message to all clients.
1442 (bus_driver_send_service_created), (bus_driver_handle_hello),
1443 (bus_driver_send_welcome_message),
1444 (bus_driver_handle_list_services), (bus_driver_message_handler):
1445 Implement functions that take care of listing services, and notifying
1446 clients when new services are created.
1448 * bus/services.c: (bus_services_list):
1450 Add new function that returns an array of strings with the currently
1451 registered services.
1454 * glib/dbus-gmain.c:
1455 Update copyright year.
1457 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1459 * dbus/dbus-connection.c: (dbus_connection_send_message):
1460 Unlock the message in case it was sent earlier.
1462 (dbus_connection_send_message_with_reply_and_block):
1463 Remove the reply message from the list.
1465 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1466 Set array_len and new_pos correctly.
1468 (_dbus_marshal_test):
1469 Remove debug output.
1471 * dbus/dbus-message-internal.h:
1472 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1473 New function that returns the reply serial.
1475 (_dbus_message_unlock):
1476 New function that unlocks a message and resets its header.
1478 (dbus_message_append_string_array),
1479 (dbus_message_get_fields_valist),
1480 (dbus_message_iter_get_field_type),
1481 (dbus_message_iter_get_string_array),
1482 (dbus_message_get_fields),
1483 (dbus_message_append_fields_valist):
1484 Handle string arrays.
1486 (dbus_message_set_sender):
1487 Make this function public since the bus daemon needs it.
1489 (decode_header_data):
1490 Set the reply serial to -1 initially.
1492 * dbus/dbus-message.h:
1493 Add dbus_message_set_sender.
1495 2003-01-24 Havoc Pennington <hp@pobox.com>
1497 * doc/dbus-specification.sgml: add some stuff
1499 2003-01-22 Havoc Pennington <hp@pobox.com>
1501 * doc/dbus-specification.sgml: Start to document the protocol.
1503 2003-01-22 Havoc Pennington <hp@pobox.com>
1505 * dbus/dbus-connection.c
1506 (dbus_connection_send_message_with_reply_and_block): add some @todo
1508 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1510 2003-01-21 Havoc Pennington <hp@pobox.com>
1512 (patch untested because can't compile)
1514 * bus/driver.c (create_unique_client_name): make this function
1515 never recycle client names. Also, caller should initialize
1518 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1520 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1522 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1523 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1524 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1525 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1526 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1527 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1528 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1529 * dbus/dbus-marshal.h:
1530 * dbus/dbus-protocol.h:
1531 Add support for marshalling and demarshalling integer, double
1534 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1539 * bus/connection.c: (connection_disconnect_handler):
1540 Remove the connection from the bus driver's list.
1542 (connection_watch_callback): Dispatch messages.
1544 (free_connection_data): Free connection name.
1546 (bus_connection_setup): Add connection to the bus driver's list.
1547 (bus_connection_remove_owned_service):
1548 (bus_connection_set_name), (bus_connection_get_name):
1549 Add functions for setting and getting the connection's name.
1552 Add function headers.
1554 * bus/driver.c: (create_unique_client_name),
1555 (bus_driver_handle_hello_message),
1556 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1557 (bus_driver_add_connection), (bus_driver_remove_connection):
1560 * bus/services.c: (bus_service_free):
1562 New file that handles communication and registreation with the bus
1565 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1567 * dbus/dbus-connection.c: (dbus_connection_send_message):
1568 Add a new client_serial parameter.
1570 (dbus_connection_send_message_with_reply):
1571 Remove a @todo since we've implemented the blocking function.
1573 (dbus_connection_send_message_with_reply_and_block):
1574 New function that sends a message and waits for a reply and
1575 then returns the reply.
1577 * dbus/dbus-connection.h:
1580 * dbus/dbus-errors.c: (dbus_result_to_string):
1581 * dbus/dbus-errors.h:
1582 Add new DBUS_RESULT.
1584 * dbus/dbus-message-internal.h:
1585 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1586 (_dbus_message_set_sender), (dbus_message_write_header),
1587 (dbus_message_new_reply), (decode_header_data),
1588 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1589 * dbus/dbus-message.h:
1590 Add new functions that set the reply serial and sender.
1591 Also marshal and demarshal them correctly and add test.
1593 * dbus/dbus-protocol.h:
1594 Add new DBUS_MESSAGE_TYPE_SENDER.
1597 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1598 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1599 (dbus_connection_hookup_with_g_main):
1600 * glib/test-dbus-glib.c: (main):
1601 Rewrite to use GIOChannel and remove the GSource crack.
1603 * test/echo-client.c: (main):
1604 * test/watch.c: (check_messages):
1605 Update for changed APIs
1607 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1609 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1611 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1612 Create a DBusTimeoutList.
1613 (dbus_connection_set_timeout_functions): Add new function to
1614 set timeout callbacks
1616 * dbus/dbus-connection.h: Add public DBusTimeout API.
1618 * dbus/dbus-message.c: (dbus_message_get_service):
1619 * dbus/dbus-message.h: New function.
1621 * dbus/dbus-server.c: Fix small doc typo.
1623 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1625 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1627 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1628 of the string, just as long as specified.
1630 2003-01-19 Havoc Pennington <hp@pobox.com>
1632 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1635 * dbus/dbus-server.c (dbus_server_set_max_connections)
1636 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1637 keep track of current number of connections, and add API for
1638 setting a max (but haven't implemented enforcing the max yet)
1640 2003-01-18 Havoc Pennington <hp@pobox.com>
1642 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1643 reading/writing if read_watch != NULL or write_watch != NULL.
1645 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1646 the message loader code to actually load message->header and
1647 message->body into the newly-created message.
1649 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1652 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1653 (dbus_connection_get_max_message_size)
1654 (dbus_connection_set_max_live_messages_size)
1655 (dbus_connection_get_max_live_messages_size): implement some
1656 resource limitation functions
1658 * dbus/dbus-resources.c: new file implementing some of the
1659 resource limits stuff
1661 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1662 missing docs, add @todo to handle OOM etc.
1664 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1667 2003-01-18 Havoc Pennington <hp@pobox.com>
1669 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1670 connection if it hasn't been already.
1672 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1673 replace with DisconnectFunction.
1675 2003-01-18 Havoc Pennington <hp@pobox.com>
1677 Building --disable-verbose-mode --disable-asserts --disable-tests
1678 cuts the library from 112K to 45K or so
1680 * configure.in: check for varargs macro support,
1681 add --enable-verbose-mode, --enable-asserts.
1683 * dbus/dbus-internals.h (_dbus_assert): support
1685 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1687 2003-01-18 Havoc Pennington <hp@pobox.com>
1689 * dbus/dbus-test.c: include config.h so that tests actually run
1691 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1692 so the failure mode when that assumption fails will be plenty
1695 2003-01-18 Havoc Pennington <hp@pobox.com>
1697 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1699 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1702 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1703 since we don't want to use those in make check
1705 2003-01-15 Havoc Pennington <hp@redhat.com>
1711 2003-01-15 Havoc Pennington <hp@redhat.com>
1713 * test/Makefile.am: fix so that test source code ends up in the
1714 distribution on make distcheck
1716 2003-01-15 Havoc Pennington <hp@redhat.com>
1722 2003-01-15 Havoc Pennington <hp@redhat.com>
1724 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1725 fix build when --disable-tests
1727 * Makefile.am (EXTRA_DIST): put HACKING in here
1729 * HACKING: document procedure for making a tarball release.
1731 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1733 * bus/connection.c: (connection_error_handler),
1734 (bus_connection_setup):
1735 * bus/main.c: (main):
1736 Make sure that the DBusConnectionData struct is NULLed
1737 out to prevent a segfault.
1739 * dbus/dbus-errors.c: (dbus_result_to_string):
1740 * dbus/dbus-errors.h:
1741 * dbus/dbus-message.c: (dbus_message_get_fields),
1742 (dbus_message_get_fields_valist), (_dbus_message_test):
1743 * dbus/dbus-message.h:
1744 Make dbus_message_get_fields return a result code so we can
1745 track invalid fields as well as oom.
1747 2003-01-11 Havoc Pennington <hp@pobox.com>
1749 * configure.in: change --enable-test/--enable-ansi action-if-given
1750 to enable_foo=$enableval instead of enable_foo=yes
1752 2003-01-08 Havoc Pennington <hp@pobox.com>
1754 * dbus/dbus-string.c (_dbus_string_align_length): new function
1756 * dbus/dbus-test-main.c: move main() for test app here
1758 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1759 symbol to run tests, because dbus-test isn't in the main
1762 Code review nitpicks.
1764 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1765 for people with narrow emacs ;-). Assert client_serial was filled
1766 in. Assert message->name != NULL.
1767 (dbus_message_append_fields): have "first_field_type" arg separate
1768 from va list, needed for C++ binding that also uses varargs IIRC
1769 and helps with type safety
1770 (dbus_message_new): add @todo about using DBusString to store
1771 service/name internally
1772 (dbus_message_new): don't leak ->service and ->name on OOM later
1774 (dbus_message_unref): free the service name
1775 (dbus_message_get_fields): same change to varargs
1776 i.e. first_field_type
1777 (_dbus_message_loader_return_buffer): assert that the message data
1778 is aligned (if not it's a bug in our code). Put in verbose griping
1779 about why we set corrupted = TRUE.
1780 (decode_header_data): add FIXME that char* is evil. Was going to
1781 add FIXME about evil locale-specific string.h strncmp, but just
1782 switched to wacky string-as-uint32 optimization. Move check for
1783 "no room for field name" above get_const_data_len() to avoid
1784 assertion failure in get_const_data_len if we have trailing 2
1785 bytes or the like. Check for service and name fields being
1786 provided twice. Don't leak service/name on error. Require field
1787 names to be aligned to 4 bytes.
1789 * dbus/dbus-marshal.c: move byte swap stuff to header
1790 (_dbus_pack_int32): uscore-prefix
1791 (_dbus_unpack_int32): uscore-prefix
1792 (_dbus_unpack_uint32): export
1793 (_dbus_demarshal_string): add @todo complaining about use of
1795 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1796 handling allowing corrupt data to go unchecked
1798 2003-01-08 Havoc Pennington <hp@redhat.com>
1800 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1801 to the select() as needed for authentication. (should be using
1802 _dbus_poll() not select, but for another day)
1804 * dbus/dbus.h: include dbus/dbus-protocol.h
1806 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1808 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1811 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1813 * dbus/dbus-internals.c: (_dbus_type_to_string):
1814 New function that returns a string describing a type.
1816 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1817 * dbus/dbus-marshal.h:
1818 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1819 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1820 (dbus_message_iter_get_byte_array):
1821 * dbus/dbus-message.h:
1822 Add new convenience functions for appending and getting message fields.
1823 Also add demarshalling routines for byte arrays.
1825 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1827 * dbus/dbus-connection-internal.h:
1828 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1829 (_dbus_connection_get_next_client_serial),
1830 (dbus_connection_send_message):
1831 * dbus/dbus-internals.h:
1832 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1833 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1834 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1835 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1836 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1837 (_dbus_verbose_bytes), (_dbus_marshal_test):
1838 * dbus/dbus-marshal.h:
1839 * dbus/dbus-message-internal.h:
1840 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1841 (dbus_message_write_header), (_dbus_message_lock),
1842 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1843 (dbus_message_get_name), (dbus_message_append_int32),
1844 (dbus_message_append_uint32), (dbus_message_append_double),
1845 (dbus_message_append_string), (dbus_message_append_byte_array),
1846 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1847 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1848 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1849 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1850 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1851 (decode_header_data), (_dbus_message_loader_return_buffer),
1852 (message_iter_test), (_dbus_message_test):
1853 * dbus/dbus-message.h:
1854 * dbus/dbus-protocol.h:
1855 * dbus/dbus-test.c: (main):
1857 * glib/test-dbus-glib.c: (message_handler), (main):
1858 * test/echo-client.c: (main):
1859 * test/watch.c: (check_messages):
1860 Make messages sendable and receivable for real.
1862 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1864 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1865 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1866 * dbus/dbus-message.c: (dbus_message_append_int32),
1867 (dbus_message_append_uint32), (dbus_message_append_double),
1868 (dbus_message_append_string), (dbus_message_append_byte_array):
1869 Handle OOM restoration.
1871 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1873 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1874 (_dbus_demarshal_string), (_dbus_marshal_test):
1875 * dbus/dbus-marshal.h:
1876 * dbus/dbus-message.c: (dbus_message_get_name),
1877 Document these functions.
1879 (dbus_message_append_int32), (dbus_message_append_uint32),
1880 (dbus_message_append_double), (dbus_message_append_string),
1881 (dbus_message_append_byte_array):
1882 * dbus/dbus-message.h:
1883 Add functions for adding message fields of different types.
1885 * dbus/dbus-protocol.h:
1886 Add the different types.
1888 2003-01-05 Havoc Pennington <hp@pobox.com>
1890 * bus/connection.c: implement routines for handling connections,
1891 first thing is keeping a list of owned services on each connection
1892 and setting up watches etc.
1894 * bus/services.c: implement a mapping from service names to lists
1897 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1899 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1900 to use static mutexes for global data
1902 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1903 collection of functions to set/get application-specific data
1904 on the DBusConnection.
1906 2003-01-04 Havoc Pennington <hp@pobox.com>
1908 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1909 (_dbus_poll): new function
1911 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1914 * bus/loop.c: initial code for the daemon main loop
1916 2003-01-04 Havoc Pennington <hp@pobox.com>
1918 * test/watch.c (error_handler): make it safe if the error handler
1919 is called multiple times (if we s/error handler/disconnect
1920 handler/ we should just guarantee it's called only once)
1922 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1923 error handler on disconnect (it's quite possible we should
1924 just change the error handler to a "disconnect handler," I'm
1925 not sure we have any other meaningful errors)
1927 * configure.in: check for getpwnam_r
1929 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1930 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1931 mechanism as in SASL spec, using socket credentials
1933 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1934 (_dbus_send_credentials_unix_socket): new function
1936 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1938 (_dbus_write): only check errno if <0 returned
1939 (_dbus_write_two): ditto
1941 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1943 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1944 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1945 (_dbus_marshal_test):
1946 * dbus/dbus-marshal.h:
1947 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1948 to _dbus_marshal_utf8_string. Also fix some tests.
1950 2002-12-28 Harri Porten <porten@kde.org>
1952 * configure.in: added check for C++ compiler and a very cheesy
1953 check for the Qt integration
1955 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1957 * qt/Makefile.am: added
1959 * qt/.cvsignore: added
1961 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1962 latter, added #ifdef QT_THREAD_SUPPORT guard.
1964 * dbus/Makefile.am: added missing headers for make dist
1966 2002-12-28 Kristian Rietveld <kris@gtk.org>
1968 * dbus/Makefile.am: fixup export-symbols-regex.
1970 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1972 * acinclude.m4: Add this file and put the
1973 PKG_CHECK_MODULE macro in it.
1975 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1977 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1978 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1979 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1980 (_dbus_marshal_test):
1981 Make the demarshalling routines align the pos argument.
1982 Add string marshalling tests and fix the obvious bugs
1985 2002-12-26 Havoc Pennington <hp@pobox.com>
1987 * dbus/dbus-auth.c: fixes fixes fixes
1989 * dbus/dbus-transport-unix.c: wire up support for
1990 encoding/decoding data on the wire
1992 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1993 (_dbus_auth_decode_data): append to target string
1994 instead of nuking it.
1996 2002-12-26 Havoc Pennington <hp@pobox.com>
1998 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1999 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2002 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2003 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2004 now). Main point is because I wanted unpack_uint32 to implement
2006 (_dbus_verbose_bytes): new function
2008 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2010 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2011 mechanism to handle a corrupt message stream
2012 (_dbus_message_loader_new): fix preallocation to only prealloc,
2015 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2016 (_dbus_string_test): enhance tests for copy/move and fix the
2019 * dbus/dbus-transport-unix.c: Hold references in more places to
2020 avoid reentrancy problems
2022 * dbus/dbus-transport.c: ditto
2024 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2025 leak reference count in no-message case
2027 * test/watch.c (do_mainloop): handle adding/removing watches
2028 during iteration over the watches. Also, ref the connection/server
2029 stored on a watch, so we don't try to mangle a destroyed one.
2031 * dbus/dbus-transport-unix.c (do_authentication): perform
2034 * dbus/dbus-auth.c (get_state): add a state
2035 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2036 (_dbus_auth_get_unused_bytes): append the unused bytes
2037 to the passed in string, rather than prepend
2039 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2040 the auth conversation DBusAuth
2042 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2043 (_dbus_transport_new_for_domain_socket): when creating a
2044 transport, pass in whether it's a client-side or server-side
2045 transport so we know which DBusAuth to create
2047 2002-12-03 Havoc Pennington <hp@pobox.com>
2049 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2050 _after_ finalizing the derived members
2051 (unix_connection_set): unref watch if we fail to add it
2053 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2054 transport first, so that the connection owned by the
2055 transport will be valid as the transport finalizes.
2057 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2058 if necessary, and remove watches from the connection.
2060 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2062 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2064 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2065 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2066 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2067 (_dbus_marshal_test):
2068 * dbus/dbus-marshal.h:
2069 Add string marshal functions and have the demarshal functions
2070 return the new position.
2072 2002-12-25 Havoc Pennington <hp@pobox.com>
2074 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2075 it is a simple protocol that just maps directly to SASL.
2077 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2078 initial implementation, not actually used yet.
2080 * dbus/dbus-string.c (_dbus_string_find): new function
2081 (_dbus_string_equal): new function
2082 (_dbus_string_base64_encode): new function
2083 (_dbus_string_base64_decode): new function
2085 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2088 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2089 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2090 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2091 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2092 * dbus/dbus-marshal.h:
2093 * dbus/dbus-protocol.h:
2094 * dbus/dbus-test.c: (main):
2096 Add un-optimized marshalling/demarshalling routines.
2098 2002-12-25 Harri Porten <porten@kde.org>
2100 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2102 2002-12-24 Zack Rusin <zack@kde.org>
2104 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2105 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2108 2002-12-24 Havoc Pennington <hp@pobox.com>
2110 * glib/dbus-gthread.c: fix include
2112 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2113 I think glib API needs to change, though, as you don't
2114 want to use DBusMessageFunction, you want to use the
2115 DBusMessageHandler object. Probably
2116 dbus_connection_open_with_g_main_loop()
2117 and dbus_connection_setup_g_main_loop() or something like that
2118 (but think of better names...) that just create a connection
2119 that has watch/timeout functions etc. already set up.
2121 * dbus/dbus-connection.c
2122 (dbus_connection_send_message_with_reply): new function just to
2123 show how the message handler helps us deal with replies.
2125 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2127 * dbus/dbus-string.c (_dbus_string_test): free a string that
2130 * dbus/dbus-hash.c: use memory pools for the hash entries
2131 (rebuild_table): be more paranoid about overflow, and
2132 shrink table when we can
2133 (_dbus_hash_test): reduce number of sprintfs and write
2134 valid C89. Add tests for case where we grow and then
2135 shrink the hash table.
2137 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2139 * dbus/dbus-connection.c (dbus_connection_register_handler)
2140 (dbus_connection_unregister_handler): new functions
2142 * dbus/dbus-message.c (dbus_message_get_name): new
2144 * dbus/dbus-list.c: fix docs typo
2146 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2147 an object representing a handler for messages.
2149 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2152 * glib/dbus-gthread.c: (dbus_gthread_init):
2153 Don't use the gdbus prefix for public functions.
2155 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2159 Add GLib checks and fixup .pc files
2163 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2164 (gdbus_connection_check), (gdbus_connection_dispatch),
2165 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2166 (dbus_connection_gsource_new):
2167 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2168 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2169 * glib/test-dbus-glib.c: (message_handler), (main):
2172 2002-12-15 Harri Porten <porten@kde.org>
2174 * autogen.sh: check for libtoolize before attempting to use it
2176 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2179 * .cvsignore: ignore more stamp files
2181 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2183 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2184 without make install.
2186 2002-12-15 Havoc Pennington <hp@pobox.com>
2188 * dbus/dbus-threads.c: add thread stubs that a higher library
2189 layer can fill in. e.g. the GLib wrapper might fill them in with
2190 GThread stuff. We still need to use this thread API to
2191 thread-safe-ize the library.
2193 2002-12-12 Havoc Pennington <hp@pobox.com>
2195 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2196 below new interfaces and include fewer system headers.
2198 * dbus/dbus-sysdeps.c (_dbus_read): new function
2199 (_dbus_write): new function
2200 (_dbus_write_two): new function
2201 (_dbus_connect_unix_socket): new function
2202 (_dbus_listen_unix_socket): new function
2204 * dbus/dbus-message-internal.h: change interfaces to use
2207 2002-12-11 Havoc Pennington <hp@pobox.com>
2209 * dbus/dbus-types.h: add dbus_unichar
2211 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2213 * dbus/dbus-connection.c (dbus_connection_send_message): return
2216 * dbus/dbus-transport.c: include dbus-watch.h
2218 * dbus/dbus-connection.c: include dbus-message-internal.h
2220 * HACKING: add file with coding guidelines stuff.
2222 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2223 handling here, for security purposes (as in vsftpd). Not actually
2224 using this class yet.
2226 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2227 system/libc usage here, as in vsftpd, for ease of auditing (and
2228 should also simplify portability). Haven't actually moved all the
2229 system/libc usage into here yet.
2231 2002-11-25 Havoc Pennington <hp@pobox.com>
2233 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2234 always print the first verbose message.
2236 2002-11-24 Havoc Pennington <hp@pobox.com>
2238 * test/echo-client.c, test/echo-server.c: cheesy test
2241 * configure.in (AC_CHECK_FUNCS): check for writev
2243 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2246 * dbus/dbus-list.c (_dbus_list_foreach): new function
2248 * dbus/dbus-internals.c (_dbus_verbose): new function
2250 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2251 representing a server that listens for connections.
2253 * dbus/.cvsignore: create
2255 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2256 public API for reporting errors
2258 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2259 public object representing a connection that
2260 sends/receives messages. (Same object used for
2261 both client and server.)
2263 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2264 Basic abstraction for different kinds of stream
2265 that we might read/write messages from.
2267 2002-11-23 Havoc Pennington <hp@pobox.com>
2269 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2272 * dbus/dbus-test.c (main): add list test, and include
2273 dbus-test.h as intended
2275 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2276 (_dbus_hash_table_remove_int): return value indicates
2277 whether the entry existed to remove
2279 * dbus/dbus-list.c: add linked list utility class,
2282 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2285 2002-11-23 Havoc Pennington <hp@pobox.com>
2287 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2288 DBUS_END_DECLS to nothing, that should fix this once and for all
2290 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2292 * dbus/dbus-message.c, dbus/dbus-hash.c:
2293 add some missing @brief
2295 2002-11-23 Havoc Pennington <hp@pobox.com>
2297 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2298 to avoid confusing Doxygen
2300 * dbus/dbus-hash.c: @} not }@
2302 * dbus/dbus-message.c (struct DBusMessage): split out
2305 2002-11-23 Havoc Pennington <hp@pobox.com>
2307 * configure.in: pile on more warning flags if using gcc
2309 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2310 to document static functions
2312 * configure.in: add summary to end of configure so it
2313 looks nice and attractive
2315 * dbus/dbus-hash.c: finish implementation and write unit
2318 * configure.in: add --enable-tests to enable unit tests
2320 * dbus/dbus-test.c: test program to run unit tests
2321 for all files in dbus/*, initially runs a test for
2324 * dbus/dbus-internals.h: file to hold some internal utility stuff
2326 2002-11-22 Havoc Pennington <hp@redhat.com>
2328 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2329 "ported" away from Tcl
2331 * dbus/dbus-types.h: header for types such as dbus_bool_t
2333 2002-11-22 Havoc Pennington <hp@redhat.com>
2335 * dbus/dbus.h: fixups for doc warnings
2337 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2339 (QUIET): make it quiet so we can see warnings
2341 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2343 2002-11-22 Havoc Pennington <hp@redhat.com>
2345 * Makefile.am: include "Doxyfile" target in all-local
2347 * configure.in: generate the Doxyfile
2349 * Doxyfile.in: move Doxyfile here, so we can use
2350 configure to generate a Doxyfile with the right
2353 2002-11-22 Havoc Pennington <hp@redhat.com>
2355 * dbus/dbus-message.c: move inline docs into .c file
2357 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2358 so all docs are under doc/
2359 (MAN_EXTENSION): generate man pages. Use extension
2360 ".3dbus" which matches ".3qt" on my system,
2361 I guess this is OK, I don't know really.
2362 (FILE_PATTERNS): look for .c files not .h, makes sense
2365 2002-11-22 Havoc Pennington <hp@pobox.com>
2367 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2368 because any app can be a server, and any app can be a client,
2369 the bus is a special kind of server.
2371 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2373 * Doxyfile : adding. Still needs Makefile rules to be generated
2374 automatically (just run "doxygen" in the toplevel dir for now to
2377 * dbus/dbus-message.h : Adding sample docs (javadoc since
2378 resembles gtk-doc a little more)
2380 * dbus/dbus.h : Adding sample docs
2382 2002-11-21 Havoc Pennington <hp@redhat.com>
2384 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2385 so we can allow ourselves to include files directly,
2386 instead of having to use dbus.h
2388 * dbus/dbus.h: fill in
2390 * dbus/dbus-message.h: sketch out a sample header file.
2391 Include griping if you include it directly instead of
2394 * dbus/dbus-macros.h: new file with macros for extern "C",
2395 TRUE/FALSE, NULL, etc.
2397 * doc/file-boilerplate.c: put include guards in here
2399 2002-11-21 Havoc Pennington <hp@redhat.com>
2401 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2403 * COPYING: include the GPL as well, and license code
2404 under both AFL and GPL.
2406 2002-11-21 Havoc Pennington <hp@redhat.com>
2408 * acconfig.h: get rid of this
2410 * autogen.sh (run_configure): add --no-configure option
2412 * configure.in: remove AC_ARG_PROGRAM to make
2413 autoconf complain less. add AC_PREREQ.
2414 add AC_DEFINE third arg.
2416 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2419 Fix references so we can distcheck.
2421 2002-11-21 Havoc Pennington <hp@redhat.com>
2423 * Initial module creation