1 2003-04-05 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-string.c: docs warning
5 * dbus/dbus-spawn.c: missing docs
7 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
9 2003-04-05 Havoc Pennington <hp@pobox.com>
11 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
14 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
15 to -1 once we've reaped the babysitter
16 (_dbus_babysitter_handle_watch): do as much work as we can, not
19 * bus/activation.c: add code using DBusBabysitter so that we
20 handle it when a service fails to start up properly.
21 (bus_activation_service_created): don't remove the activation
22 entries as we go, just let them get removed when we free the pending
23 activation. Unref reply messages after sending them.
25 2003-04-05 Havoc Pennington <hp@pobox.com>
27 * test/decode-gcov.c (main): print per-directory stats in the report
29 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
31 2003-04-05 Havoc Pennington <hp@pobox.com>
33 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
35 * test/decode-gcov.c: hack up a little program to suck data
36 out of gcov files. Yes this is sort of silly.
38 * configure.in: define something in config.h and do an
39 AM_CONDITIONAL when gcov is enabled
41 2003-04-04 Havoc Pennington <hp@redhat.com>
43 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
44 return a "babysitter" object that is used to monitor the status of
45 the spawned process and reap it when required.
47 * test/test-segfault.c, test/test-exit.c,
48 test/test-sleep-forever.c: binaries that do various lame things,
49 used in the test suite.
51 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
53 2003-04-03 Havoc Pennington <hp@pobox.com>
55 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
56 in preparation for modifying it, dbus-sysdeps is getting
59 2003-04-03 Havoc Pennington <hp@redhat.com>
61 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
64 * bus/*.[hc]: adapt to mainloop change
66 2003-04-03 Havoc Pennington <hp@redhat.com>
68 * bus/activation.c (load_directory): fix up memleaks
69 (bus_activation_entry_free): free the entry
71 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
72 we get one from the message bus; fix memleaks.
74 * dbus/dbus-message.c (dbus_set_error_from_message): new function
76 2003-04-03 Havoc Pennington <hp@pobox.com>
78 * bus/config-parser.c (bus_config_parser_unref): free
79 list of mechanisms, bug discovered by test suite enhancements
80 (putting system.conf and session.conf into suite)
82 * test/Makefile.am, test/test-service.c: add placeholder for a
83 test service that we'll activate as part of test suite. Doesn't
86 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
87 setting NULL value, and use system malloc not dbus_malloc()
88 when we have unavoidable memleakage.
90 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
91 didn't work, and support DBUS_BUS_ACTIVATION.
93 * bus/activation.c (child_setup): pass our well-known bus type to
96 * bus/config-parser.c: support <type> to specify well-known type
98 * doc/dbus-specification.sgml: document the env variables to
99 locate well-known buses and find service activator
101 2003-04-02 Havoc Pennington <hp@redhat.com>
103 * test/Makefile.am (all-local): add a rule to copy tests to
104 builddir, so we can have generated tests. Use this to remove the
105 silly hack for testing system.conf and session.conf. Will use this
106 shortly to generate .service files pointing to test binaries.
108 2003-04-02 Havoc Pennington <hp@redhat.com>
110 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
111 current alloc and needed new length, not max of the doubled
112 allocation and needed new length. Also, when building tests,
113 don't do the double-allocation stuff, just realloc every time.
115 2003-04-02 Havoc Pennington <hp@redhat.com>
117 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
119 (_dbus_string_get_dirname): new
120 (_dbus_sysdeps_test): new
121 (_dbus_directory_open): include dirnames in error messages
123 * bus/config-parser.c: interpret <include> and <includedir> and
124 <servicedir> relative to config file location if the given
125 filename is not absolute.
127 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
129 2003-04-02 Havoc Pennington <hp@redhat.com>
131 * bus/connection.c (bus_transaction_send_error_reply): set sender
132 service for the error, and unref the reply on success
134 * bus/activation.c: convert to use BusTransaction so OOM can be
136 (bus_activation_service_created): set sender of the message
138 2003-04-01 Havoc Pennington <hp@redhat.com>
140 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
141 <includedir> (at least mostly)
143 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
144 first, then the user ID
146 2003-04-01 Havoc Pennington <hp@pobox.com>
148 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
151 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
153 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
155 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
156 socket 0777, and unlink any existing socket.
158 * bus/bus.c (bus_context_new): change our UID/GID and fork if
159 the configuration file so specifies; set up auth mechanism
162 * bus/config-parser.c (bus_config_parser_content): add support
163 for <fork> option and fill in code for <auth>
165 * bus/system.conf.in: add <fork/> to default configuration,
166 and limit auth mechanisms to EXTERNAL
168 * doc/config-file.txt (Elements): add <fork>
170 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
171 (_dbus_change_identity): new function
173 2003-03-31 Havoc Pennington <hp@redhat.com>
175 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
176 (_dbus_listen_unix_socket): fix off-by-one error in null
177 termination spotted by Nalin
179 2003-03-31 Havoc Pennington <hp@redhat.com>
181 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
182 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
183 having a real home directory available.
185 2003-03-31 Havoc Pennington <hp@redhat.com>
187 * bus/Makefile.am (install-data-hook): create /var/run/dbus
189 * bus/messagebus.in: add init script for Red Hat /etc/init.d
191 * configure.in: add support for specifying a style of init script
194 2003-03-31 Havoc Pennington <hp@redhat.com>
196 Fix some annoying DBusString API and fix all affected code.
198 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
200 (_dbus_string_get_data): change to return string instead of using
202 (_dbus_string_get_const_data): ditto
203 (_dbus_string_get_data_len): ditto
204 (_dbus_string_get_const_data_len): ditto
206 2003-03-31 Havoc Pennington <hp@redhat.com>
208 * bus/main.c (main): fix up the command line arguments to be nicer
210 2003-03-31 Havoc Pennington <hp@redhat.com>
212 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
213 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
214 final location that lands in the config file
216 * bus/config-loader-expat.c (bus_config_load): fix type of
219 * doc/TODO: remove TODO item for dbus_bus_get()
221 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
223 2003-03-31 Havoc Pennington <hp@pobox.com>
225 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
226 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
227 argument since they are always client side
229 * dbus/dbus-server.c (dbus_server_get_address): new function
231 * bus/main.c (main): take the configuration file as an argument.
233 * test/data/valid-config-files/debug-allow-all.conf: new file to
234 use with dispatch.c tests for example
236 * bus/test-main.c (main): require test data dir
238 * bus/bus.c (bus_context_new): change this to take a
239 configuration file name as argument
241 * doc/config-file.txt (Elements): add <servicedir>
243 * bus/system.conf, bus/session.conf: new files
245 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
246 well-known socket if none set
248 * configure.in: create system.conf and session.conf
250 2003-03-30 Havoc Pennington <hp@pobox.com>
252 * bus/config-parser.c: hacking
254 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
255 to shut down, since it could cause weirdness with the DBusList
258 * dbus/dbus-list.c (_dbus_list_test): add tests for the
259 link-oriented stack routines
260 (alloc_link): free the mempool if the first alloc from it fails
262 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
264 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
266 (_dbus_string_skip_white): new
268 * doc/config-file.txt (Elements): add <includedir>
270 2003-03-28 Havoc Pennington <hp@pobox.com>
272 * dbus/dbus-string.c (_dbus_string_copy_data_len)
273 (_dbus_string_copy_data): new functions
275 2003-03-28 Anders Carlsson <andersca@codefactory.se>
277 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
281 * dbus/dbus-memory.c:
284 2003-03-28 Havoc Pennington <hp@pobox.com>
286 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
287 I think it may have just been superstition. Not sure.
289 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
290 failures that were not being handled.
292 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
294 * dbus/dbus-memory.c: add ability to set number of mallocs in a
295 row that will fail on out-of-memory.
297 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
298 function for testing out-of-memory handling.
300 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
301 allocation functions, they do map exactly to the expat ones.
303 2003-03-27 Havoc Pennington <hp@redhat.com>
305 * bus/config-loader-libxml.c (bus_config_load): add another error
308 2003-03-26 Anders Carlsson <andersca@codefactory.se>
311 Add note about automatic service activation.
313 * doc/dbus-specification.sgml:
314 Rename the specification and clarify a few things.
316 2003-03-26 Anders Carlsson <andersca@codefactory.se>
319 * dbus/dbus-address.c:
321 * dbus/dbus-marshal.c:
322 * dbus/dbus-server-debug-pipe.c:
323 * dbus/dbus-transport-unix.c:
324 Fix documentation warnings.
326 2003-03-26 Havoc Pennington <hp@pobox.com>
328 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
329 after every test so it's quick and easy to see which leaked, and
330 so we test multiple dbus_shutdown() calls
332 * configure.in: change configure.in XML stuff to also support
335 * config-loader-libxml.c: some hacking
337 * config-loader-expat.c: some hacking
339 * config-parser.c: some hacking, plus tests
341 2003-03-25 Havoc Pennington <hp@redhat.com>
343 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
345 * configure.in: add --with-xml option to specify XML library,
346 right now only libxml is supported.
348 * bus/config-loader-libxml.c, config-parser.c: sync some minor
349 nonworking code between home and work, still just stubs
351 2003-03-24 Havoc Pennington <hp@redhat.com>
353 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
356 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
357 NULL argument for "message" if the error is a well-known one,
358 fill in a generic message in this case.
360 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
363 * bus/test.c (bus_test_flush_bus): add
365 * bus/policy.c (bus_policy_test): test code stub
367 2003-03-24 Havoc Pennington <hp@pobox.com>
369 * bus/connection.c (bus_connections_setup_connection): set up
370 the "can this user connect" function, but it always returns
371 TRUE until we have a config file parser so we can have a config
372 file that allows connections.
374 2003-03-23 Havoc Pennington <hp@pobox.com>
376 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
377 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
378 the mutex, so we can check for proper memory management
381 * dbus/dbus-dataslot.c: remove the mutex from
382 DBusDataSlotAllocator and lock it manually when using it,
383 to simplify fitting it into the global slots framework.
385 * dbus/dbus-threads.c (init_static_locks): rework how we're
386 handling global locks so they are easily shut down.
388 * bus/policy.c (bus_policy_append_rule): fix
390 * bus/test-main.c (main): check for memleaks
392 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
393 test suite check for memleaks
395 * dbus/dbus-memory.c: add support in test mode for tracking
396 number of outstanding blocks
398 2003-03-23 Havoc Pennington <hp@pobox.com>
400 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
403 * dbus/dbus-hash.h: add ULONG hash keys
405 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
406 (_dbus_get_group_id): new function
408 2003-03-20 Havoc Pennington <hp@redhat.com>
410 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
412 (dbus_connection_get_unix_user): new function
414 2003-03-20 Havoc Pennington <hp@pobox.com>
416 * bus/connection.c (bus_connection_send_oom_error): assert that
418 (connection_execute_transaction): ditto
419 (bus_connection_preallocate_oom_error): fix to set the sender, and
420 set recipient to the destination service, not the bus driver
422 * bus/policy.c: hacking
424 * dbus/dbus-message.c (dbus_message_service_is): new function
425 (dbus_message_sender_is): new
427 2003-03-19 Havoc Pennington <hp@redhat.com>
429 * bus/policy.c: start sketching code for policy restrictions on
430 what connections can do.
432 2003-03-18 Havoc Pennington <hp@redhat.com>
434 * doc/TODO: some notes on high-level todo items. Little nitpick
435 stuff is all in @todo, so no need to add it here.
437 * doc/config-file.txt: some notes on how config file might look
439 2003-03-18 Anders Carlsson <andersca@codefactory.se>
445 2003-03-17 Havoc Pennington <hp@redhat.com>
447 * dbus/dbus-internals.h: add gcc attributes so that
448 our printf-style functions warn on bad arguments to
451 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
454 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
457 2003-03-17 Havoc Pennington <hp@redhat.com>
459 * bus/test-main.c (main): make it print something as it runs
460 so make check doesn't look stuck
462 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
463 from CVS, now obsolete
465 2003-03-17 Anders Carlsson <andersca@codefactory.se>
467 * bus/dispatch.c: (bus_dispatch):
468 Refetch the service name since it may have been reallocated
469 when dbus_message_set_sender was called.
471 * dbus/dbus-sysdeps.c: (_dbus_accept):
472 Add address and address length variables and use them to stop
473 valgrind from complaining.
475 2003-03-17 Havoc Pennington <hp@pobox.com>
477 All tests pass, no memleaks, no valgrind complaints.
479 * bus/test.c: refcount handler_slot
481 * bus/connection.c (bus_connections_new): refcount
484 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
485 bytes so that auth scripts pass.
487 * bus/dispatch.c: init message_handler_slot so it gets allocated
490 * bus/dispatch.c (message_handler_slot_ref): fix memleak
492 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
493 dealloc server_pipe_hash when no longer used for benefit of
496 * dbus/dbus-auth.c (process_command): memleak fix
498 * bus/dispatch.c (check_hello_message): memleak fix
500 2003-03-16 Havoc Pennington <hp@pobox.com>
502 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
504 2003-03-17 Anders Carlsson <andersca@codefactory.se>
506 * bus/activation.c (bus_activation_activate_service): Append
507 the pending activation entry to the list of pending activations.
509 2003-03-16 Havoc Pennington <hp@pobox.com>
511 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
514 * dbus/dbus-address.c (create_entry): fix OOM handling when
515 failing to alloc entry->method
517 2003-03-16 Havoc Pennington <hp@pobox.com>
519 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
522 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
523 add some missing dbus_set_result
525 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
526 alloc the DBusMessageHandler
528 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
529 the transport here, since we call this from the finalizer; it
530 resulted in a double-finalize.
532 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
533 where we tried to use transport->connection that was NULL,
534 happened when transport was disconnected early on due to OOM
536 * bus/*.c: adapt to handle OOM for watches/timeouts
538 * dbus/dbus-transport-unix.c: port to handle OOM during
541 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
542 reference to unused bytes instead of a copy
544 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
547 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
550 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
553 2003-03-16 Anders Carlsson <andersca@codefactory.se>
555 * doc/dbus-specification.sgml:
556 Document reply message for ActivateService.
558 2003-03-16 Anders Carlsson <andersca@codefactory.se>
560 * bus/activation.c: (bus_pending_activation_entry_free),
561 (bus_pending_activation_free), (bus_activation_new),
562 (bus_activation_unref), (bus_activation_service_created),
563 (bus_activation_activate_service):
565 * bus/bus.c: (bus_context_new):
566 * bus/desktop-file.c: (new_section):
567 * bus/driver.c: (bus_driver_send_service_deleted),
568 (bus_driver_handle_activate_service):
569 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
571 * dbus/dbus-connection.c:
572 (dbus_connection_send_with_reply_and_block):
573 * dbus/dbus-message.c: (dbus_message_append_args_valist):
574 * dbus/dbus-protocol.h:
575 Make activation work better. Now pending activations will be queued
576 and the daemon won't try to activate services that are already registered.
578 2003-03-16 Havoc Pennington <hp@pobox.com>
580 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
583 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
584 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
586 2003-03-16 Havoc Pennington <hp@pobox.com>
588 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
589 this. always run the test suite before commit...
591 * bus/*: adapt to DBusConnection API changes
593 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
594 requires renaming stuff to avoid dbus_connection_dispatch name
597 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
600 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
601 separate from _dbus_message_loader_return_buffer()
603 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
604 this, because it's now always broken to use; the number of
605 messages in queue vs. the number still buffered by the message
606 loader is undefined/meaningless. Should use
607 dbus_connection_get_dispatch_state().
608 (dbus_connection_dispatch): rename from
609 dbus_connection_dispatch_message
611 2003-03-16 Havoc Pennington <hp@pobox.com>
613 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
616 2003-03-16 Anders Carlsson <andersca@codefactory.se>
618 * dbus/dbus-connection.c:
619 (dbus_connection_send_with_reply_and_block):
620 Decrease connection->n_incoming when removing an entry
622 * dbus/dbus-dict.c: (dbus_dict_entry_free),
623 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
624 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
625 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
626 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
627 (dbus_dict_get_byte_array):
628 Handle NULL arrays and strings. Also add support for byte arrays.
630 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
631 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
632 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
633 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
634 (_dbus_demarshal_dict), (demarshal_and_validate_len),
635 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
636 * dbus/dbus-marshal.h:
637 Add support for marshalling and demarshalling empty arrays and strings.
639 * dbus/dbus-message.c: (dbus_message_append_args_valist),
640 (dbus_message_append_string_array),
641 (dbus_message_iter_get_boolean),
642 (dbus_message_iter_get_boolean_array),
643 (dbus_message_iter_get_int32_array),
644 (dbus_message_iter_get_uint32_array),
645 (dbus_message_iter_get_double_array),
646 (dbus_message_iter_get_byte_array),
647 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
648 (check_message_handling):
649 Add support for getting empty arrays and dicts.
651 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
652 Don't do any validation at all for now, that's better than just checking
655 * test/data/valid-messages/emptiness.message:
656 New test message with lots of empty arrays.
658 2003-03-16 Havoc Pennington <hp@pobox.com>
660 * dbus/dbus-connection.c
661 (_dbus_connection_queue_received_message_link): new function that
662 can't fail due to OOM
664 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
665 new function pops a message together with a list link
668 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
669 message queuing functions to avoid needing to alloc memory
671 2003-03-16 Havoc Pennington <hp@pobox.com>
673 Oops - test code was only testing failure of around 30 of the
674 mallocs in the test path, but it turns out there are 500+
675 mallocs. I believe this was due to misguided linking setup such
676 that there was one copy of dbus_malloc etc. in the daemon and one
677 in the shared lib, and only daemon mallocs were tested. In any
678 case, the test case now tests all 500+ mallocs, and doesn't pass
679 yet, though there are lots of fixes in this patch.
681 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
682 this so that it doesn't need to allocate memory, since it
683 has no way of indicating failure due to OOM (and would be
686 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
688 * bus/Makefile.am: rearrange to create two self-contained
689 libraries, to avoid having libraries with overlapping symbols.
690 that was resulting in weirdness, e.g. I'm pretty sure there
691 were two copies of global static variables.
693 * dbus/dbus-internals.c: move the malloc debug stuff to
696 * dbus/dbus-list.c (free_link): free list mempool if it becomes
699 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
701 * dbus/dbus-address.c (dbus_parse_address): free list nodes
704 * bus/dispatch.c (bus_dispatch_add_connection): free
705 message_handler_slot when no longer using it, so
706 memory leak checkers are happy for the test suite.
708 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
710 * bus/bus.c (new_connection_callback): disconnect in here if
711 bus_connections_setup_connection fails.
713 * bus/connection.c (bus_connections_unref): fix to free the
715 (bus_connections_setup_connection): if this fails, don't
716 disconnect the connection, just be sure there are no side
719 * dbus/dbus-string.c (undo_alignment): unbreak this
721 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
723 (_dbus_auth_new): fix the order in which we free strings
726 * bus/connection.c (bus_connection_disconnected): fix to
727 not send ServiceDeleted multiple times in case of memory
730 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
731 get the base service name
732 (dbus_bus_register_client): don't return base service name,
733 instead store it on the DBusConnection and have an accessor
735 (dbus_bus_register_client): rename dbus_bus_register()
737 * bus/dispatch.c (check_hello_message): verify that other
738 connections on the bus also got the correct results, not
739 just the one sending hello
741 2003-03-15 Havoc Pennington <hp@pobox.com>
743 Make it pass the Hello handling test including all OOM codepaths.
744 Now to do other messages...
746 * bus/services.c (bus_service_remove_owner): fix crash when
747 removing owner from an empty list of owners
748 (bus_registry_ensure): don't leave service in the list of
749 a connection's owned services if we fail to put the service
752 * bus/connection.c (bus_connection_preallocate_oom_error): set
753 error flag on the OOM error.
755 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
756 handle _dbus_transport_set_connection failure
758 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
759 to create watches up front and simply enable/disable them as
761 (unix_connection_set): this can now fail on OOM
763 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
764 of enabling/disabling a watch or timeout.
766 * bus/loop.c (bus_loop_iterate): don't touch disabled
769 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
771 2003-03-15 Havoc Pennington <hp@pobox.com>
773 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
774 write useful test code, after all that futzing around ;-)
776 Test does not yet pass because we can't handle OOM in
777 _dbus_transport_messages_pending (basically,
778 dbus_connection_preallocate_send() does not prealloc the write
779 watch). To fix this, I think we need to add new stuff to
780 set_watch_functions, namely a SetEnabled function so we can alloc
781 the watch earlier, then enable it later.
783 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
784 dbus-memory.c to the convenience lib
786 * bus/test.c: rename some static functions to keep them clearly
787 distinct from stuff in connection.c. Handle client disconnection.
789 2003-03-14 Havoc Pennington <hp@pobox.com>
791 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
792 transport, tests more of the real codepath. Set up clients
793 with bus_setup_debug_client.
795 * bus/test.c (bus_setup_debug_client): function to set up debug
796 "clients" on the main loop
798 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
801 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
804 * dbus/dbus-server-debug.c: support a debug server based on pipes
806 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
807 (_dbus_close): new function
809 * configure.in: check for socketpair
811 2003-03-14 Havoc Pennington <hp@redhat.com>
813 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
816 * dbus/dbus-transport-debug.c: rework this a good bit to be
817 less complicated. hopefully still works.
819 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
822 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
825 * dbus/dbus-message.c (dbus_message_copy): rename from
826 dbus_message_new_from_message, fix it up to copy
827 all the message fields, add test case
829 * bus/dispatch.c (bus_dispatch_test): add some more test code,
830 not quite passing yet
832 2003-03-14 Havoc Pennington <hp@pobox.com>
834 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
835 until no work remains" in test code. (the large diff here
836 is just code movement, no actual changes)
838 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
839 1, no point waiting around for test code.
840 (_dbus_server_debug_accept_transport): unref the timeout
841 after adding it (right?)
843 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
845 2003-03-13 Havoc Pennington <hp@redhat.com>
847 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
850 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
853 * dbus/dbus-connection.h: Make AddWatchFunction and
854 AddTimeoutFunction return a bool so they can fail on out-of-memory
856 * bus/bus.c (bus_context_new): set up timeout handlers
858 * bus/connection.c (bus_connections_setup_connection): set up
861 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
864 * bus/bus.c (bus_context_new): adapt to changes
866 * bus/connection.c: adapt to changes
868 * test/watch.c: adapt to DBusWatch changes
870 * bus/dispatch.c (bus_dispatch_test): started adding this but
873 2003-03-14 Anders Carlsson <andersca@codefactory.se>
875 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
877 2003-03-13 Havoc Pennington <hp@pobox.com>
879 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
880 set up a test framework as for the library
882 2003-03-12 Havoc Pennington <hp@pobox.com>
884 Throughout: purge global variables, introduce BusActivation,
885 BusConnections, BusRegistry, etc. objects instead.
887 * bus/bus.h, bus/bus.c: introduce BusContext as a global
890 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
891 going to redo this a bit differently I think
893 2003-03-12 Havoc Pennington <hp@redhat.com>
895 Mega-patch that gets the message bus daemon initially handling
896 out-of-memory. Work still needed. Also lots of random
897 moving stuff to DBusError instead of ResultCode.
899 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
901 * dbus/dbus-connection.c
902 (dbus_connection_send_with_reply_and_block): use DBusError
904 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
907 * dbus/dbus-connection.c (dbus_connection_send): drop the result
908 code here, as the only failure possible is OOM.
910 * bus/connection.c (bus_connection_disconnect):
911 rename bus_connection_disconnected as it's a notification only
913 * bus/driver.c (bus_driver_handle_acquire_service): don't free
914 "name" on get_args failure, should be done by get_args;
915 don't disconnect client for bad args, just return an error.
916 (bus_driver_handle_service_exists): ditto
918 * bus/services.c (bus_services_list): NULL-terminate returned array
920 * bus/driver.c (bus_driver_send_service_lost)
921 (bus_driver_send_service_acquired): send messages from driver to a
922 specific client to the client's unique name, not to the broadcast
925 * dbus/dbus-message.c (decode_header_data): reject messages that
926 contain no name field
927 (_dbus_message_get_client_serial): rename to
928 dbus_message_get_serial and make public
929 (_dbus_message_set_serial): rename from set_client_serial
930 (_dbus_message_set_reply_serial): make public
931 (_dbus_message_get_reply_serial): make public
933 * bus/connection.c (bus_connection_foreach): allow stopping
934 iteration by returning FALSE from foreach function.
936 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
937 (dbus_connection_free_preallocated_send)
938 (dbus_connection_preallocate_send): new API for sending a message
939 without possibility of malloc failure.
940 (dbus_connection_send_message): rename to just
941 dbus_connection_send (and same for whole function family)
943 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
945 * dbus/dbus-sysdeps.c (_dbus_exit): new function
947 * bus/activation.c: handle/return errors
949 * dbus/dbus-errors.h: add more DBUS_ERROR #define
951 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
952 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
953 (_dbus_result_from_errno): move to this file
955 2003-03-10 Anders Carlsson <andersca@codefactory.se>
957 * dbus/dbus-marshal.c:
958 (_dbus_marshal_set_string):
959 Take a length argument so we can marshal the correct string
962 (_dbus_marshal_dict), (_dbus_demarshal_dict),
963 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
964 (_dbus_marshal_test):
965 * dbus/dbus-marshal.h:
966 Add support for marshalling and demarshalling dicts.
968 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
969 Add support for TYPE DICT.
971 * dbus/dbus-message.c: (set_string_field):
972 Adjust header padding.
974 (dbus_message_append_args_valist), (dbus_message_append_dict),
975 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
976 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
977 (check_message_handling), (check_have_valid_message):
978 * dbus/dbus-message.h:
979 Add functions for setting and getting dicts.
981 * dbus/dbus-protocol.h:
987 * doc/dbus-specification.sgml:
988 Add information about how dicts are marshalled.
990 * test/data/invalid-messages/dict-with-nil-value.message:
991 * test/data/invalid-messages/too-short-dict.message:
992 * test/data/valid-messages/dict-simple.message:
993 * test/data/valid-messages/dict.message:
994 Add sample messages containing dicts.
996 2003-03-08 Anders Carlsson <andersca@codefactory.se>
998 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1000 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1003 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1004 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1005 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1006 (dbus_dict_set_double), (dbus_dict_set_string),
1007 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1008 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1009 (dbus_dict_set_string_array), (_dbus_dict_test):
1011 Fix according to comments from Havoc.
1013 2003-03-06 Michael Meeks <michael@server.home>
1015 * configure.in: if we don't have kde-config, disable have_qt.
1017 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1022 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1023 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1024 (dbus_dict_remove), (dbus_dict_get_value_type),
1025 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1026 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1027 (dbus_dict_put_double), (dbus_dict_put_string),
1028 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1029 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1030 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1031 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1032 (dbus_dict_get_double), (dbus_dict_get_string),
1033 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1034 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1035 (dbus_dict_get_string_array), (_dbus_dict_test):
1037 Add DBusDict implementation
1039 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1043 2003-03-04 Havoc Pennington <hp@pobox.com>
1045 * test/data/auth/*: adapt to changes
1047 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1048 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1051 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1052 more stuff from being in a context name, to make the protocol
1053 simpler to deal with
1055 * dbus/dbus-errors.c (dbus_error_has_name): new function
1056 (dbus_error_is_set): new function
1058 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1059 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1061 * dbus/dbus-connection.c (dbus_connection_flush): also read
1062 messages during a flush operation
1064 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1066 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1068 * configure.in: Check for gethostbyname on Solaris.
1070 * dbus/dbus-transport.c: (_dbus_transport_open):
1071 Remove duplicate "tcp" entry.
1073 * doc/dbus-specification.sgml:
1074 Clarify some things.
1076 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1078 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1079 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1080 (_dbus_keyring_test):
1081 * dbus/dbus-md5.c: (_dbus_md5_compute):
1082 * dbus/dbus-sha.c: (_dbus_sha_compute):
1085 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1087 * README: Add some things.
1089 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1091 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1092 after case DBUS_TYPE_BOOELAN.
1094 2003-03-02 Havoc Pennington <hp@pobox.com>
1096 * test/break-loader.c (randomly_set_extreme_ints): add test that
1097 sets really huge and small integers
1099 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1100 that length of boolean array fits in the string, and that
1101 string has room for boolean value in single-bool case.
1103 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1104 optional value to "ALIGN" command which is what to fill the
1107 * test/data/valid-messages/no-padding.message: add regression
1108 test for the message padding problem
1110 2003-03-02 Havoc Pennington <hp@pobox.com>
1112 * dbus/dbus-message.c (decode_header_data): fix to always init
1113 message_padding, from Benjamin Dauvergne
1115 2003-03-02 Havoc Pennington <hp@pobox.com>
1121 2003-03-01 Joe Shaw <joe@assbarn.com>
1123 * configure.in: Check for "struct cmsgcred" and try to access its
1124 members for BSD-like unices.
1126 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1127 _dbus_read_credentials_unix_socket().
1128 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1129 read() for reading the credential byte off the unix socket. Use
1130 struct cmsgcred on systems that support it.
1132 2003-02-27 Alexander Larsson <alexl@redhat.com>
1136 Make gthreads-2.0 dependency optional. Don't build thread test if
1139 2003-02-27 Havoc Pennington <hp@pobox.com>
1141 * dbus/dbus-connection.c
1142 (dbus_connection_send_message_with_reply_and_block): fix doh!
1143 doh! doh! bug that resulted in never removing a reply from the
1144 queue, no wonder we called get_reply_serial so much ;-)
1146 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1147 and client serial instead of demarshaling them every time
1149 2003-02-27 Havoc Pennington <hp@pobox.com>
1151 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1152 more inlined, using dbus-string-private.h, speeds things up
1155 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1156 when freeing the string
1157 (_dbus_string_steal_data): fix for align offset
1158 (undo_alignment): new function
1160 2003-02-26 Havoc Pennington <hp@redhat.com>
1162 All kinds of audit fixes from Owen, plus initial attempt to
1163 handle unaligned memory returned from malloc.
1165 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1166 leave room for align_offset and nul byte
1167 (fixup_alignment): function to track an align_offset and
1168 ensure real->str is aligned
1169 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1170 to allow a nul byte plus align offset
1171 (_dbus_string_lock): fix overflow issue
1172 (_dbus_string_init_const_len): add assertions on sanity of len,
1173 assign allocated to be ALLOCATION_PADDING larger than len
1174 (set_length): fixup the overflow handling
1175 (_dbus_string_get_data_len): fix overflow in assertion
1176 (open_gap): detect overflow in size of gap to be opened
1177 (_dbus_string_lengthen): add overflow check
1178 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1179 (_dbus_string_append): add overflow check
1180 (_dbus_string_append_unichar): overflow
1181 (_dbus_string_delete): fix overflow in assertion
1182 (_dbus_string_copy_len): overflow in assertion
1183 (_dbus_string_replace_len): overflows in assertions
1184 (_dbus_string_find): change to implement in terms of
1185 _dbus_string_find_to
1186 (_dbus_string_find_to): assorted fixage
1187 (_dbus_string_equal_c_str): assert c_str != NULL,
1188 fix logic so the function works
1189 (_dbus_string_ends_with_c_str): fix overflow thingy
1190 (_dbus_string_base64_encode): overflow fix
1191 (_dbus_string_validate_ascii): overflow
1192 (_dbus_string_validate_nul): overflow
1194 2003-02-26 Havoc Pennington <hp@redhat.com>
1196 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1198 2003-02-26 Alexander Larsson <alexl@redhat.com>
1201 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1203 * dbus/dbus-connection.c:
1204 * dbus/dbus-connection.h:
1205 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1206 Add dbus_connection_set_wakeup_main_function and use it when queueing
1207 incoming and outgoing messages.
1210 * dbus/dbus-dataslot.c:
1211 Threadsafe usage of DBusDataSlotAllocator
1213 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1216 * dbus/dbus-server-unix.c:
1219 * glib/dbus-gmain.c:
1220 Implement the new wakeup functions for glib.
1223 * glib/test-thread-client.c:
1224 * glib/test-thread-server.c:
1225 * glib/test-thread.h:
1226 Initial cut at some thread test code. Not really done yet.
1228 2003-02-26 Havoc Pennington <hp@pobox.com>
1230 * dbus/dbus-connection.c
1231 (dbus_connection_send_message_with_reply_and_block): fix crash
1232 where we ref'd the outgoing message instead of the returned reply
1234 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1235 at the end of this function, so if we didn't need to read for
1236 authentication, we reinstall it for receiving messages
1238 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1239 a NULL sender for peer-to-peer case
1241 * dbus/dbus-transport-unix.c (check_read_watch): handle
1242 !authenticated case correctly
1244 * glib/dbus-gmain.c: add support for DBusServer
1246 * dbus/dbus-server.c: add data slot support
1248 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1249 return values and handle errors
1251 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1254 * Doxyfile.in (INPUT): add glib subdir
1256 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1257 setup_with_g_main instead of hookup_with_g_main; write docs
1259 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1261 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1262 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1263 * dbus/dbus-message.c: (dbus_message_append_boolean),
1264 (dbus_message_append_boolean_array),
1265 (dbus_message_get_args_valist), (_dbus_message_test):
1266 * dbus/dbus-message.h:
1267 * doc/dbus-specification.sgml:
1268 Various fixes as pointed out by Havoc.
1270 * test/data/invalid-messages/bad-boolean-array.message:
1271 * test/data/invalid-messages/bad-boolean.message:
1272 Add invalid boolean value test cases.
1274 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1276 * dbus/dbus-internals.c: (_dbus_type_to_string):
1277 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1278 (_dbus_marshal_validate_arg):
1279 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1280 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1281 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1282 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1283 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1284 (dbus_message_iter_get_double),
1285 (dbus_message_iter_get_boolean_array), (message_iter_test):
1286 * dbus/dbus-message.h:
1287 * dbus/dbus-protocol.h:
1288 * doc/dbus-specification.sgml:
1289 * test/data/valid-messages/lots-of-arguments.message:
1290 Add support for boolean and boolean array types.
1292 2003-02-23 Havoc Pennington <hp@pobox.com>
1294 * dbus/dbus-keyring.c: finish most of this implementation and
1297 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1298 these barf if the error isn't cleared to NULL
1300 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1301 (_dbus_create_directory): new function
1303 * dbus/dbus-errors.c (dbus_set_error): fix warning
1305 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1306 (_dbus_string_hex_decode): new function
1307 (test_hex_roundtrip): test code
1309 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1311 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1313 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1314 the save-to-temp/rename trick to atomically write the new file
1315 (_dbus_string_parse_uint): new function
1317 2003-02-22 Havoc Pennington <hp@pobox.com>
1319 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1321 2003-02-22 Havoc Pennington <hp@pobox.com>
1323 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1324 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1326 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1328 * dbus/test/data/sha-1: add US government test suite for SHA-1
1330 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1332 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1333 Make string arrays NULL-terminated.
1335 * dbus/dbus-memory.c: (dbus_free_string_array):
1336 * dbus/dbus-memory.h:
1337 New function for freeing NULL-terminated string arrays.
1339 * dbus/dbus-message-builder.c: (append_quoted_string),
1340 (_dbus_message_data_load):
1341 Add support for array types.
1343 * dbus/dbus-message.c: (check_message_handling):
1344 Add more types as test cases.
1346 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1347 (_dbus_string_parse_double):
1348 Add the start offset to the end offset.
1350 * test/data/valid-messages/lots-of-arguments.message:
1351 New test message with lots of arguments.
1353 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1355 * dbus/dbus-message.c: (dbus_message_append_nil),
1356 (dbus_message_append_int32), (dbus_message_append_uint32),
1357 (dbus_message_append_double), (dbus_message_append_string),
1358 (dbus_message_append_int32_array),
1359 (dbus_message_append_uint32_array),
1360 (dbus_message_append_double_array),
1361 (dbus_message_append_byte_array),
1362 (dbus_message_append_string_array):
1363 Fix all out-of-memory handling in these functions.
1365 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1367 * dbus/dbus-message.c: (dbus_message_append_nil):
1370 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1372 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1373 (dbus_message_append_nil), (dbus_message_append_int32_array),
1374 (dbus_message_append_uint32_array),
1375 (dbus_message_append_double_array),
1376 (dbus_message_append_byte_array),
1377 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1378 (dbus_message_iter_get_int32_array),
1379 (dbus_message_iter_get_uint32_array),
1380 (dbus_message_iter_get_double_array),
1381 (dbus_message_iter_get_byte_array),
1382 (dbus_message_iter_get_string_array):
1384 * dbus/dbus-message.h:
1385 Add functions for appending and getting arrays.
1387 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1389 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1390 element size at least 8 bytes, fixes mempool tests on
1393 2003-02-20 Alexander Larsson <alexl@redhat.com>
1395 * dbus/dbus-transport-unix.c (unix_do_iteration):
1396 Unlock the connection mutex during a blocking select call.
1397 Add todo about how we need a way to wake up the select.
1399 * dbus/dbus-connection-internal.h:
1400 * dbus/dbus-connection.c:
1401 Add _dbus_connection_lock and _dbus_connection_unlock.
1403 2003-02-19 Havoc Pennington <hp@pobox.com>
1405 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1406 Doxyfile.in, not Doxyfile
1408 * dbus/dbus-keyring.c: do some hacking on this
1410 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1412 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1414 (dbus_set_error): remove dbus_error_init, check for message ==
1415 NULL *before* we sprintf into it, and add @todo about including
1416 system headers in this file
1418 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1420 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1422 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1423 get various bits of user information based on either username
1425 (_dbus_homedir_from_username): new function
1427 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1430 Add check for nonposix getpwnam_r
1432 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1433 Align the pool element size to a sizeof (void *) boundary.
1435 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1436 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1437 General Solaris fixes.
1439 * test/data/valid-messages/simplest-manual.message:
1440 Explicitly state that we want little-endian packing.
1442 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1444 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1446 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1447 Added to create a transport connecting using a tcp/ip socket.
1449 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1450 to a tcp socket at given host and port.
1451 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1454 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1456 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1457 Added to create a server listening on a TCP/IP socket.
1459 2003-02-19 Havoc Pennington <hp@pobox.com>
1461 Throughout: mop up all the Doxygen warnings and undocumented
1464 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1465 to search any paths.
1467 * dbus/dbus-threads.c: move global mutex initializers to
1468 dbus-internals.h, multiple prototypes was confusing doxygen
1469 besides being kind of ugly
1471 * Doxyfile (PREDEFINED): have Doxygen define
1472 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1473 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1474 (do not abuse the feature! it's for stuff like the autogenerated
1475 macros in dbus-md5.c, not just for things you don't feel like
1478 2003-02-18 Havoc Pennington <hp@pobox.com>
1480 * dbus/dbus-string.c (_dbus_string_zero): new function
1482 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1483 wrap it in some dbus-friendly API
1485 * dbus/dbus-types.h: add 16-bit types
1487 2003-02-18 Joe Shaw <joe@assbarn.com>
1489 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1490 credentials from our currently running process.
1491 (get_word): Fix a buglet where we were copying the entire length
1492 instead of relative to our position.
1494 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1495 keys on the stack... it's 640k of data.
1497 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1498 read the credentials byte off the socket, even if we don't have
1500 (_dbus_poll): Implement poll() using select() for systems which
1503 * glib/test-dbus-glib.c (main): Print out an error if no
1504 parameters are given.
1506 * test/data/auth/fallback.auth-script: Added. Tests that a client
1507 can fallback to a secondary auth mechanism if the first fails.
1509 2003-02-18 Havoc Pennington <hp@pobox.com>
1513 2003-02-17 Havoc Pennington <hp@pobox.com>
1515 * doc/dbus-specification.sgml: lots of cosmetic
1516 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1517 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1518 s/server/bus/ (except in authentication section). Add a section
1519 "Message Bus Message Routing"
1521 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1527 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1529 * doc/dbus-specification.sgml:
1530 Specification updates.
1532 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1534 * bus/activation.c: (bus_activation_init), (child_setup),
1535 (bus_activation_activate_service):
1537 * bus/main.c: (main):
1538 Set DBUS_ADDRESS environment variable.
1540 * dbus/dbus-errors.c: (dbus_set_error):
1541 Don't use va_copy since that's a C99 feature.
1543 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1544 (_dbus_spawn_async):
1545 * dbus/dbus-sysdeps.h:
1546 Add child_setup_func to _dbus_spawn_async.
1548 * doc/dbus-specification.sgml:
1549 Update specification.
1551 * test/spawn-test.c: (setup_func), (main):
1554 2003-02-17 Alexander Larsson <alexl@redhat.com>
1556 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1559 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1563 * doc/dbus-test-plan.sgml:
1564 Add test plan document.
1569 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1571 * dbus/dbus-message.c: (decode_header_data),
1572 (_dbus_message_loader_return_buffer):
1573 Set the header padding amount when loading a message.
1575 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1577 * bus/dispatch.c: (send_one_message):
1578 Only send broadcast messages to registered connections.
1580 * dbus/dbus-message.c: (dbus_message_name_is):
1581 * dbus/dbus-message.h:
1582 New convenience function.
1584 * dbus/dbus-transport-debug.c: (do_reading):
1585 Only dispatch one message per run.
1588 * test/bus-test.c: (new_connection_callback), (die),
1589 (test_hello_client1_handler), (test_hello_client2_handler),
1590 (test_hello_replies), (main):
1592 * test/bus-test-loop.[ch]:
1595 2003-02-16 Havoc Pennington <hp@pobox.com>
1597 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1598 backward conditional
1600 2003-02-16 Alexander Larsson <alexl@redhat.com>
1602 * dbus/dbus-connection.c:
1603 Implement sent_message_with_reply. (with_reply_and block is still
1605 Made dispatch_message not lose message if OOM.
1607 * dbus/dbus-errors.h:
1608 Add NoReply error (for reply timeouts).
1610 2003-02-16 Alexander Larsson <alexl@redhat.com>
1612 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1613 Actually free keys and values when destroying hashtable.
1615 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1617 * dbus/dbus-auth.c: (client_try_next_mechanism):
1620 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1621 Return TRUE if there's no thread implementation around.
1623 * glib/dbus-gmain.c: (free_source),
1624 (dbus_connection_hookup_with_g_main):
1625 Make sure to remove the GSource when the connection is finalized.
1627 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1629 * bus/dispatch.c: (bus_dispatch_message_handler):
1630 * dbus/dbus-errors.h:
1631 Return an error if someone tries to send a message to a service
1634 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1636 * bus/activation.c: (load_directory), (bus_activation_init),
1637 (bus_activation_activate_service):
1640 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1641 More work on the activation handling.
1643 * dbus/dbus-errors.h:
1644 Add some error messages
1646 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1647 * dbus/dbus-message.h:
1648 New function that creates an error message.
1650 * dbus/dbus-protocol.h:
1651 Add ACTIVATE_SERVER message.
1653 * dbus/dbus-server-unix.c: (unix_handle_watch),
1654 (_dbus_server_new_for_domain_socket):
1655 Call _dbus_fd_set_close_on_exec.
1657 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1658 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1659 (_dbus_fd_set_close_on_exec):
1660 * dbus/dbus-sysdeps.h:
1661 Add _dbus_fd_set_close_on exec function. Also add function that checks
1662 that all open fds are set to close-on-exec and warns otherwise.
1664 * dbus/dbus-transport-unix.c:
1665 (_dbus_transport_new_for_domain_socket):
1666 Call _dbus_fd_set_close_on_exec.
1668 2003-02-16 Havoc Pennington <hp@pobox.com>
1670 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1671 allow people to avoid setting SIGPIPE to SIG_IGN
1672 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1673 we've been asked not to
1675 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1677 * dbus/dbus-list.c: (_dbus_list_append_link),
1678 (_dbus_list_prepend_link):
1679 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1683 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1686 * bus/activation.c: (bus_activation_entry_free),
1687 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1689 * bus/main.c: (main):
1690 Add simple activation support, doesn't work yet though.
1692 2003-02-15 Zack Rusin <zack@kde.org>
1694 * qt/dbus-qthread.cpp: small casting fix
1696 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1698 * dbus/dbus-errors.c: (dbus_set_error):
1699 * dbus/dbus-errors.h:
1700 Add a few errors and make dbus_set_error void.
1702 * dbus/dbus-sysdeps.c:
1703 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1704 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1705 * dbus/dbus-sysdeps.h:
1706 Add _dbus_spawn_async.
1708 * test/spawn-test.c: (main):
1709 Test for _dbus_spawn_async.
1711 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1713 * dbus/dbus-internals.h:
1714 Fix build without tests.
1716 * dbus/dbus-list.c: (alloc_link):
1717 Fix a segfault when a malloc fails.
1719 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1720 (dbus_malloc0), (dbus_realloc):
1721 Add support for malloc debugging.
1723 2003-02-15 Alexander Larsson <alexl@redhat.com>
1725 * dbus/dbus-threads.c:
1726 * dbus/dbus-threads.h:
1727 Add condvars. Remove static mutext from API.
1728 Implement static mutexes by initializing them from threads_init.
1730 * glib/dbus-gthread.c:
1731 * qt/dbus-qthread.cpp:
1732 Update with the thread api changes.
1737 Turn StaticMutex into normal mutex + init function.
1738 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1739 _dbus_list_append_link, _dbus_list_prepend_link
1742 * dbus/dbus-sysdeps.c:
1743 * dbus/dbus-sysdeps.h:
1744 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1745 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1747 * dbus/dbus-protocol.h:
1748 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1750 * dbus/dbus-message.c:
1751 Make ref/unref atomic.
1754 * dbus/dbus-connection-internal.h:
1755 * dbus/dbus-connection.c:
1756 * dbus/dbus-connection.h:
1758 Change _peek to _borrow,_return & _steal_borrowed.
1759 Change disconnect callback to event.
1760 Make dbus_connection_dispatch_messages reentrant.
1762 * dbus/dbus-transport.c:
1763 Don't ref the connection on calls to the transport
1766 * dbus/dbus-message-handler.c:
1769 * glib/dbus-gmain.c:
1770 Don't use peek_message anymore
1773 * test/debug-thread.c:
1774 * test/debug-thread.h:
1775 Simple thread implementation that asserts() on deadlocks in
1776 single-threaded code.
1779 (main) Call debug_threads_init.
1782 Use disconnect message instead of disconnect callback.
1786 Don't call dbus_connection_set_disconnect_function. Instead export
1787 bus_connection_disconnect.
1790 Call bus_connection_disconnect when we get a disconnected message.
1792 2003-02-15 Havoc Pennington <hp@pobox.com>
1794 * dbus/dbus-message.c (dbus_message_new): fool around with the
1797 2003-02-14 Havoc Pennington <hp@pobox.com>
1799 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1801 * dbus/dbus-memory.c: fail if the debug functions indicate we
1804 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1805 (_dbus_decrement_fail_alloc_counter): debug functions to
1806 simulate memory allocation failures
1808 2003-02-14 Havoc Pennington <hp@pobox.com>
1810 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1813 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1815 * bus/driver.c: (bus_driver_handle_hello):
1817 * bus/services.c: (bus_service_lookup):
1818 Reorder message sending so we get a more sane order.
1820 * test/bus-test.c: (message_handler):
1823 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1825 * bus/driver.c: (bus_driver_send_service_deleted),
1826 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1827 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1828 (bus_driver_send_welcome_message),
1829 (bus_driver_handle_list_services),
1830 (bus_driver_handle_acquire_service),
1831 (bus_driver_handle_service_exists):
1832 * dbus/dbus-bus.c: (dbus_bus_register_client),
1833 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1834 * dbus/dbus-errors.c: (dbus_result_to_string):
1835 * dbus/dbus-errors.h:
1836 * dbus/dbus-message.c: (dbus_message_append_args),
1837 (dbus_message_append_args_valist), (dbus_message_get_args),
1838 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1839 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1840 (dbus_message_iter_get_byte_array),
1841 (dbus_message_iter_get_string_array), (message_iter_test),
1842 (check_message_handling), (_dbus_message_test):
1843 * dbus/dbus-message.h:
1844 * test/bus-test.c: (main):
1845 Change fields to arguments in messages, so that they won't be
1846 confused with header fields.
1848 * glib/test-dbus-glib.c: (main):
1849 Remove append_fields from hello message.
1851 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1853 * dbus/dbus-errors.c:
1854 * dbus/dbus-message.c:
1855 * dbus/dbus-string.c:
1856 Documentation fixes.
1858 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1860 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1862 Implement support for timeouts in dbus-glib.
1864 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1866 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1867 * dbus/dbus-message.c: (process_test_subdir):
1868 * test/break-loader.c: (find_breaks_based_on):
1869 Plug some memory leaks.
1871 2003-02-13 Richard Hult <rhult@codefactory.se>
1873 * bus/main.c: Fix build.
1875 * dbus/dbus-errors.h:
1876 * dbus/dbus-errors.c: Fix copyright for Anders.
1878 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1883 * bus/connection.c: (bus_connection_foreach):
1886 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1887 (unescape_string), (new_section), (parse_section_start),
1888 (parse_key_value), (report_error), (bus_desktop_file_load),
1889 (bus_desktop_file_get_string):
1890 * bus/desktop-file.h:
1891 Use DBusError for error reporting.
1893 * bus/dispatch.c: (send_one_message),
1894 (bus_dispatch_message_handler):
1895 * bus/driver.c: (bus_driver_send_service_deleted),
1896 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1897 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1898 (bus_driver_send_welcome_message),
1899 (bus_driver_handle_list_services),
1900 (bus_driver_handle_acquire_service),
1901 (bus_driver_handle_service_exists):
1902 * bus/loop.c: (bus_loop_run):
1904 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1906 * bus/utils.c: (bus_wait_for_memory):
1908 New files with general utility functions.
1910 * dbus/dbus-internals.h:
1911 Remove _DBUS_HANDLE_OOM.
1913 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1915 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1916 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1917 * dbus/dbus-errors.h:
1918 Add DBusError structure.
1920 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1922 * test/data/valid-messages/standard-acquire-service.message:
1923 * test/data/valid-messages/standard-hello.message:
1924 * test/data/valid-messages/standard-list-services.message:
1925 * test/data/valid-messages/standard-service-exists.message:
1926 Add some standard messages.
1928 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1930 * bus/driver.c: (bus_driver_send_welcome_message),
1931 (bus_driver_handle_list_services),
1932 (bus_driver_handle_acquire_service),
1933 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1934 Update for API changes in libdbus.
1936 * dbus/dbus-message.c: (dbus_message_new_reply):
1937 * dbus/dbus-message.h:
1938 Remove the name argument. The spec states that replies shouldn't
1941 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1943 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1944 (report_error), (bus_desktop_file_load), (lookup_section),
1945 (lookup_line), (bus_desktop_file_get_raw),
1946 (bus_desktop_file_get_string):
1947 * bus/desktop-file.h:
1948 Some fixes, and new functions for getting a key value from a section.
1950 2003-02-13 Havoc Pennington <hp@pobox.com>
1952 * test/data/auth/fail-after-n-attempts.auth-script: new test
1954 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1957 2003-02-13 Havoc Pennington <hp@pobox.com>
1959 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1960 dbus_credentials_match were backward
1962 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1963 NO_CREDENTIALS and ROOT_CREDENTIALS
1965 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1966 into here. Never process more commands after we've reached an
1967 end state; store further data as unused bytes.
1969 * test/data/auth/*: add more auth tests
1971 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1972 command to match exact string and EXPECT_UNUSED to match unused
1975 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1977 2003-02-12 Havoc Pennington <hp@pobox.com>
1979 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1980 \r off of popped lines
1982 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1985 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1988 2003-02-12 Havoc Pennington <hp@pobox.com>
1990 * dbus/Makefile.am: remove break-loader from the build, since it
1993 * configure.in: add --enable-gcov to turn on coverage profiling
1994 flags and disable optimization
1996 2003-02-10 Havoc Pennington <hp@pobox.com>
1998 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1999 initial cut at test framework for DBusAuth from laptop.
2000 Doesn't quite work yet but it compiles and I need to get
2001 it off the 266mhz laptop. ;-)
2003 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2004 fix a memleak in error case
2006 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2009 * bus/desktop-file.c:
2010 * bus/desktop-file.h:
2011 Add a desktop file parser.
2013 2003-02-11 Zack Rusin <zack@kde.org>
2015 * qt/message.[h|cpp]: sample implementation
2016 of the KDE wrapper for DBusMessage
2018 2003-02-09 Zack Rusin <zack@kde.org>
2020 * test/bus-test.c: make_it_compile
2021 * doc/dbus-specification.sgml: minimal semantic fix
2023 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2029 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2032 * dbus/dbus-break-loader.c:
2034 * test/break-loader.c:
2035 Move dbus-break-loader to test/ and rename it to break-loader.
2037 2003-02-02 Havoc Pennington <hp@pobox.com>
2039 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2040 for code to manage cookies in your home directory
2042 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2044 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2045 to authenticate, then disconnect the client.
2047 2003-02-03 Alexander Larsson <alexl@redhat.com>
2049 * dbus/dbus-message.c (dbus_message_append_fields):
2052 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2054 * doc/dbus-specification.sgml:
2055 Update address format section.
2057 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2060 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2061 (message_handler), (new_connection_callback), (loop_quit),
2065 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2067 * bus/driver.c: (bus_driver_handle_service_exists):
2068 Simplify the code a bit.
2070 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2073 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2076 Add libdbus-daemon.la and link to it.
2078 2003-02-01 James Willcox <jwillcox@gnome.org>
2080 * bus/driver.c: (bus_driver_handle_own_service):
2081 Actually include the service reply code in the message.
2083 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2085 * bus/driver.c: (bus_driver_handle_service_exists):
2086 Don't unref the incoming message.
2088 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2090 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2092 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2094 * dbus/dbus-server.c: (dbus_server_listen):
2095 * dbus/dbus-transport.c: (_dbus_transport_open):
2096 ifdef out the calls to the debug transport and server.
2098 2003-02-02 Alexander Larsson <alexl@redhat.com>
2100 * dbus/dbus-watch.c (dbus_watch_get_flags):
2101 Add note in the docs that ERROR or HANGUP won't be returned
2102 and are assumed always on.
2104 * glib/dbus-gmain.c (add_watch):
2105 Always add IO_ERR | IO_HUP
2107 * dbus/dbus-message.h:
2108 Add semicolon after dbus_message_iter_get_string_array().
2109 Makes qt code build again
2111 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2113 * bus/driver.c: (create_unique_client_name),
2114 (bus_driver_handle_hello):
2115 Don't take a name, just use a numeric id to identify
2119 * dbus/dbus-bus.c: (dbus_bus_register_client),
2120 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2122 Add new convenience functions for communicating with the bus.
2124 * dbus/dbus-message.h:
2126 * dbus/dbus-protocol.h:
2129 2003-02-01 Alexander Larsson <alexl@redhat.com>
2131 * dbus/dbus-message.c (dbus_message_append_fields):
2132 Add some more doc comments.
2134 2003-02-01 Havoc Pennington <hp@pobox.com>
2136 * dbus/dbus-break-loader.c (randomly_modify_length): change
2137 a 4-byte value in the message as if it were a length
2139 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2140 execute bit on saved files
2142 2003-02-01 Havoc Pennington <hp@pobox.com>
2144 * dbus/dbus-break-loader.c (main): new program to find messages
2145 that break the loader.
2147 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2148 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2150 * dbus/dbus-string.c (_dbus_string_set_byte): new
2152 2003-01-31 Havoc Pennington <hp@pobox.com>
2154 * dbus/dbus-message.c: refactor the test code to be more general,
2155 in preparation for writing a "randomly permute test cases to
2156 try to break the loader" program.
2158 2003-01-31 Havoc Pennington <hp@pobox.com>
2160 * doc/dbus-specification.sgml: work on the specification
2162 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2163 the protocol version of the message.
2165 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2166 no longer specifies that.
2167 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2170 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2171 "break" for DBUS_TYPE_NIL, remove @todo
2173 2003-01-31 Havoc Pennington <hp@pobox.com>
2175 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2176 just set_is_error/get_is_error as this is a commonly-used
2177 function, and write docs.
2179 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2181 * dbus/dbus-address.c: (dbus_address_entry_free):
2182 Free key and value lists.
2184 * dbus/dbus-internals.c: (_dbus_type_to_string):
2185 Add the types we didn't have.
2187 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2188 (_dbus_marshal_validate_arg):
2191 * dbus/dbus-message.c: (dbus_message_set_sender):
2192 Remove todo about being able to set sender to NULL.
2194 (dbus_message_set_is_error_reply),
2195 (dbus_message_get_is_error_reply):
2196 * dbus/dbus-message.h:
2199 * dbus/dbus-protocol.h:
2200 Add error reply flag.
2202 * test/data/valid-messages/opposite-endian.message:
2203 Add NIL type to test.
2205 2003-01-31 Havoc Pennington <hp@pobox.com>
2207 * doc/dbus-specification.sgml: fully specify the header. Add
2208 flags and major protocol version, and change header/body len to
2211 * dbus/dbus-message-builder.c (append_saved_length): append length
2214 * dbus/dbus-message.c (dbus_message_create_header): change header
2215 length and body length to unsigned. Add the new fields from the
2217 (_dbus_message_loader_return_buffer): unsigned header/body len
2219 2003-01-30 Havoc Pennington <hp@pobox.com>
2221 * dbus/dbus-auth.c: rework to use only REJECTED, no
2224 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2225 use REJECTED, suggested by Mark McLoughlin
2227 2003-01-30 Havoc Pennington <hp@pobox.com>
2229 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2230 a better way to report errors here. e.g. "unix address lacks
2231 path" or something. also "no such file" when the path doesn't
2234 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2236 (dbus_parse_address): add @todo about documenting address format,
2237 and allowing , and ; to be escaped
2239 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2242 Add dbus-address.[ch]
2244 * dbus/dbus-address.c: (dbus_address_entry_free),
2245 (dbus_address_entries_free), (create_entry),
2246 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2247 (dbus_parse_address), (_dbus_address_test):
2248 * dbus/dbus-address.h:
2249 New files for dealing with address parsing.
2251 * dbus/dbus-connection.c:
2252 Document timeout functions.
2254 * dbus/dbus-message.c:
2255 Document dbus_message_new_from_message.
2257 * dbus/dbus-server-debug.c:
2260 * dbus/dbus-server.c: (dbus_server_listen):
2261 Parse address and use correct server implementation.
2263 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2264 * dbus/dbus-string.h:
2265 New function with test.
2267 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2271 * dbus/dbus-transport-debug.c:
2274 * dbus/dbus-transport.c: (_dbus_transport_open):
2275 Parse address and use correct transport implementation.
2277 2003-01-30 Havoc Pennington <hp@pobox.com>
2279 * dbus/dbus-message.c: use message->byte_order instead of
2280 DBUS_COMPILER_BYTE_ORDER throughout.
2281 (dbus_message_create_header): pad header to align the
2282 start of the body of the message to 8-byte boundary
2284 * dbus/dbus-marshal.h: make all the demarshalers take const
2285 DBusString arguments.
2287 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2288 validate message args here, so we don't have to do slow validation
2289 later, and so we catch bad messages as they are incoming. Also add
2290 better checks on header_len and body_len. Also fill in
2293 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2294 implemented properly)
2295 (_dbus_string_validate_nul): new function to check all-nul
2297 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2298 get_arg_end_pos and remove all validation
2299 (_dbus_marshal_validate_arg): actually do validation here.
2301 2003-01-29 Havoc Pennington <hp@pobox.com>
2303 * dbus/dbus-message.c (check_message_handling): fix assertion
2304 failure on set_client_serial
2306 2003-01-28 Havoc Pennington <hp@pobox.com>
2308 * dbus/dbus-server-debug.c: Add doc section comments
2310 * dbus/dbus-transport-debug.c: add doc section comments
2312 2003-01-28 Havoc Pennington <hp@redhat.com>
2314 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2315 the reverse order from how I had it
2316 (_dbus_string_base64_encode): reverse encoding order. I was
2317 basically byteswapping everything during encoding.
2319 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2321 * dbus/dbus-connection-internal.h:
2322 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2323 (_dbus_connection_remove_timeout):
2324 Add functions for adding and removing timeouts.
2326 * dbus/dbus-message.c: (dbus_message_new_from_message):
2327 Add new function that takes a message and creates an exact
2328 copy of it, but with the refcount set to 1.
2329 (check_message_handling):
2332 * dbus/dbus-server-protected.h:
2333 * dbus/dbus-server.c: (_dbus_server_init_base),
2334 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2335 (dbus_server_set_timeout_functions):
2336 (_dbus_server_remove_timeout):
2337 New functions so that a server can add and remove timeouts.
2339 (dbus_server_listen):
2340 Add commented out call to dbus_server_debug_new.
2342 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2343 Actually set the handler, doh.
2345 * dbus/dbus-transport.c: (_dbus_transport_open):
2346 Add commented out call to dbus_transport_debug_client_new.
2349 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2351 2003-01-28 Havoc Pennington <hp@pobox.com>
2353 * dbus/dbus-message.c (check_message_handling): function to check
2354 on the loaded message, iterates over it etc.
2356 2003-01-28 Havoc Pennington <hp@pobox.com>
2358 * test/Makefile.am (dist-hook): fix make distdir
2360 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2362 2003-01-27 Havoc Pennington <hp@pobox.com>
2364 * dbus/dbus-mempool.c (time_for_size): replace printf with
2367 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2368 empty lines; fix the SAVE_LENGTH stuff to be
2369 START_LENGTH/END_LENGTH so it actually works; couple other
2372 * test/Makefile.am (dist-hook): add dist-hook for .message files
2374 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2375 can be constant or locked.
2376 (_dbus_string_free): allow freeing a const string as
2379 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2381 * dbus/dbus-test-main.c (main): take an argument which is the
2382 directory containing test data
2384 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2385 argument to this and load all the messages in test/data/
2386 checking that they can be loaded or not loaded as appropriate.
2388 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2390 * bus/dispatch.c: (bus_dispatch_message_handler):
2391 Dispatch messages sent to services.
2393 * bus/driver.c: (bus_driver_send_service_deleted),
2394 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2395 (bus_driver_send_service_acquired):
2396 Add helper functions for sending service related messages.
2398 (bus_driver_send_welcome_message):
2399 Send HELLO_REPLY instead of WELCOME.
2401 (bus_driver_handle_list_services):
2402 Send LIST_SERVICES_REPLY instead of SERVICES.
2404 (bus_driver_handle_own_service),
2405 (bus_driver_handle_service_exists):
2406 New message handlers.
2408 (bus_driver_handle_message):
2409 Invoke new message handlers.
2411 (bus_driver_remove_connection):
2412 Don't remove any services here since that's done automatically
2413 by bus_service_remove_owner now.
2416 New function signatures.
2418 * bus/services.c: (bus_service_add_owner):
2419 Send ServiceAcquired message if we're the only primary owner.
2421 (bus_service_remove_owner):
2422 Send ServiceAcquired/ServiceLost messages.
2424 (bus_service_set_prohibit_replacement),
2425 (bus_service_get_prohibit_replacement):
2426 Functions for setting prohibit replacement.
2428 (bus_service_has_owner):
2429 New function that checks if a connection is in the owner queue of
2433 Add new function signatures.
2435 * dbus/dbus-list.c: (_dbus_list_test):
2436 Add tests for _dbus_list_remove_last and traversing the list backwards.
2439 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2440 go any further, so return NULL then.
2442 * dbus/dbus-protocol.h:
2443 Add new messages, service flags and service replies.
2445 2003-01-26 Havoc Pennington <hp@pobox.com>
2447 * dbus/dbus-message-builder.c: implement, completely untested.
2449 * test/data/*: add data to be used in testing.
2450 ".message" files are our simple loadable text format.
2451 ".message-raw" will be binary dumps of messages.
2453 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2455 2003-01-26 Havoc Pennington <hp@pobox.com>
2457 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2459 * dbus/dbus-errors.c (dbus_result_to_string): add
2462 * dbus/dbus-message-builder.c: new file, will contain code to load
2463 up messages from files. Not implemented yet.
2465 2003-01-26 Havoc Pennington <hp@pobox.com>
2467 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2468 the sender by setting to NULL
2470 2003-01-26 Havoc Pennington <hp@pobox.com>
2472 The unit tests pass, but otherwise untested. If it breaks, the
2473 tests should have been better. ;-)
2475 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2478 * dbus/dbus-message.c: redo everything so we maintain
2479 message->header as the only copy of the various fields.
2480 This avoids the possibility of out-of-memory in some cases,
2481 for example dbus_message_lock() can't run out of memory anymore,
2482 and avoids extra copying. Figured I may as well go ahead and do
2483 this since it was busted for dbus_message_lock to not return
2484 failure on OOM, and dbus_message_write_header was totally
2485 unchecked for OOM. Also fixed some random other bugs.
2487 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2488 that strings are nul-terminated. Also, end_pos can be equal
2489 to string length just not greater than, I think.
2490 (_dbus_marshal_set_int32): new function
2491 (_dbus_marshal_set_uint32): new function
2492 (_dbus_marshal_set_string): new function
2494 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2495 a warning, init timeout_list to NULL
2496 (dbus_connection_send_message): don't use uninitialized variable
2499 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2501 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2503 * bus/driver.c: (bus_driver_handle_hello),
2504 (bus_driver_send_welcome_message):
2507 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2509 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2510 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2511 (dbus_connection_unref):
2512 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2513 * dbus/dbus-message.c: (dbus_message_unref),
2516 (dbus_message_get_fields):
2517 Remove debugging printout.
2519 (_dbus_message_loader_return_buffer):
2520 Don't store the header string.
2522 (_dbus_message_test):
2525 2003-01-26 Richard Hult <rhult@codefactory.se>
2527 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2528 the file descriptor list, since it can change under us.
2530 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2532 * glib/dbus-gmain.c: (dbus_connection_prepare),
2533 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2534 (remove_watch), (dbus_connection_hookup_with_g_main):
2535 Rewrite the glib handling to use its own GSource instead of a
2536 GIOChannel so we can catch messages put in the queue while waiting
2539 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2542 * bus/connection.c: (connection_disconnect_handler),
2543 (connection_watch_callback), (bus_connection_setup):
2544 * bus/dispatch.c: (send_one_message),
2545 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2546 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2548 * bus/driver.c: (bus_driver_send_service_deleted),
2549 (bus_driver_send_service_created), (bus_driver_handle_hello),
2550 (bus_driver_send_welcome_message),
2551 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2552 (bus_driver_handle_message):
2554 Refactor code, put the message dispatching in its own file. Use
2555 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2558 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2560 * dbus/dbus-internals.h:
2561 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2563 * dbus/dbus-message.c: (dbus_message_get_sender):
2564 * dbus/dbus-message.h:
2565 Implement dbus_message_get_sender.
2567 * dbus/dbus-protocol.h:
2568 Add message and service defines.
2570 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2572 * dbus/dbus-connection.c: (dbus_connection_send_message):
2573 * dbus/dbus-message-internal.h:
2574 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2575 (dbus_message_write_header):
2576 Remove _dbus_messag_unlock and don't set the client serial on a
2577 message if one already exists.
2579 2003-01-24 Havoc Pennington <hp@pobox.com>
2581 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2584 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2587 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2589 * dbus/dbus-list.c: (alloc_link), (free_link):
2590 Use a memory pool for the links.
2592 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2594 * bus/connection.c: (bus_connection_foreach):
2596 Add new bus_connection_foreach function.
2598 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2599 Add function that broadcasts a message to all clients.
2601 (bus_driver_send_service_created), (bus_driver_handle_hello),
2602 (bus_driver_send_welcome_message),
2603 (bus_driver_handle_list_services), (bus_driver_message_handler):
2604 Implement functions that take care of listing services, and notifying
2605 clients when new services are created.
2607 * bus/services.c: (bus_services_list):
2609 Add new function that returns an array of strings with the currently
2610 registered services.
2613 * glib/dbus-gmain.c:
2614 Update copyright year.
2616 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2618 * dbus/dbus-connection.c: (dbus_connection_send_message):
2619 Unlock the message in case it was sent earlier.
2621 (dbus_connection_send_message_with_reply_and_block):
2622 Remove the reply message from the list.
2624 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2625 Set array_len and new_pos correctly.
2627 (_dbus_marshal_test):
2628 Remove debug output.
2630 * dbus/dbus-message-internal.h:
2631 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2632 New function that returns the reply serial.
2634 (_dbus_message_unlock):
2635 New function that unlocks a message and resets its header.
2637 (dbus_message_append_string_array),
2638 (dbus_message_get_fields_valist),
2639 (dbus_message_iter_get_field_type),
2640 (dbus_message_iter_get_string_array),
2641 (dbus_message_get_fields),
2642 (dbus_message_append_fields_valist):
2643 Handle string arrays.
2645 (dbus_message_set_sender):
2646 Make this function public since the bus daemon needs it.
2648 (decode_header_data):
2649 Set the reply serial to -1 initially.
2651 * dbus/dbus-message.h:
2652 Add dbus_message_set_sender.
2654 2003-01-24 Havoc Pennington <hp@pobox.com>
2656 * doc/dbus-specification.sgml: add some stuff
2658 2003-01-22 Havoc Pennington <hp@pobox.com>
2660 * doc/dbus-specification.sgml: Start to document the protocol.
2662 2003-01-22 Havoc Pennington <hp@pobox.com>
2664 * dbus/dbus-connection.c
2665 (dbus_connection_send_message_with_reply_and_block): add some @todo
2667 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2669 2003-01-21 Havoc Pennington <hp@pobox.com>
2671 (patch untested because can't compile)
2673 * bus/driver.c (create_unique_client_name): make this function
2674 never recycle client names. Also, caller should initialize
2677 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2679 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2681 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2682 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2683 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2684 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2685 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2686 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2687 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2688 * dbus/dbus-marshal.h:
2689 * dbus/dbus-protocol.h:
2690 Add support for marshalling and demarshalling integer, double
2693 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2698 * bus/connection.c: (connection_disconnect_handler):
2699 Remove the connection from the bus driver's list.
2701 (connection_watch_callback): Dispatch messages.
2703 (free_connection_data): Free connection name.
2705 (bus_connection_setup): Add connection to the bus driver's list.
2706 (bus_connection_remove_owned_service):
2707 (bus_connection_set_name), (bus_connection_get_name):
2708 Add functions for setting and getting the connection's name.
2711 Add function headers.
2713 * bus/driver.c: (create_unique_client_name),
2714 (bus_driver_handle_hello_message),
2715 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2716 (bus_driver_add_connection), (bus_driver_remove_connection):
2719 * bus/services.c: (bus_service_free):
2721 New file that handles communication and registreation with the bus
2724 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2726 * dbus/dbus-connection.c: (dbus_connection_send_message):
2727 Add a new client_serial parameter.
2729 (dbus_connection_send_message_with_reply):
2730 Remove a @todo since we've implemented the blocking function.
2732 (dbus_connection_send_message_with_reply_and_block):
2733 New function that sends a message and waits for a reply and
2734 then returns the reply.
2736 * dbus/dbus-connection.h:
2739 * dbus/dbus-errors.c: (dbus_result_to_string):
2740 * dbus/dbus-errors.h:
2741 Add new DBUS_RESULT.
2743 * dbus/dbus-message-internal.h:
2744 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2745 (_dbus_message_set_sender), (dbus_message_write_header),
2746 (dbus_message_new_reply), (decode_header_data),
2747 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2748 * dbus/dbus-message.h:
2749 Add new functions that set the reply serial and sender.
2750 Also marshal and demarshal them correctly and add test.
2752 * dbus/dbus-protocol.h:
2753 Add new DBUS_MESSAGE_TYPE_SENDER.
2756 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2757 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2758 (dbus_connection_hookup_with_g_main):
2759 * glib/test-dbus-glib.c: (main):
2760 Rewrite to use GIOChannel and remove the GSource crack.
2762 * test/echo-client.c: (main):
2763 * test/watch.c: (check_messages):
2764 Update for changed APIs
2766 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2768 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2770 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2771 Create a DBusTimeoutList.
2772 (dbus_connection_set_timeout_functions): Add new function to
2773 set timeout callbacks
2775 * dbus/dbus-connection.h: Add public DBusTimeout API.
2777 * dbus/dbus-message.c: (dbus_message_get_service):
2778 * dbus/dbus-message.h: New function.
2780 * dbus/dbus-server.c: Fix small doc typo.
2782 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2784 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2786 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2787 of the string, just as long as specified.
2789 2003-01-19 Havoc Pennington <hp@pobox.com>
2791 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2794 * dbus/dbus-server.c (dbus_server_set_max_connections)
2795 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2796 keep track of current number of connections, and add API for
2797 setting a max (but haven't implemented enforcing the max yet)
2799 2003-01-18 Havoc Pennington <hp@pobox.com>
2801 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2802 reading/writing if read_watch != NULL or write_watch != NULL.
2804 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2805 the message loader code to actually load message->header and
2806 message->body into the newly-created message.
2808 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2811 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2812 (dbus_connection_get_max_message_size)
2813 (dbus_connection_set_max_live_messages_size)
2814 (dbus_connection_get_max_live_messages_size): implement some
2815 resource limitation functions
2817 * dbus/dbus-resources.c: new file implementing some of the
2818 resource limits stuff
2820 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2821 missing docs, add @todo to handle OOM etc.
2823 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2826 2003-01-18 Havoc Pennington <hp@pobox.com>
2828 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2829 connection if it hasn't been already.
2831 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2832 replace with DisconnectFunction.
2834 2003-01-18 Havoc Pennington <hp@pobox.com>
2836 Building --disable-verbose-mode --disable-asserts --disable-tests
2837 cuts the library from 112K to 45K or so
2839 * configure.in: check for varargs macro support,
2840 add --enable-verbose-mode, --enable-asserts.
2842 * dbus/dbus-internals.h (_dbus_assert): support
2844 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2846 2003-01-18 Havoc Pennington <hp@pobox.com>
2848 * dbus/dbus-test.c: include config.h so that tests actually run
2850 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2851 so the failure mode when that assumption fails will be plenty
2854 2003-01-18 Havoc Pennington <hp@pobox.com>
2856 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2858 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2861 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2862 since we don't want to use those in make check
2864 2003-01-15 Havoc Pennington <hp@redhat.com>
2870 2003-01-15 Havoc Pennington <hp@redhat.com>
2872 * test/Makefile.am: fix so that test source code ends up in the
2873 distribution on make distcheck
2875 2003-01-15 Havoc Pennington <hp@redhat.com>
2881 2003-01-15 Havoc Pennington <hp@redhat.com>
2883 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2884 fix build when --disable-tests
2886 * Makefile.am (EXTRA_DIST): put HACKING in here
2888 * HACKING: document procedure for making a tarball release.
2890 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2892 * bus/connection.c: (connection_error_handler),
2893 (bus_connection_setup):
2894 * bus/main.c: (main):
2895 Make sure that the DBusConnectionData struct is NULLed
2896 out to prevent a segfault.
2898 * dbus/dbus-errors.c: (dbus_result_to_string):
2899 * dbus/dbus-errors.h:
2900 * dbus/dbus-message.c: (dbus_message_get_fields),
2901 (dbus_message_get_fields_valist), (_dbus_message_test):
2902 * dbus/dbus-message.h:
2903 Make dbus_message_get_fields return a result code so we can
2904 track invalid fields as well as oom.
2906 2003-01-11 Havoc Pennington <hp@pobox.com>
2908 * configure.in: change --enable-test/--enable-ansi action-if-given
2909 to enable_foo=$enableval instead of enable_foo=yes
2911 2003-01-08 Havoc Pennington <hp@pobox.com>
2913 * dbus/dbus-string.c (_dbus_string_align_length): new function
2915 * dbus/dbus-test-main.c: move main() for test app here
2917 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2918 symbol to run tests, because dbus-test isn't in the main
2921 Code review nitpicks.
2923 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2924 for people with narrow emacs ;-). Assert client_serial was filled
2925 in. Assert message->name != NULL.
2926 (dbus_message_append_fields): have "first_field_type" arg separate
2927 from va list, needed for C++ binding that also uses varargs IIRC
2928 and helps with type safety
2929 (dbus_message_new): add @todo about using DBusString to store
2930 service/name internally
2931 (dbus_message_new): don't leak ->service and ->name on OOM later
2933 (dbus_message_unref): free the service name
2934 (dbus_message_get_fields): same change to varargs
2935 i.e. first_field_type
2936 (_dbus_message_loader_return_buffer): assert that the message data
2937 is aligned (if not it's a bug in our code). Put in verbose griping
2938 about why we set corrupted = TRUE.
2939 (decode_header_data): add FIXME that char* is evil. Was going to
2940 add FIXME about evil locale-specific string.h strncmp, but just
2941 switched to wacky string-as-uint32 optimization. Move check for
2942 "no room for field name" above get_const_data_len() to avoid
2943 assertion failure in get_const_data_len if we have trailing 2
2944 bytes or the like. Check for service and name fields being
2945 provided twice. Don't leak service/name on error. Require field
2946 names to be aligned to 4 bytes.
2948 * dbus/dbus-marshal.c: move byte swap stuff to header
2949 (_dbus_pack_int32): uscore-prefix
2950 (_dbus_unpack_int32): uscore-prefix
2951 (_dbus_unpack_uint32): export
2952 (_dbus_demarshal_string): add @todo complaining about use of
2954 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2955 handling allowing corrupt data to go unchecked
2957 2003-01-08 Havoc Pennington <hp@redhat.com>
2959 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2960 to the select() as needed for authentication. (should be using
2961 _dbus_poll() not select, but for another day)
2963 * dbus/dbus.h: include dbus/dbus-protocol.h
2965 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2967 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2970 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2972 * dbus/dbus-internals.c: (_dbus_type_to_string):
2973 New function that returns a string describing a type.
2975 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2976 * dbus/dbus-marshal.h:
2977 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2978 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2979 (dbus_message_iter_get_byte_array):
2980 * dbus/dbus-message.h:
2981 Add new convenience functions for appending and getting message fields.
2982 Also add demarshalling routines for byte arrays.
2984 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2986 * dbus/dbus-connection-internal.h:
2987 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2988 (_dbus_connection_get_next_client_serial),
2989 (dbus_connection_send_message):
2990 * dbus/dbus-internals.h:
2991 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2992 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2993 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2994 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2995 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2996 (_dbus_verbose_bytes), (_dbus_marshal_test):
2997 * dbus/dbus-marshal.h:
2998 * dbus/dbus-message-internal.h:
2999 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3000 (dbus_message_write_header), (_dbus_message_lock),
3001 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3002 (dbus_message_get_name), (dbus_message_append_int32),
3003 (dbus_message_append_uint32), (dbus_message_append_double),
3004 (dbus_message_append_string), (dbus_message_append_byte_array),
3005 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3006 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3007 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3008 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3009 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3010 (decode_header_data), (_dbus_message_loader_return_buffer),
3011 (message_iter_test), (_dbus_message_test):
3012 * dbus/dbus-message.h:
3013 * dbus/dbus-protocol.h:
3014 * dbus/dbus-test.c: (main):
3016 * glib/test-dbus-glib.c: (message_handler), (main):
3017 * test/echo-client.c: (main):
3018 * test/watch.c: (check_messages):
3019 Make messages sendable and receivable for real.
3021 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3023 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3024 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3025 * dbus/dbus-message.c: (dbus_message_append_int32),
3026 (dbus_message_append_uint32), (dbus_message_append_double),
3027 (dbus_message_append_string), (dbus_message_append_byte_array):
3028 Handle OOM restoration.
3030 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3032 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3033 (_dbus_demarshal_string), (_dbus_marshal_test):
3034 * dbus/dbus-marshal.h:
3035 * dbus/dbus-message.c: (dbus_message_get_name),
3036 Document these functions.
3038 (dbus_message_append_int32), (dbus_message_append_uint32),
3039 (dbus_message_append_double), (dbus_message_append_string),
3040 (dbus_message_append_byte_array):
3041 * dbus/dbus-message.h:
3042 Add functions for adding message fields of different types.
3044 * dbus/dbus-protocol.h:
3045 Add the different types.
3047 2003-01-05 Havoc Pennington <hp@pobox.com>
3049 * bus/connection.c: implement routines for handling connections,
3050 first thing is keeping a list of owned services on each connection
3051 and setting up watches etc.
3053 * bus/services.c: implement a mapping from service names to lists
3056 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3058 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3059 to use static mutexes for global data
3061 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3062 collection of functions to set/get application-specific data
3063 on the DBusConnection.
3065 2003-01-04 Havoc Pennington <hp@pobox.com>
3067 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3068 (_dbus_poll): new function
3070 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3073 * bus/loop.c: initial code for the daemon main loop
3075 2003-01-04 Havoc Pennington <hp@pobox.com>
3077 * test/watch.c (error_handler): make it safe if the error handler
3078 is called multiple times (if we s/error handler/disconnect
3079 handler/ we should just guarantee it's called only once)
3081 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3082 error handler on disconnect (it's quite possible we should
3083 just change the error handler to a "disconnect handler," I'm
3084 not sure we have any other meaningful errors)
3086 * configure.in: check for getpwnam_r
3088 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3089 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3090 mechanism as in SASL spec, using socket credentials
3092 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3093 (_dbus_send_credentials_unix_socket): new function
3095 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3097 (_dbus_write): only check errno if <0 returned
3098 (_dbus_write_two): ditto
3100 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3102 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3103 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3104 (_dbus_marshal_test):
3105 * dbus/dbus-marshal.h:
3106 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3107 to _dbus_marshal_utf8_string. Also fix some tests.
3109 2002-12-28 Harri Porten <porten@kde.org>
3111 * configure.in: added check for C++ compiler and a very cheesy
3112 check for the Qt integration
3114 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3116 * qt/Makefile.am: added
3118 * qt/.cvsignore: added
3120 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3121 latter, added #ifdef QT_THREAD_SUPPORT guard.
3123 * dbus/Makefile.am: added missing headers for make dist
3125 2002-12-28 Kristian Rietveld <kris@gtk.org>
3127 * dbus/Makefile.am: fixup export-symbols-regex.
3129 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3131 * acinclude.m4: Add this file and put the
3132 PKG_CHECK_MODULE macro in it.
3134 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3136 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3137 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3138 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3139 (_dbus_marshal_test):
3140 Make the demarshalling routines align the pos argument.
3141 Add string marshalling tests and fix the obvious bugs
3144 2002-12-26 Havoc Pennington <hp@pobox.com>
3146 * dbus/dbus-auth.c: fixes fixes fixes
3148 * dbus/dbus-transport-unix.c: wire up support for
3149 encoding/decoding data on the wire
3151 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3152 (_dbus_auth_decode_data): append to target string
3153 instead of nuking it.
3155 2002-12-26 Havoc Pennington <hp@pobox.com>
3157 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3158 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3161 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3162 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3163 now). Main point is because I wanted unpack_uint32 to implement
3165 (_dbus_verbose_bytes): new function
3167 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3169 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3170 mechanism to handle a corrupt message stream
3171 (_dbus_message_loader_new): fix preallocation to only prealloc,
3174 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3175 (_dbus_string_test): enhance tests for copy/move and fix the
3178 * dbus/dbus-transport-unix.c: Hold references in more places to
3179 avoid reentrancy problems
3181 * dbus/dbus-transport.c: ditto
3183 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3184 leak reference count in no-message case
3186 * test/watch.c (do_mainloop): handle adding/removing watches
3187 during iteration over the watches. Also, ref the connection/server
3188 stored on a watch, so we don't try to mangle a destroyed one.
3190 * dbus/dbus-transport-unix.c (do_authentication): perform
3193 * dbus/dbus-auth.c (get_state): add a state
3194 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3195 (_dbus_auth_get_unused_bytes): append the unused bytes
3196 to the passed in string, rather than prepend
3198 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3199 the auth conversation DBusAuth
3201 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3202 (_dbus_transport_new_for_domain_socket): when creating a
3203 transport, pass in whether it's a client-side or server-side
3204 transport so we know which DBusAuth to create
3206 2002-12-03 Havoc Pennington <hp@pobox.com>
3208 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3209 _after_ finalizing the derived members
3210 (unix_connection_set): unref watch if we fail to add it
3212 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3213 transport first, so that the connection owned by the
3214 transport will be valid as the transport finalizes.
3216 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3217 if necessary, and remove watches from the connection.
3219 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3221 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3223 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3224 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3225 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3226 (_dbus_marshal_test):
3227 * dbus/dbus-marshal.h:
3228 Add string marshal functions and have the demarshal functions
3229 return the new position.
3231 2002-12-25 Havoc Pennington <hp@pobox.com>
3233 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3234 it is a simple protocol that just maps directly to SASL.
3236 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3237 initial implementation, not actually used yet.
3239 * dbus/dbus-string.c (_dbus_string_find): new function
3240 (_dbus_string_equal): new function
3241 (_dbus_string_base64_encode): new function
3242 (_dbus_string_base64_decode): new function
3244 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3247 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3248 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3249 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3250 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3251 * dbus/dbus-marshal.h:
3252 * dbus/dbus-protocol.h:
3253 * dbus/dbus-test.c: (main):
3255 Add un-optimized marshalling/demarshalling routines.
3257 2002-12-25 Harri Porten <porten@kde.org>
3259 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3261 2002-12-24 Zack Rusin <zack@kde.org>
3263 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3264 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3267 2002-12-24 Havoc Pennington <hp@pobox.com>
3269 * glib/dbus-gthread.c: fix include
3271 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3272 I think glib API needs to change, though, as you don't
3273 want to use DBusMessageFunction, you want to use the
3274 DBusMessageHandler object. Probably
3275 dbus_connection_open_with_g_main_loop()
3276 and dbus_connection_setup_g_main_loop() or something like that
3277 (but think of better names...) that just create a connection
3278 that has watch/timeout functions etc. already set up.
3280 * dbus/dbus-connection.c
3281 (dbus_connection_send_message_with_reply): new function just to
3282 show how the message handler helps us deal with replies.
3284 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3286 * dbus/dbus-string.c (_dbus_string_test): free a string that
3289 * dbus/dbus-hash.c: use memory pools for the hash entries
3290 (rebuild_table): be more paranoid about overflow, and
3291 shrink table when we can
3292 (_dbus_hash_test): reduce number of sprintfs and write
3293 valid C89. Add tests for case where we grow and then
3294 shrink the hash table.
3296 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3298 * dbus/dbus-connection.c (dbus_connection_register_handler)
3299 (dbus_connection_unregister_handler): new functions
3301 * dbus/dbus-message.c (dbus_message_get_name): new
3303 * dbus/dbus-list.c: fix docs typo
3305 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3306 an object representing a handler for messages.
3308 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3311 * glib/dbus-gthread.c: (dbus_gthread_init):
3312 Don't use the gdbus prefix for public functions.
3314 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3318 Add GLib checks and fixup .pc files
3322 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3323 (gdbus_connection_check), (gdbus_connection_dispatch),
3324 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3325 (dbus_connection_gsource_new):
3326 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3327 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3328 * glib/test-dbus-glib.c: (message_handler), (main):
3331 2002-12-15 Harri Porten <porten@kde.org>
3333 * autogen.sh: check for libtoolize before attempting to use it
3335 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3338 * .cvsignore: ignore more stamp files
3340 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3342 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3343 without make install.
3345 2002-12-15 Havoc Pennington <hp@pobox.com>
3347 * dbus/dbus-threads.c: add thread stubs that a higher library
3348 layer can fill in. e.g. the GLib wrapper might fill them in with
3349 GThread stuff. We still need to use this thread API to
3350 thread-safe-ize the library.
3352 2002-12-12 Havoc Pennington <hp@pobox.com>
3354 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3355 below new interfaces and include fewer system headers.
3357 * dbus/dbus-sysdeps.c (_dbus_read): new function
3358 (_dbus_write): new function
3359 (_dbus_write_two): new function
3360 (_dbus_connect_unix_socket): new function
3361 (_dbus_listen_unix_socket): new function
3363 * dbus/dbus-message-internal.h: change interfaces to use
3366 2002-12-11 Havoc Pennington <hp@pobox.com>
3368 * dbus/dbus-types.h: add dbus_unichar
3370 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3372 * dbus/dbus-connection.c (dbus_connection_send_message): return
3375 * dbus/dbus-transport.c: include dbus-watch.h
3377 * dbus/dbus-connection.c: include dbus-message-internal.h
3379 * HACKING: add file with coding guidelines stuff.
3381 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3382 handling here, for security purposes (as in vsftpd). Not actually
3383 using this class yet.
3385 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3386 system/libc usage here, as in vsftpd, for ease of auditing (and
3387 should also simplify portability). Haven't actually moved all the
3388 system/libc usage into here yet.
3390 2002-11-25 Havoc Pennington <hp@pobox.com>
3392 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3393 always print the first verbose message.
3395 2002-11-24 Havoc Pennington <hp@pobox.com>
3397 * test/echo-client.c, test/echo-server.c: cheesy test
3400 * configure.in (AC_CHECK_FUNCS): check for writev
3402 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3405 * dbus/dbus-list.c (_dbus_list_foreach): new function
3407 * dbus/dbus-internals.c (_dbus_verbose): new function
3409 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3410 representing a server that listens for connections.
3412 * dbus/.cvsignore: create
3414 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3415 public API for reporting errors
3417 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3418 public object representing a connection that
3419 sends/receives messages. (Same object used for
3420 both client and server.)
3422 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3423 Basic abstraction for different kinds of stream
3424 that we might read/write messages from.
3426 2002-11-23 Havoc Pennington <hp@pobox.com>
3428 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3431 * dbus/dbus-test.c (main): add list test, and include
3432 dbus-test.h as intended
3434 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3435 (_dbus_hash_table_remove_int): return value indicates
3436 whether the entry existed to remove
3438 * dbus/dbus-list.c: add linked list utility class,
3441 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3444 2002-11-23 Havoc Pennington <hp@pobox.com>
3446 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3447 DBUS_END_DECLS to nothing, that should fix this once and for all
3449 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3451 * dbus/dbus-message.c, dbus/dbus-hash.c:
3452 add some missing @brief
3454 2002-11-23 Havoc Pennington <hp@pobox.com>
3456 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3457 to avoid confusing Doxygen
3459 * dbus/dbus-hash.c: @} not }@
3461 * dbus/dbus-message.c (struct DBusMessage): split out
3464 2002-11-23 Havoc Pennington <hp@pobox.com>
3466 * configure.in: pile on more warning flags if using gcc
3468 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3469 to document static functions
3471 * configure.in: add summary to end of configure so it
3472 looks nice and attractive
3474 * dbus/dbus-hash.c: finish implementation and write unit
3477 * configure.in: add --enable-tests to enable unit tests
3479 * dbus/dbus-test.c: test program to run unit tests
3480 for all files in dbus/*, initially runs a test for
3483 * dbus/dbus-internals.h: file to hold some internal utility stuff
3485 2002-11-22 Havoc Pennington <hp@redhat.com>
3487 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3488 "ported" away from Tcl
3490 * dbus/dbus-types.h: header for types such as dbus_bool_t
3492 2002-11-22 Havoc Pennington <hp@redhat.com>
3494 * dbus/dbus.h: fixups for doc warnings
3496 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3498 (QUIET): make it quiet so we can see warnings
3500 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3502 2002-11-22 Havoc Pennington <hp@redhat.com>
3504 * Makefile.am: include "Doxyfile" target in all-local
3506 * configure.in: generate the Doxyfile
3508 * Doxyfile.in: move Doxyfile here, so we can use
3509 configure to generate a Doxyfile with the right
3512 2002-11-22 Havoc Pennington <hp@redhat.com>
3514 * dbus/dbus-message.c: move inline docs into .c file
3516 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3517 so all docs are under doc/
3518 (MAN_EXTENSION): generate man pages. Use extension
3519 ".3dbus" which matches ".3qt" on my system,
3520 I guess this is OK, I don't know really.
3521 (FILE_PATTERNS): look for .c files not .h, makes sense
3524 2002-11-22 Havoc Pennington <hp@pobox.com>
3526 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3527 because any app can be a server, and any app can be a client,
3528 the bus is a special kind of server.
3530 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3532 * Doxyfile : adding. Still needs Makefile rules to be generated
3533 automatically (just run "doxygen" in the toplevel dir for now to
3536 * dbus/dbus-message.h : Adding sample docs (javadoc since
3537 resembles gtk-doc a little more)
3539 * dbus/dbus.h : Adding sample docs
3541 2002-11-21 Havoc Pennington <hp@redhat.com>
3543 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3544 so we can allow ourselves to include files directly,
3545 instead of having to use dbus.h
3547 * dbus/dbus.h: fill in
3549 * dbus/dbus-message.h: sketch out a sample header file.
3550 Include griping if you include it directly instead of
3553 * dbus/dbus-macros.h: new file with macros for extern "C",
3554 TRUE/FALSE, NULL, etc.
3556 * doc/file-boilerplate.c: put include guards in here
3558 2002-11-21 Havoc Pennington <hp@redhat.com>
3560 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3562 * COPYING: include the GPL as well, and license code
3563 under both AFL and GPL.
3565 2002-11-21 Havoc Pennington <hp@redhat.com>
3567 * acconfig.h: get rid of this
3569 * autogen.sh (run_configure): add --no-configure option
3571 * configure.in: remove AC_ARG_PROGRAM to make
3572 autoconf complain less. add AC_PREREQ.
3573 add AC_DEFINE third arg.
3575 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3578 Fix references so we can distcheck.
3580 2002-11-21 Havoc Pennington <hp@redhat.com>
3582 * Initial module creation