1 2003-03-26 Anders Carlsson <andersca@codefactory.se>
7 * dbus/dbus-server-debug-pipe.c:
8 * dbus/dbus-transport-unix.c:
9 Fix documentation warnings.
11 2003-03-26 Havoc Pennington <hp@pobox.com>
13 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
14 after every test so it's quick and easy to see which leaked, and
15 so we test multiple dbus_shutdown() calls
17 * configure.in: change configure.in XML stuff to also support
20 * config-loader-libxml.c: some hacking
22 * config-loader-expat.c: some hacking
24 * config-parser.c: some hacking, plus tests
26 2003-03-25 Havoc Pennington <hp@redhat.com>
28 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
30 * configure.in: add --with-xml option to specify XML library,
31 right now only libxml is supported.
33 * bus/config-loader-libxml.c, config-parser.c: sync some minor
34 nonworking code between home and work, still just stubs
36 2003-03-24 Havoc Pennington <hp@redhat.com>
38 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
41 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
42 NULL argument for "message" if the error is a well-known one,
43 fill in a generic message in this case.
45 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
48 * bus/test.c (bus_test_flush_bus): add
50 * bus/policy.c (bus_policy_test): test code stub
52 2003-03-24 Havoc Pennington <hp@pobox.com>
54 * bus/connection.c (bus_connections_setup_connection): set up
55 the "can this user connect" function, but it always returns
56 TRUE until we have a config file parser so we can have a config
57 file that allows connections.
59 2003-03-23 Havoc Pennington <hp@pobox.com>
61 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
62 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
63 the mutex, so we can check for proper memory management
66 * dbus/dbus-dataslot.c: remove the mutex from
67 DBusDataSlotAllocator and lock it manually when using it,
68 to simplify fitting it into the global slots framework.
70 * dbus/dbus-threads.c (init_static_locks): rework how we're
71 handling global locks so they are easily shut down.
73 * bus/policy.c (bus_policy_append_rule): fix
75 * bus/test-main.c (main): check for memleaks
77 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
78 test suite check for memleaks
80 * dbus/dbus-memory.c: add support in test mode for tracking
81 number of outstanding blocks
83 2003-03-23 Havoc Pennington <hp@pobox.com>
85 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
88 * dbus/dbus-hash.h: add ULONG hash keys
90 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
91 (_dbus_get_group_id): new function
93 2003-03-20 Havoc Pennington <hp@redhat.com>
95 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
97 (dbus_connection_get_unix_user): new function
99 2003-03-20 Havoc Pennington <hp@pobox.com>
101 * bus/connection.c (bus_connection_send_oom_error): assert that
103 (connection_execute_transaction): ditto
104 (bus_connection_preallocate_oom_error): fix to set the sender, and
105 set recipient to the destination service, not the bus driver
107 * bus/policy.c: hacking
109 * dbus/dbus-message.c (dbus_message_service_is): new function
110 (dbus_message_sender_is): new
112 2003-03-19 Havoc Pennington <hp@redhat.com>
114 * bus/policy.c: start sketching code for policy restrictions on
115 what connections can do.
117 2003-03-18 Havoc Pennington <hp@redhat.com>
119 * doc/TODO: some notes on high-level todo items. Little nitpick
120 stuff is all in @todo, so no need to add it here.
122 * doc/config-file.txt: some notes on how config file might look
124 2003-03-18 Anders Carlsson <andersca@codefactory.se>
130 2003-03-17 Havoc Pennington <hp@redhat.com>
132 * dbus/dbus-internals.h: add gcc attributes so that
133 our printf-style functions warn on bad arguments to
136 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
139 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
142 2003-03-17 Havoc Pennington <hp@redhat.com>
144 * bus/test-main.c (main): make it print something as it runs
145 so make check doesn't look stuck
147 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
148 from CVS, now obsolete
150 2003-03-17 Anders Carlsson <andersca@codefactory.se>
152 * bus/dispatch.c: (bus_dispatch):
153 Refetch the service name since it may have been reallocated
154 when dbus_message_set_sender was called.
156 * dbus/dbus-sysdeps.c: (_dbus_accept):
157 Add address and address length variables and use them to stop
158 valgrind from complaining.
160 2003-03-17 Havoc Pennington <hp@pobox.com>
162 All tests pass, no memleaks, no valgrind complaints.
164 * bus/test.c: refcount handler_slot
166 * bus/connection.c (bus_connections_new): refcount
169 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
170 bytes so that auth scripts pass.
172 * bus/dispatch.c: init message_handler_slot so it gets allocated
175 * bus/dispatch.c (message_handler_slot_ref): fix memleak
177 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
178 dealloc server_pipe_hash when no longer used for benefit of
181 * dbus/dbus-auth.c (process_command): memleak fix
183 * bus/dispatch.c (check_hello_message): memleak fix
185 2003-03-16 Havoc Pennington <hp@pobox.com>
187 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
189 2003-03-17 Anders Carlsson <andersca@codefactory.se>
191 * bus/activation.c (bus_activation_activate_service): Append
192 the pending activation entry to the list of pending activations.
194 2003-03-16 Havoc Pennington <hp@pobox.com>
196 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
199 * dbus/dbus-address.c (create_entry): fix OOM handling when
200 failing to alloc entry->method
202 2003-03-16 Havoc Pennington <hp@pobox.com>
204 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
207 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
208 add some missing dbus_set_result
210 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
211 alloc the DBusMessageHandler
213 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
214 the transport here, since we call this from the finalizer; it
215 resulted in a double-finalize.
217 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
218 where we tried to use transport->connection that was NULL,
219 happened when transport was disconnected early on due to OOM
221 * bus/*.c: adapt to handle OOM for watches/timeouts
223 * dbus/dbus-transport-unix.c: port to handle OOM during
226 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
227 reference to unused bytes instead of a copy
229 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
232 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
235 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
238 2003-03-16 Anders Carlsson <andersca@codefactory.se>
240 * doc/dbus-specification.sgml:
241 Document reply message for ActivateService.
243 2003-03-16 Anders Carlsson <andersca@codefactory.se>
245 * bus/activation.c: (bus_pending_activation_entry_free),
246 (bus_pending_activation_free), (bus_activation_new),
247 (bus_activation_unref), (bus_activation_service_created),
248 (bus_activation_activate_service):
250 * bus/bus.c: (bus_context_new):
251 * bus/desktop-file.c: (new_section):
252 * bus/driver.c: (bus_driver_send_service_deleted),
253 (bus_driver_handle_activate_service):
254 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
256 * dbus/dbus-connection.c:
257 (dbus_connection_send_with_reply_and_block):
258 * dbus/dbus-message.c: (dbus_message_append_args_valist):
259 * dbus/dbus-protocol.h:
260 Make activation work better. Now pending activations will be queued
261 and the daemon won't try to activate services that are already registered.
263 2003-03-16 Havoc Pennington <hp@pobox.com>
265 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
268 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
269 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
271 2003-03-16 Havoc Pennington <hp@pobox.com>
273 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
274 this. always run the test suite before commit...
276 * bus/*: adapt to DBusConnection API changes
278 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
279 requires renaming stuff to avoid dbus_connection_dispatch name
282 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
285 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
286 separate from _dbus_message_loader_return_buffer()
288 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
289 this, because it's now always broken to use; the number of
290 messages in queue vs. the number still buffered by the message
291 loader is undefined/meaningless. Should use
292 dbus_connection_get_dispatch_state().
293 (dbus_connection_dispatch): rename from
294 dbus_connection_dispatch_message
296 2003-03-16 Havoc Pennington <hp@pobox.com>
298 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
301 2003-03-16 Anders Carlsson <andersca@codefactory.se>
303 * dbus/dbus-connection.c:
304 (dbus_connection_send_with_reply_and_block):
305 Decrease connection->n_incoming when removing an entry
307 * dbus/dbus-dict.c: (dbus_dict_entry_free),
308 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
309 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
310 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
311 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
312 (dbus_dict_get_byte_array):
313 Handle NULL arrays and strings. Also add support for byte arrays.
315 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
316 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
317 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
318 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
319 (_dbus_demarshal_dict), (demarshal_and_validate_len),
320 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
321 * dbus/dbus-marshal.h:
322 Add support for marshalling and demarshalling empty arrays and strings.
324 * dbus/dbus-message.c: (dbus_message_append_args_valist),
325 (dbus_message_append_string_array),
326 (dbus_message_iter_get_boolean),
327 (dbus_message_iter_get_boolean_array),
328 (dbus_message_iter_get_int32_array),
329 (dbus_message_iter_get_uint32_array),
330 (dbus_message_iter_get_double_array),
331 (dbus_message_iter_get_byte_array),
332 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
333 (check_message_handling):
334 Add support for getting empty arrays and dicts.
336 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
337 Don't do any validation at all for now, that's better than just checking
340 * test/data/valid-messages/emptiness.message:
341 New test message with lots of empty arrays.
343 2003-03-16 Havoc Pennington <hp@pobox.com>
345 * dbus/dbus-connection.c
346 (_dbus_connection_queue_received_message_link): new function that
347 can't fail due to OOM
349 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
350 new function pops a message together with a list link
353 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
354 message queuing functions to avoid needing to alloc memory
356 2003-03-16 Havoc Pennington <hp@pobox.com>
358 Oops - test code was only testing failure of around 30 of the
359 mallocs in the test path, but it turns out there are 500+
360 mallocs. I believe this was due to misguided linking setup such
361 that there was one copy of dbus_malloc etc. in the daemon and one
362 in the shared lib, and only daemon mallocs were tested. In any
363 case, the test case now tests all 500+ mallocs, and doesn't pass
364 yet, though there are lots of fixes in this patch.
366 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
367 this so that it doesn't need to allocate memory, since it
368 has no way of indicating failure due to OOM (and would be
371 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
373 * bus/Makefile.am: rearrange to create two self-contained
374 libraries, to avoid having libraries with overlapping symbols.
375 that was resulting in weirdness, e.g. I'm pretty sure there
376 were two copies of global static variables.
378 * dbus/dbus-internals.c: move the malloc debug stuff to
381 * dbus/dbus-list.c (free_link): free list mempool if it becomes
384 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
386 * dbus/dbus-address.c (dbus_parse_address): free list nodes
389 * bus/dispatch.c (bus_dispatch_add_connection): free
390 message_handler_slot when no longer using it, so
391 memory leak checkers are happy for the test suite.
393 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
395 * bus/bus.c (new_connection_callback): disconnect in here if
396 bus_connections_setup_connection fails.
398 * bus/connection.c (bus_connections_unref): fix to free the
400 (bus_connections_setup_connection): if this fails, don't
401 disconnect the connection, just be sure there are no side
404 * dbus/dbus-string.c (undo_alignment): unbreak this
406 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
408 (_dbus_auth_new): fix the order in which we free strings
411 * bus/connection.c (bus_connection_disconnected): fix to
412 not send ServiceDeleted multiple times in case of memory
415 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
416 get the base service name
417 (dbus_bus_register_client): don't return base service name,
418 instead store it on the DBusConnection and have an accessor
420 (dbus_bus_register_client): rename dbus_bus_register()
422 * bus/dispatch.c (check_hello_message): verify that other
423 connections on the bus also got the correct results, not
424 just the one sending hello
426 2003-03-15 Havoc Pennington <hp@pobox.com>
428 Make it pass the Hello handling test including all OOM codepaths.
429 Now to do other messages...
431 * bus/services.c (bus_service_remove_owner): fix crash when
432 removing owner from an empty list of owners
433 (bus_registry_ensure): don't leave service in the list of
434 a connection's owned services if we fail to put the service
437 * bus/connection.c (bus_connection_preallocate_oom_error): set
438 error flag on the OOM error.
440 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
441 handle _dbus_transport_set_connection failure
443 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
444 to create watches up front and simply enable/disable them as
446 (unix_connection_set): this can now fail on OOM
448 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
449 of enabling/disabling a watch or timeout.
451 * bus/loop.c (bus_loop_iterate): don't touch disabled
454 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
456 2003-03-15 Havoc Pennington <hp@pobox.com>
458 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
459 write useful test code, after all that futzing around ;-)
461 Test does not yet pass because we can't handle OOM in
462 _dbus_transport_messages_pending (basically,
463 dbus_connection_preallocate_send() does not prealloc the write
464 watch). To fix this, I think we need to add new stuff to
465 set_watch_functions, namely a SetEnabled function so we can alloc
466 the watch earlier, then enable it later.
468 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
469 dbus-memory.c to the convenience lib
471 * bus/test.c: rename some static functions to keep them clearly
472 distinct from stuff in connection.c. Handle client disconnection.
474 2003-03-14 Havoc Pennington <hp@pobox.com>
476 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
477 transport, tests more of the real codepath. Set up clients
478 with bus_setup_debug_client.
480 * bus/test.c (bus_setup_debug_client): function to set up debug
481 "clients" on the main loop
483 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
486 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
489 * dbus/dbus-server-debug.c: support a debug server based on pipes
491 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
492 (_dbus_close): new function
494 * configure.in: check for socketpair
496 2003-03-14 Havoc Pennington <hp@redhat.com>
498 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
501 * dbus/dbus-transport-debug.c: rework this a good bit to be
502 less complicated. hopefully still works.
504 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
507 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
510 * dbus/dbus-message.c (dbus_message_copy): rename from
511 dbus_message_new_from_message, fix it up to copy
512 all the message fields, add test case
514 * bus/dispatch.c (bus_dispatch_test): add some more test code,
515 not quite passing yet
517 2003-03-14 Havoc Pennington <hp@pobox.com>
519 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
520 until no work remains" in test code. (the large diff here
521 is just code movement, no actual changes)
523 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
524 1, no point waiting around for test code.
525 (_dbus_server_debug_accept_transport): unref the timeout
526 after adding it (right?)
528 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
530 2003-03-13 Havoc Pennington <hp@redhat.com>
532 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
535 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
538 * dbus/dbus-connection.h: Make AddWatchFunction and
539 AddTimeoutFunction return a bool so they can fail on out-of-memory
541 * bus/bus.c (bus_context_new): set up timeout handlers
543 * bus/connection.c (bus_connections_setup_connection): set up
546 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
549 * bus/bus.c (bus_context_new): adapt to changes
551 * bus/connection.c: adapt to changes
553 * test/watch.c: adapt to DBusWatch changes
555 * bus/dispatch.c (bus_dispatch_test): started adding this but
558 2003-03-14 Anders Carlsson <andersca@codefactory.se>
560 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
562 2003-03-13 Havoc Pennington <hp@pobox.com>
564 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
565 set up a test framework as for the library
567 2003-03-12 Havoc Pennington <hp@pobox.com>
569 Throughout: purge global variables, introduce BusActivation,
570 BusConnections, BusRegistry, etc. objects instead.
572 * bus/bus.h, bus/bus.c: introduce BusContext as a global
575 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
576 going to redo this a bit differently I think
578 2003-03-12 Havoc Pennington <hp@redhat.com>
580 Mega-patch that gets the message bus daemon initially handling
581 out-of-memory. Work still needed. Also lots of random
582 moving stuff to DBusError instead of ResultCode.
584 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
586 * dbus/dbus-connection.c
587 (dbus_connection_send_with_reply_and_block): use DBusError
589 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
592 * dbus/dbus-connection.c (dbus_connection_send): drop the result
593 code here, as the only failure possible is OOM.
595 * bus/connection.c (bus_connection_disconnect):
596 rename bus_connection_disconnected as it's a notification only
598 * bus/driver.c (bus_driver_handle_acquire_service): don't free
599 "name" on get_args failure, should be done by get_args;
600 don't disconnect client for bad args, just return an error.
601 (bus_driver_handle_service_exists): ditto
603 * bus/services.c (bus_services_list): NULL-terminate returned array
605 * bus/driver.c (bus_driver_send_service_lost)
606 (bus_driver_send_service_acquired): send messages from driver to a
607 specific client to the client's unique name, not to the broadcast
610 * dbus/dbus-message.c (decode_header_data): reject messages that
611 contain no name field
612 (_dbus_message_get_client_serial): rename to
613 dbus_message_get_serial and make public
614 (_dbus_message_set_serial): rename from set_client_serial
615 (_dbus_message_set_reply_serial): make public
616 (_dbus_message_get_reply_serial): make public
618 * bus/connection.c (bus_connection_foreach): allow stopping
619 iteration by returning FALSE from foreach function.
621 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
622 (dbus_connection_free_preallocated_send)
623 (dbus_connection_preallocate_send): new API for sending a message
624 without possibility of malloc failure.
625 (dbus_connection_send_message): rename to just
626 dbus_connection_send (and same for whole function family)
628 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
630 * dbus/dbus-sysdeps.c (_dbus_exit): new function
632 * bus/activation.c: handle/return errors
634 * dbus/dbus-errors.h: add more DBUS_ERROR #define
636 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
637 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
638 (_dbus_result_from_errno): move to this file
640 2003-03-10 Anders Carlsson <andersca@codefactory.se>
642 * dbus/dbus-marshal.c:
643 (_dbus_marshal_set_string):
644 Take a length argument so we can marshal the correct string
647 (_dbus_marshal_dict), (_dbus_demarshal_dict),
648 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
649 (_dbus_marshal_test):
650 * dbus/dbus-marshal.h:
651 Add support for marshalling and demarshalling dicts.
653 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
654 Add support for TYPE DICT.
656 * dbus/dbus-message.c: (set_string_field):
657 Adjust header padding.
659 (dbus_message_append_args_valist), (dbus_message_append_dict),
660 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
661 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
662 (check_message_handling), (check_have_valid_message):
663 * dbus/dbus-message.h:
664 Add functions for setting and getting dicts.
666 * dbus/dbus-protocol.h:
672 * doc/dbus-specification.sgml:
673 Add information about how dicts are marshalled.
675 * test/data/invalid-messages/dict-with-nil-value.message:
676 * test/data/invalid-messages/too-short-dict.message:
677 * test/data/valid-messages/dict-simple.message:
678 * test/data/valid-messages/dict.message:
679 Add sample messages containing dicts.
681 2003-03-08 Anders Carlsson <andersca@codefactory.se>
683 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
685 2003-03-07 Anders Carlsson <andersca@codefactory.se>
688 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
689 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
690 (dbus_dict_set_int32), (dbus_dict_set_uint32),
691 (dbus_dict_set_double), (dbus_dict_set_string),
692 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
693 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
694 (dbus_dict_set_string_array), (_dbus_dict_test):
696 Fix according to comments from Havoc.
698 2003-03-06 Michael Meeks <michael@server.home>
700 * configure.in: if we don't have kde-config, disable have_qt.
702 2003-03-07 Anders Carlsson <andersca@codefactory.se>
707 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
708 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
709 (dbus_dict_remove), (dbus_dict_get_value_type),
710 (dbus_dict_get_keys), (dbus_dict_put_boolean),
711 (dbus_dict_put_int32), (dbus_dict_put_uint32),
712 (dbus_dict_put_double), (dbus_dict_put_string),
713 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
714 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
715 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
716 (dbus_dict_get_int32), (dbus_dict_get_uint32),
717 (dbus_dict_get_double), (dbus_dict_get_string),
718 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
719 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
720 (dbus_dict_get_string_array), (_dbus_dict_test):
722 Add DBusDict implementation
724 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
728 2003-03-04 Havoc Pennington <hp@pobox.com>
730 * test/data/auth/*: adapt to changes
732 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
733 USERID_BASE64 and change USERNAME_BASE64 to put in username not
736 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
737 more stuff from being in a context name, to make the protocol
740 * dbus/dbus-errors.c (dbus_error_has_name): new function
741 (dbus_error_is_set): new function
743 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
744 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
746 * dbus/dbus-connection.c (dbus_connection_flush): also read
747 messages during a flush operation
749 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
751 2003-03-05 Anders Carlsson <andersca@codefactory.se>
753 * configure.in: Check for gethostbyname on Solaris.
755 * dbus/dbus-transport.c: (_dbus_transport_open):
756 Remove duplicate "tcp" entry.
758 * doc/dbus-specification.sgml:
761 2003-03-05 Anders Carlsson <andersca@codefactory.se>
763 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
764 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
765 (_dbus_keyring_test):
766 * dbus/dbus-md5.c: (_dbus_md5_compute):
767 * dbus/dbus-sha.c: (_dbus_sha_compute):
770 2003-03-05 Anders Carlsson <andersca@codefactory.se>
772 * README: Add some things.
774 2003-03-04 Anders Carlsson <andersca@codefactory.se>
776 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
777 after case DBUS_TYPE_BOOELAN.
779 2003-03-02 Havoc Pennington <hp@pobox.com>
781 * test/break-loader.c (randomly_set_extreme_ints): add test that
782 sets really huge and small integers
784 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
785 that length of boolean array fits in the string, and that
786 string has room for boolean value in single-bool case.
788 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
789 optional value to "ALIGN" command which is what to fill the
792 * test/data/valid-messages/no-padding.message: add regression
793 test for the message padding problem
795 2003-03-02 Havoc Pennington <hp@pobox.com>
797 * dbus/dbus-message.c (decode_header_data): fix to always init
798 message_padding, from Benjamin Dauvergne
800 2003-03-02 Havoc Pennington <hp@pobox.com>
806 2003-03-01 Joe Shaw <joe@assbarn.com>
808 * configure.in: Check for "struct cmsgcred" and try to access its
809 members for BSD-like unices.
811 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
812 _dbus_read_credentials_unix_socket().
813 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
814 read() for reading the credential byte off the unix socket. Use
815 struct cmsgcred on systems that support it.
817 2003-02-27 Alexander Larsson <alexl@redhat.com>
821 Make gthreads-2.0 dependency optional. Don't build thread test if
824 2003-02-27 Havoc Pennington <hp@pobox.com>
826 * dbus/dbus-connection.c
827 (dbus_connection_send_message_with_reply_and_block): fix doh!
828 doh! doh! bug that resulted in never removing a reply from the
829 queue, no wonder we called get_reply_serial so much ;-)
831 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
832 and client serial instead of demarshaling them every time
834 2003-02-27 Havoc Pennington <hp@pobox.com>
836 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
837 more inlined, using dbus-string-private.h, speeds things up
840 * dbus/dbus-string.c (_dbus_string_free): apply align offset
841 when freeing the string
842 (_dbus_string_steal_data): fix for align offset
843 (undo_alignment): new function
845 2003-02-26 Havoc Pennington <hp@redhat.com>
847 All kinds of audit fixes from Owen, plus initial attempt to
848 handle unaligned memory returned from malloc.
850 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
851 leave room for align_offset and nul byte
852 (fixup_alignment): function to track an align_offset and
853 ensure real->str is aligned
854 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
855 to allow a nul byte plus align offset
856 (_dbus_string_lock): fix overflow issue
857 (_dbus_string_init_const_len): add assertions on sanity of len,
858 assign allocated to be ALLOCATION_PADDING larger than len
859 (set_length): fixup the overflow handling
860 (_dbus_string_get_data_len): fix overflow in assertion
861 (open_gap): detect overflow in size of gap to be opened
862 (_dbus_string_lengthen): add overflow check
863 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
864 (_dbus_string_append): add overflow check
865 (_dbus_string_append_unichar): overflow
866 (_dbus_string_delete): fix overflow in assertion
867 (_dbus_string_copy_len): overflow in assertion
868 (_dbus_string_replace_len): overflows in assertions
869 (_dbus_string_find): change to implement in terms of
871 (_dbus_string_find_to): assorted fixage
872 (_dbus_string_equal_c_str): assert c_str != NULL,
873 fix logic so the function works
874 (_dbus_string_ends_with_c_str): fix overflow thingy
875 (_dbus_string_base64_encode): overflow fix
876 (_dbus_string_validate_ascii): overflow
877 (_dbus_string_validate_nul): overflow
879 2003-02-26 Havoc Pennington <hp@redhat.com>
881 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
883 2003-02-26 Alexander Larsson <alexl@redhat.com>
886 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
888 * dbus/dbus-connection.c:
889 * dbus/dbus-connection.h:
890 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
891 Add dbus_connection_set_wakeup_main_function and use it when queueing
892 incoming and outgoing messages.
895 * dbus/dbus-dataslot.c:
896 Threadsafe usage of DBusDataSlotAllocator
898 * dbus/dbus-message.c: (dbus_message_get_args_iter):
901 * dbus/dbus-server-unix.c:
905 Implement the new wakeup functions for glib.
908 * glib/test-thread-client.c:
909 * glib/test-thread-server.c:
910 * glib/test-thread.h:
911 Initial cut at some thread test code. Not really done yet.
913 2003-02-26 Havoc Pennington <hp@pobox.com>
915 * dbus/dbus-connection.c
916 (dbus_connection_send_message_with_reply_and_block): fix crash
917 where we ref'd the outgoing message instead of the returned reply
919 * dbus/dbus-transport-unix.c (do_authentication): check read watch
920 at the end of this function, so if we didn't need to read for
921 authentication, we reinstall it for receiving messages
923 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
924 a NULL sender for peer-to-peer case
926 * dbus/dbus-transport-unix.c (check_read_watch): handle
927 !authenticated case correctly
929 * glib/dbus-gmain.c: add support for DBusServer
931 * dbus/dbus-server.c: add data slot support
933 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
934 return values and handle errors
936 * dbus/dbus-dataslot.c: factor out the data slot stuff from
939 * Doxyfile.in (INPUT): add glib subdir
941 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
942 setup_with_g_main instead of hookup_with_g_main; write docs
944 2003-02-24 Anders Carlsson <andersca@codefactory.se>
946 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
947 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
948 * dbus/dbus-message.c: (dbus_message_append_boolean),
949 (dbus_message_append_boolean_array),
950 (dbus_message_get_args_valist), (_dbus_message_test):
951 * dbus/dbus-message.h:
952 * doc/dbus-specification.sgml:
953 Various fixes as pointed out by Havoc.
955 * test/data/invalid-messages/bad-boolean-array.message:
956 * test/data/invalid-messages/bad-boolean.message:
957 Add invalid boolean value test cases.
959 2003-02-24 Anders Carlsson <andersca@codefactory.se>
961 * dbus/dbus-internals.c: (_dbus_type_to_string):
962 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
963 (_dbus_marshal_validate_arg):
964 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
965 * dbus/dbus-message.c: (dbus_message_append_args_valist),
966 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
967 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
968 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
969 (dbus_message_iter_get_double),
970 (dbus_message_iter_get_boolean_array), (message_iter_test):
971 * dbus/dbus-message.h:
972 * dbus/dbus-protocol.h:
973 * doc/dbus-specification.sgml:
974 * test/data/valid-messages/lots-of-arguments.message:
975 Add support for boolean and boolean array types.
977 2003-02-23 Havoc Pennington <hp@pobox.com>
979 * dbus/dbus-keyring.c: finish most of this implementation and
982 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
983 these barf if the error isn't cleared to NULL
985 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
986 (_dbus_create_directory): new function
988 * dbus/dbus-errors.c (dbus_set_error): fix warning
990 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
991 (_dbus_string_hex_decode): new function
992 (test_hex_roundtrip): test code
994 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
996 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
998 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
999 the save-to-temp/rename trick to atomically write the new file
1000 (_dbus_string_parse_uint): new function
1002 2003-02-22 Havoc Pennington <hp@pobox.com>
1004 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1006 2003-02-22 Havoc Pennington <hp@pobox.com>
1008 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1009 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1011 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1013 * dbus/test/data/sha-1: add US government test suite for SHA-1
1015 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1017 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1018 Make string arrays NULL-terminated.
1020 * dbus/dbus-memory.c: (dbus_free_string_array):
1021 * dbus/dbus-memory.h:
1022 New function for freeing NULL-terminated string arrays.
1024 * dbus/dbus-message-builder.c: (append_quoted_string),
1025 (_dbus_message_data_load):
1026 Add support for array types.
1028 * dbus/dbus-message.c: (check_message_handling):
1029 Add more types as test cases.
1031 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1032 (_dbus_string_parse_double):
1033 Add the start offset to the end offset.
1035 * test/data/valid-messages/lots-of-arguments.message:
1036 New test message with lots of arguments.
1038 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1040 * dbus/dbus-message.c: (dbus_message_append_nil),
1041 (dbus_message_append_int32), (dbus_message_append_uint32),
1042 (dbus_message_append_double), (dbus_message_append_string),
1043 (dbus_message_append_int32_array),
1044 (dbus_message_append_uint32_array),
1045 (dbus_message_append_double_array),
1046 (dbus_message_append_byte_array),
1047 (dbus_message_append_string_array):
1048 Fix all out-of-memory handling in these functions.
1050 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1052 * dbus/dbus-message.c: (dbus_message_append_nil):
1055 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1057 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1058 (dbus_message_append_nil), (dbus_message_append_int32_array),
1059 (dbus_message_append_uint32_array),
1060 (dbus_message_append_double_array),
1061 (dbus_message_append_byte_array),
1062 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1063 (dbus_message_iter_get_int32_array),
1064 (dbus_message_iter_get_uint32_array),
1065 (dbus_message_iter_get_double_array),
1066 (dbus_message_iter_get_byte_array),
1067 (dbus_message_iter_get_string_array):
1069 * dbus/dbus-message.h:
1070 Add functions for appending and getting arrays.
1072 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1074 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1075 element size at least 8 bytes, fixes mempool tests on
1078 2003-02-20 Alexander Larsson <alexl@redhat.com>
1080 * dbus/dbus-transport-unix.c (unix_do_iteration):
1081 Unlock the connection mutex during a blocking select call.
1082 Add todo about how we need a way to wake up the select.
1084 * dbus/dbus-connection-internal.h:
1085 * dbus/dbus-connection.c:
1086 Add _dbus_connection_lock and _dbus_connection_unlock.
1088 2003-02-19 Havoc Pennington <hp@pobox.com>
1090 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1091 Doxyfile.in, not Doxyfile
1093 * dbus/dbus-keyring.c: do some hacking on this
1095 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1097 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1099 (dbus_set_error): remove dbus_error_init, check for message ==
1100 NULL *before* we sprintf into it, and add @todo about including
1101 system headers in this file
1103 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1105 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1107 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1108 get various bits of user information based on either username
1110 (_dbus_homedir_from_username): new function
1112 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1115 Add check for nonposix getpwnam_r
1117 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1118 Align the pool element size to a sizeof (void *) boundary.
1120 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1121 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1122 General Solaris fixes.
1124 * test/data/valid-messages/simplest-manual.message:
1125 Explicitly state that we want little-endian packing.
1127 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1129 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1131 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1132 Added to create a transport connecting using a tcp/ip socket.
1134 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1135 to a tcp socket at given host and port.
1136 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1139 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1141 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1142 Added to create a server listening on a TCP/IP socket.
1144 2003-02-19 Havoc Pennington <hp@pobox.com>
1146 Throughout: mop up all the Doxygen warnings and undocumented
1149 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1150 to search any paths.
1152 * dbus/dbus-threads.c: move global mutex initializers to
1153 dbus-internals.h, multiple prototypes was confusing doxygen
1154 besides being kind of ugly
1156 * Doxyfile (PREDEFINED): have Doxygen define
1157 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1158 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1159 (do not abuse the feature! it's for stuff like the autogenerated
1160 macros in dbus-md5.c, not just for things you don't feel like
1163 2003-02-18 Havoc Pennington <hp@pobox.com>
1165 * dbus/dbus-string.c (_dbus_string_zero): new function
1167 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1168 wrap it in some dbus-friendly API
1170 * dbus/dbus-types.h: add 16-bit types
1172 2003-02-18 Joe Shaw <joe@assbarn.com>
1174 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1175 credentials from our currently running process.
1176 (get_word): Fix a buglet where we were copying the entire length
1177 instead of relative to our position.
1179 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1180 keys on the stack... it's 640k of data.
1182 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1183 read the credentials byte off the socket, even if we don't have
1185 (_dbus_poll): Implement poll() using select() for systems which
1188 * glib/test-dbus-glib.c (main): Print out an error if no
1189 parameters are given.
1191 * test/data/auth/fallback.auth-script: Added. Tests that a client
1192 can fallback to a secondary auth mechanism if the first fails.
1194 2003-02-18 Havoc Pennington <hp@pobox.com>
1198 2003-02-17 Havoc Pennington <hp@pobox.com>
1200 * doc/dbus-specification.sgml: lots of cosmetic
1201 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1202 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1203 s/server/bus/ (except in authentication section). Add a section
1204 "Message Bus Message Routing"
1206 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1212 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1214 * doc/dbus-specification.sgml:
1215 Specification updates.
1217 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1219 * bus/activation.c: (bus_activation_init), (child_setup),
1220 (bus_activation_activate_service):
1222 * bus/main.c: (main):
1223 Set DBUS_ADDRESS environment variable.
1225 * dbus/dbus-errors.c: (dbus_set_error):
1226 Don't use va_copy since that's a C99 feature.
1228 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1229 (_dbus_spawn_async):
1230 * dbus/dbus-sysdeps.h:
1231 Add child_setup_func to _dbus_spawn_async.
1233 * doc/dbus-specification.sgml:
1234 Update specification.
1236 * test/spawn-test.c: (setup_func), (main):
1239 2003-02-17 Alexander Larsson <alexl@redhat.com>
1241 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1244 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1248 * doc/dbus-test-plan.sgml:
1249 Add test plan document.
1254 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1256 * dbus/dbus-message.c: (decode_header_data),
1257 (_dbus_message_loader_return_buffer):
1258 Set the header padding amount when loading a message.
1260 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1262 * bus/dispatch.c: (send_one_message):
1263 Only send broadcast messages to registered connections.
1265 * dbus/dbus-message.c: (dbus_message_name_is):
1266 * dbus/dbus-message.h:
1267 New convenience function.
1269 * dbus/dbus-transport-debug.c: (do_reading):
1270 Only dispatch one message per run.
1273 * test/bus-test.c: (new_connection_callback), (die),
1274 (test_hello_client1_handler), (test_hello_client2_handler),
1275 (test_hello_replies), (main):
1277 * test/bus-test-loop.[ch]:
1280 2003-02-16 Havoc Pennington <hp@pobox.com>
1282 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1283 backward conditional
1285 2003-02-16 Alexander Larsson <alexl@redhat.com>
1287 * dbus/dbus-connection.c:
1288 Implement sent_message_with_reply. (with_reply_and block is still
1290 Made dispatch_message not lose message if OOM.
1292 * dbus/dbus-errors.h:
1293 Add NoReply error (for reply timeouts).
1295 2003-02-16 Alexander Larsson <alexl@redhat.com>
1297 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1298 Actually free keys and values when destroying hashtable.
1300 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1302 * dbus/dbus-auth.c: (client_try_next_mechanism):
1305 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1306 Return TRUE if there's no thread implementation around.
1308 * glib/dbus-gmain.c: (free_source),
1309 (dbus_connection_hookup_with_g_main):
1310 Make sure to remove the GSource when the connection is finalized.
1312 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1314 * bus/dispatch.c: (bus_dispatch_message_handler):
1315 * dbus/dbus-errors.h:
1316 Return an error if someone tries to send a message to a service
1319 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1321 * bus/activation.c: (load_directory), (bus_activation_init),
1322 (bus_activation_activate_service):
1325 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1326 More work on the activation handling.
1328 * dbus/dbus-errors.h:
1329 Add some error messages
1331 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1332 * dbus/dbus-message.h:
1333 New function that creates an error message.
1335 * dbus/dbus-protocol.h:
1336 Add ACTIVATE_SERVER message.
1338 * dbus/dbus-server-unix.c: (unix_handle_watch),
1339 (_dbus_server_new_for_domain_socket):
1340 Call _dbus_fd_set_close_on_exec.
1342 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1343 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1344 (_dbus_fd_set_close_on_exec):
1345 * dbus/dbus-sysdeps.h:
1346 Add _dbus_fd_set_close_on exec function. Also add function that checks
1347 that all open fds are set to close-on-exec and warns otherwise.
1349 * dbus/dbus-transport-unix.c:
1350 (_dbus_transport_new_for_domain_socket):
1351 Call _dbus_fd_set_close_on_exec.
1353 2003-02-16 Havoc Pennington <hp@pobox.com>
1355 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1356 allow people to avoid setting SIGPIPE to SIG_IGN
1357 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1358 we've been asked not to
1360 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1362 * dbus/dbus-list.c: (_dbus_list_append_link),
1363 (_dbus_list_prepend_link):
1364 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1368 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1371 * bus/activation.c: (bus_activation_entry_free),
1372 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1374 * bus/main.c: (main):
1375 Add simple activation support, doesn't work yet though.
1377 2003-02-15 Zack Rusin <zack@kde.org>
1379 * qt/dbus-qthread.cpp: small casting fix
1381 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1383 * dbus/dbus-errors.c: (dbus_set_error):
1384 * dbus/dbus-errors.h:
1385 Add a few errors and make dbus_set_error void.
1387 * dbus/dbus-sysdeps.c:
1388 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1389 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1390 * dbus/dbus-sysdeps.h:
1391 Add _dbus_spawn_async.
1393 * test/spawn-test.c: (main):
1394 Test for _dbus_spawn_async.
1396 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1398 * dbus/dbus-internals.h:
1399 Fix build without tests.
1401 * dbus/dbus-list.c: (alloc_link):
1402 Fix a segfault when a malloc fails.
1404 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1405 (dbus_malloc0), (dbus_realloc):
1406 Add support for malloc debugging.
1408 2003-02-15 Alexander Larsson <alexl@redhat.com>
1410 * dbus/dbus-threads.c:
1411 * dbus/dbus-threads.h:
1412 Add condvars. Remove static mutext from API.
1413 Implement static mutexes by initializing them from threads_init.
1415 * glib/dbus-gthread.c:
1416 * qt/dbus-qthread.cpp:
1417 Update with the thread api changes.
1422 Turn StaticMutex into normal mutex + init function.
1423 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1424 _dbus_list_append_link, _dbus_list_prepend_link
1427 * dbus/dbus-sysdeps.c:
1428 * dbus/dbus-sysdeps.h:
1429 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1430 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1432 * dbus/dbus-protocol.h:
1433 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1435 * dbus/dbus-message.c:
1436 Make ref/unref atomic.
1439 * dbus/dbus-connection-internal.h:
1440 * dbus/dbus-connection.c:
1441 * dbus/dbus-connection.h:
1443 Change _peek to _borrow,_return & _steal_borrowed.
1444 Change disconnect callback to event.
1445 Make dbus_connection_dispatch_messages reentrant.
1447 * dbus/dbus-transport.c:
1448 Don't ref the connection on calls to the transport
1451 * dbus/dbus-message-handler.c:
1454 * glib/dbus-gmain.c:
1455 Don't use peek_message anymore
1458 * test/debug-thread.c:
1459 * test/debug-thread.h:
1460 Simple thread implementation that asserts() on deadlocks in
1461 single-threaded code.
1464 (main) Call debug_threads_init.
1467 Use disconnect message instead of disconnect callback.
1471 Don't call dbus_connection_set_disconnect_function. Instead export
1472 bus_connection_disconnect.
1475 Call bus_connection_disconnect when we get a disconnected message.
1477 2003-02-15 Havoc Pennington <hp@pobox.com>
1479 * dbus/dbus-message.c (dbus_message_new): fool around with the
1482 2003-02-14 Havoc Pennington <hp@pobox.com>
1484 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1486 * dbus/dbus-memory.c: fail if the debug functions indicate we
1489 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1490 (_dbus_decrement_fail_alloc_counter): debug functions to
1491 simulate memory allocation failures
1493 2003-02-14 Havoc Pennington <hp@pobox.com>
1495 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1498 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1500 * bus/driver.c: (bus_driver_handle_hello):
1502 * bus/services.c: (bus_service_lookup):
1503 Reorder message sending so we get a more sane order.
1505 * test/bus-test.c: (message_handler):
1508 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1510 * bus/driver.c: (bus_driver_send_service_deleted),
1511 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1512 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1513 (bus_driver_send_welcome_message),
1514 (bus_driver_handle_list_services),
1515 (bus_driver_handle_acquire_service),
1516 (bus_driver_handle_service_exists):
1517 * dbus/dbus-bus.c: (dbus_bus_register_client),
1518 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1519 * dbus/dbus-errors.c: (dbus_result_to_string):
1520 * dbus/dbus-errors.h:
1521 * dbus/dbus-message.c: (dbus_message_append_args),
1522 (dbus_message_append_args_valist), (dbus_message_get_args),
1523 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1524 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1525 (dbus_message_iter_get_byte_array),
1526 (dbus_message_iter_get_string_array), (message_iter_test),
1527 (check_message_handling), (_dbus_message_test):
1528 * dbus/dbus-message.h:
1529 * test/bus-test.c: (main):
1530 Change fields to arguments in messages, so that they won't be
1531 confused with header fields.
1533 * glib/test-dbus-glib.c: (main):
1534 Remove append_fields from hello message.
1536 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1538 * dbus/dbus-errors.c:
1539 * dbus/dbus-message.c:
1540 * dbus/dbus-string.c:
1541 Documentation fixes.
1543 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1545 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1547 Implement support for timeouts in dbus-glib.
1549 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1551 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1552 * dbus/dbus-message.c: (process_test_subdir):
1553 * test/break-loader.c: (find_breaks_based_on):
1554 Plug some memory leaks.
1556 2003-02-13 Richard Hult <rhult@codefactory.se>
1558 * bus/main.c: Fix build.
1560 * dbus/dbus-errors.h:
1561 * dbus/dbus-errors.c: Fix copyright for Anders.
1563 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1568 * bus/connection.c: (bus_connection_foreach):
1571 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1572 (unescape_string), (new_section), (parse_section_start),
1573 (parse_key_value), (report_error), (bus_desktop_file_load),
1574 (bus_desktop_file_get_string):
1575 * bus/desktop-file.h:
1576 Use DBusError for error reporting.
1578 * bus/dispatch.c: (send_one_message),
1579 (bus_dispatch_message_handler):
1580 * bus/driver.c: (bus_driver_send_service_deleted),
1581 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1582 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1583 (bus_driver_send_welcome_message),
1584 (bus_driver_handle_list_services),
1585 (bus_driver_handle_acquire_service),
1586 (bus_driver_handle_service_exists):
1587 * bus/loop.c: (bus_loop_run):
1589 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1591 * bus/utils.c: (bus_wait_for_memory):
1593 New files with general utility functions.
1595 * dbus/dbus-internals.h:
1596 Remove _DBUS_HANDLE_OOM.
1598 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1600 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1601 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1602 * dbus/dbus-errors.h:
1603 Add DBusError structure.
1605 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1607 * test/data/valid-messages/standard-acquire-service.message:
1608 * test/data/valid-messages/standard-hello.message:
1609 * test/data/valid-messages/standard-list-services.message:
1610 * test/data/valid-messages/standard-service-exists.message:
1611 Add some standard messages.
1613 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1615 * bus/driver.c: (bus_driver_send_welcome_message),
1616 (bus_driver_handle_list_services),
1617 (bus_driver_handle_acquire_service),
1618 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1619 Update for API changes in libdbus.
1621 * dbus/dbus-message.c: (dbus_message_new_reply):
1622 * dbus/dbus-message.h:
1623 Remove the name argument. The spec states that replies shouldn't
1626 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1628 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1629 (report_error), (bus_desktop_file_load), (lookup_section),
1630 (lookup_line), (bus_desktop_file_get_raw),
1631 (bus_desktop_file_get_string):
1632 * bus/desktop-file.h:
1633 Some fixes, and new functions for getting a key value from a section.
1635 2003-02-13 Havoc Pennington <hp@pobox.com>
1637 * test/data/auth/fail-after-n-attempts.auth-script: new test
1639 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1642 2003-02-13 Havoc Pennington <hp@pobox.com>
1644 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1645 dbus_credentials_match were backward
1647 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1648 NO_CREDENTIALS and ROOT_CREDENTIALS
1650 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1651 into here. Never process more commands after we've reached an
1652 end state; store further data as unused bytes.
1654 * test/data/auth/*: add more auth tests
1656 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1657 command to match exact string and EXPECT_UNUSED to match unused
1660 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1662 2003-02-12 Havoc Pennington <hp@pobox.com>
1664 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1665 \r off of popped lines
1667 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1670 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1673 2003-02-12 Havoc Pennington <hp@pobox.com>
1675 * dbus/Makefile.am: remove break-loader from the build, since it
1678 * configure.in: add --enable-gcov to turn on coverage profiling
1679 flags and disable optimization
1681 2003-02-10 Havoc Pennington <hp@pobox.com>
1683 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1684 initial cut at test framework for DBusAuth from laptop.
1685 Doesn't quite work yet but it compiles and I need to get
1686 it off the 266mhz laptop. ;-)
1688 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1689 fix a memleak in error case
1691 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1694 * bus/desktop-file.c:
1695 * bus/desktop-file.h:
1696 Add a desktop file parser.
1698 2003-02-11 Zack Rusin <zack@kde.org>
1700 * qt/message.[h|cpp]: sample implementation
1701 of the KDE wrapper for DBusMessage
1703 2003-02-09 Zack Rusin <zack@kde.org>
1705 * test/bus-test.c: make_it_compile
1706 * doc/dbus-specification.sgml: minimal semantic fix
1708 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1714 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1717 * dbus/dbus-break-loader.c:
1719 * test/break-loader.c:
1720 Move dbus-break-loader to test/ and rename it to break-loader.
1722 2003-02-02 Havoc Pennington <hp@pobox.com>
1724 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1725 for code to manage cookies in your home directory
1727 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1729 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1730 to authenticate, then disconnect the client.
1732 2003-02-03 Alexander Larsson <alexl@redhat.com>
1734 * dbus/dbus-message.c (dbus_message_append_fields):
1737 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1739 * doc/dbus-specification.sgml:
1740 Update address format section.
1742 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1745 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1746 (message_handler), (new_connection_callback), (loop_quit),
1750 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1752 * bus/driver.c: (bus_driver_handle_service_exists):
1753 Simplify the code a bit.
1755 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1758 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1761 Add libdbus-daemon.la and link to it.
1763 2003-02-01 James Willcox <jwillcox@gnome.org>
1765 * bus/driver.c: (bus_driver_handle_own_service):
1766 Actually include the service reply code in the message.
1768 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1770 * bus/driver.c: (bus_driver_handle_service_exists):
1771 Don't unref the incoming message.
1773 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1775 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1777 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1779 * dbus/dbus-server.c: (dbus_server_listen):
1780 * dbus/dbus-transport.c: (_dbus_transport_open):
1781 ifdef out the calls to the debug transport and server.
1783 2003-02-02 Alexander Larsson <alexl@redhat.com>
1785 * dbus/dbus-watch.c (dbus_watch_get_flags):
1786 Add note in the docs that ERROR or HANGUP won't be returned
1787 and are assumed always on.
1789 * glib/dbus-gmain.c (add_watch):
1790 Always add IO_ERR | IO_HUP
1792 * dbus/dbus-message.h:
1793 Add semicolon after dbus_message_iter_get_string_array().
1794 Makes qt code build again
1796 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1798 * bus/driver.c: (create_unique_client_name),
1799 (bus_driver_handle_hello):
1800 Don't take a name, just use a numeric id to identify
1804 * dbus/dbus-bus.c: (dbus_bus_register_client),
1805 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1807 Add new convenience functions for communicating with the bus.
1809 * dbus/dbus-message.h:
1811 * dbus/dbus-protocol.h:
1814 2003-02-01 Alexander Larsson <alexl@redhat.com>
1816 * dbus/dbus-message.c (dbus_message_append_fields):
1817 Add some more doc comments.
1819 2003-02-01 Havoc Pennington <hp@pobox.com>
1821 * dbus/dbus-break-loader.c (randomly_modify_length): change
1822 a 4-byte value in the message as if it were a length
1824 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1825 execute bit on saved files
1827 2003-02-01 Havoc Pennington <hp@pobox.com>
1829 * dbus/dbus-break-loader.c (main): new program to find messages
1830 that break the loader.
1832 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1833 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1835 * dbus/dbus-string.c (_dbus_string_set_byte): new
1837 2003-01-31 Havoc Pennington <hp@pobox.com>
1839 * dbus/dbus-message.c: refactor the test code to be more general,
1840 in preparation for writing a "randomly permute test cases to
1841 try to break the loader" program.
1843 2003-01-31 Havoc Pennington <hp@pobox.com>
1845 * doc/dbus-specification.sgml: work on the specification
1847 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1848 the protocol version of the message.
1850 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1851 no longer specifies that.
1852 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1855 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1856 "break" for DBUS_TYPE_NIL, remove @todo
1858 2003-01-31 Havoc Pennington <hp@pobox.com>
1860 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1861 just set_is_error/get_is_error as this is a commonly-used
1862 function, and write docs.
1864 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1866 * dbus/dbus-address.c: (dbus_address_entry_free):
1867 Free key and value lists.
1869 * dbus/dbus-internals.c: (_dbus_type_to_string):
1870 Add the types we didn't have.
1872 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1873 (_dbus_marshal_validate_arg):
1876 * dbus/dbus-message.c: (dbus_message_set_sender):
1877 Remove todo about being able to set sender to NULL.
1879 (dbus_message_set_is_error_reply),
1880 (dbus_message_get_is_error_reply):
1881 * dbus/dbus-message.h:
1884 * dbus/dbus-protocol.h:
1885 Add error reply flag.
1887 * test/data/valid-messages/opposite-endian.message:
1888 Add NIL type to test.
1890 2003-01-31 Havoc Pennington <hp@pobox.com>
1892 * doc/dbus-specification.sgml: fully specify the header. Add
1893 flags and major protocol version, and change header/body len to
1896 * dbus/dbus-message-builder.c (append_saved_length): append length
1899 * dbus/dbus-message.c (dbus_message_create_header): change header
1900 length and body length to unsigned. Add the new fields from the
1902 (_dbus_message_loader_return_buffer): unsigned header/body len
1904 2003-01-30 Havoc Pennington <hp@pobox.com>
1906 * dbus/dbus-auth.c: rework to use only REJECTED, no
1909 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1910 use REJECTED, suggested by Mark McLoughlin
1912 2003-01-30 Havoc Pennington <hp@pobox.com>
1914 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1915 a better way to report errors here. e.g. "unix address lacks
1916 path" or something. also "no such file" when the path doesn't
1919 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1921 (dbus_parse_address): add @todo about documenting address format,
1922 and allowing , and ; to be escaped
1924 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1927 Add dbus-address.[ch]
1929 * dbus/dbus-address.c: (dbus_address_entry_free),
1930 (dbus_address_entries_free), (create_entry),
1931 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1932 (dbus_parse_address), (_dbus_address_test):
1933 * dbus/dbus-address.h:
1934 New files for dealing with address parsing.
1936 * dbus/dbus-connection.c:
1937 Document timeout functions.
1939 * dbus/dbus-message.c:
1940 Document dbus_message_new_from_message.
1942 * dbus/dbus-server-debug.c:
1945 * dbus/dbus-server.c: (dbus_server_listen):
1946 Parse address and use correct server implementation.
1948 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1949 * dbus/dbus-string.h:
1950 New function with test.
1952 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1956 * dbus/dbus-transport-debug.c:
1959 * dbus/dbus-transport.c: (_dbus_transport_open):
1960 Parse address and use correct transport implementation.
1962 2003-01-30 Havoc Pennington <hp@pobox.com>
1964 * dbus/dbus-message.c: use message->byte_order instead of
1965 DBUS_COMPILER_BYTE_ORDER throughout.
1966 (dbus_message_create_header): pad header to align the
1967 start of the body of the message to 8-byte boundary
1969 * dbus/dbus-marshal.h: make all the demarshalers take const
1970 DBusString arguments.
1972 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1973 validate message args here, so we don't have to do slow validation
1974 later, and so we catch bad messages as they are incoming. Also add
1975 better checks on header_len and body_len. Also fill in
1978 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1979 implemented properly)
1980 (_dbus_string_validate_nul): new function to check all-nul
1982 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1983 get_arg_end_pos and remove all validation
1984 (_dbus_marshal_validate_arg): actually do validation here.
1986 2003-01-29 Havoc Pennington <hp@pobox.com>
1988 * dbus/dbus-message.c (check_message_handling): fix assertion
1989 failure on set_client_serial
1991 2003-01-28 Havoc Pennington <hp@pobox.com>
1993 * dbus/dbus-server-debug.c: Add doc section comments
1995 * dbus/dbus-transport-debug.c: add doc section comments
1997 2003-01-28 Havoc Pennington <hp@redhat.com>
1999 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2000 the reverse order from how I had it
2001 (_dbus_string_base64_encode): reverse encoding order. I was
2002 basically byteswapping everything during encoding.
2004 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2006 * dbus/dbus-connection-internal.h:
2007 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2008 (_dbus_connection_remove_timeout):
2009 Add functions for adding and removing timeouts.
2011 * dbus/dbus-message.c: (dbus_message_new_from_message):
2012 Add new function that takes a message and creates an exact
2013 copy of it, but with the refcount set to 1.
2014 (check_message_handling):
2017 * dbus/dbus-server-protected.h:
2018 * dbus/dbus-server.c: (_dbus_server_init_base),
2019 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2020 (dbus_server_set_timeout_functions):
2021 (_dbus_server_remove_timeout):
2022 New functions so that a server can add and remove timeouts.
2024 (dbus_server_listen):
2025 Add commented out call to dbus_server_debug_new.
2027 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2028 Actually set the handler, doh.
2030 * dbus/dbus-transport.c: (_dbus_transport_open):
2031 Add commented out call to dbus_transport_debug_client_new.
2034 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2036 2003-01-28 Havoc Pennington <hp@pobox.com>
2038 * dbus/dbus-message.c (check_message_handling): function to check
2039 on the loaded message, iterates over it etc.
2041 2003-01-28 Havoc Pennington <hp@pobox.com>
2043 * test/Makefile.am (dist-hook): fix make distdir
2045 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2047 2003-01-27 Havoc Pennington <hp@pobox.com>
2049 * dbus/dbus-mempool.c (time_for_size): replace printf with
2052 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2053 empty lines; fix the SAVE_LENGTH stuff to be
2054 START_LENGTH/END_LENGTH so it actually works; couple other
2057 * test/Makefile.am (dist-hook): add dist-hook for .message files
2059 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2060 can be constant or locked.
2061 (_dbus_string_free): allow freeing a const string as
2064 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2066 * dbus/dbus-test-main.c (main): take an argument which is the
2067 directory containing test data
2069 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2070 argument to this and load all the messages in test/data/
2071 checking that they can be loaded or not loaded as appropriate.
2073 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2075 * bus/dispatch.c: (bus_dispatch_message_handler):
2076 Dispatch messages sent to services.
2078 * bus/driver.c: (bus_driver_send_service_deleted),
2079 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2080 (bus_driver_send_service_acquired):
2081 Add helper functions for sending service related messages.
2083 (bus_driver_send_welcome_message):
2084 Send HELLO_REPLY instead of WELCOME.
2086 (bus_driver_handle_list_services):
2087 Send LIST_SERVICES_REPLY instead of SERVICES.
2089 (bus_driver_handle_own_service),
2090 (bus_driver_handle_service_exists):
2091 New message handlers.
2093 (bus_driver_handle_message):
2094 Invoke new message handlers.
2096 (bus_driver_remove_connection):
2097 Don't remove any services here since that's done automatically
2098 by bus_service_remove_owner now.
2101 New function signatures.
2103 * bus/services.c: (bus_service_add_owner):
2104 Send ServiceAcquired message if we're the only primary owner.
2106 (bus_service_remove_owner):
2107 Send ServiceAcquired/ServiceLost messages.
2109 (bus_service_set_prohibit_replacement),
2110 (bus_service_get_prohibit_replacement):
2111 Functions for setting prohibit replacement.
2113 (bus_service_has_owner):
2114 New function that checks if a connection is in the owner queue of
2118 Add new function signatures.
2120 * dbus/dbus-list.c: (_dbus_list_test):
2121 Add tests for _dbus_list_remove_last and traversing the list backwards.
2124 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2125 go any further, so return NULL then.
2127 * dbus/dbus-protocol.h:
2128 Add new messages, service flags and service replies.
2130 2003-01-26 Havoc Pennington <hp@pobox.com>
2132 * dbus/dbus-message-builder.c: implement, completely untested.
2134 * test/data/*: add data to be used in testing.
2135 ".message" files are our simple loadable text format.
2136 ".message-raw" will be binary dumps of messages.
2138 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2140 2003-01-26 Havoc Pennington <hp@pobox.com>
2142 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2144 * dbus/dbus-errors.c (dbus_result_to_string): add
2147 * dbus/dbus-message-builder.c: new file, will contain code to load
2148 up messages from files. Not implemented yet.
2150 2003-01-26 Havoc Pennington <hp@pobox.com>
2152 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2153 the sender by setting to NULL
2155 2003-01-26 Havoc Pennington <hp@pobox.com>
2157 The unit tests pass, but otherwise untested. If it breaks, the
2158 tests should have been better. ;-)
2160 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2163 * dbus/dbus-message.c: redo everything so we maintain
2164 message->header as the only copy of the various fields.
2165 This avoids the possibility of out-of-memory in some cases,
2166 for example dbus_message_lock() can't run out of memory anymore,
2167 and avoids extra copying. Figured I may as well go ahead and do
2168 this since it was busted for dbus_message_lock to not return
2169 failure on OOM, and dbus_message_write_header was totally
2170 unchecked for OOM. Also fixed some random other bugs.
2172 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2173 that strings are nul-terminated. Also, end_pos can be equal
2174 to string length just not greater than, I think.
2175 (_dbus_marshal_set_int32): new function
2176 (_dbus_marshal_set_uint32): new function
2177 (_dbus_marshal_set_string): new function
2179 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2180 a warning, init timeout_list to NULL
2181 (dbus_connection_send_message): don't use uninitialized variable
2184 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2186 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2188 * bus/driver.c: (bus_driver_handle_hello),
2189 (bus_driver_send_welcome_message):
2192 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2194 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2195 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2196 (dbus_connection_unref):
2197 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2198 * dbus/dbus-message.c: (dbus_message_unref),
2201 (dbus_message_get_fields):
2202 Remove debugging printout.
2204 (_dbus_message_loader_return_buffer):
2205 Don't store the header string.
2207 (_dbus_message_test):
2210 2003-01-26 Richard Hult <rhult@codefactory.se>
2212 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2213 the file descriptor list, since it can change under us.
2215 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2217 * glib/dbus-gmain.c: (dbus_connection_prepare),
2218 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2219 (remove_watch), (dbus_connection_hookup_with_g_main):
2220 Rewrite the glib handling to use its own GSource instead of a
2221 GIOChannel so we can catch messages put in the queue while waiting
2224 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2227 * bus/connection.c: (connection_disconnect_handler),
2228 (connection_watch_callback), (bus_connection_setup):
2229 * bus/dispatch.c: (send_one_message),
2230 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2231 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2233 * bus/driver.c: (bus_driver_send_service_deleted),
2234 (bus_driver_send_service_created), (bus_driver_handle_hello),
2235 (bus_driver_send_welcome_message),
2236 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2237 (bus_driver_handle_message):
2239 Refactor code, put the message dispatching in its own file. Use
2240 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2243 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2245 * dbus/dbus-internals.h:
2246 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2248 * dbus/dbus-message.c: (dbus_message_get_sender):
2249 * dbus/dbus-message.h:
2250 Implement dbus_message_get_sender.
2252 * dbus/dbus-protocol.h:
2253 Add message and service defines.
2255 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2257 * dbus/dbus-connection.c: (dbus_connection_send_message):
2258 * dbus/dbus-message-internal.h:
2259 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2260 (dbus_message_write_header):
2261 Remove _dbus_messag_unlock and don't set the client serial on a
2262 message if one already exists.
2264 2003-01-24 Havoc Pennington <hp@pobox.com>
2266 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2269 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2272 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2274 * dbus/dbus-list.c: (alloc_link), (free_link):
2275 Use a memory pool for the links.
2277 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2279 * bus/connection.c: (bus_connection_foreach):
2281 Add new bus_connection_foreach function.
2283 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2284 Add function that broadcasts a message to all clients.
2286 (bus_driver_send_service_created), (bus_driver_handle_hello),
2287 (bus_driver_send_welcome_message),
2288 (bus_driver_handle_list_services), (bus_driver_message_handler):
2289 Implement functions that take care of listing services, and notifying
2290 clients when new services are created.
2292 * bus/services.c: (bus_services_list):
2294 Add new function that returns an array of strings with the currently
2295 registered services.
2298 * glib/dbus-gmain.c:
2299 Update copyright year.
2301 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2303 * dbus/dbus-connection.c: (dbus_connection_send_message):
2304 Unlock the message in case it was sent earlier.
2306 (dbus_connection_send_message_with_reply_and_block):
2307 Remove the reply message from the list.
2309 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2310 Set array_len and new_pos correctly.
2312 (_dbus_marshal_test):
2313 Remove debug output.
2315 * dbus/dbus-message-internal.h:
2316 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2317 New function that returns the reply serial.
2319 (_dbus_message_unlock):
2320 New function that unlocks a message and resets its header.
2322 (dbus_message_append_string_array),
2323 (dbus_message_get_fields_valist),
2324 (dbus_message_iter_get_field_type),
2325 (dbus_message_iter_get_string_array),
2326 (dbus_message_get_fields),
2327 (dbus_message_append_fields_valist):
2328 Handle string arrays.
2330 (dbus_message_set_sender):
2331 Make this function public since the bus daemon needs it.
2333 (decode_header_data):
2334 Set the reply serial to -1 initially.
2336 * dbus/dbus-message.h:
2337 Add dbus_message_set_sender.
2339 2003-01-24 Havoc Pennington <hp@pobox.com>
2341 * doc/dbus-specification.sgml: add some stuff
2343 2003-01-22 Havoc Pennington <hp@pobox.com>
2345 * doc/dbus-specification.sgml: Start to document the protocol.
2347 2003-01-22 Havoc Pennington <hp@pobox.com>
2349 * dbus/dbus-connection.c
2350 (dbus_connection_send_message_with_reply_and_block): add some @todo
2352 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2354 2003-01-21 Havoc Pennington <hp@pobox.com>
2356 (patch untested because can't compile)
2358 * bus/driver.c (create_unique_client_name): make this function
2359 never recycle client names. Also, caller should initialize
2362 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2364 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2366 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2367 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2368 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2369 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2370 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2371 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2372 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2373 * dbus/dbus-marshal.h:
2374 * dbus/dbus-protocol.h:
2375 Add support for marshalling and demarshalling integer, double
2378 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2383 * bus/connection.c: (connection_disconnect_handler):
2384 Remove the connection from the bus driver's list.
2386 (connection_watch_callback): Dispatch messages.
2388 (free_connection_data): Free connection name.
2390 (bus_connection_setup): Add connection to the bus driver's list.
2391 (bus_connection_remove_owned_service):
2392 (bus_connection_set_name), (bus_connection_get_name):
2393 Add functions for setting and getting the connection's name.
2396 Add function headers.
2398 * bus/driver.c: (create_unique_client_name),
2399 (bus_driver_handle_hello_message),
2400 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2401 (bus_driver_add_connection), (bus_driver_remove_connection):
2404 * bus/services.c: (bus_service_free):
2406 New file that handles communication and registreation with the bus
2409 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2411 * dbus/dbus-connection.c: (dbus_connection_send_message):
2412 Add a new client_serial parameter.
2414 (dbus_connection_send_message_with_reply):
2415 Remove a @todo since we've implemented the blocking function.
2417 (dbus_connection_send_message_with_reply_and_block):
2418 New function that sends a message and waits for a reply and
2419 then returns the reply.
2421 * dbus/dbus-connection.h:
2424 * dbus/dbus-errors.c: (dbus_result_to_string):
2425 * dbus/dbus-errors.h:
2426 Add new DBUS_RESULT.
2428 * dbus/dbus-message-internal.h:
2429 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2430 (_dbus_message_set_sender), (dbus_message_write_header),
2431 (dbus_message_new_reply), (decode_header_data),
2432 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2433 * dbus/dbus-message.h:
2434 Add new functions that set the reply serial and sender.
2435 Also marshal and demarshal them correctly and add test.
2437 * dbus/dbus-protocol.h:
2438 Add new DBUS_MESSAGE_TYPE_SENDER.
2441 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2442 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2443 (dbus_connection_hookup_with_g_main):
2444 * glib/test-dbus-glib.c: (main):
2445 Rewrite to use GIOChannel and remove the GSource crack.
2447 * test/echo-client.c: (main):
2448 * test/watch.c: (check_messages):
2449 Update for changed APIs
2451 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2453 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2455 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2456 Create a DBusTimeoutList.
2457 (dbus_connection_set_timeout_functions): Add new function to
2458 set timeout callbacks
2460 * dbus/dbus-connection.h: Add public DBusTimeout API.
2462 * dbus/dbus-message.c: (dbus_message_get_service):
2463 * dbus/dbus-message.h: New function.
2465 * dbus/dbus-server.c: Fix small doc typo.
2467 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2469 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2471 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2472 of the string, just as long as specified.
2474 2003-01-19 Havoc Pennington <hp@pobox.com>
2476 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2479 * dbus/dbus-server.c (dbus_server_set_max_connections)
2480 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2481 keep track of current number of connections, and add API for
2482 setting a max (but haven't implemented enforcing the max yet)
2484 2003-01-18 Havoc Pennington <hp@pobox.com>
2486 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2487 reading/writing if read_watch != NULL or write_watch != NULL.
2489 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2490 the message loader code to actually load message->header and
2491 message->body into the newly-created message.
2493 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2496 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2497 (dbus_connection_get_max_message_size)
2498 (dbus_connection_set_max_live_messages_size)
2499 (dbus_connection_get_max_live_messages_size): implement some
2500 resource limitation functions
2502 * dbus/dbus-resources.c: new file implementing some of the
2503 resource limits stuff
2505 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2506 missing docs, add @todo to handle OOM etc.
2508 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2511 2003-01-18 Havoc Pennington <hp@pobox.com>
2513 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2514 connection if it hasn't been already.
2516 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2517 replace with DisconnectFunction.
2519 2003-01-18 Havoc Pennington <hp@pobox.com>
2521 Building --disable-verbose-mode --disable-asserts --disable-tests
2522 cuts the library from 112K to 45K or so
2524 * configure.in: check for varargs macro support,
2525 add --enable-verbose-mode, --enable-asserts.
2527 * dbus/dbus-internals.h (_dbus_assert): support
2529 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2531 2003-01-18 Havoc Pennington <hp@pobox.com>
2533 * dbus/dbus-test.c: include config.h so that tests actually run
2535 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2536 so the failure mode when that assumption fails will be plenty
2539 2003-01-18 Havoc Pennington <hp@pobox.com>
2541 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2543 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2546 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2547 since we don't want to use those in make check
2549 2003-01-15 Havoc Pennington <hp@redhat.com>
2555 2003-01-15 Havoc Pennington <hp@redhat.com>
2557 * test/Makefile.am: fix so that test source code ends up in the
2558 distribution on make distcheck
2560 2003-01-15 Havoc Pennington <hp@redhat.com>
2566 2003-01-15 Havoc Pennington <hp@redhat.com>
2568 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2569 fix build when --disable-tests
2571 * Makefile.am (EXTRA_DIST): put HACKING in here
2573 * HACKING: document procedure for making a tarball release.
2575 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2577 * bus/connection.c: (connection_error_handler),
2578 (bus_connection_setup):
2579 * bus/main.c: (main):
2580 Make sure that the DBusConnectionData struct is NULLed
2581 out to prevent a segfault.
2583 * dbus/dbus-errors.c: (dbus_result_to_string):
2584 * dbus/dbus-errors.h:
2585 * dbus/dbus-message.c: (dbus_message_get_fields),
2586 (dbus_message_get_fields_valist), (_dbus_message_test):
2587 * dbus/dbus-message.h:
2588 Make dbus_message_get_fields return a result code so we can
2589 track invalid fields as well as oom.
2591 2003-01-11 Havoc Pennington <hp@pobox.com>
2593 * configure.in: change --enable-test/--enable-ansi action-if-given
2594 to enable_foo=$enableval instead of enable_foo=yes
2596 2003-01-08 Havoc Pennington <hp@pobox.com>
2598 * dbus/dbus-string.c (_dbus_string_align_length): new function
2600 * dbus/dbus-test-main.c: move main() for test app here
2602 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2603 symbol to run tests, because dbus-test isn't in the main
2606 Code review nitpicks.
2608 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2609 for people with narrow emacs ;-). Assert client_serial was filled
2610 in. Assert message->name != NULL.
2611 (dbus_message_append_fields): have "first_field_type" arg separate
2612 from va list, needed for C++ binding that also uses varargs IIRC
2613 and helps with type safety
2614 (dbus_message_new): add @todo about using DBusString to store
2615 service/name internally
2616 (dbus_message_new): don't leak ->service and ->name on OOM later
2618 (dbus_message_unref): free the service name
2619 (dbus_message_get_fields): same change to varargs
2620 i.e. first_field_type
2621 (_dbus_message_loader_return_buffer): assert that the message data
2622 is aligned (if not it's a bug in our code). Put in verbose griping
2623 about why we set corrupted = TRUE.
2624 (decode_header_data): add FIXME that char* is evil. Was going to
2625 add FIXME about evil locale-specific string.h strncmp, but just
2626 switched to wacky string-as-uint32 optimization. Move check for
2627 "no room for field name" above get_const_data_len() to avoid
2628 assertion failure in get_const_data_len if we have trailing 2
2629 bytes or the like. Check for service and name fields being
2630 provided twice. Don't leak service/name on error. Require field
2631 names to be aligned to 4 bytes.
2633 * dbus/dbus-marshal.c: move byte swap stuff to header
2634 (_dbus_pack_int32): uscore-prefix
2635 (_dbus_unpack_int32): uscore-prefix
2636 (_dbus_unpack_uint32): export
2637 (_dbus_demarshal_string): add @todo complaining about use of
2639 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2640 handling allowing corrupt data to go unchecked
2642 2003-01-08 Havoc Pennington <hp@redhat.com>
2644 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2645 to the select() as needed for authentication. (should be using
2646 _dbus_poll() not select, but for another day)
2648 * dbus/dbus.h: include dbus/dbus-protocol.h
2650 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2652 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2655 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2657 * dbus/dbus-internals.c: (_dbus_type_to_string):
2658 New function that returns a string describing a type.
2660 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2661 * dbus/dbus-marshal.h:
2662 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2663 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2664 (dbus_message_iter_get_byte_array):
2665 * dbus/dbus-message.h:
2666 Add new convenience functions for appending and getting message fields.
2667 Also add demarshalling routines for byte arrays.
2669 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2671 * dbus/dbus-connection-internal.h:
2672 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2673 (_dbus_connection_get_next_client_serial),
2674 (dbus_connection_send_message):
2675 * dbus/dbus-internals.h:
2676 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2677 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2678 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2679 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2680 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2681 (_dbus_verbose_bytes), (_dbus_marshal_test):
2682 * dbus/dbus-marshal.h:
2683 * dbus/dbus-message-internal.h:
2684 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2685 (dbus_message_write_header), (_dbus_message_lock),
2686 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2687 (dbus_message_get_name), (dbus_message_append_int32),
2688 (dbus_message_append_uint32), (dbus_message_append_double),
2689 (dbus_message_append_string), (dbus_message_append_byte_array),
2690 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2691 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2692 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2693 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2694 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2695 (decode_header_data), (_dbus_message_loader_return_buffer),
2696 (message_iter_test), (_dbus_message_test):
2697 * dbus/dbus-message.h:
2698 * dbus/dbus-protocol.h:
2699 * dbus/dbus-test.c: (main):
2701 * glib/test-dbus-glib.c: (message_handler), (main):
2702 * test/echo-client.c: (main):
2703 * test/watch.c: (check_messages):
2704 Make messages sendable and receivable for real.
2706 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2708 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2709 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2710 * dbus/dbus-message.c: (dbus_message_append_int32),
2711 (dbus_message_append_uint32), (dbus_message_append_double),
2712 (dbus_message_append_string), (dbus_message_append_byte_array):
2713 Handle OOM restoration.
2715 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2717 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2718 (_dbus_demarshal_string), (_dbus_marshal_test):
2719 * dbus/dbus-marshal.h:
2720 * dbus/dbus-message.c: (dbus_message_get_name),
2721 Document these functions.
2723 (dbus_message_append_int32), (dbus_message_append_uint32),
2724 (dbus_message_append_double), (dbus_message_append_string),
2725 (dbus_message_append_byte_array):
2726 * dbus/dbus-message.h:
2727 Add functions for adding message fields of different types.
2729 * dbus/dbus-protocol.h:
2730 Add the different types.
2732 2003-01-05 Havoc Pennington <hp@pobox.com>
2734 * bus/connection.c: implement routines for handling connections,
2735 first thing is keeping a list of owned services on each connection
2736 and setting up watches etc.
2738 * bus/services.c: implement a mapping from service names to lists
2741 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2743 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2744 to use static mutexes for global data
2746 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2747 collection of functions to set/get application-specific data
2748 on the DBusConnection.
2750 2003-01-04 Havoc Pennington <hp@pobox.com>
2752 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2753 (_dbus_poll): new function
2755 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2758 * bus/loop.c: initial code for the daemon main loop
2760 2003-01-04 Havoc Pennington <hp@pobox.com>
2762 * test/watch.c (error_handler): make it safe if the error handler
2763 is called multiple times (if we s/error handler/disconnect
2764 handler/ we should just guarantee it's called only once)
2766 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2767 error handler on disconnect (it's quite possible we should
2768 just change the error handler to a "disconnect handler," I'm
2769 not sure we have any other meaningful errors)
2771 * configure.in: check for getpwnam_r
2773 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2774 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2775 mechanism as in SASL spec, using socket credentials
2777 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2778 (_dbus_send_credentials_unix_socket): new function
2780 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2782 (_dbus_write): only check errno if <0 returned
2783 (_dbus_write_two): ditto
2785 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2787 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2788 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2789 (_dbus_marshal_test):
2790 * dbus/dbus-marshal.h:
2791 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2792 to _dbus_marshal_utf8_string. Also fix some tests.
2794 2002-12-28 Harri Porten <porten@kde.org>
2796 * configure.in: added check for C++ compiler and a very cheesy
2797 check for the Qt integration
2799 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2801 * qt/Makefile.am: added
2803 * qt/.cvsignore: added
2805 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2806 latter, added #ifdef QT_THREAD_SUPPORT guard.
2808 * dbus/Makefile.am: added missing headers for make dist
2810 2002-12-28 Kristian Rietveld <kris@gtk.org>
2812 * dbus/Makefile.am: fixup export-symbols-regex.
2814 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2816 * acinclude.m4: Add this file and put the
2817 PKG_CHECK_MODULE macro in it.
2819 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2821 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2822 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2823 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2824 (_dbus_marshal_test):
2825 Make the demarshalling routines align the pos argument.
2826 Add string marshalling tests and fix the obvious bugs
2829 2002-12-26 Havoc Pennington <hp@pobox.com>
2831 * dbus/dbus-auth.c: fixes fixes fixes
2833 * dbus/dbus-transport-unix.c: wire up support for
2834 encoding/decoding data on the wire
2836 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2837 (_dbus_auth_decode_data): append to target string
2838 instead of nuking it.
2840 2002-12-26 Havoc Pennington <hp@pobox.com>
2842 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2843 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2846 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2847 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2848 now). Main point is because I wanted unpack_uint32 to implement
2850 (_dbus_verbose_bytes): new function
2852 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2854 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2855 mechanism to handle a corrupt message stream
2856 (_dbus_message_loader_new): fix preallocation to only prealloc,
2859 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2860 (_dbus_string_test): enhance tests for copy/move and fix the
2863 * dbus/dbus-transport-unix.c: Hold references in more places to
2864 avoid reentrancy problems
2866 * dbus/dbus-transport.c: ditto
2868 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2869 leak reference count in no-message case
2871 * test/watch.c (do_mainloop): handle adding/removing watches
2872 during iteration over the watches. Also, ref the connection/server
2873 stored on a watch, so we don't try to mangle a destroyed one.
2875 * dbus/dbus-transport-unix.c (do_authentication): perform
2878 * dbus/dbus-auth.c (get_state): add a state
2879 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2880 (_dbus_auth_get_unused_bytes): append the unused bytes
2881 to the passed in string, rather than prepend
2883 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2884 the auth conversation DBusAuth
2886 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2887 (_dbus_transport_new_for_domain_socket): when creating a
2888 transport, pass in whether it's a client-side or server-side
2889 transport so we know which DBusAuth to create
2891 2002-12-03 Havoc Pennington <hp@pobox.com>
2893 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2894 _after_ finalizing the derived members
2895 (unix_connection_set): unref watch if we fail to add it
2897 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2898 transport first, so that the connection owned by the
2899 transport will be valid as the transport finalizes.
2901 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2902 if necessary, and remove watches from the connection.
2904 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2906 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2908 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2909 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2910 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2911 (_dbus_marshal_test):
2912 * dbus/dbus-marshal.h:
2913 Add string marshal functions and have the demarshal functions
2914 return the new position.
2916 2002-12-25 Havoc Pennington <hp@pobox.com>
2918 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2919 it is a simple protocol that just maps directly to SASL.
2921 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2922 initial implementation, not actually used yet.
2924 * dbus/dbus-string.c (_dbus_string_find): new function
2925 (_dbus_string_equal): new function
2926 (_dbus_string_base64_encode): new function
2927 (_dbus_string_base64_decode): new function
2929 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2932 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2933 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2934 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2935 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2936 * dbus/dbus-marshal.h:
2937 * dbus/dbus-protocol.h:
2938 * dbus/dbus-test.c: (main):
2940 Add un-optimized marshalling/demarshalling routines.
2942 2002-12-25 Harri Porten <porten@kde.org>
2944 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2946 2002-12-24 Zack Rusin <zack@kde.org>
2948 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2949 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2952 2002-12-24 Havoc Pennington <hp@pobox.com>
2954 * glib/dbus-gthread.c: fix include
2956 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2957 I think glib API needs to change, though, as you don't
2958 want to use DBusMessageFunction, you want to use the
2959 DBusMessageHandler object. Probably
2960 dbus_connection_open_with_g_main_loop()
2961 and dbus_connection_setup_g_main_loop() or something like that
2962 (but think of better names...) that just create a connection
2963 that has watch/timeout functions etc. already set up.
2965 * dbus/dbus-connection.c
2966 (dbus_connection_send_message_with_reply): new function just to
2967 show how the message handler helps us deal with replies.
2969 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2971 * dbus/dbus-string.c (_dbus_string_test): free a string that
2974 * dbus/dbus-hash.c: use memory pools for the hash entries
2975 (rebuild_table): be more paranoid about overflow, and
2976 shrink table when we can
2977 (_dbus_hash_test): reduce number of sprintfs and write
2978 valid C89. Add tests for case where we grow and then
2979 shrink the hash table.
2981 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2983 * dbus/dbus-connection.c (dbus_connection_register_handler)
2984 (dbus_connection_unregister_handler): new functions
2986 * dbus/dbus-message.c (dbus_message_get_name): new
2988 * dbus/dbus-list.c: fix docs typo
2990 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2991 an object representing a handler for messages.
2993 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2996 * glib/dbus-gthread.c: (dbus_gthread_init):
2997 Don't use the gdbus prefix for public functions.
2999 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3003 Add GLib checks and fixup .pc files
3007 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3008 (gdbus_connection_check), (gdbus_connection_dispatch),
3009 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3010 (dbus_connection_gsource_new):
3011 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3012 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3013 * glib/test-dbus-glib.c: (message_handler), (main):
3016 2002-12-15 Harri Porten <porten@kde.org>
3018 * autogen.sh: check for libtoolize before attempting to use it
3020 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3023 * .cvsignore: ignore more stamp files
3025 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3027 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3028 without make install.
3030 2002-12-15 Havoc Pennington <hp@pobox.com>
3032 * dbus/dbus-threads.c: add thread stubs that a higher library
3033 layer can fill in. e.g. the GLib wrapper might fill them in with
3034 GThread stuff. We still need to use this thread API to
3035 thread-safe-ize the library.
3037 2002-12-12 Havoc Pennington <hp@pobox.com>
3039 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3040 below new interfaces and include fewer system headers.
3042 * dbus/dbus-sysdeps.c (_dbus_read): new function
3043 (_dbus_write): new function
3044 (_dbus_write_two): new function
3045 (_dbus_connect_unix_socket): new function
3046 (_dbus_listen_unix_socket): new function
3048 * dbus/dbus-message-internal.h: change interfaces to use
3051 2002-12-11 Havoc Pennington <hp@pobox.com>
3053 * dbus/dbus-types.h: add dbus_unichar
3055 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3057 * dbus/dbus-connection.c (dbus_connection_send_message): return
3060 * dbus/dbus-transport.c: include dbus-watch.h
3062 * dbus/dbus-connection.c: include dbus-message-internal.h
3064 * HACKING: add file with coding guidelines stuff.
3066 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3067 handling here, for security purposes (as in vsftpd). Not actually
3068 using this class yet.
3070 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3071 system/libc usage here, as in vsftpd, for ease of auditing (and
3072 should also simplify portability). Haven't actually moved all the
3073 system/libc usage into here yet.
3075 2002-11-25 Havoc Pennington <hp@pobox.com>
3077 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3078 always print the first verbose message.
3080 2002-11-24 Havoc Pennington <hp@pobox.com>
3082 * test/echo-client.c, test/echo-server.c: cheesy test
3085 * configure.in (AC_CHECK_FUNCS): check for writev
3087 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3090 * dbus/dbus-list.c (_dbus_list_foreach): new function
3092 * dbus/dbus-internals.c (_dbus_verbose): new function
3094 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3095 representing a server that listens for connections.
3097 * dbus/.cvsignore: create
3099 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3100 public API for reporting errors
3102 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3103 public object representing a connection that
3104 sends/receives messages. (Same object used for
3105 both client and server.)
3107 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3108 Basic abstraction for different kinds of stream
3109 that we might read/write messages from.
3111 2002-11-23 Havoc Pennington <hp@pobox.com>
3113 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3116 * dbus/dbus-test.c (main): add list test, and include
3117 dbus-test.h as intended
3119 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3120 (_dbus_hash_table_remove_int): return value indicates
3121 whether the entry existed to remove
3123 * dbus/dbus-list.c: add linked list utility class,
3126 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3129 2002-11-23 Havoc Pennington <hp@pobox.com>
3131 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3132 DBUS_END_DECLS to nothing, that should fix this once and for all
3134 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3136 * dbus/dbus-message.c, dbus/dbus-hash.c:
3137 add some missing @brief
3139 2002-11-23 Havoc Pennington <hp@pobox.com>
3141 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3142 to avoid confusing Doxygen
3144 * dbus/dbus-hash.c: @} not }@
3146 * dbus/dbus-message.c (struct DBusMessage): split out
3149 2002-11-23 Havoc Pennington <hp@pobox.com>
3151 * configure.in: pile on more warning flags if using gcc
3153 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3154 to document static functions
3156 * configure.in: add summary to end of configure so it
3157 looks nice and attractive
3159 * dbus/dbus-hash.c: finish implementation and write unit
3162 * configure.in: add --enable-tests to enable unit tests
3164 * dbus/dbus-test.c: test program to run unit tests
3165 for all files in dbus/*, initially runs a test for
3168 * dbus/dbus-internals.h: file to hold some internal utility stuff
3170 2002-11-22 Havoc Pennington <hp@redhat.com>
3172 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3173 "ported" away from Tcl
3175 * dbus/dbus-types.h: header for types such as dbus_bool_t
3177 2002-11-22 Havoc Pennington <hp@redhat.com>
3179 * dbus/dbus.h: fixups for doc warnings
3181 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3183 (QUIET): make it quiet so we can see warnings
3185 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3187 2002-11-22 Havoc Pennington <hp@redhat.com>
3189 * Makefile.am: include "Doxyfile" target in all-local
3191 * configure.in: generate the Doxyfile
3193 * Doxyfile.in: move Doxyfile here, so we can use
3194 configure to generate a Doxyfile with the right
3197 2002-11-22 Havoc Pennington <hp@redhat.com>
3199 * dbus/dbus-message.c: move inline docs into .c file
3201 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3202 so all docs are under doc/
3203 (MAN_EXTENSION): generate man pages. Use extension
3204 ".3dbus" which matches ".3qt" on my system,
3205 I guess this is OK, I don't know really.
3206 (FILE_PATTERNS): look for .c files not .h, makes sense
3209 2002-11-22 Havoc Pennington <hp@pobox.com>
3211 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3212 because any app can be a server, and any app can be a client,
3213 the bus is a special kind of server.
3215 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3217 * Doxyfile : adding. Still needs Makefile rules to be generated
3218 automatically (just run "doxygen" in the toplevel dir for now to
3221 * dbus/dbus-message.h : Adding sample docs (javadoc since
3222 resembles gtk-doc a little more)
3224 * dbus/dbus.h : Adding sample docs
3226 2002-11-21 Havoc Pennington <hp@redhat.com>
3228 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3229 so we can allow ourselves to include files directly,
3230 instead of having to use dbus.h
3232 * dbus/dbus.h: fill in
3234 * dbus/dbus-message.h: sketch out a sample header file.
3235 Include griping if you include it directly instead of
3238 * dbus/dbus-macros.h: new file with macros for extern "C",
3239 TRUE/FALSE, NULL, etc.
3241 * doc/file-boilerplate.c: put include guards in here
3243 2002-11-21 Havoc Pennington <hp@redhat.com>
3245 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3247 * COPYING: include the GPL as well, and license code
3248 under both AFL and GPL.
3250 2002-11-21 Havoc Pennington <hp@redhat.com>
3252 * acconfig.h: get rid of this
3254 * autogen.sh (run_configure): add --no-configure option
3256 * configure.in: remove AC_ARG_PROGRAM to make
3257 autoconf complain less. add AC_PREREQ.
3258 add AC_DEFINE third arg.
3260 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3263 Fix references so we can distcheck.
3265 2002-11-21 Havoc Pennington <hp@redhat.com>
3267 * Initial module creation