1 2003-04-02 Havoc Pennington <hp@redhat.com>
3 * test/Makefile.am (all-local): add a rule to copy tests to
4 builddir, so we can have generated tests. Use this to remove the
5 silly hack for testing system.conf and session.conf. Will use this
6 shortly to generate .service files pointing to test binaries.
8 2003-04-02 Havoc Pennington <hp@redhat.com>
10 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
11 current alloc and needed new length, not max of the doubled
12 allocation and needed new length. Also, when building tests,
13 don't do the double-allocation stuff, just realloc every time.
15 2003-04-02 Havoc Pennington <hp@redhat.com>
17 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
19 (_dbus_string_get_dirname): new
20 (_dbus_sysdeps_test): new
21 (_dbus_directory_open): include dirnames in error messages
23 * bus/config-parser.c: interpret <include> and <includedir> and
24 <servicedir> relative to config file location if the given
25 filename is not absolute.
27 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
29 2003-04-02 Havoc Pennington <hp@redhat.com>
31 * bus/connection.c (bus_transaction_send_error_reply): set sender
32 service for the error, and unref the reply on success
34 * bus/activation.c: convert to use BusTransaction so OOM can be
36 (bus_activation_service_created): set sender of the message
38 2003-04-01 Havoc Pennington <hp@redhat.com>
40 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
41 <includedir> (at least mostly)
43 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
44 first, then the user ID
46 2003-04-01 Havoc Pennington <hp@pobox.com>
48 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
51 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
53 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
55 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
56 socket 0777, and unlink any existing socket.
58 * bus/bus.c (bus_context_new): change our UID/GID and fork if
59 the configuration file so specifies; set up auth mechanism
62 * bus/config-parser.c (bus_config_parser_content): add support
63 for <fork> option and fill in code for <auth>
65 * bus/system.conf.in: add <fork/> to default configuration,
66 and limit auth mechanisms to EXTERNAL
68 * doc/config-file.txt (Elements): add <fork>
70 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
71 (_dbus_change_identity): new function
73 2003-03-31 Havoc Pennington <hp@redhat.com>
75 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
76 (_dbus_listen_unix_socket): fix off-by-one error in null
77 termination spotted by Nalin
79 2003-03-31 Havoc Pennington <hp@redhat.com>
81 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
82 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
83 having a real home directory available.
85 2003-03-31 Havoc Pennington <hp@redhat.com>
87 * bus/Makefile.am (install-data-hook): create /var/run/dbus
89 * bus/messagebus.in: add init script for Red Hat /etc/init.d
91 * configure.in: add support for specifying a style of init script
94 2003-03-31 Havoc Pennington <hp@redhat.com>
96 Fix some annoying DBusString API and fix all affected code.
98 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
100 (_dbus_string_get_data): change to return string instead of using
102 (_dbus_string_get_const_data): ditto
103 (_dbus_string_get_data_len): ditto
104 (_dbus_string_get_const_data_len): ditto
106 2003-03-31 Havoc Pennington <hp@redhat.com>
108 * bus/main.c (main): fix up the command line arguments to be nicer
110 2003-03-31 Havoc Pennington <hp@redhat.com>
112 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
113 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
114 final location that lands in the config file
116 * bus/config-loader-expat.c (bus_config_load): fix type of
119 * doc/TODO: remove TODO item for dbus_bus_get()
121 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
123 2003-03-31 Havoc Pennington <hp@pobox.com>
125 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
126 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
127 argument since they are always client side
129 * dbus/dbus-server.c (dbus_server_get_address): new function
131 * bus/main.c (main): take the configuration file as an argument.
133 * test/data/valid-config-files/debug-allow-all.conf: new file to
134 use with dispatch.c tests for example
136 * bus/test-main.c (main): require test data dir
138 * bus/bus.c (bus_context_new): change this to take a
139 configuration file name as argument
141 * doc/config-file.txt (Elements): add <servicedir>
143 * bus/system.conf, bus/session.conf: new files
145 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
146 well-known socket if none set
148 * configure.in: create system.conf and session.conf
150 2003-03-30 Havoc Pennington <hp@pobox.com>
152 * bus/config-parser.c: hacking
154 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
155 to shut down, since it could cause weirdness with the DBusList
158 * dbus/dbus-list.c (_dbus_list_test): add tests for the
159 link-oriented stack routines
160 (alloc_link): free the mempool if the first alloc from it fails
162 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
164 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
166 (_dbus_string_skip_white): new
168 * doc/config-file.txt (Elements): add <includedir>
170 2003-03-28 Havoc Pennington <hp@pobox.com>
172 * dbus/dbus-string.c (_dbus_string_copy_data_len)
173 (_dbus_string_copy_data): new functions
175 2003-03-28 Anders Carlsson <andersca@codefactory.se>
177 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
181 * dbus/dbus-memory.c:
184 2003-03-28 Havoc Pennington <hp@pobox.com>
186 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
187 I think it may have just been superstition. Not sure.
189 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
190 failures that were not being handled.
192 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
194 * dbus/dbus-memory.c: add ability to set number of mallocs in a
195 row that will fail on out-of-memory.
197 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
198 function for testing out-of-memory handling.
200 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
201 allocation functions, they do map exactly to the expat ones.
203 2003-03-27 Havoc Pennington <hp@redhat.com>
205 * bus/config-loader-libxml.c (bus_config_load): add another error
208 2003-03-26 Anders Carlsson <andersca@codefactory.se>
211 Add note about automatic service activation.
213 * doc/dbus-specification.sgml:
214 Rename the specification and clarify a few things.
216 2003-03-26 Anders Carlsson <andersca@codefactory.se>
219 * dbus/dbus-address.c:
221 * dbus/dbus-marshal.c:
222 * dbus/dbus-server-debug-pipe.c:
223 * dbus/dbus-transport-unix.c:
224 Fix documentation warnings.
226 2003-03-26 Havoc Pennington <hp@pobox.com>
228 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
229 after every test so it's quick and easy to see which leaked, and
230 so we test multiple dbus_shutdown() calls
232 * configure.in: change configure.in XML stuff to also support
235 * config-loader-libxml.c: some hacking
237 * config-loader-expat.c: some hacking
239 * config-parser.c: some hacking, plus tests
241 2003-03-25 Havoc Pennington <hp@redhat.com>
243 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
245 * configure.in: add --with-xml option to specify XML library,
246 right now only libxml is supported.
248 * bus/config-loader-libxml.c, config-parser.c: sync some minor
249 nonworking code between home and work, still just stubs
251 2003-03-24 Havoc Pennington <hp@redhat.com>
253 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
256 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
257 NULL argument for "message" if the error is a well-known one,
258 fill in a generic message in this case.
260 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
263 * bus/test.c (bus_test_flush_bus): add
265 * bus/policy.c (bus_policy_test): test code stub
267 2003-03-24 Havoc Pennington <hp@pobox.com>
269 * bus/connection.c (bus_connections_setup_connection): set up
270 the "can this user connect" function, but it always returns
271 TRUE until we have a config file parser so we can have a config
272 file that allows connections.
274 2003-03-23 Havoc Pennington <hp@pobox.com>
276 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
277 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
278 the mutex, so we can check for proper memory management
281 * dbus/dbus-dataslot.c: remove the mutex from
282 DBusDataSlotAllocator and lock it manually when using it,
283 to simplify fitting it into the global slots framework.
285 * dbus/dbus-threads.c (init_static_locks): rework how we're
286 handling global locks so they are easily shut down.
288 * bus/policy.c (bus_policy_append_rule): fix
290 * bus/test-main.c (main): check for memleaks
292 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
293 test suite check for memleaks
295 * dbus/dbus-memory.c: add support in test mode for tracking
296 number of outstanding blocks
298 2003-03-23 Havoc Pennington <hp@pobox.com>
300 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
303 * dbus/dbus-hash.h: add ULONG hash keys
305 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
306 (_dbus_get_group_id): new function
308 2003-03-20 Havoc Pennington <hp@redhat.com>
310 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
312 (dbus_connection_get_unix_user): new function
314 2003-03-20 Havoc Pennington <hp@pobox.com>
316 * bus/connection.c (bus_connection_send_oom_error): assert that
318 (connection_execute_transaction): ditto
319 (bus_connection_preallocate_oom_error): fix to set the sender, and
320 set recipient to the destination service, not the bus driver
322 * bus/policy.c: hacking
324 * dbus/dbus-message.c (dbus_message_service_is): new function
325 (dbus_message_sender_is): new
327 2003-03-19 Havoc Pennington <hp@redhat.com>
329 * bus/policy.c: start sketching code for policy restrictions on
330 what connections can do.
332 2003-03-18 Havoc Pennington <hp@redhat.com>
334 * doc/TODO: some notes on high-level todo items. Little nitpick
335 stuff is all in @todo, so no need to add it here.
337 * doc/config-file.txt: some notes on how config file might look
339 2003-03-18 Anders Carlsson <andersca@codefactory.se>
345 2003-03-17 Havoc Pennington <hp@redhat.com>
347 * dbus/dbus-internals.h: add gcc attributes so that
348 our printf-style functions warn on bad arguments to
351 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
354 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
357 2003-03-17 Havoc Pennington <hp@redhat.com>
359 * bus/test-main.c (main): make it print something as it runs
360 so make check doesn't look stuck
362 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
363 from CVS, now obsolete
365 2003-03-17 Anders Carlsson <andersca@codefactory.se>
367 * bus/dispatch.c: (bus_dispatch):
368 Refetch the service name since it may have been reallocated
369 when dbus_message_set_sender was called.
371 * dbus/dbus-sysdeps.c: (_dbus_accept):
372 Add address and address length variables and use them to stop
373 valgrind from complaining.
375 2003-03-17 Havoc Pennington <hp@pobox.com>
377 All tests pass, no memleaks, no valgrind complaints.
379 * bus/test.c: refcount handler_slot
381 * bus/connection.c (bus_connections_new): refcount
384 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
385 bytes so that auth scripts pass.
387 * bus/dispatch.c: init message_handler_slot so it gets allocated
390 * bus/dispatch.c (message_handler_slot_ref): fix memleak
392 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
393 dealloc server_pipe_hash when no longer used for benefit of
396 * dbus/dbus-auth.c (process_command): memleak fix
398 * bus/dispatch.c (check_hello_message): memleak fix
400 2003-03-16 Havoc Pennington <hp@pobox.com>
402 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
404 2003-03-17 Anders Carlsson <andersca@codefactory.se>
406 * bus/activation.c (bus_activation_activate_service): Append
407 the pending activation entry to the list of pending activations.
409 2003-03-16 Havoc Pennington <hp@pobox.com>
411 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
414 * dbus/dbus-address.c (create_entry): fix OOM handling when
415 failing to alloc entry->method
417 2003-03-16 Havoc Pennington <hp@pobox.com>
419 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
422 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
423 add some missing dbus_set_result
425 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
426 alloc the DBusMessageHandler
428 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
429 the transport here, since we call this from the finalizer; it
430 resulted in a double-finalize.
432 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
433 where we tried to use transport->connection that was NULL,
434 happened when transport was disconnected early on due to OOM
436 * bus/*.c: adapt to handle OOM for watches/timeouts
438 * dbus/dbus-transport-unix.c: port to handle OOM during
441 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
442 reference to unused bytes instead of a copy
444 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
447 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
450 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
453 2003-03-16 Anders Carlsson <andersca@codefactory.se>
455 * doc/dbus-specification.sgml:
456 Document reply message for ActivateService.
458 2003-03-16 Anders Carlsson <andersca@codefactory.se>
460 * bus/activation.c: (bus_pending_activation_entry_free),
461 (bus_pending_activation_free), (bus_activation_new),
462 (bus_activation_unref), (bus_activation_service_created),
463 (bus_activation_activate_service):
465 * bus/bus.c: (bus_context_new):
466 * bus/desktop-file.c: (new_section):
467 * bus/driver.c: (bus_driver_send_service_deleted),
468 (bus_driver_handle_activate_service):
469 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
471 * dbus/dbus-connection.c:
472 (dbus_connection_send_with_reply_and_block):
473 * dbus/dbus-message.c: (dbus_message_append_args_valist):
474 * dbus/dbus-protocol.h:
475 Make activation work better. Now pending activations will be queued
476 and the daemon won't try to activate services that are already registered.
478 2003-03-16 Havoc Pennington <hp@pobox.com>
480 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
483 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
484 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
486 2003-03-16 Havoc Pennington <hp@pobox.com>
488 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
489 this. always run the test suite before commit...
491 * bus/*: adapt to DBusConnection API changes
493 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
494 requires renaming stuff to avoid dbus_connection_dispatch name
497 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
500 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
501 separate from _dbus_message_loader_return_buffer()
503 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
504 this, because it's now always broken to use; the number of
505 messages in queue vs. the number still buffered by the message
506 loader is undefined/meaningless. Should use
507 dbus_connection_get_dispatch_state().
508 (dbus_connection_dispatch): rename from
509 dbus_connection_dispatch_message
511 2003-03-16 Havoc Pennington <hp@pobox.com>
513 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
516 2003-03-16 Anders Carlsson <andersca@codefactory.se>
518 * dbus/dbus-connection.c:
519 (dbus_connection_send_with_reply_and_block):
520 Decrease connection->n_incoming when removing an entry
522 * dbus/dbus-dict.c: (dbus_dict_entry_free),
523 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
524 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
525 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
526 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
527 (dbus_dict_get_byte_array):
528 Handle NULL arrays and strings. Also add support for byte arrays.
530 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
531 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
532 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
533 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
534 (_dbus_demarshal_dict), (demarshal_and_validate_len),
535 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
536 * dbus/dbus-marshal.h:
537 Add support for marshalling and demarshalling empty arrays and strings.
539 * dbus/dbus-message.c: (dbus_message_append_args_valist),
540 (dbus_message_append_string_array),
541 (dbus_message_iter_get_boolean),
542 (dbus_message_iter_get_boolean_array),
543 (dbus_message_iter_get_int32_array),
544 (dbus_message_iter_get_uint32_array),
545 (dbus_message_iter_get_double_array),
546 (dbus_message_iter_get_byte_array),
547 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
548 (check_message_handling):
549 Add support for getting empty arrays and dicts.
551 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
552 Don't do any validation at all for now, that's better than just checking
555 * test/data/valid-messages/emptiness.message:
556 New test message with lots of empty arrays.
558 2003-03-16 Havoc Pennington <hp@pobox.com>
560 * dbus/dbus-connection.c
561 (_dbus_connection_queue_received_message_link): new function that
562 can't fail due to OOM
564 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
565 new function pops a message together with a list link
568 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
569 message queuing functions to avoid needing to alloc memory
571 2003-03-16 Havoc Pennington <hp@pobox.com>
573 Oops - test code was only testing failure of around 30 of the
574 mallocs in the test path, but it turns out there are 500+
575 mallocs. I believe this was due to misguided linking setup such
576 that there was one copy of dbus_malloc etc. in the daemon and one
577 in the shared lib, and only daemon mallocs were tested. In any
578 case, the test case now tests all 500+ mallocs, and doesn't pass
579 yet, though there are lots of fixes in this patch.
581 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
582 this so that it doesn't need to allocate memory, since it
583 has no way of indicating failure due to OOM (and would be
586 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
588 * bus/Makefile.am: rearrange to create two self-contained
589 libraries, to avoid having libraries with overlapping symbols.
590 that was resulting in weirdness, e.g. I'm pretty sure there
591 were two copies of global static variables.
593 * dbus/dbus-internals.c: move the malloc debug stuff to
596 * dbus/dbus-list.c (free_link): free list mempool if it becomes
599 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
601 * dbus/dbus-address.c (dbus_parse_address): free list nodes
604 * bus/dispatch.c (bus_dispatch_add_connection): free
605 message_handler_slot when no longer using it, so
606 memory leak checkers are happy for the test suite.
608 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
610 * bus/bus.c (new_connection_callback): disconnect in here if
611 bus_connections_setup_connection fails.
613 * bus/connection.c (bus_connections_unref): fix to free the
615 (bus_connections_setup_connection): if this fails, don't
616 disconnect the connection, just be sure there are no side
619 * dbus/dbus-string.c (undo_alignment): unbreak this
621 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
623 (_dbus_auth_new): fix the order in which we free strings
626 * bus/connection.c (bus_connection_disconnected): fix to
627 not send ServiceDeleted multiple times in case of memory
630 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
631 get the base service name
632 (dbus_bus_register_client): don't return base service name,
633 instead store it on the DBusConnection and have an accessor
635 (dbus_bus_register_client): rename dbus_bus_register()
637 * bus/dispatch.c (check_hello_message): verify that other
638 connections on the bus also got the correct results, not
639 just the one sending hello
641 2003-03-15 Havoc Pennington <hp@pobox.com>
643 Make it pass the Hello handling test including all OOM codepaths.
644 Now to do other messages...
646 * bus/services.c (bus_service_remove_owner): fix crash when
647 removing owner from an empty list of owners
648 (bus_registry_ensure): don't leave service in the list of
649 a connection's owned services if we fail to put the service
652 * bus/connection.c (bus_connection_preallocate_oom_error): set
653 error flag on the OOM error.
655 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
656 handle _dbus_transport_set_connection failure
658 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
659 to create watches up front and simply enable/disable them as
661 (unix_connection_set): this can now fail on OOM
663 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
664 of enabling/disabling a watch or timeout.
666 * bus/loop.c (bus_loop_iterate): don't touch disabled
669 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
671 2003-03-15 Havoc Pennington <hp@pobox.com>
673 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
674 write useful test code, after all that futzing around ;-)
676 Test does not yet pass because we can't handle OOM in
677 _dbus_transport_messages_pending (basically,
678 dbus_connection_preallocate_send() does not prealloc the write
679 watch). To fix this, I think we need to add new stuff to
680 set_watch_functions, namely a SetEnabled function so we can alloc
681 the watch earlier, then enable it later.
683 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
684 dbus-memory.c to the convenience lib
686 * bus/test.c: rename some static functions to keep them clearly
687 distinct from stuff in connection.c. Handle client disconnection.
689 2003-03-14 Havoc Pennington <hp@pobox.com>
691 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
692 transport, tests more of the real codepath. Set up clients
693 with bus_setup_debug_client.
695 * bus/test.c (bus_setup_debug_client): function to set up debug
696 "clients" on the main loop
698 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
701 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
704 * dbus/dbus-server-debug.c: support a debug server based on pipes
706 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
707 (_dbus_close): new function
709 * configure.in: check for socketpair
711 2003-03-14 Havoc Pennington <hp@redhat.com>
713 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
716 * dbus/dbus-transport-debug.c: rework this a good bit to be
717 less complicated. hopefully still works.
719 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
722 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
725 * dbus/dbus-message.c (dbus_message_copy): rename from
726 dbus_message_new_from_message, fix it up to copy
727 all the message fields, add test case
729 * bus/dispatch.c (bus_dispatch_test): add some more test code,
730 not quite passing yet
732 2003-03-14 Havoc Pennington <hp@pobox.com>
734 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
735 until no work remains" in test code. (the large diff here
736 is just code movement, no actual changes)
738 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
739 1, no point waiting around for test code.
740 (_dbus_server_debug_accept_transport): unref the timeout
741 after adding it (right?)
743 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
745 2003-03-13 Havoc Pennington <hp@redhat.com>
747 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
750 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
753 * dbus/dbus-connection.h: Make AddWatchFunction and
754 AddTimeoutFunction return a bool so they can fail on out-of-memory
756 * bus/bus.c (bus_context_new): set up timeout handlers
758 * bus/connection.c (bus_connections_setup_connection): set up
761 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
764 * bus/bus.c (bus_context_new): adapt to changes
766 * bus/connection.c: adapt to changes
768 * test/watch.c: adapt to DBusWatch changes
770 * bus/dispatch.c (bus_dispatch_test): started adding this but
773 2003-03-14 Anders Carlsson <andersca@codefactory.se>
775 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
777 2003-03-13 Havoc Pennington <hp@pobox.com>
779 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
780 set up a test framework as for the library
782 2003-03-12 Havoc Pennington <hp@pobox.com>
784 Throughout: purge global variables, introduce BusActivation,
785 BusConnections, BusRegistry, etc. objects instead.
787 * bus/bus.h, bus/bus.c: introduce BusContext as a global
790 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
791 going to redo this a bit differently I think
793 2003-03-12 Havoc Pennington <hp@redhat.com>
795 Mega-patch that gets the message bus daemon initially handling
796 out-of-memory. Work still needed. Also lots of random
797 moving stuff to DBusError instead of ResultCode.
799 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
801 * dbus/dbus-connection.c
802 (dbus_connection_send_with_reply_and_block): use DBusError
804 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
807 * dbus/dbus-connection.c (dbus_connection_send): drop the result
808 code here, as the only failure possible is OOM.
810 * bus/connection.c (bus_connection_disconnect):
811 rename bus_connection_disconnected as it's a notification only
813 * bus/driver.c (bus_driver_handle_acquire_service): don't free
814 "name" on get_args failure, should be done by get_args;
815 don't disconnect client for bad args, just return an error.
816 (bus_driver_handle_service_exists): ditto
818 * bus/services.c (bus_services_list): NULL-terminate returned array
820 * bus/driver.c (bus_driver_send_service_lost)
821 (bus_driver_send_service_acquired): send messages from driver to a
822 specific client to the client's unique name, not to the broadcast
825 * dbus/dbus-message.c (decode_header_data): reject messages that
826 contain no name field
827 (_dbus_message_get_client_serial): rename to
828 dbus_message_get_serial and make public
829 (_dbus_message_set_serial): rename from set_client_serial
830 (_dbus_message_set_reply_serial): make public
831 (_dbus_message_get_reply_serial): make public
833 * bus/connection.c (bus_connection_foreach): allow stopping
834 iteration by returning FALSE from foreach function.
836 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
837 (dbus_connection_free_preallocated_send)
838 (dbus_connection_preallocate_send): new API for sending a message
839 without possibility of malloc failure.
840 (dbus_connection_send_message): rename to just
841 dbus_connection_send (and same for whole function family)
843 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
845 * dbus/dbus-sysdeps.c (_dbus_exit): new function
847 * bus/activation.c: handle/return errors
849 * dbus/dbus-errors.h: add more DBUS_ERROR #define
851 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
852 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
853 (_dbus_result_from_errno): move to this file
855 2003-03-10 Anders Carlsson <andersca@codefactory.se>
857 * dbus/dbus-marshal.c:
858 (_dbus_marshal_set_string):
859 Take a length argument so we can marshal the correct string
862 (_dbus_marshal_dict), (_dbus_demarshal_dict),
863 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
864 (_dbus_marshal_test):
865 * dbus/dbus-marshal.h:
866 Add support for marshalling and demarshalling dicts.
868 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
869 Add support for TYPE DICT.
871 * dbus/dbus-message.c: (set_string_field):
872 Adjust header padding.
874 (dbus_message_append_args_valist), (dbus_message_append_dict),
875 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
876 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
877 (check_message_handling), (check_have_valid_message):
878 * dbus/dbus-message.h:
879 Add functions for setting and getting dicts.
881 * dbus/dbus-protocol.h:
887 * doc/dbus-specification.sgml:
888 Add information about how dicts are marshalled.
890 * test/data/invalid-messages/dict-with-nil-value.message:
891 * test/data/invalid-messages/too-short-dict.message:
892 * test/data/valid-messages/dict-simple.message:
893 * test/data/valid-messages/dict.message:
894 Add sample messages containing dicts.
896 2003-03-08 Anders Carlsson <andersca@codefactory.se>
898 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
900 2003-03-07 Anders Carlsson <andersca@codefactory.se>
903 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
904 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
905 (dbus_dict_set_int32), (dbus_dict_set_uint32),
906 (dbus_dict_set_double), (dbus_dict_set_string),
907 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
908 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
909 (dbus_dict_set_string_array), (_dbus_dict_test):
911 Fix according to comments from Havoc.
913 2003-03-06 Michael Meeks <michael@server.home>
915 * configure.in: if we don't have kde-config, disable have_qt.
917 2003-03-07 Anders Carlsson <andersca@codefactory.se>
922 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
923 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
924 (dbus_dict_remove), (dbus_dict_get_value_type),
925 (dbus_dict_get_keys), (dbus_dict_put_boolean),
926 (dbus_dict_put_int32), (dbus_dict_put_uint32),
927 (dbus_dict_put_double), (dbus_dict_put_string),
928 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
929 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
930 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
931 (dbus_dict_get_int32), (dbus_dict_get_uint32),
932 (dbus_dict_get_double), (dbus_dict_get_string),
933 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
934 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
935 (dbus_dict_get_string_array), (_dbus_dict_test):
937 Add DBusDict implementation
939 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
943 2003-03-04 Havoc Pennington <hp@pobox.com>
945 * test/data/auth/*: adapt to changes
947 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
948 USERID_BASE64 and change USERNAME_BASE64 to put in username not
951 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
952 more stuff from being in a context name, to make the protocol
955 * dbus/dbus-errors.c (dbus_error_has_name): new function
956 (dbus_error_is_set): new function
958 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
959 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
961 * dbus/dbus-connection.c (dbus_connection_flush): also read
962 messages during a flush operation
964 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
966 2003-03-05 Anders Carlsson <andersca@codefactory.se>
968 * configure.in: Check for gethostbyname on Solaris.
970 * dbus/dbus-transport.c: (_dbus_transport_open):
971 Remove duplicate "tcp" entry.
973 * doc/dbus-specification.sgml:
976 2003-03-05 Anders Carlsson <andersca@codefactory.se>
978 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
979 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
980 (_dbus_keyring_test):
981 * dbus/dbus-md5.c: (_dbus_md5_compute):
982 * dbus/dbus-sha.c: (_dbus_sha_compute):
985 2003-03-05 Anders Carlsson <andersca@codefactory.se>
987 * README: Add some things.
989 2003-03-04 Anders Carlsson <andersca@codefactory.se>
991 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
992 after case DBUS_TYPE_BOOELAN.
994 2003-03-02 Havoc Pennington <hp@pobox.com>
996 * test/break-loader.c (randomly_set_extreme_ints): add test that
997 sets really huge and small integers
999 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1000 that length of boolean array fits in the string, and that
1001 string has room for boolean value in single-bool case.
1003 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1004 optional value to "ALIGN" command which is what to fill the
1007 * test/data/valid-messages/no-padding.message: add regression
1008 test for the message padding problem
1010 2003-03-02 Havoc Pennington <hp@pobox.com>
1012 * dbus/dbus-message.c (decode_header_data): fix to always init
1013 message_padding, from Benjamin Dauvergne
1015 2003-03-02 Havoc Pennington <hp@pobox.com>
1021 2003-03-01 Joe Shaw <joe@assbarn.com>
1023 * configure.in: Check for "struct cmsgcred" and try to access its
1024 members for BSD-like unices.
1026 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1027 _dbus_read_credentials_unix_socket().
1028 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1029 read() for reading the credential byte off the unix socket. Use
1030 struct cmsgcred on systems that support it.
1032 2003-02-27 Alexander Larsson <alexl@redhat.com>
1036 Make gthreads-2.0 dependency optional. Don't build thread test if
1039 2003-02-27 Havoc Pennington <hp@pobox.com>
1041 * dbus/dbus-connection.c
1042 (dbus_connection_send_message_with_reply_and_block): fix doh!
1043 doh! doh! bug that resulted in never removing a reply from the
1044 queue, no wonder we called get_reply_serial so much ;-)
1046 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1047 and client serial instead of demarshaling them every time
1049 2003-02-27 Havoc Pennington <hp@pobox.com>
1051 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1052 more inlined, using dbus-string-private.h, speeds things up
1055 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1056 when freeing the string
1057 (_dbus_string_steal_data): fix for align offset
1058 (undo_alignment): new function
1060 2003-02-26 Havoc Pennington <hp@redhat.com>
1062 All kinds of audit fixes from Owen, plus initial attempt to
1063 handle unaligned memory returned from malloc.
1065 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1066 leave room for align_offset and nul byte
1067 (fixup_alignment): function to track an align_offset and
1068 ensure real->str is aligned
1069 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1070 to allow a nul byte plus align offset
1071 (_dbus_string_lock): fix overflow issue
1072 (_dbus_string_init_const_len): add assertions on sanity of len,
1073 assign allocated to be ALLOCATION_PADDING larger than len
1074 (set_length): fixup the overflow handling
1075 (_dbus_string_get_data_len): fix overflow in assertion
1076 (open_gap): detect overflow in size of gap to be opened
1077 (_dbus_string_lengthen): add overflow check
1078 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1079 (_dbus_string_append): add overflow check
1080 (_dbus_string_append_unichar): overflow
1081 (_dbus_string_delete): fix overflow in assertion
1082 (_dbus_string_copy_len): overflow in assertion
1083 (_dbus_string_replace_len): overflows in assertions
1084 (_dbus_string_find): change to implement in terms of
1085 _dbus_string_find_to
1086 (_dbus_string_find_to): assorted fixage
1087 (_dbus_string_equal_c_str): assert c_str != NULL,
1088 fix logic so the function works
1089 (_dbus_string_ends_with_c_str): fix overflow thingy
1090 (_dbus_string_base64_encode): overflow fix
1091 (_dbus_string_validate_ascii): overflow
1092 (_dbus_string_validate_nul): overflow
1094 2003-02-26 Havoc Pennington <hp@redhat.com>
1096 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1098 2003-02-26 Alexander Larsson <alexl@redhat.com>
1101 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1103 * dbus/dbus-connection.c:
1104 * dbus/dbus-connection.h:
1105 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1106 Add dbus_connection_set_wakeup_main_function and use it when queueing
1107 incoming and outgoing messages.
1110 * dbus/dbus-dataslot.c:
1111 Threadsafe usage of DBusDataSlotAllocator
1113 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1116 * dbus/dbus-server-unix.c:
1119 * glib/dbus-gmain.c:
1120 Implement the new wakeup functions for glib.
1123 * glib/test-thread-client.c:
1124 * glib/test-thread-server.c:
1125 * glib/test-thread.h:
1126 Initial cut at some thread test code. Not really done yet.
1128 2003-02-26 Havoc Pennington <hp@pobox.com>
1130 * dbus/dbus-connection.c
1131 (dbus_connection_send_message_with_reply_and_block): fix crash
1132 where we ref'd the outgoing message instead of the returned reply
1134 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1135 at the end of this function, so if we didn't need to read for
1136 authentication, we reinstall it for receiving messages
1138 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1139 a NULL sender for peer-to-peer case
1141 * dbus/dbus-transport-unix.c (check_read_watch): handle
1142 !authenticated case correctly
1144 * glib/dbus-gmain.c: add support for DBusServer
1146 * dbus/dbus-server.c: add data slot support
1148 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1149 return values and handle errors
1151 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1154 * Doxyfile.in (INPUT): add glib subdir
1156 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1157 setup_with_g_main instead of hookup_with_g_main; write docs
1159 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1161 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1162 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1163 * dbus/dbus-message.c: (dbus_message_append_boolean),
1164 (dbus_message_append_boolean_array),
1165 (dbus_message_get_args_valist), (_dbus_message_test):
1166 * dbus/dbus-message.h:
1167 * doc/dbus-specification.sgml:
1168 Various fixes as pointed out by Havoc.
1170 * test/data/invalid-messages/bad-boolean-array.message:
1171 * test/data/invalid-messages/bad-boolean.message:
1172 Add invalid boolean value test cases.
1174 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1176 * dbus/dbus-internals.c: (_dbus_type_to_string):
1177 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1178 (_dbus_marshal_validate_arg):
1179 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1180 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1181 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1182 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1183 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1184 (dbus_message_iter_get_double),
1185 (dbus_message_iter_get_boolean_array), (message_iter_test):
1186 * dbus/dbus-message.h:
1187 * dbus/dbus-protocol.h:
1188 * doc/dbus-specification.sgml:
1189 * test/data/valid-messages/lots-of-arguments.message:
1190 Add support for boolean and boolean array types.
1192 2003-02-23 Havoc Pennington <hp@pobox.com>
1194 * dbus/dbus-keyring.c: finish most of this implementation and
1197 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1198 these barf if the error isn't cleared to NULL
1200 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1201 (_dbus_create_directory): new function
1203 * dbus/dbus-errors.c (dbus_set_error): fix warning
1205 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1206 (_dbus_string_hex_decode): new function
1207 (test_hex_roundtrip): test code
1209 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1211 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1213 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1214 the save-to-temp/rename trick to atomically write the new file
1215 (_dbus_string_parse_uint): new function
1217 2003-02-22 Havoc Pennington <hp@pobox.com>
1219 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1221 2003-02-22 Havoc Pennington <hp@pobox.com>
1223 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1224 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1226 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1228 * dbus/test/data/sha-1: add US government test suite for SHA-1
1230 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1232 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1233 Make string arrays NULL-terminated.
1235 * dbus/dbus-memory.c: (dbus_free_string_array):
1236 * dbus/dbus-memory.h:
1237 New function for freeing NULL-terminated string arrays.
1239 * dbus/dbus-message-builder.c: (append_quoted_string),
1240 (_dbus_message_data_load):
1241 Add support for array types.
1243 * dbus/dbus-message.c: (check_message_handling):
1244 Add more types as test cases.
1246 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1247 (_dbus_string_parse_double):
1248 Add the start offset to the end offset.
1250 * test/data/valid-messages/lots-of-arguments.message:
1251 New test message with lots of arguments.
1253 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1255 * dbus/dbus-message.c: (dbus_message_append_nil),
1256 (dbus_message_append_int32), (dbus_message_append_uint32),
1257 (dbus_message_append_double), (dbus_message_append_string),
1258 (dbus_message_append_int32_array),
1259 (dbus_message_append_uint32_array),
1260 (dbus_message_append_double_array),
1261 (dbus_message_append_byte_array),
1262 (dbus_message_append_string_array):
1263 Fix all out-of-memory handling in these functions.
1265 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1267 * dbus/dbus-message.c: (dbus_message_append_nil):
1270 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1272 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1273 (dbus_message_append_nil), (dbus_message_append_int32_array),
1274 (dbus_message_append_uint32_array),
1275 (dbus_message_append_double_array),
1276 (dbus_message_append_byte_array),
1277 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1278 (dbus_message_iter_get_int32_array),
1279 (dbus_message_iter_get_uint32_array),
1280 (dbus_message_iter_get_double_array),
1281 (dbus_message_iter_get_byte_array),
1282 (dbus_message_iter_get_string_array):
1284 * dbus/dbus-message.h:
1285 Add functions for appending and getting arrays.
1287 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1289 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1290 element size at least 8 bytes, fixes mempool tests on
1293 2003-02-20 Alexander Larsson <alexl@redhat.com>
1295 * dbus/dbus-transport-unix.c (unix_do_iteration):
1296 Unlock the connection mutex during a blocking select call.
1297 Add todo about how we need a way to wake up the select.
1299 * dbus/dbus-connection-internal.h:
1300 * dbus/dbus-connection.c:
1301 Add _dbus_connection_lock and _dbus_connection_unlock.
1303 2003-02-19 Havoc Pennington <hp@pobox.com>
1305 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1306 Doxyfile.in, not Doxyfile
1308 * dbus/dbus-keyring.c: do some hacking on this
1310 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1312 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1314 (dbus_set_error): remove dbus_error_init, check for message ==
1315 NULL *before* we sprintf into it, and add @todo about including
1316 system headers in this file
1318 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1320 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1322 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1323 get various bits of user information based on either username
1325 (_dbus_homedir_from_username): new function
1327 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1330 Add check for nonposix getpwnam_r
1332 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1333 Align the pool element size to a sizeof (void *) boundary.
1335 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1336 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1337 General Solaris fixes.
1339 * test/data/valid-messages/simplest-manual.message:
1340 Explicitly state that we want little-endian packing.
1342 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1344 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1346 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1347 Added to create a transport connecting using a tcp/ip socket.
1349 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1350 to a tcp socket at given host and port.
1351 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1354 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1356 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1357 Added to create a server listening on a TCP/IP socket.
1359 2003-02-19 Havoc Pennington <hp@pobox.com>
1361 Throughout: mop up all the Doxygen warnings and undocumented
1364 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1365 to search any paths.
1367 * dbus/dbus-threads.c: move global mutex initializers to
1368 dbus-internals.h, multiple prototypes was confusing doxygen
1369 besides being kind of ugly
1371 * Doxyfile (PREDEFINED): have Doxygen define
1372 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1373 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1374 (do not abuse the feature! it's for stuff like the autogenerated
1375 macros in dbus-md5.c, not just for things you don't feel like
1378 2003-02-18 Havoc Pennington <hp@pobox.com>
1380 * dbus/dbus-string.c (_dbus_string_zero): new function
1382 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1383 wrap it in some dbus-friendly API
1385 * dbus/dbus-types.h: add 16-bit types
1387 2003-02-18 Joe Shaw <joe@assbarn.com>
1389 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1390 credentials from our currently running process.
1391 (get_word): Fix a buglet where we were copying the entire length
1392 instead of relative to our position.
1394 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1395 keys on the stack... it's 640k of data.
1397 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1398 read the credentials byte off the socket, even if we don't have
1400 (_dbus_poll): Implement poll() using select() for systems which
1403 * glib/test-dbus-glib.c (main): Print out an error if no
1404 parameters are given.
1406 * test/data/auth/fallback.auth-script: Added. Tests that a client
1407 can fallback to a secondary auth mechanism if the first fails.
1409 2003-02-18 Havoc Pennington <hp@pobox.com>
1413 2003-02-17 Havoc Pennington <hp@pobox.com>
1415 * doc/dbus-specification.sgml: lots of cosmetic
1416 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1417 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1418 s/server/bus/ (except in authentication section). Add a section
1419 "Message Bus Message Routing"
1421 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1427 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1429 * doc/dbus-specification.sgml:
1430 Specification updates.
1432 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1434 * bus/activation.c: (bus_activation_init), (child_setup),
1435 (bus_activation_activate_service):
1437 * bus/main.c: (main):
1438 Set DBUS_ADDRESS environment variable.
1440 * dbus/dbus-errors.c: (dbus_set_error):
1441 Don't use va_copy since that's a C99 feature.
1443 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1444 (_dbus_spawn_async):
1445 * dbus/dbus-sysdeps.h:
1446 Add child_setup_func to _dbus_spawn_async.
1448 * doc/dbus-specification.sgml:
1449 Update specification.
1451 * test/spawn-test.c: (setup_func), (main):
1454 2003-02-17 Alexander Larsson <alexl@redhat.com>
1456 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1459 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1463 * doc/dbus-test-plan.sgml:
1464 Add test plan document.
1469 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1471 * dbus/dbus-message.c: (decode_header_data),
1472 (_dbus_message_loader_return_buffer):
1473 Set the header padding amount when loading a message.
1475 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1477 * bus/dispatch.c: (send_one_message):
1478 Only send broadcast messages to registered connections.
1480 * dbus/dbus-message.c: (dbus_message_name_is):
1481 * dbus/dbus-message.h:
1482 New convenience function.
1484 * dbus/dbus-transport-debug.c: (do_reading):
1485 Only dispatch one message per run.
1488 * test/bus-test.c: (new_connection_callback), (die),
1489 (test_hello_client1_handler), (test_hello_client2_handler),
1490 (test_hello_replies), (main):
1492 * test/bus-test-loop.[ch]:
1495 2003-02-16 Havoc Pennington <hp@pobox.com>
1497 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1498 backward conditional
1500 2003-02-16 Alexander Larsson <alexl@redhat.com>
1502 * dbus/dbus-connection.c:
1503 Implement sent_message_with_reply. (with_reply_and block is still
1505 Made dispatch_message not lose message if OOM.
1507 * dbus/dbus-errors.h:
1508 Add NoReply error (for reply timeouts).
1510 2003-02-16 Alexander Larsson <alexl@redhat.com>
1512 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1513 Actually free keys and values when destroying hashtable.
1515 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1517 * dbus/dbus-auth.c: (client_try_next_mechanism):
1520 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1521 Return TRUE if there's no thread implementation around.
1523 * glib/dbus-gmain.c: (free_source),
1524 (dbus_connection_hookup_with_g_main):
1525 Make sure to remove the GSource when the connection is finalized.
1527 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1529 * bus/dispatch.c: (bus_dispatch_message_handler):
1530 * dbus/dbus-errors.h:
1531 Return an error if someone tries to send a message to a service
1534 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1536 * bus/activation.c: (load_directory), (bus_activation_init),
1537 (bus_activation_activate_service):
1540 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1541 More work on the activation handling.
1543 * dbus/dbus-errors.h:
1544 Add some error messages
1546 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1547 * dbus/dbus-message.h:
1548 New function that creates an error message.
1550 * dbus/dbus-protocol.h:
1551 Add ACTIVATE_SERVER message.
1553 * dbus/dbus-server-unix.c: (unix_handle_watch),
1554 (_dbus_server_new_for_domain_socket):
1555 Call _dbus_fd_set_close_on_exec.
1557 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1558 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1559 (_dbus_fd_set_close_on_exec):
1560 * dbus/dbus-sysdeps.h:
1561 Add _dbus_fd_set_close_on exec function. Also add function that checks
1562 that all open fds are set to close-on-exec and warns otherwise.
1564 * dbus/dbus-transport-unix.c:
1565 (_dbus_transport_new_for_domain_socket):
1566 Call _dbus_fd_set_close_on_exec.
1568 2003-02-16 Havoc Pennington <hp@pobox.com>
1570 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1571 allow people to avoid setting SIGPIPE to SIG_IGN
1572 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1573 we've been asked not to
1575 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1577 * dbus/dbus-list.c: (_dbus_list_append_link),
1578 (_dbus_list_prepend_link):
1579 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1583 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1586 * bus/activation.c: (bus_activation_entry_free),
1587 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1589 * bus/main.c: (main):
1590 Add simple activation support, doesn't work yet though.
1592 2003-02-15 Zack Rusin <zack@kde.org>
1594 * qt/dbus-qthread.cpp: small casting fix
1596 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1598 * dbus/dbus-errors.c: (dbus_set_error):
1599 * dbus/dbus-errors.h:
1600 Add a few errors and make dbus_set_error void.
1602 * dbus/dbus-sysdeps.c:
1603 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1604 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1605 * dbus/dbus-sysdeps.h:
1606 Add _dbus_spawn_async.
1608 * test/spawn-test.c: (main):
1609 Test for _dbus_spawn_async.
1611 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1613 * dbus/dbus-internals.h:
1614 Fix build without tests.
1616 * dbus/dbus-list.c: (alloc_link):
1617 Fix a segfault when a malloc fails.
1619 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1620 (dbus_malloc0), (dbus_realloc):
1621 Add support for malloc debugging.
1623 2003-02-15 Alexander Larsson <alexl@redhat.com>
1625 * dbus/dbus-threads.c:
1626 * dbus/dbus-threads.h:
1627 Add condvars. Remove static mutext from API.
1628 Implement static mutexes by initializing them from threads_init.
1630 * glib/dbus-gthread.c:
1631 * qt/dbus-qthread.cpp:
1632 Update with the thread api changes.
1637 Turn StaticMutex into normal mutex + init function.
1638 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1639 _dbus_list_append_link, _dbus_list_prepend_link
1642 * dbus/dbus-sysdeps.c:
1643 * dbus/dbus-sysdeps.h:
1644 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1645 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1647 * dbus/dbus-protocol.h:
1648 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1650 * dbus/dbus-message.c:
1651 Make ref/unref atomic.
1654 * dbus/dbus-connection-internal.h:
1655 * dbus/dbus-connection.c:
1656 * dbus/dbus-connection.h:
1658 Change _peek to _borrow,_return & _steal_borrowed.
1659 Change disconnect callback to event.
1660 Make dbus_connection_dispatch_messages reentrant.
1662 * dbus/dbus-transport.c:
1663 Don't ref the connection on calls to the transport
1666 * dbus/dbus-message-handler.c:
1669 * glib/dbus-gmain.c:
1670 Don't use peek_message anymore
1673 * test/debug-thread.c:
1674 * test/debug-thread.h:
1675 Simple thread implementation that asserts() on deadlocks in
1676 single-threaded code.
1679 (main) Call debug_threads_init.
1682 Use disconnect message instead of disconnect callback.
1686 Don't call dbus_connection_set_disconnect_function. Instead export
1687 bus_connection_disconnect.
1690 Call bus_connection_disconnect when we get a disconnected message.
1692 2003-02-15 Havoc Pennington <hp@pobox.com>
1694 * dbus/dbus-message.c (dbus_message_new): fool around with the
1697 2003-02-14 Havoc Pennington <hp@pobox.com>
1699 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1701 * dbus/dbus-memory.c: fail if the debug functions indicate we
1704 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1705 (_dbus_decrement_fail_alloc_counter): debug functions to
1706 simulate memory allocation failures
1708 2003-02-14 Havoc Pennington <hp@pobox.com>
1710 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1713 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1715 * bus/driver.c: (bus_driver_handle_hello):
1717 * bus/services.c: (bus_service_lookup):
1718 Reorder message sending so we get a more sane order.
1720 * test/bus-test.c: (message_handler):
1723 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1725 * bus/driver.c: (bus_driver_send_service_deleted),
1726 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1727 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1728 (bus_driver_send_welcome_message),
1729 (bus_driver_handle_list_services),
1730 (bus_driver_handle_acquire_service),
1731 (bus_driver_handle_service_exists):
1732 * dbus/dbus-bus.c: (dbus_bus_register_client),
1733 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1734 * dbus/dbus-errors.c: (dbus_result_to_string):
1735 * dbus/dbus-errors.h:
1736 * dbus/dbus-message.c: (dbus_message_append_args),
1737 (dbus_message_append_args_valist), (dbus_message_get_args),
1738 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1739 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1740 (dbus_message_iter_get_byte_array),
1741 (dbus_message_iter_get_string_array), (message_iter_test),
1742 (check_message_handling), (_dbus_message_test):
1743 * dbus/dbus-message.h:
1744 * test/bus-test.c: (main):
1745 Change fields to arguments in messages, so that they won't be
1746 confused with header fields.
1748 * glib/test-dbus-glib.c: (main):
1749 Remove append_fields from hello message.
1751 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1753 * dbus/dbus-errors.c:
1754 * dbus/dbus-message.c:
1755 * dbus/dbus-string.c:
1756 Documentation fixes.
1758 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1760 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1762 Implement support for timeouts in dbus-glib.
1764 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1766 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1767 * dbus/dbus-message.c: (process_test_subdir):
1768 * test/break-loader.c: (find_breaks_based_on):
1769 Plug some memory leaks.
1771 2003-02-13 Richard Hult <rhult@codefactory.se>
1773 * bus/main.c: Fix build.
1775 * dbus/dbus-errors.h:
1776 * dbus/dbus-errors.c: Fix copyright for Anders.
1778 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1783 * bus/connection.c: (bus_connection_foreach):
1786 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1787 (unescape_string), (new_section), (parse_section_start),
1788 (parse_key_value), (report_error), (bus_desktop_file_load),
1789 (bus_desktop_file_get_string):
1790 * bus/desktop-file.h:
1791 Use DBusError for error reporting.
1793 * bus/dispatch.c: (send_one_message),
1794 (bus_dispatch_message_handler):
1795 * bus/driver.c: (bus_driver_send_service_deleted),
1796 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1797 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1798 (bus_driver_send_welcome_message),
1799 (bus_driver_handle_list_services),
1800 (bus_driver_handle_acquire_service),
1801 (bus_driver_handle_service_exists):
1802 * bus/loop.c: (bus_loop_run):
1804 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1806 * bus/utils.c: (bus_wait_for_memory):
1808 New files with general utility functions.
1810 * dbus/dbus-internals.h:
1811 Remove _DBUS_HANDLE_OOM.
1813 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1815 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1816 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1817 * dbus/dbus-errors.h:
1818 Add DBusError structure.
1820 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1822 * test/data/valid-messages/standard-acquire-service.message:
1823 * test/data/valid-messages/standard-hello.message:
1824 * test/data/valid-messages/standard-list-services.message:
1825 * test/data/valid-messages/standard-service-exists.message:
1826 Add some standard messages.
1828 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1830 * bus/driver.c: (bus_driver_send_welcome_message),
1831 (bus_driver_handle_list_services),
1832 (bus_driver_handle_acquire_service),
1833 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1834 Update for API changes in libdbus.
1836 * dbus/dbus-message.c: (dbus_message_new_reply):
1837 * dbus/dbus-message.h:
1838 Remove the name argument. The spec states that replies shouldn't
1841 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1843 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1844 (report_error), (bus_desktop_file_load), (lookup_section),
1845 (lookup_line), (bus_desktop_file_get_raw),
1846 (bus_desktop_file_get_string):
1847 * bus/desktop-file.h:
1848 Some fixes, and new functions for getting a key value from a section.
1850 2003-02-13 Havoc Pennington <hp@pobox.com>
1852 * test/data/auth/fail-after-n-attempts.auth-script: new test
1854 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1857 2003-02-13 Havoc Pennington <hp@pobox.com>
1859 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1860 dbus_credentials_match were backward
1862 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1863 NO_CREDENTIALS and ROOT_CREDENTIALS
1865 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1866 into here. Never process more commands after we've reached an
1867 end state; store further data as unused bytes.
1869 * test/data/auth/*: add more auth tests
1871 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1872 command to match exact string and EXPECT_UNUSED to match unused
1875 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1877 2003-02-12 Havoc Pennington <hp@pobox.com>
1879 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1880 \r off of popped lines
1882 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1885 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1888 2003-02-12 Havoc Pennington <hp@pobox.com>
1890 * dbus/Makefile.am: remove break-loader from the build, since it
1893 * configure.in: add --enable-gcov to turn on coverage profiling
1894 flags and disable optimization
1896 2003-02-10 Havoc Pennington <hp@pobox.com>
1898 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1899 initial cut at test framework for DBusAuth from laptop.
1900 Doesn't quite work yet but it compiles and I need to get
1901 it off the 266mhz laptop. ;-)
1903 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1904 fix a memleak in error case
1906 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1909 * bus/desktop-file.c:
1910 * bus/desktop-file.h:
1911 Add a desktop file parser.
1913 2003-02-11 Zack Rusin <zack@kde.org>
1915 * qt/message.[h|cpp]: sample implementation
1916 of the KDE wrapper for DBusMessage
1918 2003-02-09 Zack Rusin <zack@kde.org>
1920 * test/bus-test.c: make_it_compile
1921 * doc/dbus-specification.sgml: minimal semantic fix
1923 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1929 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1932 * dbus/dbus-break-loader.c:
1934 * test/break-loader.c:
1935 Move dbus-break-loader to test/ and rename it to break-loader.
1937 2003-02-02 Havoc Pennington <hp@pobox.com>
1939 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1940 for code to manage cookies in your home directory
1942 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1944 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1945 to authenticate, then disconnect the client.
1947 2003-02-03 Alexander Larsson <alexl@redhat.com>
1949 * dbus/dbus-message.c (dbus_message_append_fields):
1952 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1954 * doc/dbus-specification.sgml:
1955 Update address format section.
1957 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1960 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1961 (message_handler), (new_connection_callback), (loop_quit),
1965 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1967 * bus/driver.c: (bus_driver_handle_service_exists):
1968 Simplify the code a bit.
1970 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1973 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1976 Add libdbus-daemon.la and link to it.
1978 2003-02-01 James Willcox <jwillcox@gnome.org>
1980 * bus/driver.c: (bus_driver_handle_own_service):
1981 Actually include the service reply code in the message.
1983 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1985 * bus/driver.c: (bus_driver_handle_service_exists):
1986 Don't unref the incoming message.
1988 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1990 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1992 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1994 * dbus/dbus-server.c: (dbus_server_listen):
1995 * dbus/dbus-transport.c: (_dbus_transport_open):
1996 ifdef out the calls to the debug transport and server.
1998 2003-02-02 Alexander Larsson <alexl@redhat.com>
2000 * dbus/dbus-watch.c (dbus_watch_get_flags):
2001 Add note in the docs that ERROR or HANGUP won't be returned
2002 and are assumed always on.
2004 * glib/dbus-gmain.c (add_watch):
2005 Always add IO_ERR | IO_HUP
2007 * dbus/dbus-message.h:
2008 Add semicolon after dbus_message_iter_get_string_array().
2009 Makes qt code build again
2011 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2013 * bus/driver.c: (create_unique_client_name),
2014 (bus_driver_handle_hello):
2015 Don't take a name, just use a numeric id to identify
2019 * dbus/dbus-bus.c: (dbus_bus_register_client),
2020 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2022 Add new convenience functions for communicating with the bus.
2024 * dbus/dbus-message.h:
2026 * dbus/dbus-protocol.h:
2029 2003-02-01 Alexander Larsson <alexl@redhat.com>
2031 * dbus/dbus-message.c (dbus_message_append_fields):
2032 Add some more doc comments.
2034 2003-02-01 Havoc Pennington <hp@pobox.com>
2036 * dbus/dbus-break-loader.c (randomly_modify_length): change
2037 a 4-byte value in the message as if it were a length
2039 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2040 execute bit on saved files
2042 2003-02-01 Havoc Pennington <hp@pobox.com>
2044 * dbus/dbus-break-loader.c (main): new program to find messages
2045 that break the loader.
2047 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2048 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2050 * dbus/dbus-string.c (_dbus_string_set_byte): new
2052 2003-01-31 Havoc Pennington <hp@pobox.com>
2054 * dbus/dbus-message.c: refactor the test code to be more general,
2055 in preparation for writing a "randomly permute test cases to
2056 try to break the loader" program.
2058 2003-01-31 Havoc Pennington <hp@pobox.com>
2060 * doc/dbus-specification.sgml: work on the specification
2062 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2063 the protocol version of the message.
2065 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2066 no longer specifies that.
2067 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2070 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2071 "break" for DBUS_TYPE_NIL, remove @todo
2073 2003-01-31 Havoc Pennington <hp@pobox.com>
2075 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2076 just set_is_error/get_is_error as this is a commonly-used
2077 function, and write docs.
2079 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2081 * dbus/dbus-address.c: (dbus_address_entry_free):
2082 Free key and value lists.
2084 * dbus/dbus-internals.c: (_dbus_type_to_string):
2085 Add the types we didn't have.
2087 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2088 (_dbus_marshal_validate_arg):
2091 * dbus/dbus-message.c: (dbus_message_set_sender):
2092 Remove todo about being able to set sender to NULL.
2094 (dbus_message_set_is_error_reply),
2095 (dbus_message_get_is_error_reply):
2096 * dbus/dbus-message.h:
2099 * dbus/dbus-protocol.h:
2100 Add error reply flag.
2102 * test/data/valid-messages/opposite-endian.message:
2103 Add NIL type to test.
2105 2003-01-31 Havoc Pennington <hp@pobox.com>
2107 * doc/dbus-specification.sgml: fully specify the header. Add
2108 flags and major protocol version, and change header/body len to
2111 * dbus/dbus-message-builder.c (append_saved_length): append length
2114 * dbus/dbus-message.c (dbus_message_create_header): change header
2115 length and body length to unsigned. Add the new fields from the
2117 (_dbus_message_loader_return_buffer): unsigned header/body len
2119 2003-01-30 Havoc Pennington <hp@pobox.com>
2121 * dbus/dbus-auth.c: rework to use only REJECTED, no
2124 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2125 use REJECTED, suggested by Mark McLoughlin
2127 2003-01-30 Havoc Pennington <hp@pobox.com>
2129 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2130 a better way to report errors here. e.g. "unix address lacks
2131 path" or something. also "no such file" when the path doesn't
2134 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2136 (dbus_parse_address): add @todo about documenting address format,
2137 and allowing , and ; to be escaped
2139 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2142 Add dbus-address.[ch]
2144 * dbus/dbus-address.c: (dbus_address_entry_free),
2145 (dbus_address_entries_free), (create_entry),
2146 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2147 (dbus_parse_address), (_dbus_address_test):
2148 * dbus/dbus-address.h:
2149 New files for dealing with address parsing.
2151 * dbus/dbus-connection.c:
2152 Document timeout functions.
2154 * dbus/dbus-message.c:
2155 Document dbus_message_new_from_message.
2157 * dbus/dbus-server-debug.c:
2160 * dbus/dbus-server.c: (dbus_server_listen):
2161 Parse address and use correct server implementation.
2163 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2164 * dbus/dbus-string.h:
2165 New function with test.
2167 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2171 * dbus/dbus-transport-debug.c:
2174 * dbus/dbus-transport.c: (_dbus_transport_open):
2175 Parse address and use correct transport implementation.
2177 2003-01-30 Havoc Pennington <hp@pobox.com>
2179 * dbus/dbus-message.c: use message->byte_order instead of
2180 DBUS_COMPILER_BYTE_ORDER throughout.
2181 (dbus_message_create_header): pad header to align the
2182 start of the body of the message to 8-byte boundary
2184 * dbus/dbus-marshal.h: make all the demarshalers take const
2185 DBusString arguments.
2187 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2188 validate message args here, so we don't have to do slow validation
2189 later, and so we catch bad messages as they are incoming. Also add
2190 better checks on header_len and body_len. Also fill in
2193 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2194 implemented properly)
2195 (_dbus_string_validate_nul): new function to check all-nul
2197 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2198 get_arg_end_pos and remove all validation
2199 (_dbus_marshal_validate_arg): actually do validation here.
2201 2003-01-29 Havoc Pennington <hp@pobox.com>
2203 * dbus/dbus-message.c (check_message_handling): fix assertion
2204 failure on set_client_serial
2206 2003-01-28 Havoc Pennington <hp@pobox.com>
2208 * dbus/dbus-server-debug.c: Add doc section comments
2210 * dbus/dbus-transport-debug.c: add doc section comments
2212 2003-01-28 Havoc Pennington <hp@redhat.com>
2214 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2215 the reverse order from how I had it
2216 (_dbus_string_base64_encode): reverse encoding order. I was
2217 basically byteswapping everything during encoding.
2219 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2221 * dbus/dbus-connection-internal.h:
2222 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2223 (_dbus_connection_remove_timeout):
2224 Add functions for adding and removing timeouts.
2226 * dbus/dbus-message.c: (dbus_message_new_from_message):
2227 Add new function that takes a message and creates an exact
2228 copy of it, but with the refcount set to 1.
2229 (check_message_handling):
2232 * dbus/dbus-server-protected.h:
2233 * dbus/dbus-server.c: (_dbus_server_init_base),
2234 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2235 (dbus_server_set_timeout_functions):
2236 (_dbus_server_remove_timeout):
2237 New functions so that a server can add and remove timeouts.
2239 (dbus_server_listen):
2240 Add commented out call to dbus_server_debug_new.
2242 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2243 Actually set the handler, doh.
2245 * dbus/dbus-transport.c: (_dbus_transport_open):
2246 Add commented out call to dbus_transport_debug_client_new.
2249 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2251 2003-01-28 Havoc Pennington <hp@pobox.com>
2253 * dbus/dbus-message.c (check_message_handling): function to check
2254 on the loaded message, iterates over it etc.
2256 2003-01-28 Havoc Pennington <hp@pobox.com>
2258 * test/Makefile.am (dist-hook): fix make distdir
2260 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2262 2003-01-27 Havoc Pennington <hp@pobox.com>
2264 * dbus/dbus-mempool.c (time_for_size): replace printf with
2267 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2268 empty lines; fix the SAVE_LENGTH stuff to be
2269 START_LENGTH/END_LENGTH so it actually works; couple other
2272 * test/Makefile.am (dist-hook): add dist-hook for .message files
2274 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2275 can be constant or locked.
2276 (_dbus_string_free): allow freeing a const string as
2279 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2281 * dbus/dbus-test-main.c (main): take an argument which is the
2282 directory containing test data
2284 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2285 argument to this and load all the messages in test/data/
2286 checking that they can be loaded or not loaded as appropriate.
2288 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2290 * bus/dispatch.c: (bus_dispatch_message_handler):
2291 Dispatch messages sent to services.
2293 * bus/driver.c: (bus_driver_send_service_deleted),
2294 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2295 (bus_driver_send_service_acquired):
2296 Add helper functions for sending service related messages.
2298 (bus_driver_send_welcome_message):
2299 Send HELLO_REPLY instead of WELCOME.
2301 (bus_driver_handle_list_services):
2302 Send LIST_SERVICES_REPLY instead of SERVICES.
2304 (bus_driver_handle_own_service),
2305 (bus_driver_handle_service_exists):
2306 New message handlers.
2308 (bus_driver_handle_message):
2309 Invoke new message handlers.
2311 (bus_driver_remove_connection):
2312 Don't remove any services here since that's done automatically
2313 by bus_service_remove_owner now.
2316 New function signatures.
2318 * bus/services.c: (bus_service_add_owner):
2319 Send ServiceAcquired message if we're the only primary owner.
2321 (bus_service_remove_owner):
2322 Send ServiceAcquired/ServiceLost messages.
2324 (bus_service_set_prohibit_replacement),
2325 (bus_service_get_prohibit_replacement):
2326 Functions for setting prohibit replacement.
2328 (bus_service_has_owner):
2329 New function that checks if a connection is in the owner queue of
2333 Add new function signatures.
2335 * dbus/dbus-list.c: (_dbus_list_test):
2336 Add tests for _dbus_list_remove_last and traversing the list backwards.
2339 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2340 go any further, so return NULL then.
2342 * dbus/dbus-protocol.h:
2343 Add new messages, service flags and service replies.
2345 2003-01-26 Havoc Pennington <hp@pobox.com>
2347 * dbus/dbus-message-builder.c: implement, completely untested.
2349 * test/data/*: add data to be used in testing.
2350 ".message" files are our simple loadable text format.
2351 ".message-raw" will be binary dumps of messages.
2353 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2355 2003-01-26 Havoc Pennington <hp@pobox.com>
2357 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2359 * dbus/dbus-errors.c (dbus_result_to_string): add
2362 * dbus/dbus-message-builder.c: new file, will contain code to load
2363 up messages from files. Not implemented yet.
2365 2003-01-26 Havoc Pennington <hp@pobox.com>
2367 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2368 the sender by setting to NULL
2370 2003-01-26 Havoc Pennington <hp@pobox.com>
2372 The unit tests pass, but otherwise untested. If it breaks, the
2373 tests should have been better. ;-)
2375 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2378 * dbus/dbus-message.c: redo everything so we maintain
2379 message->header as the only copy of the various fields.
2380 This avoids the possibility of out-of-memory in some cases,
2381 for example dbus_message_lock() can't run out of memory anymore,
2382 and avoids extra copying. Figured I may as well go ahead and do
2383 this since it was busted for dbus_message_lock to not return
2384 failure on OOM, and dbus_message_write_header was totally
2385 unchecked for OOM. Also fixed some random other bugs.
2387 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2388 that strings are nul-terminated. Also, end_pos can be equal
2389 to string length just not greater than, I think.
2390 (_dbus_marshal_set_int32): new function
2391 (_dbus_marshal_set_uint32): new function
2392 (_dbus_marshal_set_string): new function
2394 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2395 a warning, init timeout_list to NULL
2396 (dbus_connection_send_message): don't use uninitialized variable
2399 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2401 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2403 * bus/driver.c: (bus_driver_handle_hello),
2404 (bus_driver_send_welcome_message):
2407 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2409 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2410 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2411 (dbus_connection_unref):
2412 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2413 * dbus/dbus-message.c: (dbus_message_unref),
2416 (dbus_message_get_fields):
2417 Remove debugging printout.
2419 (_dbus_message_loader_return_buffer):
2420 Don't store the header string.
2422 (_dbus_message_test):
2425 2003-01-26 Richard Hult <rhult@codefactory.se>
2427 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2428 the file descriptor list, since it can change under us.
2430 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2432 * glib/dbus-gmain.c: (dbus_connection_prepare),
2433 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2434 (remove_watch), (dbus_connection_hookup_with_g_main):
2435 Rewrite the glib handling to use its own GSource instead of a
2436 GIOChannel so we can catch messages put in the queue while waiting
2439 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2442 * bus/connection.c: (connection_disconnect_handler),
2443 (connection_watch_callback), (bus_connection_setup):
2444 * bus/dispatch.c: (send_one_message),
2445 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2446 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2448 * bus/driver.c: (bus_driver_send_service_deleted),
2449 (bus_driver_send_service_created), (bus_driver_handle_hello),
2450 (bus_driver_send_welcome_message),
2451 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2452 (bus_driver_handle_message):
2454 Refactor code, put the message dispatching in its own file. Use
2455 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2458 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2460 * dbus/dbus-internals.h:
2461 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2463 * dbus/dbus-message.c: (dbus_message_get_sender):
2464 * dbus/dbus-message.h:
2465 Implement dbus_message_get_sender.
2467 * dbus/dbus-protocol.h:
2468 Add message and service defines.
2470 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2472 * dbus/dbus-connection.c: (dbus_connection_send_message):
2473 * dbus/dbus-message-internal.h:
2474 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2475 (dbus_message_write_header):
2476 Remove _dbus_messag_unlock and don't set the client serial on a
2477 message if one already exists.
2479 2003-01-24 Havoc Pennington <hp@pobox.com>
2481 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2484 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2487 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2489 * dbus/dbus-list.c: (alloc_link), (free_link):
2490 Use a memory pool for the links.
2492 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2494 * bus/connection.c: (bus_connection_foreach):
2496 Add new bus_connection_foreach function.
2498 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2499 Add function that broadcasts a message to all clients.
2501 (bus_driver_send_service_created), (bus_driver_handle_hello),
2502 (bus_driver_send_welcome_message),
2503 (bus_driver_handle_list_services), (bus_driver_message_handler):
2504 Implement functions that take care of listing services, and notifying
2505 clients when new services are created.
2507 * bus/services.c: (bus_services_list):
2509 Add new function that returns an array of strings with the currently
2510 registered services.
2513 * glib/dbus-gmain.c:
2514 Update copyright year.
2516 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2518 * dbus/dbus-connection.c: (dbus_connection_send_message):
2519 Unlock the message in case it was sent earlier.
2521 (dbus_connection_send_message_with_reply_and_block):
2522 Remove the reply message from the list.
2524 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2525 Set array_len and new_pos correctly.
2527 (_dbus_marshal_test):
2528 Remove debug output.
2530 * dbus/dbus-message-internal.h:
2531 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2532 New function that returns the reply serial.
2534 (_dbus_message_unlock):
2535 New function that unlocks a message and resets its header.
2537 (dbus_message_append_string_array),
2538 (dbus_message_get_fields_valist),
2539 (dbus_message_iter_get_field_type),
2540 (dbus_message_iter_get_string_array),
2541 (dbus_message_get_fields),
2542 (dbus_message_append_fields_valist):
2543 Handle string arrays.
2545 (dbus_message_set_sender):
2546 Make this function public since the bus daemon needs it.
2548 (decode_header_data):
2549 Set the reply serial to -1 initially.
2551 * dbus/dbus-message.h:
2552 Add dbus_message_set_sender.
2554 2003-01-24 Havoc Pennington <hp@pobox.com>
2556 * doc/dbus-specification.sgml: add some stuff
2558 2003-01-22 Havoc Pennington <hp@pobox.com>
2560 * doc/dbus-specification.sgml: Start to document the protocol.
2562 2003-01-22 Havoc Pennington <hp@pobox.com>
2564 * dbus/dbus-connection.c
2565 (dbus_connection_send_message_with_reply_and_block): add some @todo
2567 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2569 2003-01-21 Havoc Pennington <hp@pobox.com>
2571 (patch untested because can't compile)
2573 * bus/driver.c (create_unique_client_name): make this function
2574 never recycle client names. Also, caller should initialize
2577 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2579 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2581 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2582 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2583 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2584 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2585 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2586 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2587 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2588 * dbus/dbus-marshal.h:
2589 * dbus/dbus-protocol.h:
2590 Add support for marshalling and demarshalling integer, double
2593 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2598 * bus/connection.c: (connection_disconnect_handler):
2599 Remove the connection from the bus driver's list.
2601 (connection_watch_callback): Dispatch messages.
2603 (free_connection_data): Free connection name.
2605 (bus_connection_setup): Add connection to the bus driver's list.
2606 (bus_connection_remove_owned_service):
2607 (bus_connection_set_name), (bus_connection_get_name):
2608 Add functions for setting and getting the connection's name.
2611 Add function headers.
2613 * bus/driver.c: (create_unique_client_name),
2614 (bus_driver_handle_hello_message),
2615 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2616 (bus_driver_add_connection), (bus_driver_remove_connection):
2619 * bus/services.c: (bus_service_free):
2621 New file that handles communication and registreation with the bus
2624 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2626 * dbus/dbus-connection.c: (dbus_connection_send_message):
2627 Add a new client_serial parameter.
2629 (dbus_connection_send_message_with_reply):
2630 Remove a @todo since we've implemented the blocking function.
2632 (dbus_connection_send_message_with_reply_and_block):
2633 New function that sends a message and waits for a reply and
2634 then returns the reply.
2636 * dbus/dbus-connection.h:
2639 * dbus/dbus-errors.c: (dbus_result_to_string):
2640 * dbus/dbus-errors.h:
2641 Add new DBUS_RESULT.
2643 * dbus/dbus-message-internal.h:
2644 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2645 (_dbus_message_set_sender), (dbus_message_write_header),
2646 (dbus_message_new_reply), (decode_header_data),
2647 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2648 * dbus/dbus-message.h:
2649 Add new functions that set the reply serial and sender.
2650 Also marshal and demarshal them correctly and add test.
2652 * dbus/dbus-protocol.h:
2653 Add new DBUS_MESSAGE_TYPE_SENDER.
2656 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2657 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2658 (dbus_connection_hookup_with_g_main):
2659 * glib/test-dbus-glib.c: (main):
2660 Rewrite to use GIOChannel and remove the GSource crack.
2662 * test/echo-client.c: (main):
2663 * test/watch.c: (check_messages):
2664 Update for changed APIs
2666 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2668 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2670 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2671 Create a DBusTimeoutList.
2672 (dbus_connection_set_timeout_functions): Add new function to
2673 set timeout callbacks
2675 * dbus/dbus-connection.h: Add public DBusTimeout API.
2677 * dbus/dbus-message.c: (dbus_message_get_service):
2678 * dbus/dbus-message.h: New function.
2680 * dbus/dbus-server.c: Fix small doc typo.
2682 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2684 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2686 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2687 of the string, just as long as specified.
2689 2003-01-19 Havoc Pennington <hp@pobox.com>
2691 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2694 * dbus/dbus-server.c (dbus_server_set_max_connections)
2695 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2696 keep track of current number of connections, and add API for
2697 setting a max (but haven't implemented enforcing the max yet)
2699 2003-01-18 Havoc Pennington <hp@pobox.com>
2701 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2702 reading/writing if read_watch != NULL or write_watch != NULL.
2704 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2705 the message loader code to actually load message->header and
2706 message->body into the newly-created message.
2708 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2711 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2712 (dbus_connection_get_max_message_size)
2713 (dbus_connection_set_max_live_messages_size)
2714 (dbus_connection_get_max_live_messages_size): implement some
2715 resource limitation functions
2717 * dbus/dbus-resources.c: new file implementing some of the
2718 resource limits stuff
2720 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2721 missing docs, add @todo to handle OOM etc.
2723 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2726 2003-01-18 Havoc Pennington <hp@pobox.com>
2728 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2729 connection if it hasn't been already.
2731 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2732 replace with DisconnectFunction.
2734 2003-01-18 Havoc Pennington <hp@pobox.com>
2736 Building --disable-verbose-mode --disable-asserts --disable-tests
2737 cuts the library from 112K to 45K or so
2739 * configure.in: check for varargs macro support,
2740 add --enable-verbose-mode, --enable-asserts.
2742 * dbus/dbus-internals.h (_dbus_assert): support
2744 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2746 2003-01-18 Havoc Pennington <hp@pobox.com>
2748 * dbus/dbus-test.c: include config.h so that tests actually run
2750 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2751 so the failure mode when that assumption fails will be plenty
2754 2003-01-18 Havoc Pennington <hp@pobox.com>
2756 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2758 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2761 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2762 since we don't want to use those in make check
2764 2003-01-15 Havoc Pennington <hp@redhat.com>
2770 2003-01-15 Havoc Pennington <hp@redhat.com>
2772 * test/Makefile.am: fix so that test source code ends up in the
2773 distribution on make distcheck
2775 2003-01-15 Havoc Pennington <hp@redhat.com>
2781 2003-01-15 Havoc Pennington <hp@redhat.com>
2783 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2784 fix build when --disable-tests
2786 * Makefile.am (EXTRA_DIST): put HACKING in here
2788 * HACKING: document procedure for making a tarball release.
2790 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2792 * bus/connection.c: (connection_error_handler),
2793 (bus_connection_setup):
2794 * bus/main.c: (main):
2795 Make sure that the DBusConnectionData struct is NULLed
2796 out to prevent a segfault.
2798 * dbus/dbus-errors.c: (dbus_result_to_string):
2799 * dbus/dbus-errors.h:
2800 * dbus/dbus-message.c: (dbus_message_get_fields),
2801 (dbus_message_get_fields_valist), (_dbus_message_test):
2802 * dbus/dbus-message.h:
2803 Make dbus_message_get_fields return a result code so we can
2804 track invalid fields as well as oom.
2806 2003-01-11 Havoc Pennington <hp@pobox.com>
2808 * configure.in: change --enable-test/--enable-ansi action-if-given
2809 to enable_foo=$enableval instead of enable_foo=yes
2811 2003-01-08 Havoc Pennington <hp@pobox.com>
2813 * dbus/dbus-string.c (_dbus_string_align_length): new function
2815 * dbus/dbus-test-main.c: move main() for test app here
2817 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2818 symbol to run tests, because dbus-test isn't in the main
2821 Code review nitpicks.
2823 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2824 for people with narrow emacs ;-). Assert client_serial was filled
2825 in. Assert message->name != NULL.
2826 (dbus_message_append_fields): have "first_field_type" arg separate
2827 from va list, needed for C++ binding that also uses varargs IIRC
2828 and helps with type safety
2829 (dbus_message_new): add @todo about using DBusString to store
2830 service/name internally
2831 (dbus_message_new): don't leak ->service and ->name on OOM later
2833 (dbus_message_unref): free the service name
2834 (dbus_message_get_fields): same change to varargs
2835 i.e. first_field_type
2836 (_dbus_message_loader_return_buffer): assert that the message data
2837 is aligned (if not it's a bug in our code). Put in verbose griping
2838 about why we set corrupted = TRUE.
2839 (decode_header_data): add FIXME that char* is evil. Was going to
2840 add FIXME about evil locale-specific string.h strncmp, but just
2841 switched to wacky string-as-uint32 optimization. Move check for
2842 "no room for field name" above get_const_data_len() to avoid
2843 assertion failure in get_const_data_len if we have trailing 2
2844 bytes or the like. Check for service and name fields being
2845 provided twice. Don't leak service/name on error. Require field
2846 names to be aligned to 4 bytes.
2848 * dbus/dbus-marshal.c: move byte swap stuff to header
2849 (_dbus_pack_int32): uscore-prefix
2850 (_dbus_unpack_int32): uscore-prefix
2851 (_dbus_unpack_uint32): export
2852 (_dbus_demarshal_string): add @todo complaining about use of
2854 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2855 handling allowing corrupt data to go unchecked
2857 2003-01-08 Havoc Pennington <hp@redhat.com>
2859 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2860 to the select() as needed for authentication. (should be using
2861 _dbus_poll() not select, but for another day)
2863 * dbus/dbus.h: include dbus/dbus-protocol.h
2865 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2867 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2870 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2872 * dbus/dbus-internals.c: (_dbus_type_to_string):
2873 New function that returns a string describing a type.
2875 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2876 * dbus/dbus-marshal.h:
2877 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2878 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2879 (dbus_message_iter_get_byte_array):
2880 * dbus/dbus-message.h:
2881 Add new convenience functions for appending and getting message fields.
2882 Also add demarshalling routines for byte arrays.
2884 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2886 * dbus/dbus-connection-internal.h:
2887 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2888 (_dbus_connection_get_next_client_serial),
2889 (dbus_connection_send_message):
2890 * dbus/dbus-internals.h:
2891 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2892 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2893 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2894 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2895 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2896 (_dbus_verbose_bytes), (_dbus_marshal_test):
2897 * dbus/dbus-marshal.h:
2898 * dbus/dbus-message-internal.h:
2899 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2900 (dbus_message_write_header), (_dbus_message_lock),
2901 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2902 (dbus_message_get_name), (dbus_message_append_int32),
2903 (dbus_message_append_uint32), (dbus_message_append_double),
2904 (dbus_message_append_string), (dbus_message_append_byte_array),
2905 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2906 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2907 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2908 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2909 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2910 (decode_header_data), (_dbus_message_loader_return_buffer),
2911 (message_iter_test), (_dbus_message_test):
2912 * dbus/dbus-message.h:
2913 * dbus/dbus-protocol.h:
2914 * dbus/dbus-test.c: (main):
2916 * glib/test-dbus-glib.c: (message_handler), (main):
2917 * test/echo-client.c: (main):
2918 * test/watch.c: (check_messages):
2919 Make messages sendable and receivable for real.
2921 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2923 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2924 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2925 * dbus/dbus-message.c: (dbus_message_append_int32),
2926 (dbus_message_append_uint32), (dbus_message_append_double),
2927 (dbus_message_append_string), (dbus_message_append_byte_array):
2928 Handle OOM restoration.
2930 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2932 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2933 (_dbus_demarshal_string), (_dbus_marshal_test):
2934 * dbus/dbus-marshal.h:
2935 * dbus/dbus-message.c: (dbus_message_get_name),
2936 Document these functions.
2938 (dbus_message_append_int32), (dbus_message_append_uint32),
2939 (dbus_message_append_double), (dbus_message_append_string),
2940 (dbus_message_append_byte_array):
2941 * dbus/dbus-message.h:
2942 Add functions for adding message fields of different types.
2944 * dbus/dbus-protocol.h:
2945 Add the different types.
2947 2003-01-05 Havoc Pennington <hp@pobox.com>
2949 * bus/connection.c: implement routines for handling connections,
2950 first thing is keeping a list of owned services on each connection
2951 and setting up watches etc.
2953 * bus/services.c: implement a mapping from service names to lists
2956 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2958 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2959 to use static mutexes for global data
2961 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2962 collection of functions to set/get application-specific data
2963 on the DBusConnection.
2965 2003-01-04 Havoc Pennington <hp@pobox.com>
2967 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2968 (_dbus_poll): new function
2970 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2973 * bus/loop.c: initial code for the daemon main loop
2975 2003-01-04 Havoc Pennington <hp@pobox.com>
2977 * test/watch.c (error_handler): make it safe if the error handler
2978 is called multiple times (if we s/error handler/disconnect
2979 handler/ we should just guarantee it's called only once)
2981 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2982 error handler on disconnect (it's quite possible we should
2983 just change the error handler to a "disconnect handler," I'm
2984 not sure we have any other meaningful errors)
2986 * configure.in: check for getpwnam_r
2988 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2989 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2990 mechanism as in SASL spec, using socket credentials
2992 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2993 (_dbus_send_credentials_unix_socket): new function
2995 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2997 (_dbus_write): only check errno if <0 returned
2998 (_dbus_write_two): ditto
3000 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3002 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3003 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3004 (_dbus_marshal_test):
3005 * dbus/dbus-marshal.h:
3006 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3007 to _dbus_marshal_utf8_string. Also fix some tests.
3009 2002-12-28 Harri Porten <porten@kde.org>
3011 * configure.in: added check for C++ compiler and a very cheesy
3012 check for the Qt integration
3014 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3016 * qt/Makefile.am: added
3018 * qt/.cvsignore: added
3020 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3021 latter, added #ifdef QT_THREAD_SUPPORT guard.
3023 * dbus/Makefile.am: added missing headers for make dist
3025 2002-12-28 Kristian Rietveld <kris@gtk.org>
3027 * dbus/Makefile.am: fixup export-symbols-regex.
3029 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3031 * acinclude.m4: Add this file and put the
3032 PKG_CHECK_MODULE macro in it.
3034 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3036 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3037 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3038 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3039 (_dbus_marshal_test):
3040 Make the demarshalling routines align the pos argument.
3041 Add string marshalling tests and fix the obvious bugs
3044 2002-12-26 Havoc Pennington <hp@pobox.com>
3046 * dbus/dbus-auth.c: fixes fixes fixes
3048 * dbus/dbus-transport-unix.c: wire up support for
3049 encoding/decoding data on the wire
3051 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3052 (_dbus_auth_decode_data): append to target string
3053 instead of nuking it.
3055 2002-12-26 Havoc Pennington <hp@pobox.com>
3057 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3058 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3061 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3062 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3063 now). Main point is because I wanted unpack_uint32 to implement
3065 (_dbus_verbose_bytes): new function
3067 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3069 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3070 mechanism to handle a corrupt message stream
3071 (_dbus_message_loader_new): fix preallocation to only prealloc,
3074 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3075 (_dbus_string_test): enhance tests for copy/move and fix the
3078 * dbus/dbus-transport-unix.c: Hold references in more places to
3079 avoid reentrancy problems
3081 * dbus/dbus-transport.c: ditto
3083 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3084 leak reference count in no-message case
3086 * test/watch.c (do_mainloop): handle adding/removing watches
3087 during iteration over the watches. Also, ref the connection/server
3088 stored on a watch, so we don't try to mangle a destroyed one.
3090 * dbus/dbus-transport-unix.c (do_authentication): perform
3093 * dbus/dbus-auth.c (get_state): add a state
3094 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3095 (_dbus_auth_get_unused_bytes): append the unused bytes
3096 to the passed in string, rather than prepend
3098 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3099 the auth conversation DBusAuth
3101 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3102 (_dbus_transport_new_for_domain_socket): when creating a
3103 transport, pass in whether it's a client-side or server-side
3104 transport so we know which DBusAuth to create
3106 2002-12-03 Havoc Pennington <hp@pobox.com>
3108 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3109 _after_ finalizing the derived members
3110 (unix_connection_set): unref watch if we fail to add it
3112 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3113 transport first, so that the connection owned by the
3114 transport will be valid as the transport finalizes.
3116 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3117 if necessary, and remove watches from the connection.
3119 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3121 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3123 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3124 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3125 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3126 (_dbus_marshal_test):
3127 * dbus/dbus-marshal.h:
3128 Add string marshal functions and have the demarshal functions
3129 return the new position.
3131 2002-12-25 Havoc Pennington <hp@pobox.com>
3133 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3134 it is a simple protocol that just maps directly to SASL.
3136 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3137 initial implementation, not actually used yet.
3139 * dbus/dbus-string.c (_dbus_string_find): new function
3140 (_dbus_string_equal): new function
3141 (_dbus_string_base64_encode): new function
3142 (_dbus_string_base64_decode): new function
3144 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3147 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3148 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3149 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3150 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3151 * dbus/dbus-marshal.h:
3152 * dbus/dbus-protocol.h:
3153 * dbus/dbus-test.c: (main):
3155 Add un-optimized marshalling/demarshalling routines.
3157 2002-12-25 Harri Porten <porten@kde.org>
3159 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3161 2002-12-24 Zack Rusin <zack@kde.org>
3163 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3164 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3167 2002-12-24 Havoc Pennington <hp@pobox.com>
3169 * glib/dbus-gthread.c: fix include
3171 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3172 I think glib API needs to change, though, as you don't
3173 want to use DBusMessageFunction, you want to use the
3174 DBusMessageHandler object. Probably
3175 dbus_connection_open_with_g_main_loop()
3176 and dbus_connection_setup_g_main_loop() or something like that
3177 (but think of better names...) that just create a connection
3178 that has watch/timeout functions etc. already set up.
3180 * dbus/dbus-connection.c
3181 (dbus_connection_send_message_with_reply): new function just to
3182 show how the message handler helps us deal with replies.
3184 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3186 * dbus/dbus-string.c (_dbus_string_test): free a string that
3189 * dbus/dbus-hash.c: use memory pools for the hash entries
3190 (rebuild_table): be more paranoid about overflow, and
3191 shrink table when we can
3192 (_dbus_hash_test): reduce number of sprintfs and write
3193 valid C89. Add tests for case where we grow and then
3194 shrink the hash table.
3196 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3198 * dbus/dbus-connection.c (dbus_connection_register_handler)
3199 (dbus_connection_unregister_handler): new functions
3201 * dbus/dbus-message.c (dbus_message_get_name): new
3203 * dbus/dbus-list.c: fix docs typo
3205 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3206 an object representing a handler for messages.
3208 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3211 * glib/dbus-gthread.c: (dbus_gthread_init):
3212 Don't use the gdbus prefix for public functions.
3214 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3218 Add GLib checks and fixup .pc files
3222 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3223 (gdbus_connection_check), (gdbus_connection_dispatch),
3224 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3225 (dbus_connection_gsource_new):
3226 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3227 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3228 * glib/test-dbus-glib.c: (message_handler), (main):
3231 2002-12-15 Harri Porten <porten@kde.org>
3233 * autogen.sh: check for libtoolize before attempting to use it
3235 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3238 * .cvsignore: ignore more stamp files
3240 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3242 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3243 without make install.
3245 2002-12-15 Havoc Pennington <hp@pobox.com>
3247 * dbus/dbus-threads.c: add thread stubs that a higher library
3248 layer can fill in. e.g. the GLib wrapper might fill them in with
3249 GThread stuff. We still need to use this thread API to
3250 thread-safe-ize the library.
3252 2002-12-12 Havoc Pennington <hp@pobox.com>
3254 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3255 below new interfaces and include fewer system headers.
3257 * dbus/dbus-sysdeps.c (_dbus_read): new function
3258 (_dbus_write): new function
3259 (_dbus_write_two): new function
3260 (_dbus_connect_unix_socket): new function
3261 (_dbus_listen_unix_socket): new function
3263 * dbus/dbus-message-internal.h: change interfaces to use
3266 2002-12-11 Havoc Pennington <hp@pobox.com>
3268 * dbus/dbus-types.h: add dbus_unichar
3270 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3272 * dbus/dbus-connection.c (dbus_connection_send_message): return
3275 * dbus/dbus-transport.c: include dbus-watch.h
3277 * dbus/dbus-connection.c: include dbus-message-internal.h
3279 * HACKING: add file with coding guidelines stuff.
3281 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3282 handling here, for security purposes (as in vsftpd). Not actually
3283 using this class yet.
3285 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3286 system/libc usage here, as in vsftpd, for ease of auditing (and
3287 should also simplify portability). Haven't actually moved all the
3288 system/libc usage into here yet.
3290 2002-11-25 Havoc Pennington <hp@pobox.com>
3292 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3293 always print the first verbose message.
3295 2002-11-24 Havoc Pennington <hp@pobox.com>
3297 * test/echo-client.c, test/echo-server.c: cheesy test
3300 * configure.in (AC_CHECK_FUNCS): check for writev
3302 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3305 * dbus/dbus-list.c (_dbus_list_foreach): new function
3307 * dbus/dbus-internals.c (_dbus_verbose): new function
3309 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3310 representing a server that listens for connections.
3312 * dbus/.cvsignore: create
3314 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3315 public API for reporting errors
3317 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3318 public object representing a connection that
3319 sends/receives messages. (Same object used for
3320 both client and server.)
3322 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3323 Basic abstraction for different kinds of stream
3324 that we might read/write messages from.
3326 2002-11-23 Havoc Pennington <hp@pobox.com>
3328 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3331 * dbus/dbus-test.c (main): add list test, and include
3332 dbus-test.h as intended
3334 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3335 (_dbus_hash_table_remove_int): return value indicates
3336 whether the entry existed to remove
3338 * dbus/dbus-list.c: add linked list utility class,
3341 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3344 2002-11-23 Havoc Pennington <hp@pobox.com>
3346 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3347 DBUS_END_DECLS to nothing, that should fix this once and for all
3349 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3351 * dbus/dbus-message.c, dbus/dbus-hash.c:
3352 add some missing @brief
3354 2002-11-23 Havoc Pennington <hp@pobox.com>
3356 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3357 to avoid confusing Doxygen
3359 * dbus/dbus-hash.c: @} not }@
3361 * dbus/dbus-message.c (struct DBusMessage): split out
3364 2002-11-23 Havoc Pennington <hp@pobox.com>
3366 * configure.in: pile on more warning flags if using gcc
3368 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3369 to document static functions
3371 * configure.in: add summary to end of configure so it
3372 looks nice and attractive
3374 * dbus/dbus-hash.c: finish implementation and write unit
3377 * configure.in: add --enable-tests to enable unit tests
3379 * dbus/dbus-test.c: test program to run unit tests
3380 for all files in dbus/*, initially runs a test for
3383 * dbus/dbus-internals.h: file to hold some internal utility stuff
3385 2002-11-22 Havoc Pennington <hp@redhat.com>
3387 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3388 "ported" away from Tcl
3390 * dbus/dbus-types.h: header for types such as dbus_bool_t
3392 2002-11-22 Havoc Pennington <hp@redhat.com>
3394 * dbus/dbus.h: fixups for doc warnings
3396 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3398 (QUIET): make it quiet so we can see warnings
3400 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3402 2002-11-22 Havoc Pennington <hp@redhat.com>
3404 * Makefile.am: include "Doxyfile" target in all-local
3406 * configure.in: generate the Doxyfile
3408 * Doxyfile.in: move Doxyfile here, so we can use
3409 configure to generate a Doxyfile with the right
3412 2002-11-22 Havoc Pennington <hp@redhat.com>
3414 * dbus/dbus-message.c: move inline docs into .c file
3416 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3417 so all docs are under doc/
3418 (MAN_EXTENSION): generate man pages. Use extension
3419 ".3dbus" which matches ".3qt" on my system,
3420 I guess this is OK, I don't know really.
3421 (FILE_PATTERNS): look for .c files not .h, makes sense
3424 2002-11-22 Havoc Pennington <hp@pobox.com>
3426 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3427 because any app can be a server, and any app can be a client,
3428 the bus is a special kind of server.
3430 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3432 * Doxyfile : adding. Still needs Makefile rules to be generated
3433 automatically (just run "doxygen" in the toplevel dir for now to
3436 * dbus/dbus-message.h : Adding sample docs (javadoc since
3437 resembles gtk-doc a little more)
3439 * dbus/dbus.h : Adding sample docs
3441 2002-11-21 Havoc Pennington <hp@redhat.com>
3443 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3444 so we can allow ourselves to include files directly,
3445 instead of having to use dbus.h
3447 * dbus/dbus.h: fill in
3449 * dbus/dbus-message.h: sketch out a sample header file.
3450 Include griping if you include it directly instead of
3453 * dbus/dbus-macros.h: new file with macros for extern "C",
3454 TRUE/FALSE, NULL, etc.
3456 * doc/file-boilerplate.c: put include guards in here
3458 2002-11-21 Havoc Pennington <hp@redhat.com>
3460 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3462 * COPYING: include the GPL as well, and license code
3463 under both AFL and GPL.
3465 2002-11-21 Havoc Pennington <hp@redhat.com>
3467 * acconfig.h: get rid of this
3469 * autogen.sh (run_configure): add --no-configure option
3471 * configure.in: remove AC_ARG_PROGRAM to make
3472 autoconf complain less. add AC_PREREQ.
3473 add AC_DEFINE third arg.
3475 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3478 Fix references so we can distcheck.
3480 2002-11-21 Havoc Pennington <hp@redhat.com>
3482 * Initial module creation