1 2003-04-03 Havoc Pennington <hp@redhat.com>
3 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
6 * bus/*.[hc]: adapt to mainloop change
8 2003-04-03 Havoc Pennington <hp@redhat.com>
10 * bus/activation.c (load_directory): fix up memleaks
11 (bus_activation_entry_free): free the entry
13 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
14 we get one from the message bus; fix memleaks.
16 * dbus/dbus-message.c (dbus_set_error_from_message): new function
18 2003-04-03 Havoc Pennington <hp@pobox.com>
20 * bus/config-parser.c (bus_config_parser_unref): free
21 list of mechanisms, bug discovered by test suite enhancements
22 (putting system.conf and session.conf into suite)
24 * test/Makefile.am, test/test-service.c: add placeholder for a
25 test service that we'll activate as part of test suite. Doesn't
28 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
29 setting NULL value, and use system malloc not dbus_malloc()
30 when we have unavoidable memleakage.
32 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
33 didn't work, and support DBUS_BUS_ACTIVATION.
35 * bus/activation.c (child_setup): pass our well-known bus type to
38 * bus/config-parser.c: support <type> to specify well-known type
40 * doc/dbus-specification.sgml: document the env variables to
41 locate well-known buses and find service activator
43 2003-04-02 Havoc Pennington <hp@redhat.com>
45 * test/Makefile.am (all-local): add a rule to copy tests to
46 builddir, so we can have generated tests. Use this to remove the
47 silly hack for testing system.conf and session.conf. Will use this
48 shortly to generate .service files pointing to test binaries.
50 2003-04-02 Havoc Pennington <hp@redhat.com>
52 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
53 current alloc and needed new length, not max of the doubled
54 allocation and needed new length. Also, when building tests,
55 don't do the double-allocation stuff, just realloc every time.
57 2003-04-02 Havoc Pennington <hp@redhat.com>
59 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
61 (_dbus_string_get_dirname): new
62 (_dbus_sysdeps_test): new
63 (_dbus_directory_open): include dirnames in error messages
65 * bus/config-parser.c: interpret <include> and <includedir> and
66 <servicedir> relative to config file location if the given
67 filename is not absolute.
69 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
71 2003-04-02 Havoc Pennington <hp@redhat.com>
73 * bus/connection.c (bus_transaction_send_error_reply): set sender
74 service for the error, and unref the reply on success
76 * bus/activation.c: convert to use BusTransaction so OOM can be
78 (bus_activation_service_created): set sender of the message
80 2003-04-01 Havoc Pennington <hp@redhat.com>
82 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
83 <includedir> (at least mostly)
85 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
86 first, then the user ID
88 2003-04-01 Havoc Pennington <hp@pobox.com>
90 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
93 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
95 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
97 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
98 socket 0777, and unlink any existing socket.
100 * bus/bus.c (bus_context_new): change our UID/GID and fork if
101 the configuration file so specifies; set up auth mechanism
104 * bus/config-parser.c (bus_config_parser_content): add support
105 for <fork> option and fill in code for <auth>
107 * bus/system.conf.in: add <fork/> to default configuration,
108 and limit auth mechanisms to EXTERNAL
110 * doc/config-file.txt (Elements): add <fork>
112 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
113 (_dbus_change_identity): new function
115 2003-03-31 Havoc Pennington <hp@redhat.com>
117 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
118 (_dbus_listen_unix_socket): fix off-by-one error in null
119 termination spotted by Nalin
121 2003-03-31 Havoc Pennington <hp@redhat.com>
123 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
124 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
125 having a real home directory available.
127 2003-03-31 Havoc Pennington <hp@redhat.com>
129 * bus/Makefile.am (install-data-hook): create /var/run/dbus
131 * bus/messagebus.in: add init script for Red Hat /etc/init.d
133 * configure.in: add support for specifying a style of init script
136 2003-03-31 Havoc Pennington <hp@redhat.com>
138 Fix some annoying DBusString API and fix all affected code.
140 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
142 (_dbus_string_get_data): change to return string instead of using
144 (_dbus_string_get_const_data): ditto
145 (_dbus_string_get_data_len): ditto
146 (_dbus_string_get_const_data_len): ditto
148 2003-03-31 Havoc Pennington <hp@redhat.com>
150 * bus/main.c (main): fix up the command line arguments to be nicer
152 2003-03-31 Havoc Pennington <hp@redhat.com>
154 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
155 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
156 final location that lands in the config file
158 * bus/config-loader-expat.c (bus_config_load): fix type of
161 * doc/TODO: remove TODO item for dbus_bus_get()
163 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
165 2003-03-31 Havoc Pennington <hp@pobox.com>
167 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
168 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
169 argument since they are always client side
171 * dbus/dbus-server.c (dbus_server_get_address): new function
173 * bus/main.c (main): take the configuration file as an argument.
175 * test/data/valid-config-files/debug-allow-all.conf: new file to
176 use with dispatch.c tests for example
178 * bus/test-main.c (main): require test data dir
180 * bus/bus.c (bus_context_new): change this to take a
181 configuration file name as argument
183 * doc/config-file.txt (Elements): add <servicedir>
185 * bus/system.conf, bus/session.conf: new files
187 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
188 well-known socket if none set
190 * configure.in: create system.conf and session.conf
192 2003-03-30 Havoc Pennington <hp@pobox.com>
194 * bus/config-parser.c: hacking
196 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
197 to shut down, since it could cause weirdness with the DBusList
200 * dbus/dbus-list.c (_dbus_list_test): add tests for the
201 link-oriented stack routines
202 (alloc_link): free the mempool if the first alloc from it fails
204 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
206 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
208 (_dbus_string_skip_white): new
210 * doc/config-file.txt (Elements): add <includedir>
212 2003-03-28 Havoc Pennington <hp@pobox.com>
214 * dbus/dbus-string.c (_dbus_string_copy_data_len)
215 (_dbus_string_copy_data): new functions
217 2003-03-28 Anders Carlsson <andersca@codefactory.se>
219 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
223 * dbus/dbus-memory.c:
226 2003-03-28 Havoc Pennington <hp@pobox.com>
228 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
229 I think it may have just been superstition. Not sure.
231 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
232 failures that were not being handled.
234 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
236 * dbus/dbus-memory.c: add ability to set number of mallocs in a
237 row that will fail on out-of-memory.
239 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
240 function for testing out-of-memory handling.
242 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
243 allocation functions, they do map exactly to the expat ones.
245 2003-03-27 Havoc Pennington <hp@redhat.com>
247 * bus/config-loader-libxml.c (bus_config_load): add another error
250 2003-03-26 Anders Carlsson <andersca@codefactory.se>
253 Add note about automatic service activation.
255 * doc/dbus-specification.sgml:
256 Rename the specification and clarify a few things.
258 2003-03-26 Anders Carlsson <andersca@codefactory.se>
261 * dbus/dbus-address.c:
263 * dbus/dbus-marshal.c:
264 * dbus/dbus-server-debug-pipe.c:
265 * dbus/dbus-transport-unix.c:
266 Fix documentation warnings.
268 2003-03-26 Havoc Pennington <hp@pobox.com>
270 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
271 after every test so it's quick and easy to see which leaked, and
272 so we test multiple dbus_shutdown() calls
274 * configure.in: change configure.in XML stuff to also support
277 * config-loader-libxml.c: some hacking
279 * config-loader-expat.c: some hacking
281 * config-parser.c: some hacking, plus tests
283 2003-03-25 Havoc Pennington <hp@redhat.com>
285 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
287 * configure.in: add --with-xml option to specify XML library,
288 right now only libxml is supported.
290 * bus/config-loader-libxml.c, config-parser.c: sync some minor
291 nonworking code between home and work, still just stubs
293 2003-03-24 Havoc Pennington <hp@redhat.com>
295 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
298 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
299 NULL argument for "message" if the error is a well-known one,
300 fill in a generic message in this case.
302 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
305 * bus/test.c (bus_test_flush_bus): add
307 * bus/policy.c (bus_policy_test): test code stub
309 2003-03-24 Havoc Pennington <hp@pobox.com>
311 * bus/connection.c (bus_connections_setup_connection): set up
312 the "can this user connect" function, but it always returns
313 TRUE until we have a config file parser so we can have a config
314 file that allows connections.
316 2003-03-23 Havoc Pennington <hp@pobox.com>
318 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
319 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
320 the mutex, so we can check for proper memory management
323 * dbus/dbus-dataslot.c: remove the mutex from
324 DBusDataSlotAllocator and lock it manually when using it,
325 to simplify fitting it into the global slots framework.
327 * dbus/dbus-threads.c (init_static_locks): rework how we're
328 handling global locks so they are easily shut down.
330 * bus/policy.c (bus_policy_append_rule): fix
332 * bus/test-main.c (main): check for memleaks
334 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
335 test suite check for memleaks
337 * dbus/dbus-memory.c: add support in test mode for tracking
338 number of outstanding blocks
340 2003-03-23 Havoc Pennington <hp@pobox.com>
342 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
345 * dbus/dbus-hash.h: add ULONG hash keys
347 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
348 (_dbus_get_group_id): new function
350 2003-03-20 Havoc Pennington <hp@redhat.com>
352 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
354 (dbus_connection_get_unix_user): new function
356 2003-03-20 Havoc Pennington <hp@pobox.com>
358 * bus/connection.c (bus_connection_send_oom_error): assert that
360 (connection_execute_transaction): ditto
361 (bus_connection_preallocate_oom_error): fix to set the sender, and
362 set recipient to the destination service, not the bus driver
364 * bus/policy.c: hacking
366 * dbus/dbus-message.c (dbus_message_service_is): new function
367 (dbus_message_sender_is): new
369 2003-03-19 Havoc Pennington <hp@redhat.com>
371 * bus/policy.c: start sketching code for policy restrictions on
372 what connections can do.
374 2003-03-18 Havoc Pennington <hp@redhat.com>
376 * doc/TODO: some notes on high-level todo items. Little nitpick
377 stuff is all in @todo, so no need to add it here.
379 * doc/config-file.txt: some notes on how config file might look
381 2003-03-18 Anders Carlsson <andersca@codefactory.se>
387 2003-03-17 Havoc Pennington <hp@redhat.com>
389 * dbus/dbus-internals.h: add gcc attributes so that
390 our printf-style functions warn on bad arguments to
393 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
396 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
399 2003-03-17 Havoc Pennington <hp@redhat.com>
401 * bus/test-main.c (main): make it print something as it runs
402 so make check doesn't look stuck
404 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
405 from CVS, now obsolete
407 2003-03-17 Anders Carlsson <andersca@codefactory.se>
409 * bus/dispatch.c: (bus_dispatch):
410 Refetch the service name since it may have been reallocated
411 when dbus_message_set_sender was called.
413 * dbus/dbus-sysdeps.c: (_dbus_accept):
414 Add address and address length variables and use them to stop
415 valgrind from complaining.
417 2003-03-17 Havoc Pennington <hp@pobox.com>
419 All tests pass, no memleaks, no valgrind complaints.
421 * bus/test.c: refcount handler_slot
423 * bus/connection.c (bus_connections_new): refcount
426 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
427 bytes so that auth scripts pass.
429 * bus/dispatch.c: init message_handler_slot so it gets allocated
432 * bus/dispatch.c (message_handler_slot_ref): fix memleak
434 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
435 dealloc server_pipe_hash when no longer used for benefit of
438 * dbus/dbus-auth.c (process_command): memleak fix
440 * bus/dispatch.c (check_hello_message): memleak fix
442 2003-03-16 Havoc Pennington <hp@pobox.com>
444 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
446 2003-03-17 Anders Carlsson <andersca@codefactory.se>
448 * bus/activation.c (bus_activation_activate_service): Append
449 the pending activation entry to the list of pending activations.
451 2003-03-16 Havoc Pennington <hp@pobox.com>
453 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
456 * dbus/dbus-address.c (create_entry): fix OOM handling when
457 failing to alloc entry->method
459 2003-03-16 Havoc Pennington <hp@pobox.com>
461 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
464 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
465 add some missing dbus_set_result
467 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
468 alloc the DBusMessageHandler
470 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
471 the transport here, since we call this from the finalizer; it
472 resulted in a double-finalize.
474 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
475 where we tried to use transport->connection that was NULL,
476 happened when transport was disconnected early on due to OOM
478 * bus/*.c: adapt to handle OOM for watches/timeouts
480 * dbus/dbus-transport-unix.c: port to handle OOM during
483 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
484 reference to unused bytes instead of a copy
486 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
489 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
492 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
495 2003-03-16 Anders Carlsson <andersca@codefactory.se>
497 * doc/dbus-specification.sgml:
498 Document reply message for ActivateService.
500 2003-03-16 Anders Carlsson <andersca@codefactory.se>
502 * bus/activation.c: (bus_pending_activation_entry_free),
503 (bus_pending_activation_free), (bus_activation_new),
504 (bus_activation_unref), (bus_activation_service_created),
505 (bus_activation_activate_service):
507 * bus/bus.c: (bus_context_new):
508 * bus/desktop-file.c: (new_section):
509 * bus/driver.c: (bus_driver_send_service_deleted),
510 (bus_driver_handle_activate_service):
511 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
513 * dbus/dbus-connection.c:
514 (dbus_connection_send_with_reply_and_block):
515 * dbus/dbus-message.c: (dbus_message_append_args_valist):
516 * dbus/dbus-protocol.h:
517 Make activation work better. Now pending activations will be queued
518 and the daemon won't try to activate services that are already registered.
520 2003-03-16 Havoc Pennington <hp@pobox.com>
522 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
525 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
526 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
528 2003-03-16 Havoc Pennington <hp@pobox.com>
530 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
531 this. always run the test suite before commit...
533 * bus/*: adapt to DBusConnection API changes
535 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
536 requires renaming stuff to avoid dbus_connection_dispatch name
539 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
542 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
543 separate from _dbus_message_loader_return_buffer()
545 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
546 this, because it's now always broken to use; the number of
547 messages in queue vs. the number still buffered by the message
548 loader is undefined/meaningless. Should use
549 dbus_connection_get_dispatch_state().
550 (dbus_connection_dispatch): rename from
551 dbus_connection_dispatch_message
553 2003-03-16 Havoc Pennington <hp@pobox.com>
555 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
558 2003-03-16 Anders Carlsson <andersca@codefactory.se>
560 * dbus/dbus-connection.c:
561 (dbus_connection_send_with_reply_and_block):
562 Decrease connection->n_incoming when removing an entry
564 * dbus/dbus-dict.c: (dbus_dict_entry_free),
565 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
566 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
567 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
568 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
569 (dbus_dict_get_byte_array):
570 Handle NULL arrays and strings. Also add support for byte arrays.
572 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
573 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
574 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
575 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
576 (_dbus_demarshal_dict), (demarshal_and_validate_len),
577 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
578 * dbus/dbus-marshal.h:
579 Add support for marshalling and demarshalling empty arrays and strings.
581 * dbus/dbus-message.c: (dbus_message_append_args_valist),
582 (dbus_message_append_string_array),
583 (dbus_message_iter_get_boolean),
584 (dbus_message_iter_get_boolean_array),
585 (dbus_message_iter_get_int32_array),
586 (dbus_message_iter_get_uint32_array),
587 (dbus_message_iter_get_double_array),
588 (dbus_message_iter_get_byte_array),
589 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
590 (check_message_handling):
591 Add support for getting empty arrays and dicts.
593 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
594 Don't do any validation at all for now, that's better than just checking
597 * test/data/valid-messages/emptiness.message:
598 New test message with lots of empty arrays.
600 2003-03-16 Havoc Pennington <hp@pobox.com>
602 * dbus/dbus-connection.c
603 (_dbus_connection_queue_received_message_link): new function that
604 can't fail due to OOM
606 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
607 new function pops a message together with a list link
610 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
611 message queuing functions to avoid needing to alloc memory
613 2003-03-16 Havoc Pennington <hp@pobox.com>
615 Oops - test code was only testing failure of around 30 of the
616 mallocs in the test path, but it turns out there are 500+
617 mallocs. I believe this was due to misguided linking setup such
618 that there was one copy of dbus_malloc etc. in the daemon and one
619 in the shared lib, and only daemon mallocs were tested. In any
620 case, the test case now tests all 500+ mallocs, and doesn't pass
621 yet, though there are lots of fixes in this patch.
623 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
624 this so that it doesn't need to allocate memory, since it
625 has no way of indicating failure due to OOM (and would be
628 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
630 * bus/Makefile.am: rearrange to create two self-contained
631 libraries, to avoid having libraries with overlapping symbols.
632 that was resulting in weirdness, e.g. I'm pretty sure there
633 were two copies of global static variables.
635 * dbus/dbus-internals.c: move the malloc debug stuff to
638 * dbus/dbus-list.c (free_link): free list mempool if it becomes
641 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
643 * dbus/dbus-address.c (dbus_parse_address): free list nodes
646 * bus/dispatch.c (bus_dispatch_add_connection): free
647 message_handler_slot when no longer using it, so
648 memory leak checkers are happy for the test suite.
650 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
652 * bus/bus.c (new_connection_callback): disconnect in here if
653 bus_connections_setup_connection fails.
655 * bus/connection.c (bus_connections_unref): fix to free the
657 (bus_connections_setup_connection): if this fails, don't
658 disconnect the connection, just be sure there are no side
661 * dbus/dbus-string.c (undo_alignment): unbreak this
663 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
665 (_dbus_auth_new): fix the order in which we free strings
668 * bus/connection.c (bus_connection_disconnected): fix to
669 not send ServiceDeleted multiple times in case of memory
672 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
673 get the base service name
674 (dbus_bus_register_client): don't return base service name,
675 instead store it on the DBusConnection and have an accessor
677 (dbus_bus_register_client): rename dbus_bus_register()
679 * bus/dispatch.c (check_hello_message): verify that other
680 connections on the bus also got the correct results, not
681 just the one sending hello
683 2003-03-15 Havoc Pennington <hp@pobox.com>
685 Make it pass the Hello handling test including all OOM codepaths.
686 Now to do other messages...
688 * bus/services.c (bus_service_remove_owner): fix crash when
689 removing owner from an empty list of owners
690 (bus_registry_ensure): don't leave service in the list of
691 a connection's owned services if we fail to put the service
694 * bus/connection.c (bus_connection_preallocate_oom_error): set
695 error flag on the OOM error.
697 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
698 handle _dbus_transport_set_connection failure
700 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
701 to create watches up front and simply enable/disable them as
703 (unix_connection_set): this can now fail on OOM
705 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
706 of enabling/disabling a watch or timeout.
708 * bus/loop.c (bus_loop_iterate): don't touch disabled
711 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
713 2003-03-15 Havoc Pennington <hp@pobox.com>
715 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
716 write useful test code, after all that futzing around ;-)
718 Test does not yet pass because we can't handle OOM in
719 _dbus_transport_messages_pending (basically,
720 dbus_connection_preallocate_send() does not prealloc the write
721 watch). To fix this, I think we need to add new stuff to
722 set_watch_functions, namely a SetEnabled function so we can alloc
723 the watch earlier, then enable it later.
725 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
726 dbus-memory.c to the convenience lib
728 * bus/test.c: rename some static functions to keep them clearly
729 distinct from stuff in connection.c. Handle client disconnection.
731 2003-03-14 Havoc Pennington <hp@pobox.com>
733 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
734 transport, tests more of the real codepath. Set up clients
735 with bus_setup_debug_client.
737 * bus/test.c (bus_setup_debug_client): function to set up debug
738 "clients" on the main loop
740 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
743 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
746 * dbus/dbus-server-debug.c: support a debug server based on pipes
748 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
749 (_dbus_close): new function
751 * configure.in: check for socketpair
753 2003-03-14 Havoc Pennington <hp@redhat.com>
755 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
758 * dbus/dbus-transport-debug.c: rework this a good bit to be
759 less complicated. hopefully still works.
761 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
764 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
767 * dbus/dbus-message.c (dbus_message_copy): rename from
768 dbus_message_new_from_message, fix it up to copy
769 all the message fields, add test case
771 * bus/dispatch.c (bus_dispatch_test): add some more test code,
772 not quite passing yet
774 2003-03-14 Havoc Pennington <hp@pobox.com>
776 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
777 until no work remains" in test code. (the large diff here
778 is just code movement, no actual changes)
780 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
781 1, no point waiting around for test code.
782 (_dbus_server_debug_accept_transport): unref the timeout
783 after adding it (right?)
785 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
787 2003-03-13 Havoc Pennington <hp@redhat.com>
789 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
792 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
795 * dbus/dbus-connection.h: Make AddWatchFunction and
796 AddTimeoutFunction return a bool so they can fail on out-of-memory
798 * bus/bus.c (bus_context_new): set up timeout handlers
800 * bus/connection.c (bus_connections_setup_connection): set up
803 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
806 * bus/bus.c (bus_context_new): adapt to changes
808 * bus/connection.c: adapt to changes
810 * test/watch.c: adapt to DBusWatch changes
812 * bus/dispatch.c (bus_dispatch_test): started adding this but
815 2003-03-14 Anders Carlsson <andersca@codefactory.se>
817 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
819 2003-03-13 Havoc Pennington <hp@pobox.com>
821 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
822 set up a test framework as for the library
824 2003-03-12 Havoc Pennington <hp@pobox.com>
826 Throughout: purge global variables, introduce BusActivation,
827 BusConnections, BusRegistry, etc. objects instead.
829 * bus/bus.h, bus/bus.c: introduce BusContext as a global
832 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
833 going to redo this a bit differently I think
835 2003-03-12 Havoc Pennington <hp@redhat.com>
837 Mega-patch that gets the message bus daemon initially handling
838 out-of-memory. Work still needed. Also lots of random
839 moving stuff to DBusError instead of ResultCode.
841 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
843 * dbus/dbus-connection.c
844 (dbus_connection_send_with_reply_and_block): use DBusError
846 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
849 * dbus/dbus-connection.c (dbus_connection_send): drop the result
850 code here, as the only failure possible is OOM.
852 * bus/connection.c (bus_connection_disconnect):
853 rename bus_connection_disconnected as it's a notification only
855 * bus/driver.c (bus_driver_handle_acquire_service): don't free
856 "name" on get_args failure, should be done by get_args;
857 don't disconnect client for bad args, just return an error.
858 (bus_driver_handle_service_exists): ditto
860 * bus/services.c (bus_services_list): NULL-terminate returned array
862 * bus/driver.c (bus_driver_send_service_lost)
863 (bus_driver_send_service_acquired): send messages from driver to a
864 specific client to the client's unique name, not to the broadcast
867 * dbus/dbus-message.c (decode_header_data): reject messages that
868 contain no name field
869 (_dbus_message_get_client_serial): rename to
870 dbus_message_get_serial and make public
871 (_dbus_message_set_serial): rename from set_client_serial
872 (_dbus_message_set_reply_serial): make public
873 (_dbus_message_get_reply_serial): make public
875 * bus/connection.c (bus_connection_foreach): allow stopping
876 iteration by returning FALSE from foreach function.
878 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
879 (dbus_connection_free_preallocated_send)
880 (dbus_connection_preallocate_send): new API for sending a message
881 without possibility of malloc failure.
882 (dbus_connection_send_message): rename to just
883 dbus_connection_send (and same for whole function family)
885 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
887 * dbus/dbus-sysdeps.c (_dbus_exit): new function
889 * bus/activation.c: handle/return errors
891 * dbus/dbus-errors.h: add more DBUS_ERROR #define
893 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
894 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
895 (_dbus_result_from_errno): move to this file
897 2003-03-10 Anders Carlsson <andersca@codefactory.se>
899 * dbus/dbus-marshal.c:
900 (_dbus_marshal_set_string):
901 Take a length argument so we can marshal the correct string
904 (_dbus_marshal_dict), (_dbus_demarshal_dict),
905 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
906 (_dbus_marshal_test):
907 * dbus/dbus-marshal.h:
908 Add support for marshalling and demarshalling dicts.
910 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
911 Add support for TYPE DICT.
913 * dbus/dbus-message.c: (set_string_field):
914 Adjust header padding.
916 (dbus_message_append_args_valist), (dbus_message_append_dict),
917 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
918 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
919 (check_message_handling), (check_have_valid_message):
920 * dbus/dbus-message.h:
921 Add functions for setting and getting dicts.
923 * dbus/dbus-protocol.h:
929 * doc/dbus-specification.sgml:
930 Add information about how dicts are marshalled.
932 * test/data/invalid-messages/dict-with-nil-value.message:
933 * test/data/invalid-messages/too-short-dict.message:
934 * test/data/valid-messages/dict-simple.message:
935 * test/data/valid-messages/dict.message:
936 Add sample messages containing dicts.
938 2003-03-08 Anders Carlsson <andersca@codefactory.se>
940 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
942 2003-03-07 Anders Carlsson <andersca@codefactory.se>
945 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
946 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
947 (dbus_dict_set_int32), (dbus_dict_set_uint32),
948 (dbus_dict_set_double), (dbus_dict_set_string),
949 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
950 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
951 (dbus_dict_set_string_array), (_dbus_dict_test):
953 Fix according to comments from Havoc.
955 2003-03-06 Michael Meeks <michael@server.home>
957 * configure.in: if we don't have kde-config, disable have_qt.
959 2003-03-07 Anders Carlsson <andersca@codefactory.se>
964 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
965 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
966 (dbus_dict_remove), (dbus_dict_get_value_type),
967 (dbus_dict_get_keys), (dbus_dict_put_boolean),
968 (dbus_dict_put_int32), (dbus_dict_put_uint32),
969 (dbus_dict_put_double), (dbus_dict_put_string),
970 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
971 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
972 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
973 (dbus_dict_get_int32), (dbus_dict_get_uint32),
974 (dbus_dict_get_double), (dbus_dict_get_string),
975 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
976 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
977 (dbus_dict_get_string_array), (_dbus_dict_test):
979 Add DBusDict implementation
981 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
985 2003-03-04 Havoc Pennington <hp@pobox.com>
987 * test/data/auth/*: adapt to changes
989 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
990 USERID_BASE64 and change USERNAME_BASE64 to put in username not
993 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
994 more stuff from being in a context name, to make the protocol
997 * dbus/dbus-errors.c (dbus_error_has_name): new function
998 (dbus_error_is_set): new function
1000 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1001 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1003 * dbus/dbus-connection.c (dbus_connection_flush): also read
1004 messages during a flush operation
1006 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1008 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1010 * configure.in: Check for gethostbyname on Solaris.
1012 * dbus/dbus-transport.c: (_dbus_transport_open):
1013 Remove duplicate "tcp" entry.
1015 * doc/dbus-specification.sgml:
1016 Clarify some things.
1018 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1020 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1021 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1022 (_dbus_keyring_test):
1023 * dbus/dbus-md5.c: (_dbus_md5_compute):
1024 * dbus/dbus-sha.c: (_dbus_sha_compute):
1027 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1029 * README: Add some things.
1031 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1033 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1034 after case DBUS_TYPE_BOOELAN.
1036 2003-03-02 Havoc Pennington <hp@pobox.com>
1038 * test/break-loader.c (randomly_set_extreme_ints): add test that
1039 sets really huge and small integers
1041 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1042 that length of boolean array fits in the string, and that
1043 string has room for boolean value in single-bool case.
1045 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1046 optional value to "ALIGN" command which is what to fill the
1049 * test/data/valid-messages/no-padding.message: add regression
1050 test for the message padding problem
1052 2003-03-02 Havoc Pennington <hp@pobox.com>
1054 * dbus/dbus-message.c (decode_header_data): fix to always init
1055 message_padding, from Benjamin Dauvergne
1057 2003-03-02 Havoc Pennington <hp@pobox.com>
1063 2003-03-01 Joe Shaw <joe@assbarn.com>
1065 * configure.in: Check for "struct cmsgcred" and try to access its
1066 members for BSD-like unices.
1068 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1069 _dbus_read_credentials_unix_socket().
1070 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1071 read() for reading the credential byte off the unix socket. Use
1072 struct cmsgcred on systems that support it.
1074 2003-02-27 Alexander Larsson <alexl@redhat.com>
1078 Make gthreads-2.0 dependency optional. Don't build thread test if
1081 2003-02-27 Havoc Pennington <hp@pobox.com>
1083 * dbus/dbus-connection.c
1084 (dbus_connection_send_message_with_reply_and_block): fix doh!
1085 doh! doh! bug that resulted in never removing a reply from the
1086 queue, no wonder we called get_reply_serial so much ;-)
1088 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1089 and client serial instead of demarshaling them every time
1091 2003-02-27 Havoc Pennington <hp@pobox.com>
1093 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1094 more inlined, using dbus-string-private.h, speeds things up
1097 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1098 when freeing the string
1099 (_dbus_string_steal_data): fix for align offset
1100 (undo_alignment): new function
1102 2003-02-26 Havoc Pennington <hp@redhat.com>
1104 All kinds of audit fixes from Owen, plus initial attempt to
1105 handle unaligned memory returned from malloc.
1107 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1108 leave room for align_offset and nul byte
1109 (fixup_alignment): function to track an align_offset and
1110 ensure real->str is aligned
1111 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1112 to allow a nul byte plus align offset
1113 (_dbus_string_lock): fix overflow issue
1114 (_dbus_string_init_const_len): add assertions on sanity of len,
1115 assign allocated to be ALLOCATION_PADDING larger than len
1116 (set_length): fixup the overflow handling
1117 (_dbus_string_get_data_len): fix overflow in assertion
1118 (open_gap): detect overflow in size of gap to be opened
1119 (_dbus_string_lengthen): add overflow check
1120 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1121 (_dbus_string_append): add overflow check
1122 (_dbus_string_append_unichar): overflow
1123 (_dbus_string_delete): fix overflow in assertion
1124 (_dbus_string_copy_len): overflow in assertion
1125 (_dbus_string_replace_len): overflows in assertions
1126 (_dbus_string_find): change to implement in terms of
1127 _dbus_string_find_to
1128 (_dbus_string_find_to): assorted fixage
1129 (_dbus_string_equal_c_str): assert c_str != NULL,
1130 fix logic so the function works
1131 (_dbus_string_ends_with_c_str): fix overflow thingy
1132 (_dbus_string_base64_encode): overflow fix
1133 (_dbus_string_validate_ascii): overflow
1134 (_dbus_string_validate_nul): overflow
1136 2003-02-26 Havoc Pennington <hp@redhat.com>
1138 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1140 2003-02-26 Alexander Larsson <alexl@redhat.com>
1143 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1145 * dbus/dbus-connection.c:
1146 * dbus/dbus-connection.h:
1147 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1148 Add dbus_connection_set_wakeup_main_function and use it when queueing
1149 incoming and outgoing messages.
1152 * dbus/dbus-dataslot.c:
1153 Threadsafe usage of DBusDataSlotAllocator
1155 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1158 * dbus/dbus-server-unix.c:
1161 * glib/dbus-gmain.c:
1162 Implement the new wakeup functions for glib.
1165 * glib/test-thread-client.c:
1166 * glib/test-thread-server.c:
1167 * glib/test-thread.h:
1168 Initial cut at some thread test code. Not really done yet.
1170 2003-02-26 Havoc Pennington <hp@pobox.com>
1172 * dbus/dbus-connection.c
1173 (dbus_connection_send_message_with_reply_and_block): fix crash
1174 where we ref'd the outgoing message instead of the returned reply
1176 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1177 at the end of this function, so if we didn't need to read for
1178 authentication, we reinstall it for receiving messages
1180 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1181 a NULL sender for peer-to-peer case
1183 * dbus/dbus-transport-unix.c (check_read_watch): handle
1184 !authenticated case correctly
1186 * glib/dbus-gmain.c: add support for DBusServer
1188 * dbus/dbus-server.c: add data slot support
1190 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1191 return values and handle errors
1193 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1196 * Doxyfile.in (INPUT): add glib subdir
1198 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1199 setup_with_g_main instead of hookup_with_g_main; write docs
1201 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1203 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1204 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1205 * dbus/dbus-message.c: (dbus_message_append_boolean),
1206 (dbus_message_append_boolean_array),
1207 (dbus_message_get_args_valist), (_dbus_message_test):
1208 * dbus/dbus-message.h:
1209 * doc/dbus-specification.sgml:
1210 Various fixes as pointed out by Havoc.
1212 * test/data/invalid-messages/bad-boolean-array.message:
1213 * test/data/invalid-messages/bad-boolean.message:
1214 Add invalid boolean value test cases.
1216 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1218 * dbus/dbus-internals.c: (_dbus_type_to_string):
1219 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1220 (_dbus_marshal_validate_arg):
1221 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1222 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1223 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1224 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1225 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1226 (dbus_message_iter_get_double),
1227 (dbus_message_iter_get_boolean_array), (message_iter_test):
1228 * dbus/dbus-message.h:
1229 * dbus/dbus-protocol.h:
1230 * doc/dbus-specification.sgml:
1231 * test/data/valid-messages/lots-of-arguments.message:
1232 Add support for boolean and boolean array types.
1234 2003-02-23 Havoc Pennington <hp@pobox.com>
1236 * dbus/dbus-keyring.c: finish most of this implementation and
1239 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1240 these barf if the error isn't cleared to NULL
1242 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1243 (_dbus_create_directory): new function
1245 * dbus/dbus-errors.c (dbus_set_error): fix warning
1247 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1248 (_dbus_string_hex_decode): new function
1249 (test_hex_roundtrip): test code
1251 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1253 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1255 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1256 the save-to-temp/rename trick to atomically write the new file
1257 (_dbus_string_parse_uint): new function
1259 2003-02-22 Havoc Pennington <hp@pobox.com>
1261 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1263 2003-02-22 Havoc Pennington <hp@pobox.com>
1265 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1266 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1268 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1270 * dbus/test/data/sha-1: add US government test suite for SHA-1
1272 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1274 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1275 Make string arrays NULL-terminated.
1277 * dbus/dbus-memory.c: (dbus_free_string_array):
1278 * dbus/dbus-memory.h:
1279 New function for freeing NULL-terminated string arrays.
1281 * dbus/dbus-message-builder.c: (append_quoted_string),
1282 (_dbus_message_data_load):
1283 Add support for array types.
1285 * dbus/dbus-message.c: (check_message_handling):
1286 Add more types as test cases.
1288 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1289 (_dbus_string_parse_double):
1290 Add the start offset to the end offset.
1292 * test/data/valid-messages/lots-of-arguments.message:
1293 New test message with lots of arguments.
1295 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1297 * dbus/dbus-message.c: (dbus_message_append_nil),
1298 (dbus_message_append_int32), (dbus_message_append_uint32),
1299 (dbus_message_append_double), (dbus_message_append_string),
1300 (dbus_message_append_int32_array),
1301 (dbus_message_append_uint32_array),
1302 (dbus_message_append_double_array),
1303 (dbus_message_append_byte_array),
1304 (dbus_message_append_string_array):
1305 Fix all out-of-memory handling in these functions.
1307 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1309 * dbus/dbus-message.c: (dbus_message_append_nil):
1312 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1314 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1315 (dbus_message_append_nil), (dbus_message_append_int32_array),
1316 (dbus_message_append_uint32_array),
1317 (dbus_message_append_double_array),
1318 (dbus_message_append_byte_array),
1319 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1320 (dbus_message_iter_get_int32_array),
1321 (dbus_message_iter_get_uint32_array),
1322 (dbus_message_iter_get_double_array),
1323 (dbus_message_iter_get_byte_array),
1324 (dbus_message_iter_get_string_array):
1326 * dbus/dbus-message.h:
1327 Add functions for appending and getting arrays.
1329 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1331 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1332 element size at least 8 bytes, fixes mempool tests on
1335 2003-02-20 Alexander Larsson <alexl@redhat.com>
1337 * dbus/dbus-transport-unix.c (unix_do_iteration):
1338 Unlock the connection mutex during a blocking select call.
1339 Add todo about how we need a way to wake up the select.
1341 * dbus/dbus-connection-internal.h:
1342 * dbus/dbus-connection.c:
1343 Add _dbus_connection_lock and _dbus_connection_unlock.
1345 2003-02-19 Havoc Pennington <hp@pobox.com>
1347 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1348 Doxyfile.in, not Doxyfile
1350 * dbus/dbus-keyring.c: do some hacking on this
1352 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1354 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1356 (dbus_set_error): remove dbus_error_init, check for message ==
1357 NULL *before* we sprintf into it, and add @todo about including
1358 system headers in this file
1360 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1362 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1364 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1365 get various bits of user information based on either username
1367 (_dbus_homedir_from_username): new function
1369 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1372 Add check for nonposix getpwnam_r
1374 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1375 Align the pool element size to a sizeof (void *) boundary.
1377 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1378 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1379 General Solaris fixes.
1381 * test/data/valid-messages/simplest-manual.message:
1382 Explicitly state that we want little-endian packing.
1384 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1386 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1388 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1389 Added to create a transport connecting using a tcp/ip socket.
1391 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1392 to a tcp socket at given host and port.
1393 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1396 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1398 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1399 Added to create a server listening on a TCP/IP socket.
1401 2003-02-19 Havoc Pennington <hp@pobox.com>
1403 Throughout: mop up all the Doxygen warnings and undocumented
1406 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1407 to search any paths.
1409 * dbus/dbus-threads.c: move global mutex initializers to
1410 dbus-internals.h, multiple prototypes was confusing doxygen
1411 besides being kind of ugly
1413 * Doxyfile (PREDEFINED): have Doxygen define
1414 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1415 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1416 (do not abuse the feature! it's for stuff like the autogenerated
1417 macros in dbus-md5.c, not just for things you don't feel like
1420 2003-02-18 Havoc Pennington <hp@pobox.com>
1422 * dbus/dbus-string.c (_dbus_string_zero): new function
1424 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1425 wrap it in some dbus-friendly API
1427 * dbus/dbus-types.h: add 16-bit types
1429 2003-02-18 Joe Shaw <joe@assbarn.com>
1431 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1432 credentials from our currently running process.
1433 (get_word): Fix a buglet where we were copying the entire length
1434 instead of relative to our position.
1436 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1437 keys on the stack... it's 640k of data.
1439 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1440 read the credentials byte off the socket, even if we don't have
1442 (_dbus_poll): Implement poll() using select() for systems which
1445 * glib/test-dbus-glib.c (main): Print out an error if no
1446 parameters are given.
1448 * test/data/auth/fallback.auth-script: Added. Tests that a client
1449 can fallback to a secondary auth mechanism if the first fails.
1451 2003-02-18 Havoc Pennington <hp@pobox.com>
1455 2003-02-17 Havoc Pennington <hp@pobox.com>
1457 * doc/dbus-specification.sgml: lots of cosmetic
1458 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1459 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1460 s/server/bus/ (except in authentication section). Add a section
1461 "Message Bus Message Routing"
1463 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1469 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1471 * doc/dbus-specification.sgml:
1472 Specification updates.
1474 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1476 * bus/activation.c: (bus_activation_init), (child_setup),
1477 (bus_activation_activate_service):
1479 * bus/main.c: (main):
1480 Set DBUS_ADDRESS environment variable.
1482 * dbus/dbus-errors.c: (dbus_set_error):
1483 Don't use va_copy since that's a C99 feature.
1485 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1486 (_dbus_spawn_async):
1487 * dbus/dbus-sysdeps.h:
1488 Add child_setup_func to _dbus_spawn_async.
1490 * doc/dbus-specification.sgml:
1491 Update specification.
1493 * test/spawn-test.c: (setup_func), (main):
1496 2003-02-17 Alexander Larsson <alexl@redhat.com>
1498 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1501 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1505 * doc/dbus-test-plan.sgml:
1506 Add test plan document.
1511 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1513 * dbus/dbus-message.c: (decode_header_data),
1514 (_dbus_message_loader_return_buffer):
1515 Set the header padding amount when loading a message.
1517 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1519 * bus/dispatch.c: (send_one_message):
1520 Only send broadcast messages to registered connections.
1522 * dbus/dbus-message.c: (dbus_message_name_is):
1523 * dbus/dbus-message.h:
1524 New convenience function.
1526 * dbus/dbus-transport-debug.c: (do_reading):
1527 Only dispatch one message per run.
1530 * test/bus-test.c: (new_connection_callback), (die),
1531 (test_hello_client1_handler), (test_hello_client2_handler),
1532 (test_hello_replies), (main):
1534 * test/bus-test-loop.[ch]:
1537 2003-02-16 Havoc Pennington <hp@pobox.com>
1539 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1540 backward conditional
1542 2003-02-16 Alexander Larsson <alexl@redhat.com>
1544 * dbus/dbus-connection.c:
1545 Implement sent_message_with_reply. (with_reply_and block is still
1547 Made dispatch_message not lose message if OOM.
1549 * dbus/dbus-errors.h:
1550 Add NoReply error (for reply timeouts).
1552 2003-02-16 Alexander Larsson <alexl@redhat.com>
1554 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1555 Actually free keys and values when destroying hashtable.
1557 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1559 * dbus/dbus-auth.c: (client_try_next_mechanism):
1562 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1563 Return TRUE if there's no thread implementation around.
1565 * glib/dbus-gmain.c: (free_source),
1566 (dbus_connection_hookup_with_g_main):
1567 Make sure to remove the GSource when the connection is finalized.
1569 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1571 * bus/dispatch.c: (bus_dispatch_message_handler):
1572 * dbus/dbus-errors.h:
1573 Return an error if someone tries to send a message to a service
1576 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1578 * bus/activation.c: (load_directory), (bus_activation_init),
1579 (bus_activation_activate_service):
1582 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1583 More work on the activation handling.
1585 * dbus/dbus-errors.h:
1586 Add some error messages
1588 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1589 * dbus/dbus-message.h:
1590 New function that creates an error message.
1592 * dbus/dbus-protocol.h:
1593 Add ACTIVATE_SERVER message.
1595 * dbus/dbus-server-unix.c: (unix_handle_watch),
1596 (_dbus_server_new_for_domain_socket):
1597 Call _dbus_fd_set_close_on_exec.
1599 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1600 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1601 (_dbus_fd_set_close_on_exec):
1602 * dbus/dbus-sysdeps.h:
1603 Add _dbus_fd_set_close_on exec function. Also add function that checks
1604 that all open fds are set to close-on-exec and warns otherwise.
1606 * dbus/dbus-transport-unix.c:
1607 (_dbus_transport_new_for_domain_socket):
1608 Call _dbus_fd_set_close_on_exec.
1610 2003-02-16 Havoc Pennington <hp@pobox.com>
1612 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1613 allow people to avoid setting SIGPIPE to SIG_IGN
1614 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1615 we've been asked not to
1617 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1619 * dbus/dbus-list.c: (_dbus_list_append_link),
1620 (_dbus_list_prepend_link):
1621 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1625 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1628 * bus/activation.c: (bus_activation_entry_free),
1629 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1631 * bus/main.c: (main):
1632 Add simple activation support, doesn't work yet though.
1634 2003-02-15 Zack Rusin <zack@kde.org>
1636 * qt/dbus-qthread.cpp: small casting fix
1638 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1640 * dbus/dbus-errors.c: (dbus_set_error):
1641 * dbus/dbus-errors.h:
1642 Add a few errors and make dbus_set_error void.
1644 * dbus/dbus-sysdeps.c:
1645 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1646 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1647 * dbus/dbus-sysdeps.h:
1648 Add _dbus_spawn_async.
1650 * test/spawn-test.c: (main):
1651 Test for _dbus_spawn_async.
1653 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1655 * dbus/dbus-internals.h:
1656 Fix build without tests.
1658 * dbus/dbus-list.c: (alloc_link):
1659 Fix a segfault when a malloc fails.
1661 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1662 (dbus_malloc0), (dbus_realloc):
1663 Add support for malloc debugging.
1665 2003-02-15 Alexander Larsson <alexl@redhat.com>
1667 * dbus/dbus-threads.c:
1668 * dbus/dbus-threads.h:
1669 Add condvars. Remove static mutext from API.
1670 Implement static mutexes by initializing them from threads_init.
1672 * glib/dbus-gthread.c:
1673 * qt/dbus-qthread.cpp:
1674 Update with the thread api changes.
1679 Turn StaticMutex into normal mutex + init function.
1680 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1681 _dbus_list_append_link, _dbus_list_prepend_link
1684 * dbus/dbus-sysdeps.c:
1685 * dbus/dbus-sysdeps.h:
1686 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1687 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1689 * dbus/dbus-protocol.h:
1690 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1692 * dbus/dbus-message.c:
1693 Make ref/unref atomic.
1696 * dbus/dbus-connection-internal.h:
1697 * dbus/dbus-connection.c:
1698 * dbus/dbus-connection.h:
1700 Change _peek to _borrow,_return & _steal_borrowed.
1701 Change disconnect callback to event.
1702 Make dbus_connection_dispatch_messages reentrant.
1704 * dbus/dbus-transport.c:
1705 Don't ref the connection on calls to the transport
1708 * dbus/dbus-message-handler.c:
1711 * glib/dbus-gmain.c:
1712 Don't use peek_message anymore
1715 * test/debug-thread.c:
1716 * test/debug-thread.h:
1717 Simple thread implementation that asserts() on deadlocks in
1718 single-threaded code.
1721 (main) Call debug_threads_init.
1724 Use disconnect message instead of disconnect callback.
1728 Don't call dbus_connection_set_disconnect_function. Instead export
1729 bus_connection_disconnect.
1732 Call bus_connection_disconnect when we get a disconnected message.
1734 2003-02-15 Havoc Pennington <hp@pobox.com>
1736 * dbus/dbus-message.c (dbus_message_new): fool around with the
1739 2003-02-14 Havoc Pennington <hp@pobox.com>
1741 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1743 * dbus/dbus-memory.c: fail if the debug functions indicate we
1746 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1747 (_dbus_decrement_fail_alloc_counter): debug functions to
1748 simulate memory allocation failures
1750 2003-02-14 Havoc Pennington <hp@pobox.com>
1752 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1755 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1757 * bus/driver.c: (bus_driver_handle_hello):
1759 * bus/services.c: (bus_service_lookup):
1760 Reorder message sending so we get a more sane order.
1762 * test/bus-test.c: (message_handler):
1765 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1767 * bus/driver.c: (bus_driver_send_service_deleted),
1768 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1769 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1770 (bus_driver_send_welcome_message),
1771 (bus_driver_handle_list_services),
1772 (bus_driver_handle_acquire_service),
1773 (bus_driver_handle_service_exists):
1774 * dbus/dbus-bus.c: (dbus_bus_register_client),
1775 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1776 * dbus/dbus-errors.c: (dbus_result_to_string):
1777 * dbus/dbus-errors.h:
1778 * dbus/dbus-message.c: (dbus_message_append_args),
1779 (dbus_message_append_args_valist), (dbus_message_get_args),
1780 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1781 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1782 (dbus_message_iter_get_byte_array),
1783 (dbus_message_iter_get_string_array), (message_iter_test),
1784 (check_message_handling), (_dbus_message_test):
1785 * dbus/dbus-message.h:
1786 * test/bus-test.c: (main):
1787 Change fields to arguments in messages, so that they won't be
1788 confused with header fields.
1790 * glib/test-dbus-glib.c: (main):
1791 Remove append_fields from hello message.
1793 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1795 * dbus/dbus-errors.c:
1796 * dbus/dbus-message.c:
1797 * dbus/dbus-string.c:
1798 Documentation fixes.
1800 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1802 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1804 Implement support for timeouts in dbus-glib.
1806 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1808 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1809 * dbus/dbus-message.c: (process_test_subdir):
1810 * test/break-loader.c: (find_breaks_based_on):
1811 Plug some memory leaks.
1813 2003-02-13 Richard Hult <rhult@codefactory.se>
1815 * bus/main.c: Fix build.
1817 * dbus/dbus-errors.h:
1818 * dbus/dbus-errors.c: Fix copyright for Anders.
1820 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1825 * bus/connection.c: (bus_connection_foreach):
1828 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1829 (unescape_string), (new_section), (parse_section_start),
1830 (parse_key_value), (report_error), (bus_desktop_file_load),
1831 (bus_desktop_file_get_string):
1832 * bus/desktop-file.h:
1833 Use DBusError for error reporting.
1835 * bus/dispatch.c: (send_one_message),
1836 (bus_dispatch_message_handler):
1837 * bus/driver.c: (bus_driver_send_service_deleted),
1838 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1839 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1840 (bus_driver_send_welcome_message),
1841 (bus_driver_handle_list_services),
1842 (bus_driver_handle_acquire_service),
1843 (bus_driver_handle_service_exists):
1844 * bus/loop.c: (bus_loop_run):
1846 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1848 * bus/utils.c: (bus_wait_for_memory):
1850 New files with general utility functions.
1852 * dbus/dbus-internals.h:
1853 Remove _DBUS_HANDLE_OOM.
1855 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1857 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1858 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1859 * dbus/dbus-errors.h:
1860 Add DBusError structure.
1862 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1864 * test/data/valid-messages/standard-acquire-service.message:
1865 * test/data/valid-messages/standard-hello.message:
1866 * test/data/valid-messages/standard-list-services.message:
1867 * test/data/valid-messages/standard-service-exists.message:
1868 Add some standard messages.
1870 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1872 * bus/driver.c: (bus_driver_send_welcome_message),
1873 (bus_driver_handle_list_services),
1874 (bus_driver_handle_acquire_service),
1875 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1876 Update for API changes in libdbus.
1878 * dbus/dbus-message.c: (dbus_message_new_reply):
1879 * dbus/dbus-message.h:
1880 Remove the name argument. The spec states that replies shouldn't
1883 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1885 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1886 (report_error), (bus_desktop_file_load), (lookup_section),
1887 (lookup_line), (bus_desktop_file_get_raw),
1888 (bus_desktop_file_get_string):
1889 * bus/desktop-file.h:
1890 Some fixes, and new functions for getting a key value from a section.
1892 2003-02-13 Havoc Pennington <hp@pobox.com>
1894 * test/data/auth/fail-after-n-attempts.auth-script: new test
1896 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1899 2003-02-13 Havoc Pennington <hp@pobox.com>
1901 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1902 dbus_credentials_match were backward
1904 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1905 NO_CREDENTIALS and ROOT_CREDENTIALS
1907 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1908 into here. Never process more commands after we've reached an
1909 end state; store further data as unused bytes.
1911 * test/data/auth/*: add more auth tests
1913 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1914 command to match exact string and EXPECT_UNUSED to match unused
1917 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1919 2003-02-12 Havoc Pennington <hp@pobox.com>
1921 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1922 \r off of popped lines
1924 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1927 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1930 2003-02-12 Havoc Pennington <hp@pobox.com>
1932 * dbus/Makefile.am: remove break-loader from the build, since it
1935 * configure.in: add --enable-gcov to turn on coverage profiling
1936 flags and disable optimization
1938 2003-02-10 Havoc Pennington <hp@pobox.com>
1940 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1941 initial cut at test framework for DBusAuth from laptop.
1942 Doesn't quite work yet but it compiles and I need to get
1943 it off the 266mhz laptop. ;-)
1945 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1946 fix a memleak in error case
1948 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1951 * bus/desktop-file.c:
1952 * bus/desktop-file.h:
1953 Add a desktop file parser.
1955 2003-02-11 Zack Rusin <zack@kde.org>
1957 * qt/message.[h|cpp]: sample implementation
1958 of the KDE wrapper for DBusMessage
1960 2003-02-09 Zack Rusin <zack@kde.org>
1962 * test/bus-test.c: make_it_compile
1963 * doc/dbus-specification.sgml: minimal semantic fix
1965 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1971 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1974 * dbus/dbus-break-loader.c:
1976 * test/break-loader.c:
1977 Move dbus-break-loader to test/ and rename it to break-loader.
1979 2003-02-02 Havoc Pennington <hp@pobox.com>
1981 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1982 for code to manage cookies in your home directory
1984 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1986 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1987 to authenticate, then disconnect the client.
1989 2003-02-03 Alexander Larsson <alexl@redhat.com>
1991 * dbus/dbus-message.c (dbus_message_append_fields):
1994 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1996 * doc/dbus-specification.sgml:
1997 Update address format section.
1999 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2002 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2003 (message_handler), (new_connection_callback), (loop_quit),
2007 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2009 * bus/driver.c: (bus_driver_handle_service_exists):
2010 Simplify the code a bit.
2012 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2015 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2018 Add libdbus-daemon.la and link to it.
2020 2003-02-01 James Willcox <jwillcox@gnome.org>
2022 * bus/driver.c: (bus_driver_handle_own_service):
2023 Actually include the service reply code in the message.
2025 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2027 * bus/driver.c: (bus_driver_handle_service_exists):
2028 Don't unref the incoming message.
2030 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2032 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2034 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2036 * dbus/dbus-server.c: (dbus_server_listen):
2037 * dbus/dbus-transport.c: (_dbus_transport_open):
2038 ifdef out the calls to the debug transport and server.
2040 2003-02-02 Alexander Larsson <alexl@redhat.com>
2042 * dbus/dbus-watch.c (dbus_watch_get_flags):
2043 Add note in the docs that ERROR or HANGUP won't be returned
2044 and are assumed always on.
2046 * glib/dbus-gmain.c (add_watch):
2047 Always add IO_ERR | IO_HUP
2049 * dbus/dbus-message.h:
2050 Add semicolon after dbus_message_iter_get_string_array().
2051 Makes qt code build again
2053 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2055 * bus/driver.c: (create_unique_client_name),
2056 (bus_driver_handle_hello):
2057 Don't take a name, just use a numeric id to identify
2061 * dbus/dbus-bus.c: (dbus_bus_register_client),
2062 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2064 Add new convenience functions for communicating with the bus.
2066 * dbus/dbus-message.h:
2068 * dbus/dbus-protocol.h:
2071 2003-02-01 Alexander Larsson <alexl@redhat.com>
2073 * dbus/dbus-message.c (dbus_message_append_fields):
2074 Add some more doc comments.
2076 2003-02-01 Havoc Pennington <hp@pobox.com>
2078 * dbus/dbus-break-loader.c (randomly_modify_length): change
2079 a 4-byte value in the message as if it were a length
2081 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2082 execute bit on saved files
2084 2003-02-01 Havoc Pennington <hp@pobox.com>
2086 * dbus/dbus-break-loader.c (main): new program to find messages
2087 that break the loader.
2089 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2090 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2092 * dbus/dbus-string.c (_dbus_string_set_byte): new
2094 2003-01-31 Havoc Pennington <hp@pobox.com>
2096 * dbus/dbus-message.c: refactor the test code to be more general,
2097 in preparation for writing a "randomly permute test cases to
2098 try to break the loader" program.
2100 2003-01-31 Havoc Pennington <hp@pobox.com>
2102 * doc/dbus-specification.sgml: work on the specification
2104 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2105 the protocol version of the message.
2107 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2108 no longer specifies that.
2109 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2112 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2113 "break" for DBUS_TYPE_NIL, remove @todo
2115 2003-01-31 Havoc Pennington <hp@pobox.com>
2117 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2118 just set_is_error/get_is_error as this is a commonly-used
2119 function, and write docs.
2121 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2123 * dbus/dbus-address.c: (dbus_address_entry_free):
2124 Free key and value lists.
2126 * dbus/dbus-internals.c: (_dbus_type_to_string):
2127 Add the types we didn't have.
2129 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2130 (_dbus_marshal_validate_arg):
2133 * dbus/dbus-message.c: (dbus_message_set_sender):
2134 Remove todo about being able to set sender to NULL.
2136 (dbus_message_set_is_error_reply),
2137 (dbus_message_get_is_error_reply):
2138 * dbus/dbus-message.h:
2141 * dbus/dbus-protocol.h:
2142 Add error reply flag.
2144 * test/data/valid-messages/opposite-endian.message:
2145 Add NIL type to test.
2147 2003-01-31 Havoc Pennington <hp@pobox.com>
2149 * doc/dbus-specification.sgml: fully specify the header. Add
2150 flags and major protocol version, and change header/body len to
2153 * dbus/dbus-message-builder.c (append_saved_length): append length
2156 * dbus/dbus-message.c (dbus_message_create_header): change header
2157 length and body length to unsigned. Add the new fields from the
2159 (_dbus_message_loader_return_buffer): unsigned header/body len
2161 2003-01-30 Havoc Pennington <hp@pobox.com>
2163 * dbus/dbus-auth.c: rework to use only REJECTED, no
2166 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2167 use REJECTED, suggested by Mark McLoughlin
2169 2003-01-30 Havoc Pennington <hp@pobox.com>
2171 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2172 a better way to report errors here. e.g. "unix address lacks
2173 path" or something. also "no such file" when the path doesn't
2176 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2178 (dbus_parse_address): add @todo about documenting address format,
2179 and allowing , and ; to be escaped
2181 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2184 Add dbus-address.[ch]
2186 * dbus/dbus-address.c: (dbus_address_entry_free),
2187 (dbus_address_entries_free), (create_entry),
2188 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2189 (dbus_parse_address), (_dbus_address_test):
2190 * dbus/dbus-address.h:
2191 New files for dealing with address parsing.
2193 * dbus/dbus-connection.c:
2194 Document timeout functions.
2196 * dbus/dbus-message.c:
2197 Document dbus_message_new_from_message.
2199 * dbus/dbus-server-debug.c:
2202 * dbus/dbus-server.c: (dbus_server_listen):
2203 Parse address and use correct server implementation.
2205 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2206 * dbus/dbus-string.h:
2207 New function with test.
2209 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2213 * dbus/dbus-transport-debug.c:
2216 * dbus/dbus-transport.c: (_dbus_transport_open):
2217 Parse address and use correct transport implementation.
2219 2003-01-30 Havoc Pennington <hp@pobox.com>
2221 * dbus/dbus-message.c: use message->byte_order instead of
2222 DBUS_COMPILER_BYTE_ORDER throughout.
2223 (dbus_message_create_header): pad header to align the
2224 start of the body of the message to 8-byte boundary
2226 * dbus/dbus-marshal.h: make all the demarshalers take const
2227 DBusString arguments.
2229 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2230 validate message args here, so we don't have to do slow validation
2231 later, and so we catch bad messages as they are incoming. Also add
2232 better checks on header_len and body_len. Also fill in
2235 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2236 implemented properly)
2237 (_dbus_string_validate_nul): new function to check all-nul
2239 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2240 get_arg_end_pos and remove all validation
2241 (_dbus_marshal_validate_arg): actually do validation here.
2243 2003-01-29 Havoc Pennington <hp@pobox.com>
2245 * dbus/dbus-message.c (check_message_handling): fix assertion
2246 failure on set_client_serial
2248 2003-01-28 Havoc Pennington <hp@pobox.com>
2250 * dbus/dbus-server-debug.c: Add doc section comments
2252 * dbus/dbus-transport-debug.c: add doc section comments
2254 2003-01-28 Havoc Pennington <hp@redhat.com>
2256 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2257 the reverse order from how I had it
2258 (_dbus_string_base64_encode): reverse encoding order. I was
2259 basically byteswapping everything during encoding.
2261 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2263 * dbus/dbus-connection-internal.h:
2264 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2265 (_dbus_connection_remove_timeout):
2266 Add functions for adding and removing timeouts.
2268 * dbus/dbus-message.c: (dbus_message_new_from_message):
2269 Add new function that takes a message and creates an exact
2270 copy of it, but with the refcount set to 1.
2271 (check_message_handling):
2274 * dbus/dbus-server-protected.h:
2275 * dbus/dbus-server.c: (_dbus_server_init_base),
2276 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2277 (dbus_server_set_timeout_functions):
2278 (_dbus_server_remove_timeout):
2279 New functions so that a server can add and remove timeouts.
2281 (dbus_server_listen):
2282 Add commented out call to dbus_server_debug_new.
2284 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2285 Actually set the handler, doh.
2287 * dbus/dbus-transport.c: (_dbus_transport_open):
2288 Add commented out call to dbus_transport_debug_client_new.
2291 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2293 2003-01-28 Havoc Pennington <hp@pobox.com>
2295 * dbus/dbus-message.c (check_message_handling): function to check
2296 on the loaded message, iterates over it etc.
2298 2003-01-28 Havoc Pennington <hp@pobox.com>
2300 * test/Makefile.am (dist-hook): fix make distdir
2302 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2304 2003-01-27 Havoc Pennington <hp@pobox.com>
2306 * dbus/dbus-mempool.c (time_for_size): replace printf with
2309 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2310 empty lines; fix the SAVE_LENGTH stuff to be
2311 START_LENGTH/END_LENGTH so it actually works; couple other
2314 * test/Makefile.am (dist-hook): add dist-hook for .message files
2316 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2317 can be constant or locked.
2318 (_dbus_string_free): allow freeing a const string as
2321 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2323 * dbus/dbus-test-main.c (main): take an argument which is the
2324 directory containing test data
2326 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2327 argument to this and load all the messages in test/data/
2328 checking that they can be loaded or not loaded as appropriate.
2330 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2332 * bus/dispatch.c: (bus_dispatch_message_handler):
2333 Dispatch messages sent to services.
2335 * bus/driver.c: (bus_driver_send_service_deleted),
2336 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2337 (bus_driver_send_service_acquired):
2338 Add helper functions for sending service related messages.
2340 (bus_driver_send_welcome_message):
2341 Send HELLO_REPLY instead of WELCOME.
2343 (bus_driver_handle_list_services):
2344 Send LIST_SERVICES_REPLY instead of SERVICES.
2346 (bus_driver_handle_own_service),
2347 (bus_driver_handle_service_exists):
2348 New message handlers.
2350 (bus_driver_handle_message):
2351 Invoke new message handlers.
2353 (bus_driver_remove_connection):
2354 Don't remove any services here since that's done automatically
2355 by bus_service_remove_owner now.
2358 New function signatures.
2360 * bus/services.c: (bus_service_add_owner):
2361 Send ServiceAcquired message if we're the only primary owner.
2363 (bus_service_remove_owner):
2364 Send ServiceAcquired/ServiceLost messages.
2366 (bus_service_set_prohibit_replacement),
2367 (bus_service_get_prohibit_replacement):
2368 Functions for setting prohibit replacement.
2370 (bus_service_has_owner):
2371 New function that checks if a connection is in the owner queue of
2375 Add new function signatures.
2377 * dbus/dbus-list.c: (_dbus_list_test):
2378 Add tests for _dbus_list_remove_last and traversing the list backwards.
2381 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2382 go any further, so return NULL then.
2384 * dbus/dbus-protocol.h:
2385 Add new messages, service flags and service replies.
2387 2003-01-26 Havoc Pennington <hp@pobox.com>
2389 * dbus/dbus-message-builder.c: implement, completely untested.
2391 * test/data/*: add data to be used in testing.
2392 ".message" files are our simple loadable text format.
2393 ".message-raw" will be binary dumps of messages.
2395 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2397 2003-01-26 Havoc Pennington <hp@pobox.com>
2399 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2401 * dbus/dbus-errors.c (dbus_result_to_string): add
2404 * dbus/dbus-message-builder.c: new file, will contain code to load
2405 up messages from files. Not implemented yet.
2407 2003-01-26 Havoc Pennington <hp@pobox.com>
2409 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2410 the sender by setting to NULL
2412 2003-01-26 Havoc Pennington <hp@pobox.com>
2414 The unit tests pass, but otherwise untested. If it breaks, the
2415 tests should have been better. ;-)
2417 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2420 * dbus/dbus-message.c: redo everything so we maintain
2421 message->header as the only copy of the various fields.
2422 This avoids the possibility of out-of-memory in some cases,
2423 for example dbus_message_lock() can't run out of memory anymore,
2424 and avoids extra copying. Figured I may as well go ahead and do
2425 this since it was busted for dbus_message_lock to not return
2426 failure on OOM, and dbus_message_write_header was totally
2427 unchecked for OOM. Also fixed some random other bugs.
2429 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2430 that strings are nul-terminated. Also, end_pos can be equal
2431 to string length just not greater than, I think.
2432 (_dbus_marshal_set_int32): new function
2433 (_dbus_marshal_set_uint32): new function
2434 (_dbus_marshal_set_string): new function
2436 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2437 a warning, init timeout_list to NULL
2438 (dbus_connection_send_message): don't use uninitialized variable
2441 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2443 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2445 * bus/driver.c: (bus_driver_handle_hello),
2446 (bus_driver_send_welcome_message):
2449 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2451 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2452 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2453 (dbus_connection_unref):
2454 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2455 * dbus/dbus-message.c: (dbus_message_unref),
2458 (dbus_message_get_fields):
2459 Remove debugging printout.
2461 (_dbus_message_loader_return_buffer):
2462 Don't store the header string.
2464 (_dbus_message_test):
2467 2003-01-26 Richard Hult <rhult@codefactory.se>
2469 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2470 the file descriptor list, since it can change under us.
2472 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2474 * glib/dbus-gmain.c: (dbus_connection_prepare),
2475 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2476 (remove_watch), (dbus_connection_hookup_with_g_main):
2477 Rewrite the glib handling to use its own GSource instead of a
2478 GIOChannel so we can catch messages put in the queue while waiting
2481 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2484 * bus/connection.c: (connection_disconnect_handler),
2485 (connection_watch_callback), (bus_connection_setup):
2486 * bus/dispatch.c: (send_one_message),
2487 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2488 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2490 * bus/driver.c: (bus_driver_send_service_deleted),
2491 (bus_driver_send_service_created), (bus_driver_handle_hello),
2492 (bus_driver_send_welcome_message),
2493 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2494 (bus_driver_handle_message):
2496 Refactor code, put the message dispatching in its own file. Use
2497 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2500 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2502 * dbus/dbus-internals.h:
2503 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2505 * dbus/dbus-message.c: (dbus_message_get_sender):
2506 * dbus/dbus-message.h:
2507 Implement dbus_message_get_sender.
2509 * dbus/dbus-protocol.h:
2510 Add message and service defines.
2512 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2514 * dbus/dbus-connection.c: (dbus_connection_send_message):
2515 * dbus/dbus-message-internal.h:
2516 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2517 (dbus_message_write_header):
2518 Remove _dbus_messag_unlock and don't set the client serial on a
2519 message if one already exists.
2521 2003-01-24 Havoc Pennington <hp@pobox.com>
2523 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2526 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2529 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2531 * dbus/dbus-list.c: (alloc_link), (free_link):
2532 Use a memory pool for the links.
2534 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2536 * bus/connection.c: (bus_connection_foreach):
2538 Add new bus_connection_foreach function.
2540 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2541 Add function that broadcasts a message to all clients.
2543 (bus_driver_send_service_created), (bus_driver_handle_hello),
2544 (bus_driver_send_welcome_message),
2545 (bus_driver_handle_list_services), (bus_driver_message_handler):
2546 Implement functions that take care of listing services, and notifying
2547 clients when new services are created.
2549 * bus/services.c: (bus_services_list):
2551 Add new function that returns an array of strings with the currently
2552 registered services.
2555 * glib/dbus-gmain.c:
2556 Update copyright year.
2558 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2560 * dbus/dbus-connection.c: (dbus_connection_send_message):
2561 Unlock the message in case it was sent earlier.
2563 (dbus_connection_send_message_with_reply_and_block):
2564 Remove the reply message from the list.
2566 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2567 Set array_len and new_pos correctly.
2569 (_dbus_marshal_test):
2570 Remove debug output.
2572 * dbus/dbus-message-internal.h:
2573 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2574 New function that returns the reply serial.
2576 (_dbus_message_unlock):
2577 New function that unlocks a message and resets its header.
2579 (dbus_message_append_string_array),
2580 (dbus_message_get_fields_valist),
2581 (dbus_message_iter_get_field_type),
2582 (dbus_message_iter_get_string_array),
2583 (dbus_message_get_fields),
2584 (dbus_message_append_fields_valist):
2585 Handle string arrays.
2587 (dbus_message_set_sender):
2588 Make this function public since the bus daemon needs it.
2590 (decode_header_data):
2591 Set the reply serial to -1 initially.
2593 * dbus/dbus-message.h:
2594 Add dbus_message_set_sender.
2596 2003-01-24 Havoc Pennington <hp@pobox.com>
2598 * doc/dbus-specification.sgml: add some stuff
2600 2003-01-22 Havoc Pennington <hp@pobox.com>
2602 * doc/dbus-specification.sgml: Start to document the protocol.
2604 2003-01-22 Havoc Pennington <hp@pobox.com>
2606 * dbus/dbus-connection.c
2607 (dbus_connection_send_message_with_reply_and_block): add some @todo
2609 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2611 2003-01-21 Havoc Pennington <hp@pobox.com>
2613 (patch untested because can't compile)
2615 * bus/driver.c (create_unique_client_name): make this function
2616 never recycle client names. Also, caller should initialize
2619 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2621 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2623 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2624 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2625 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2626 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2627 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2628 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2629 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2630 * dbus/dbus-marshal.h:
2631 * dbus/dbus-protocol.h:
2632 Add support for marshalling and demarshalling integer, double
2635 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2640 * bus/connection.c: (connection_disconnect_handler):
2641 Remove the connection from the bus driver's list.
2643 (connection_watch_callback): Dispatch messages.
2645 (free_connection_data): Free connection name.
2647 (bus_connection_setup): Add connection to the bus driver's list.
2648 (bus_connection_remove_owned_service):
2649 (bus_connection_set_name), (bus_connection_get_name):
2650 Add functions for setting and getting the connection's name.
2653 Add function headers.
2655 * bus/driver.c: (create_unique_client_name),
2656 (bus_driver_handle_hello_message),
2657 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2658 (bus_driver_add_connection), (bus_driver_remove_connection):
2661 * bus/services.c: (bus_service_free):
2663 New file that handles communication and registreation with the bus
2666 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2668 * dbus/dbus-connection.c: (dbus_connection_send_message):
2669 Add a new client_serial parameter.
2671 (dbus_connection_send_message_with_reply):
2672 Remove a @todo since we've implemented the blocking function.
2674 (dbus_connection_send_message_with_reply_and_block):
2675 New function that sends a message and waits for a reply and
2676 then returns the reply.
2678 * dbus/dbus-connection.h:
2681 * dbus/dbus-errors.c: (dbus_result_to_string):
2682 * dbus/dbus-errors.h:
2683 Add new DBUS_RESULT.
2685 * dbus/dbus-message-internal.h:
2686 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2687 (_dbus_message_set_sender), (dbus_message_write_header),
2688 (dbus_message_new_reply), (decode_header_data),
2689 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2690 * dbus/dbus-message.h:
2691 Add new functions that set the reply serial and sender.
2692 Also marshal and demarshal them correctly and add test.
2694 * dbus/dbus-protocol.h:
2695 Add new DBUS_MESSAGE_TYPE_SENDER.
2698 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2699 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2700 (dbus_connection_hookup_with_g_main):
2701 * glib/test-dbus-glib.c: (main):
2702 Rewrite to use GIOChannel and remove the GSource crack.
2704 * test/echo-client.c: (main):
2705 * test/watch.c: (check_messages):
2706 Update for changed APIs
2708 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2710 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2712 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2713 Create a DBusTimeoutList.
2714 (dbus_connection_set_timeout_functions): Add new function to
2715 set timeout callbacks
2717 * dbus/dbus-connection.h: Add public DBusTimeout API.
2719 * dbus/dbus-message.c: (dbus_message_get_service):
2720 * dbus/dbus-message.h: New function.
2722 * dbus/dbus-server.c: Fix small doc typo.
2724 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2726 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2728 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2729 of the string, just as long as specified.
2731 2003-01-19 Havoc Pennington <hp@pobox.com>
2733 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2736 * dbus/dbus-server.c (dbus_server_set_max_connections)
2737 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2738 keep track of current number of connections, and add API for
2739 setting a max (but haven't implemented enforcing the max yet)
2741 2003-01-18 Havoc Pennington <hp@pobox.com>
2743 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2744 reading/writing if read_watch != NULL or write_watch != NULL.
2746 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2747 the message loader code to actually load message->header and
2748 message->body into the newly-created message.
2750 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2753 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2754 (dbus_connection_get_max_message_size)
2755 (dbus_connection_set_max_live_messages_size)
2756 (dbus_connection_get_max_live_messages_size): implement some
2757 resource limitation functions
2759 * dbus/dbus-resources.c: new file implementing some of the
2760 resource limits stuff
2762 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2763 missing docs, add @todo to handle OOM etc.
2765 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2768 2003-01-18 Havoc Pennington <hp@pobox.com>
2770 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2771 connection if it hasn't been already.
2773 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2774 replace with DisconnectFunction.
2776 2003-01-18 Havoc Pennington <hp@pobox.com>
2778 Building --disable-verbose-mode --disable-asserts --disable-tests
2779 cuts the library from 112K to 45K or so
2781 * configure.in: check for varargs macro support,
2782 add --enable-verbose-mode, --enable-asserts.
2784 * dbus/dbus-internals.h (_dbus_assert): support
2786 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2788 2003-01-18 Havoc Pennington <hp@pobox.com>
2790 * dbus/dbus-test.c: include config.h so that tests actually run
2792 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2793 so the failure mode when that assumption fails will be plenty
2796 2003-01-18 Havoc Pennington <hp@pobox.com>
2798 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2800 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2803 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2804 since we don't want to use those in make check
2806 2003-01-15 Havoc Pennington <hp@redhat.com>
2812 2003-01-15 Havoc Pennington <hp@redhat.com>
2814 * test/Makefile.am: fix so that test source code ends up in the
2815 distribution on make distcheck
2817 2003-01-15 Havoc Pennington <hp@redhat.com>
2823 2003-01-15 Havoc Pennington <hp@redhat.com>
2825 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2826 fix build when --disable-tests
2828 * Makefile.am (EXTRA_DIST): put HACKING in here
2830 * HACKING: document procedure for making a tarball release.
2832 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2834 * bus/connection.c: (connection_error_handler),
2835 (bus_connection_setup):
2836 * bus/main.c: (main):
2837 Make sure that the DBusConnectionData struct is NULLed
2838 out to prevent a segfault.
2840 * dbus/dbus-errors.c: (dbus_result_to_string):
2841 * dbus/dbus-errors.h:
2842 * dbus/dbus-message.c: (dbus_message_get_fields),
2843 (dbus_message_get_fields_valist), (_dbus_message_test):
2844 * dbus/dbus-message.h:
2845 Make dbus_message_get_fields return a result code so we can
2846 track invalid fields as well as oom.
2848 2003-01-11 Havoc Pennington <hp@pobox.com>
2850 * configure.in: change --enable-test/--enable-ansi action-if-given
2851 to enable_foo=$enableval instead of enable_foo=yes
2853 2003-01-08 Havoc Pennington <hp@pobox.com>
2855 * dbus/dbus-string.c (_dbus_string_align_length): new function
2857 * dbus/dbus-test-main.c: move main() for test app here
2859 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2860 symbol to run tests, because dbus-test isn't in the main
2863 Code review nitpicks.
2865 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2866 for people with narrow emacs ;-). Assert client_serial was filled
2867 in. Assert message->name != NULL.
2868 (dbus_message_append_fields): have "first_field_type" arg separate
2869 from va list, needed for C++ binding that also uses varargs IIRC
2870 and helps with type safety
2871 (dbus_message_new): add @todo about using DBusString to store
2872 service/name internally
2873 (dbus_message_new): don't leak ->service and ->name on OOM later
2875 (dbus_message_unref): free the service name
2876 (dbus_message_get_fields): same change to varargs
2877 i.e. first_field_type
2878 (_dbus_message_loader_return_buffer): assert that the message data
2879 is aligned (if not it's a bug in our code). Put in verbose griping
2880 about why we set corrupted = TRUE.
2881 (decode_header_data): add FIXME that char* is evil. Was going to
2882 add FIXME about evil locale-specific string.h strncmp, but just
2883 switched to wacky string-as-uint32 optimization. Move check for
2884 "no room for field name" above get_const_data_len() to avoid
2885 assertion failure in get_const_data_len if we have trailing 2
2886 bytes or the like. Check for service and name fields being
2887 provided twice. Don't leak service/name on error. Require field
2888 names to be aligned to 4 bytes.
2890 * dbus/dbus-marshal.c: move byte swap stuff to header
2891 (_dbus_pack_int32): uscore-prefix
2892 (_dbus_unpack_int32): uscore-prefix
2893 (_dbus_unpack_uint32): export
2894 (_dbus_demarshal_string): add @todo complaining about use of
2896 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2897 handling allowing corrupt data to go unchecked
2899 2003-01-08 Havoc Pennington <hp@redhat.com>
2901 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2902 to the select() as needed for authentication. (should be using
2903 _dbus_poll() not select, but for another day)
2905 * dbus/dbus.h: include dbus/dbus-protocol.h
2907 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2909 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2912 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2914 * dbus/dbus-internals.c: (_dbus_type_to_string):
2915 New function that returns a string describing a type.
2917 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2918 * dbus/dbus-marshal.h:
2919 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2920 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2921 (dbus_message_iter_get_byte_array):
2922 * dbus/dbus-message.h:
2923 Add new convenience functions for appending and getting message fields.
2924 Also add demarshalling routines for byte arrays.
2926 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2928 * dbus/dbus-connection-internal.h:
2929 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2930 (_dbus_connection_get_next_client_serial),
2931 (dbus_connection_send_message):
2932 * dbus/dbus-internals.h:
2933 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2934 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2935 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2936 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2937 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2938 (_dbus_verbose_bytes), (_dbus_marshal_test):
2939 * dbus/dbus-marshal.h:
2940 * dbus/dbus-message-internal.h:
2941 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2942 (dbus_message_write_header), (_dbus_message_lock),
2943 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2944 (dbus_message_get_name), (dbus_message_append_int32),
2945 (dbus_message_append_uint32), (dbus_message_append_double),
2946 (dbus_message_append_string), (dbus_message_append_byte_array),
2947 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2948 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2949 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2950 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2951 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2952 (decode_header_data), (_dbus_message_loader_return_buffer),
2953 (message_iter_test), (_dbus_message_test):
2954 * dbus/dbus-message.h:
2955 * dbus/dbus-protocol.h:
2956 * dbus/dbus-test.c: (main):
2958 * glib/test-dbus-glib.c: (message_handler), (main):
2959 * test/echo-client.c: (main):
2960 * test/watch.c: (check_messages):
2961 Make messages sendable and receivable for real.
2963 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2965 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2966 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2967 * dbus/dbus-message.c: (dbus_message_append_int32),
2968 (dbus_message_append_uint32), (dbus_message_append_double),
2969 (dbus_message_append_string), (dbus_message_append_byte_array):
2970 Handle OOM restoration.
2972 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2974 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2975 (_dbus_demarshal_string), (_dbus_marshal_test):
2976 * dbus/dbus-marshal.h:
2977 * dbus/dbus-message.c: (dbus_message_get_name),
2978 Document these functions.
2980 (dbus_message_append_int32), (dbus_message_append_uint32),
2981 (dbus_message_append_double), (dbus_message_append_string),
2982 (dbus_message_append_byte_array):
2983 * dbus/dbus-message.h:
2984 Add functions for adding message fields of different types.
2986 * dbus/dbus-protocol.h:
2987 Add the different types.
2989 2003-01-05 Havoc Pennington <hp@pobox.com>
2991 * bus/connection.c: implement routines for handling connections,
2992 first thing is keeping a list of owned services on each connection
2993 and setting up watches etc.
2995 * bus/services.c: implement a mapping from service names to lists
2998 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3000 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3001 to use static mutexes for global data
3003 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3004 collection of functions to set/get application-specific data
3005 on the DBusConnection.
3007 2003-01-04 Havoc Pennington <hp@pobox.com>
3009 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3010 (_dbus_poll): new function
3012 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3015 * bus/loop.c: initial code for the daemon main loop
3017 2003-01-04 Havoc Pennington <hp@pobox.com>
3019 * test/watch.c (error_handler): make it safe if the error handler
3020 is called multiple times (if we s/error handler/disconnect
3021 handler/ we should just guarantee it's called only once)
3023 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3024 error handler on disconnect (it's quite possible we should
3025 just change the error handler to a "disconnect handler," I'm
3026 not sure we have any other meaningful errors)
3028 * configure.in: check for getpwnam_r
3030 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3031 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3032 mechanism as in SASL spec, using socket credentials
3034 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3035 (_dbus_send_credentials_unix_socket): new function
3037 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3039 (_dbus_write): only check errno if <0 returned
3040 (_dbus_write_two): ditto
3042 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3044 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3045 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3046 (_dbus_marshal_test):
3047 * dbus/dbus-marshal.h:
3048 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3049 to _dbus_marshal_utf8_string. Also fix some tests.
3051 2002-12-28 Harri Porten <porten@kde.org>
3053 * configure.in: added check for C++ compiler and a very cheesy
3054 check for the Qt integration
3056 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3058 * qt/Makefile.am: added
3060 * qt/.cvsignore: added
3062 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3063 latter, added #ifdef QT_THREAD_SUPPORT guard.
3065 * dbus/Makefile.am: added missing headers for make dist
3067 2002-12-28 Kristian Rietveld <kris@gtk.org>
3069 * dbus/Makefile.am: fixup export-symbols-regex.
3071 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3073 * acinclude.m4: Add this file and put the
3074 PKG_CHECK_MODULE macro in it.
3076 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3078 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3079 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3080 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3081 (_dbus_marshal_test):
3082 Make the demarshalling routines align the pos argument.
3083 Add string marshalling tests and fix the obvious bugs
3086 2002-12-26 Havoc Pennington <hp@pobox.com>
3088 * dbus/dbus-auth.c: fixes fixes fixes
3090 * dbus/dbus-transport-unix.c: wire up support for
3091 encoding/decoding data on the wire
3093 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3094 (_dbus_auth_decode_data): append to target string
3095 instead of nuking it.
3097 2002-12-26 Havoc Pennington <hp@pobox.com>
3099 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3100 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3103 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3104 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3105 now). Main point is because I wanted unpack_uint32 to implement
3107 (_dbus_verbose_bytes): new function
3109 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3111 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3112 mechanism to handle a corrupt message stream
3113 (_dbus_message_loader_new): fix preallocation to only prealloc,
3116 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3117 (_dbus_string_test): enhance tests for copy/move and fix the
3120 * dbus/dbus-transport-unix.c: Hold references in more places to
3121 avoid reentrancy problems
3123 * dbus/dbus-transport.c: ditto
3125 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3126 leak reference count in no-message case
3128 * test/watch.c (do_mainloop): handle adding/removing watches
3129 during iteration over the watches. Also, ref the connection/server
3130 stored on a watch, so we don't try to mangle a destroyed one.
3132 * dbus/dbus-transport-unix.c (do_authentication): perform
3135 * dbus/dbus-auth.c (get_state): add a state
3136 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3137 (_dbus_auth_get_unused_bytes): append the unused bytes
3138 to the passed in string, rather than prepend
3140 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3141 the auth conversation DBusAuth
3143 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3144 (_dbus_transport_new_for_domain_socket): when creating a
3145 transport, pass in whether it's a client-side or server-side
3146 transport so we know which DBusAuth to create
3148 2002-12-03 Havoc Pennington <hp@pobox.com>
3150 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3151 _after_ finalizing the derived members
3152 (unix_connection_set): unref watch if we fail to add it
3154 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3155 transport first, so that the connection owned by the
3156 transport will be valid as the transport finalizes.
3158 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3159 if necessary, and remove watches from the connection.
3161 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3163 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3165 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3166 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3167 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3168 (_dbus_marshal_test):
3169 * dbus/dbus-marshal.h:
3170 Add string marshal functions and have the demarshal functions
3171 return the new position.
3173 2002-12-25 Havoc Pennington <hp@pobox.com>
3175 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3176 it is a simple protocol that just maps directly to SASL.
3178 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3179 initial implementation, not actually used yet.
3181 * dbus/dbus-string.c (_dbus_string_find): new function
3182 (_dbus_string_equal): new function
3183 (_dbus_string_base64_encode): new function
3184 (_dbus_string_base64_decode): new function
3186 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3189 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3190 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3191 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3192 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3193 * dbus/dbus-marshal.h:
3194 * dbus/dbus-protocol.h:
3195 * dbus/dbus-test.c: (main):
3197 Add un-optimized marshalling/demarshalling routines.
3199 2002-12-25 Harri Porten <porten@kde.org>
3201 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3203 2002-12-24 Zack Rusin <zack@kde.org>
3205 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3206 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3209 2002-12-24 Havoc Pennington <hp@pobox.com>
3211 * glib/dbus-gthread.c: fix include
3213 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3214 I think glib API needs to change, though, as you don't
3215 want to use DBusMessageFunction, you want to use the
3216 DBusMessageHandler object. Probably
3217 dbus_connection_open_with_g_main_loop()
3218 and dbus_connection_setup_g_main_loop() or something like that
3219 (but think of better names...) that just create a connection
3220 that has watch/timeout functions etc. already set up.
3222 * dbus/dbus-connection.c
3223 (dbus_connection_send_message_with_reply): new function just to
3224 show how the message handler helps us deal with replies.
3226 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3228 * dbus/dbus-string.c (_dbus_string_test): free a string that
3231 * dbus/dbus-hash.c: use memory pools for the hash entries
3232 (rebuild_table): be more paranoid about overflow, and
3233 shrink table when we can
3234 (_dbus_hash_test): reduce number of sprintfs and write
3235 valid C89. Add tests for case where we grow and then
3236 shrink the hash table.
3238 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3240 * dbus/dbus-connection.c (dbus_connection_register_handler)
3241 (dbus_connection_unregister_handler): new functions
3243 * dbus/dbus-message.c (dbus_message_get_name): new
3245 * dbus/dbus-list.c: fix docs typo
3247 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3248 an object representing a handler for messages.
3250 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3253 * glib/dbus-gthread.c: (dbus_gthread_init):
3254 Don't use the gdbus prefix for public functions.
3256 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3260 Add GLib checks and fixup .pc files
3264 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3265 (gdbus_connection_check), (gdbus_connection_dispatch),
3266 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3267 (dbus_connection_gsource_new):
3268 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3269 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3270 * glib/test-dbus-glib.c: (message_handler), (main):
3273 2002-12-15 Harri Porten <porten@kde.org>
3275 * autogen.sh: check for libtoolize before attempting to use it
3277 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3280 * .cvsignore: ignore more stamp files
3282 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3284 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3285 without make install.
3287 2002-12-15 Havoc Pennington <hp@pobox.com>
3289 * dbus/dbus-threads.c: add thread stubs that a higher library
3290 layer can fill in. e.g. the GLib wrapper might fill them in with
3291 GThread stuff. We still need to use this thread API to
3292 thread-safe-ize the library.
3294 2002-12-12 Havoc Pennington <hp@pobox.com>
3296 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3297 below new interfaces and include fewer system headers.
3299 * dbus/dbus-sysdeps.c (_dbus_read): new function
3300 (_dbus_write): new function
3301 (_dbus_write_two): new function
3302 (_dbus_connect_unix_socket): new function
3303 (_dbus_listen_unix_socket): new function
3305 * dbus/dbus-message-internal.h: change interfaces to use
3308 2002-12-11 Havoc Pennington <hp@pobox.com>
3310 * dbus/dbus-types.h: add dbus_unichar
3312 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3314 * dbus/dbus-connection.c (dbus_connection_send_message): return
3317 * dbus/dbus-transport.c: include dbus-watch.h
3319 * dbus/dbus-connection.c: include dbus-message-internal.h
3321 * HACKING: add file with coding guidelines stuff.
3323 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3324 handling here, for security purposes (as in vsftpd). Not actually
3325 using this class yet.
3327 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3328 system/libc usage here, as in vsftpd, for ease of auditing (and
3329 should also simplify portability). Haven't actually moved all the
3330 system/libc usage into here yet.
3332 2002-11-25 Havoc Pennington <hp@pobox.com>
3334 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3335 always print the first verbose message.
3337 2002-11-24 Havoc Pennington <hp@pobox.com>
3339 * test/echo-client.c, test/echo-server.c: cheesy test
3342 * configure.in (AC_CHECK_FUNCS): check for writev
3344 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3347 * dbus/dbus-list.c (_dbus_list_foreach): new function
3349 * dbus/dbus-internals.c (_dbus_verbose): new function
3351 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3352 representing a server that listens for connections.
3354 * dbus/.cvsignore: create
3356 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3357 public API for reporting errors
3359 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3360 public object representing a connection that
3361 sends/receives messages. (Same object used for
3362 both client and server.)
3364 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3365 Basic abstraction for different kinds of stream
3366 that we might read/write messages from.
3368 2002-11-23 Havoc Pennington <hp@pobox.com>
3370 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3373 * dbus/dbus-test.c (main): add list test, and include
3374 dbus-test.h as intended
3376 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3377 (_dbus_hash_table_remove_int): return value indicates
3378 whether the entry existed to remove
3380 * dbus/dbus-list.c: add linked list utility class,
3383 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3386 2002-11-23 Havoc Pennington <hp@pobox.com>
3388 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3389 DBUS_END_DECLS to nothing, that should fix this once and for all
3391 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3393 * dbus/dbus-message.c, dbus/dbus-hash.c:
3394 add some missing @brief
3396 2002-11-23 Havoc Pennington <hp@pobox.com>
3398 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3399 to avoid confusing Doxygen
3401 * dbus/dbus-hash.c: @} not }@
3403 * dbus/dbus-message.c (struct DBusMessage): split out
3406 2002-11-23 Havoc Pennington <hp@pobox.com>
3408 * configure.in: pile on more warning flags if using gcc
3410 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3411 to document static functions
3413 * configure.in: add summary to end of configure so it
3414 looks nice and attractive
3416 * dbus/dbus-hash.c: finish implementation and write unit
3419 * configure.in: add --enable-tests to enable unit tests
3421 * dbus/dbus-test.c: test program to run unit tests
3422 for all files in dbus/*, initially runs a test for
3425 * dbus/dbus-internals.h: file to hold some internal utility stuff
3427 2002-11-22 Havoc Pennington <hp@redhat.com>
3429 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3430 "ported" away from Tcl
3432 * dbus/dbus-types.h: header for types such as dbus_bool_t
3434 2002-11-22 Havoc Pennington <hp@redhat.com>
3436 * dbus/dbus.h: fixups for doc warnings
3438 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3440 (QUIET): make it quiet so we can see warnings
3442 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3444 2002-11-22 Havoc Pennington <hp@redhat.com>
3446 * Makefile.am: include "Doxyfile" target in all-local
3448 * configure.in: generate the Doxyfile
3450 * Doxyfile.in: move Doxyfile here, so we can use
3451 configure to generate a Doxyfile with the right
3454 2002-11-22 Havoc Pennington <hp@redhat.com>
3456 * dbus/dbus-message.c: move inline docs into .c file
3458 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3459 so all docs are under doc/
3460 (MAN_EXTENSION): generate man pages. Use extension
3461 ".3dbus" which matches ".3qt" on my system,
3462 I guess this is OK, I don't know really.
3463 (FILE_PATTERNS): look for .c files not .h, makes sense
3466 2002-11-22 Havoc Pennington <hp@pobox.com>
3468 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3469 because any app can be a server, and any app can be a client,
3470 the bus is a special kind of server.
3472 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3474 * Doxyfile : adding. Still needs Makefile rules to be generated
3475 automatically (just run "doxygen" in the toplevel dir for now to
3478 * dbus/dbus-message.h : Adding sample docs (javadoc since
3479 resembles gtk-doc a little more)
3481 * dbus/dbus.h : Adding sample docs
3483 2002-11-21 Havoc Pennington <hp@redhat.com>
3485 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3486 so we can allow ourselves to include files directly,
3487 instead of having to use dbus.h
3489 * dbus/dbus.h: fill in
3491 * dbus/dbus-message.h: sketch out a sample header file.
3492 Include griping if you include it directly instead of
3495 * dbus/dbus-macros.h: new file with macros for extern "C",
3496 TRUE/FALSE, NULL, etc.
3498 * doc/file-boilerplate.c: put include guards in here
3500 2002-11-21 Havoc Pennington <hp@redhat.com>
3502 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3504 * COPYING: include the GPL as well, and license code
3505 under both AFL and GPL.
3507 2002-11-21 Havoc Pennington <hp@redhat.com>
3509 * acconfig.h: get rid of this
3511 * autogen.sh (run_configure): add --no-configure option
3513 * configure.in: remove AC_ARG_PROGRAM to make
3514 autoconf complain less. add AC_PREREQ.
3515 add AC_DEFINE third arg.
3517 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3520 Fix references so we can distcheck.
3522 2002-11-21 Havoc Pennington <hp@redhat.com>
3524 * Initial module creation