1 2003-04-02 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
5 (_dbus_string_get_dirname): new
6 (_dbus_sysdeps_test): new
7 (_dbus_directory_open): include dirnames in error messages
9 * bus/config-parser.c: interpret <include> and <includedir> and
10 <servicedir> relative to config file location if the given
11 filename is not absolute.
13 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
15 2003-04-02 Havoc Pennington <hp@redhat.com>
17 * bus/connection.c (bus_transaction_send_error_reply): set sender
18 service for the error, and unref the reply on success
20 * bus/activation.c: convert to use BusTransaction so OOM can be
22 (bus_activation_service_created): set sender of the message
24 2003-04-01 Havoc Pennington <hp@redhat.com>
26 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
27 <includedir> (at least mostly)
29 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
30 first, then the user ID
32 2003-04-01 Havoc Pennington <hp@pobox.com>
34 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
37 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
39 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
41 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
42 socket 0777, and unlink any existing socket.
44 * bus/bus.c (bus_context_new): change our UID/GID and fork if
45 the configuration file so specifies; set up auth mechanism
48 * bus/config-parser.c (bus_config_parser_content): add support
49 for <fork> option and fill in code for <auth>
51 * bus/system.conf.in: add <fork/> to default configuration,
52 and limit auth mechanisms to EXTERNAL
54 * doc/config-file.txt (Elements): add <fork>
56 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
57 (_dbus_change_identity): new function
59 2003-03-31 Havoc Pennington <hp@redhat.com>
61 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
62 (_dbus_listen_unix_socket): fix off-by-one error in null
63 termination spotted by Nalin
65 2003-03-31 Havoc Pennington <hp@redhat.com>
67 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
68 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
69 having a real home directory available.
71 2003-03-31 Havoc Pennington <hp@redhat.com>
73 * bus/Makefile.am (install-data-hook): create /var/run/dbus
75 * bus/messagebus.in: add init script for Red Hat /etc/init.d
77 * configure.in: add support for specifying a style of init script
80 2003-03-31 Havoc Pennington <hp@redhat.com>
82 Fix some annoying DBusString API and fix all affected code.
84 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
86 (_dbus_string_get_data): change to return string instead of using
88 (_dbus_string_get_const_data): ditto
89 (_dbus_string_get_data_len): ditto
90 (_dbus_string_get_const_data_len): ditto
92 2003-03-31 Havoc Pennington <hp@redhat.com>
94 * bus/main.c (main): fix up the command line arguments to be nicer
96 2003-03-31 Havoc Pennington <hp@redhat.com>
98 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
99 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
100 final location that lands in the config file
102 * bus/config-loader-expat.c (bus_config_load): fix type of
105 * doc/TODO: remove TODO item for dbus_bus_get()
107 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
109 2003-03-31 Havoc Pennington <hp@pobox.com>
111 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
112 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
113 argument since they are always client side
115 * dbus/dbus-server.c (dbus_server_get_address): new function
117 * bus/main.c (main): take the configuration file as an argument.
119 * test/data/valid-config-files/debug-allow-all.conf: new file to
120 use with dispatch.c tests for example
122 * bus/test-main.c (main): require test data dir
124 * bus/bus.c (bus_context_new): change this to take a
125 configuration file name as argument
127 * doc/config-file.txt (Elements): add <servicedir>
129 * bus/system.conf, bus/session.conf: new files
131 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
132 well-known socket if none set
134 * configure.in: create system.conf and session.conf
136 2003-03-30 Havoc Pennington <hp@pobox.com>
138 * bus/config-parser.c: hacking
140 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
141 to shut down, since it could cause weirdness with the DBusList
144 * dbus/dbus-list.c (_dbus_list_test): add tests for the
145 link-oriented stack routines
146 (alloc_link): free the mempool if the first alloc from it fails
148 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
150 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
152 (_dbus_string_skip_white): new
154 * doc/config-file.txt (Elements): add <includedir>
156 2003-03-28 Havoc Pennington <hp@pobox.com>
158 * dbus/dbus-string.c (_dbus_string_copy_data_len)
159 (_dbus_string_copy_data): new functions
161 2003-03-28 Anders Carlsson <andersca@codefactory.se>
163 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
167 * dbus/dbus-memory.c:
170 2003-03-28 Havoc Pennington <hp@pobox.com>
172 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
173 I think it may have just been superstition. Not sure.
175 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
176 failures that were not being handled.
178 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
180 * dbus/dbus-memory.c: add ability to set number of mallocs in a
181 row that will fail on out-of-memory.
183 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
184 function for testing out-of-memory handling.
186 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
187 allocation functions, they do map exactly to the expat ones.
189 2003-03-27 Havoc Pennington <hp@redhat.com>
191 * bus/config-loader-libxml.c (bus_config_load): add another error
194 2003-03-26 Anders Carlsson <andersca@codefactory.se>
197 Add note about automatic service activation.
199 * doc/dbus-specification.sgml:
200 Rename the specification and clarify a few things.
202 2003-03-26 Anders Carlsson <andersca@codefactory.se>
205 * dbus/dbus-address.c:
207 * dbus/dbus-marshal.c:
208 * dbus/dbus-server-debug-pipe.c:
209 * dbus/dbus-transport-unix.c:
210 Fix documentation warnings.
212 2003-03-26 Havoc Pennington <hp@pobox.com>
214 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
215 after every test so it's quick and easy to see which leaked, and
216 so we test multiple dbus_shutdown() calls
218 * configure.in: change configure.in XML stuff to also support
221 * config-loader-libxml.c: some hacking
223 * config-loader-expat.c: some hacking
225 * config-parser.c: some hacking, plus tests
227 2003-03-25 Havoc Pennington <hp@redhat.com>
229 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
231 * configure.in: add --with-xml option to specify XML library,
232 right now only libxml is supported.
234 * bus/config-loader-libxml.c, config-parser.c: sync some minor
235 nonworking code between home and work, still just stubs
237 2003-03-24 Havoc Pennington <hp@redhat.com>
239 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
242 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
243 NULL argument for "message" if the error is a well-known one,
244 fill in a generic message in this case.
246 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
249 * bus/test.c (bus_test_flush_bus): add
251 * bus/policy.c (bus_policy_test): test code stub
253 2003-03-24 Havoc Pennington <hp@pobox.com>
255 * bus/connection.c (bus_connections_setup_connection): set up
256 the "can this user connect" function, but it always returns
257 TRUE until we have a config file parser so we can have a config
258 file that allows connections.
260 2003-03-23 Havoc Pennington <hp@pobox.com>
262 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
263 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
264 the mutex, so we can check for proper memory management
267 * dbus/dbus-dataslot.c: remove the mutex from
268 DBusDataSlotAllocator and lock it manually when using it,
269 to simplify fitting it into the global slots framework.
271 * dbus/dbus-threads.c (init_static_locks): rework how we're
272 handling global locks so they are easily shut down.
274 * bus/policy.c (bus_policy_append_rule): fix
276 * bus/test-main.c (main): check for memleaks
278 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
279 test suite check for memleaks
281 * dbus/dbus-memory.c: add support in test mode for tracking
282 number of outstanding blocks
284 2003-03-23 Havoc Pennington <hp@pobox.com>
286 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
289 * dbus/dbus-hash.h: add ULONG hash keys
291 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
292 (_dbus_get_group_id): new function
294 2003-03-20 Havoc Pennington <hp@redhat.com>
296 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
298 (dbus_connection_get_unix_user): new function
300 2003-03-20 Havoc Pennington <hp@pobox.com>
302 * bus/connection.c (bus_connection_send_oom_error): assert that
304 (connection_execute_transaction): ditto
305 (bus_connection_preallocate_oom_error): fix to set the sender, and
306 set recipient to the destination service, not the bus driver
308 * bus/policy.c: hacking
310 * dbus/dbus-message.c (dbus_message_service_is): new function
311 (dbus_message_sender_is): new
313 2003-03-19 Havoc Pennington <hp@redhat.com>
315 * bus/policy.c: start sketching code for policy restrictions on
316 what connections can do.
318 2003-03-18 Havoc Pennington <hp@redhat.com>
320 * doc/TODO: some notes on high-level todo items. Little nitpick
321 stuff is all in @todo, so no need to add it here.
323 * doc/config-file.txt: some notes on how config file might look
325 2003-03-18 Anders Carlsson <andersca@codefactory.se>
331 2003-03-17 Havoc Pennington <hp@redhat.com>
333 * dbus/dbus-internals.h: add gcc attributes so that
334 our printf-style functions warn on bad arguments to
337 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
340 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
343 2003-03-17 Havoc Pennington <hp@redhat.com>
345 * bus/test-main.c (main): make it print something as it runs
346 so make check doesn't look stuck
348 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
349 from CVS, now obsolete
351 2003-03-17 Anders Carlsson <andersca@codefactory.se>
353 * bus/dispatch.c: (bus_dispatch):
354 Refetch the service name since it may have been reallocated
355 when dbus_message_set_sender was called.
357 * dbus/dbus-sysdeps.c: (_dbus_accept):
358 Add address and address length variables and use them to stop
359 valgrind from complaining.
361 2003-03-17 Havoc Pennington <hp@pobox.com>
363 All tests pass, no memleaks, no valgrind complaints.
365 * bus/test.c: refcount handler_slot
367 * bus/connection.c (bus_connections_new): refcount
370 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
371 bytes so that auth scripts pass.
373 * bus/dispatch.c: init message_handler_slot so it gets allocated
376 * bus/dispatch.c (message_handler_slot_ref): fix memleak
378 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
379 dealloc server_pipe_hash when no longer used for benefit of
382 * dbus/dbus-auth.c (process_command): memleak fix
384 * bus/dispatch.c (check_hello_message): memleak fix
386 2003-03-16 Havoc Pennington <hp@pobox.com>
388 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
390 2003-03-17 Anders Carlsson <andersca@codefactory.se>
392 * bus/activation.c (bus_activation_activate_service): Append
393 the pending activation entry to the list of pending activations.
395 2003-03-16 Havoc Pennington <hp@pobox.com>
397 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
400 * dbus/dbus-address.c (create_entry): fix OOM handling when
401 failing to alloc entry->method
403 2003-03-16 Havoc Pennington <hp@pobox.com>
405 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
408 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
409 add some missing dbus_set_result
411 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
412 alloc the DBusMessageHandler
414 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
415 the transport here, since we call this from the finalizer; it
416 resulted in a double-finalize.
418 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
419 where we tried to use transport->connection that was NULL,
420 happened when transport was disconnected early on due to OOM
422 * bus/*.c: adapt to handle OOM for watches/timeouts
424 * dbus/dbus-transport-unix.c: port to handle OOM during
427 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
428 reference to unused bytes instead of a copy
430 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
433 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
436 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
439 2003-03-16 Anders Carlsson <andersca@codefactory.se>
441 * doc/dbus-specification.sgml:
442 Document reply message for ActivateService.
444 2003-03-16 Anders Carlsson <andersca@codefactory.se>
446 * bus/activation.c: (bus_pending_activation_entry_free),
447 (bus_pending_activation_free), (bus_activation_new),
448 (bus_activation_unref), (bus_activation_service_created),
449 (bus_activation_activate_service):
451 * bus/bus.c: (bus_context_new):
452 * bus/desktop-file.c: (new_section):
453 * bus/driver.c: (bus_driver_send_service_deleted),
454 (bus_driver_handle_activate_service):
455 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
457 * dbus/dbus-connection.c:
458 (dbus_connection_send_with_reply_and_block):
459 * dbus/dbus-message.c: (dbus_message_append_args_valist):
460 * dbus/dbus-protocol.h:
461 Make activation work better. Now pending activations will be queued
462 and the daemon won't try to activate services that are already registered.
464 2003-03-16 Havoc Pennington <hp@pobox.com>
466 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
469 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
470 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
472 2003-03-16 Havoc Pennington <hp@pobox.com>
474 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
475 this. always run the test suite before commit...
477 * bus/*: adapt to DBusConnection API changes
479 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
480 requires renaming stuff to avoid dbus_connection_dispatch name
483 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
486 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
487 separate from _dbus_message_loader_return_buffer()
489 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
490 this, because it's now always broken to use; the number of
491 messages in queue vs. the number still buffered by the message
492 loader is undefined/meaningless. Should use
493 dbus_connection_get_dispatch_state().
494 (dbus_connection_dispatch): rename from
495 dbus_connection_dispatch_message
497 2003-03-16 Havoc Pennington <hp@pobox.com>
499 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
502 2003-03-16 Anders Carlsson <andersca@codefactory.se>
504 * dbus/dbus-connection.c:
505 (dbus_connection_send_with_reply_and_block):
506 Decrease connection->n_incoming when removing an entry
508 * dbus/dbus-dict.c: (dbus_dict_entry_free),
509 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
510 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
511 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
512 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
513 (dbus_dict_get_byte_array):
514 Handle NULL arrays and strings. Also add support for byte arrays.
516 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
517 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
518 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
519 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
520 (_dbus_demarshal_dict), (demarshal_and_validate_len),
521 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
522 * dbus/dbus-marshal.h:
523 Add support for marshalling and demarshalling empty arrays and strings.
525 * dbus/dbus-message.c: (dbus_message_append_args_valist),
526 (dbus_message_append_string_array),
527 (dbus_message_iter_get_boolean),
528 (dbus_message_iter_get_boolean_array),
529 (dbus_message_iter_get_int32_array),
530 (dbus_message_iter_get_uint32_array),
531 (dbus_message_iter_get_double_array),
532 (dbus_message_iter_get_byte_array),
533 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
534 (check_message_handling):
535 Add support for getting empty arrays and dicts.
537 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
538 Don't do any validation at all for now, that's better than just checking
541 * test/data/valid-messages/emptiness.message:
542 New test message with lots of empty arrays.
544 2003-03-16 Havoc Pennington <hp@pobox.com>
546 * dbus/dbus-connection.c
547 (_dbus_connection_queue_received_message_link): new function that
548 can't fail due to OOM
550 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
551 new function pops a message together with a list link
554 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
555 message queuing functions to avoid needing to alloc memory
557 2003-03-16 Havoc Pennington <hp@pobox.com>
559 Oops - test code was only testing failure of around 30 of the
560 mallocs in the test path, but it turns out there are 500+
561 mallocs. I believe this was due to misguided linking setup such
562 that there was one copy of dbus_malloc etc. in the daemon and one
563 in the shared lib, and only daemon mallocs were tested. In any
564 case, the test case now tests all 500+ mallocs, and doesn't pass
565 yet, though there are lots of fixes in this patch.
567 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
568 this so that it doesn't need to allocate memory, since it
569 has no way of indicating failure due to OOM (and would be
572 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
574 * bus/Makefile.am: rearrange to create two self-contained
575 libraries, to avoid having libraries with overlapping symbols.
576 that was resulting in weirdness, e.g. I'm pretty sure there
577 were two copies of global static variables.
579 * dbus/dbus-internals.c: move the malloc debug stuff to
582 * dbus/dbus-list.c (free_link): free list mempool if it becomes
585 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
587 * dbus/dbus-address.c (dbus_parse_address): free list nodes
590 * bus/dispatch.c (bus_dispatch_add_connection): free
591 message_handler_slot when no longer using it, so
592 memory leak checkers are happy for the test suite.
594 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
596 * bus/bus.c (new_connection_callback): disconnect in here if
597 bus_connections_setup_connection fails.
599 * bus/connection.c (bus_connections_unref): fix to free the
601 (bus_connections_setup_connection): if this fails, don't
602 disconnect the connection, just be sure there are no side
605 * dbus/dbus-string.c (undo_alignment): unbreak this
607 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
609 (_dbus_auth_new): fix the order in which we free strings
612 * bus/connection.c (bus_connection_disconnected): fix to
613 not send ServiceDeleted multiple times in case of memory
616 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
617 get the base service name
618 (dbus_bus_register_client): don't return base service name,
619 instead store it on the DBusConnection and have an accessor
621 (dbus_bus_register_client): rename dbus_bus_register()
623 * bus/dispatch.c (check_hello_message): verify that other
624 connections on the bus also got the correct results, not
625 just the one sending hello
627 2003-03-15 Havoc Pennington <hp@pobox.com>
629 Make it pass the Hello handling test including all OOM codepaths.
630 Now to do other messages...
632 * bus/services.c (bus_service_remove_owner): fix crash when
633 removing owner from an empty list of owners
634 (bus_registry_ensure): don't leave service in the list of
635 a connection's owned services if we fail to put the service
638 * bus/connection.c (bus_connection_preallocate_oom_error): set
639 error flag on the OOM error.
641 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
642 handle _dbus_transport_set_connection failure
644 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
645 to create watches up front and simply enable/disable them as
647 (unix_connection_set): this can now fail on OOM
649 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
650 of enabling/disabling a watch or timeout.
652 * bus/loop.c (bus_loop_iterate): don't touch disabled
655 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
657 2003-03-15 Havoc Pennington <hp@pobox.com>
659 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
660 write useful test code, after all that futzing around ;-)
662 Test does not yet pass because we can't handle OOM in
663 _dbus_transport_messages_pending (basically,
664 dbus_connection_preallocate_send() does not prealloc the write
665 watch). To fix this, I think we need to add new stuff to
666 set_watch_functions, namely a SetEnabled function so we can alloc
667 the watch earlier, then enable it later.
669 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
670 dbus-memory.c to the convenience lib
672 * bus/test.c: rename some static functions to keep them clearly
673 distinct from stuff in connection.c. Handle client disconnection.
675 2003-03-14 Havoc Pennington <hp@pobox.com>
677 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
678 transport, tests more of the real codepath. Set up clients
679 with bus_setup_debug_client.
681 * bus/test.c (bus_setup_debug_client): function to set up debug
682 "clients" on the main loop
684 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
687 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
690 * dbus/dbus-server-debug.c: support a debug server based on pipes
692 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
693 (_dbus_close): new function
695 * configure.in: check for socketpair
697 2003-03-14 Havoc Pennington <hp@redhat.com>
699 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
702 * dbus/dbus-transport-debug.c: rework this a good bit to be
703 less complicated. hopefully still works.
705 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
708 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
711 * dbus/dbus-message.c (dbus_message_copy): rename from
712 dbus_message_new_from_message, fix it up to copy
713 all the message fields, add test case
715 * bus/dispatch.c (bus_dispatch_test): add some more test code,
716 not quite passing yet
718 2003-03-14 Havoc Pennington <hp@pobox.com>
720 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
721 until no work remains" in test code. (the large diff here
722 is just code movement, no actual changes)
724 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
725 1, no point waiting around for test code.
726 (_dbus_server_debug_accept_transport): unref the timeout
727 after adding it (right?)
729 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
731 2003-03-13 Havoc Pennington <hp@redhat.com>
733 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
736 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
739 * dbus/dbus-connection.h: Make AddWatchFunction and
740 AddTimeoutFunction return a bool so they can fail on out-of-memory
742 * bus/bus.c (bus_context_new): set up timeout handlers
744 * bus/connection.c (bus_connections_setup_connection): set up
747 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
750 * bus/bus.c (bus_context_new): adapt to changes
752 * bus/connection.c: adapt to changes
754 * test/watch.c: adapt to DBusWatch changes
756 * bus/dispatch.c (bus_dispatch_test): started adding this but
759 2003-03-14 Anders Carlsson <andersca@codefactory.se>
761 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
763 2003-03-13 Havoc Pennington <hp@pobox.com>
765 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
766 set up a test framework as for the library
768 2003-03-12 Havoc Pennington <hp@pobox.com>
770 Throughout: purge global variables, introduce BusActivation,
771 BusConnections, BusRegistry, etc. objects instead.
773 * bus/bus.h, bus/bus.c: introduce BusContext as a global
776 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
777 going to redo this a bit differently I think
779 2003-03-12 Havoc Pennington <hp@redhat.com>
781 Mega-patch that gets the message bus daemon initially handling
782 out-of-memory. Work still needed. Also lots of random
783 moving stuff to DBusError instead of ResultCode.
785 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
787 * dbus/dbus-connection.c
788 (dbus_connection_send_with_reply_and_block): use DBusError
790 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
793 * dbus/dbus-connection.c (dbus_connection_send): drop the result
794 code here, as the only failure possible is OOM.
796 * bus/connection.c (bus_connection_disconnect):
797 rename bus_connection_disconnected as it's a notification only
799 * bus/driver.c (bus_driver_handle_acquire_service): don't free
800 "name" on get_args failure, should be done by get_args;
801 don't disconnect client for bad args, just return an error.
802 (bus_driver_handle_service_exists): ditto
804 * bus/services.c (bus_services_list): NULL-terminate returned array
806 * bus/driver.c (bus_driver_send_service_lost)
807 (bus_driver_send_service_acquired): send messages from driver to a
808 specific client to the client's unique name, not to the broadcast
811 * dbus/dbus-message.c (decode_header_data): reject messages that
812 contain no name field
813 (_dbus_message_get_client_serial): rename to
814 dbus_message_get_serial and make public
815 (_dbus_message_set_serial): rename from set_client_serial
816 (_dbus_message_set_reply_serial): make public
817 (_dbus_message_get_reply_serial): make public
819 * bus/connection.c (bus_connection_foreach): allow stopping
820 iteration by returning FALSE from foreach function.
822 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
823 (dbus_connection_free_preallocated_send)
824 (dbus_connection_preallocate_send): new API for sending a message
825 without possibility of malloc failure.
826 (dbus_connection_send_message): rename to just
827 dbus_connection_send (and same for whole function family)
829 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
831 * dbus/dbus-sysdeps.c (_dbus_exit): new function
833 * bus/activation.c: handle/return errors
835 * dbus/dbus-errors.h: add more DBUS_ERROR #define
837 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
838 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
839 (_dbus_result_from_errno): move to this file
841 2003-03-10 Anders Carlsson <andersca@codefactory.se>
843 * dbus/dbus-marshal.c:
844 (_dbus_marshal_set_string):
845 Take a length argument so we can marshal the correct string
848 (_dbus_marshal_dict), (_dbus_demarshal_dict),
849 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
850 (_dbus_marshal_test):
851 * dbus/dbus-marshal.h:
852 Add support for marshalling and demarshalling dicts.
854 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
855 Add support for TYPE DICT.
857 * dbus/dbus-message.c: (set_string_field):
858 Adjust header padding.
860 (dbus_message_append_args_valist), (dbus_message_append_dict),
861 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
862 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
863 (check_message_handling), (check_have_valid_message):
864 * dbus/dbus-message.h:
865 Add functions for setting and getting dicts.
867 * dbus/dbus-protocol.h:
873 * doc/dbus-specification.sgml:
874 Add information about how dicts are marshalled.
876 * test/data/invalid-messages/dict-with-nil-value.message:
877 * test/data/invalid-messages/too-short-dict.message:
878 * test/data/valid-messages/dict-simple.message:
879 * test/data/valid-messages/dict.message:
880 Add sample messages containing dicts.
882 2003-03-08 Anders Carlsson <andersca@codefactory.se>
884 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
886 2003-03-07 Anders Carlsson <andersca@codefactory.se>
889 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
890 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
891 (dbus_dict_set_int32), (dbus_dict_set_uint32),
892 (dbus_dict_set_double), (dbus_dict_set_string),
893 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
894 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
895 (dbus_dict_set_string_array), (_dbus_dict_test):
897 Fix according to comments from Havoc.
899 2003-03-06 Michael Meeks <michael@server.home>
901 * configure.in: if we don't have kde-config, disable have_qt.
903 2003-03-07 Anders Carlsson <andersca@codefactory.se>
908 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
909 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
910 (dbus_dict_remove), (dbus_dict_get_value_type),
911 (dbus_dict_get_keys), (dbus_dict_put_boolean),
912 (dbus_dict_put_int32), (dbus_dict_put_uint32),
913 (dbus_dict_put_double), (dbus_dict_put_string),
914 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
915 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
916 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
917 (dbus_dict_get_int32), (dbus_dict_get_uint32),
918 (dbus_dict_get_double), (dbus_dict_get_string),
919 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
920 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
921 (dbus_dict_get_string_array), (_dbus_dict_test):
923 Add DBusDict implementation
925 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
929 2003-03-04 Havoc Pennington <hp@pobox.com>
931 * test/data/auth/*: adapt to changes
933 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
934 USERID_BASE64 and change USERNAME_BASE64 to put in username not
937 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
938 more stuff from being in a context name, to make the protocol
941 * dbus/dbus-errors.c (dbus_error_has_name): new function
942 (dbus_error_is_set): new function
944 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
945 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
947 * dbus/dbus-connection.c (dbus_connection_flush): also read
948 messages during a flush operation
950 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
952 2003-03-05 Anders Carlsson <andersca@codefactory.se>
954 * configure.in: Check for gethostbyname on Solaris.
956 * dbus/dbus-transport.c: (_dbus_transport_open):
957 Remove duplicate "tcp" entry.
959 * doc/dbus-specification.sgml:
962 2003-03-05 Anders Carlsson <andersca@codefactory.se>
964 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
965 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
966 (_dbus_keyring_test):
967 * dbus/dbus-md5.c: (_dbus_md5_compute):
968 * dbus/dbus-sha.c: (_dbus_sha_compute):
971 2003-03-05 Anders Carlsson <andersca@codefactory.se>
973 * README: Add some things.
975 2003-03-04 Anders Carlsson <andersca@codefactory.se>
977 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
978 after case DBUS_TYPE_BOOELAN.
980 2003-03-02 Havoc Pennington <hp@pobox.com>
982 * test/break-loader.c (randomly_set_extreme_ints): add test that
983 sets really huge and small integers
985 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
986 that length of boolean array fits in the string, and that
987 string has room for boolean value in single-bool case.
989 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
990 optional value to "ALIGN" command which is what to fill the
993 * test/data/valid-messages/no-padding.message: add regression
994 test for the message padding problem
996 2003-03-02 Havoc Pennington <hp@pobox.com>
998 * dbus/dbus-message.c (decode_header_data): fix to always init
999 message_padding, from Benjamin Dauvergne
1001 2003-03-02 Havoc Pennington <hp@pobox.com>
1007 2003-03-01 Joe Shaw <joe@assbarn.com>
1009 * configure.in: Check for "struct cmsgcred" and try to access its
1010 members for BSD-like unices.
1012 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1013 _dbus_read_credentials_unix_socket().
1014 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1015 read() for reading the credential byte off the unix socket. Use
1016 struct cmsgcred on systems that support it.
1018 2003-02-27 Alexander Larsson <alexl@redhat.com>
1022 Make gthreads-2.0 dependency optional. Don't build thread test if
1025 2003-02-27 Havoc Pennington <hp@pobox.com>
1027 * dbus/dbus-connection.c
1028 (dbus_connection_send_message_with_reply_and_block): fix doh!
1029 doh! doh! bug that resulted in never removing a reply from the
1030 queue, no wonder we called get_reply_serial so much ;-)
1032 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1033 and client serial instead of demarshaling them every time
1035 2003-02-27 Havoc Pennington <hp@pobox.com>
1037 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1038 more inlined, using dbus-string-private.h, speeds things up
1041 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1042 when freeing the string
1043 (_dbus_string_steal_data): fix for align offset
1044 (undo_alignment): new function
1046 2003-02-26 Havoc Pennington <hp@redhat.com>
1048 All kinds of audit fixes from Owen, plus initial attempt to
1049 handle unaligned memory returned from malloc.
1051 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1052 leave room for align_offset and nul byte
1053 (fixup_alignment): function to track an align_offset and
1054 ensure real->str is aligned
1055 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1056 to allow a nul byte plus align offset
1057 (_dbus_string_lock): fix overflow issue
1058 (_dbus_string_init_const_len): add assertions on sanity of len,
1059 assign allocated to be ALLOCATION_PADDING larger than len
1060 (set_length): fixup the overflow handling
1061 (_dbus_string_get_data_len): fix overflow in assertion
1062 (open_gap): detect overflow in size of gap to be opened
1063 (_dbus_string_lengthen): add overflow check
1064 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1065 (_dbus_string_append): add overflow check
1066 (_dbus_string_append_unichar): overflow
1067 (_dbus_string_delete): fix overflow in assertion
1068 (_dbus_string_copy_len): overflow in assertion
1069 (_dbus_string_replace_len): overflows in assertions
1070 (_dbus_string_find): change to implement in terms of
1071 _dbus_string_find_to
1072 (_dbus_string_find_to): assorted fixage
1073 (_dbus_string_equal_c_str): assert c_str != NULL,
1074 fix logic so the function works
1075 (_dbus_string_ends_with_c_str): fix overflow thingy
1076 (_dbus_string_base64_encode): overflow fix
1077 (_dbus_string_validate_ascii): overflow
1078 (_dbus_string_validate_nul): overflow
1080 2003-02-26 Havoc Pennington <hp@redhat.com>
1082 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1084 2003-02-26 Alexander Larsson <alexl@redhat.com>
1087 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1089 * dbus/dbus-connection.c:
1090 * dbus/dbus-connection.h:
1091 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1092 Add dbus_connection_set_wakeup_main_function and use it when queueing
1093 incoming and outgoing messages.
1096 * dbus/dbus-dataslot.c:
1097 Threadsafe usage of DBusDataSlotAllocator
1099 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1102 * dbus/dbus-server-unix.c:
1105 * glib/dbus-gmain.c:
1106 Implement the new wakeup functions for glib.
1109 * glib/test-thread-client.c:
1110 * glib/test-thread-server.c:
1111 * glib/test-thread.h:
1112 Initial cut at some thread test code. Not really done yet.
1114 2003-02-26 Havoc Pennington <hp@pobox.com>
1116 * dbus/dbus-connection.c
1117 (dbus_connection_send_message_with_reply_and_block): fix crash
1118 where we ref'd the outgoing message instead of the returned reply
1120 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1121 at the end of this function, so if we didn't need to read for
1122 authentication, we reinstall it for receiving messages
1124 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1125 a NULL sender for peer-to-peer case
1127 * dbus/dbus-transport-unix.c (check_read_watch): handle
1128 !authenticated case correctly
1130 * glib/dbus-gmain.c: add support for DBusServer
1132 * dbus/dbus-server.c: add data slot support
1134 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1135 return values and handle errors
1137 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1140 * Doxyfile.in (INPUT): add glib subdir
1142 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1143 setup_with_g_main instead of hookup_with_g_main; write docs
1145 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1147 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1148 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1149 * dbus/dbus-message.c: (dbus_message_append_boolean),
1150 (dbus_message_append_boolean_array),
1151 (dbus_message_get_args_valist), (_dbus_message_test):
1152 * dbus/dbus-message.h:
1153 * doc/dbus-specification.sgml:
1154 Various fixes as pointed out by Havoc.
1156 * test/data/invalid-messages/bad-boolean-array.message:
1157 * test/data/invalid-messages/bad-boolean.message:
1158 Add invalid boolean value test cases.
1160 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1162 * dbus/dbus-internals.c: (_dbus_type_to_string):
1163 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1164 (_dbus_marshal_validate_arg):
1165 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1166 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1167 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1168 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1169 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1170 (dbus_message_iter_get_double),
1171 (dbus_message_iter_get_boolean_array), (message_iter_test):
1172 * dbus/dbus-message.h:
1173 * dbus/dbus-protocol.h:
1174 * doc/dbus-specification.sgml:
1175 * test/data/valid-messages/lots-of-arguments.message:
1176 Add support for boolean and boolean array types.
1178 2003-02-23 Havoc Pennington <hp@pobox.com>
1180 * dbus/dbus-keyring.c: finish most of this implementation and
1183 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1184 these barf if the error isn't cleared to NULL
1186 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1187 (_dbus_create_directory): new function
1189 * dbus/dbus-errors.c (dbus_set_error): fix warning
1191 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1192 (_dbus_string_hex_decode): new function
1193 (test_hex_roundtrip): test code
1195 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1197 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1199 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1200 the save-to-temp/rename trick to atomically write the new file
1201 (_dbus_string_parse_uint): new function
1203 2003-02-22 Havoc Pennington <hp@pobox.com>
1205 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1207 2003-02-22 Havoc Pennington <hp@pobox.com>
1209 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1210 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1212 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1214 * dbus/test/data/sha-1: add US government test suite for SHA-1
1216 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1218 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1219 Make string arrays NULL-terminated.
1221 * dbus/dbus-memory.c: (dbus_free_string_array):
1222 * dbus/dbus-memory.h:
1223 New function for freeing NULL-terminated string arrays.
1225 * dbus/dbus-message-builder.c: (append_quoted_string),
1226 (_dbus_message_data_load):
1227 Add support for array types.
1229 * dbus/dbus-message.c: (check_message_handling):
1230 Add more types as test cases.
1232 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1233 (_dbus_string_parse_double):
1234 Add the start offset to the end offset.
1236 * test/data/valid-messages/lots-of-arguments.message:
1237 New test message with lots of arguments.
1239 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1241 * dbus/dbus-message.c: (dbus_message_append_nil),
1242 (dbus_message_append_int32), (dbus_message_append_uint32),
1243 (dbus_message_append_double), (dbus_message_append_string),
1244 (dbus_message_append_int32_array),
1245 (dbus_message_append_uint32_array),
1246 (dbus_message_append_double_array),
1247 (dbus_message_append_byte_array),
1248 (dbus_message_append_string_array):
1249 Fix all out-of-memory handling in these functions.
1251 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1253 * dbus/dbus-message.c: (dbus_message_append_nil):
1256 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1258 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1259 (dbus_message_append_nil), (dbus_message_append_int32_array),
1260 (dbus_message_append_uint32_array),
1261 (dbus_message_append_double_array),
1262 (dbus_message_append_byte_array),
1263 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1264 (dbus_message_iter_get_int32_array),
1265 (dbus_message_iter_get_uint32_array),
1266 (dbus_message_iter_get_double_array),
1267 (dbus_message_iter_get_byte_array),
1268 (dbus_message_iter_get_string_array):
1270 * dbus/dbus-message.h:
1271 Add functions for appending and getting arrays.
1273 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1275 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1276 element size at least 8 bytes, fixes mempool tests on
1279 2003-02-20 Alexander Larsson <alexl@redhat.com>
1281 * dbus/dbus-transport-unix.c (unix_do_iteration):
1282 Unlock the connection mutex during a blocking select call.
1283 Add todo about how we need a way to wake up the select.
1285 * dbus/dbus-connection-internal.h:
1286 * dbus/dbus-connection.c:
1287 Add _dbus_connection_lock and _dbus_connection_unlock.
1289 2003-02-19 Havoc Pennington <hp@pobox.com>
1291 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1292 Doxyfile.in, not Doxyfile
1294 * dbus/dbus-keyring.c: do some hacking on this
1296 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1298 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1300 (dbus_set_error): remove dbus_error_init, check for message ==
1301 NULL *before* we sprintf into it, and add @todo about including
1302 system headers in this file
1304 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1306 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1308 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1309 get various bits of user information based on either username
1311 (_dbus_homedir_from_username): new function
1313 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1316 Add check for nonposix getpwnam_r
1318 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1319 Align the pool element size to a sizeof (void *) boundary.
1321 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1322 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1323 General Solaris fixes.
1325 * test/data/valid-messages/simplest-manual.message:
1326 Explicitly state that we want little-endian packing.
1328 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1330 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1332 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1333 Added to create a transport connecting using a tcp/ip socket.
1335 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1336 to a tcp socket at given host and port.
1337 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1340 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1342 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1343 Added to create a server listening on a TCP/IP socket.
1345 2003-02-19 Havoc Pennington <hp@pobox.com>
1347 Throughout: mop up all the Doxygen warnings and undocumented
1350 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1351 to search any paths.
1353 * dbus/dbus-threads.c: move global mutex initializers to
1354 dbus-internals.h, multiple prototypes was confusing doxygen
1355 besides being kind of ugly
1357 * Doxyfile (PREDEFINED): have Doxygen define
1358 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1359 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1360 (do not abuse the feature! it's for stuff like the autogenerated
1361 macros in dbus-md5.c, not just for things you don't feel like
1364 2003-02-18 Havoc Pennington <hp@pobox.com>
1366 * dbus/dbus-string.c (_dbus_string_zero): new function
1368 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1369 wrap it in some dbus-friendly API
1371 * dbus/dbus-types.h: add 16-bit types
1373 2003-02-18 Joe Shaw <joe@assbarn.com>
1375 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1376 credentials from our currently running process.
1377 (get_word): Fix a buglet where we were copying the entire length
1378 instead of relative to our position.
1380 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1381 keys on the stack... it's 640k of data.
1383 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1384 read the credentials byte off the socket, even if we don't have
1386 (_dbus_poll): Implement poll() using select() for systems which
1389 * glib/test-dbus-glib.c (main): Print out an error if no
1390 parameters are given.
1392 * test/data/auth/fallback.auth-script: Added. Tests that a client
1393 can fallback to a secondary auth mechanism if the first fails.
1395 2003-02-18 Havoc Pennington <hp@pobox.com>
1399 2003-02-17 Havoc Pennington <hp@pobox.com>
1401 * doc/dbus-specification.sgml: lots of cosmetic
1402 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1403 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1404 s/server/bus/ (except in authentication section). Add a section
1405 "Message Bus Message Routing"
1407 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1413 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1415 * doc/dbus-specification.sgml:
1416 Specification updates.
1418 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1420 * bus/activation.c: (bus_activation_init), (child_setup),
1421 (bus_activation_activate_service):
1423 * bus/main.c: (main):
1424 Set DBUS_ADDRESS environment variable.
1426 * dbus/dbus-errors.c: (dbus_set_error):
1427 Don't use va_copy since that's a C99 feature.
1429 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1430 (_dbus_spawn_async):
1431 * dbus/dbus-sysdeps.h:
1432 Add child_setup_func to _dbus_spawn_async.
1434 * doc/dbus-specification.sgml:
1435 Update specification.
1437 * test/spawn-test.c: (setup_func), (main):
1440 2003-02-17 Alexander Larsson <alexl@redhat.com>
1442 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1445 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1449 * doc/dbus-test-plan.sgml:
1450 Add test plan document.
1455 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1457 * dbus/dbus-message.c: (decode_header_data),
1458 (_dbus_message_loader_return_buffer):
1459 Set the header padding amount when loading a message.
1461 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1463 * bus/dispatch.c: (send_one_message):
1464 Only send broadcast messages to registered connections.
1466 * dbus/dbus-message.c: (dbus_message_name_is):
1467 * dbus/dbus-message.h:
1468 New convenience function.
1470 * dbus/dbus-transport-debug.c: (do_reading):
1471 Only dispatch one message per run.
1474 * test/bus-test.c: (new_connection_callback), (die),
1475 (test_hello_client1_handler), (test_hello_client2_handler),
1476 (test_hello_replies), (main):
1478 * test/bus-test-loop.[ch]:
1481 2003-02-16 Havoc Pennington <hp@pobox.com>
1483 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1484 backward conditional
1486 2003-02-16 Alexander Larsson <alexl@redhat.com>
1488 * dbus/dbus-connection.c:
1489 Implement sent_message_with_reply. (with_reply_and block is still
1491 Made dispatch_message not lose message if OOM.
1493 * dbus/dbus-errors.h:
1494 Add NoReply error (for reply timeouts).
1496 2003-02-16 Alexander Larsson <alexl@redhat.com>
1498 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1499 Actually free keys and values when destroying hashtable.
1501 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1503 * dbus/dbus-auth.c: (client_try_next_mechanism):
1506 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1507 Return TRUE if there's no thread implementation around.
1509 * glib/dbus-gmain.c: (free_source),
1510 (dbus_connection_hookup_with_g_main):
1511 Make sure to remove the GSource when the connection is finalized.
1513 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1515 * bus/dispatch.c: (bus_dispatch_message_handler):
1516 * dbus/dbus-errors.h:
1517 Return an error if someone tries to send a message to a service
1520 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1522 * bus/activation.c: (load_directory), (bus_activation_init),
1523 (bus_activation_activate_service):
1526 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1527 More work on the activation handling.
1529 * dbus/dbus-errors.h:
1530 Add some error messages
1532 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1533 * dbus/dbus-message.h:
1534 New function that creates an error message.
1536 * dbus/dbus-protocol.h:
1537 Add ACTIVATE_SERVER message.
1539 * dbus/dbus-server-unix.c: (unix_handle_watch),
1540 (_dbus_server_new_for_domain_socket):
1541 Call _dbus_fd_set_close_on_exec.
1543 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1544 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1545 (_dbus_fd_set_close_on_exec):
1546 * dbus/dbus-sysdeps.h:
1547 Add _dbus_fd_set_close_on exec function. Also add function that checks
1548 that all open fds are set to close-on-exec and warns otherwise.
1550 * dbus/dbus-transport-unix.c:
1551 (_dbus_transport_new_for_domain_socket):
1552 Call _dbus_fd_set_close_on_exec.
1554 2003-02-16 Havoc Pennington <hp@pobox.com>
1556 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1557 allow people to avoid setting SIGPIPE to SIG_IGN
1558 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1559 we've been asked not to
1561 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1563 * dbus/dbus-list.c: (_dbus_list_append_link),
1564 (_dbus_list_prepend_link):
1565 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1569 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1572 * bus/activation.c: (bus_activation_entry_free),
1573 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1575 * bus/main.c: (main):
1576 Add simple activation support, doesn't work yet though.
1578 2003-02-15 Zack Rusin <zack@kde.org>
1580 * qt/dbus-qthread.cpp: small casting fix
1582 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1584 * dbus/dbus-errors.c: (dbus_set_error):
1585 * dbus/dbus-errors.h:
1586 Add a few errors and make dbus_set_error void.
1588 * dbus/dbus-sysdeps.c:
1589 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1590 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1591 * dbus/dbus-sysdeps.h:
1592 Add _dbus_spawn_async.
1594 * test/spawn-test.c: (main):
1595 Test for _dbus_spawn_async.
1597 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1599 * dbus/dbus-internals.h:
1600 Fix build without tests.
1602 * dbus/dbus-list.c: (alloc_link):
1603 Fix a segfault when a malloc fails.
1605 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1606 (dbus_malloc0), (dbus_realloc):
1607 Add support for malloc debugging.
1609 2003-02-15 Alexander Larsson <alexl@redhat.com>
1611 * dbus/dbus-threads.c:
1612 * dbus/dbus-threads.h:
1613 Add condvars. Remove static mutext from API.
1614 Implement static mutexes by initializing them from threads_init.
1616 * glib/dbus-gthread.c:
1617 * qt/dbus-qthread.cpp:
1618 Update with the thread api changes.
1623 Turn StaticMutex into normal mutex + init function.
1624 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1625 _dbus_list_append_link, _dbus_list_prepend_link
1628 * dbus/dbus-sysdeps.c:
1629 * dbus/dbus-sysdeps.h:
1630 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1631 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1633 * dbus/dbus-protocol.h:
1634 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1636 * dbus/dbus-message.c:
1637 Make ref/unref atomic.
1640 * dbus/dbus-connection-internal.h:
1641 * dbus/dbus-connection.c:
1642 * dbus/dbus-connection.h:
1644 Change _peek to _borrow,_return & _steal_borrowed.
1645 Change disconnect callback to event.
1646 Make dbus_connection_dispatch_messages reentrant.
1648 * dbus/dbus-transport.c:
1649 Don't ref the connection on calls to the transport
1652 * dbus/dbus-message-handler.c:
1655 * glib/dbus-gmain.c:
1656 Don't use peek_message anymore
1659 * test/debug-thread.c:
1660 * test/debug-thread.h:
1661 Simple thread implementation that asserts() on deadlocks in
1662 single-threaded code.
1665 (main) Call debug_threads_init.
1668 Use disconnect message instead of disconnect callback.
1672 Don't call dbus_connection_set_disconnect_function. Instead export
1673 bus_connection_disconnect.
1676 Call bus_connection_disconnect when we get a disconnected message.
1678 2003-02-15 Havoc Pennington <hp@pobox.com>
1680 * dbus/dbus-message.c (dbus_message_new): fool around with the
1683 2003-02-14 Havoc Pennington <hp@pobox.com>
1685 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1687 * dbus/dbus-memory.c: fail if the debug functions indicate we
1690 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1691 (_dbus_decrement_fail_alloc_counter): debug functions to
1692 simulate memory allocation failures
1694 2003-02-14 Havoc Pennington <hp@pobox.com>
1696 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1699 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1701 * bus/driver.c: (bus_driver_handle_hello):
1703 * bus/services.c: (bus_service_lookup):
1704 Reorder message sending so we get a more sane order.
1706 * test/bus-test.c: (message_handler):
1709 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1711 * bus/driver.c: (bus_driver_send_service_deleted),
1712 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1713 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1714 (bus_driver_send_welcome_message),
1715 (bus_driver_handle_list_services),
1716 (bus_driver_handle_acquire_service),
1717 (bus_driver_handle_service_exists):
1718 * dbus/dbus-bus.c: (dbus_bus_register_client),
1719 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1720 * dbus/dbus-errors.c: (dbus_result_to_string):
1721 * dbus/dbus-errors.h:
1722 * dbus/dbus-message.c: (dbus_message_append_args),
1723 (dbus_message_append_args_valist), (dbus_message_get_args),
1724 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1725 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1726 (dbus_message_iter_get_byte_array),
1727 (dbus_message_iter_get_string_array), (message_iter_test),
1728 (check_message_handling), (_dbus_message_test):
1729 * dbus/dbus-message.h:
1730 * test/bus-test.c: (main):
1731 Change fields to arguments in messages, so that they won't be
1732 confused with header fields.
1734 * glib/test-dbus-glib.c: (main):
1735 Remove append_fields from hello message.
1737 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1739 * dbus/dbus-errors.c:
1740 * dbus/dbus-message.c:
1741 * dbus/dbus-string.c:
1742 Documentation fixes.
1744 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1746 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1748 Implement support for timeouts in dbus-glib.
1750 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1752 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1753 * dbus/dbus-message.c: (process_test_subdir):
1754 * test/break-loader.c: (find_breaks_based_on):
1755 Plug some memory leaks.
1757 2003-02-13 Richard Hult <rhult@codefactory.se>
1759 * bus/main.c: Fix build.
1761 * dbus/dbus-errors.h:
1762 * dbus/dbus-errors.c: Fix copyright for Anders.
1764 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1769 * bus/connection.c: (bus_connection_foreach):
1772 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1773 (unescape_string), (new_section), (parse_section_start),
1774 (parse_key_value), (report_error), (bus_desktop_file_load),
1775 (bus_desktop_file_get_string):
1776 * bus/desktop-file.h:
1777 Use DBusError for error reporting.
1779 * bus/dispatch.c: (send_one_message),
1780 (bus_dispatch_message_handler):
1781 * bus/driver.c: (bus_driver_send_service_deleted),
1782 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1783 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1784 (bus_driver_send_welcome_message),
1785 (bus_driver_handle_list_services),
1786 (bus_driver_handle_acquire_service),
1787 (bus_driver_handle_service_exists):
1788 * bus/loop.c: (bus_loop_run):
1790 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1792 * bus/utils.c: (bus_wait_for_memory):
1794 New files with general utility functions.
1796 * dbus/dbus-internals.h:
1797 Remove _DBUS_HANDLE_OOM.
1799 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1801 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1802 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1803 * dbus/dbus-errors.h:
1804 Add DBusError structure.
1806 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1808 * test/data/valid-messages/standard-acquire-service.message:
1809 * test/data/valid-messages/standard-hello.message:
1810 * test/data/valid-messages/standard-list-services.message:
1811 * test/data/valid-messages/standard-service-exists.message:
1812 Add some standard messages.
1814 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1816 * bus/driver.c: (bus_driver_send_welcome_message),
1817 (bus_driver_handle_list_services),
1818 (bus_driver_handle_acquire_service),
1819 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1820 Update for API changes in libdbus.
1822 * dbus/dbus-message.c: (dbus_message_new_reply):
1823 * dbus/dbus-message.h:
1824 Remove the name argument. The spec states that replies shouldn't
1827 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1829 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1830 (report_error), (bus_desktop_file_load), (lookup_section),
1831 (lookup_line), (bus_desktop_file_get_raw),
1832 (bus_desktop_file_get_string):
1833 * bus/desktop-file.h:
1834 Some fixes, and new functions for getting a key value from a section.
1836 2003-02-13 Havoc Pennington <hp@pobox.com>
1838 * test/data/auth/fail-after-n-attempts.auth-script: new test
1840 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1843 2003-02-13 Havoc Pennington <hp@pobox.com>
1845 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1846 dbus_credentials_match were backward
1848 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1849 NO_CREDENTIALS and ROOT_CREDENTIALS
1851 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1852 into here. Never process more commands after we've reached an
1853 end state; store further data as unused bytes.
1855 * test/data/auth/*: add more auth tests
1857 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1858 command to match exact string and EXPECT_UNUSED to match unused
1861 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1863 2003-02-12 Havoc Pennington <hp@pobox.com>
1865 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1866 \r off of popped lines
1868 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1871 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1874 2003-02-12 Havoc Pennington <hp@pobox.com>
1876 * dbus/Makefile.am: remove break-loader from the build, since it
1879 * configure.in: add --enable-gcov to turn on coverage profiling
1880 flags and disable optimization
1882 2003-02-10 Havoc Pennington <hp@pobox.com>
1884 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1885 initial cut at test framework for DBusAuth from laptop.
1886 Doesn't quite work yet but it compiles and I need to get
1887 it off the 266mhz laptop. ;-)
1889 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1890 fix a memleak in error case
1892 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1895 * bus/desktop-file.c:
1896 * bus/desktop-file.h:
1897 Add a desktop file parser.
1899 2003-02-11 Zack Rusin <zack@kde.org>
1901 * qt/message.[h|cpp]: sample implementation
1902 of the KDE wrapper for DBusMessage
1904 2003-02-09 Zack Rusin <zack@kde.org>
1906 * test/bus-test.c: make_it_compile
1907 * doc/dbus-specification.sgml: minimal semantic fix
1909 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1915 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1918 * dbus/dbus-break-loader.c:
1920 * test/break-loader.c:
1921 Move dbus-break-loader to test/ and rename it to break-loader.
1923 2003-02-02 Havoc Pennington <hp@pobox.com>
1925 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1926 for code to manage cookies in your home directory
1928 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1930 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1931 to authenticate, then disconnect the client.
1933 2003-02-03 Alexander Larsson <alexl@redhat.com>
1935 * dbus/dbus-message.c (dbus_message_append_fields):
1938 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1940 * doc/dbus-specification.sgml:
1941 Update address format section.
1943 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1946 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1947 (message_handler), (new_connection_callback), (loop_quit),
1951 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1953 * bus/driver.c: (bus_driver_handle_service_exists):
1954 Simplify the code a bit.
1956 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1959 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1962 Add libdbus-daemon.la and link to it.
1964 2003-02-01 James Willcox <jwillcox@gnome.org>
1966 * bus/driver.c: (bus_driver_handle_own_service):
1967 Actually include the service reply code in the message.
1969 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1971 * bus/driver.c: (bus_driver_handle_service_exists):
1972 Don't unref the incoming message.
1974 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1976 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1978 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1980 * dbus/dbus-server.c: (dbus_server_listen):
1981 * dbus/dbus-transport.c: (_dbus_transport_open):
1982 ifdef out the calls to the debug transport and server.
1984 2003-02-02 Alexander Larsson <alexl@redhat.com>
1986 * dbus/dbus-watch.c (dbus_watch_get_flags):
1987 Add note in the docs that ERROR or HANGUP won't be returned
1988 and are assumed always on.
1990 * glib/dbus-gmain.c (add_watch):
1991 Always add IO_ERR | IO_HUP
1993 * dbus/dbus-message.h:
1994 Add semicolon after dbus_message_iter_get_string_array().
1995 Makes qt code build again
1997 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1999 * bus/driver.c: (create_unique_client_name),
2000 (bus_driver_handle_hello):
2001 Don't take a name, just use a numeric id to identify
2005 * dbus/dbus-bus.c: (dbus_bus_register_client),
2006 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2008 Add new convenience functions for communicating with the bus.
2010 * dbus/dbus-message.h:
2012 * dbus/dbus-protocol.h:
2015 2003-02-01 Alexander Larsson <alexl@redhat.com>
2017 * dbus/dbus-message.c (dbus_message_append_fields):
2018 Add some more doc comments.
2020 2003-02-01 Havoc Pennington <hp@pobox.com>
2022 * dbus/dbus-break-loader.c (randomly_modify_length): change
2023 a 4-byte value in the message as if it were a length
2025 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2026 execute bit on saved files
2028 2003-02-01 Havoc Pennington <hp@pobox.com>
2030 * dbus/dbus-break-loader.c (main): new program to find messages
2031 that break the loader.
2033 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2034 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2036 * dbus/dbus-string.c (_dbus_string_set_byte): new
2038 2003-01-31 Havoc Pennington <hp@pobox.com>
2040 * dbus/dbus-message.c: refactor the test code to be more general,
2041 in preparation for writing a "randomly permute test cases to
2042 try to break the loader" program.
2044 2003-01-31 Havoc Pennington <hp@pobox.com>
2046 * doc/dbus-specification.sgml: work on the specification
2048 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2049 the protocol version of the message.
2051 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2052 no longer specifies that.
2053 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2056 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2057 "break" for DBUS_TYPE_NIL, remove @todo
2059 2003-01-31 Havoc Pennington <hp@pobox.com>
2061 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2062 just set_is_error/get_is_error as this is a commonly-used
2063 function, and write docs.
2065 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2067 * dbus/dbus-address.c: (dbus_address_entry_free):
2068 Free key and value lists.
2070 * dbus/dbus-internals.c: (_dbus_type_to_string):
2071 Add the types we didn't have.
2073 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2074 (_dbus_marshal_validate_arg):
2077 * dbus/dbus-message.c: (dbus_message_set_sender):
2078 Remove todo about being able to set sender to NULL.
2080 (dbus_message_set_is_error_reply),
2081 (dbus_message_get_is_error_reply):
2082 * dbus/dbus-message.h:
2085 * dbus/dbus-protocol.h:
2086 Add error reply flag.
2088 * test/data/valid-messages/opposite-endian.message:
2089 Add NIL type to test.
2091 2003-01-31 Havoc Pennington <hp@pobox.com>
2093 * doc/dbus-specification.sgml: fully specify the header. Add
2094 flags and major protocol version, and change header/body len to
2097 * dbus/dbus-message-builder.c (append_saved_length): append length
2100 * dbus/dbus-message.c (dbus_message_create_header): change header
2101 length and body length to unsigned. Add the new fields from the
2103 (_dbus_message_loader_return_buffer): unsigned header/body len
2105 2003-01-30 Havoc Pennington <hp@pobox.com>
2107 * dbus/dbus-auth.c: rework to use only REJECTED, no
2110 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2111 use REJECTED, suggested by Mark McLoughlin
2113 2003-01-30 Havoc Pennington <hp@pobox.com>
2115 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2116 a better way to report errors here. e.g. "unix address lacks
2117 path" or something. also "no such file" when the path doesn't
2120 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2122 (dbus_parse_address): add @todo about documenting address format,
2123 and allowing , and ; to be escaped
2125 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2128 Add dbus-address.[ch]
2130 * dbus/dbus-address.c: (dbus_address_entry_free),
2131 (dbus_address_entries_free), (create_entry),
2132 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2133 (dbus_parse_address), (_dbus_address_test):
2134 * dbus/dbus-address.h:
2135 New files for dealing with address parsing.
2137 * dbus/dbus-connection.c:
2138 Document timeout functions.
2140 * dbus/dbus-message.c:
2141 Document dbus_message_new_from_message.
2143 * dbus/dbus-server-debug.c:
2146 * dbus/dbus-server.c: (dbus_server_listen):
2147 Parse address and use correct server implementation.
2149 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2150 * dbus/dbus-string.h:
2151 New function with test.
2153 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2157 * dbus/dbus-transport-debug.c:
2160 * dbus/dbus-transport.c: (_dbus_transport_open):
2161 Parse address and use correct transport implementation.
2163 2003-01-30 Havoc Pennington <hp@pobox.com>
2165 * dbus/dbus-message.c: use message->byte_order instead of
2166 DBUS_COMPILER_BYTE_ORDER throughout.
2167 (dbus_message_create_header): pad header to align the
2168 start of the body of the message to 8-byte boundary
2170 * dbus/dbus-marshal.h: make all the demarshalers take const
2171 DBusString arguments.
2173 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2174 validate message args here, so we don't have to do slow validation
2175 later, and so we catch bad messages as they are incoming. Also add
2176 better checks on header_len and body_len. Also fill in
2179 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2180 implemented properly)
2181 (_dbus_string_validate_nul): new function to check all-nul
2183 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2184 get_arg_end_pos and remove all validation
2185 (_dbus_marshal_validate_arg): actually do validation here.
2187 2003-01-29 Havoc Pennington <hp@pobox.com>
2189 * dbus/dbus-message.c (check_message_handling): fix assertion
2190 failure on set_client_serial
2192 2003-01-28 Havoc Pennington <hp@pobox.com>
2194 * dbus/dbus-server-debug.c: Add doc section comments
2196 * dbus/dbus-transport-debug.c: add doc section comments
2198 2003-01-28 Havoc Pennington <hp@redhat.com>
2200 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2201 the reverse order from how I had it
2202 (_dbus_string_base64_encode): reverse encoding order. I was
2203 basically byteswapping everything during encoding.
2205 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2207 * dbus/dbus-connection-internal.h:
2208 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2209 (_dbus_connection_remove_timeout):
2210 Add functions for adding and removing timeouts.
2212 * dbus/dbus-message.c: (dbus_message_new_from_message):
2213 Add new function that takes a message and creates an exact
2214 copy of it, but with the refcount set to 1.
2215 (check_message_handling):
2218 * dbus/dbus-server-protected.h:
2219 * dbus/dbus-server.c: (_dbus_server_init_base),
2220 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2221 (dbus_server_set_timeout_functions):
2222 (_dbus_server_remove_timeout):
2223 New functions so that a server can add and remove timeouts.
2225 (dbus_server_listen):
2226 Add commented out call to dbus_server_debug_new.
2228 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2229 Actually set the handler, doh.
2231 * dbus/dbus-transport.c: (_dbus_transport_open):
2232 Add commented out call to dbus_transport_debug_client_new.
2235 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2237 2003-01-28 Havoc Pennington <hp@pobox.com>
2239 * dbus/dbus-message.c (check_message_handling): function to check
2240 on the loaded message, iterates over it etc.
2242 2003-01-28 Havoc Pennington <hp@pobox.com>
2244 * test/Makefile.am (dist-hook): fix make distdir
2246 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2248 2003-01-27 Havoc Pennington <hp@pobox.com>
2250 * dbus/dbus-mempool.c (time_for_size): replace printf with
2253 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2254 empty lines; fix the SAVE_LENGTH stuff to be
2255 START_LENGTH/END_LENGTH so it actually works; couple other
2258 * test/Makefile.am (dist-hook): add dist-hook for .message files
2260 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2261 can be constant or locked.
2262 (_dbus_string_free): allow freeing a const string as
2265 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2267 * dbus/dbus-test-main.c (main): take an argument which is the
2268 directory containing test data
2270 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2271 argument to this and load all the messages in test/data/
2272 checking that they can be loaded or not loaded as appropriate.
2274 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2276 * bus/dispatch.c: (bus_dispatch_message_handler):
2277 Dispatch messages sent to services.
2279 * bus/driver.c: (bus_driver_send_service_deleted),
2280 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2281 (bus_driver_send_service_acquired):
2282 Add helper functions for sending service related messages.
2284 (bus_driver_send_welcome_message):
2285 Send HELLO_REPLY instead of WELCOME.
2287 (bus_driver_handle_list_services):
2288 Send LIST_SERVICES_REPLY instead of SERVICES.
2290 (bus_driver_handle_own_service),
2291 (bus_driver_handle_service_exists):
2292 New message handlers.
2294 (bus_driver_handle_message):
2295 Invoke new message handlers.
2297 (bus_driver_remove_connection):
2298 Don't remove any services here since that's done automatically
2299 by bus_service_remove_owner now.
2302 New function signatures.
2304 * bus/services.c: (bus_service_add_owner):
2305 Send ServiceAcquired message if we're the only primary owner.
2307 (bus_service_remove_owner):
2308 Send ServiceAcquired/ServiceLost messages.
2310 (bus_service_set_prohibit_replacement),
2311 (bus_service_get_prohibit_replacement):
2312 Functions for setting prohibit replacement.
2314 (bus_service_has_owner):
2315 New function that checks if a connection is in the owner queue of
2319 Add new function signatures.
2321 * dbus/dbus-list.c: (_dbus_list_test):
2322 Add tests for _dbus_list_remove_last and traversing the list backwards.
2325 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2326 go any further, so return NULL then.
2328 * dbus/dbus-protocol.h:
2329 Add new messages, service flags and service replies.
2331 2003-01-26 Havoc Pennington <hp@pobox.com>
2333 * dbus/dbus-message-builder.c: implement, completely untested.
2335 * test/data/*: add data to be used in testing.
2336 ".message" files are our simple loadable text format.
2337 ".message-raw" will be binary dumps of messages.
2339 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2341 2003-01-26 Havoc Pennington <hp@pobox.com>
2343 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2345 * dbus/dbus-errors.c (dbus_result_to_string): add
2348 * dbus/dbus-message-builder.c: new file, will contain code to load
2349 up messages from files. Not implemented yet.
2351 2003-01-26 Havoc Pennington <hp@pobox.com>
2353 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2354 the sender by setting to NULL
2356 2003-01-26 Havoc Pennington <hp@pobox.com>
2358 The unit tests pass, but otherwise untested. If it breaks, the
2359 tests should have been better. ;-)
2361 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2364 * dbus/dbus-message.c: redo everything so we maintain
2365 message->header as the only copy of the various fields.
2366 This avoids the possibility of out-of-memory in some cases,
2367 for example dbus_message_lock() can't run out of memory anymore,
2368 and avoids extra copying. Figured I may as well go ahead and do
2369 this since it was busted for dbus_message_lock to not return
2370 failure on OOM, and dbus_message_write_header was totally
2371 unchecked for OOM. Also fixed some random other bugs.
2373 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2374 that strings are nul-terminated. Also, end_pos can be equal
2375 to string length just not greater than, I think.
2376 (_dbus_marshal_set_int32): new function
2377 (_dbus_marshal_set_uint32): new function
2378 (_dbus_marshal_set_string): new function
2380 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2381 a warning, init timeout_list to NULL
2382 (dbus_connection_send_message): don't use uninitialized variable
2385 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2387 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2389 * bus/driver.c: (bus_driver_handle_hello),
2390 (bus_driver_send_welcome_message):
2393 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2395 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2396 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2397 (dbus_connection_unref):
2398 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2399 * dbus/dbus-message.c: (dbus_message_unref),
2402 (dbus_message_get_fields):
2403 Remove debugging printout.
2405 (_dbus_message_loader_return_buffer):
2406 Don't store the header string.
2408 (_dbus_message_test):
2411 2003-01-26 Richard Hult <rhult@codefactory.se>
2413 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2414 the file descriptor list, since it can change under us.
2416 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2418 * glib/dbus-gmain.c: (dbus_connection_prepare),
2419 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2420 (remove_watch), (dbus_connection_hookup_with_g_main):
2421 Rewrite the glib handling to use its own GSource instead of a
2422 GIOChannel so we can catch messages put in the queue while waiting
2425 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2428 * bus/connection.c: (connection_disconnect_handler),
2429 (connection_watch_callback), (bus_connection_setup):
2430 * bus/dispatch.c: (send_one_message),
2431 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2432 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2434 * bus/driver.c: (bus_driver_send_service_deleted),
2435 (bus_driver_send_service_created), (bus_driver_handle_hello),
2436 (bus_driver_send_welcome_message),
2437 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2438 (bus_driver_handle_message):
2440 Refactor code, put the message dispatching in its own file. Use
2441 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2444 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2446 * dbus/dbus-internals.h:
2447 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2449 * dbus/dbus-message.c: (dbus_message_get_sender):
2450 * dbus/dbus-message.h:
2451 Implement dbus_message_get_sender.
2453 * dbus/dbus-protocol.h:
2454 Add message and service defines.
2456 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2458 * dbus/dbus-connection.c: (dbus_connection_send_message):
2459 * dbus/dbus-message-internal.h:
2460 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2461 (dbus_message_write_header):
2462 Remove _dbus_messag_unlock and don't set the client serial on a
2463 message if one already exists.
2465 2003-01-24 Havoc Pennington <hp@pobox.com>
2467 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2470 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2473 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2475 * dbus/dbus-list.c: (alloc_link), (free_link):
2476 Use a memory pool for the links.
2478 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2480 * bus/connection.c: (bus_connection_foreach):
2482 Add new bus_connection_foreach function.
2484 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2485 Add function that broadcasts a message to all clients.
2487 (bus_driver_send_service_created), (bus_driver_handle_hello),
2488 (bus_driver_send_welcome_message),
2489 (bus_driver_handle_list_services), (bus_driver_message_handler):
2490 Implement functions that take care of listing services, and notifying
2491 clients when new services are created.
2493 * bus/services.c: (bus_services_list):
2495 Add new function that returns an array of strings with the currently
2496 registered services.
2499 * glib/dbus-gmain.c:
2500 Update copyright year.
2502 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2504 * dbus/dbus-connection.c: (dbus_connection_send_message):
2505 Unlock the message in case it was sent earlier.
2507 (dbus_connection_send_message_with_reply_and_block):
2508 Remove the reply message from the list.
2510 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2511 Set array_len and new_pos correctly.
2513 (_dbus_marshal_test):
2514 Remove debug output.
2516 * dbus/dbus-message-internal.h:
2517 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2518 New function that returns the reply serial.
2520 (_dbus_message_unlock):
2521 New function that unlocks a message and resets its header.
2523 (dbus_message_append_string_array),
2524 (dbus_message_get_fields_valist),
2525 (dbus_message_iter_get_field_type),
2526 (dbus_message_iter_get_string_array),
2527 (dbus_message_get_fields),
2528 (dbus_message_append_fields_valist):
2529 Handle string arrays.
2531 (dbus_message_set_sender):
2532 Make this function public since the bus daemon needs it.
2534 (decode_header_data):
2535 Set the reply serial to -1 initially.
2537 * dbus/dbus-message.h:
2538 Add dbus_message_set_sender.
2540 2003-01-24 Havoc Pennington <hp@pobox.com>
2542 * doc/dbus-specification.sgml: add some stuff
2544 2003-01-22 Havoc Pennington <hp@pobox.com>
2546 * doc/dbus-specification.sgml: Start to document the protocol.
2548 2003-01-22 Havoc Pennington <hp@pobox.com>
2550 * dbus/dbus-connection.c
2551 (dbus_connection_send_message_with_reply_and_block): add some @todo
2553 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2555 2003-01-21 Havoc Pennington <hp@pobox.com>
2557 (patch untested because can't compile)
2559 * bus/driver.c (create_unique_client_name): make this function
2560 never recycle client names. Also, caller should initialize
2563 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2565 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2567 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2568 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2569 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2570 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2571 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2572 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2573 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2574 * dbus/dbus-marshal.h:
2575 * dbus/dbus-protocol.h:
2576 Add support for marshalling and demarshalling integer, double
2579 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2584 * bus/connection.c: (connection_disconnect_handler):
2585 Remove the connection from the bus driver's list.
2587 (connection_watch_callback): Dispatch messages.
2589 (free_connection_data): Free connection name.
2591 (bus_connection_setup): Add connection to the bus driver's list.
2592 (bus_connection_remove_owned_service):
2593 (bus_connection_set_name), (bus_connection_get_name):
2594 Add functions for setting and getting the connection's name.
2597 Add function headers.
2599 * bus/driver.c: (create_unique_client_name),
2600 (bus_driver_handle_hello_message),
2601 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2602 (bus_driver_add_connection), (bus_driver_remove_connection):
2605 * bus/services.c: (bus_service_free):
2607 New file that handles communication and registreation with the bus
2610 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2612 * dbus/dbus-connection.c: (dbus_connection_send_message):
2613 Add a new client_serial parameter.
2615 (dbus_connection_send_message_with_reply):
2616 Remove a @todo since we've implemented the blocking function.
2618 (dbus_connection_send_message_with_reply_and_block):
2619 New function that sends a message and waits for a reply and
2620 then returns the reply.
2622 * dbus/dbus-connection.h:
2625 * dbus/dbus-errors.c: (dbus_result_to_string):
2626 * dbus/dbus-errors.h:
2627 Add new DBUS_RESULT.
2629 * dbus/dbus-message-internal.h:
2630 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2631 (_dbus_message_set_sender), (dbus_message_write_header),
2632 (dbus_message_new_reply), (decode_header_data),
2633 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2634 * dbus/dbus-message.h:
2635 Add new functions that set the reply serial and sender.
2636 Also marshal and demarshal them correctly and add test.
2638 * dbus/dbus-protocol.h:
2639 Add new DBUS_MESSAGE_TYPE_SENDER.
2642 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2643 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2644 (dbus_connection_hookup_with_g_main):
2645 * glib/test-dbus-glib.c: (main):
2646 Rewrite to use GIOChannel and remove the GSource crack.
2648 * test/echo-client.c: (main):
2649 * test/watch.c: (check_messages):
2650 Update for changed APIs
2652 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2654 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2656 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2657 Create a DBusTimeoutList.
2658 (dbus_connection_set_timeout_functions): Add new function to
2659 set timeout callbacks
2661 * dbus/dbus-connection.h: Add public DBusTimeout API.
2663 * dbus/dbus-message.c: (dbus_message_get_service):
2664 * dbus/dbus-message.h: New function.
2666 * dbus/dbus-server.c: Fix small doc typo.
2668 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2670 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2672 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2673 of the string, just as long as specified.
2675 2003-01-19 Havoc Pennington <hp@pobox.com>
2677 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2680 * dbus/dbus-server.c (dbus_server_set_max_connections)
2681 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2682 keep track of current number of connections, and add API for
2683 setting a max (but haven't implemented enforcing the max yet)
2685 2003-01-18 Havoc Pennington <hp@pobox.com>
2687 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2688 reading/writing if read_watch != NULL or write_watch != NULL.
2690 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2691 the message loader code to actually load message->header and
2692 message->body into the newly-created message.
2694 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2697 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2698 (dbus_connection_get_max_message_size)
2699 (dbus_connection_set_max_live_messages_size)
2700 (dbus_connection_get_max_live_messages_size): implement some
2701 resource limitation functions
2703 * dbus/dbus-resources.c: new file implementing some of the
2704 resource limits stuff
2706 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2707 missing docs, add @todo to handle OOM etc.
2709 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2712 2003-01-18 Havoc Pennington <hp@pobox.com>
2714 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2715 connection if it hasn't been already.
2717 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2718 replace with DisconnectFunction.
2720 2003-01-18 Havoc Pennington <hp@pobox.com>
2722 Building --disable-verbose-mode --disable-asserts --disable-tests
2723 cuts the library from 112K to 45K or so
2725 * configure.in: check for varargs macro support,
2726 add --enable-verbose-mode, --enable-asserts.
2728 * dbus/dbus-internals.h (_dbus_assert): support
2730 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2732 2003-01-18 Havoc Pennington <hp@pobox.com>
2734 * dbus/dbus-test.c: include config.h so that tests actually run
2736 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2737 so the failure mode when that assumption fails will be plenty
2740 2003-01-18 Havoc Pennington <hp@pobox.com>
2742 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2744 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2747 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2748 since we don't want to use those in make check
2750 2003-01-15 Havoc Pennington <hp@redhat.com>
2756 2003-01-15 Havoc Pennington <hp@redhat.com>
2758 * test/Makefile.am: fix so that test source code ends up in the
2759 distribution on make distcheck
2761 2003-01-15 Havoc Pennington <hp@redhat.com>
2767 2003-01-15 Havoc Pennington <hp@redhat.com>
2769 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2770 fix build when --disable-tests
2772 * Makefile.am (EXTRA_DIST): put HACKING in here
2774 * HACKING: document procedure for making a tarball release.
2776 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2778 * bus/connection.c: (connection_error_handler),
2779 (bus_connection_setup):
2780 * bus/main.c: (main):
2781 Make sure that the DBusConnectionData struct is NULLed
2782 out to prevent a segfault.
2784 * dbus/dbus-errors.c: (dbus_result_to_string):
2785 * dbus/dbus-errors.h:
2786 * dbus/dbus-message.c: (dbus_message_get_fields),
2787 (dbus_message_get_fields_valist), (_dbus_message_test):
2788 * dbus/dbus-message.h:
2789 Make dbus_message_get_fields return a result code so we can
2790 track invalid fields as well as oom.
2792 2003-01-11 Havoc Pennington <hp@pobox.com>
2794 * configure.in: change --enable-test/--enable-ansi action-if-given
2795 to enable_foo=$enableval instead of enable_foo=yes
2797 2003-01-08 Havoc Pennington <hp@pobox.com>
2799 * dbus/dbus-string.c (_dbus_string_align_length): new function
2801 * dbus/dbus-test-main.c: move main() for test app here
2803 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2804 symbol to run tests, because dbus-test isn't in the main
2807 Code review nitpicks.
2809 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2810 for people with narrow emacs ;-). Assert client_serial was filled
2811 in. Assert message->name != NULL.
2812 (dbus_message_append_fields): have "first_field_type" arg separate
2813 from va list, needed for C++ binding that also uses varargs IIRC
2814 and helps with type safety
2815 (dbus_message_new): add @todo about using DBusString to store
2816 service/name internally
2817 (dbus_message_new): don't leak ->service and ->name on OOM later
2819 (dbus_message_unref): free the service name
2820 (dbus_message_get_fields): same change to varargs
2821 i.e. first_field_type
2822 (_dbus_message_loader_return_buffer): assert that the message data
2823 is aligned (if not it's a bug in our code). Put in verbose griping
2824 about why we set corrupted = TRUE.
2825 (decode_header_data): add FIXME that char* is evil. Was going to
2826 add FIXME about evil locale-specific string.h strncmp, but just
2827 switched to wacky string-as-uint32 optimization. Move check for
2828 "no room for field name" above get_const_data_len() to avoid
2829 assertion failure in get_const_data_len if we have trailing 2
2830 bytes or the like. Check for service and name fields being
2831 provided twice. Don't leak service/name on error. Require field
2832 names to be aligned to 4 bytes.
2834 * dbus/dbus-marshal.c: move byte swap stuff to header
2835 (_dbus_pack_int32): uscore-prefix
2836 (_dbus_unpack_int32): uscore-prefix
2837 (_dbus_unpack_uint32): export
2838 (_dbus_demarshal_string): add @todo complaining about use of
2840 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2841 handling allowing corrupt data to go unchecked
2843 2003-01-08 Havoc Pennington <hp@redhat.com>
2845 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2846 to the select() as needed for authentication. (should be using
2847 _dbus_poll() not select, but for another day)
2849 * dbus/dbus.h: include dbus/dbus-protocol.h
2851 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2853 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2856 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2858 * dbus/dbus-internals.c: (_dbus_type_to_string):
2859 New function that returns a string describing a type.
2861 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2862 * dbus/dbus-marshal.h:
2863 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2864 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2865 (dbus_message_iter_get_byte_array):
2866 * dbus/dbus-message.h:
2867 Add new convenience functions for appending and getting message fields.
2868 Also add demarshalling routines for byte arrays.
2870 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2872 * dbus/dbus-connection-internal.h:
2873 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2874 (_dbus_connection_get_next_client_serial),
2875 (dbus_connection_send_message):
2876 * dbus/dbus-internals.h:
2877 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2878 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2879 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2880 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2881 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2882 (_dbus_verbose_bytes), (_dbus_marshal_test):
2883 * dbus/dbus-marshal.h:
2884 * dbus/dbus-message-internal.h:
2885 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2886 (dbus_message_write_header), (_dbus_message_lock),
2887 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2888 (dbus_message_get_name), (dbus_message_append_int32),
2889 (dbus_message_append_uint32), (dbus_message_append_double),
2890 (dbus_message_append_string), (dbus_message_append_byte_array),
2891 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2892 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2893 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2894 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2895 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2896 (decode_header_data), (_dbus_message_loader_return_buffer),
2897 (message_iter_test), (_dbus_message_test):
2898 * dbus/dbus-message.h:
2899 * dbus/dbus-protocol.h:
2900 * dbus/dbus-test.c: (main):
2902 * glib/test-dbus-glib.c: (message_handler), (main):
2903 * test/echo-client.c: (main):
2904 * test/watch.c: (check_messages):
2905 Make messages sendable and receivable for real.
2907 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2909 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2910 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2911 * dbus/dbus-message.c: (dbus_message_append_int32),
2912 (dbus_message_append_uint32), (dbus_message_append_double),
2913 (dbus_message_append_string), (dbus_message_append_byte_array):
2914 Handle OOM restoration.
2916 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2918 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2919 (_dbus_demarshal_string), (_dbus_marshal_test):
2920 * dbus/dbus-marshal.h:
2921 * dbus/dbus-message.c: (dbus_message_get_name),
2922 Document these functions.
2924 (dbus_message_append_int32), (dbus_message_append_uint32),
2925 (dbus_message_append_double), (dbus_message_append_string),
2926 (dbus_message_append_byte_array):
2927 * dbus/dbus-message.h:
2928 Add functions for adding message fields of different types.
2930 * dbus/dbus-protocol.h:
2931 Add the different types.
2933 2003-01-05 Havoc Pennington <hp@pobox.com>
2935 * bus/connection.c: implement routines for handling connections,
2936 first thing is keeping a list of owned services on each connection
2937 and setting up watches etc.
2939 * bus/services.c: implement a mapping from service names to lists
2942 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2944 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2945 to use static mutexes for global data
2947 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2948 collection of functions to set/get application-specific data
2949 on the DBusConnection.
2951 2003-01-04 Havoc Pennington <hp@pobox.com>
2953 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2954 (_dbus_poll): new function
2956 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2959 * bus/loop.c: initial code for the daemon main loop
2961 2003-01-04 Havoc Pennington <hp@pobox.com>
2963 * test/watch.c (error_handler): make it safe if the error handler
2964 is called multiple times (if we s/error handler/disconnect
2965 handler/ we should just guarantee it's called only once)
2967 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2968 error handler on disconnect (it's quite possible we should
2969 just change the error handler to a "disconnect handler," I'm
2970 not sure we have any other meaningful errors)
2972 * configure.in: check for getpwnam_r
2974 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2975 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2976 mechanism as in SASL spec, using socket credentials
2978 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2979 (_dbus_send_credentials_unix_socket): new function
2981 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2983 (_dbus_write): only check errno if <0 returned
2984 (_dbus_write_two): ditto
2986 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2988 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2989 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2990 (_dbus_marshal_test):
2991 * dbus/dbus-marshal.h:
2992 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2993 to _dbus_marshal_utf8_string. Also fix some tests.
2995 2002-12-28 Harri Porten <porten@kde.org>
2997 * configure.in: added check for C++ compiler and a very cheesy
2998 check for the Qt integration
3000 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3002 * qt/Makefile.am: added
3004 * qt/.cvsignore: added
3006 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3007 latter, added #ifdef QT_THREAD_SUPPORT guard.
3009 * dbus/Makefile.am: added missing headers for make dist
3011 2002-12-28 Kristian Rietveld <kris@gtk.org>
3013 * dbus/Makefile.am: fixup export-symbols-regex.
3015 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3017 * acinclude.m4: Add this file and put the
3018 PKG_CHECK_MODULE macro in it.
3020 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3022 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3023 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3024 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3025 (_dbus_marshal_test):
3026 Make the demarshalling routines align the pos argument.
3027 Add string marshalling tests and fix the obvious bugs
3030 2002-12-26 Havoc Pennington <hp@pobox.com>
3032 * dbus/dbus-auth.c: fixes fixes fixes
3034 * dbus/dbus-transport-unix.c: wire up support for
3035 encoding/decoding data on the wire
3037 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3038 (_dbus_auth_decode_data): append to target string
3039 instead of nuking it.
3041 2002-12-26 Havoc Pennington <hp@pobox.com>
3043 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3044 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3047 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3048 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3049 now). Main point is because I wanted unpack_uint32 to implement
3051 (_dbus_verbose_bytes): new function
3053 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3055 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3056 mechanism to handle a corrupt message stream
3057 (_dbus_message_loader_new): fix preallocation to only prealloc,
3060 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3061 (_dbus_string_test): enhance tests for copy/move and fix the
3064 * dbus/dbus-transport-unix.c: Hold references in more places to
3065 avoid reentrancy problems
3067 * dbus/dbus-transport.c: ditto
3069 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3070 leak reference count in no-message case
3072 * test/watch.c (do_mainloop): handle adding/removing watches
3073 during iteration over the watches. Also, ref the connection/server
3074 stored on a watch, so we don't try to mangle a destroyed one.
3076 * dbus/dbus-transport-unix.c (do_authentication): perform
3079 * dbus/dbus-auth.c (get_state): add a state
3080 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3081 (_dbus_auth_get_unused_bytes): append the unused bytes
3082 to the passed in string, rather than prepend
3084 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3085 the auth conversation DBusAuth
3087 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3088 (_dbus_transport_new_for_domain_socket): when creating a
3089 transport, pass in whether it's a client-side or server-side
3090 transport so we know which DBusAuth to create
3092 2002-12-03 Havoc Pennington <hp@pobox.com>
3094 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3095 _after_ finalizing the derived members
3096 (unix_connection_set): unref watch if we fail to add it
3098 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3099 transport first, so that the connection owned by the
3100 transport will be valid as the transport finalizes.
3102 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3103 if necessary, and remove watches from the connection.
3105 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3107 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3109 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3110 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3111 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3112 (_dbus_marshal_test):
3113 * dbus/dbus-marshal.h:
3114 Add string marshal functions and have the demarshal functions
3115 return the new position.
3117 2002-12-25 Havoc Pennington <hp@pobox.com>
3119 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3120 it is a simple protocol that just maps directly to SASL.
3122 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3123 initial implementation, not actually used yet.
3125 * dbus/dbus-string.c (_dbus_string_find): new function
3126 (_dbus_string_equal): new function
3127 (_dbus_string_base64_encode): new function
3128 (_dbus_string_base64_decode): new function
3130 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3133 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3134 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3135 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3136 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3137 * dbus/dbus-marshal.h:
3138 * dbus/dbus-protocol.h:
3139 * dbus/dbus-test.c: (main):
3141 Add un-optimized marshalling/demarshalling routines.
3143 2002-12-25 Harri Porten <porten@kde.org>
3145 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3147 2002-12-24 Zack Rusin <zack@kde.org>
3149 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3150 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3153 2002-12-24 Havoc Pennington <hp@pobox.com>
3155 * glib/dbus-gthread.c: fix include
3157 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3158 I think glib API needs to change, though, as you don't
3159 want to use DBusMessageFunction, you want to use the
3160 DBusMessageHandler object. Probably
3161 dbus_connection_open_with_g_main_loop()
3162 and dbus_connection_setup_g_main_loop() or something like that
3163 (but think of better names...) that just create a connection
3164 that has watch/timeout functions etc. already set up.
3166 * dbus/dbus-connection.c
3167 (dbus_connection_send_message_with_reply): new function just to
3168 show how the message handler helps us deal with replies.
3170 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3172 * dbus/dbus-string.c (_dbus_string_test): free a string that
3175 * dbus/dbus-hash.c: use memory pools for the hash entries
3176 (rebuild_table): be more paranoid about overflow, and
3177 shrink table when we can
3178 (_dbus_hash_test): reduce number of sprintfs and write
3179 valid C89. Add tests for case where we grow and then
3180 shrink the hash table.
3182 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3184 * dbus/dbus-connection.c (dbus_connection_register_handler)
3185 (dbus_connection_unregister_handler): new functions
3187 * dbus/dbus-message.c (dbus_message_get_name): new
3189 * dbus/dbus-list.c: fix docs typo
3191 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3192 an object representing a handler for messages.
3194 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3197 * glib/dbus-gthread.c: (dbus_gthread_init):
3198 Don't use the gdbus prefix for public functions.
3200 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3204 Add GLib checks and fixup .pc files
3208 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3209 (gdbus_connection_check), (gdbus_connection_dispatch),
3210 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3211 (dbus_connection_gsource_new):
3212 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3213 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3214 * glib/test-dbus-glib.c: (message_handler), (main):
3217 2002-12-15 Harri Porten <porten@kde.org>
3219 * autogen.sh: check for libtoolize before attempting to use it
3221 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3224 * .cvsignore: ignore more stamp files
3226 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3228 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3229 without make install.
3231 2002-12-15 Havoc Pennington <hp@pobox.com>
3233 * dbus/dbus-threads.c: add thread stubs that a higher library
3234 layer can fill in. e.g. the GLib wrapper might fill them in with
3235 GThread stuff. We still need to use this thread API to
3236 thread-safe-ize the library.
3238 2002-12-12 Havoc Pennington <hp@pobox.com>
3240 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3241 below new interfaces and include fewer system headers.
3243 * dbus/dbus-sysdeps.c (_dbus_read): new function
3244 (_dbus_write): new function
3245 (_dbus_write_two): new function
3246 (_dbus_connect_unix_socket): new function
3247 (_dbus_listen_unix_socket): new function
3249 * dbus/dbus-message-internal.h: change interfaces to use
3252 2002-12-11 Havoc Pennington <hp@pobox.com>
3254 * dbus/dbus-types.h: add dbus_unichar
3256 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3258 * dbus/dbus-connection.c (dbus_connection_send_message): return
3261 * dbus/dbus-transport.c: include dbus-watch.h
3263 * dbus/dbus-connection.c: include dbus-message-internal.h
3265 * HACKING: add file with coding guidelines stuff.
3267 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3268 handling here, for security purposes (as in vsftpd). Not actually
3269 using this class yet.
3271 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3272 system/libc usage here, as in vsftpd, for ease of auditing (and
3273 should also simplify portability). Haven't actually moved all the
3274 system/libc usage into here yet.
3276 2002-11-25 Havoc Pennington <hp@pobox.com>
3278 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3279 always print the first verbose message.
3281 2002-11-24 Havoc Pennington <hp@pobox.com>
3283 * test/echo-client.c, test/echo-server.c: cheesy test
3286 * configure.in (AC_CHECK_FUNCS): check for writev
3288 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3291 * dbus/dbus-list.c (_dbus_list_foreach): new function
3293 * dbus/dbus-internals.c (_dbus_verbose): new function
3295 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3296 representing a server that listens for connections.
3298 * dbus/.cvsignore: create
3300 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3301 public API for reporting errors
3303 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3304 public object representing a connection that
3305 sends/receives messages. (Same object used for
3306 both client and server.)
3308 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3309 Basic abstraction for different kinds of stream
3310 that we might read/write messages from.
3312 2002-11-23 Havoc Pennington <hp@pobox.com>
3314 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3317 * dbus/dbus-test.c (main): add list test, and include
3318 dbus-test.h as intended
3320 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3321 (_dbus_hash_table_remove_int): return value indicates
3322 whether the entry existed to remove
3324 * dbus/dbus-list.c: add linked list utility class,
3327 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3330 2002-11-23 Havoc Pennington <hp@pobox.com>
3332 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3333 DBUS_END_DECLS to nothing, that should fix this once and for all
3335 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3337 * dbus/dbus-message.c, dbus/dbus-hash.c:
3338 add some missing @brief
3340 2002-11-23 Havoc Pennington <hp@pobox.com>
3342 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3343 to avoid confusing Doxygen
3345 * dbus/dbus-hash.c: @} not }@
3347 * dbus/dbus-message.c (struct DBusMessage): split out
3350 2002-11-23 Havoc Pennington <hp@pobox.com>
3352 * configure.in: pile on more warning flags if using gcc
3354 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3355 to document static functions
3357 * configure.in: add summary to end of configure so it
3358 looks nice and attractive
3360 * dbus/dbus-hash.c: finish implementation and write unit
3363 * configure.in: add --enable-tests to enable unit tests
3365 * dbus/dbus-test.c: test program to run unit tests
3366 for all files in dbus/*, initially runs a test for
3369 * dbus/dbus-internals.h: file to hold some internal utility stuff
3371 2002-11-22 Havoc Pennington <hp@redhat.com>
3373 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3374 "ported" away from Tcl
3376 * dbus/dbus-types.h: header for types such as dbus_bool_t
3378 2002-11-22 Havoc Pennington <hp@redhat.com>
3380 * dbus/dbus.h: fixups for doc warnings
3382 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3384 (QUIET): make it quiet so we can see warnings
3386 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3388 2002-11-22 Havoc Pennington <hp@redhat.com>
3390 * Makefile.am: include "Doxyfile" target in all-local
3392 * configure.in: generate the Doxyfile
3394 * Doxyfile.in: move Doxyfile here, so we can use
3395 configure to generate a Doxyfile with the right
3398 2002-11-22 Havoc Pennington <hp@redhat.com>
3400 * dbus/dbus-message.c: move inline docs into .c file
3402 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3403 so all docs are under doc/
3404 (MAN_EXTENSION): generate man pages. Use extension
3405 ".3dbus" which matches ".3qt" on my system,
3406 I guess this is OK, I don't know really.
3407 (FILE_PATTERNS): look for .c files not .h, makes sense
3410 2002-11-22 Havoc Pennington <hp@pobox.com>
3412 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3413 because any app can be a server, and any app can be a client,
3414 the bus is a special kind of server.
3416 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3418 * Doxyfile : adding. Still needs Makefile rules to be generated
3419 automatically (just run "doxygen" in the toplevel dir for now to
3422 * dbus/dbus-message.h : Adding sample docs (javadoc since
3423 resembles gtk-doc a little more)
3425 * dbus/dbus.h : Adding sample docs
3427 2002-11-21 Havoc Pennington <hp@redhat.com>
3429 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3430 so we can allow ourselves to include files directly,
3431 instead of having to use dbus.h
3433 * dbus/dbus.h: fill in
3435 * dbus/dbus-message.h: sketch out a sample header file.
3436 Include griping if you include it directly instead of
3439 * dbus/dbus-macros.h: new file with macros for extern "C",
3440 TRUE/FALSE, NULL, etc.
3442 * doc/file-boilerplate.c: put include guards in here
3444 2002-11-21 Havoc Pennington <hp@redhat.com>
3446 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3448 * COPYING: include the GPL as well, and license code
3449 under both AFL and GPL.
3451 2002-11-21 Havoc Pennington <hp@redhat.com>
3453 * acconfig.h: get rid of this
3455 * autogen.sh (run_configure): add --no-configure option
3457 * configure.in: remove AC_ARG_PROGRAM to make
3458 autoconf complain less. add AC_PREREQ.
3459 add AC_DEFINE third arg.
3461 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3464 Fix references so we can distcheck.
3466 2002-11-21 Havoc Pennington <hp@redhat.com>
3468 * Initial module creation