1 2003-02-27 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-connection.c
4 (dbus_connection_send_message_with_reply_and_block): fix doh!
5 doh! doh! bug that resulted in never removing a reply from the
6 queue, no wonder we called get_reply_serial so much ;-)
8 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
9 and client serial instead of demarshaling them every time
11 2003-02-27 Havoc Pennington <hp@pobox.com>
13 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
14 more inlined, using dbus-string-private.h, speeds things up
17 * dbus/dbus-string.c (_dbus_string_free): apply align offset
18 when freeing the string
19 (_dbus_string_steal_data): fix for align offset
20 (undo_alignment): new function
22 2003-02-26 Havoc Pennington <hp@redhat.com>
24 All kinds of audit fixes from Owen, plus initial attempt to
25 handle unaligned memory returned from malloc.
27 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
28 leave room for align_offset and nul byte
29 (fixup_alignment): function to track an align_offset and
30 ensure real->str is aligned
31 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
32 to allow a nul byte plus align offset
33 (_dbus_string_lock): fix overflow issue
34 (_dbus_string_init_const_len): add assertions on sanity of len,
35 assign allocated to be ALLOCATION_PADDING larger than len
36 (set_length): fixup the overflow handling
37 (_dbus_string_get_data_len): fix overflow in assertion
38 (open_gap): detect overflow in size of gap to be opened
39 (_dbus_string_lengthen): add overflow check
40 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
41 (_dbus_string_append): add overflow check
42 (_dbus_string_append_unichar): overflow
43 (_dbus_string_delete): fix overflow in assertion
44 (_dbus_string_copy_len): overflow in assertion
45 (_dbus_string_replace_len): overflows in assertions
46 (_dbus_string_find): change to implement in terms of
48 (_dbus_string_find_to): assorted fixage
49 (_dbus_string_equal_c_str): assert c_str != NULL,
50 fix logic so the function works
51 (_dbus_string_ends_with_c_str): fix overflow thingy
52 (_dbus_string_base64_encode): overflow fix
53 (_dbus_string_validate_ascii): overflow
54 (_dbus_string_validate_nul): overflow
56 2003-02-26 Havoc Pennington <hp@redhat.com>
58 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
60 2003-02-26 Alexander Larsson <alexl@redhat.com>
63 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
65 * dbus/dbus-connection.c:
66 * dbus/dbus-connection.h:
67 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
68 Add dbus_connection_set_wakeup_main_function and use it when queueing
69 incoming and outgoing messages.
72 * dbus/dbus-dataslot.c:
73 Threadsafe usage of DBusDataSlotAllocator
75 * dbus/dbus-message.c: (dbus_message_get_args_iter):
78 * dbus/dbus-server-unix.c:
82 Implement the new wakeup functions for glib.
85 * glib/test-thread-client.c:
86 * glib/test-thread-server.c:
88 Initial cut at some thread test code. Not really done yet.
90 2003-02-26 Havoc Pennington <hp@pobox.com>
92 * dbus/dbus-connection.c
93 (dbus_connection_send_message_with_reply_and_block): fix crash
94 where we ref'd the outgoing message instead of the returned reply
96 * dbus/dbus-transport-unix.c (do_authentication): check read watch
97 at the end of this function, so if we didn't need to read for
98 authentication, we reinstall it for receiving messages
100 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
101 a NULL sender for peer-to-peer case
103 * dbus/dbus-transport-unix.c (check_read_watch): handle
104 !authenticated case correctly
106 * glib/dbus-gmain.c: add support for DBusServer
108 * dbus/dbus-server.c: add data slot support
110 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
111 return values and handle errors
113 * dbus/dbus-dataslot.c: factor out the data slot stuff from
116 * Doxyfile.in (INPUT): add glib subdir
118 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
119 setup_with_g_main instead of hookup_with_g_main; write docs
121 2003-02-24 Anders Carlsson <andersca@codefactory.se>
123 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
124 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
125 * dbus/dbus-message.c: (dbus_message_append_boolean),
126 (dbus_message_append_boolean_array),
127 (dbus_message_get_args_valist), (_dbus_message_test):
128 * dbus/dbus-message.h:
129 * doc/dbus-specification.sgml:
130 Various fixes as pointed out by Havoc.
132 * test/data/invalid-messages/bad-boolean-array.message:
133 * test/data/invalid-messages/bad-boolean.message:
134 Add invalid boolean value test cases.
136 2003-02-24 Anders Carlsson <andersca@codefactory.se>
138 * dbus/dbus-internals.c: (_dbus_type_to_string):
139 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
140 (_dbus_marshal_validate_arg):
141 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
142 * dbus/dbus-message.c: (dbus_message_append_args_valist),
143 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
144 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
145 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
146 (dbus_message_iter_get_double),
147 (dbus_message_iter_get_boolean_array), (message_iter_test):
148 * dbus/dbus-message.h:
149 * dbus/dbus-protocol.h:
150 * doc/dbus-specification.sgml:
151 * test/data/valid-messages/lots-of-arguments.message:
152 Add support for boolean and boolean array types.
154 2003-02-23 Havoc Pennington <hp@pobox.com>
156 * dbus/dbus-keyring.c: finish most of this implementation and
159 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
160 these barf if the error isn't cleared to NULL
162 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
163 (_dbus_create_directory): new function
165 * dbus/dbus-errors.c (dbus_set_error): fix warning
167 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
168 (_dbus_string_hex_decode): new function
169 (test_hex_roundtrip): test code
171 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
173 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
175 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
176 the save-to-temp/rename trick to atomically write the new file
177 (_dbus_string_parse_uint): new function
179 2003-02-22 Havoc Pennington <hp@pobox.com>
181 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
183 2003-02-22 Havoc Pennington <hp@pobox.com>
185 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
186 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
188 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
190 * dbus/test/data/sha-1: add US government test suite for SHA-1
192 2003-02-21 Anders Carlsson <andersca@codefactory.se>
194 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
195 Make string arrays NULL-terminated.
197 * dbus/dbus-memory.c: (dbus_free_string_array):
198 * dbus/dbus-memory.h:
199 New function for freeing NULL-terminated string arrays.
201 * dbus/dbus-message-builder.c: (append_quoted_string),
202 (_dbus_message_data_load):
203 Add support for array types.
205 * dbus/dbus-message.c: (check_message_handling):
206 Add more types as test cases.
208 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
209 (_dbus_string_parse_double):
210 Add the start offset to the end offset.
212 * test/data/valid-messages/lots-of-arguments.message:
213 New test message with lots of arguments.
215 2003-02-21 Anders Carlsson <andersca@codefactory.se>
217 * dbus/dbus-message.c: (dbus_message_append_nil),
218 (dbus_message_append_int32), (dbus_message_append_uint32),
219 (dbus_message_append_double), (dbus_message_append_string),
220 (dbus_message_append_int32_array),
221 (dbus_message_append_uint32_array),
222 (dbus_message_append_double_array),
223 (dbus_message_append_byte_array),
224 (dbus_message_append_string_array):
225 Fix all out-of-memory handling in these functions.
227 2003-02-21 Anders Carlsson <andersca@codefactory.se>
229 * dbus/dbus-message.c: (dbus_message_append_nil):
232 2003-02-21 Anders Carlsson <andersca@codefactory.se>
234 * dbus/dbus-message.c: (dbus_message_append_args_valist),
235 (dbus_message_append_nil), (dbus_message_append_int32_array),
236 (dbus_message_append_uint32_array),
237 (dbus_message_append_double_array),
238 (dbus_message_append_byte_array),
239 (dbus_message_append_string_array), (dbus_message_get_args_valist),
240 (dbus_message_iter_get_int32_array),
241 (dbus_message_iter_get_uint32_array),
242 (dbus_message_iter_get_double_array),
243 (dbus_message_iter_get_byte_array),
244 (dbus_message_iter_get_string_array):
246 * dbus/dbus-message.h:
247 Add functions for appending and getting arrays.
249 2003-02-21 Anders Carlsson <andersca@codefactory.se>
251 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
252 element size at least 8 bytes, fixes mempool tests on
255 2003-02-20 Alexander Larsson <alexl@redhat.com>
257 * dbus/dbus-transport-unix.c (unix_do_iteration):
258 Unlock the connection mutex during a blocking select call.
259 Add todo about how we need a way to wake up the select.
261 * dbus/dbus-connection-internal.h:
262 * dbus/dbus-connection.c:
263 Add _dbus_connection_lock and _dbus_connection_unlock.
265 2003-02-19 Havoc Pennington <hp@pobox.com>
267 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
268 Doxyfile.in, not Doxyfile
270 * dbus/dbus-keyring.c: do some hacking on this
272 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
274 * dbus/dbus-errors.c (dbus_set_error_const): do not call
276 (dbus_set_error): remove dbus_error_init, check for message ==
277 NULL *before* we sprintf into it, and add @todo about including
278 system headers in this file
280 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
282 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
284 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
285 get various bits of user information based on either username
287 (_dbus_homedir_from_username): new function
289 2003-02-19 Anders Carlsson <andersca@codefactory.se>
292 Add check for nonposix getpwnam_r
294 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
295 Align the pool element size to a sizeof (void *) boundary.
297 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
298 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
299 General Solaris fixes.
301 * test/data/valid-messages/simplest-manual.message:
302 Explicitly state that we want little-endian packing.
304 2003-02-19 Mikael Hallendal <micke@codefactory.se>
306 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
308 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
309 Added to create a transport connecting using a tcp/ip socket.
311 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
312 to a tcp socket at given host and port.
313 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
316 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
318 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
319 Added to create a server listening on a TCP/IP socket.
321 2003-02-19 Havoc Pennington <hp@pobox.com>
323 Throughout: mop up all the Doxygen warnings and undocumented
326 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
329 * dbus/dbus-threads.c: move global mutex initializers to
330 dbus-internals.h, multiple prototypes was confusing doxygen
331 besides being kind of ugly
333 * Doxyfile (PREDEFINED): have Doxygen define
334 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
335 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
336 (do not abuse the feature! it's for stuff like the autogenerated
337 macros in dbus-md5.c, not just for things you don't feel like
340 2003-02-18 Havoc Pennington <hp@pobox.com>
342 * dbus/dbus-string.c (_dbus_string_zero): new function
344 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
345 wrap it in some dbus-friendly API
347 * dbus/dbus-types.h: add 16-bit types
349 2003-02-18 Joe Shaw <joe@assbarn.com>
351 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
352 credentials from our currently running process.
353 (get_word): Fix a buglet where we were copying the entire length
354 instead of relative to our position.
356 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
357 keys on the stack... it's 640k of data.
359 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
360 read the credentials byte off the socket, even if we don't have
362 (_dbus_poll): Implement poll() using select() for systems which
365 * glib/test-dbus-glib.c (main): Print out an error if no
366 parameters are given.
368 * test/data/auth/fallback.auth-script: Added. Tests that a client
369 can fallback to a secondary auth mechanism if the first fails.
371 2003-02-18 Havoc Pennington <hp@pobox.com>
375 2003-02-17 Havoc Pennington <hp@pobox.com>
377 * doc/dbus-specification.sgml: lots of cosmetic
378 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
379 env variable to DBUS_BUS_ADDRESS, s/client/application/,
380 s/server/bus/ (except in authentication section). Add a section
381 "Message Bus Message Routing"
383 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
389 2003-02-17 Anders Carlsson <andersca@codefactory.se>
391 * doc/dbus-specification.sgml:
392 Specification updates.
394 2003-02-17 Anders Carlsson <andersca@codefactory.se>
396 * bus/activation.c: (bus_activation_init), (child_setup),
397 (bus_activation_activate_service):
399 * bus/main.c: (main):
400 Set DBUS_ADDRESS environment variable.
402 * dbus/dbus-errors.c: (dbus_set_error):
403 Don't use va_copy since that's a C99 feature.
405 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
407 * dbus/dbus-sysdeps.h:
408 Add child_setup_func to _dbus_spawn_async.
410 * doc/dbus-specification.sgml:
411 Update specification.
413 * test/spawn-test.c: (setup_func), (main):
416 2003-02-17 Alexander Larsson <alexl@redhat.com>
418 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
421 2003-02-17 Anders Carlsson <andersca@codefactory.se>
425 * doc/dbus-test-plan.sgml:
426 Add test plan document.
431 2003-02-17 Anders Carlsson <andersca@codefactory.se>
433 * dbus/dbus-message.c: (decode_header_data),
434 (_dbus_message_loader_return_buffer):
435 Set the header padding amount when loading a message.
437 2003-02-16 Anders Carlsson <andersca@codefactory.se>
439 * bus/dispatch.c: (send_one_message):
440 Only send broadcast messages to registered connections.
442 * dbus/dbus-message.c: (dbus_message_name_is):
443 * dbus/dbus-message.h:
444 New convenience function.
446 * dbus/dbus-transport-debug.c: (do_reading):
447 Only dispatch one message per run.
450 * test/bus-test.c: (new_connection_callback), (die),
451 (test_hello_client1_handler), (test_hello_client2_handler),
452 (test_hello_replies), (main):
454 * test/bus-test-loop.[ch]:
457 2003-02-16 Havoc Pennington <hp@pobox.com>
459 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
462 2003-02-16 Alexander Larsson <alexl@redhat.com>
464 * dbus/dbus-connection.c:
465 Implement sent_message_with_reply. (with_reply_and block is still
467 Made dispatch_message not lose message if OOM.
469 * dbus/dbus-errors.h:
470 Add NoReply error (for reply timeouts).
472 2003-02-16 Alexander Larsson <alexl@redhat.com>
474 * dbus/dbus-hash.c (_dbus_hash_table_unref):
475 Actually free keys and values when destroying hashtable.
477 2003-02-16 Anders Carlsson <andersca@codefactory.se>
479 * dbus/dbus-auth.c: (client_try_next_mechanism):
482 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
483 Return TRUE if there's no thread implementation around.
485 * glib/dbus-gmain.c: (free_source),
486 (dbus_connection_hookup_with_g_main):
487 Make sure to remove the GSource when the connection is finalized.
489 2003-02-16 Anders Carlsson <andersca@codefactory.se>
491 * bus/dispatch.c: (bus_dispatch_message_handler):
492 * dbus/dbus-errors.h:
493 Return an error if someone tries to send a message to a service
496 2003-02-16 Anders Carlsson <andersca@codefactory.se>
498 * bus/activation.c: (load_directory), (bus_activation_init),
499 (bus_activation_activate_service):
502 (bus_driver_handle_activate_service), (bus_driver_handle_message):
503 More work on the activation handling.
505 * dbus/dbus-errors.h:
506 Add some error messages
508 * dbus/dbus-message.c: (dbus_message_new_error_reply):
509 * dbus/dbus-message.h:
510 New function that creates an error message.
512 * dbus/dbus-protocol.h:
513 Add ACTIVATE_SERVER message.
515 * dbus/dbus-server-unix.c: (unix_handle_watch),
516 (_dbus_server_new_for_domain_socket):
517 Call _dbus_fd_set_close_on_exec.
519 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
520 (_dbus_spawn_async), (_dbus_disable_sigpipe),
521 (_dbus_fd_set_close_on_exec):
522 * dbus/dbus-sysdeps.h:
523 Add _dbus_fd_set_close_on exec function. Also add function that checks
524 that all open fds are set to close-on-exec and warns otherwise.
526 * dbus/dbus-transport-unix.c:
527 (_dbus_transport_new_for_domain_socket):
528 Call _dbus_fd_set_close_on_exec.
530 2003-02-16 Havoc Pennington <hp@pobox.com>
532 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
533 allow people to avoid setting SIGPIPE to SIG_IGN
534 (_dbus_connection_new_for_transport): disable SIGPIPE unless
535 we've been asked not to
537 2003-02-15 Anders Carlsson <andersca@codefactory.se>
539 * dbus/dbus-list.c: (_dbus_list_append_link),
540 (_dbus_list_prepend_link):
541 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
545 2003-02-15 Anders Carlsson <andersca@codefactory.se>
548 * bus/activation.c: (bus_activation_entry_free),
549 (add_desktop_file_entry), (load_directory), (bus_activation_init):
551 * bus/main.c: (main):
552 Add simple activation support, doesn't work yet though.
554 2003-02-15 Zack Rusin <zack@kde.org>
556 * qt/dbus-qthread.cpp: small casting fix
558 2003-02-15 Anders Carlsson <andersca@codefactory.se>
560 * dbus/dbus-errors.c: (dbus_set_error):
561 * dbus/dbus-errors.h:
562 Add a few errors and make dbus_set_error void.
564 * dbus/dbus-sysdeps.c:
565 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
566 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
567 * dbus/dbus-sysdeps.h:
568 Add _dbus_spawn_async.
570 * test/spawn-test.c: (main):
571 Test for _dbus_spawn_async.
573 2003-02-15 Anders Carlsson <andersca@codefactory.se>
575 * dbus/dbus-internals.h:
576 Fix build without tests.
578 * dbus/dbus-list.c: (alloc_link):
579 Fix a segfault when a malloc fails.
581 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
582 (dbus_malloc0), (dbus_realloc):
583 Add support for malloc debugging.
585 2003-02-15 Alexander Larsson <alexl@redhat.com>
587 * dbus/dbus-threads.c:
588 * dbus/dbus-threads.h:
589 Add condvars. Remove static mutext from API.
590 Implement static mutexes by initializing them from threads_init.
592 * glib/dbus-gthread.c:
593 * qt/dbus-qthread.cpp:
594 Update with the thread api changes.
599 Turn StaticMutex into normal mutex + init function.
600 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
601 _dbus_list_append_link, _dbus_list_prepend_link
604 * dbus/dbus-sysdeps.c:
605 * dbus/dbus-sysdeps.h:
606 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
607 _dbus_atomic_dec. Only slow fallback implementation at the moment.
609 * dbus/dbus-protocol.h:
610 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
612 * dbus/dbus-message.c:
613 Make ref/unref atomic.
616 * dbus/dbus-connection-internal.h:
617 * dbus/dbus-connection.c:
618 * dbus/dbus-connection.h:
620 Change _peek to _borrow,_return & _steal_borrowed.
621 Change disconnect callback to event.
622 Make dbus_connection_dispatch_messages reentrant.
624 * dbus/dbus-transport.c:
625 Don't ref the connection on calls to the transport
628 * dbus/dbus-message-handler.c:
632 Don't use peek_message anymore
635 * test/debug-thread.c:
636 * test/debug-thread.h:
637 Simple thread implementation that asserts() on deadlocks in
638 single-threaded code.
641 (main) Call debug_threads_init.
644 Use disconnect message instead of disconnect callback.
648 Don't call dbus_connection_set_disconnect_function. Instead export
649 bus_connection_disconnect.
652 Call bus_connection_disconnect when we get a disconnected message.
654 2003-02-15 Havoc Pennington <hp@pobox.com>
656 * dbus/dbus-message.c (dbus_message_new): fool around with the
659 2003-02-14 Havoc Pennington <hp@pobox.com>
661 * dbus/dbus-mempool.c: fail if the debug functions so indicate
663 * dbus/dbus-memory.c: fail if the debug functions indicate we
666 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
667 (_dbus_decrement_fail_alloc_counter): debug functions to
668 simulate memory allocation failures
670 2003-02-14 Havoc Pennington <hp@pobox.com>
672 * dbus/dbus-errors.h (struct DBusError): add a word of padding
675 2003-02-13 Anders Carlsson <andersca@codefactory.se>
677 * bus/driver.c: (bus_driver_handle_hello):
679 * bus/services.c: (bus_service_lookup):
680 Reorder message sending so we get a more sane order.
682 * test/bus-test.c: (message_handler):
685 2003-02-13 Anders Carlsson <andersca@codefactory.se>
687 * bus/driver.c: (bus_driver_send_service_deleted),
688 (bus_driver_send_service_created), (bus_driver_send_service_lost),
689 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
690 (bus_driver_send_welcome_message),
691 (bus_driver_handle_list_services),
692 (bus_driver_handle_acquire_service),
693 (bus_driver_handle_service_exists):
694 * dbus/dbus-bus.c: (dbus_bus_register_client),
695 (dbus_bus_acquire_service), (dbus_bus_service_exists):
696 * dbus/dbus-errors.c: (dbus_result_to_string):
697 * dbus/dbus-errors.h:
698 * dbus/dbus-message.c: (dbus_message_append_args),
699 (dbus_message_append_args_valist), (dbus_message_get_args),
700 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
701 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
702 (dbus_message_iter_get_byte_array),
703 (dbus_message_iter_get_string_array), (message_iter_test),
704 (check_message_handling), (_dbus_message_test):
705 * dbus/dbus-message.h:
706 * test/bus-test.c: (main):
707 Change fields to arguments in messages, so that they won't be
708 confused with header fields.
710 * glib/test-dbus-glib.c: (main):
711 Remove append_fields from hello message.
713 2003-02-13 Anders Carlsson <andersca@codefactory.se>
715 * dbus/dbus-errors.c:
716 * dbus/dbus-message.c:
717 * dbus/dbus-string.c:
720 2003-02-13 Anders Carlsson <andersca@codefactory.se>
722 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
724 Implement support for timeouts in dbus-glib.
726 2003-02-13 Anders Carlsson <andersca@codefactory.se>
728 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
729 * dbus/dbus-message.c: (process_test_subdir):
730 * test/break-loader.c: (find_breaks_based_on):
731 Plug some memory leaks.
733 2003-02-13 Richard Hult <rhult@codefactory.se>
735 * bus/main.c: Fix build.
737 * dbus/dbus-errors.h:
738 * dbus/dbus-errors.c: Fix copyright for Anders.
740 2003-02-13 Anders Carlsson <andersca@codefactory.se>
745 * bus/connection.c: (bus_connection_foreach):
748 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
749 (unescape_string), (new_section), (parse_section_start),
750 (parse_key_value), (report_error), (bus_desktop_file_load),
751 (bus_desktop_file_get_string):
752 * bus/desktop-file.h:
753 Use DBusError for error reporting.
755 * bus/dispatch.c: (send_one_message),
756 (bus_dispatch_message_handler):
757 * bus/driver.c: (bus_driver_send_service_deleted),
758 (bus_driver_send_service_created), (bus_driver_send_service_lost),
759 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
760 (bus_driver_send_welcome_message),
761 (bus_driver_handle_list_services),
762 (bus_driver_handle_acquire_service),
763 (bus_driver_handle_service_exists):
764 * bus/loop.c: (bus_loop_run):
766 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
768 * bus/utils.c: (bus_wait_for_memory):
770 New files with general utility functions.
772 * dbus/dbus-internals.h:
773 Remove _DBUS_HANDLE_OOM.
775 2003-02-13 Anders Carlsson <andersca@codefactory.se>
777 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
778 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
779 * dbus/dbus-errors.h:
780 Add DBusError structure.
782 2003-02-13 Anders Carlsson <andersca@codefactory.se>
784 * test/data/valid-messages/standard-acquire-service.message:
785 * test/data/valid-messages/standard-hello.message:
786 * test/data/valid-messages/standard-list-services.message:
787 * test/data/valid-messages/standard-service-exists.message:
788 Add some standard messages.
790 2003-02-13 Anders Carlsson <andersca@codefactory.se>
792 * bus/driver.c: (bus_driver_send_welcome_message),
793 (bus_driver_handle_list_services),
794 (bus_driver_handle_acquire_service),
795 (bus_driver_handle_service_exists), (bus_driver_handle_message):
796 Update for API changes in libdbus.
798 * dbus/dbus-message.c: (dbus_message_new_reply):
799 * dbus/dbus-message.h:
800 Remove the name argument. The spec states that replies shouldn't
803 2003-02-13 Anders Carlsson <andersca@codefactory.se>
805 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
806 (report_error), (bus_desktop_file_load), (lookup_section),
807 (lookup_line), (bus_desktop_file_get_raw),
808 (bus_desktop_file_get_string):
809 * bus/desktop-file.h:
810 Some fixes, and new functions for getting a key value from a section.
812 2003-02-13 Havoc Pennington <hp@pobox.com>
814 * test/data/auth/fail-after-n-attempts.auth-script: new test
816 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
819 2003-02-13 Havoc Pennington <hp@pobox.com>
821 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
822 dbus_credentials_match were backward
824 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
825 NO_CREDENTIALS and ROOT_CREDENTIALS
827 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
828 into here. Never process more commands after we've reached an
829 end state; store further data as unused bytes.
831 * test/data/auth/*: add more auth tests
833 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
834 command to match exact string and EXPECT_UNUSED to match unused
837 * test/Makefile.am (dist-hook): fix to dist all the test stuff
839 2003-02-12 Havoc Pennington <hp@pobox.com>
841 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
842 \r off of popped lines
844 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
847 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
850 2003-02-12 Havoc Pennington <hp@pobox.com>
852 * dbus/Makefile.am: remove break-loader from the build, since it
855 * configure.in: add --enable-gcov to turn on coverage profiling
856 flags and disable optimization
858 2003-02-10 Havoc Pennington <hp@pobox.com>
860 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
861 initial cut at test framework for DBusAuth from laptop.
862 Doesn't quite work yet but it compiles and I need to get
863 it off the 266mhz laptop. ;-)
865 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
866 fix a memleak in error case
868 2003-02-12 Anders Carlsson <andersca@codefactory.se>
871 * bus/desktop-file.c:
872 * bus/desktop-file.h:
873 Add a desktop file parser.
875 2003-02-11 Zack Rusin <zack@kde.org>
877 * qt/message.[h|cpp]: sample implementation
878 of the KDE wrapper for DBusMessage
880 2003-02-09 Zack Rusin <zack@kde.org>
882 * test/bus-test.c: make_it_compile
883 * doc/dbus-specification.sgml: minimal semantic fix
885 2003-02-06 Anders Carlsson <andersca@codefactory.se>
891 2003-02-06 Anders Carlsson <andersca@codefactory.se>
894 * dbus/dbus-break-loader.c:
896 * test/break-loader.c:
897 Move dbus-break-loader to test/ and rename it to break-loader.
899 2003-02-02 Havoc Pennington <hp@pobox.com>
901 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
902 for code to manage cookies in your home directory
904 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
906 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
907 to authenticate, then disconnect the client.
909 2003-02-03 Alexander Larsson <alexl@redhat.com>
911 * dbus/dbus-message.c (dbus_message_append_fields):
914 2003-02-02 Anders Carlsson <andersca@codefactory.se>
916 * doc/dbus-specification.sgml:
917 Update address format section.
919 2003-02-02 Anders Carlsson <andersca@codefactory.se>
922 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
923 (message_handler), (new_connection_callback), (loop_quit),
927 2003-02-02 Anders Carlsson <andersca@codefactory.se>
929 * bus/driver.c: (bus_driver_handle_service_exists):
930 Simplify the code a bit.
932 * dbus/dbus-bus.c: (dbus_bus_service_exists):
935 2003-02-02 Anders Carlsson <andersca@codefactory.se>
938 Add libdbus-daemon.la and link to it.
940 2003-02-01 James Willcox <jwillcox@gnome.org>
942 * bus/driver.c: (bus_driver_handle_own_service):
943 Actually include the service reply code in the message.
945 2003-02-02 Anders Carlsson <andersca@codefactory.se>
947 * bus/driver.c: (bus_driver_handle_service_exists):
948 Don't unref the incoming message.
950 2003-02-02 Anders Carlsson <andersca@codefactory.se>
952 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
954 2003-02-02 Anders Carlsson <andersca@codefactory.se>
956 * dbus/dbus-server.c: (dbus_server_listen):
957 * dbus/dbus-transport.c: (_dbus_transport_open):
958 ifdef out the calls to the debug transport and server.
960 2003-02-02 Alexander Larsson <alexl@redhat.com>
962 * dbus/dbus-watch.c (dbus_watch_get_flags):
963 Add note in the docs that ERROR or HANGUP won't be returned
964 and are assumed always on.
966 * glib/dbus-gmain.c (add_watch):
967 Always add IO_ERR | IO_HUP
969 * dbus/dbus-message.h:
970 Add semicolon after dbus_message_iter_get_string_array().
971 Makes qt code build again
973 2003-02-01 Anders Carlsson <andersca@codefactory.se>
975 * bus/driver.c: (create_unique_client_name),
976 (bus_driver_handle_hello):
977 Don't take a name, just use a numeric id to identify
981 * dbus/dbus-bus.c: (dbus_bus_register_client),
982 (dbus_bus_acquire_service), (dbus_bus_service_exists):
984 Add new convenience functions for communicating with the bus.
986 * dbus/dbus-message.h:
988 * dbus/dbus-protocol.h:
991 2003-02-01 Alexander Larsson <alexl@redhat.com>
993 * dbus/dbus-message.c (dbus_message_append_fields):
994 Add some more doc comments.
996 2003-02-01 Havoc Pennington <hp@pobox.com>
998 * dbus/dbus-break-loader.c (randomly_modify_length): change
999 a 4-byte value in the message as if it were a length
1001 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1002 execute bit on saved files
1004 2003-02-01 Havoc Pennington <hp@pobox.com>
1006 * dbus/dbus-break-loader.c (main): new program to find messages
1007 that break the loader.
1009 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1010 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1012 * dbus/dbus-string.c (_dbus_string_set_byte): new
1014 2003-01-31 Havoc Pennington <hp@pobox.com>
1016 * dbus/dbus-message.c: refactor the test code to be more general,
1017 in preparation for writing a "randomly permute test cases to
1018 try to break the loader" program.
1020 2003-01-31 Havoc Pennington <hp@pobox.com>
1022 * doc/dbus-specification.sgml: work on the specification
1024 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1025 the protocol version of the message.
1027 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1028 no longer specifies that.
1029 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1032 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1033 "break" for DBUS_TYPE_NIL, remove @todo
1035 2003-01-31 Havoc Pennington <hp@pobox.com>
1037 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1038 just set_is_error/get_is_error as this is a commonly-used
1039 function, and write docs.
1041 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1043 * dbus/dbus-address.c: (dbus_address_entry_free):
1044 Free key and value lists.
1046 * dbus/dbus-internals.c: (_dbus_type_to_string):
1047 Add the types we didn't have.
1049 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1050 (_dbus_marshal_validate_arg):
1053 * dbus/dbus-message.c: (dbus_message_set_sender):
1054 Remove todo about being able to set sender to NULL.
1056 (dbus_message_set_is_error_reply),
1057 (dbus_message_get_is_error_reply):
1058 * dbus/dbus-message.h:
1061 * dbus/dbus-protocol.h:
1062 Add error reply flag.
1064 * test/data/valid-messages/opposite-endian.message:
1065 Add NIL type to test.
1067 2003-01-31 Havoc Pennington <hp@pobox.com>
1069 * doc/dbus-specification.sgml: fully specify the header. Add
1070 flags and major protocol version, and change header/body len to
1073 * dbus/dbus-message-builder.c (append_saved_length): append length
1076 * dbus/dbus-message.c (dbus_message_create_header): change header
1077 length and body length to unsigned. Add the new fields from the
1079 (_dbus_message_loader_return_buffer): unsigned header/body len
1081 2003-01-30 Havoc Pennington <hp@pobox.com>
1083 * dbus/dbus-auth.c: rework to use only REJECTED, no
1086 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1087 use REJECTED, suggested by Mark McLoughlin
1089 2003-01-30 Havoc Pennington <hp@pobox.com>
1091 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1092 a better way to report errors here. e.g. "unix address lacks
1093 path" or something. also "no such file" when the path doesn't
1096 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1098 (dbus_parse_address): add @todo about documenting address format,
1099 and allowing , and ; to be escaped
1101 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1104 Add dbus-address.[ch]
1106 * dbus/dbus-address.c: (dbus_address_entry_free),
1107 (dbus_address_entries_free), (create_entry),
1108 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1109 (dbus_parse_address), (_dbus_address_test):
1110 * dbus/dbus-address.h:
1111 New files for dealing with address parsing.
1113 * dbus/dbus-connection.c:
1114 Document timeout functions.
1116 * dbus/dbus-message.c:
1117 Document dbus_message_new_from_message.
1119 * dbus/dbus-server-debug.c:
1122 * dbus/dbus-server.c: (dbus_server_listen):
1123 Parse address and use correct server implementation.
1125 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1126 * dbus/dbus-string.h:
1127 New function with test.
1129 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1133 * dbus/dbus-transport-debug.c:
1136 * dbus/dbus-transport.c: (_dbus_transport_open):
1137 Parse address and use correct transport implementation.
1139 2003-01-30 Havoc Pennington <hp@pobox.com>
1141 * dbus/dbus-message.c: use message->byte_order instead of
1142 DBUS_COMPILER_BYTE_ORDER throughout.
1143 (dbus_message_create_header): pad header to align the
1144 start of the body of the message to 8-byte boundary
1146 * dbus/dbus-marshal.h: make all the demarshalers take const
1147 DBusString arguments.
1149 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1150 validate message args here, so we don't have to do slow validation
1151 later, and so we catch bad messages as they are incoming. Also add
1152 better checks on header_len and body_len. Also fill in
1155 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1156 implemented properly)
1157 (_dbus_string_validate_nul): new function to check all-nul
1159 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1160 get_arg_end_pos and remove all validation
1161 (_dbus_marshal_validate_arg): actually do validation here.
1163 2003-01-29 Havoc Pennington <hp@pobox.com>
1165 * dbus/dbus-message.c (check_message_handling): fix assertion
1166 failure on set_client_serial
1168 2003-01-28 Havoc Pennington <hp@pobox.com>
1170 * dbus/dbus-server-debug.c: Add doc section comments
1172 * dbus/dbus-transport-debug.c: add doc section comments
1174 2003-01-28 Havoc Pennington <hp@redhat.com>
1176 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1177 the reverse order from how I had it
1178 (_dbus_string_base64_encode): reverse encoding order. I was
1179 basically byteswapping everything during encoding.
1181 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1183 * dbus/dbus-connection-internal.h:
1184 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1185 (_dbus_connection_remove_timeout):
1186 Add functions for adding and removing timeouts.
1188 * dbus/dbus-message.c: (dbus_message_new_from_message):
1189 Add new function that takes a message and creates an exact
1190 copy of it, but with the refcount set to 1.
1191 (check_message_handling):
1194 * dbus/dbus-server-protected.h:
1195 * dbus/dbus-server.c: (_dbus_server_init_base),
1196 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1197 (dbus_server_set_timeout_functions):
1198 (_dbus_server_remove_timeout):
1199 New functions so that a server can add and remove timeouts.
1201 (dbus_server_listen):
1202 Add commented out call to dbus_server_debug_new.
1204 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1205 Actually set the handler, doh.
1207 * dbus/dbus-transport.c: (_dbus_transport_open):
1208 Add commented out call to dbus_transport_debug_client_new.
1211 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1213 2003-01-28 Havoc Pennington <hp@pobox.com>
1215 * dbus/dbus-message.c (check_message_handling): function to check
1216 on the loaded message, iterates over it etc.
1218 2003-01-28 Havoc Pennington <hp@pobox.com>
1220 * test/Makefile.am (dist-hook): fix make distdir
1222 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1224 2003-01-27 Havoc Pennington <hp@pobox.com>
1226 * dbus/dbus-mempool.c (time_for_size): replace printf with
1229 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1230 empty lines; fix the SAVE_LENGTH stuff to be
1231 START_LENGTH/END_LENGTH so it actually works; couple other
1234 * test/Makefile.am (dist-hook): add dist-hook for .message files
1236 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1237 can be constant or locked.
1238 (_dbus_string_free): allow freeing a const string as
1241 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1243 * dbus/dbus-test-main.c (main): take an argument which is the
1244 directory containing test data
1246 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1247 argument to this and load all the messages in test/data/
1248 checking that they can be loaded or not loaded as appropriate.
1250 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1252 * bus/dispatch.c: (bus_dispatch_message_handler):
1253 Dispatch messages sent to services.
1255 * bus/driver.c: (bus_driver_send_service_deleted),
1256 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1257 (bus_driver_send_service_acquired):
1258 Add helper functions for sending service related messages.
1260 (bus_driver_send_welcome_message):
1261 Send HELLO_REPLY instead of WELCOME.
1263 (bus_driver_handle_list_services):
1264 Send LIST_SERVICES_REPLY instead of SERVICES.
1266 (bus_driver_handle_own_service),
1267 (bus_driver_handle_service_exists):
1268 New message handlers.
1270 (bus_driver_handle_message):
1271 Invoke new message handlers.
1273 (bus_driver_remove_connection):
1274 Don't remove any services here since that's done automatically
1275 by bus_service_remove_owner now.
1278 New function signatures.
1280 * bus/services.c: (bus_service_add_owner):
1281 Send ServiceAcquired message if we're the only primary owner.
1283 (bus_service_remove_owner):
1284 Send ServiceAcquired/ServiceLost messages.
1286 (bus_service_set_prohibit_replacement),
1287 (bus_service_get_prohibit_replacement):
1288 Functions for setting prohibit replacement.
1290 (bus_service_has_owner):
1291 New function that checks if a connection is in the owner queue of
1295 Add new function signatures.
1297 * dbus/dbus-list.c: (_dbus_list_test):
1298 Add tests for _dbus_list_remove_last and traversing the list backwards.
1301 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1302 go any further, so return NULL then.
1304 * dbus/dbus-protocol.h:
1305 Add new messages, service flags and service replies.
1307 2003-01-26 Havoc Pennington <hp@pobox.com>
1309 * dbus/dbus-message-builder.c: implement, completely untested.
1311 * test/data/*: add data to be used in testing.
1312 ".message" files are our simple loadable text format.
1313 ".message-raw" will be binary dumps of messages.
1315 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1317 2003-01-26 Havoc Pennington <hp@pobox.com>
1319 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1321 * dbus/dbus-errors.c (dbus_result_to_string): add
1324 * dbus/dbus-message-builder.c: new file, will contain code to load
1325 up messages from files. Not implemented yet.
1327 2003-01-26 Havoc Pennington <hp@pobox.com>
1329 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1330 the sender by setting to NULL
1332 2003-01-26 Havoc Pennington <hp@pobox.com>
1334 The unit tests pass, but otherwise untested. If it breaks, the
1335 tests should have been better. ;-)
1337 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1340 * dbus/dbus-message.c: redo everything so we maintain
1341 message->header as the only copy of the various fields.
1342 This avoids the possibility of out-of-memory in some cases,
1343 for example dbus_message_lock() can't run out of memory anymore,
1344 and avoids extra copying. Figured I may as well go ahead and do
1345 this since it was busted for dbus_message_lock to not return
1346 failure on OOM, and dbus_message_write_header was totally
1347 unchecked for OOM. Also fixed some random other bugs.
1349 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1350 that strings are nul-terminated. Also, end_pos can be equal
1351 to string length just not greater than, I think.
1352 (_dbus_marshal_set_int32): new function
1353 (_dbus_marshal_set_uint32): new function
1354 (_dbus_marshal_set_string): new function
1356 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1357 a warning, init timeout_list to NULL
1358 (dbus_connection_send_message): don't use uninitialized variable
1361 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1363 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1365 * bus/driver.c: (bus_driver_handle_hello),
1366 (bus_driver_send_welcome_message):
1369 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1371 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1372 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1373 (dbus_connection_unref):
1374 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1375 * dbus/dbus-message.c: (dbus_message_unref),
1378 (dbus_message_get_fields):
1379 Remove debugging printout.
1381 (_dbus_message_loader_return_buffer):
1382 Don't store the header string.
1384 (_dbus_message_test):
1387 2003-01-26 Richard Hult <rhult@codefactory.se>
1389 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1390 the file descriptor list, since it can change under us.
1392 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1394 * glib/dbus-gmain.c: (dbus_connection_prepare),
1395 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1396 (remove_watch), (dbus_connection_hookup_with_g_main):
1397 Rewrite the glib handling to use its own GSource instead of a
1398 GIOChannel so we can catch messages put in the queue while waiting
1401 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1404 * bus/connection.c: (connection_disconnect_handler),
1405 (connection_watch_callback), (bus_connection_setup):
1406 * bus/dispatch.c: (send_one_message),
1407 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1408 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1410 * bus/driver.c: (bus_driver_send_service_deleted),
1411 (bus_driver_send_service_created), (bus_driver_handle_hello),
1412 (bus_driver_send_welcome_message),
1413 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1414 (bus_driver_handle_message):
1416 Refactor code, put the message dispatching in its own file. Use
1417 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1420 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1422 * dbus/dbus-internals.h:
1423 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1425 * dbus/dbus-message.c: (dbus_message_get_sender):
1426 * dbus/dbus-message.h:
1427 Implement dbus_message_get_sender.
1429 * dbus/dbus-protocol.h:
1430 Add message and service defines.
1432 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1434 * dbus/dbus-connection.c: (dbus_connection_send_message):
1435 * dbus/dbus-message-internal.h:
1436 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1437 (dbus_message_write_header):
1438 Remove _dbus_messag_unlock and don't set the client serial on a
1439 message if one already exists.
1441 2003-01-24 Havoc Pennington <hp@pobox.com>
1443 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1446 * bus/driver.c (bus_driver_handle_list_services): fix a leak
1449 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1451 * dbus/dbus-list.c: (alloc_link), (free_link):
1452 Use a memory pool for the links.
1454 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1456 * bus/connection.c: (bus_connection_foreach):
1458 Add new bus_connection_foreach function.
1460 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
1461 Add function that broadcasts a message to all clients.
1463 (bus_driver_send_service_created), (bus_driver_handle_hello),
1464 (bus_driver_send_welcome_message),
1465 (bus_driver_handle_list_services), (bus_driver_message_handler):
1466 Implement functions that take care of listing services, and notifying
1467 clients when new services are created.
1469 * bus/services.c: (bus_services_list):
1471 Add new function that returns an array of strings with the currently
1472 registered services.
1475 * glib/dbus-gmain.c:
1476 Update copyright year.
1478 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1480 * dbus/dbus-connection.c: (dbus_connection_send_message):
1481 Unlock the message in case it was sent earlier.
1483 (dbus_connection_send_message_with_reply_and_block):
1484 Remove the reply message from the list.
1486 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1487 Set array_len and new_pos correctly.
1489 (_dbus_marshal_test):
1490 Remove debug output.
1492 * dbus/dbus-message-internal.h:
1493 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
1494 New function that returns the reply serial.
1496 (_dbus_message_unlock):
1497 New function that unlocks a message and resets its header.
1499 (dbus_message_append_string_array),
1500 (dbus_message_get_fields_valist),
1501 (dbus_message_iter_get_field_type),
1502 (dbus_message_iter_get_string_array),
1503 (dbus_message_get_fields),
1504 (dbus_message_append_fields_valist):
1505 Handle string arrays.
1507 (dbus_message_set_sender):
1508 Make this function public since the bus daemon needs it.
1510 (decode_header_data):
1511 Set the reply serial to -1 initially.
1513 * dbus/dbus-message.h:
1514 Add dbus_message_set_sender.
1516 2003-01-24 Havoc Pennington <hp@pobox.com>
1518 * doc/dbus-specification.sgml: add some stuff
1520 2003-01-22 Havoc Pennington <hp@pobox.com>
1522 * doc/dbus-specification.sgml: Start to document the protocol.
1524 2003-01-22 Havoc Pennington <hp@pobox.com>
1526 * dbus/dbus-connection.c
1527 (dbus_connection_send_message_with_reply_and_block): add some @todo
1529 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
1531 2003-01-21 Havoc Pennington <hp@pobox.com>
1533 (patch untested because can't compile)
1535 * bus/driver.c (create_unique_client_name): make this function
1536 never recycle client names. Also, caller should initialize
1539 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
1541 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1543 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1544 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1545 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
1546 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
1547 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1548 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1549 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
1550 * dbus/dbus-marshal.h:
1551 * dbus/dbus-protocol.h:
1552 Add support for marshalling and demarshalling integer, double
1555 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1560 * bus/connection.c: (connection_disconnect_handler):
1561 Remove the connection from the bus driver's list.
1563 (connection_watch_callback): Dispatch messages.
1565 (free_connection_data): Free connection name.
1567 (bus_connection_setup): Add connection to the bus driver's list.
1568 (bus_connection_remove_owned_service):
1569 (bus_connection_set_name), (bus_connection_get_name):
1570 Add functions for setting and getting the connection's name.
1573 Add function headers.
1575 * bus/driver.c: (create_unique_client_name),
1576 (bus_driver_handle_hello_message),
1577 (bus_driver_send_welcome_message), (bus_driver_message_handler),
1578 (bus_driver_add_connection), (bus_driver_remove_connection):
1581 * bus/services.c: (bus_service_free):
1583 New file that handles communication and registreation with the bus
1586 2003-01-21 Anders Carlsson <andersca@codefactory.se>
1588 * dbus/dbus-connection.c: (dbus_connection_send_message):
1589 Add a new client_serial parameter.
1591 (dbus_connection_send_message_with_reply):
1592 Remove a @todo since we've implemented the blocking function.
1594 (dbus_connection_send_message_with_reply_and_block):
1595 New function that sends a message and waits for a reply and
1596 then returns the reply.
1598 * dbus/dbus-connection.h:
1601 * dbus/dbus-errors.c: (dbus_result_to_string):
1602 * dbus/dbus-errors.h:
1603 Add new DBUS_RESULT.
1605 * dbus/dbus-message-internal.h:
1606 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
1607 (_dbus_message_set_sender), (dbus_message_write_header),
1608 (dbus_message_new_reply), (decode_header_data),
1609 (_dbus_message_loader_return_buffer), (_dbus_message_test):
1610 * dbus/dbus-message.h:
1611 Add new functions that set the reply serial and sender.
1612 Also marshal and demarshal them correctly and add test.
1614 * dbus/dbus-protocol.h:
1615 Add new DBUS_MESSAGE_TYPE_SENDER.
1618 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
1619 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
1620 (dbus_connection_hookup_with_g_main):
1621 * glib/test-dbus-glib.c: (main):
1622 Rewrite to use GIOChannel and remove the GSource crack.
1624 * test/echo-client.c: (main):
1625 * test/watch.c: (check_messages):
1626 Update for changed APIs
1628 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1630 * dbus/Makefile.am: Add dbus-timeout.[cħ]
1632 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
1633 Create a DBusTimeoutList.
1634 (dbus_connection_set_timeout_functions): Add new function to
1635 set timeout callbacks
1637 * dbus/dbus-connection.h: Add public DBusTimeout API.
1639 * dbus/dbus-message.c: (dbus_message_get_service):
1640 * dbus/dbus-message.h: New function.
1642 * dbus/dbus-server.c: Fix small doc typo.
1644 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
1646 2003-01-19 Anders Carlsson <andersca@codefactory.se>
1648 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
1649 of the string, just as long as specified.
1651 2003-01-19 Havoc Pennington <hp@pobox.com>
1653 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
1656 * dbus/dbus-server.c (dbus_server_set_max_connections)
1657 (dbus_server_get_max_connections, dbus_server_get_n_connections):
1658 keep track of current number of connections, and add API for
1659 setting a max (but haven't implemented enforcing the max yet)
1661 2003-01-18 Havoc Pennington <hp@pobox.com>
1663 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
1664 reading/writing if read_watch != NULL or write_watch != NULL.
1666 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
1667 the message loader code to actually load message->header and
1668 message->body into the newly-created message.
1670 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
1673 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
1674 (dbus_connection_get_max_message_size)
1675 (dbus_connection_set_max_live_messages_size)
1676 (dbus_connection_get_max_live_messages_size): implement some
1677 resource limitation functions
1679 * dbus/dbus-resources.c: new file implementing some of the
1680 resource limits stuff
1682 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
1683 missing docs, add @todo to handle OOM etc.
1685 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
1688 2003-01-18 Havoc Pennington <hp@pobox.com>
1690 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
1691 connection if it hasn't been already.
1693 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
1694 replace with DisconnectFunction.
1696 2003-01-18 Havoc Pennington <hp@pobox.com>
1698 Building --disable-verbose-mode --disable-asserts --disable-tests
1699 cuts the library from 112K to 45K or so
1701 * configure.in: check for varargs macro support,
1702 add --enable-verbose-mode, --enable-asserts.
1704 * dbus/dbus-internals.h (_dbus_assert): support
1706 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
1708 2003-01-18 Havoc Pennington <hp@pobox.com>
1710 * dbus/dbus-test.c: include config.h so that tests actually run
1712 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
1713 so the failure mode when that assumption fails will be plenty
1716 2003-01-18 Havoc Pennington <hp@pobox.com>
1718 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
1720 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
1723 * test/Makefile.am: don't use special variable "TESTS" for echo-*
1724 since we don't want to use those in make check
1726 2003-01-15 Havoc Pennington <hp@redhat.com>
1732 2003-01-15 Havoc Pennington <hp@redhat.com>
1734 * test/Makefile.am: fix so that test source code ends up in the
1735 distribution on make distcheck
1737 2003-01-15 Havoc Pennington <hp@redhat.com>
1743 2003-01-15 Havoc Pennington <hp@redhat.com>
1745 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1746 fix build when --disable-tests
1748 * Makefile.am (EXTRA_DIST): put HACKING in here
1750 * HACKING: document procedure for making a tarball release.
1752 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1754 * bus/connection.c: (connection_error_handler),
1755 (bus_connection_setup):
1756 * bus/main.c: (main):
1757 Make sure that the DBusConnectionData struct is NULLed
1758 out to prevent a segfault.
1760 * dbus/dbus-errors.c: (dbus_result_to_string):
1761 * dbus/dbus-errors.h:
1762 * dbus/dbus-message.c: (dbus_message_get_fields),
1763 (dbus_message_get_fields_valist), (_dbus_message_test):
1764 * dbus/dbus-message.h:
1765 Make dbus_message_get_fields return a result code so we can
1766 track invalid fields as well as oom.
1768 2003-01-11 Havoc Pennington <hp@pobox.com>
1770 * configure.in: change --enable-test/--enable-ansi action-if-given
1771 to enable_foo=$enableval instead of enable_foo=yes
1773 2003-01-08 Havoc Pennington <hp@pobox.com>
1775 * dbus/dbus-string.c (_dbus_string_align_length): new function
1777 * dbus/dbus-test-main.c: move main() for test app here
1779 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1780 symbol to run tests, because dbus-test isn't in the main
1783 Code review nitpicks.
1785 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1786 for people with narrow emacs ;-). Assert client_serial was filled
1787 in. Assert message->name != NULL.
1788 (dbus_message_append_fields): have "first_field_type" arg separate
1789 from va list, needed for C++ binding that also uses varargs IIRC
1790 and helps with type safety
1791 (dbus_message_new): add @todo about using DBusString to store
1792 service/name internally
1793 (dbus_message_new): don't leak ->service and ->name on OOM later
1795 (dbus_message_unref): free the service name
1796 (dbus_message_get_fields): same change to varargs
1797 i.e. first_field_type
1798 (_dbus_message_loader_return_buffer): assert that the message data
1799 is aligned (if not it's a bug in our code). Put in verbose griping
1800 about why we set corrupted = TRUE.
1801 (decode_header_data): add FIXME that char* is evil. Was going to
1802 add FIXME about evil locale-specific string.h strncmp, but just
1803 switched to wacky string-as-uint32 optimization. Move check for
1804 "no room for field name" above get_const_data_len() to avoid
1805 assertion failure in get_const_data_len if we have trailing 2
1806 bytes or the like. Check for service and name fields being
1807 provided twice. Don't leak service/name on error. Require field
1808 names to be aligned to 4 bytes.
1810 * dbus/dbus-marshal.c: move byte swap stuff to header
1811 (_dbus_pack_int32): uscore-prefix
1812 (_dbus_unpack_int32): uscore-prefix
1813 (_dbus_unpack_uint32): export
1814 (_dbus_demarshal_string): add @todo complaining about use of
1816 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1817 handling allowing corrupt data to go unchecked
1819 2003-01-08 Havoc Pennington <hp@redhat.com>
1821 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1822 to the select() as needed for authentication. (should be using
1823 _dbus_poll() not select, but for another day)
1825 * dbus/dbus.h: include dbus/dbus-protocol.h
1827 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1829 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1832 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1834 * dbus/dbus-internals.c: (_dbus_type_to_string):
1835 New function that returns a string describing a type.
1837 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1838 * dbus/dbus-marshal.h:
1839 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1840 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1841 (dbus_message_iter_get_byte_array):
1842 * dbus/dbus-message.h:
1843 Add new convenience functions for appending and getting message fields.
1844 Also add demarshalling routines for byte arrays.
1846 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1848 * dbus/dbus-connection-internal.h:
1849 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1850 (_dbus_connection_get_next_client_serial),
1851 (dbus_connection_send_message):
1852 * dbus/dbus-internals.h:
1853 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1854 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1855 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1856 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1857 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1858 (_dbus_verbose_bytes), (_dbus_marshal_test):
1859 * dbus/dbus-marshal.h:
1860 * dbus/dbus-message-internal.h:
1861 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1862 (dbus_message_write_header), (_dbus_message_lock),
1863 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1864 (dbus_message_get_name), (dbus_message_append_int32),
1865 (dbus_message_append_uint32), (dbus_message_append_double),
1866 (dbus_message_append_string), (dbus_message_append_byte_array),
1867 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1868 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1869 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1870 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1871 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1872 (decode_header_data), (_dbus_message_loader_return_buffer),
1873 (message_iter_test), (_dbus_message_test):
1874 * dbus/dbus-message.h:
1875 * dbus/dbus-protocol.h:
1876 * dbus/dbus-test.c: (main):
1878 * glib/test-dbus-glib.c: (message_handler), (main):
1879 * test/echo-client.c: (main):
1880 * test/watch.c: (check_messages):
1881 Make messages sendable and receivable for real.
1883 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1885 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1886 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1887 * dbus/dbus-message.c: (dbus_message_append_int32),
1888 (dbus_message_append_uint32), (dbus_message_append_double),
1889 (dbus_message_append_string), (dbus_message_append_byte_array):
1890 Handle OOM restoration.
1892 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1894 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1895 (_dbus_demarshal_string), (_dbus_marshal_test):
1896 * dbus/dbus-marshal.h:
1897 * dbus/dbus-message.c: (dbus_message_get_name),
1898 Document these functions.
1900 (dbus_message_append_int32), (dbus_message_append_uint32),
1901 (dbus_message_append_double), (dbus_message_append_string),
1902 (dbus_message_append_byte_array):
1903 * dbus/dbus-message.h:
1904 Add functions for adding message fields of different types.
1906 * dbus/dbus-protocol.h:
1907 Add the different types.
1909 2003-01-05 Havoc Pennington <hp@pobox.com>
1911 * bus/connection.c: implement routines for handling connections,
1912 first thing is keeping a list of owned services on each connection
1913 and setting up watches etc.
1915 * bus/services.c: implement a mapping from service names to lists
1918 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1920 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1921 to use static mutexes for global data
1923 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1924 collection of functions to set/get application-specific data
1925 on the DBusConnection.
1927 2003-01-04 Havoc Pennington <hp@pobox.com>
1929 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1930 (_dbus_poll): new function
1932 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1935 * bus/loop.c: initial code for the daemon main loop
1937 2003-01-04 Havoc Pennington <hp@pobox.com>
1939 * test/watch.c (error_handler): make it safe if the error handler
1940 is called multiple times (if we s/error handler/disconnect
1941 handler/ we should just guarantee it's called only once)
1943 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1944 error handler on disconnect (it's quite possible we should
1945 just change the error handler to a "disconnect handler," I'm
1946 not sure we have any other meaningful errors)
1948 * configure.in: check for getpwnam_r
1950 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1951 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1952 mechanism as in SASL spec, using socket credentials
1954 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1955 (_dbus_send_credentials_unix_socket): new function
1957 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1959 (_dbus_write): only check errno if <0 returned
1960 (_dbus_write_two): ditto
1962 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1964 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1965 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1966 (_dbus_marshal_test):
1967 * dbus/dbus-marshal.h:
1968 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1969 to _dbus_marshal_utf8_string. Also fix some tests.
1971 2002-12-28 Harri Porten <porten@kde.org>
1973 * configure.in: added check for C++ compiler and a very cheesy
1974 check for the Qt integration
1976 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1978 * qt/Makefile.am: added
1980 * qt/.cvsignore: added
1982 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1983 latter, added #ifdef QT_THREAD_SUPPORT guard.
1985 * dbus/Makefile.am: added missing headers for make dist
1987 2002-12-28 Kristian Rietveld <kris@gtk.org>
1989 * dbus/Makefile.am: fixup export-symbols-regex.
1991 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1993 * acinclude.m4: Add this file and put the
1994 PKG_CHECK_MODULE macro in it.
1996 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1998 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1999 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2000 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2001 (_dbus_marshal_test):
2002 Make the demarshalling routines align the pos argument.
2003 Add string marshalling tests and fix the obvious bugs
2006 2002-12-26 Havoc Pennington <hp@pobox.com>
2008 * dbus/dbus-auth.c: fixes fixes fixes
2010 * dbus/dbus-transport-unix.c: wire up support for
2011 encoding/decoding data on the wire
2013 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2014 (_dbus_auth_decode_data): append to target string
2015 instead of nuking it.
2017 2002-12-26 Havoc Pennington <hp@pobox.com>
2019 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2020 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2023 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2024 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2025 now). Main point is because I wanted unpack_uint32 to implement
2027 (_dbus_verbose_bytes): new function
2029 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2031 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2032 mechanism to handle a corrupt message stream
2033 (_dbus_message_loader_new): fix preallocation to only prealloc,
2036 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2037 (_dbus_string_test): enhance tests for copy/move and fix the
2040 * dbus/dbus-transport-unix.c: Hold references in more places to
2041 avoid reentrancy problems
2043 * dbus/dbus-transport.c: ditto
2045 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2046 leak reference count in no-message case
2048 * test/watch.c (do_mainloop): handle adding/removing watches
2049 during iteration over the watches. Also, ref the connection/server
2050 stored on a watch, so we don't try to mangle a destroyed one.
2052 * dbus/dbus-transport-unix.c (do_authentication): perform
2055 * dbus/dbus-auth.c (get_state): add a state
2056 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2057 (_dbus_auth_get_unused_bytes): append the unused bytes
2058 to the passed in string, rather than prepend
2060 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2061 the auth conversation DBusAuth
2063 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2064 (_dbus_transport_new_for_domain_socket): when creating a
2065 transport, pass in whether it's a client-side or server-side
2066 transport so we know which DBusAuth to create
2068 2002-12-03 Havoc Pennington <hp@pobox.com>
2070 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2071 _after_ finalizing the derived members
2072 (unix_connection_set): unref watch if we fail to add it
2074 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2075 transport first, so that the connection owned by the
2076 transport will be valid as the transport finalizes.
2078 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2079 if necessary, and remove watches from the connection.
2081 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2083 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2085 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2086 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2087 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2088 (_dbus_marshal_test):
2089 * dbus/dbus-marshal.h:
2090 Add string marshal functions and have the demarshal functions
2091 return the new position.
2093 2002-12-25 Havoc Pennington <hp@pobox.com>
2095 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2096 it is a simple protocol that just maps directly to SASL.
2098 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2099 initial implementation, not actually used yet.
2101 * dbus/dbus-string.c (_dbus_string_find): new function
2102 (_dbus_string_equal): new function
2103 (_dbus_string_base64_encode): new function
2104 (_dbus_string_base64_decode): new function
2106 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2109 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2110 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2111 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2112 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2113 * dbus/dbus-marshal.h:
2114 * dbus/dbus-protocol.h:
2115 * dbus/dbus-test.c: (main):
2117 Add un-optimized marshalling/demarshalling routines.
2119 2002-12-25 Harri Porten <porten@kde.org>
2121 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2123 2002-12-24 Zack Rusin <zack@kde.org>
2125 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2126 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2129 2002-12-24 Havoc Pennington <hp@pobox.com>
2131 * glib/dbus-gthread.c: fix include
2133 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2134 I think glib API needs to change, though, as you don't
2135 want to use DBusMessageFunction, you want to use the
2136 DBusMessageHandler object. Probably
2137 dbus_connection_open_with_g_main_loop()
2138 and dbus_connection_setup_g_main_loop() or something like that
2139 (but think of better names...) that just create a connection
2140 that has watch/timeout functions etc. already set up.
2142 * dbus/dbus-connection.c
2143 (dbus_connection_send_message_with_reply): new function just to
2144 show how the message handler helps us deal with replies.
2146 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2148 * dbus/dbus-string.c (_dbus_string_test): free a string that
2151 * dbus/dbus-hash.c: use memory pools for the hash entries
2152 (rebuild_table): be more paranoid about overflow, and
2153 shrink table when we can
2154 (_dbus_hash_test): reduce number of sprintfs and write
2155 valid C89. Add tests for case where we grow and then
2156 shrink the hash table.
2158 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2160 * dbus/dbus-connection.c (dbus_connection_register_handler)
2161 (dbus_connection_unregister_handler): new functions
2163 * dbus/dbus-message.c (dbus_message_get_name): new
2165 * dbus/dbus-list.c: fix docs typo
2167 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2168 an object representing a handler for messages.
2170 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2173 * glib/dbus-gthread.c: (dbus_gthread_init):
2174 Don't use the gdbus prefix for public functions.
2176 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2180 Add GLib checks and fixup .pc files
2184 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2185 (gdbus_connection_check), (gdbus_connection_dispatch),
2186 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2187 (dbus_connection_gsource_new):
2188 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2189 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2190 * glib/test-dbus-glib.c: (message_handler), (main):
2193 2002-12-15 Harri Porten <porten@kde.org>
2195 * autogen.sh: check for libtoolize before attempting to use it
2197 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2200 * .cvsignore: ignore more stamp files
2202 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2204 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2205 without make install.
2207 2002-12-15 Havoc Pennington <hp@pobox.com>
2209 * dbus/dbus-threads.c: add thread stubs that a higher library
2210 layer can fill in. e.g. the GLib wrapper might fill them in with
2211 GThread stuff. We still need to use this thread API to
2212 thread-safe-ize the library.
2214 2002-12-12 Havoc Pennington <hp@pobox.com>
2216 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2217 below new interfaces and include fewer system headers.
2219 * dbus/dbus-sysdeps.c (_dbus_read): new function
2220 (_dbus_write): new function
2221 (_dbus_write_two): new function
2222 (_dbus_connect_unix_socket): new function
2223 (_dbus_listen_unix_socket): new function
2225 * dbus/dbus-message-internal.h: change interfaces to use
2228 2002-12-11 Havoc Pennington <hp@pobox.com>
2230 * dbus/dbus-types.h: add dbus_unichar
2232 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2234 * dbus/dbus-connection.c (dbus_connection_send_message): return
2237 * dbus/dbus-transport.c: include dbus-watch.h
2239 * dbus/dbus-connection.c: include dbus-message-internal.h
2241 * HACKING: add file with coding guidelines stuff.
2243 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2244 handling here, for security purposes (as in vsftpd). Not actually
2245 using this class yet.
2247 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2248 system/libc usage here, as in vsftpd, for ease of auditing (and
2249 should also simplify portability). Haven't actually moved all the
2250 system/libc usage into here yet.
2252 2002-11-25 Havoc Pennington <hp@pobox.com>
2254 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2255 always print the first verbose message.
2257 2002-11-24 Havoc Pennington <hp@pobox.com>
2259 * test/echo-client.c, test/echo-server.c: cheesy test
2262 * configure.in (AC_CHECK_FUNCS): check for writev
2264 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2267 * dbus/dbus-list.c (_dbus_list_foreach): new function
2269 * dbus/dbus-internals.c (_dbus_verbose): new function
2271 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2272 representing a server that listens for connections.
2274 * dbus/.cvsignore: create
2276 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2277 public API for reporting errors
2279 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2280 public object representing a connection that
2281 sends/receives messages. (Same object used for
2282 both client and server.)
2284 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2285 Basic abstraction for different kinds of stream
2286 that we might read/write messages from.
2288 2002-11-23 Havoc Pennington <hp@pobox.com>
2290 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2293 * dbus/dbus-test.c (main): add list test, and include
2294 dbus-test.h as intended
2296 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2297 (_dbus_hash_table_remove_int): return value indicates
2298 whether the entry existed to remove
2300 * dbus/dbus-list.c: add linked list utility class,
2303 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2306 2002-11-23 Havoc Pennington <hp@pobox.com>
2308 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2309 DBUS_END_DECLS to nothing, that should fix this once and for all
2311 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2313 * dbus/dbus-message.c, dbus/dbus-hash.c:
2314 add some missing @brief
2316 2002-11-23 Havoc Pennington <hp@pobox.com>
2318 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2319 to avoid confusing Doxygen
2321 * dbus/dbus-hash.c: @} not }@
2323 * dbus/dbus-message.c (struct DBusMessage): split out
2326 2002-11-23 Havoc Pennington <hp@pobox.com>
2328 * configure.in: pile on more warning flags if using gcc
2330 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2331 to document static functions
2333 * configure.in: add summary to end of configure so it
2334 looks nice and attractive
2336 * dbus/dbus-hash.c: finish implementation and write unit
2339 * configure.in: add --enable-tests to enable unit tests
2341 * dbus/dbus-test.c: test program to run unit tests
2342 for all files in dbus/*, initially runs a test for
2345 * dbus/dbus-internals.h: file to hold some internal utility stuff
2347 2002-11-22 Havoc Pennington <hp@redhat.com>
2349 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2350 "ported" away from Tcl
2352 * dbus/dbus-types.h: header for types such as dbus_bool_t
2354 2002-11-22 Havoc Pennington <hp@redhat.com>
2356 * dbus/dbus.h: fixups for doc warnings
2358 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2360 (QUIET): make it quiet so we can see warnings
2362 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2364 2002-11-22 Havoc Pennington <hp@redhat.com>
2366 * Makefile.am: include "Doxyfile" target in all-local
2368 * configure.in: generate the Doxyfile
2370 * Doxyfile.in: move Doxyfile here, so we can use
2371 configure to generate a Doxyfile with the right
2374 2002-11-22 Havoc Pennington <hp@redhat.com>
2376 * dbus/dbus-message.c: move inline docs into .c file
2378 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2379 so all docs are under doc/
2380 (MAN_EXTENSION): generate man pages. Use extension
2381 ".3dbus" which matches ".3qt" on my system,
2382 I guess this is OK, I don't know really.
2383 (FILE_PATTERNS): look for .c files not .h, makes sense
2386 2002-11-22 Havoc Pennington <hp@pobox.com>
2388 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2389 because any app can be a server, and any app can be a client,
2390 the bus is a special kind of server.
2392 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2394 * Doxyfile : adding. Still needs Makefile rules to be generated
2395 automatically (just run "doxygen" in the toplevel dir for now to
2398 * dbus/dbus-message.h : Adding sample docs (javadoc since
2399 resembles gtk-doc a little more)
2401 * dbus/dbus.h : Adding sample docs
2403 2002-11-21 Havoc Pennington <hp@redhat.com>
2405 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2406 so we can allow ourselves to include files directly,
2407 instead of having to use dbus.h
2409 * dbus/dbus.h: fill in
2411 * dbus/dbus-message.h: sketch out a sample header file.
2412 Include griping if you include it directly instead of
2415 * dbus/dbus-macros.h: new file with macros for extern "C",
2416 TRUE/FALSE, NULL, etc.
2418 * doc/file-boilerplate.c: put include guards in here
2420 2002-11-21 Havoc Pennington <hp@redhat.com>
2422 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2424 * COPYING: include the GPL as well, and license code
2425 under both AFL and GPL.
2427 2002-11-21 Havoc Pennington <hp@redhat.com>
2429 * acconfig.h: get rid of this
2431 * autogen.sh (run_configure): add --no-configure option
2433 * configure.in: remove AC_ARG_PROGRAM to make
2434 autoconf complain less. add AC_PREREQ.
2435 add AC_DEFINE third arg.
2437 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2440 Fix references so we can distcheck.
2442 2002-11-21 Havoc Pennington <hp@redhat.com>
2444 * Initial module creation