1 2003-04-05 Havoc Pennington <hp@pobox.com>
3 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4 reality; in fact multiple mechanisms are allowed.
6 * dbus/dbus-internals.c (_dbus_real_assert)
7 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
8 _dbus_assert_not_reached() into functions, so that they don't show
9 up in basic block counts for test coverage, and don't use up as
10 much disk space. Does mean slower execution speed though, so
11 assumes --disable-asserts is the normal production case.
13 2003-04-05 Havoc Pennington <hp@pobox.com>
15 * test/Makefile.am (dist-hook): also dist *.in files
21 2003-04-05 Havoc Pennington <hp@pobox.com>
23 * dbus/dbus-string.c: docs warning
25 * dbus/dbus-spawn.c: missing docs
27 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
29 2003-04-05 Havoc Pennington <hp@pobox.com>
31 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
34 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
35 to -1 once we've reaped the babysitter
36 (_dbus_babysitter_handle_watch): do as much work as we can, not
39 * bus/activation.c: add code using DBusBabysitter so that we
40 handle it when a service fails to start up properly.
41 (bus_activation_service_created): don't remove the activation
42 entries as we go, just let them get removed when we free the pending
43 activation. Unref reply messages after sending them.
45 2003-04-05 Havoc Pennington <hp@pobox.com>
47 * test/decode-gcov.c (main): print per-directory stats in the report
49 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
51 2003-04-05 Havoc Pennington <hp@pobox.com>
53 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
55 * test/decode-gcov.c: hack up a little program to suck data
56 out of gcov files. Yes this is sort of silly.
58 * configure.in: define something in config.h and do an
59 AM_CONDITIONAL when gcov is enabled
61 2003-04-04 Havoc Pennington <hp@redhat.com>
63 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
64 return a "babysitter" object that is used to monitor the status of
65 the spawned process and reap it when required.
67 * test/test-segfault.c, test/test-exit.c,
68 test/test-sleep-forever.c: binaries that do various lame things,
69 used in the test suite.
71 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
73 2003-04-03 Havoc Pennington <hp@pobox.com>
75 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
76 in preparation for modifying it, dbus-sysdeps is getting
79 2003-04-03 Havoc Pennington <hp@redhat.com>
81 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
84 * bus/*.[hc]: adapt to mainloop change
86 2003-04-03 Havoc Pennington <hp@redhat.com>
88 * bus/activation.c (load_directory): fix up memleaks
89 (bus_activation_entry_free): free the entry
91 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
92 we get one from the message bus; fix memleaks.
94 * dbus/dbus-message.c (dbus_set_error_from_message): new function
96 2003-04-03 Havoc Pennington <hp@pobox.com>
98 * bus/config-parser.c (bus_config_parser_unref): free
99 list of mechanisms, bug discovered by test suite enhancements
100 (putting system.conf and session.conf into suite)
102 * test/Makefile.am, test/test-service.c: add placeholder for a
103 test service that we'll activate as part of test suite. Doesn't
106 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
107 setting NULL value, and use system malloc not dbus_malloc()
108 when we have unavoidable memleakage.
110 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
111 didn't work, and support DBUS_BUS_ACTIVATION.
113 * bus/activation.c (child_setup): pass our well-known bus type to
116 * bus/config-parser.c: support <type> to specify well-known type
118 * doc/dbus-specification.sgml: document the env variables to
119 locate well-known buses and find service activator
121 2003-04-02 Havoc Pennington <hp@redhat.com>
123 * test/Makefile.am (all-local): add a rule to copy tests to
124 builddir, so we can have generated tests. Use this to remove the
125 silly hack for testing system.conf and session.conf. Will use this
126 shortly to generate .service files pointing to test binaries.
128 2003-04-02 Havoc Pennington <hp@redhat.com>
130 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
131 current alloc and needed new length, not max of the doubled
132 allocation and needed new length. Also, when building tests,
133 don't do the double-allocation stuff, just realloc every time.
135 2003-04-02 Havoc Pennington <hp@redhat.com>
137 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
139 (_dbus_string_get_dirname): new
140 (_dbus_sysdeps_test): new
141 (_dbus_directory_open): include dirnames in error messages
143 * bus/config-parser.c: interpret <include> and <includedir> and
144 <servicedir> relative to config file location if the given
145 filename is not absolute.
147 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
149 2003-04-02 Havoc Pennington <hp@redhat.com>
151 * bus/connection.c (bus_transaction_send_error_reply): set sender
152 service for the error, and unref the reply on success
154 * bus/activation.c: convert to use BusTransaction so OOM can be
156 (bus_activation_service_created): set sender of the message
158 2003-04-01 Havoc Pennington <hp@redhat.com>
160 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
161 <includedir> (at least mostly)
163 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
164 first, then the user ID
166 2003-04-01 Havoc Pennington <hp@pobox.com>
168 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
171 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
173 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
175 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
176 socket 0777, and unlink any existing socket.
178 * bus/bus.c (bus_context_new): change our UID/GID and fork if
179 the configuration file so specifies; set up auth mechanism
182 * bus/config-parser.c (bus_config_parser_content): add support
183 for <fork> option and fill in code for <auth>
185 * bus/system.conf.in: add <fork/> to default configuration,
186 and limit auth mechanisms to EXTERNAL
188 * doc/config-file.txt (Elements): add <fork>
190 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
191 (_dbus_change_identity): new function
193 2003-03-31 Havoc Pennington <hp@redhat.com>
195 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
196 (_dbus_listen_unix_socket): fix off-by-one error in null
197 termination spotted by Nalin
199 2003-03-31 Havoc Pennington <hp@redhat.com>
201 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
202 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
203 having a real home directory available.
205 2003-03-31 Havoc Pennington <hp@redhat.com>
207 * bus/Makefile.am (install-data-hook): create /var/run/dbus
209 * bus/messagebus.in: add init script for Red Hat /etc/init.d
211 * configure.in: add support for specifying a style of init script
214 2003-03-31 Havoc Pennington <hp@redhat.com>
216 Fix some annoying DBusString API and fix all affected code.
218 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
220 (_dbus_string_get_data): change to return string instead of using
222 (_dbus_string_get_const_data): ditto
223 (_dbus_string_get_data_len): ditto
224 (_dbus_string_get_const_data_len): ditto
226 2003-03-31 Havoc Pennington <hp@redhat.com>
228 * bus/main.c (main): fix up the command line arguments to be nicer
230 2003-03-31 Havoc Pennington <hp@redhat.com>
232 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
233 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
234 final location that lands in the config file
236 * bus/config-loader-expat.c (bus_config_load): fix type of
239 * doc/TODO: remove TODO item for dbus_bus_get()
241 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
243 2003-03-31 Havoc Pennington <hp@pobox.com>
245 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
246 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
247 argument since they are always client side
249 * dbus/dbus-server.c (dbus_server_get_address): new function
251 * bus/main.c (main): take the configuration file as an argument.
253 * test/data/valid-config-files/debug-allow-all.conf: new file to
254 use with dispatch.c tests for example
256 * bus/test-main.c (main): require test data dir
258 * bus/bus.c (bus_context_new): change this to take a
259 configuration file name as argument
261 * doc/config-file.txt (Elements): add <servicedir>
263 * bus/system.conf, bus/session.conf: new files
265 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
266 well-known socket if none set
268 * configure.in: create system.conf and session.conf
270 2003-03-30 Havoc Pennington <hp@pobox.com>
272 * bus/config-parser.c: hacking
274 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
275 to shut down, since it could cause weirdness with the DBusList
278 * dbus/dbus-list.c (_dbus_list_test): add tests for the
279 link-oriented stack routines
280 (alloc_link): free the mempool if the first alloc from it fails
282 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
284 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
286 (_dbus_string_skip_white): new
288 * doc/config-file.txt (Elements): add <includedir>
290 2003-03-28 Havoc Pennington <hp@pobox.com>
292 * dbus/dbus-string.c (_dbus_string_copy_data_len)
293 (_dbus_string_copy_data): new functions
295 2003-03-28 Anders Carlsson <andersca@codefactory.se>
297 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
301 * dbus/dbus-memory.c:
304 2003-03-28 Havoc Pennington <hp@pobox.com>
306 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
307 I think it may have just been superstition. Not sure.
309 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
310 failures that were not being handled.
312 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
314 * dbus/dbus-memory.c: add ability to set number of mallocs in a
315 row that will fail on out-of-memory.
317 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
318 function for testing out-of-memory handling.
320 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
321 allocation functions, they do map exactly to the expat ones.
323 2003-03-27 Havoc Pennington <hp@redhat.com>
325 * bus/config-loader-libxml.c (bus_config_load): add another error
328 2003-03-26 Anders Carlsson <andersca@codefactory.se>
331 Add note about automatic service activation.
333 * doc/dbus-specification.sgml:
334 Rename the specification and clarify a few things.
336 2003-03-26 Anders Carlsson <andersca@codefactory.se>
339 * dbus/dbus-address.c:
341 * dbus/dbus-marshal.c:
342 * dbus/dbus-server-debug-pipe.c:
343 * dbus/dbus-transport-unix.c:
344 Fix documentation warnings.
346 2003-03-26 Havoc Pennington <hp@pobox.com>
348 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
349 after every test so it's quick and easy to see which leaked, and
350 so we test multiple dbus_shutdown() calls
352 * configure.in: change configure.in XML stuff to also support
355 * config-loader-libxml.c: some hacking
357 * config-loader-expat.c: some hacking
359 * config-parser.c: some hacking, plus tests
361 2003-03-25 Havoc Pennington <hp@redhat.com>
363 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
365 * configure.in: add --with-xml option to specify XML library,
366 right now only libxml is supported.
368 * bus/config-loader-libxml.c, config-parser.c: sync some minor
369 nonworking code between home and work, still just stubs
371 2003-03-24 Havoc Pennington <hp@redhat.com>
373 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
376 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
377 NULL argument for "message" if the error is a well-known one,
378 fill in a generic message in this case.
380 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
383 * bus/test.c (bus_test_flush_bus): add
385 * bus/policy.c (bus_policy_test): test code stub
387 2003-03-24 Havoc Pennington <hp@pobox.com>
389 * bus/connection.c (bus_connections_setup_connection): set up
390 the "can this user connect" function, but it always returns
391 TRUE until we have a config file parser so we can have a config
392 file that allows connections.
394 2003-03-23 Havoc Pennington <hp@pobox.com>
396 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
397 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
398 the mutex, so we can check for proper memory management
401 * dbus/dbus-dataslot.c: remove the mutex from
402 DBusDataSlotAllocator and lock it manually when using it,
403 to simplify fitting it into the global slots framework.
405 * dbus/dbus-threads.c (init_static_locks): rework how we're
406 handling global locks so they are easily shut down.
408 * bus/policy.c (bus_policy_append_rule): fix
410 * bus/test-main.c (main): check for memleaks
412 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
413 test suite check for memleaks
415 * dbus/dbus-memory.c: add support in test mode for tracking
416 number of outstanding blocks
418 2003-03-23 Havoc Pennington <hp@pobox.com>
420 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
423 * dbus/dbus-hash.h: add ULONG hash keys
425 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
426 (_dbus_get_group_id): new function
428 2003-03-20 Havoc Pennington <hp@redhat.com>
430 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
432 (dbus_connection_get_unix_user): new function
434 2003-03-20 Havoc Pennington <hp@pobox.com>
436 * bus/connection.c (bus_connection_send_oom_error): assert that
438 (connection_execute_transaction): ditto
439 (bus_connection_preallocate_oom_error): fix to set the sender, and
440 set recipient to the destination service, not the bus driver
442 * bus/policy.c: hacking
444 * dbus/dbus-message.c (dbus_message_service_is): new function
445 (dbus_message_sender_is): new
447 2003-03-19 Havoc Pennington <hp@redhat.com>
449 * bus/policy.c: start sketching code for policy restrictions on
450 what connections can do.
452 2003-03-18 Havoc Pennington <hp@redhat.com>
454 * doc/TODO: some notes on high-level todo items. Little nitpick
455 stuff is all in @todo, so no need to add it here.
457 * doc/config-file.txt: some notes on how config file might look
459 2003-03-18 Anders Carlsson <andersca@codefactory.se>
465 2003-03-17 Havoc Pennington <hp@redhat.com>
467 * dbus/dbus-internals.h: add gcc attributes so that
468 our printf-style functions warn on bad arguments to
471 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
474 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
477 2003-03-17 Havoc Pennington <hp@redhat.com>
479 * bus/test-main.c (main): make it print something as it runs
480 so make check doesn't look stuck
482 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
483 from CVS, now obsolete
485 2003-03-17 Anders Carlsson <andersca@codefactory.se>
487 * bus/dispatch.c: (bus_dispatch):
488 Refetch the service name since it may have been reallocated
489 when dbus_message_set_sender was called.
491 * dbus/dbus-sysdeps.c: (_dbus_accept):
492 Add address and address length variables and use them to stop
493 valgrind from complaining.
495 2003-03-17 Havoc Pennington <hp@pobox.com>
497 All tests pass, no memleaks, no valgrind complaints.
499 * bus/test.c: refcount handler_slot
501 * bus/connection.c (bus_connections_new): refcount
504 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
505 bytes so that auth scripts pass.
507 * bus/dispatch.c: init message_handler_slot so it gets allocated
510 * bus/dispatch.c (message_handler_slot_ref): fix memleak
512 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
513 dealloc server_pipe_hash when no longer used for benefit of
516 * dbus/dbus-auth.c (process_command): memleak fix
518 * bus/dispatch.c (check_hello_message): memleak fix
520 2003-03-16 Havoc Pennington <hp@pobox.com>
522 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
524 2003-03-17 Anders Carlsson <andersca@codefactory.se>
526 * bus/activation.c (bus_activation_activate_service): Append
527 the pending activation entry to the list of pending activations.
529 2003-03-16 Havoc Pennington <hp@pobox.com>
531 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
534 * dbus/dbus-address.c (create_entry): fix OOM handling when
535 failing to alloc entry->method
537 2003-03-16 Havoc Pennington <hp@pobox.com>
539 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
542 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
543 add some missing dbus_set_result
545 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
546 alloc the DBusMessageHandler
548 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
549 the transport here, since we call this from the finalizer; it
550 resulted in a double-finalize.
552 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
553 where we tried to use transport->connection that was NULL,
554 happened when transport was disconnected early on due to OOM
556 * bus/*.c: adapt to handle OOM for watches/timeouts
558 * dbus/dbus-transport-unix.c: port to handle OOM during
561 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
562 reference to unused bytes instead of a copy
564 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
567 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
570 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
573 2003-03-16 Anders Carlsson <andersca@codefactory.se>
575 * doc/dbus-specification.sgml:
576 Document reply message for ActivateService.
578 2003-03-16 Anders Carlsson <andersca@codefactory.se>
580 * bus/activation.c: (bus_pending_activation_entry_free),
581 (bus_pending_activation_free), (bus_activation_new),
582 (bus_activation_unref), (bus_activation_service_created),
583 (bus_activation_activate_service):
585 * bus/bus.c: (bus_context_new):
586 * bus/desktop-file.c: (new_section):
587 * bus/driver.c: (bus_driver_send_service_deleted),
588 (bus_driver_handle_activate_service):
589 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
591 * dbus/dbus-connection.c:
592 (dbus_connection_send_with_reply_and_block):
593 * dbus/dbus-message.c: (dbus_message_append_args_valist):
594 * dbus/dbus-protocol.h:
595 Make activation work better. Now pending activations will be queued
596 and the daemon won't try to activate services that are already registered.
598 2003-03-16 Havoc Pennington <hp@pobox.com>
600 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
603 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
604 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
606 2003-03-16 Havoc Pennington <hp@pobox.com>
608 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
609 this. always run the test suite before commit...
611 * bus/*: adapt to DBusConnection API changes
613 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
614 requires renaming stuff to avoid dbus_connection_dispatch name
617 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
620 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
621 separate from _dbus_message_loader_return_buffer()
623 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
624 this, because it's now always broken to use; the number of
625 messages in queue vs. the number still buffered by the message
626 loader is undefined/meaningless. Should use
627 dbus_connection_get_dispatch_state().
628 (dbus_connection_dispatch): rename from
629 dbus_connection_dispatch_message
631 2003-03-16 Havoc Pennington <hp@pobox.com>
633 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
636 2003-03-16 Anders Carlsson <andersca@codefactory.se>
638 * dbus/dbus-connection.c:
639 (dbus_connection_send_with_reply_and_block):
640 Decrease connection->n_incoming when removing an entry
642 * dbus/dbus-dict.c: (dbus_dict_entry_free),
643 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
644 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
645 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
646 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
647 (dbus_dict_get_byte_array):
648 Handle NULL arrays and strings. Also add support for byte arrays.
650 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
651 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
652 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
653 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
654 (_dbus_demarshal_dict), (demarshal_and_validate_len),
655 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
656 * dbus/dbus-marshal.h:
657 Add support for marshalling and demarshalling empty arrays and strings.
659 * dbus/dbus-message.c: (dbus_message_append_args_valist),
660 (dbus_message_append_string_array),
661 (dbus_message_iter_get_boolean),
662 (dbus_message_iter_get_boolean_array),
663 (dbus_message_iter_get_int32_array),
664 (dbus_message_iter_get_uint32_array),
665 (dbus_message_iter_get_double_array),
666 (dbus_message_iter_get_byte_array),
667 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
668 (check_message_handling):
669 Add support for getting empty arrays and dicts.
671 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
672 Don't do any validation at all for now, that's better than just checking
675 * test/data/valid-messages/emptiness.message:
676 New test message with lots of empty arrays.
678 2003-03-16 Havoc Pennington <hp@pobox.com>
680 * dbus/dbus-connection.c
681 (_dbus_connection_queue_received_message_link): new function that
682 can't fail due to OOM
684 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
685 new function pops a message together with a list link
688 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
689 message queuing functions to avoid needing to alloc memory
691 2003-03-16 Havoc Pennington <hp@pobox.com>
693 Oops - test code was only testing failure of around 30 of the
694 mallocs in the test path, but it turns out there are 500+
695 mallocs. I believe this was due to misguided linking setup such
696 that there was one copy of dbus_malloc etc. in the daemon and one
697 in the shared lib, and only daemon mallocs were tested. In any
698 case, the test case now tests all 500+ mallocs, and doesn't pass
699 yet, though there are lots of fixes in this patch.
701 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
702 this so that it doesn't need to allocate memory, since it
703 has no way of indicating failure due to OOM (and would be
706 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
708 * bus/Makefile.am: rearrange to create two self-contained
709 libraries, to avoid having libraries with overlapping symbols.
710 that was resulting in weirdness, e.g. I'm pretty sure there
711 were two copies of global static variables.
713 * dbus/dbus-internals.c: move the malloc debug stuff to
716 * dbus/dbus-list.c (free_link): free list mempool if it becomes
719 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
721 * dbus/dbus-address.c (dbus_parse_address): free list nodes
724 * bus/dispatch.c (bus_dispatch_add_connection): free
725 message_handler_slot when no longer using it, so
726 memory leak checkers are happy for the test suite.
728 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
730 * bus/bus.c (new_connection_callback): disconnect in here if
731 bus_connections_setup_connection fails.
733 * bus/connection.c (bus_connections_unref): fix to free the
735 (bus_connections_setup_connection): if this fails, don't
736 disconnect the connection, just be sure there are no side
739 * dbus/dbus-string.c (undo_alignment): unbreak this
741 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
743 (_dbus_auth_new): fix the order in which we free strings
746 * bus/connection.c (bus_connection_disconnected): fix to
747 not send ServiceDeleted multiple times in case of memory
750 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
751 get the base service name
752 (dbus_bus_register_client): don't return base service name,
753 instead store it on the DBusConnection and have an accessor
755 (dbus_bus_register_client): rename dbus_bus_register()
757 * bus/dispatch.c (check_hello_message): verify that other
758 connections on the bus also got the correct results, not
759 just the one sending hello
761 2003-03-15 Havoc Pennington <hp@pobox.com>
763 Make it pass the Hello handling test including all OOM codepaths.
764 Now to do other messages...
766 * bus/services.c (bus_service_remove_owner): fix crash when
767 removing owner from an empty list of owners
768 (bus_registry_ensure): don't leave service in the list of
769 a connection's owned services if we fail to put the service
772 * bus/connection.c (bus_connection_preallocate_oom_error): set
773 error flag on the OOM error.
775 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
776 handle _dbus_transport_set_connection failure
778 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
779 to create watches up front and simply enable/disable them as
781 (unix_connection_set): this can now fail on OOM
783 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
784 of enabling/disabling a watch or timeout.
786 * bus/loop.c (bus_loop_iterate): don't touch disabled
789 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
791 2003-03-15 Havoc Pennington <hp@pobox.com>
793 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
794 write useful test code, after all that futzing around ;-)
796 Test does not yet pass because we can't handle OOM in
797 _dbus_transport_messages_pending (basically,
798 dbus_connection_preallocate_send() does not prealloc the write
799 watch). To fix this, I think we need to add new stuff to
800 set_watch_functions, namely a SetEnabled function so we can alloc
801 the watch earlier, then enable it later.
803 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
804 dbus-memory.c to the convenience lib
806 * bus/test.c: rename some static functions to keep them clearly
807 distinct from stuff in connection.c. Handle client disconnection.
809 2003-03-14 Havoc Pennington <hp@pobox.com>
811 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
812 transport, tests more of the real codepath. Set up clients
813 with bus_setup_debug_client.
815 * bus/test.c (bus_setup_debug_client): function to set up debug
816 "clients" on the main loop
818 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
821 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
824 * dbus/dbus-server-debug.c: support a debug server based on pipes
826 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
827 (_dbus_close): new function
829 * configure.in: check for socketpair
831 2003-03-14 Havoc Pennington <hp@redhat.com>
833 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
836 * dbus/dbus-transport-debug.c: rework this a good bit to be
837 less complicated. hopefully still works.
839 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
842 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
845 * dbus/dbus-message.c (dbus_message_copy): rename from
846 dbus_message_new_from_message, fix it up to copy
847 all the message fields, add test case
849 * bus/dispatch.c (bus_dispatch_test): add some more test code,
850 not quite passing yet
852 2003-03-14 Havoc Pennington <hp@pobox.com>
854 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
855 until no work remains" in test code. (the large diff here
856 is just code movement, no actual changes)
858 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
859 1, no point waiting around for test code.
860 (_dbus_server_debug_accept_transport): unref the timeout
861 after adding it (right?)
863 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
865 2003-03-13 Havoc Pennington <hp@redhat.com>
867 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
870 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
873 * dbus/dbus-connection.h: Make AddWatchFunction and
874 AddTimeoutFunction return a bool so they can fail on out-of-memory
876 * bus/bus.c (bus_context_new): set up timeout handlers
878 * bus/connection.c (bus_connections_setup_connection): set up
881 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
884 * bus/bus.c (bus_context_new): adapt to changes
886 * bus/connection.c: adapt to changes
888 * test/watch.c: adapt to DBusWatch changes
890 * bus/dispatch.c (bus_dispatch_test): started adding this but
893 2003-03-14 Anders Carlsson <andersca@codefactory.se>
895 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
897 2003-03-13 Havoc Pennington <hp@pobox.com>
899 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
900 set up a test framework as for the library
902 2003-03-12 Havoc Pennington <hp@pobox.com>
904 Throughout: purge global variables, introduce BusActivation,
905 BusConnections, BusRegistry, etc. objects instead.
907 * bus/bus.h, bus/bus.c: introduce BusContext as a global
910 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
911 going to redo this a bit differently I think
913 2003-03-12 Havoc Pennington <hp@redhat.com>
915 Mega-patch that gets the message bus daemon initially handling
916 out-of-memory. Work still needed. Also lots of random
917 moving stuff to DBusError instead of ResultCode.
919 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
921 * dbus/dbus-connection.c
922 (dbus_connection_send_with_reply_and_block): use DBusError
924 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
927 * dbus/dbus-connection.c (dbus_connection_send): drop the result
928 code here, as the only failure possible is OOM.
930 * bus/connection.c (bus_connection_disconnect):
931 rename bus_connection_disconnected as it's a notification only
933 * bus/driver.c (bus_driver_handle_acquire_service): don't free
934 "name" on get_args failure, should be done by get_args;
935 don't disconnect client for bad args, just return an error.
936 (bus_driver_handle_service_exists): ditto
938 * bus/services.c (bus_services_list): NULL-terminate returned array
940 * bus/driver.c (bus_driver_send_service_lost)
941 (bus_driver_send_service_acquired): send messages from driver to a
942 specific client to the client's unique name, not to the broadcast
945 * dbus/dbus-message.c (decode_header_data): reject messages that
946 contain no name field
947 (_dbus_message_get_client_serial): rename to
948 dbus_message_get_serial and make public
949 (_dbus_message_set_serial): rename from set_client_serial
950 (_dbus_message_set_reply_serial): make public
951 (_dbus_message_get_reply_serial): make public
953 * bus/connection.c (bus_connection_foreach): allow stopping
954 iteration by returning FALSE from foreach function.
956 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
957 (dbus_connection_free_preallocated_send)
958 (dbus_connection_preallocate_send): new API for sending a message
959 without possibility of malloc failure.
960 (dbus_connection_send_message): rename to just
961 dbus_connection_send (and same for whole function family)
963 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
965 * dbus/dbus-sysdeps.c (_dbus_exit): new function
967 * bus/activation.c: handle/return errors
969 * dbus/dbus-errors.h: add more DBUS_ERROR #define
971 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
972 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
973 (_dbus_result_from_errno): move to this file
975 2003-03-10 Anders Carlsson <andersca@codefactory.se>
977 * dbus/dbus-marshal.c:
978 (_dbus_marshal_set_string):
979 Take a length argument so we can marshal the correct string
982 (_dbus_marshal_dict), (_dbus_demarshal_dict),
983 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
984 (_dbus_marshal_test):
985 * dbus/dbus-marshal.h:
986 Add support for marshalling and demarshalling dicts.
988 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
989 Add support for TYPE DICT.
991 * dbus/dbus-message.c: (set_string_field):
992 Adjust header padding.
994 (dbus_message_append_args_valist), (dbus_message_append_dict),
995 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
996 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
997 (check_message_handling), (check_have_valid_message):
998 * dbus/dbus-message.h:
999 Add functions for setting and getting dicts.
1001 * dbus/dbus-protocol.h:
1007 * doc/dbus-specification.sgml:
1008 Add information about how dicts are marshalled.
1010 * test/data/invalid-messages/dict-with-nil-value.message:
1011 * test/data/invalid-messages/too-short-dict.message:
1012 * test/data/valid-messages/dict-simple.message:
1013 * test/data/valid-messages/dict.message:
1014 Add sample messages containing dicts.
1016 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1018 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1020 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1023 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1024 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1025 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1026 (dbus_dict_set_double), (dbus_dict_set_string),
1027 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1028 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1029 (dbus_dict_set_string_array), (_dbus_dict_test):
1031 Fix according to comments from Havoc.
1033 2003-03-06 Michael Meeks <michael@server.home>
1035 * configure.in: if we don't have kde-config, disable have_qt.
1037 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1042 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1043 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1044 (dbus_dict_remove), (dbus_dict_get_value_type),
1045 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1046 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1047 (dbus_dict_put_double), (dbus_dict_put_string),
1048 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1049 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1050 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1051 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1052 (dbus_dict_get_double), (dbus_dict_get_string),
1053 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1054 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1055 (dbus_dict_get_string_array), (_dbus_dict_test):
1057 Add DBusDict implementation
1059 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1063 2003-03-04 Havoc Pennington <hp@pobox.com>
1065 * test/data/auth/*: adapt to changes
1067 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1068 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1071 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1072 more stuff from being in a context name, to make the protocol
1073 simpler to deal with
1075 * dbus/dbus-errors.c (dbus_error_has_name): new function
1076 (dbus_error_is_set): new function
1078 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1079 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1081 * dbus/dbus-connection.c (dbus_connection_flush): also read
1082 messages during a flush operation
1084 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1086 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1088 * configure.in: Check for gethostbyname on Solaris.
1090 * dbus/dbus-transport.c: (_dbus_transport_open):
1091 Remove duplicate "tcp" entry.
1093 * doc/dbus-specification.sgml:
1094 Clarify some things.
1096 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1098 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1099 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1100 (_dbus_keyring_test):
1101 * dbus/dbus-md5.c: (_dbus_md5_compute):
1102 * dbus/dbus-sha.c: (_dbus_sha_compute):
1105 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1107 * README: Add some things.
1109 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1111 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1112 after case DBUS_TYPE_BOOELAN.
1114 2003-03-02 Havoc Pennington <hp@pobox.com>
1116 * test/break-loader.c (randomly_set_extreme_ints): add test that
1117 sets really huge and small integers
1119 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1120 that length of boolean array fits in the string, and that
1121 string has room for boolean value in single-bool case.
1123 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1124 optional value to "ALIGN" command which is what to fill the
1127 * test/data/valid-messages/no-padding.message: add regression
1128 test for the message padding problem
1130 2003-03-02 Havoc Pennington <hp@pobox.com>
1132 * dbus/dbus-message.c (decode_header_data): fix to always init
1133 message_padding, from Benjamin Dauvergne
1135 2003-03-02 Havoc Pennington <hp@pobox.com>
1141 2003-03-01 Joe Shaw <joe@assbarn.com>
1143 * configure.in: Check for "struct cmsgcred" and try to access its
1144 members for BSD-like unices.
1146 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1147 _dbus_read_credentials_unix_socket().
1148 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1149 read() for reading the credential byte off the unix socket. Use
1150 struct cmsgcred on systems that support it.
1152 2003-02-27 Alexander Larsson <alexl@redhat.com>
1156 Make gthreads-2.0 dependency optional. Don't build thread test if
1159 2003-02-27 Havoc Pennington <hp@pobox.com>
1161 * dbus/dbus-connection.c
1162 (dbus_connection_send_message_with_reply_and_block): fix doh!
1163 doh! doh! bug that resulted in never removing a reply from the
1164 queue, no wonder we called get_reply_serial so much ;-)
1166 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1167 and client serial instead of demarshaling them every time
1169 2003-02-27 Havoc Pennington <hp@pobox.com>
1171 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1172 more inlined, using dbus-string-private.h, speeds things up
1175 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1176 when freeing the string
1177 (_dbus_string_steal_data): fix for align offset
1178 (undo_alignment): new function
1180 2003-02-26 Havoc Pennington <hp@redhat.com>
1182 All kinds of audit fixes from Owen, plus initial attempt to
1183 handle unaligned memory returned from malloc.
1185 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1186 leave room for align_offset and nul byte
1187 (fixup_alignment): function to track an align_offset and
1188 ensure real->str is aligned
1189 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1190 to allow a nul byte plus align offset
1191 (_dbus_string_lock): fix overflow issue
1192 (_dbus_string_init_const_len): add assertions on sanity of len,
1193 assign allocated to be ALLOCATION_PADDING larger than len
1194 (set_length): fixup the overflow handling
1195 (_dbus_string_get_data_len): fix overflow in assertion
1196 (open_gap): detect overflow in size of gap to be opened
1197 (_dbus_string_lengthen): add overflow check
1198 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1199 (_dbus_string_append): add overflow check
1200 (_dbus_string_append_unichar): overflow
1201 (_dbus_string_delete): fix overflow in assertion
1202 (_dbus_string_copy_len): overflow in assertion
1203 (_dbus_string_replace_len): overflows in assertions
1204 (_dbus_string_find): change to implement in terms of
1205 _dbus_string_find_to
1206 (_dbus_string_find_to): assorted fixage
1207 (_dbus_string_equal_c_str): assert c_str != NULL,
1208 fix logic so the function works
1209 (_dbus_string_ends_with_c_str): fix overflow thingy
1210 (_dbus_string_base64_encode): overflow fix
1211 (_dbus_string_validate_ascii): overflow
1212 (_dbus_string_validate_nul): overflow
1214 2003-02-26 Havoc Pennington <hp@redhat.com>
1216 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1218 2003-02-26 Alexander Larsson <alexl@redhat.com>
1221 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1223 * dbus/dbus-connection.c:
1224 * dbus/dbus-connection.h:
1225 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1226 Add dbus_connection_set_wakeup_main_function and use it when queueing
1227 incoming and outgoing messages.
1230 * dbus/dbus-dataslot.c:
1231 Threadsafe usage of DBusDataSlotAllocator
1233 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1236 * dbus/dbus-server-unix.c:
1239 * glib/dbus-gmain.c:
1240 Implement the new wakeup functions for glib.
1243 * glib/test-thread-client.c:
1244 * glib/test-thread-server.c:
1245 * glib/test-thread.h:
1246 Initial cut at some thread test code. Not really done yet.
1248 2003-02-26 Havoc Pennington <hp@pobox.com>
1250 * dbus/dbus-connection.c
1251 (dbus_connection_send_message_with_reply_and_block): fix crash
1252 where we ref'd the outgoing message instead of the returned reply
1254 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1255 at the end of this function, so if we didn't need to read for
1256 authentication, we reinstall it for receiving messages
1258 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1259 a NULL sender for peer-to-peer case
1261 * dbus/dbus-transport-unix.c (check_read_watch): handle
1262 !authenticated case correctly
1264 * glib/dbus-gmain.c: add support for DBusServer
1266 * dbus/dbus-server.c: add data slot support
1268 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1269 return values and handle errors
1271 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1274 * Doxyfile.in (INPUT): add glib subdir
1276 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1277 setup_with_g_main instead of hookup_with_g_main; write docs
1279 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1281 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1282 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1283 * dbus/dbus-message.c: (dbus_message_append_boolean),
1284 (dbus_message_append_boolean_array),
1285 (dbus_message_get_args_valist), (_dbus_message_test):
1286 * dbus/dbus-message.h:
1287 * doc/dbus-specification.sgml:
1288 Various fixes as pointed out by Havoc.
1290 * test/data/invalid-messages/bad-boolean-array.message:
1291 * test/data/invalid-messages/bad-boolean.message:
1292 Add invalid boolean value test cases.
1294 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1296 * dbus/dbus-internals.c: (_dbus_type_to_string):
1297 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1298 (_dbus_marshal_validate_arg):
1299 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1300 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1301 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1302 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1303 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1304 (dbus_message_iter_get_double),
1305 (dbus_message_iter_get_boolean_array), (message_iter_test):
1306 * dbus/dbus-message.h:
1307 * dbus/dbus-protocol.h:
1308 * doc/dbus-specification.sgml:
1309 * test/data/valid-messages/lots-of-arguments.message:
1310 Add support for boolean and boolean array types.
1312 2003-02-23 Havoc Pennington <hp@pobox.com>
1314 * dbus/dbus-keyring.c: finish most of this implementation and
1317 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1318 these barf if the error isn't cleared to NULL
1320 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1321 (_dbus_create_directory): new function
1323 * dbus/dbus-errors.c (dbus_set_error): fix warning
1325 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1326 (_dbus_string_hex_decode): new function
1327 (test_hex_roundtrip): test code
1329 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1331 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1333 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1334 the save-to-temp/rename trick to atomically write the new file
1335 (_dbus_string_parse_uint): new function
1337 2003-02-22 Havoc Pennington <hp@pobox.com>
1339 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1341 2003-02-22 Havoc Pennington <hp@pobox.com>
1343 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1344 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1346 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1348 * dbus/test/data/sha-1: add US government test suite for SHA-1
1350 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1352 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1353 Make string arrays NULL-terminated.
1355 * dbus/dbus-memory.c: (dbus_free_string_array):
1356 * dbus/dbus-memory.h:
1357 New function for freeing NULL-terminated string arrays.
1359 * dbus/dbus-message-builder.c: (append_quoted_string),
1360 (_dbus_message_data_load):
1361 Add support for array types.
1363 * dbus/dbus-message.c: (check_message_handling):
1364 Add more types as test cases.
1366 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1367 (_dbus_string_parse_double):
1368 Add the start offset to the end offset.
1370 * test/data/valid-messages/lots-of-arguments.message:
1371 New test message with lots of arguments.
1373 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1375 * dbus/dbus-message.c: (dbus_message_append_nil),
1376 (dbus_message_append_int32), (dbus_message_append_uint32),
1377 (dbus_message_append_double), (dbus_message_append_string),
1378 (dbus_message_append_int32_array),
1379 (dbus_message_append_uint32_array),
1380 (dbus_message_append_double_array),
1381 (dbus_message_append_byte_array),
1382 (dbus_message_append_string_array):
1383 Fix all out-of-memory handling in these functions.
1385 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1387 * dbus/dbus-message.c: (dbus_message_append_nil):
1390 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1392 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1393 (dbus_message_append_nil), (dbus_message_append_int32_array),
1394 (dbus_message_append_uint32_array),
1395 (dbus_message_append_double_array),
1396 (dbus_message_append_byte_array),
1397 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1398 (dbus_message_iter_get_int32_array),
1399 (dbus_message_iter_get_uint32_array),
1400 (dbus_message_iter_get_double_array),
1401 (dbus_message_iter_get_byte_array),
1402 (dbus_message_iter_get_string_array):
1404 * dbus/dbus-message.h:
1405 Add functions for appending and getting arrays.
1407 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1409 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1410 element size at least 8 bytes, fixes mempool tests on
1413 2003-02-20 Alexander Larsson <alexl@redhat.com>
1415 * dbus/dbus-transport-unix.c (unix_do_iteration):
1416 Unlock the connection mutex during a blocking select call.
1417 Add todo about how we need a way to wake up the select.
1419 * dbus/dbus-connection-internal.h:
1420 * dbus/dbus-connection.c:
1421 Add _dbus_connection_lock and _dbus_connection_unlock.
1423 2003-02-19 Havoc Pennington <hp@pobox.com>
1425 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1426 Doxyfile.in, not Doxyfile
1428 * dbus/dbus-keyring.c: do some hacking on this
1430 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1432 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1434 (dbus_set_error): remove dbus_error_init, check for message ==
1435 NULL *before* we sprintf into it, and add @todo about including
1436 system headers in this file
1438 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1440 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1442 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1443 get various bits of user information based on either username
1445 (_dbus_homedir_from_username): new function
1447 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1450 Add check for nonposix getpwnam_r
1452 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1453 Align the pool element size to a sizeof (void *) boundary.
1455 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1456 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1457 General Solaris fixes.
1459 * test/data/valid-messages/simplest-manual.message:
1460 Explicitly state that we want little-endian packing.
1462 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1464 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1466 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1467 Added to create a transport connecting using a tcp/ip socket.
1469 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1470 to a tcp socket at given host and port.
1471 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1474 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1476 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1477 Added to create a server listening on a TCP/IP socket.
1479 2003-02-19 Havoc Pennington <hp@pobox.com>
1481 Throughout: mop up all the Doxygen warnings and undocumented
1484 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1485 to search any paths.
1487 * dbus/dbus-threads.c: move global mutex initializers to
1488 dbus-internals.h, multiple prototypes was confusing doxygen
1489 besides being kind of ugly
1491 * Doxyfile (PREDEFINED): have Doxygen define
1492 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1493 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1494 (do not abuse the feature! it's for stuff like the autogenerated
1495 macros in dbus-md5.c, not just for things you don't feel like
1498 2003-02-18 Havoc Pennington <hp@pobox.com>
1500 * dbus/dbus-string.c (_dbus_string_zero): new function
1502 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1503 wrap it in some dbus-friendly API
1505 * dbus/dbus-types.h: add 16-bit types
1507 2003-02-18 Joe Shaw <joe@assbarn.com>
1509 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1510 credentials from our currently running process.
1511 (get_word): Fix a buglet where we were copying the entire length
1512 instead of relative to our position.
1514 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1515 keys on the stack... it's 640k of data.
1517 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1518 read the credentials byte off the socket, even if we don't have
1520 (_dbus_poll): Implement poll() using select() for systems which
1523 * glib/test-dbus-glib.c (main): Print out an error if no
1524 parameters are given.
1526 * test/data/auth/fallback.auth-script: Added. Tests that a client
1527 can fallback to a secondary auth mechanism if the first fails.
1529 2003-02-18 Havoc Pennington <hp@pobox.com>
1533 2003-02-17 Havoc Pennington <hp@pobox.com>
1535 * doc/dbus-specification.sgml: lots of cosmetic
1536 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1537 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1538 s/server/bus/ (except in authentication section). Add a section
1539 "Message Bus Message Routing"
1541 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1547 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1549 * doc/dbus-specification.sgml:
1550 Specification updates.
1552 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1554 * bus/activation.c: (bus_activation_init), (child_setup),
1555 (bus_activation_activate_service):
1557 * bus/main.c: (main):
1558 Set DBUS_ADDRESS environment variable.
1560 * dbus/dbus-errors.c: (dbus_set_error):
1561 Don't use va_copy since that's a C99 feature.
1563 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1564 (_dbus_spawn_async):
1565 * dbus/dbus-sysdeps.h:
1566 Add child_setup_func to _dbus_spawn_async.
1568 * doc/dbus-specification.sgml:
1569 Update specification.
1571 * test/spawn-test.c: (setup_func), (main):
1574 2003-02-17 Alexander Larsson <alexl@redhat.com>
1576 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1579 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1583 * doc/dbus-test-plan.sgml:
1584 Add test plan document.
1589 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1591 * dbus/dbus-message.c: (decode_header_data),
1592 (_dbus_message_loader_return_buffer):
1593 Set the header padding amount when loading a message.
1595 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1597 * bus/dispatch.c: (send_one_message):
1598 Only send broadcast messages to registered connections.
1600 * dbus/dbus-message.c: (dbus_message_name_is):
1601 * dbus/dbus-message.h:
1602 New convenience function.
1604 * dbus/dbus-transport-debug.c: (do_reading):
1605 Only dispatch one message per run.
1608 * test/bus-test.c: (new_connection_callback), (die),
1609 (test_hello_client1_handler), (test_hello_client2_handler),
1610 (test_hello_replies), (main):
1612 * test/bus-test-loop.[ch]:
1615 2003-02-16 Havoc Pennington <hp@pobox.com>
1617 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1618 backward conditional
1620 2003-02-16 Alexander Larsson <alexl@redhat.com>
1622 * dbus/dbus-connection.c:
1623 Implement sent_message_with_reply. (with_reply_and block is still
1625 Made dispatch_message not lose message if OOM.
1627 * dbus/dbus-errors.h:
1628 Add NoReply error (for reply timeouts).
1630 2003-02-16 Alexander Larsson <alexl@redhat.com>
1632 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1633 Actually free keys and values when destroying hashtable.
1635 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1637 * dbus/dbus-auth.c: (client_try_next_mechanism):
1640 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1641 Return TRUE if there's no thread implementation around.
1643 * glib/dbus-gmain.c: (free_source),
1644 (dbus_connection_hookup_with_g_main):
1645 Make sure to remove the GSource when the connection is finalized.
1647 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1649 * bus/dispatch.c: (bus_dispatch_message_handler):
1650 * dbus/dbus-errors.h:
1651 Return an error if someone tries to send a message to a service
1654 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1656 * bus/activation.c: (load_directory), (bus_activation_init),
1657 (bus_activation_activate_service):
1660 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1661 More work on the activation handling.
1663 * dbus/dbus-errors.h:
1664 Add some error messages
1666 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1667 * dbus/dbus-message.h:
1668 New function that creates an error message.
1670 * dbus/dbus-protocol.h:
1671 Add ACTIVATE_SERVER message.
1673 * dbus/dbus-server-unix.c: (unix_handle_watch),
1674 (_dbus_server_new_for_domain_socket):
1675 Call _dbus_fd_set_close_on_exec.
1677 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1678 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1679 (_dbus_fd_set_close_on_exec):
1680 * dbus/dbus-sysdeps.h:
1681 Add _dbus_fd_set_close_on exec function. Also add function that checks
1682 that all open fds are set to close-on-exec and warns otherwise.
1684 * dbus/dbus-transport-unix.c:
1685 (_dbus_transport_new_for_domain_socket):
1686 Call _dbus_fd_set_close_on_exec.
1688 2003-02-16 Havoc Pennington <hp@pobox.com>
1690 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1691 allow people to avoid setting SIGPIPE to SIG_IGN
1692 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1693 we've been asked not to
1695 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1697 * dbus/dbus-list.c: (_dbus_list_append_link),
1698 (_dbus_list_prepend_link):
1699 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1703 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1706 * bus/activation.c: (bus_activation_entry_free),
1707 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1709 * bus/main.c: (main):
1710 Add simple activation support, doesn't work yet though.
1712 2003-02-15 Zack Rusin <zack@kde.org>
1714 * qt/dbus-qthread.cpp: small casting fix
1716 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1718 * dbus/dbus-errors.c: (dbus_set_error):
1719 * dbus/dbus-errors.h:
1720 Add a few errors and make dbus_set_error void.
1722 * dbus/dbus-sysdeps.c:
1723 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1724 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1725 * dbus/dbus-sysdeps.h:
1726 Add _dbus_spawn_async.
1728 * test/spawn-test.c: (main):
1729 Test for _dbus_spawn_async.
1731 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1733 * dbus/dbus-internals.h:
1734 Fix build without tests.
1736 * dbus/dbus-list.c: (alloc_link):
1737 Fix a segfault when a malloc fails.
1739 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1740 (dbus_malloc0), (dbus_realloc):
1741 Add support for malloc debugging.
1743 2003-02-15 Alexander Larsson <alexl@redhat.com>
1745 * dbus/dbus-threads.c:
1746 * dbus/dbus-threads.h:
1747 Add condvars. Remove static mutext from API.
1748 Implement static mutexes by initializing them from threads_init.
1750 * glib/dbus-gthread.c:
1751 * qt/dbus-qthread.cpp:
1752 Update with the thread api changes.
1757 Turn StaticMutex into normal mutex + init function.
1758 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1759 _dbus_list_append_link, _dbus_list_prepend_link
1762 * dbus/dbus-sysdeps.c:
1763 * dbus/dbus-sysdeps.h:
1764 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1765 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1767 * dbus/dbus-protocol.h:
1768 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1770 * dbus/dbus-message.c:
1771 Make ref/unref atomic.
1774 * dbus/dbus-connection-internal.h:
1775 * dbus/dbus-connection.c:
1776 * dbus/dbus-connection.h:
1778 Change _peek to _borrow,_return & _steal_borrowed.
1779 Change disconnect callback to event.
1780 Make dbus_connection_dispatch_messages reentrant.
1782 * dbus/dbus-transport.c:
1783 Don't ref the connection on calls to the transport
1786 * dbus/dbus-message-handler.c:
1789 * glib/dbus-gmain.c:
1790 Don't use peek_message anymore
1793 * test/debug-thread.c:
1794 * test/debug-thread.h:
1795 Simple thread implementation that asserts() on deadlocks in
1796 single-threaded code.
1799 (main) Call debug_threads_init.
1802 Use disconnect message instead of disconnect callback.
1806 Don't call dbus_connection_set_disconnect_function. Instead export
1807 bus_connection_disconnect.
1810 Call bus_connection_disconnect when we get a disconnected message.
1812 2003-02-15 Havoc Pennington <hp@pobox.com>
1814 * dbus/dbus-message.c (dbus_message_new): fool around with the
1817 2003-02-14 Havoc Pennington <hp@pobox.com>
1819 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1821 * dbus/dbus-memory.c: fail if the debug functions indicate we
1824 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1825 (_dbus_decrement_fail_alloc_counter): debug functions to
1826 simulate memory allocation failures
1828 2003-02-14 Havoc Pennington <hp@pobox.com>
1830 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1833 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1835 * bus/driver.c: (bus_driver_handle_hello):
1837 * bus/services.c: (bus_service_lookup):
1838 Reorder message sending so we get a more sane order.
1840 * test/bus-test.c: (message_handler):
1843 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1845 * bus/driver.c: (bus_driver_send_service_deleted),
1846 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1847 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1848 (bus_driver_send_welcome_message),
1849 (bus_driver_handle_list_services),
1850 (bus_driver_handle_acquire_service),
1851 (bus_driver_handle_service_exists):
1852 * dbus/dbus-bus.c: (dbus_bus_register_client),
1853 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1854 * dbus/dbus-errors.c: (dbus_result_to_string):
1855 * dbus/dbus-errors.h:
1856 * dbus/dbus-message.c: (dbus_message_append_args),
1857 (dbus_message_append_args_valist), (dbus_message_get_args),
1858 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1859 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1860 (dbus_message_iter_get_byte_array),
1861 (dbus_message_iter_get_string_array), (message_iter_test),
1862 (check_message_handling), (_dbus_message_test):
1863 * dbus/dbus-message.h:
1864 * test/bus-test.c: (main):
1865 Change fields to arguments in messages, so that they won't be
1866 confused with header fields.
1868 * glib/test-dbus-glib.c: (main):
1869 Remove append_fields from hello message.
1871 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1873 * dbus/dbus-errors.c:
1874 * dbus/dbus-message.c:
1875 * dbus/dbus-string.c:
1876 Documentation fixes.
1878 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1880 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1882 Implement support for timeouts in dbus-glib.
1884 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1886 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1887 * dbus/dbus-message.c: (process_test_subdir):
1888 * test/break-loader.c: (find_breaks_based_on):
1889 Plug some memory leaks.
1891 2003-02-13 Richard Hult <rhult@codefactory.se>
1893 * bus/main.c: Fix build.
1895 * dbus/dbus-errors.h:
1896 * dbus/dbus-errors.c: Fix copyright for Anders.
1898 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1903 * bus/connection.c: (bus_connection_foreach):
1906 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1907 (unescape_string), (new_section), (parse_section_start),
1908 (parse_key_value), (report_error), (bus_desktop_file_load),
1909 (bus_desktop_file_get_string):
1910 * bus/desktop-file.h:
1911 Use DBusError for error reporting.
1913 * bus/dispatch.c: (send_one_message),
1914 (bus_dispatch_message_handler):
1915 * bus/driver.c: (bus_driver_send_service_deleted),
1916 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1917 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1918 (bus_driver_send_welcome_message),
1919 (bus_driver_handle_list_services),
1920 (bus_driver_handle_acquire_service),
1921 (bus_driver_handle_service_exists):
1922 * bus/loop.c: (bus_loop_run):
1924 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1926 * bus/utils.c: (bus_wait_for_memory):
1928 New files with general utility functions.
1930 * dbus/dbus-internals.h:
1931 Remove _DBUS_HANDLE_OOM.
1933 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1935 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1936 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1937 * dbus/dbus-errors.h:
1938 Add DBusError structure.
1940 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1942 * test/data/valid-messages/standard-acquire-service.message:
1943 * test/data/valid-messages/standard-hello.message:
1944 * test/data/valid-messages/standard-list-services.message:
1945 * test/data/valid-messages/standard-service-exists.message:
1946 Add some standard messages.
1948 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1950 * bus/driver.c: (bus_driver_send_welcome_message),
1951 (bus_driver_handle_list_services),
1952 (bus_driver_handle_acquire_service),
1953 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1954 Update for API changes in libdbus.
1956 * dbus/dbus-message.c: (dbus_message_new_reply):
1957 * dbus/dbus-message.h:
1958 Remove the name argument. The spec states that replies shouldn't
1961 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1963 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1964 (report_error), (bus_desktop_file_load), (lookup_section),
1965 (lookup_line), (bus_desktop_file_get_raw),
1966 (bus_desktop_file_get_string):
1967 * bus/desktop-file.h:
1968 Some fixes, and new functions for getting a key value from a section.
1970 2003-02-13 Havoc Pennington <hp@pobox.com>
1972 * test/data/auth/fail-after-n-attempts.auth-script: new test
1974 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1977 2003-02-13 Havoc Pennington <hp@pobox.com>
1979 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1980 dbus_credentials_match were backward
1982 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1983 NO_CREDENTIALS and ROOT_CREDENTIALS
1985 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1986 into here. Never process more commands after we've reached an
1987 end state; store further data as unused bytes.
1989 * test/data/auth/*: add more auth tests
1991 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1992 command to match exact string and EXPECT_UNUSED to match unused
1995 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1997 2003-02-12 Havoc Pennington <hp@pobox.com>
1999 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2000 \r off of popped lines
2002 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2005 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2008 2003-02-12 Havoc Pennington <hp@pobox.com>
2010 * dbus/Makefile.am: remove break-loader from the build, since it
2013 * configure.in: add --enable-gcov to turn on coverage profiling
2014 flags and disable optimization
2016 2003-02-10 Havoc Pennington <hp@pobox.com>
2018 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2019 initial cut at test framework for DBusAuth from laptop.
2020 Doesn't quite work yet but it compiles and I need to get
2021 it off the 266mhz laptop. ;-)
2023 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2024 fix a memleak in error case
2026 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2029 * bus/desktop-file.c:
2030 * bus/desktop-file.h:
2031 Add a desktop file parser.
2033 2003-02-11 Zack Rusin <zack@kde.org>
2035 * qt/message.[h|cpp]: sample implementation
2036 of the KDE wrapper for DBusMessage
2038 2003-02-09 Zack Rusin <zack@kde.org>
2040 * test/bus-test.c: make_it_compile
2041 * doc/dbus-specification.sgml: minimal semantic fix
2043 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2049 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2052 * dbus/dbus-break-loader.c:
2054 * test/break-loader.c:
2055 Move dbus-break-loader to test/ and rename it to break-loader.
2057 2003-02-02 Havoc Pennington <hp@pobox.com>
2059 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2060 for code to manage cookies in your home directory
2062 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2064 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2065 to authenticate, then disconnect the client.
2067 2003-02-03 Alexander Larsson <alexl@redhat.com>
2069 * dbus/dbus-message.c (dbus_message_append_fields):
2072 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2074 * doc/dbus-specification.sgml:
2075 Update address format section.
2077 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2080 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2081 (message_handler), (new_connection_callback), (loop_quit),
2085 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2087 * bus/driver.c: (bus_driver_handle_service_exists):
2088 Simplify the code a bit.
2090 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2093 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2096 Add libdbus-daemon.la and link to it.
2098 2003-02-01 James Willcox <jwillcox@gnome.org>
2100 * bus/driver.c: (bus_driver_handle_own_service):
2101 Actually include the service reply code in the message.
2103 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2105 * bus/driver.c: (bus_driver_handle_service_exists):
2106 Don't unref the incoming message.
2108 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2110 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2112 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2114 * dbus/dbus-server.c: (dbus_server_listen):
2115 * dbus/dbus-transport.c: (_dbus_transport_open):
2116 ifdef out the calls to the debug transport and server.
2118 2003-02-02 Alexander Larsson <alexl@redhat.com>
2120 * dbus/dbus-watch.c (dbus_watch_get_flags):
2121 Add note in the docs that ERROR or HANGUP won't be returned
2122 and are assumed always on.
2124 * glib/dbus-gmain.c (add_watch):
2125 Always add IO_ERR | IO_HUP
2127 * dbus/dbus-message.h:
2128 Add semicolon after dbus_message_iter_get_string_array().
2129 Makes qt code build again
2131 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2133 * bus/driver.c: (create_unique_client_name),
2134 (bus_driver_handle_hello):
2135 Don't take a name, just use a numeric id to identify
2139 * dbus/dbus-bus.c: (dbus_bus_register_client),
2140 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2142 Add new convenience functions for communicating with the bus.
2144 * dbus/dbus-message.h:
2146 * dbus/dbus-protocol.h:
2149 2003-02-01 Alexander Larsson <alexl@redhat.com>
2151 * dbus/dbus-message.c (dbus_message_append_fields):
2152 Add some more doc comments.
2154 2003-02-01 Havoc Pennington <hp@pobox.com>
2156 * dbus/dbus-break-loader.c (randomly_modify_length): change
2157 a 4-byte value in the message as if it were a length
2159 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2160 execute bit on saved files
2162 2003-02-01 Havoc Pennington <hp@pobox.com>
2164 * dbus/dbus-break-loader.c (main): new program to find messages
2165 that break the loader.
2167 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2168 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2170 * dbus/dbus-string.c (_dbus_string_set_byte): new
2172 2003-01-31 Havoc Pennington <hp@pobox.com>
2174 * dbus/dbus-message.c: refactor the test code to be more general,
2175 in preparation for writing a "randomly permute test cases to
2176 try to break the loader" program.
2178 2003-01-31 Havoc Pennington <hp@pobox.com>
2180 * doc/dbus-specification.sgml: work on the specification
2182 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2183 the protocol version of the message.
2185 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2186 no longer specifies that.
2187 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2190 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2191 "break" for DBUS_TYPE_NIL, remove @todo
2193 2003-01-31 Havoc Pennington <hp@pobox.com>
2195 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2196 just set_is_error/get_is_error as this is a commonly-used
2197 function, and write docs.
2199 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2201 * dbus/dbus-address.c: (dbus_address_entry_free):
2202 Free key and value lists.
2204 * dbus/dbus-internals.c: (_dbus_type_to_string):
2205 Add the types we didn't have.
2207 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2208 (_dbus_marshal_validate_arg):
2211 * dbus/dbus-message.c: (dbus_message_set_sender):
2212 Remove todo about being able to set sender to NULL.
2214 (dbus_message_set_is_error_reply),
2215 (dbus_message_get_is_error_reply):
2216 * dbus/dbus-message.h:
2219 * dbus/dbus-protocol.h:
2220 Add error reply flag.
2222 * test/data/valid-messages/opposite-endian.message:
2223 Add NIL type to test.
2225 2003-01-31 Havoc Pennington <hp@pobox.com>
2227 * doc/dbus-specification.sgml: fully specify the header. Add
2228 flags and major protocol version, and change header/body len to
2231 * dbus/dbus-message-builder.c (append_saved_length): append length
2234 * dbus/dbus-message.c (dbus_message_create_header): change header
2235 length and body length to unsigned. Add the new fields from the
2237 (_dbus_message_loader_return_buffer): unsigned header/body len
2239 2003-01-30 Havoc Pennington <hp@pobox.com>
2241 * dbus/dbus-auth.c: rework to use only REJECTED, no
2244 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2245 use REJECTED, suggested by Mark McLoughlin
2247 2003-01-30 Havoc Pennington <hp@pobox.com>
2249 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2250 a better way to report errors here. e.g. "unix address lacks
2251 path" or something. also "no such file" when the path doesn't
2254 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2256 (dbus_parse_address): add @todo about documenting address format,
2257 and allowing , and ; to be escaped
2259 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2262 Add dbus-address.[ch]
2264 * dbus/dbus-address.c: (dbus_address_entry_free),
2265 (dbus_address_entries_free), (create_entry),
2266 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2267 (dbus_parse_address), (_dbus_address_test):
2268 * dbus/dbus-address.h:
2269 New files for dealing with address parsing.
2271 * dbus/dbus-connection.c:
2272 Document timeout functions.
2274 * dbus/dbus-message.c:
2275 Document dbus_message_new_from_message.
2277 * dbus/dbus-server-debug.c:
2280 * dbus/dbus-server.c: (dbus_server_listen):
2281 Parse address and use correct server implementation.
2283 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2284 * dbus/dbus-string.h:
2285 New function with test.
2287 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2291 * dbus/dbus-transport-debug.c:
2294 * dbus/dbus-transport.c: (_dbus_transport_open):
2295 Parse address and use correct transport implementation.
2297 2003-01-30 Havoc Pennington <hp@pobox.com>
2299 * dbus/dbus-message.c: use message->byte_order instead of
2300 DBUS_COMPILER_BYTE_ORDER throughout.
2301 (dbus_message_create_header): pad header to align the
2302 start of the body of the message to 8-byte boundary
2304 * dbus/dbus-marshal.h: make all the demarshalers take const
2305 DBusString arguments.
2307 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2308 validate message args here, so we don't have to do slow validation
2309 later, and so we catch bad messages as they are incoming. Also add
2310 better checks on header_len and body_len. Also fill in
2313 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2314 implemented properly)
2315 (_dbus_string_validate_nul): new function to check all-nul
2317 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2318 get_arg_end_pos and remove all validation
2319 (_dbus_marshal_validate_arg): actually do validation here.
2321 2003-01-29 Havoc Pennington <hp@pobox.com>
2323 * dbus/dbus-message.c (check_message_handling): fix assertion
2324 failure on set_client_serial
2326 2003-01-28 Havoc Pennington <hp@pobox.com>
2328 * dbus/dbus-server-debug.c: Add doc section comments
2330 * dbus/dbus-transport-debug.c: add doc section comments
2332 2003-01-28 Havoc Pennington <hp@redhat.com>
2334 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2335 the reverse order from how I had it
2336 (_dbus_string_base64_encode): reverse encoding order. I was
2337 basically byteswapping everything during encoding.
2339 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2341 * dbus/dbus-connection-internal.h:
2342 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2343 (_dbus_connection_remove_timeout):
2344 Add functions for adding and removing timeouts.
2346 * dbus/dbus-message.c: (dbus_message_new_from_message):
2347 Add new function that takes a message and creates an exact
2348 copy of it, but with the refcount set to 1.
2349 (check_message_handling):
2352 * dbus/dbus-server-protected.h:
2353 * dbus/dbus-server.c: (_dbus_server_init_base),
2354 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2355 (dbus_server_set_timeout_functions):
2356 (_dbus_server_remove_timeout):
2357 New functions so that a server can add and remove timeouts.
2359 (dbus_server_listen):
2360 Add commented out call to dbus_server_debug_new.
2362 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2363 Actually set the handler, doh.
2365 * dbus/dbus-transport.c: (_dbus_transport_open):
2366 Add commented out call to dbus_transport_debug_client_new.
2369 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2371 2003-01-28 Havoc Pennington <hp@pobox.com>
2373 * dbus/dbus-message.c (check_message_handling): function to check
2374 on the loaded message, iterates over it etc.
2376 2003-01-28 Havoc Pennington <hp@pobox.com>
2378 * test/Makefile.am (dist-hook): fix make distdir
2380 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2382 2003-01-27 Havoc Pennington <hp@pobox.com>
2384 * dbus/dbus-mempool.c (time_for_size): replace printf with
2387 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2388 empty lines; fix the SAVE_LENGTH stuff to be
2389 START_LENGTH/END_LENGTH so it actually works; couple other
2392 * test/Makefile.am (dist-hook): add dist-hook for .message files
2394 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2395 can be constant or locked.
2396 (_dbus_string_free): allow freeing a const string as
2399 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2401 * dbus/dbus-test-main.c (main): take an argument which is the
2402 directory containing test data
2404 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2405 argument to this and load all the messages in test/data/
2406 checking that they can be loaded or not loaded as appropriate.
2408 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2410 * bus/dispatch.c: (bus_dispatch_message_handler):
2411 Dispatch messages sent to services.
2413 * bus/driver.c: (bus_driver_send_service_deleted),
2414 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2415 (bus_driver_send_service_acquired):
2416 Add helper functions for sending service related messages.
2418 (bus_driver_send_welcome_message):
2419 Send HELLO_REPLY instead of WELCOME.
2421 (bus_driver_handle_list_services):
2422 Send LIST_SERVICES_REPLY instead of SERVICES.
2424 (bus_driver_handle_own_service),
2425 (bus_driver_handle_service_exists):
2426 New message handlers.
2428 (bus_driver_handle_message):
2429 Invoke new message handlers.
2431 (bus_driver_remove_connection):
2432 Don't remove any services here since that's done automatically
2433 by bus_service_remove_owner now.
2436 New function signatures.
2438 * bus/services.c: (bus_service_add_owner):
2439 Send ServiceAcquired message if we're the only primary owner.
2441 (bus_service_remove_owner):
2442 Send ServiceAcquired/ServiceLost messages.
2444 (bus_service_set_prohibit_replacement),
2445 (bus_service_get_prohibit_replacement):
2446 Functions for setting prohibit replacement.
2448 (bus_service_has_owner):
2449 New function that checks if a connection is in the owner queue of
2453 Add new function signatures.
2455 * dbus/dbus-list.c: (_dbus_list_test):
2456 Add tests for _dbus_list_remove_last and traversing the list backwards.
2459 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2460 go any further, so return NULL then.
2462 * dbus/dbus-protocol.h:
2463 Add new messages, service flags and service replies.
2465 2003-01-26 Havoc Pennington <hp@pobox.com>
2467 * dbus/dbus-message-builder.c: implement, completely untested.
2469 * test/data/*: add data to be used in testing.
2470 ".message" files are our simple loadable text format.
2471 ".message-raw" will be binary dumps of messages.
2473 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2475 2003-01-26 Havoc Pennington <hp@pobox.com>
2477 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2479 * dbus/dbus-errors.c (dbus_result_to_string): add
2482 * dbus/dbus-message-builder.c: new file, will contain code to load
2483 up messages from files. Not implemented yet.
2485 2003-01-26 Havoc Pennington <hp@pobox.com>
2487 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2488 the sender by setting to NULL
2490 2003-01-26 Havoc Pennington <hp@pobox.com>
2492 The unit tests pass, but otherwise untested. If it breaks, the
2493 tests should have been better. ;-)
2495 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2498 * dbus/dbus-message.c: redo everything so we maintain
2499 message->header as the only copy of the various fields.
2500 This avoids the possibility of out-of-memory in some cases,
2501 for example dbus_message_lock() can't run out of memory anymore,
2502 and avoids extra copying. Figured I may as well go ahead and do
2503 this since it was busted for dbus_message_lock to not return
2504 failure on OOM, and dbus_message_write_header was totally
2505 unchecked for OOM. Also fixed some random other bugs.
2507 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2508 that strings are nul-terminated. Also, end_pos can be equal
2509 to string length just not greater than, I think.
2510 (_dbus_marshal_set_int32): new function
2511 (_dbus_marshal_set_uint32): new function
2512 (_dbus_marshal_set_string): new function
2514 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2515 a warning, init timeout_list to NULL
2516 (dbus_connection_send_message): don't use uninitialized variable
2519 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2521 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2523 * bus/driver.c: (bus_driver_handle_hello),
2524 (bus_driver_send_welcome_message):
2527 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2529 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2530 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2531 (dbus_connection_unref):
2532 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2533 * dbus/dbus-message.c: (dbus_message_unref),
2536 (dbus_message_get_fields):
2537 Remove debugging printout.
2539 (_dbus_message_loader_return_buffer):
2540 Don't store the header string.
2542 (_dbus_message_test):
2545 2003-01-26 Richard Hult <rhult@codefactory.se>
2547 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2548 the file descriptor list, since it can change under us.
2550 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2552 * glib/dbus-gmain.c: (dbus_connection_prepare),
2553 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2554 (remove_watch), (dbus_connection_hookup_with_g_main):
2555 Rewrite the glib handling to use its own GSource instead of a
2556 GIOChannel so we can catch messages put in the queue while waiting
2559 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2562 * bus/connection.c: (connection_disconnect_handler),
2563 (connection_watch_callback), (bus_connection_setup):
2564 * bus/dispatch.c: (send_one_message),
2565 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2566 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2568 * bus/driver.c: (bus_driver_send_service_deleted),
2569 (bus_driver_send_service_created), (bus_driver_handle_hello),
2570 (bus_driver_send_welcome_message),
2571 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2572 (bus_driver_handle_message):
2574 Refactor code, put the message dispatching in its own file. Use
2575 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2578 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2580 * dbus/dbus-internals.h:
2581 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2583 * dbus/dbus-message.c: (dbus_message_get_sender):
2584 * dbus/dbus-message.h:
2585 Implement dbus_message_get_sender.
2587 * dbus/dbus-protocol.h:
2588 Add message and service defines.
2590 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2592 * dbus/dbus-connection.c: (dbus_connection_send_message):
2593 * dbus/dbus-message-internal.h:
2594 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2595 (dbus_message_write_header):
2596 Remove _dbus_messag_unlock and don't set the client serial on a
2597 message if one already exists.
2599 2003-01-24 Havoc Pennington <hp@pobox.com>
2601 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2604 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2607 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2609 * dbus/dbus-list.c: (alloc_link), (free_link):
2610 Use a memory pool for the links.
2612 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2614 * bus/connection.c: (bus_connection_foreach):
2616 Add new bus_connection_foreach function.
2618 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2619 Add function that broadcasts a message to all clients.
2621 (bus_driver_send_service_created), (bus_driver_handle_hello),
2622 (bus_driver_send_welcome_message),
2623 (bus_driver_handle_list_services), (bus_driver_message_handler):
2624 Implement functions that take care of listing services, and notifying
2625 clients when new services are created.
2627 * bus/services.c: (bus_services_list):
2629 Add new function that returns an array of strings with the currently
2630 registered services.
2633 * glib/dbus-gmain.c:
2634 Update copyright year.
2636 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2638 * dbus/dbus-connection.c: (dbus_connection_send_message):
2639 Unlock the message in case it was sent earlier.
2641 (dbus_connection_send_message_with_reply_and_block):
2642 Remove the reply message from the list.
2644 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2645 Set array_len and new_pos correctly.
2647 (_dbus_marshal_test):
2648 Remove debug output.
2650 * dbus/dbus-message-internal.h:
2651 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2652 New function that returns the reply serial.
2654 (_dbus_message_unlock):
2655 New function that unlocks a message and resets its header.
2657 (dbus_message_append_string_array),
2658 (dbus_message_get_fields_valist),
2659 (dbus_message_iter_get_field_type),
2660 (dbus_message_iter_get_string_array),
2661 (dbus_message_get_fields),
2662 (dbus_message_append_fields_valist):
2663 Handle string arrays.
2665 (dbus_message_set_sender):
2666 Make this function public since the bus daemon needs it.
2668 (decode_header_data):
2669 Set the reply serial to -1 initially.
2671 * dbus/dbus-message.h:
2672 Add dbus_message_set_sender.
2674 2003-01-24 Havoc Pennington <hp@pobox.com>
2676 * doc/dbus-specification.sgml: add some stuff
2678 2003-01-22 Havoc Pennington <hp@pobox.com>
2680 * doc/dbus-specification.sgml: Start to document the protocol.
2682 2003-01-22 Havoc Pennington <hp@pobox.com>
2684 * dbus/dbus-connection.c
2685 (dbus_connection_send_message_with_reply_and_block): add some @todo
2687 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2689 2003-01-21 Havoc Pennington <hp@pobox.com>
2691 (patch untested because can't compile)
2693 * bus/driver.c (create_unique_client_name): make this function
2694 never recycle client names. Also, caller should initialize
2697 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2699 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2701 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2702 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2703 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2704 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2705 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2706 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2707 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2708 * dbus/dbus-marshal.h:
2709 * dbus/dbus-protocol.h:
2710 Add support for marshalling and demarshalling integer, double
2713 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2718 * bus/connection.c: (connection_disconnect_handler):
2719 Remove the connection from the bus driver's list.
2721 (connection_watch_callback): Dispatch messages.
2723 (free_connection_data): Free connection name.
2725 (bus_connection_setup): Add connection to the bus driver's list.
2726 (bus_connection_remove_owned_service):
2727 (bus_connection_set_name), (bus_connection_get_name):
2728 Add functions for setting and getting the connection's name.
2731 Add function headers.
2733 * bus/driver.c: (create_unique_client_name),
2734 (bus_driver_handle_hello_message),
2735 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2736 (bus_driver_add_connection), (bus_driver_remove_connection):
2739 * bus/services.c: (bus_service_free):
2741 New file that handles communication and registreation with the bus
2744 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2746 * dbus/dbus-connection.c: (dbus_connection_send_message):
2747 Add a new client_serial parameter.
2749 (dbus_connection_send_message_with_reply):
2750 Remove a @todo since we've implemented the blocking function.
2752 (dbus_connection_send_message_with_reply_and_block):
2753 New function that sends a message and waits for a reply and
2754 then returns the reply.
2756 * dbus/dbus-connection.h:
2759 * dbus/dbus-errors.c: (dbus_result_to_string):
2760 * dbus/dbus-errors.h:
2761 Add new DBUS_RESULT.
2763 * dbus/dbus-message-internal.h:
2764 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2765 (_dbus_message_set_sender), (dbus_message_write_header),
2766 (dbus_message_new_reply), (decode_header_data),
2767 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2768 * dbus/dbus-message.h:
2769 Add new functions that set the reply serial and sender.
2770 Also marshal and demarshal them correctly and add test.
2772 * dbus/dbus-protocol.h:
2773 Add new DBUS_MESSAGE_TYPE_SENDER.
2776 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2777 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2778 (dbus_connection_hookup_with_g_main):
2779 * glib/test-dbus-glib.c: (main):
2780 Rewrite to use GIOChannel and remove the GSource crack.
2782 * test/echo-client.c: (main):
2783 * test/watch.c: (check_messages):
2784 Update for changed APIs
2786 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2788 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2790 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2791 Create a DBusTimeoutList.
2792 (dbus_connection_set_timeout_functions): Add new function to
2793 set timeout callbacks
2795 * dbus/dbus-connection.h: Add public DBusTimeout API.
2797 * dbus/dbus-message.c: (dbus_message_get_service):
2798 * dbus/dbus-message.h: New function.
2800 * dbus/dbus-server.c: Fix small doc typo.
2802 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2804 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2806 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2807 of the string, just as long as specified.
2809 2003-01-19 Havoc Pennington <hp@pobox.com>
2811 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2814 * dbus/dbus-server.c (dbus_server_set_max_connections)
2815 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2816 keep track of current number of connections, and add API for
2817 setting a max (but haven't implemented enforcing the max yet)
2819 2003-01-18 Havoc Pennington <hp@pobox.com>
2821 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2822 reading/writing if read_watch != NULL or write_watch != NULL.
2824 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2825 the message loader code to actually load message->header and
2826 message->body into the newly-created message.
2828 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2831 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2832 (dbus_connection_get_max_message_size)
2833 (dbus_connection_set_max_live_messages_size)
2834 (dbus_connection_get_max_live_messages_size): implement some
2835 resource limitation functions
2837 * dbus/dbus-resources.c: new file implementing some of the
2838 resource limits stuff
2840 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2841 missing docs, add @todo to handle OOM etc.
2843 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2846 2003-01-18 Havoc Pennington <hp@pobox.com>
2848 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2849 connection if it hasn't been already.
2851 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2852 replace with DisconnectFunction.
2854 2003-01-18 Havoc Pennington <hp@pobox.com>
2856 Building --disable-verbose-mode --disable-asserts --disable-tests
2857 cuts the library from 112K to 45K or so
2859 * configure.in: check for varargs macro support,
2860 add --enable-verbose-mode, --enable-asserts.
2862 * dbus/dbus-internals.h (_dbus_assert): support
2864 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2866 2003-01-18 Havoc Pennington <hp@pobox.com>
2868 * dbus/dbus-test.c: include config.h so that tests actually run
2870 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2871 so the failure mode when that assumption fails will be plenty
2874 2003-01-18 Havoc Pennington <hp@pobox.com>
2876 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2878 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2881 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2882 since we don't want to use those in make check
2884 2003-01-15 Havoc Pennington <hp@redhat.com>
2890 2003-01-15 Havoc Pennington <hp@redhat.com>
2892 * test/Makefile.am: fix so that test source code ends up in the
2893 distribution on make distcheck
2895 2003-01-15 Havoc Pennington <hp@redhat.com>
2901 2003-01-15 Havoc Pennington <hp@redhat.com>
2903 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2904 fix build when --disable-tests
2906 * Makefile.am (EXTRA_DIST): put HACKING in here
2908 * HACKING: document procedure for making a tarball release.
2910 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2912 * bus/connection.c: (connection_error_handler),
2913 (bus_connection_setup):
2914 * bus/main.c: (main):
2915 Make sure that the DBusConnectionData struct is NULLed
2916 out to prevent a segfault.
2918 * dbus/dbus-errors.c: (dbus_result_to_string):
2919 * dbus/dbus-errors.h:
2920 * dbus/dbus-message.c: (dbus_message_get_fields),
2921 (dbus_message_get_fields_valist), (_dbus_message_test):
2922 * dbus/dbus-message.h:
2923 Make dbus_message_get_fields return a result code so we can
2924 track invalid fields as well as oom.
2926 2003-01-11 Havoc Pennington <hp@pobox.com>
2928 * configure.in: change --enable-test/--enable-ansi action-if-given
2929 to enable_foo=$enableval instead of enable_foo=yes
2931 2003-01-08 Havoc Pennington <hp@pobox.com>
2933 * dbus/dbus-string.c (_dbus_string_align_length): new function
2935 * dbus/dbus-test-main.c: move main() for test app here
2937 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2938 symbol to run tests, because dbus-test isn't in the main
2941 Code review nitpicks.
2943 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2944 for people with narrow emacs ;-). Assert client_serial was filled
2945 in. Assert message->name != NULL.
2946 (dbus_message_append_fields): have "first_field_type" arg separate
2947 from va list, needed for C++ binding that also uses varargs IIRC
2948 and helps with type safety
2949 (dbus_message_new): add @todo about using DBusString to store
2950 service/name internally
2951 (dbus_message_new): don't leak ->service and ->name on OOM later
2953 (dbus_message_unref): free the service name
2954 (dbus_message_get_fields): same change to varargs
2955 i.e. first_field_type
2956 (_dbus_message_loader_return_buffer): assert that the message data
2957 is aligned (if not it's a bug in our code). Put in verbose griping
2958 about why we set corrupted = TRUE.
2959 (decode_header_data): add FIXME that char* is evil. Was going to
2960 add FIXME about evil locale-specific string.h strncmp, but just
2961 switched to wacky string-as-uint32 optimization. Move check for
2962 "no room for field name" above get_const_data_len() to avoid
2963 assertion failure in get_const_data_len if we have trailing 2
2964 bytes or the like. Check for service and name fields being
2965 provided twice. Don't leak service/name on error. Require field
2966 names to be aligned to 4 bytes.
2968 * dbus/dbus-marshal.c: move byte swap stuff to header
2969 (_dbus_pack_int32): uscore-prefix
2970 (_dbus_unpack_int32): uscore-prefix
2971 (_dbus_unpack_uint32): export
2972 (_dbus_demarshal_string): add @todo complaining about use of
2974 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2975 handling allowing corrupt data to go unchecked
2977 2003-01-08 Havoc Pennington <hp@redhat.com>
2979 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2980 to the select() as needed for authentication. (should be using
2981 _dbus_poll() not select, but for another day)
2983 * dbus/dbus.h: include dbus/dbus-protocol.h
2985 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2987 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2990 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2992 * dbus/dbus-internals.c: (_dbus_type_to_string):
2993 New function that returns a string describing a type.
2995 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2996 * dbus/dbus-marshal.h:
2997 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2998 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2999 (dbus_message_iter_get_byte_array):
3000 * dbus/dbus-message.h:
3001 Add new convenience functions for appending and getting message fields.
3002 Also add demarshalling routines for byte arrays.
3004 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3006 * dbus/dbus-connection-internal.h:
3007 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3008 (_dbus_connection_get_next_client_serial),
3009 (dbus_connection_send_message):
3010 * dbus/dbus-internals.h:
3011 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3012 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3013 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3014 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3015 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3016 (_dbus_verbose_bytes), (_dbus_marshal_test):
3017 * dbus/dbus-marshal.h:
3018 * dbus/dbus-message-internal.h:
3019 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3020 (dbus_message_write_header), (_dbus_message_lock),
3021 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3022 (dbus_message_get_name), (dbus_message_append_int32),
3023 (dbus_message_append_uint32), (dbus_message_append_double),
3024 (dbus_message_append_string), (dbus_message_append_byte_array),
3025 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3026 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3027 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3028 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3029 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3030 (decode_header_data), (_dbus_message_loader_return_buffer),
3031 (message_iter_test), (_dbus_message_test):
3032 * dbus/dbus-message.h:
3033 * dbus/dbus-protocol.h:
3034 * dbus/dbus-test.c: (main):
3036 * glib/test-dbus-glib.c: (message_handler), (main):
3037 * test/echo-client.c: (main):
3038 * test/watch.c: (check_messages):
3039 Make messages sendable and receivable for real.
3041 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3043 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3044 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3045 * dbus/dbus-message.c: (dbus_message_append_int32),
3046 (dbus_message_append_uint32), (dbus_message_append_double),
3047 (dbus_message_append_string), (dbus_message_append_byte_array):
3048 Handle OOM restoration.
3050 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3052 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3053 (_dbus_demarshal_string), (_dbus_marshal_test):
3054 * dbus/dbus-marshal.h:
3055 * dbus/dbus-message.c: (dbus_message_get_name),
3056 Document these functions.
3058 (dbus_message_append_int32), (dbus_message_append_uint32),
3059 (dbus_message_append_double), (dbus_message_append_string),
3060 (dbus_message_append_byte_array):
3061 * dbus/dbus-message.h:
3062 Add functions for adding message fields of different types.
3064 * dbus/dbus-protocol.h:
3065 Add the different types.
3067 2003-01-05 Havoc Pennington <hp@pobox.com>
3069 * bus/connection.c: implement routines for handling connections,
3070 first thing is keeping a list of owned services on each connection
3071 and setting up watches etc.
3073 * bus/services.c: implement a mapping from service names to lists
3076 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3078 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3079 to use static mutexes for global data
3081 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3082 collection of functions to set/get application-specific data
3083 on the DBusConnection.
3085 2003-01-04 Havoc Pennington <hp@pobox.com>
3087 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3088 (_dbus_poll): new function
3090 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3093 * bus/loop.c: initial code for the daemon main loop
3095 2003-01-04 Havoc Pennington <hp@pobox.com>
3097 * test/watch.c (error_handler): make it safe if the error handler
3098 is called multiple times (if we s/error handler/disconnect
3099 handler/ we should just guarantee it's called only once)
3101 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3102 error handler on disconnect (it's quite possible we should
3103 just change the error handler to a "disconnect handler," I'm
3104 not sure we have any other meaningful errors)
3106 * configure.in: check for getpwnam_r
3108 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3109 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3110 mechanism as in SASL spec, using socket credentials
3112 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3113 (_dbus_send_credentials_unix_socket): new function
3115 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3117 (_dbus_write): only check errno if <0 returned
3118 (_dbus_write_two): ditto
3120 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3122 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3123 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3124 (_dbus_marshal_test):
3125 * dbus/dbus-marshal.h:
3126 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3127 to _dbus_marshal_utf8_string. Also fix some tests.
3129 2002-12-28 Harri Porten <porten@kde.org>
3131 * configure.in: added check for C++ compiler and a very cheesy
3132 check for the Qt integration
3134 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3136 * qt/Makefile.am: added
3138 * qt/.cvsignore: added
3140 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3141 latter, added #ifdef QT_THREAD_SUPPORT guard.
3143 * dbus/Makefile.am: added missing headers for make dist
3145 2002-12-28 Kristian Rietveld <kris@gtk.org>
3147 * dbus/Makefile.am: fixup export-symbols-regex.
3149 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3151 * acinclude.m4: Add this file and put the
3152 PKG_CHECK_MODULE macro in it.
3154 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3156 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3157 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3158 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3159 (_dbus_marshal_test):
3160 Make the demarshalling routines align the pos argument.
3161 Add string marshalling tests and fix the obvious bugs
3164 2002-12-26 Havoc Pennington <hp@pobox.com>
3166 * dbus/dbus-auth.c: fixes fixes fixes
3168 * dbus/dbus-transport-unix.c: wire up support for
3169 encoding/decoding data on the wire
3171 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3172 (_dbus_auth_decode_data): append to target string
3173 instead of nuking it.
3175 2002-12-26 Havoc Pennington <hp@pobox.com>
3177 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3178 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3181 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3182 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3183 now). Main point is because I wanted unpack_uint32 to implement
3185 (_dbus_verbose_bytes): new function
3187 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3189 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3190 mechanism to handle a corrupt message stream
3191 (_dbus_message_loader_new): fix preallocation to only prealloc,
3194 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3195 (_dbus_string_test): enhance tests for copy/move and fix the
3198 * dbus/dbus-transport-unix.c: Hold references in more places to
3199 avoid reentrancy problems
3201 * dbus/dbus-transport.c: ditto
3203 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3204 leak reference count in no-message case
3206 * test/watch.c (do_mainloop): handle adding/removing watches
3207 during iteration over the watches. Also, ref the connection/server
3208 stored on a watch, so we don't try to mangle a destroyed one.
3210 * dbus/dbus-transport-unix.c (do_authentication): perform
3213 * dbus/dbus-auth.c (get_state): add a state
3214 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3215 (_dbus_auth_get_unused_bytes): append the unused bytes
3216 to the passed in string, rather than prepend
3218 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3219 the auth conversation DBusAuth
3221 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3222 (_dbus_transport_new_for_domain_socket): when creating a
3223 transport, pass in whether it's a client-side or server-side
3224 transport so we know which DBusAuth to create
3226 2002-12-03 Havoc Pennington <hp@pobox.com>
3228 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3229 _after_ finalizing the derived members
3230 (unix_connection_set): unref watch if we fail to add it
3232 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3233 transport first, so that the connection owned by the
3234 transport will be valid as the transport finalizes.
3236 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3237 if necessary, and remove watches from the connection.
3239 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3241 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3243 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3244 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3245 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3246 (_dbus_marshal_test):
3247 * dbus/dbus-marshal.h:
3248 Add string marshal functions and have the demarshal functions
3249 return the new position.
3251 2002-12-25 Havoc Pennington <hp@pobox.com>
3253 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3254 it is a simple protocol that just maps directly to SASL.
3256 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3257 initial implementation, not actually used yet.
3259 * dbus/dbus-string.c (_dbus_string_find): new function
3260 (_dbus_string_equal): new function
3261 (_dbus_string_base64_encode): new function
3262 (_dbus_string_base64_decode): new function
3264 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3267 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3268 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3269 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3270 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3271 * dbus/dbus-marshal.h:
3272 * dbus/dbus-protocol.h:
3273 * dbus/dbus-test.c: (main):
3275 Add un-optimized marshalling/demarshalling routines.
3277 2002-12-25 Harri Porten <porten@kde.org>
3279 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3281 2002-12-24 Zack Rusin <zack@kde.org>
3283 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3284 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3287 2002-12-24 Havoc Pennington <hp@pobox.com>
3289 * glib/dbus-gthread.c: fix include
3291 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3292 I think glib API needs to change, though, as you don't
3293 want to use DBusMessageFunction, you want to use the
3294 DBusMessageHandler object. Probably
3295 dbus_connection_open_with_g_main_loop()
3296 and dbus_connection_setup_g_main_loop() or something like that
3297 (but think of better names...) that just create a connection
3298 that has watch/timeout functions etc. already set up.
3300 * dbus/dbus-connection.c
3301 (dbus_connection_send_message_with_reply): new function just to
3302 show how the message handler helps us deal with replies.
3304 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3306 * dbus/dbus-string.c (_dbus_string_test): free a string that
3309 * dbus/dbus-hash.c: use memory pools for the hash entries
3310 (rebuild_table): be more paranoid about overflow, and
3311 shrink table when we can
3312 (_dbus_hash_test): reduce number of sprintfs and write
3313 valid C89. Add tests for case where we grow and then
3314 shrink the hash table.
3316 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3318 * dbus/dbus-connection.c (dbus_connection_register_handler)
3319 (dbus_connection_unregister_handler): new functions
3321 * dbus/dbus-message.c (dbus_message_get_name): new
3323 * dbus/dbus-list.c: fix docs typo
3325 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3326 an object representing a handler for messages.
3328 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3331 * glib/dbus-gthread.c: (dbus_gthread_init):
3332 Don't use the gdbus prefix for public functions.
3334 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3338 Add GLib checks and fixup .pc files
3342 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3343 (gdbus_connection_check), (gdbus_connection_dispatch),
3344 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3345 (dbus_connection_gsource_new):
3346 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3347 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3348 * glib/test-dbus-glib.c: (message_handler), (main):
3351 2002-12-15 Harri Porten <porten@kde.org>
3353 * autogen.sh: check for libtoolize before attempting to use it
3355 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3358 * .cvsignore: ignore more stamp files
3360 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3362 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3363 without make install.
3365 2002-12-15 Havoc Pennington <hp@pobox.com>
3367 * dbus/dbus-threads.c: add thread stubs that a higher library
3368 layer can fill in. e.g. the GLib wrapper might fill them in with
3369 GThread stuff. We still need to use this thread API to
3370 thread-safe-ize the library.
3372 2002-12-12 Havoc Pennington <hp@pobox.com>
3374 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3375 below new interfaces and include fewer system headers.
3377 * dbus/dbus-sysdeps.c (_dbus_read): new function
3378 (_dbus_write): new function
3379 (_dbus_write_two): new function
3380 (_dbus_connect_unix_socket): new function
3381 (_dbus_listen_unix_socket): new function
3383 * dbus/dbus-message-internal.h: change interfaces to use
3386 2002-12-11 Havoc Pennington <hp@pobox.com>
3388 * dbus/dbus-types.h: add dbus_unichar
3390 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3392 * dbus/dbus-connection.c (dbus_connection_send_message): return
3395 * dbus/dbus-transport.c: include dbus-watch.h
3397 * dbus/dbus-connection.c: include dbus-message-internal.h
3399 * HACKING: add file with coding guidelines stuff.
3401 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3402 handling here, for security purposes (as in vsftpd). Not actually
3403 using this class yet.
3405 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3406 system/libc usage here, as in vsftpd, for ease of auditing (and
3407 should also simplify portability). Haven't actually moved all the
3408 system/libc usage into here yet.
3410 2002-11-25 Havoc Pennington <hp@pobox.com>
3412 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3413 always print the first verbose message.
3415 2002-11-24 Havoc Pennington <hp@pobox.com>
3417 * test/echo-client.c, test/echo-server.c: cheesy test
3420 * configure.in (AC_CHECK_FUNCS): check for writev
3422 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3425 * dbus/dbus-list.c (_dbus_list_foreach): new function
3427 * dbus/dbus-internals.c (_dbus_verbose): new function
3429 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3430 representing a server that listens for connections.
3432 * dbus/.cvsignore: create
3434 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3435 public API for reporting errors
3437 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3438 public object representing a connection that
3439 sends/receives messages. (Same object used for
3440 both client and server.)
3442 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3443 Basic abstraction for different kinds of stream
3444 that we might read/write messages from.
3446 2002-11-23 Havoc Pennington <hp@pobox.com>
3448 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3451 * dbus/dbus-test.c (main): add list test, and include
3452 dbus-test.h as intended
3454 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3455 (_dbus_hash_table_remove_int): return value indicates
3456 whether the entry existed to remove
3458 * dbus/dbus-list.c: add linked list utility class,
3461 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3464 2002-11-23 Havoc Pennington <hp@pobox.com>
3466 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3467 DBUS_END_DECLS to nothing, that should fix this once and for all
3469 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3471 * dbus/dbus-message.c, dbus/dbus-hash.c:
3472 add some missing @brief
3474 2002-11-23 Havoc Pennington <hp@pobox.com>
3476 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3477 to avoid confusing Doxygen
3479 * dbus/dbus-hash.c: @} not }@
3481 * dbus/dbus-message.c (struct DBusMessage): split out
3484 2002-11-23 Havoc Pennington <hp@pobox.com>
3486 * configure.in: pile on more warning flags if using gcc
3488 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3489 to document static functions
3491 * configure.in: add summary to end of configure so it
3492 looks nice and attractive
3494 * dbus/dbus-hash.c: finish implementation and write unit
3497 * configure.in: add --enable-tests to enable unit tests
3499 * dbus/dbus-test.c: test program to run unit tests
3500 for all files in dbus/*, initially runs a test for
3503 * dbus/dbus-internals.h: file to hold some internal utility stuff
3505 2002-11-22 Havoc Pennington <hp@redhat.com>
3507 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3508 "ported" away from Tcl
3510 * dbus/dbus-types.h: header for types such as dbus_bool_t
3512 2002-11-22 Havoc Pennington <hp@redhat.com>
3514 * dbus/dbus.h: fixups for doc warnings
3516 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3518 (QUIET): make it quiet so we can see warnings
3520 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3522 2002-11-22 Havoc Pennington <hp@redhat.com>
3524 * Makefile.am: include "Doxyfile" target in all-local
3526 * configure.in: generate the Doxyfile
3528 * Doxyfile.in: move Doxyfile here, so we can use
3529 configure to generate a Doxyfile with the right
3532 2002-11-22 Havoc Pennington <hp@redhat.com>
3534 * dbus/dbus-message.c: move inline docs into .c file
3536 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3537 so all docs are under doc/
3538 (MAN_EXTENSION): generate man pages. Use extension
3539 ".3dbus" which matches ".3qt" on my system,
3540 I guess this is OK, I don't know really.
3541 (FILE_PATTERNS): look for .c files not .h, makes sense
3544 2002-11-22 Havoc Pennington <hp@pobox.com>
3546 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3547 because any app can be a server, and any app can be a client,
3548 the bus is a special kind of server.
3550 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3552 * Doxyfile : adding. Still needs Makefile rules to be generated
3553 automatically (just run "doxygen" in the toplevel dir for now to
3556 * dbus/dbus-message.h : Adding sample docs (javadoc since
3557 resembles gtk-doc a little more)
3559 * dbus/dbus.h : Adding sample docs
3561 2002-11-21 Havoc Pennington <hp@redhat.com>
3563 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3564 so we can allow ourselves to include files directly,
3565 instead of having to use dbus.h
3567 * dbus/dbus.h: fill in
3569 * dbus/dbus-message.h: sketch out a sample header file.
3570 Include griping if you include it directly instead of
3573 * dbus/dbus-macros.h: new file with macros for extern "C",
3574 TRUE/FALSE, NULL, etc.
3576 * doc/file-boilerplate.c: put include guards in here
3578 2002-11-21 Havoc Pennington <hp@redhat.com>
3580 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3582 * COPYING: include the GPL as well, and license code
3583 under both AFL and GPL.
3585 2002-11-21 Havoc Pennington <hp@redhat.com>
3587 * acconfig.h: get rid of this
3589 * autogen.sh (run_configure): add --no-configure option
3591 * configure.in: remove AC_ARG_PROGRAM to make
3592 autoconf complain less. add AC_PREREQ.
3593 add AC_DEFINE third arg.
3595 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3598 Fix references so we can distcheck.
3600 2002-11-21 Havoc Pennington <hp@redhat.com>
3602 * Initial module creation