1 2003-04-06 Havoc Pennington <hp@pobox.com>
3 * bus/bus.c (bus_context_new): fix wrong handling of
4 server_data_slot_unref() in the error case.
6 * dbus/dbus-internals.h (_dbus_assert): change so it passes
7 "(condition) != 0" to _dbus_real_assert so that
8 "_dbus_assert (pointer)" doesn't cause a warning
10 * bus/main.c (main): accept --print-address option to print out
11 the message bus address
13 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
15 * dbus/dbus-transport.c (_dbus_transport_open): special error for
16 "tmpdir" option to unix: address on client side
18 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
21 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
22 we can use to create sockets in the test suite.
24 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
25 cleanly. To be used for testing.
27 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
29 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
31 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
32 handle trying to call this when there's no servers active
34 2003-04-05 Havoc Pennington <hp@pobox.com>
40 2003-04-05 Havoc Pennington <hp@pobox.com>
42 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
43 crash on startup. Need to get "try starting the daemon"
44 in the test suite I guess. ;-)
46 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
47 tracked the number of open connections; it's better done in
48 application-specific code as you want it to span all servers etc.
50 2003-04-05 Havoc Pennington <hp@pobox.com>
52 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
53 patch from Colin Walters
55 2003-04-05 Havoc Pennington <hp@pobox.com>
57 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
58 reality; in fact multiple mechanisms are allowed.
60 * dbus/dbus-internals.c (_dbus_real_assert)
61 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
62 _dbus_assert_not_reached() into functions, so that they don't show
63 up in basic block counts for test coverage, and don't use up as
64 much disk space. Does mean slower execution speed though, so
65 assumes --disable-asserts is the normal production case.
67 2003-04-05 Havoc Pennington <hp@pobox.com>
69 * test/Makefile.am (dist-hook): also dist *.in files
75 2003-04-05 Havoc Pennington <hp@pobox.com>
77 * dbus/dbus-string.c: docs warning
79 * dbus/dbus-spawn.c: missing docs
81 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
83 2003-04-05 Havoc Pennington <hp@pobox.com>
85 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
88 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
89 to -1 once we've reaped the babysitter
90 (_dbus_babysitter_handle_watch): do as much work as we can, not
93 * bus/activation.c: add code using DBusBabysitter so that we
94 handle it when a service fails to start up properly.
95 (bus_activation_service_created): don't remove the activation
96 entries as we go, just let them get removed when we free the pending
97 activation. Unref reply messages after sending them.
99 2003-04-05 Havoc Pennington <hp@pobox.com>
101 * test/decode-gcov.c (main): print per-directory stats in the report
103 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
105 2003-04-05 Havoc Pennington <hp@pobox.com>
107 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
109 * test/decode-gcov.c: hack up a little program to suck data
110 out of gcov files. Yes this is sort of silly.
112 * configure.in: define something in config.h and do an
113 AM_CONDITIONAL when gcov is enabled
115 2003-04-04 Havoc Pennington <hp@redhat.com>
117 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
118 return a "babysitter" object that is used to monitor the status of
119 the spawned process and reap it when required.
121 * test/test-segfault.c, test/test-exit.c,
122 test/test-sleep-forever.c: binaries that do various lame things,
123 used in the test suite.
125 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
127 2003-04-03 Havoc Pennington <hp@pobox.com>
129 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
130 in preparation for modifying it, dbus-sysdeps is getting
133 2003-04-03 Havoc Pennington <hp@redhat.com>
135 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
138 * bus/*.[hc]: adapt to mainloop change
140 2003-04-03 Havoc Pennington <hp@redhat.com>
142 * bus/activation.c (load_directory): fix up memleaks
143 (bus_activation_entry_free): free the entry
145 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
146 we get one from the message bus; fix memleaks.
148 * dbus/dbus-message.c (dbus_set_error_from_message): new function
150 2003-04-03 Havoc Pennington <hp@pobox.com>
152 * bus/config-parser.c (bus_config_parser_unref): free
153 list of mechanisms, bug discovered by test suite enhancements
154 (putting system.conf and session.conf into suite)
156 * test/Makefile.am, test/test-service.c: add placeholder for a
157 test service that we'll activate as part of test suite. Doesn't
160 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
161 setting NULL value, and use system malloc not dbus_malloc()
162 when we have unavoidable memleakage.
164 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
165 didn't work, and support DBUS_BUS_ACTIVATION.
167 * bus/activation.c (child_setup): pass our well-known bus type to
170 * bus/config-parser.c: support <type> to specify well-known type
172 * doc/dbus-specification.sgml: document the env variables to
173 locate well-known buses and find service activator
175 2003-04-02 Havoc Pennington <hp@redhat.com>
177 * test/Makefile.am (all-local): add a rule to copy tests to
178 builddir, so we can have generated tests. Use this to remove the
179 silly hack for testing system.conf and session.conf. Will use this
180 shortly to generate .service files pointing to test binaries.
182 2003-04-02 Havoc Pennington <hp@redhat.com>
184 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
185 current alloc and needed new length, not max of the doubled
186 allocation and needed new length. Also, when building tests,
187 don't do the double-allocation stuff, just realloc every time.
189 2003-04-02 Havoc Pennington <hp@redhat.com>
191 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
193 (_dbus_string_get_dirname): new
194 (_dbus_sysdeps_test): new
195 (_dbus_directory_open): include dirnames in error messages
197 * bus/config-parser.c: interpret <include> and <includedir> and
198 <servicedir> relative to config file location if the given
199 filename is not absolute.
201 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
203 2003-04-02 Havoc Pennington <hp@redhat.com>
205 * bus/connection.c (bus_transaction_send_error_reply): set sender
206 service for the error, and unref the reply on success
208 * bus/activation.c: convert to use BusTransaction so OOM can be
210 (bus_activation_service_created): set sender of the message
212 2003-04-01 Havoc Pennington <hp@redhat.com>
214 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
215 <includedir> (at least mostly)
217 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
218 first, then the user ID
220 2003-04-01 Havoc Pennington <hp@pobox.com>
222 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
225 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
227 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
229 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
230 socket 0777, and unlink any existing socket.
232 * bus/bus.c (bus_context_new): change our UID/GID and fork if
233 the configuration file so specifies; set up auth mechanism
236 * bus/config-parser.c (bus_config_parser_content): add support
237 for <fork> option and fill in code for <auth>
239 * bus/system.conf.in: add <fork/> to default configuration,
240 and limit auth mechanisms to EXTERNAL
242 * doc/config-file.txt (Elements): add <fork>
244 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
245 (_dbus_change_identity): new function
247 2003-03-31 Havoc Pennington <hp@redhat.com>
249 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
250 (_dbus_listen_unix_socket): fix off-by-one error in null
251 termination spotted by Nalin
253 2003-03-31 Havoc Pennington <hp@redhat.com>
255 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
256 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
257 having a real home directory available.
259 2003-03-31 Havoc Pennington <hp@redhat.com>
261 * bus/Makefile.am (install-data-hook): create /var/run/dbus
263 * bus/messagebus.in: add init script for Red Hat /etc/init.d
265 * configure.in: add support for specifying a style of init script
268 2003-03-31 Havoc Pennington <hp@redhat.com>
270 Fix some annoying DBusString API and fix all affected code.
272 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
274 (_dbus_string_get_data): change to return string instead of using
276 (_dbus_string_get_const_data): ditto
277 (_dbus_string_get_data_len): ditto
278 (_dbus_string_get_const_data_len): ditto
280 2003-03-31 Havoc Pennington <hp@redhat.com>
282 * bus/main.c (main): fix up the command line arguments to be nicer
284 2003-03-31 Havoc Pennington <hp@redhat.com>
286 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
287 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
288 final location that lands in the config file
290 * bus/config-loader-expat.c (bus_config_load): fix type of
293 * doc/TODO: remove TODO item for dbus_bus_get()
295 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
297 2003-03-31 Havoc Pennington <hp@pobox.com>
299 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
300 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
301 argument since they are always client side
303 * dbus/dbus-server.c (dbus_server_get_address): new function
305 * bus/main.c (main): take the configuration file as an argument.
307 * test/data/valid-config-files/debug-allow-all.conf: new file to
308 use with dispatch.c tests for example
310 * bus/test-main.c (main): require test data dir
312 * bus/bus.c (bus_context_new): change this to take a
313 configuration file name as argument
315 * doc/config-file.txt (Elements): add <servicedir>
317 * bus/system.conf, bus/session.conf: new files
319 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
320 well-known socket if none set
322 * configure.in: create system.conf and session.conf
324 2003-03-30 Havoc Pennington <hp@pobox.com>
326 * bus/config-parser.c: hacking
328 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
329 to shut down, since it could cause weirdness with the DBusList
332 * dbus/dbus-list.c (_dbus_list_test): add tests for the
333 link-oriented stack routines
334 (alloc_link): free the mempool if the first alloc from it fails
336 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
338 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
340 (_dbus_string_skip_white): new
342 * doc/config-file.txt (Elements): add <includedir>
344 2003-03-28 Havoc Pennington <hp@pobox.com>
346 * dbus/dbus-string.c (_dbus_string_copy_data_len)
347 (_dbus_string_copy_data): new functions
349 2003-03-28 Anders Carlsson <andersca@codefactory.se>
351 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
355 * dbus/dbus-memory.c:
358 2003-03-28 Havoc Pennington <hp@pobox.com>
360 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
361 I think it may have just been superstition. Not sure.
363 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
364 failures that were not being handled.
366 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
368 * dbus/dbus-memory.c: add ability to set number of mallocs in a
369 row that will fail on out-of-memory.
371 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
372 function for testing out-of-memory handling.
374 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
375 allocation functions, they do map exactly to the expat ones.
377 2003-03-27 Havoc Pennington <hp@redhat.com>
379 * bus/config-loader-libxml.c (bus_config_load): add another error
382 2003-03-26 Anders Carlsson <andersca@codefactory.se>
385 Add note about automatic service activation.
387 * doc/dbus-specification.sgml:
388 Rename the specification and clarify a few things.
390 2003-03-26 Anders Carlsson <andersca@codefactory.se>
393 * dbus/dbus-address.c:
395 * dbus/dbus-marshal.c:
396 * dbus/dbus-server-debug-pipe.c:
397 * dbus/dbus-transport-unix.c:
398 Fix documentation warnings.
400 2003-03-26 Havoc Pennington <hp@pobox.com>
402 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
403 after every test so it's quick and easy to see which leaked, and
404 so we test multiple dbus_shutdown() calls
406 * configure.in: change configure.in XML stuff to also support
409 * config-loader-libxml.c: some hacking
411 * config-loader-expat.c: some hacking
413 * config-parser.c: some hacking, plus tests
415 2003-03-25 Havoc Pennington <hp@redhat.com>
417 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
419 * configure.in: add --with-xml option to specify XML library,
420 right now only libxml is supported.
422 * bus/config-loader-libxml.c, config-parser.c: sync some minor
423 nonworking code between home and work, still just stubs
425 2003-03-24 Havoc Pennington <hp@redhat.com>
427 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
430 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
431 NULL argument for "message" if the error is a well-known one,
432 fill in a generic message in this case.
434 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
437 * bus/test.c (bus_test_flush_bus): add
439 * bus/policy.c (bus_policy_test): test code stub
441 2003-03-24 Havoc Pennington <hp@pobox.com>
443 * bus/connection.c (bus_connections_setup_connection): set up
444 the "can this user connect" function, but it always returns
445 TRUE until we have a config file parser so we can have a config
446 file that allows connections.
448 2003-03-23 Havoc Pennington <hp@pobox.com>
450 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
451 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
452 the mutex, so we can check for proper memory management
455 * dbus/dbus-dataslot.c: remove the mutex from
456 DBusDataSlotAllocator and lock it manually when using it,
457 to simplify fitting it into the global slots framework.
459 * dbus/dbus-threads.c (init_static_locks): rework how we're
460 handling global locks so they are easily shut down.
462 * bus/policy.c (bus_policy_append_rule): fix
464 * bus/test-main.c (main): check for memleaks
466 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
467 test suite check for memleaks
469 * dbus/dbus-memory.c: add support in test mode for tracking
470 number of outstanding blocks
472 2003-03-23 Havoc Pennington <hp@pobox.com>
474 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
477 * dbus/dbus-hash.h: add ULONG hash keys
479 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
480 (_dbus_get_group_id): new function
482 2003-03-20 Havoc Pennington <hp@redhat.com>
484 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
486 (dbus_connection_get_unix_user): new function
488 2003-03-20 Havoc Pennington <hp@pobox.com>
490 * bus/connection.c (bus_connection_send_oom_error): assert that
492 (connection_execute_transaction): ditto
493 (bus_connection_preallocate_oom_error): fix to set the sender, and
494 set recipient to the destination service, not the bus driver
496 * bus/policy.c: hacking
498 * dbus/dbus-message.c (dbus_message_service_is): new function
499 (dbus_message_sender_is): new
501 2003-03-19 Havoc Pennington <hp@redhat.com>
503 * bus/policy.c: start sketching code for policy restrictions on
504 what connections can do.
506 2003-03-18 Havoc Pennington <hp@redhat.com>
508 * doc/TODO: some notes on high-level todo items. Little nitpick
509 stuff is all in @todo, so no need to add it here.
511 * doc/config-file.txt: some notes on how config file might look
513 2003-03-18 Anders Carlsson <andersca@codefactory.se>
519 2003-03-17 Havoc Pennington <hp@redhat.com>
521 * dbus/dbus-internals.h: add gcc attributes so that
522 our printf-style functions warn on bad arguments to
525 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
528 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
531 2003-03-17 Havoc Pennington <hp@redhat.com>
533 * bus/test-main.c (main): make it print something as it runs
534 so make check doesn't look stuck
536 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
537 from CVS, now obsolete
539 2003-03-17 Anders Carlsson <andersca@codefactory.se>
541 * bus/dispatch.c: (bus_dispatch):
542 Refetch the service name since it may have been reallocated
543 when dbus_message_set_sender was called.
545 * dbus/dbus-sysdeps.c: (_dbus_accept):
546 Add address and address length variables and use them to stop
547 valgrind from complaining.
549 2003-03-17 Havoc Pennington <hp@pobox.com>
551 All tests pass, no memleaks, no valgrind complaints.
553 * bus/test.c: refcount handler_slot
555 * bus/connection.c (bus_connections_new): refcount
558 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
559 bytes so that auth scripts pass.
561 * bus/dispatch.c: init message_handler_slot so it gets allocated
564 * bus/dispatch.c (message_handler_slot_ref): fix memleak
566 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
567 dealloc server_pipe_hash when no longer used for benefit of
570 * dbus/dbus-auth.c (process_command): memleak fix
572 * bus/dispatch.c (check_hello_message): memleak fix
574 2003-03-16 Havoc Pennington <hp@pobox.com>
576 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
578 2003-03-17 Anders Carlsson <andersca@codefactory.se>
580 * bus/activation.c (bus_activation_activate_service): Append
581 the pending activation entry to the list of pending activations.
583 2003-03-16 Havoc Pennington <hp@pobox.com>
585 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
588 * dbus/dbus-address.c (create_entry): fix OOM handling when
589 failing to alloc entry->method
591 2003-03-16 Havoc Pennington <hp@pobox.com>
593 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
596 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
597 add some missing dbus_set_result
599 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
600 alloc the DBusMessageHandler
602 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
603 the transport here, since we call this from the finalizer; it
604 resulted in a double-finalize.
606 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
607 where we tried to use transport->connection that was NULL,
608 happened when transport was disconnected early on due to OOM
610 * bus/*.c: adapt to handle OOM for watches/timeouts
612 * dbus/dbus-transport-unix.c: port to handle OOM during
615 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
616 reference to unused bytes instead of a copy
618 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
621 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
624 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
627 2003-03-16 Anders Carlsson <andersca@codefactory.se>
629 * doc/dbus-specification.sgml:
630 Document reply message for ActivateService.
632 2003-03-16 Anders Carlsson <andersca@codefactory.se>
634 * bus/activation.c: (bus_pending_activation_entry_free),
635 (bus_pending_activation_free), (bus_activation_new),
636 (bus_activation_unref), (bus_activation_service_created),
637 (bus_activation_activate_service):
639 * bus/bus.c: (bus_context_new):
640 * bus/desktop-file.c: (new_section):
641 * bus/driver.c: (bus_driver_send_service_deleted),
642 (bus_driver_handle_activate_service):
643 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
645 * dbus/dbus-connection.c:
646 (dbus_connection_send_with_reply_and_block):
647 * dbus/dbus-message.c: (dbus_message_append_args_valist):
648 * dbus/dbus-protocol.h:
649 Make activation work better. Now pending activations will be queued
650 and the daemon won't try to activate services that are already registered.
652 2003-03-16 Havoc Pennington <hp@pobox.com>
654 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
657 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
658 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
660 2003-03-16 Havoc Pennington <hp@pobox.com>
662 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
663 this. always run the test suite before commit...
665 * bus/*: adapt to DBusConnection API changes
667 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
668 requires renaming stuff to avoid dbus_connection_dispatch name
671 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
674 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
675 separate from _dbus_message_loader_return_buffer()
677 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
678 this, because it's now always broken to use; the number of
679 messages in queue vs. the number still buffered by the message
680 loader is undefined/meaningless. Should use
681 dbus_connection_get_dispatch_state().
682 (dbus_connection_dispatch): rename from
683 dbus_connection_dispatch_message
685 2003-03-16 Havoc Pennington <hp@pobox.com>
687 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
690 2003-03-16 Anders Carlsson <andersca@codefactory.se>
692 * dbus/dbus-connection.c:
693 (dbus_connection_send_with_reply_and_block):
694 Decrease connection->n_incoming when removing an entry
696 * dbus/dbus-dict.c: (dbus_dict_entry_free),
697 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
698 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
699 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
700 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
701 (dbus_dict_get_byte_array):
702 Handle NULL arrays and strings. Also add support for byte arrays.
704 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
705 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
706 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
707 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
708 (_dbus_demarshal_dict), (demarshal_and_validate_len),
709 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
710 * dbus/dbus-marshal.h:
711 Add support for marshalling and demarshalling empty arrays and strings.
713 * dbus/dbus-message.c: (dbus_message_append_args_valist),
714 (dbus_message_append_string_array),
715 (dbus_message_iter_get_boolean),
716 (dbus_message_iter_get_boolean_array),
717 (dbus_message_iter_get_int32_array),
718 (dbus_message_iter_get_uint32_array),
719 (dbus_message_iter_get_double_array),
720 (dbus_message_iter_get_byte_array),
721 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
722 (check_message_handling):
723 Add support for getting empty arrays and dicts.
725 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
726 Don't do any validation at all for now, that's better than just checking
729 * test/data/valid-messages/emptiness.message:
730 New test message with lots of empty arrays.
732 2003-03-16 Havoc Pennington <hp@pobox.com>
734 * dbus/dbus-connection.c
735 (_dbus_connection_queue_received_message_link): new function that
736 can't fail due to OOM
738 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
739 new function pops a message together with a list link
742 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
743 message queuing functions to avoid needing to alloc memory
745 2003-03-16 Havoc Pennington <hp@pobox.com>
747 Oops - test code was only testing failure of around 30 of the
748 mallocs in the test path, but it turns out there are 500+
749 mallocs. I believe this was due to misguided linking setup such
750 that there was one copy of dbus_malloc etc. in the daemon and one
751 in the shared lib, and only daemon mallocs were tested. In any
752 case, the test case now tests all 500+ mallocs, and doesn't pass
753 yet, though there are lots of fixes in this patch.
755 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
756 this so that it doesn't need to allocate memory, since it
757 has no way of indicating failure due to OOM (and would be
760 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
762 * bus/Makefile.am: rearrange to create two self-contained
763 libraries, to avoid having libraries with overlapping symbols.
764 that was resulting in weirdness, e.g. I'm pretty sure there
765 were two copies of global static variables.
767 * dbus/dbus-internals.c: move the malloc debug stuff to
770 * dbus/dbus-list.c (free_link): free list mempool if it becomes
773 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
775 * dbus/dbus-address.c (dbus_parse_address): free list nodes
778 * bus/dispatch.c (bus_dispatch_add_connection): free
779 message_handler_slot when no longer using it, so
780 memory leak checkers are happy for the test suite.
782 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
784 * bus/bus.c (new_connection_callback): disconnect in here if
785 bus_connections_setup_connection fails.
787 * bus/connection.c (bus_connections_unref): fix to free the
789 (bus_connections_setup_connection): if this fails, don't
790 disconnect the connection, just be sure there are no side
793 * dbus/dbus-string.c (undo_alignment): unbreak this
795 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
797 (_dbus_auth_new): fix the order in which we free strings
800 * bus/connection.c (bus_connection_disconnected): fix to
801 not send ServiceDeleted multiple times in case of memory
804 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
805 get the base service name
806 (dbus_bus_register_client): don't return base service name,
807 instead store it on the DBusConnection and have an accessor
809 (dbus_bus_register_client): rename dbus_bus_register()
811 * bus/dispatch.c (check_hello_message): verify that other
812 connections on the bus also got the correct results, not
813 just the one sending hello
815 2003-03-15 Havoc Pennington <hp@pobox.com>
817 Make it pass the Hello handling test including all OOM codepaths.
818 Now to do other messages...
820 * bus/services.c (bus_service_remove_owner): fix crash when
821 removing owner from an empty list of owners
822 (bus_registry_ensure): don't leave service in the list of
823 a connection's owned services if we fail to put the service
826 * bus/connection.c (bus_connection_preallocate_oom_error): set
827 error flag on the OOM error.
829 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
830 handle _dbus_transport_set_connection failure
832 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
833 to create watches up front and simply enable/disable them as
835 (unix_connection_set): this can now fail on OOM
837 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
838 of enabling/disabling a watch or timeout.
840 * bus/loop.c (bus_loop_iterate): don't touch disabled
843 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
845 2003-03-15 Havoc Pennington <hp@pobox.com>
847 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
848 write useful test code, after all that futzing around ;-)
850 Test does not yet pass because we can't handle OOM in
851 _dbus_transport_messages_pending (basically,
852 dbus_connection_preallocate_send() does not prealloc the write
853 watch). To fix this, I think we need to add new stuff to
854 set_watch_functions, namely a SetEnabled function so we can alloc
855 the watch earlier, then enable it later.
857 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
858 dbus-memory.c to the convenience lib
860 * bus/test.c: rename some static functions to keep them clearly
861 distinct from stuff in connection.c. Handle client disconnection.
863 2003-03-14 Havoc Pennington <hp@pobox.com>
865 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
866 transport, tests more of the real codepath. Set up clients
867 with bus_setup_debug_client.
869 * bus/test.c (bus_setup_debug_client): function to set up debug
870 "clients" on the main loop
872 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
875 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
878 * dbus/dbus-server-debug.c: support a debug server based on pipes
880 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
881 (_dbus_close): new function
883 * configure.in: check for socketpair
885 2003-03-14 Havoc Pennington <hp@redhat.com>
887 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
890 * dbus/dbus-transport-debug.c: rework this a good bit to be
891 less complicated. hopefully still works.
893 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
896 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
899 * dbus/dbus-message.c (dbus_message_copy): rename from
900 dbus_message_new_from_message, fix it up to copy
901 all the message fields, add test case
903 * bus/dispatch.c (bus_dispatch_test): add some more test code,
904 not quite passing yet
906 2003-03-14 Havoc Pennington <hp@pobox.com>
908 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
909 until no work remains" in test code. (the large diff here
910 is just code movement, no actual changes)
912 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
913 1, no point waiting around for test code.
914 (_dbus_server_debug_accept_transport): unref the timeout
915 after adding it (right?)
917 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
919 2003-03-13 Havoc Pennington <hp@redhat.com>
921 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
924 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
927 * dbus/dbus-connection.h: Make AddWatchFunction and
928 AddTimeoutFunction return a bool so they can fail on out-of-memory
930 * bus/bus.c (bus_context_new): set up timeout handlers
932 * bus/connection.c (bus_connections_setup_connection): set up
935 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
938 * bus/bus.c (bus_context_new): adapt to changes
940 * bus/connection.c: adapt to changes
942 * test/watch.c: adapt to DBusWatch changes
944 * bus/dispatch.c (bus_dispatch_test): started adding this but
947 2003-03-14 Anders Carlsson <andersca@codefactory.se>
949 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
951 2003-03-13 Havoc Pennington <hp@pobox.com>
953 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
954 set up a test framework as for the library
956 2003-03-12 Havoc Pennington <hp@pobox.com>
958 Throughout: purge global variables, introduce BusActivation,
959 BusConnections, BusRegistry, etc. objects instead.
961 * bus/bus.h, bus/bus.c: introduce BusContext as a global
964 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
965 going to redo this a bit differently I think
967 2003-03-12 Havoc Pennington <hp@redhat.com>
969 Mega-patch that gets the message bus daemon initially handling
970 out-of-memory. Work still needed. Also lots of random
971 moving stuff to DBusError instead of ResultCode.
973 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
975 * dbus/dbus-connection.c
976 (dbus_connection_send_with_reply_and_block): use DBusError
978 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
981 * dbus/dbus-connection.c (dbus_connection_send): drop the result
982 code here, as the only failure possible is OOM.
984 * bus/connection.c (bus_connection_disconnect):
985 rename bus_connection_disconnected as it's a notification only
987 * bus/driver.c (bus_driver_handle_acquire_service): don't free
988 "name" on get_args failure, should be done by get_args;
989 don't disconnect client for bad args, just return an error.
990 (bus_driver_handle_service_exists): ditto
992 * bus/services.c (bus_services_list): NULL-terminate returned array
994 * bus/driver.c (bus_driver_send_service_lost)
995 (bus_driver_send_service_acquired): send messages from driver to a
996 specific client to the client's unique name, not to the broadcast
999 * dbus/dbus-message.c (decode_header_data): reject messages that
1000 contain no name field
1001 (_dbus_message_get_client_serial): rename to
1002 dbus_message_get_serial and make public
1003 (_dbus_message_set_serial): rename from set_client_serial
1004 (_dbus_message_set_reply_serial): make public
1005 (_dbus_message_get_reply_serial): make public
1007 * bus/connection.c (bus_connection_foreach): allow stopping
1008 iteration by returning FALSE from foreach function.
1010 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1011 (dbus_connection_free_preallocated_send)
1012 (dbus_connection_preallocate_send): new API for sending a message
1013 without possibility of malloc failure.
1014 (dbus_connection_send_message): rename to just
1015 dbus_connection_send (and same for whole function family)
1017 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1019 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1021 * bus/activation.c: handle/return errors
1023 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1025 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1026 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1027 (_dbus_result_from_errno): move to this file
1029 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1031 * dbus/dbus-marshal.c:
1032 (_dbus_marshal_set_string):
1033 Take a length argument so we can marshal the correct string
1036 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1037 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1038 (_dbus_marshal_test):
1039 * dbus/dbus-marshal.h:
1040 Add support for marshalling and demarshalling dicts.
1042 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1043 Add support for TYPE DICT.
1045 * dbus/dbus-message.c: (set_string_field):
1046 Adjust header padding.
1048 (dbus_message_append_args_valist), (dbus_message_append_dict),
1049 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1050 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1051 (check_message_handling), (check_have_valid_message):
1052 * dbus/dbus-message.h:
1053 Add functions for setting and getting dicts.
1055 * dbus/dbus-protocol.h:
1061 * doc/dbus-specification.sgml:
1062 Add information about how dicts are marshalled.
1064 * test/data/invalid-messages/dict-with-nil-value.message:
1065 * test/data/invalid-messages/too-short-dict.message:
1066 * test/data/valid-messages/dict-simple.message:
1067 * test/data/valid-messages/dict.message:
1068 Add sample messages containing dicts.
1070 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1072 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1074 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1077 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1078 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1079 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1080 (dbus_dict_set_double), (dbus_dict_set_string),
1081 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1082 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1083 (dbus_dict_set_string_array), (_dbus_dict_test):
1085 Fix according to comments from Havoc.
1087 2003-03-06 Michael Meeks <michael@server.home>
1089 * configure.in: if we don't have kde-config, disable have_qt.
1091 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1096 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1097 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1098 (dbus_dict_remove), (dbus_dict_get_value_type),
1099 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1100 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1101 (dbus_dict_put_double), (dbus_dict_put_string),
1102 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1103 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1104 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1105 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1106 (dbus_dict_get_double), (dbus_dict_get_string),
1107 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1108 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1109 (dbus_dict_get_string_array), (_dbus_dict_test):
1111 Add DBusDict implementation
1113 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1117 2003-03-04 Havoc Pennington <hp@pobox.com>
1119 * test/data/auth/*: adapt to changes
1121 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1122 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1125 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1126 more stuff from being in a context name, to make the protocol
1127 simpler to deal with
1129 * dbus/dbus-errors.c (dbus_error_has_name): new function
1130 (dbus_error_is_set): new function
1132 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1133 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1135 * dbus/dbus-connection.c (dbus_connection_flush): also read
1136 messages during a flush operation
1138 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1140 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1142 * configure.in: Check for gethostbyname on Solaris.
1144 * dbus/dbus-transport.c: (_dbus_transport_open):
1145 Remove duplicate "tcp" entry.
1147 * doc/dbus-specification.sgml:
1148 Clarify some things.
1150 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1152 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1153 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1154 (_dbus_keyring_test):
1155 * dbus/dbus-md5.c: (_dbus_md5_compute):
1156 * dbus/dbus-sha.c: (_dbus_sha_compute):
1159 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1161 * README: Add some things.
1163 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1165 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1166 after case DBUS_TYPE_BOOELAN.
1168 2003-03-02 Havoc Pennington <hp@pobox.com>
1170 * test/break-loader.c (randomly_set_extreme_ints): add test that
1171 sets really huge and small integers
1173 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1174 that length of boolean array fits in the string, and that
1175 string has room for boolean value in single-bool case.
1177 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1178 optional value to "ALIGN" command which is what to fill the
1181 * test/data/valid-messages/no-padding.message: add regression
1182 test for the message padding problem
1184 2003-03-02 Havoc Pennington <hp@pobox.com>
1186 * dbus/dbus-message.c (decode_header_data): fix to always init
1187 message_padding, from Benjamin Dauvergne
1189 2003-03-02 Havoc Pennington <hp@pobox.com>
1195 2003-03-01 Joe Shaw <joe@assbarn.com>
1197 * configure.in: Check for "struct cmsgcred" and try to access its
1198 members for BSD-like unices.
1200 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1201 _dbus_read_credentials_unix_socket().
1202 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1203 read() for reading the credential byte off the unix socket. Use
1204 struct cmsgcred on systems that support it.
1206 2003-02-27 Alexander Larsson <alexl@redhat.com>
1210 Make gthreads-2.0 dependency optional. Don't build thread test if
1213 2003-02-27 Havoc Pennington <hp@pobox.com>
1215 * dbus/dbus-connection.c
1216 (dbus_connection_send_message_with_reply_and_block): fix doh!
1217 doh! doh! bug that resulted in never removing a reply from the
1218 queue, no wonder we called get_reply_serial so much ;-)
1220 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1221 and client serial instead of demarshaling them every time
1223 2003-02-27 Havoc Pennington <hp@pobox.com>
1225 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1226 more inlined, using dbus-string-private.h, speeds things up
1229 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1230 when freeing the string
1231 (_dbus_string_steal_data): fix for align offset
1232 (undo_alignment): new function
1234 2003-02-26 Havoc Pennington <hp@redhat.com>
1236 All kinds of audit fixes from Owen, plus initial attempt to
1237 handle unaligned memory returned from malloc.
1239 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1240 leave room for align_offset and nul byte
1241 (fixup_alignment): function to track an align_offset and
1242 ensure real->str is aligned
1243 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1244 to allow a nul byte plus align offset
1245 (_dbus_string_lock): fix overflow issue
1246 (_dbus_string_init_const_len): add assertions on sanity of len,
1247 assign allocated to be ALLOCATION_PADDING larger than len
1248 (set_length): fixup the overflow handling
1249 (_dbus_string_get_data_len): fix overflow in assertion
1250 (open_gap): detect overflow in size of gap to be opened
1251 (_dbus_string_lengthen): add overflow check
1252 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1253 (_dbus_string_append): add overflow check
1254 (_dbus_string_append_unichar): overflow
1255 (_dbus_string_delete): fix overflow in assertion
1256 (_dbus_string_copy_len): overflow in assertion
1257 (_dbus_string_replace_len): overflows in assertions
1258 (_dbus_string_find): change to implement in terms of
1259 _dbus_string_find_to
1260 (_dbus_string_find_to): assorted fixage
1261 (_dbus_string_equal_c_str): assert c_str != NULL,
1262 fix logic so the function works
1263 (_dbus_string_ends_with_c_str): fix overflow thingy
1264 (_dbus_string_base64_encode): overflow fix
1265 (_dbus_string_validate_ascii): overflow
1266 (_dbus_string_validate_nul): overflow
1268 2003-02-26 Havoc Pennington <hp@redhat.com>
1270 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1272 2003-02-26 Alexander Larsson <alexl@redhat.com>
1275 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1277 * dbus/dbus-connection.c:
1278 * dbus/dbus-connection.h:
1279 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1280 Add dbus_connection_set_wakeup_main_function and use it when queueing
1281 incoming and outgoing messages.
1284 * dbus/dbus-dataslot.c:
1285 Threadsafe usage of DBusDataSlotAllocator
1287 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1290 * dbus/dbus-server-unix.c:
1293 * glib/dbus-gmain.c:
1294 Implement the new wakeup functions for glib.
1297 * glib/test-thread-client.c:
1298 * glib/test-thread-server.c:
1299 * glib/test-thread.h:
1300 Initial cut at some thread test code. Not really done yet.
1302 2003-02-26 Havoc Pennington <hp@pobox.com>
1304 * dbus/dbus-connection.c
1305 (dbus_connection_send_message_with_reply_and_block): fix crash
1306 where we ref'd the outgoing message instead of the returned reply
1308 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1309 at the end of this function, so if we didn't need to read for
1310 authentication, we reinstall it for receiving messages
1312 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1313 a NULL sender for peer-to-peer case
1315 * dbus/dbus-transport-unix.c (check_read_watch): handle
1316 !authenticated case correctly
1318 * glib/dbus-gmain.c: add support for DBusServer
1320 * dbus/dbus-server.c: add data slot support
1322 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1323 return values and handle errors
1325 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1328 * Doxyfile.in (INPUT): add glib subdir
1330 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1331 setup_with_g_main instead of hookup_with_g_main; write docs
1333 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1335 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1336 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1337 * dbus/dbus-message.c: (dbus_message_append_boolean),
1338 (dbus_message_append_boolean_array),
1339 (dbus_message_get_args_valist), (_dbus_message_test):
1340 * dbus/dbus-message.h:
1341 * doc/dbus-specification.sgml:
1342 Various fixes as pointed out by Havoc.
1344 * test/data/invalid-messages/bad-boolean-array.message:
1345 * test/data/invalid-messages/bad-boolean.message:
1346 Add invalid boolean value test cases.
1348 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1350 * dbus/dbus-internals.c: (_dbus_type_to_string):
1351 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1352 (_dbus_marshal_validate_arg):
1353 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1354 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1355 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1356 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1357 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1358 (dbus_message_iter_get_double),
1359 (dbus_message_iter_get_boolean_array), (message_iter_test):
1360 * dbus/dbus-message.h:
1361 * dbus/dbus-protocol.h:
1362 * doc/dbus-specification.sgml:
1363 * test/data/valid-messages/lots-of-arguments.message:
1364 Add support for boolean and boolean array types.
1366 2003-02-23 Havoc Pennington <hp@pobox.com>
1368 * dbus/dbus-keyring.c: finish most of this implementation and
1371 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1372 these barf if the error isn't cleared to NULL
1374 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1375 (_dbus_create_directory): new function
1377 * dbus/dbus-errors.c (dbus_set_error): fix warning
1379 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1380 (_dbus_string_hex_decode): new function
1381 (test_hex_roundtrip): test code
1383 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1385 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1387 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1388 the save-to-temp/rename trick to atomically write the new file
1389 (_dbus_string_parse_uint): new function
1391 2003-02-22 Havoc Pennington <hp@pobox.com>
1393 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1395 2003-02-22 Havoc Pennington <hp@pobox.com>
1397 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1398 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1400 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1402 * dbus/test/data/sha-1: add US government test suite for SHA-1
1404 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1406 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1407 Make string arrays NULL-terminated.
1409 * dbus/dbus-memory.c: (dbus_free_string_array):
1410 * dbus/dbus-memory.h:
1411 New function for freeing NULL-terminated string arrays.
1413 * dbus/dbus-message-builder.c: (append_quoted_string),
1414 (_dbus_message_data_load):
1415 Add support for array types.
1417 * dbus/dbus-message.c: (check_message_handling):
1418 Add more types as test cases.
1420 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1421 (_dbus_string_parse_double):
1422 Add the start offset to the end offset.
1424 * test/data/valid-messages/lots-of-arguments.message:
1425 New test message with lots of arguments.
1427 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1429 * dbus/dbus-message.c: (dbus_message_append_nil),
1430 (dbus_message_append_int32), (dbus_message_append_uint32),
1431 (dbus_message_append_double), (dbus_message_append_string),
1432 (dbus_message_append_int32_array),
1433 (dbus_message_append_uint32_array),
1434 (dbus_message_append_double_array),
1435 (dbus_message_append_byte_array),
1436 (dbus_message_append_string_array):
1437 Fix all out-of-memory handling in these functions.
1439 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1441 * dbus/dbus-message.c: (dbus_message_append_nil):
1444 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1446 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1447 (dbus_message_append_nil), (dbus_message_append_int32_array),
1448 (dbus_message_append_uint32_array),
1449 (dbus_message_append_double_array),
1450 (dbus_message_append_byte_array),
1451 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1452 (dbus_message_iter_get_int32_array),
1453 (dbus_message_iter_get_uint32_array),
1454 (dbus_message_iter_get_double_array),
1455 (dbus_message_iter_get_byte_array),
1456 (dbus_message_iter_get_string_array):
1458 * dbus/dbus-message.h:
1459 Add functions for appending and getting arrays.
1461 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1463 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1464 element size at least 8 bytes, fixes mempool tests on
1467 2003-02-20 Alexander Larsson <alexl@redhat.com>
1469 * dbus/dbus-transport-unix.c (unix_do_iteration):
1470 Unlock the connection mutex during a blocking select call.
1471 Add todo about how we need a way to wake up the select.
1473 * dbus/dbus-connection-internal.h:
1474 * dbus/dbus-connection.c:
1475 Add _dbus_connection_lock and _dbus_connection_unlock.
1477 2003-02-19 Havoc Pennington <hp@pobox.com>
1479 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1480 Doxyfile.in, not Doxyfile
1482 * dbus/dbus-keyring.c: do some hacking on this
1484 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1486 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1488 (dbus_set_error): remove dbus_error_init, check for message ==
1489 NULL *before* we sprintf into it, and add @todo about including
1490 system headers in this file
1492 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1494 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1496 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1497 get various bits of user information based on either username
1499 (_dbus_homedir_from_username): new function
1501 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1504 Add check for nonposix getpwnam_r
1506 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1507 Align the pool element size to a sizeof (void *) boundary.
1509 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1510 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1511 General Solaris fixes.
1513 * test/data/valid-messages/simplest-manual.message:
1514 Explicitly state that we want little-endian packing.
1516 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1518 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1520 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1521 Added to create a transport connecting using a tcp/ip socket.
1523 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1524 to a tcp socket at given host and port.
1525 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1528 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1530 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1531 Added to create a server listening on a TCP/IP socket.
1533 2003-02-19 Havoc Pennington <hp@pobox.com>
1535 Throughout: mop up all the Doxygen warnings and undocumented
1538 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1539 to search any paths.
1541 * dbus/dbus-threads.c: move global mutex initializers to
1542 dbus-internals.h, multiple prototypes was confusing doxygen
1543 besides being kind of ugly
1545 * Doxyfile (PREDEFINED): have Doxygen define
1546 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1547 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1548 (do not abuse the feature! it's for stuff like the autogenerated
1549 macros in dbus-md5.c, not just for things you don't feel like
1552 2003-02-18 Havoc Pennington <hp@pobox.com>
1554 * dbus/dbus-string.c (_dbus_string_zero): new function
1556 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1557 wrap it in some dbus-friendly API
1559 * dbus/dbus-types.h: add 16-bit types
1561 2003-02-18 Joe Shaw <joe@assbarn.com>
1563 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1564 credentials from our currently running process.
1565 (get_word): Fix a buglet where we were copying the entire length
1566 instead of relative to our position.
1568 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1569 keys on the stack... it's 640k of data.
1571 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1572 read the credentials byte off the socket, even if we don't have
1574 (_dbus_poll): Implement poll() using select() for systems which
1577 * glib/test-dbus-glib.c (main): Print out an error if no
1578 parameters are given.
1580 * test/data/auth/fallback.auth-script: Added. Tests that a client
1581 can fallback to a secondary auth mechanism if the first fails.
1583 2003-02-18 Havoc Pennington <hp@pobox.com>
1587 2003-02-17 Havoc Pennington <hp@pobox.com>
1589 * doc/dbus-specification.sgml: lots of cosmetic
1590 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1591 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1592 s/server/bus/ (except in authentication section). Add a section
1593 "Message Bus Message Routing"
1595 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1601 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1603 * doc/dbus-specification.sgml:
1604 Specification updates.
1606 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1608 * bus/activation.c: (bus_activation_init), (child_setup),
1609 (bus_activation_activate_service):
1611 * bus/main.c: (main):
1612 Set DBUS_ADDRESS environment variable.
1614 * dbus/dbus-errors.c: (dbus_set_error):
1615 Don't use va_copy since that's a C99 feature.
1617 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1618 (_dbus_spawn_async):
1619 * dbus/dbus-sysdeps.h:
1620 Add child_setup_func to _dbus_spawn_async.
1622 * doc/dbus-specification.sgml:
1623 Update specification.
1625 * test/spawn-test.c: (setup_func), (main):
1628 2003-02-17 Alexander Larsson <alexl@redhat.com>
1630 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1633 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1637 * doc/dbus-test-plan.sgml:
1638 Add test plan document.
1643 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1645 * dbus/dbus-message.c: (decode_header_data),
1646 (_dbus_message_loader_return_buffer):
1647 Set the header padding amount when loading a message.
1649 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1651 * bus/dispatch.c: (send_one_message):
1652 Only send broadcast messages to registered connections.
1654 * dbus/dbus-message.c: (dbus_message_name_is):
1655 * dbus/dbus-message.h:
1656 New convenience function.
1658 * dbus/dbus-transport-debug.c: (do_reading):
1659 Only dispatch one message per run.
1662 * test/bus-test.c: (new_connection_callback), (die),
1663 (test_hello_client1_handler), (test_hello_client2_handler),
1664 (test_hello_replies), (main):
1666 * test/bus-test-loop.[ch]:
1669 2003-02-16 Havoc Pennington <hp@pobox.com>
1671 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1672 backward conditional
1674 2003-02-16 Alexander Larsson <alexl@redhat.com>
1676 * dbus/dbus-connection.c:
1677 Implement sent_message_with_reply. (with_reply_and block is still
1679 Made dispatch_message not lose message if OOM.
1681 * dbus/dbus-errors.h:
1682 Add NoReply error (for reply timeouts).
1684 2003-02-16 Alexander Larsson <alexl@redhat.com>
1686 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1687 Actually free keys and values when destroying hashtable.
1689 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1691 * dbus/dbus-auth.c: (client_try_next_mechanism):
1694 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1695 Return TRUE if there's no thread implementation around.
1697 * glib/dbus-gmain.c: (free_source),
1698 (dbus_connection_hookup_with_g_main):
1699 Make sure to remove the GSource when the connection is finalized.
1701 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1703 * bus/dispatch.c: (bus_dispatch_message_handler):
1704 * dbus/dbus-errors.h:
1705 Return an error if someone tries to send a message to a service
1708 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1710 * bus/activation.c: (load_directory), (bus_activation_init),
1711 (bus_activation_activate_service):
1714 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1715 More work on the activation handling.
1717 * dbus/dbus-errors.h:
1718 Add some error messages
1720 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1721 * dbus/dbus-message.h:
1722 New function that creates an error message.
1724 * dbus/dbus-protocol.h:
1725 Add ACTIVATE_SERVER message.
1727 * dbus/dbus-server-unix.c: (unix_handle_watch),
1728 (_dbus_server_new_for_domain_socket):
1729 Call _dbus_fd_set_close_on_exec.
1731 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1732 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1733 (_dbus_fd_set_close_on_exec):
1734 * dbus/dbus-sysdeps.h:
1735 Add _dbus_fd_set_close_on exec function. Also add function that checks
1736 that all open fds are set to close-on-exec and warns otherwise.
1738 * dbus/dbus-transport-unix.c:
1739 (_dbus_transport_new_for_domain_socket):
1740 Call _dbus_fd_set_close_on_exec.
1742 2003-02-16 Havoc Pennington <hp@pobox.com>
1744 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1745 allow people to avoid setting SIGPIPE to SIG_IGN
1746 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1747 we've been asked not to
1749 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1751 * dbus/dbus-list.c: (_dbus_list_append_link),
1752 (_dbus_list_prepend_link):
1753 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1757 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1760 * bus/activation.c: (bus_activation_entry_free),
1761 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1763 * bus/main.c: (main):
1764 Add simple activation support, doesn't work yet though.
1766 2003-02-15 Zack Rusin <zack@kde.org>
1768 * qt/dbus-qthread.cpp: small casting fix
1770 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1772 * dbus/dbus-errors.c: (dbus_set_error):
1773 * dbus/dbus-errors.h:
1774 Add a few errors and make dbus_set_error void.
1776 * dbus/dbus-sysdeps.c:
1777 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1778 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1779 * dbus/dbus-sysdeps.h:
1780 Add _dbus_spawn_async.
1782 * test/spawn-test.c: (main):
1783 Test for _dbus_spawn_async.
1785 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1787 * dbus/dbus-internals.h:
1788 Fix build without tests.
1790 * dbus/dbus-list.c: (alloc_link):
1791 Fix a segfault when a malloc fails.
1793 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1794 (dbus_malloc0), (dbus_realloc):
1795 Add support for malloc debugging.
1797 2003-02-15 Alexander Larsson <alexl@redhat.com>
1799 * dbus/dbus-threads.c:
1800 * dbus/dbus-threads.h:
1801 Add condvars. Remove static mutext from API.
1802 Implement static mutexes by initializing them from threads_init.
1804 * glib/dbus-gthread.c:
1805 * qt/dbus-qthread.cpp:
1806 Update with the thread api changes.
1811 Turn StaticMutex into normal mutex + init function.
1812 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1813 _dbus_list_append_link, _dbus_list_prepend_link
1816 * dbus/dbus-sysdeps.c:
1817 * dbus/dbus-sysdeps.h:
1818 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1819 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1821 * dbus/dbus-protocol.h:
1822 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1824 * dbus/dbus-message.c:
1825 Make ref/unref atomic.
1828 * dbus/dbus-connection-internal.h:
1829 * dbus/dbus-connection.c:
1830 * dbus/dbus-connection.h:
1832 Change _peek to _borrow,_return & _steal_borrowed.
1833 Change disconnect callback to event.
1834 Make dbus_connection_dispatch_messages reentrant.
1836 * dbus/dbus-transport.c:
1837 Don't ref the connection on calls to the transport
1840 * dbus/dbus-message-handler.c:
1843 * glib/dbus-gmain.c:
1844 Don't use peek_message anymore
1847 * test/debug-thread.c:
1848 * test/debug-thread.h:
1849 Simple thread implementation that asserts() on deadlocks in
1850 single-threaded code.
1853 (main) Call debug_threads_init.
1856 Use disconnect message instead of disconnect callback.
1860 Don't call dbus_connection_set_disconnect_function. Instead export
1861 bus_connection_disconnect.
1864 Call bus_connection_disconnect when we get a disconnected message.
1866 2003-02-15 Havoc Pennington <hp@pobox.com>
1868 * dbus/dbus-message.c (dbus_message_new): fool around with the
1871 2003-02-14 Havoc Pennington <hp@pobox.com>
1873 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1875 * dbus/dbus-memory.c: fail if the debug functions indicate we
1878 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1879 (_dbus_decrement_fail_alloc_counter): debug functions to
1880 simulate memory allocation failures
1882 2003-02-14 Havoc Pennington <hp@pobox.com>
1884 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1887 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1889 * bus/driver.c: (bus_driver_handle_hello):
1891 * bus/services.c: (bus_service_lookup):
1892 Reorder message sending so we get a more sane order.
1894 * test/bus-test.c: (message_handler):
1897 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1899 * bus/driver.c: (bus_driver_send_service_deleted),
1900 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1901 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1902 (bus_driver_send_welcome_message),
1903 (bus_driver_handle_list_services),
1904 (bus_driver_handle_acquire_service),
1905 (bus_driver_handle_service_exists):
1906 * dbus/dbus-bus.c: (dbus_bus_register_client),
1907 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1908 * dbus/dbus-errors.c: (dbus_result_to_string):
1909 * dbus/dbus-errors.h:
1910 * dbus/dbus-message.c: (dbus_message_append_args),
1911 (dbus_message_append_args_valist), (dbus_message_get_args),
1912 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1913 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1914 (dbus_message_iter_get_byte_array),
1915 (dbus_message_iter_get_string_array), (message_iter_test),
1916 (check_message_handling), (_dbus_message_test):
1917 * dbus/dbus-message.h:
1918 * test/bus-test.c: (main):
1919 Change fields to arguments in messages, so that they won't be
1920 confused with header fields.
1922 * glib/test-dbus-glib.c: (main):
1923 Remove append_fields from hello message.
1925 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1927 * dbus/dbus-errors.c:
1928 * dbus/dbus-message.c:
1929 * dbus/dbus-string.c:
1930 Documentation fixes.
1932 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1934 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1936 Implement support for timeouts in dbus-glib.
1938 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1940 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1941 * dbus/dbus-message.c: (process_test_subdir):
1942 * test/break-loader.c: (find_breaks_based_on):
1943 Plug some memory leaks.
1945 2003-02-13 Richard Hult <rhult@codefactory.se>
1947 * bus/main.c: Fix build.
1949 * dbus/dbus-errors.h:
1950 * dbus/dbus-errors.c: Fix copyright for Anders.
1952 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1957 * bus/connection.c: (bus_connection_foreach):
1960 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1961 (unescape_string), (new_section), (parse_section_start),
1962 (parse_key_value), (report_error), (bus_desktop_file_load),
1963 (bus_desktop_file_get_string):
1964 * bus/desktop-file.h:
1965 Use DBusError for error reporting.
1967 * bus/dispatch.c: (send_one_message),
1968 (bus_dispatch_message_handler):
1969 * bus/driver.c: (bus_driver_send_service_deleted),
1970 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1971 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1972 (bus_driver_send_welcome_message),
1973 (bus_driver_handle_list_services),
1974 (bus_driver_handle_acquire_service),
1975 (bus_driver_handle_service_exists):
1976 * bus/loop.c: (bus_loop_run):
1978 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1980 * bus/utils.c: (bus_wait_for_memory):
1982 New files with general utility functions.
1984 * dbus/dbus-internals.h:
1985 Remove _DBUS_HANDLE_OOM.
1987 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1989 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1990 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1991 * dbus/dbus-errors.h:
1992 Add DBusError structure.
1994 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1996 * test/data/valid-messages/standard-acquire-service.message:
1997 * test/data/valid-messages/standard-hello.message:
1998 * test/data/valid-messages/standard-list-services.message:
1999 * test/data/valid-messages/standard-service-exists.message:
2000 Add some standard messages.
2002 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2004 * bus/driver.c: (bus_driver_send_welcome_message),
2005 (bus_driver_handle_list_services),
2006 (bus_driver_handle_acquire_service),
2007 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2008 Update for API changes in libdbus.
2010 * dbus/dbus-message.c: (dbus_message_new_reply):
2011 * dbus/dbus-message.h:
2012 Remove the name argument. The spec states that replies shouldn't
2015 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2017 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2018 (report_error), (bus_desktop_file_load), (lookup_section),
2019 (lookup_line), (bus_desktop_file_get_raw),
2020 (bus_desktop_file_get_string):
2021 * bus/desktop-file.h:
2022 Some fixes, and new functions for getting a key value from a section.
2024 2003-02-13 Havoc Pennington <hp@pobox.com>
2026 * test/data/auth/fail-after-n-attempts.auth-script: new test
2028 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2031 2003-02-13 Havoc Pennington <hp@pobox.com>
2033 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2034 dbus_credentials_match were backward
2036 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2037 NO_CREDENTIALS and ROOT_CREDENTIALS
2039 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2040 into here. Never process more commands after we've reached an
2041 end state; store further data as unused bytes.
2043 * test/data/auth/*: add more auth tests
2045 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2046 command to match exact string and EXPECT_UNUSED to match unused
2049 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2051 2003-02-12 Havoc Pennington <hp@pobox.com>
2053 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2054 \r off of popped lines
2056 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2059 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2062 2003-02-12 Havoc Pennington <hp@pobox.com>
2064 * dbus/Makefile.am: remove break-loader from the build, since it
2067 * configure.in: add --enable-gcov to turn on coverage profiling
2068 flags and disable optimization
2070 2003-02-10 Havoc Pennington <hp@pobox.com>
2072 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2073 initial cut at test framework for DBusAuth from laptop.
2074 Doesn't quite work yet but it compiles and I need to get
2075 it off the 266mhz laptop. ;-)
2077 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2078 fix a memleak in error case
2080 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2083 * bus/desktop-file.c:
2084 * bus/desktop-file.h:
2085 Add a desktop file parser.
2087 2003-02-11 Zack Rusin <zack@kde.org>
2089 * qt/message.[h|cpp]: sample implementation
2090 of the KDE wrapper for DBusMessage
2092 2003-02-09 Zack Rusin <zack@kde.org>
2094 * test/bus-test.c: make_it_compile
2095 * doc/dbus-specification.sgml: minimal semantic fix
2097 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2103 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2106 * dbus/dbus-break-loader.c:
2108 * test/break-loader.c:
2109 Move dbus-break-loader to test/ and rename it to break-loader.
2111 2003-02-02 Havoc Pennington <hp@pobox.com>
2113 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2114 for code to manage cookies in your home directory
2116 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2118 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2119 to authenticate, then disconnect the client.
2121 2003-02-03 Alexander Larsson <alexl@redhat.com>
2123 * dbus/dbus-message.c (dbus_message_append_fields):
2126 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2128 * doc/dbus-specification.sgml:
2129 Update address format section.
2131 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2134 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2135 (message_handler), (new_connection_callback), (loop_quit),
2139 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2141 * bus/driver.c: (bus_driver_handle_service_exists):
2142 Simplify the code a bit.
2144 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2147 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2150 Add libdbus-daemon.la and link to it.
2152 2003-02-01 James Willcox <jwillcox@gnome.org>
2154 * bus/driver.c: (bus_driver_handle_own_service):
2155 Actually include the service reply code in the message.
2157 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2159 * bus/driver.c: (bus_driver_handle_service_exists):
2160 Don't unref the incoming message.
2162 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2164 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2166 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2168 * dbus/dbus-server.c: (dbus_server_listen):
2169 * dbus/dbus-transport.c: (_dbus_transport_open):
2170 ifdef out the calls to the debug transport and server.
2172 2003-02-02 Alexander Larsson <alexl@redhat.com>
2174 * dbus/dbus-watch.c (dbus_watch_get_flags):
2175 Add note in the docs that ERROR or HANGUP won't be returned
2176 and are assumed always on.
2178 * glib/dbus-gmain.c (add_watch):
2179 Always add IO_ERR | IO_HUP
2181 * dbus/dbus-message.h:
2182 Add semicolon after dbus_message_iter_get_string_array().
2183 Makes qt code build again
2185 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2187 * bus/driver.c: (create_unique_client_name),
2188 (bus_driver_handle_hello):
2189 Don't take a name, just use a numeric id to identify
2193 * dbus/dbus-bus.c: (dbus_bus_register_client),
2194 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2196 Add new convenience functions for communicating with the bus.
2198 * dbus/dbus-message.h:
2200 * dbus/dbus-protocol.h:
2203 2003-02-01 Alexander Larsson <alexl@redhat.com>
2205 * dbus/dbus-message.c (dbus_message_append_fields):
2206 Add some more doc comments.
2208 2003-02-01 Havoc Pennington <hp@pobox.com>
2210 * dbus/dbus-break-loader.c (randomly_modify_length): change
2211 a 4-byte value in the message as if it were a length
2213 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2214 execute bit on saved files
2216 2003-02-01 Havoc Pennington <hp@pobox.com>
2218 * dbus/dbus-break-loader.c (main): new program to find messages
2219 that break the loader.
2221 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2222 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2224 * dbus/dbus-string.c (_dbus_string_set_byte): new
2226 2003-01-31 Havoc Pennington <hp@pobox.com>
2228 * dbus/dbus-message.c: refactor the test code to be more general,
2229 in preparation for writing a "randomly permute test cases to
2230 try to break the loader" program.
2232 2003-01-31 Havoc Pennington <hp@pobox.com>
2234 * doc/dbus-specification.sgml: work on the specification
2236 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2237 the protocol version of the message.
2239 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2240 no longer specifies that.
2241 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2244 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2245 "break" for DBUS_TYPE_NIL, remove @todo
2247 2003-01-31 Havoc Pennington <hp@pobox.com>
2249 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2250 just set_is_error/get_is_error as this is a commonly-used
2251 function, and write docs.
2253 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2255 * dbus/dbus-address.c: (dbus_address_entry_free):
2256 Free key and value lists.
2258 * dbus/dbus-internals.c: (_dbus_type_to_string):
2259 Add the types we didn't have.
2261 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2262 (_dbus_marshal_validate_arg):
2265 * dbus/dbus-message.c: (dbus_message_set_sender):
2266 Remove todo about being able to set sender to NULL.
2268 (dbus_message_set_is_error_reply),
2269 (dbus_message_get_is_error_reply):
2270 * dbus/dbus-message.h:
2273 * dbus/dbus-protocol.h:
2274 Add error reply flag.
2276 * test/data/valid-messages/opposite-endian.message:
2277 Add NIL type to test.
2279 2003-01-31 Havoc Pennington <hp@pobox.com>
2281 * doc/dbus-specification.sgml: fully specify the header. Add
2282 flags and major protocol version, and change header/body len to
2285 * dbus/dbus-message-builder.c (append_saved_length): append length
2288 * dbus/dbus-message.c (dbus_message_create_header): change header
2289 length and body length to unsigned. Add the new fields from the
2291 (_dbus_message_loader_return_buffer): unsigned header/body len
2293 2003-01-30 Havoc Pennington <hp@pobox.com>
2295 * dbus/dbus-auth.c: rework to use only REJECTED, no
2298 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2299 use REJECTED, suggested by Mark McLoughlin
2301 2003-01-30 Havoc Pennington <hp@pobox.com>
2303 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2304 a better way to report errors here. e.g. "unix address lacks
2305 path" or something. also "no such file" when the path doesn't
2308 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2310 (dbus_parse_address): add @todo about documenting address format,
2311 and allowing , and ; to be escaped
2313 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2316 Add dbus-address.[ch]
2318 * dbus/dbus-address.c: (dbus_address_entry_free),
2319 (dbus_address_entries_free), (create_entry),
2320 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2321 (dbus_parse_address), (_dbus_address_test):
2322 * dbus/dbus-address.h:
2323 New files for dealing with address parsing.
2325 * dbus/dbus-connection.c:
2326 Document timeout functions.
2328 * dbus/dbus-message.c:
2329 Document dbus_message_new_from_message.
2331 * dbus/dbus-server-debug.c:
2334 * dbus/dbus-server.c: (dbus_server_listen):
2335 Parse address and use correct server implementation.
2337 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2338 * dbus/dbus-string.h:
2339 New function with test.
2341 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2345 * dbus/dbus-transport-debug.c:
2348 * dbus/dbus-transport.c: (_dbus_transport_open):
2349 Parse address and use correct transport implementation.
2351 2003-01-30 Havoc Pennington <hp@pobox.com>
2353 * dbus/dbus-message.c: use message->byte_order instead of
2354 DBUS_COMPILER_BYTE_ORDER throughout.
2355 (dbus_message_create_header): pad header to align the
2356 start of the body of the message to 8-byte boundary
2358 * dbus/dbus-marshal.h: make all the demarshalers take const
2359 DBusString arguments.
2361 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2362 validate message args here, so we don't have to do slow validation
2363 later, and so we catch bad messages as they are incoming. Also add
2364 better checks on header_len and body_len. Also fill in
2367 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2368 implemented properly)
2369 (_dbus_string_validate_nul): new function to check all-nul
2371 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2372 get_arg_end_pos and remove all validation
2373 (_dbus_marshal_validate_arg): actually do validation here.
2375 2003-01-29 Havoc Pennington <hp@pobox.com>
2377 * dbus/dbus-message.c (check_message_handling): fix assertion
2378 failure on set_client_serial
2380 2003-01-28 Havoc Pennington <hp@pobox.com>
2382 * dbus/dbus-server-debug.c: Add doc section comments
2384 * dbus/dbus-transport-debug.c: add doc section comments
2386 2003-01-28 Havoc Pennington <hp@redhat.com>
2388 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2389 the reverse order from how I had it
2390 (_dbus_string_base64_encode): reverse encoding order. I was
2391 basically byteswapping everything during encoding.
2393 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2395 * dbus/dbus-connection-internal.h:
2396 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2397 (_dbus_connection_remove_timeout):
2398 Add functions for adding and removing timeouts.
2400 * dbus/dbus-message.c: (dbus_message_new_from_message):
2401 Add new function that takes a message and creates an exact
2402 copy of it, but with the refcount set to 1.
2403 (check_message_handling):
2406 * dbus/dbus-server-protected.h:
2407 * dbus/dbus-server.c: (_dbus_server_init_base),
2408 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2409 (dbus_server_set_timeout_functions):
2410 (_dbus_server_remove_timeout):
2411 New functions so that a server can add and remove timeouts.
2413 (dbus_server_listen):
2414 Add commented out call to dbus_server_debug_new.
2416 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2417 Actually set the handler, doh.
2419 * dbus/dbus-transport.c: (_dbus_transport_open):
2420 Add commented out call to dbus_transport_debug_client_new.
2423 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2425 2003-01-28 Havoc Pennington <hp@pobox.com>
2427 * dbus/dbus-message.c (check_message_handling): function to check
2428 on the loaded message, iterates over it etc.
2430 2003-01-28 Havoc Pennington <hp@pobox.com>
2432 * test/Makefile.am (dist-hook): fix make distdir
2434 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2436 2003-01-27 Havoc Pennington <hp@pobox.com>
2438 * dbus/dbus-mempool.c (time_for_size): replace printf with
2441 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2442 empty lines; fix the SAVE_LENGTH stuff to be
2443 START_LENGTH/END_LENGTH so it actually works; couple other
2446 * test/Makefile.am (dist-hook): add dist-hook for .message files
2448 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2449 can be constant or locked.
2450 (_dbus_string_free): allow freeing a const string as
2453 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2455 * dbus/dbus-test-main.c (main): take an argument which is the
2456 directory containing test data
2458 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2459 argument to this and load all the messages in test/data/
2460 checking that they can be loaded or not loaded as appropriate.
2462 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2464 * bus/dispatch.c: (bus_dispatch_message_handler):
2465 Dispatch messages sent to services.
2467 * bus/driver.c: (bus_driver_send_service_deleted),
2468 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2469 (bus_driver_send_service_acquired):
2470 Add helper functions for sending service related messages.
2472 (bus_driver_send_welcome_message):
2473 Send HELLO_REPLY instead of WELCOME.
2475 (bus_driver_handle_list_services):
2476 Send LIST_SERVICES_REPLY instead of SERVICES.
2478 (bus_driver_handle_own_service),
2479 (bus_driver_handle_service_exists):
2480 New message handlers.
2482 (bus_driver_handle_message):
2483 Invoke new message handlers.
2485 (bus_driver_remove_connection):
2486 Don't remove any services here since that's done automatically
2487 by bus_service_remove_owner now.
2490 New function signatures.
2492 * bus/services.c: (bus_service_add_owner):
2493 Send ServiceAcquired message if we're the only primary owner.
2495 (bus_service_remove_owner):
2496 Send ServiceAcquired/ServiceLost messages.
2498 (bus_service_set_prohibit_replacement),
2499 (bus_service_get_prohibit_replacement):
2500 Functions for setting prohibit replacement.
2502 (bus_service_has_owner):
2503 New function that checks if a connection is in the owner queue of
2507 Add new function signatures.
2509 * dbus/dbus-list.c: (_dbus_list_test):
2510 Add tests for _dbus_list_remove_last and traversing the list backwards.
2513 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2514 go any further, so return NULL then.
2516 * dbus/dbus-protocol.h:
2517 Add new messages, service flags and service replies.
2519 2003-01-26 Havoc Pennington <hp@pobox.com>
2521 * dbus/dbus-message-builder.c: implement, completely untested.
2523 * test/data/*: add data to be used in testing.
2524 ".message" files are our simple loadable text format.
2525 ".message-raw" will be binary dumps of messages.
2527 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2529 2003-01-26 Havoc Pennington <hp@pobox.com>
2531 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2533 * dbus/dbus-errors.c (dbus_result_to_string): add
2536 * dbus/dbus-message-builder.c: new file, will contain code to load
2537 up messages from files. Not implemented yet.
2539 2003-01-26 Havoc Pennington <hp@pobox.com>
2541 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2542 the sender by setting to NULL
2544 2003-01-26 Havoc Pennington <hp@pobox.com>
2546 The unit tests pass, but otherwise untested. If it breaks, the
2547 tests should have been better. ;-)
2549 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2552 * dbus/dbus-message.c: redo everything so we maintain
2553 message->header as the only copy of the various fields.
2554 This avoids the possibility of out-of-memory in some cases,
2555 for example dbus_message_lock() can't run out of memory anymore,
2556 and avoids extra copying. Figured I may as well go ahead and do
2557 this since it was busted for dbus_message_lock to not return
2558 failure on OOM, and dbus_message_write_header was totally
2559 unchecked for OOM. Also fixed some random other bugs.
2561 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2562 that strings are nul-terminated. Also, end_pos can be equal
2563 to string length just not greater than, I think.
2564 (_dbus_marshal_set_int32): new function
2565 (_dbus_marshal_set_uint32): new function
2566 (_dbus_marshal_set_string): new function
2568 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2569 a warning, init timeout_list to NULL
2570 (dbus_connection_send_message): don't use uninitialized variable
2573 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2575 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2577 * bus/driver.c: (bus_driver_handle_hello),
2578 (bus_driver_send_welcome_message):
2581 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2583 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2584 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2585 (dbus_connection_unref):
2586 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2587 * dbus/dbus-message.c: (dbus_message_unref),
2590 (dbus_message_get_fields):
2591 Remove debugging printout.
2593 (_dbus_message_loader_return_buffer):
2594 Don't store the header string.
2596 (_dbus_message_test):
2599 2003-01-26 Richard Hult <rhult@codefactory.se>
2601 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2602 the file descriptor list, since it can change under us.
2604 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2606 * glib/dbus-gmain.c: (dbus_connection_prepare),
2607 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2608 (remove_watch), (dbus_connection_hookup_with_g_main):
2609 Rewrite the glib handling to use its own GSource instead of a
2610 GIOChannel so we can catch messages put in the queue while waiting
2613 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2616 * bus/connection.c: (connection_disconnect_handler),
2617 (connection_watch_callback), (bus_connection_setup):
2618 * bus/dispatch.c: (send_one_message),
2619 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2620 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2622 * bus/driver.c: (bus_driver_send_service_deleted),
2623 (bus_driver_send_service_created), (bus_driver_handle_hello),
2624 (bus_driver_send_welcome_message),
2625 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2626 (bus_driver_handle_message):
2628 Refactor code, put the message dispatching in its own file. Use
2629 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2632 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2634 * dbus/dbus-internals.h:
2635 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2637 * dbus/dbus-message.c: (dbus_message_get_sender):
2638 * dbus/dbus-message.h:
2639 Implement dbus_message_get_sender.
2641 * dbus/dbus-protocol.h:
2642 Add message and service defines.
2644 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2646 * dbus/dbus-connection.c: (dbus_connection_send_message):
2647 * dbus/dbus-message-internal.h:
2648 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2649 (dbus_message_write_header):
2650 Remove _dbus_messag_unlock and don't set the client serial on a
2651 message if one already exists.
2653 2003-01-24 Havoc Pennington <hp@pobox.com>
2655 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2658 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2661 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2663 * dbus/dbus-list.c: (alloc_link), (free_link):
2664 Use a memory pool for the links.
2666 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2668 * bus/connection.c: (bus_connection_foreach):
2670 Add new bus_connection_foreach function.
2672 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2673 Add function that broadcasts a message to all clients.
2675 (bus_driver_send_service_created), (bus_driver_handle_hello),
2676 (bus_driver_send_welcome_message),
2677 (bus_driver_handle_list_services), (bus_driver_message_handler):
2678 Implement functions that take care of listing services, and notifying
2679 clients when new services are created.
2681 * bus/services.c: (bus_services_list):
2683 Add new function that returns an array of strings with the currently
2684 registered services.
2687 * glib/dbus-gmain.c:
2688 Update copyright year.
2690 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2692 * dbus/dbus-connection.c: (dbus_connection_send_message):
2693 Unlock the message in case it was sent earlier.
2695 (dbus_connection_send_message_with_reply_and_block):
2696 Remove the reply message from the list.
2698 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2699 Set array_len and new_pos correctly.
2701 (_dbus_marshal_test):
2702 Remove debug output.
2704 * dbus/dbus-message-internal.h:
2705 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2706 New function that returns the reply serial.
2708 (_dbus_message_unlock):
2709 New function that unlocks a message and resets its header.
2711 (dbus_message_append_string_array),
2712 (dbus_message_get_fields_valist),
2713 (dbus_message_iter_get_field_type),
2714 (dbus_message_iter_get_string_array),
2715 (dbus_message_get_fields),
2716 (dbus_message_append_fields_valist):
2717 Handle string arrays.
2719 (dbus_message_set_sender):
2720 Make this function public since the bus daemon needs it.
2722 (decode_header_data):
2723 Set the reply serial to -1 initially.
2725 * dbus/dbus-message.h:
2726 Add dbus_message_set_sender.
2728 2003-01-24 Havoc Pennington <hp@pobox.com>
2730 * doc/dbus-specification.sgml: add some stuff
2732 2003-01-22 Havoc Pennington <hp@pobox.com>
2734 * doc/dbus-specification.sgml: Start to document the protocol.
2736 2003-01-22 Havoc Pennington <hp@pobox.com>
2738 * dbus/dbus-connection.c
2739 (dbus_connection_send_message_with_reply_and_block): add some @todo
2741 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2743 2003-01-21 Havoc Pennington <hp@pobox.com>
2745 (patch untested because can't compile)
2747 * bus/driver.c (create_unique_client_name): make this function
2748 never recycle client names. Also, caller should initialize
2751 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2753 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2755 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2756 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2757 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2758 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2759 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2760 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2761 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2762 * dbus/dbus-marshal.h:
2763 * dbus/dbus-protocol.h:
2764 Add support for marshalling and demarshalling integer, double
2767 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2772 * bus/connection.c: (connection_disconnect_handler):
2773 Remove the connection from the bus driver's list.
2775 (connection_watch_callback): Dispatch messages.
2777 (free_connection_data): Free connection name.
2779 (bus_connection_setup): Add connection to the bus driver's list.
2780 (bus_connection_remove_owned_service):
2781 (bus_connection_set_name), (bus_connection_get_name):
2782 Add functions for setting and getting the connection's name.
2785 Add function headers.
2787 * bus/driver.c: (create_unique_client_name),
2788 (bus_driver_handle_hello_message),
2789 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2790 (bus_driver_add_connection), (bus_driver_remove_connection):
2793 * bus/services.c: (bus_service_free):
2795 New file that handles communication and registreation with the bus
2798 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2800 * dbus/dbus-connection.c: (dbus_connection_send_message):
2801 Add a new client_serial parameter.
2803 (dbus_connection_send_message_with_reply):
2804 Remove a @todo since we've implemented the blocking function.
2806 (dbus_connection_send_message_with_reply_and_block):
2807 New function that sends a message and waits for a reply and
2808 then returns the reply.
2810 * dbus/dbus-connection.h:
2813 * dbus/dbus-errors.c: (dbus_result_to_string):
2814 * dbus/dbus-errors.h:
2815 Add new DBUS_RESULT.
2817 * dbus/dbus-message-internal.h:
2818 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2819 (_dbus_message_set_sender), (dbus_message_write_header),
2820 (dbus_message_new_reply), (decode_header_data),
2821 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2822 * dbus/dbus-message.h:
2823 Add new functions that set the reply serial and sender.
2824 Also marshal and demarshal them correctly and add test.
2826 * dbus/dbus-protocol.h:
2827 Add new DBUS_MESSAGE_TYPE_SENDER.
2830 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2831 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2832 (dbus_connection_hookup_with_g_main):
2833 * glib/test-dbus-glib.c: (main):
2834 Rewrite to use GIOChannel and remove the GSource crack.
2836 * test/echo-client.c: (main):
2837 * test/watch.c: (check_messages):
2838 Update for changed APIs
2840 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2842 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2844 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2845 Create a DBusTimeoutList.
2846 (dbus_connection_set_timeout_functions): Add new function to
2847 set timeout callbacks
2849 * dbus/dbus-connection.h: Add public DBusTimeout API.
2851 * dbus/dbus-message.c: (dbus_message_get_service):
2852 * dbus/dbus-message.h: New function.
2854 * dbus/dbus-server.c: Fix small doc typo.
2856 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2858 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2860 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2861 of the string, just as long as specified.
2863 2003-01-19 Havoc Pennington <hp@pobox.com>
2865 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2868 * dbus/dbus-server.c (dbus_server_set_max_connections)
2869 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2870 keep track of current number of connections, and add API for
2871 setting a max (but haven't implemented enforcing the max yet)
2873 2003-01-18 Havoc Pennington <hp@pobox.com>
2875 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2876 reading/writing if read_watch != NULL or write_watch != NULL.
2878 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2879 the message loader code to actually load message->header and
2880 message->body into the newly-created message.
2882 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2885 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2886 (dbus_connection_get_max_message_size)
2887 (dbus_connection_set_max_live_messages_size)
2888 (dbus_connection_get_max_live_messages_size): implement some
2889 resource limitation functions
2891 * dbus/dbus-resources.c: new file implementing some of the
2892 resource limits stuff
2894 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2895 missing docs, add @todo to handle OOM etc.
2897 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2900 2003-01-18 Havoc Pennington <hp@pobox.com>
2902 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2903 connection if it hasn't been already.
2905 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2906 replace with DisconnectFunction.
2908 2003-01-18 Havoc Pennington <hp@pobox.com>
2910 Building --disable-verbose-mode --disable-asserts --disable-tests
2911 cuts the library from 112K to 45K or so
2913 * configure.in: check for varargs macro support,
2914 add --enable-verbose-mode, --enable-asserts.
2916 * dbus/dbus-internals.h (_dbus_assert): support
2918 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2920 2003-01-18 Havoc Pennington <hp@pobox.com>
2922 * dbus/dbus-test.c: include config.h so that tests actually run
2924 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2925 so the failure mode when that assumption fails will be plenty
2928 2003-01-18 Havoc Pennington <hp@pobox.com>
2930 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2932 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2935 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2936 since we don't want to use those in make check
2938 2003-01-15 Havoc Pennington <hp@redhat.com>
2944 2003-01-15 Havoc Pennington <hp@redhat.com>
2946 * test/Makefile.am: fix so that test source code ends up in the
2947 distribution on make distcheck
2949 2003-01-15 Havoc Pennington <hp@redhat.com>
2955 2003-01-15 Havoc Pennington <hp@redhat.com>
2957 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2958 fix build when --disable-tests
2960 * Makefile.am (EXTRA_DIST): put HACKING in here
2962 * HACKING: document procedure for making a tarball release.
2964 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2966 * bus/connection.c: (connection_error_handler),
2967 (bus_connection_setup):
2968 * bus/main.c: (main):
2969 Make sure that the DBusConnectionData struct is NULLed
2970 out to prevent a segfault.
2972 * dbus/dbus-errors.c: (dbus_result_to_string):
2973 * dbus/dbus-errors.h:
2974 * dbus/dbus-message.c: (dbus_message_get_fields),
2975 (dbus_message_get_fields_valist), (_dbus_message_test):
2976 * dbus/dbus-message.h:
2977 Make dbus_message_get_fields return a result code so we can
2978 track invalid fields as well as oom.
2980 2003-01-11 Havoc Pennington <hp@pobox.com>
2982 * configure.in: change --enable-test/--enable-ansi action-if-given
2983 to enable_foo=$enableval instead of enable_foo=yes
2985 2003-01-08 Havoc Pennington <hp@pobox.com>
2987 * dbus/dbus-string.c (_dbus_string_align_length): new function
2989 * dbus/dbus-test-main.c: move main() for test app here
2991 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2992 symbol to run tests, because dbus-test isn't in the main
2995 Code review nitpicks.
2997 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2998 for people with narrow emacs ;-). Assert client_serial was filled
2999 in. Assert message->name != NULL.
3000 (dbus_message_append_fields): have "first_field_type" arg separate
3001 from va list, needed for C++ binding that also uses varargs IIRC
3002 and helps with type safety
3003 (dbus_message_new): add @todo about using DBusString to store
3004 service/name internally
3005 (dbus_message_new): don't leak ->service and ->name on OOM later
3007 (dbus_message_unref): free the service name
3008 (dbus_message_get_fields): same change to varargs
3009 i.e. first_field_type
3010 (_dbus_message_loader_return_buffer): assert that the message data
3011 is aligned (if not it's a bug in our code). Put in verbose griping
3012 about why we set corrupted = TRUE.
3013 (decode_header_data): add FIXME that char* is evil. Was going to
3014 add FIXME about evil locale-specific string.h strncmp, but just
3015 switched to wacky string-as-uint32 optimization. Move check for
3016 "no room for field name" above get_const_data_len() to avoid
3017 assertion failure in get_const_data_len if we have trailing 2
3018 bytes or the like. Check for service and name fields being
3019 provided twice. Don't leak service/name on error. Require field
3020 names to be aligned to 4 bytes.
3022 * dbus/dbus-marshal.c: move byte swap stuff to header
3023 (_dbus_pack_int32): uscore-prefix
3024 (_dbus_unpack_int32): uscore-prefix
3025 (_dbus_unpack_uint32): export
3026 (_dbus_demarshal_string): add @todo complaining about use of
3028 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3029 handling allowing corrupt data to go unchecked
3031 2003-01-08 Havoc Pennington <hp@redhat.com>
3033 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3034 to the select() as needed for authentication. (should be using
3035 _dbus_poll() not select, but for another day)
3037 * dbus/dbus.h: include dbus/dbus-protocol.h
3039 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3041 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3044 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3046 * dbus/dbus-internals.c: (_dbus_type_to_string):
3047 New function that returns a string describing a type.
3049 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3050 * dbus/dbus-marshal.h:
3051 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3052 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3053 (dbus_message_iter_get_byte_array):
3054 * dbus/dbus-message.h:
3055 Add new convenience functions for appending and getting message fields.
3056 Also add demarshalling routines for byte arrays.
3058 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3060 * dbus/dbus-connection-internal.h:
3061 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3062 (_dbus_connection_get_next_client_serial),
3063 (dbus_connection_send_message):
3064 * dbus/dbus-internals.h:
3065 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3066 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3067 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3068 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3069 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3070 (_dbus_verbose_bytes), (_dbus_marshal_test):
3071 * dbus/dbus-marshal.h:
3072 * dbus/dbus-message-internal.h:
3073 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3074 (dbus_message_write_header), (_dbus_message_lock),
3075 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3076 (dbus_message_get_name), (dbus_message_append_int32),
3077 (dbus_message_append_uint32), (dbus_message_append_double),
3078 (dbus_message_append_string), (dbus_message_append_byte_array),
3079 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3080 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3081 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3082 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3083 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3084 (decode_header_data), (_dbus_message_loader_return_buffer),
3085 (message_iter_test), (_dbus_message_test):
3086 * dbus/dbus-message.h:
3087 * dbus/dbus-protocol.h:
3088 * dbus/dbus-test.c: (main):
3090 * glib/test-dbus-glib.c: (message_handler), (main):
3091 * test/echo-client.c: (main):
3092 * test/watch.c: (check_messages):
3093 Make messages sendable and receivable for real.
3095 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3097 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3098 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3099 * dbus/dbus-message.c: (dbus_message_append_int32),
3100 (dbus_message_append_uint32), (dbus_message_append_double),
3101 (dbus_message_append_string), (dbus_message_append_byte_array):
3102 Handle OOM restoration.
3104 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3106 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3107 (_dbus_demarshal_string), (_dbus_marshal_test):
3108 * dbus/dbus-marshal.h:
3109 * dbus/dbus-message.c: (dbus_message_get_name),
3110 Document these functions.
3112 (dbus_message_append_int32), (dbus_message_append_uint32),
3113 (dbus_message_append_double), (dbus_message_append_string),
3114 (dbus_message_append_byte_array):
3115 * dbus/dbus-message.h:
3116 Add functions for adding message fields of different types.
3118 * dbus/dbus-protocol.h:
3119 Add the different types.
3121 2003-01-05 Havoc Pennington <hp@pobox.com>
3123 * bus/connection.c: implement routines for handling connections,
3124 first thing is keeping a list of owned services on each connection
3125 and setting up watches etc.
3127 * bus/services.c: implement a mapping from service names to lists
3130 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3132 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3133 to use static mutexes for global data
3135 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3136 collection of functions to set/get application-specific data
3137 on the DBusConnection.
3139 2003-01-04 Havoc Pennington <hp@pobox.com>
3141 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3142 (_dbus_poll): new function
3144 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3147 * bus/loop.c: initial code for the daemon main loop
3149 2003-01-04 Havoc Pennington <hp@pobox.com>
3151 * test/watch.c (error_handler): make it safe if the error handler
3152 is called multiple times (if we s/error handler/disconnect
3153 handler/ we should just guarantee it's called only once)
3155 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3156 error handler on disconnect (it's quite possible we should
3157 just change the error handler to a "disconnect handler," I'm
3158 not sure we have any other meaningful errors)
3160 * configure.in: check for getpwnam_r
3162 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3163 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3164 mechanism as in SASL spec, using socket credentials
3166 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3167 (_dbus_send_credentials_unix_socket): new function
3169 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3171 (_dbus_write): only check errno if <0 returned
3172 (_dbus_write_two): ditto
3174 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3176 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3177 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3178 (_dbus_marshal_test):
3179 * dbus/dbus-marshal.h:
3180 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3181 to _dbus_marshal_utf8_string. Also fix some tests.
3183 2002-12-28 Harri Porten <porten@kde.org>
3185 * configure.in: added check for C++ compiler and a very cheesy
3186 check for the Qt integration
3188 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3190 * qt/Makefile.am: added
3192 * qt/.cvsignore: added
3194 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3195 latter, added #ifdef QT_THREAD_SUPPORT guard.
3197 * dbus/Makefile.am: added missing headers for make dist
3199 2002-12-28 Kristian Rietveld <kris@gtk.org>
3201 * dbus/Makefile.am: fixup export-symbols-regex.
3203 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3205 * acinclude.m4: Add this file and put the
3206 PKG_CHECK_MODULE macro in it.
3208 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3210 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3211 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3212 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3213 (_dbus_marshal_test):
3214 Make the demarshalling routines align the pos argument.
3215 Add string marshalling tests and fix the obvious bugs
3218 2002-12-26 Havoc Pennington <hp@pobox.com>
3220 * dbus/dbus-auth.c: fixes fixes fixes
3222 * dbus/dbus-transport-unix.c: wire up support for
3223 encoding/decoding data on the wire
3225 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3226 (_dbus_auth_decode_data): append to target string
3227 instead of nuking it.
3229 2002-12-26 Havoc Pennington <hp@pobox.com>
3231 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3232 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3235 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3236 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3237 now). Main point is because I wanted unpack_uint32 to implement
3239 (_dbus_verbose_bytes): new function
3241 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3243 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3244 mechanism to handle a corrupt message stream
3245 (_dbus_message_loader_new): fix preallocation to only prealloc,
3248 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3249 (_dbus_string_test): enhance tests for copy/move and fix the
3252 * dbus/dbus-transport-unix.c: Hold references in more places to
3253 avoid reentrancy problems
3255 * dbus/dbus-transport.c: ditto
3257 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3258 leak reference count in no-message case
3260 * test/watch.c (do_mainloop): handle adding/removing watches
3261 during iteration over the watches. Also, ref the connection/server
3262 stored on a watch, so we don't try to mangle a destroyed one.
3264 * dbus/dbus-transport-unix.c (do_authentication): perform
3267 * dbus/dbus-auth.c (get_state): add a state
3268 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3269 (_dbus_auth_get_unused_bytes): append the unused bytes
3270 to the passed in string, rather than prepend
3272 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3273 the auth conversation DBusAuth
3275 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3276 (_dbus_transport_new_for_domain_socket): when creating a
3277 transport, pass in whether it's a client-side or server-side
3278 transport so we know which DBusAuth to create
3280 2002-12-03 Havoc Pennington <hp@pobox.com>
3282 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3283 _after_ finalizing the derived members
3284 (unix_connection_set): unref watch if we fail to add it
3286 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3287 transport first, so that the connection owned by the
3288 transport will be valid as the transport finalizes.
3290 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3291 if necessary, and remove watches from the connection.
3293 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3295 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3297 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3298 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3299 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3300 (_dbus_marshal_test):
3301 * dbus/dbus-marshal.h:
3302 Add string marshal functions and have the demarshal functions
3303 return the new position.
3305 2002-12-25 Havoc Pennington <hp@pobox.com>
3307 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3308 it is a simple protocol that just maps directly to SASL.
3310 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3311 initial implementation, not actually used yet.
3313 * dbus/dbus-string.c (_dbus_string_find): new function
3314 (_dbus_string_equal): new function
3315 (_dbus_string_base64_encode): new function
3316 (_dbus_string_base64_decode): new function
3318 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3321 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3322 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3323 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3324 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3325 * dbus/dbus-marshal.h:
3326 * dbus/dbus-protocol.h:
3327 * dbus/dbus-test.c: (main):
3329 Add un-optimized marshalling/demarshalling routines.
3331 2002-12-25 Harri Porten <porten@kde.org>
3333 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3335 2002-12-24 Zack Rusin <zack@kde.org>
3337 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3338 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3341 2002-12-24 Havoc Pennington <hp@pobox.com>
3343 * glib/dbus-gthread.c: fix include
3345 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3346 I think glib API needs to change, though, as you don't
3347 want to use DBusMessageFunction, you want to use the
3348 DBusMessageHandler object. Probably
3349 dbus_connection_open_with_g_main_loop()
3350 and dbus_connection_setup_g_main_loop() or something like that
3351 (but think of better names...) that just create a connection
3352 that has watch/timeout functions etc. already set up.
3354 * dbus/dbus-connection.c
3355 (dbus_connection_send_message_with_reply): new function just to
3356 show how the message handler helps us deal with replies.
3358 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3360 * dbus/dbus-string.c (_dbus_string_test): free a string that
3363 * dbus/dbus-hash.c: use memory pools for the hash entries
3364 (rebuild_table): be more paranoid about overflow, and
3365 shrink table when we can
3366 (_dbus_hash_test): reduce number of sprintfs and write
3367 valid C89. Add tests for case where we grow and then
3368 shrink the hash table.
3370 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3372 * dbus/dbus-connection.c (dbus_connection_register_handler)
3373 (dbus_connection_unregister_handler): new functions
3375 * dbus/dbus-message.c (dbus_message_get_name): new
3377 * dbus/dbus-list.c: fix docs typo
3379 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3380 an object representing a handler for messages.
3382 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3385 * glib/dbus-gthread.c: (dbus_gthread_init):
3386 Don't use the gdbus prefix for public functions.
3388 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3392 Add GLib checks and fixup .pc files
3396 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3397 (gdbus_connection_check), (gdbus_connection_dispatch),
3398 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3399 (dbus_connection_gsource_new):
3400 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3401 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3402 * glib/test-dbus-glib.c: (message_handler), (main):
3405 2002-12-15 Harri Porten <porten@kde.org>
3407 * autogen.sh: check for libtoolize before attempting to use it
3409 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3412 * .cvsignore: ignore more stamp files
3414 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3416 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3417 without make install.
3419 2002-12-15 Havoc Pennington <hp@pobox.com>
3421 * dbus/dbus-threads.c: add thread stubs that a higher library
3422 layer can fill in. e.g. the GLib wrapper might fill them in with
3423 GThread stuff. We still need to use this thread API to
3424 thread-safe-ize the library.
3426 2002-12-12 Havoc Pennington <hp@pobox.com>
3428 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3429 below new interfaces and include fewer system headers.
3431 * dbus/dbus-sysdeps.c (_dbus_read): new function
3432 (_dbus_write): new function
3433 (_dbus_write_two): new function
3434 (_dbus_connect_unix_socket): new function
3435 (_dbus_listen_unix_socket): new function
3437 * dbus/dbus-message-internal.h: change interfaces to use
3440 2002-12-11 Havoc Pennington <hp@pobox.com>
3442 * dbus/dbus-types.h: add dbus_unichar
3444 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3446 * dbus/dbus-connection.c (dbus_connection_send_message): return
3449 * dbus/dbus-transport.c: include dbus-watch.h
3451 * dbus/dbus-connection.c: include dbus-message-internal.h
3453 * HACKING: add file with coding guidelines stuff.
3455 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3456 handling here, for security purposes (as in vsftpd). Not actually
3457 using this class yet.
3459 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3460 system/libc usage here, as in vsftpd, for ease of auditing (and
3461 should also simplify portability). Haven't actually moved all the
3462 system/libc usage into here yet.
3464 2002-11-25 Havoc Pennington <hp@pobox.com>
3466 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3467 always print the first verbose message.
3469 2002-11-24 Havoc Pennington <hp@pobox.com>
3471 * test/echo-client.c, test/echo-server.c: cheesy test
3474 * configure.in (AC_CHECK_FUNCS): check for writev
3476 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3479 * dbus/dbus-list.c (_dbus_list_foreach): new function
3481 * dbus/dbus-internals.c (_dbus_verbose): new function
3483 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3484 representing a server that listens for connections.
3486 * dbus/.cvsignore: create
3488 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3489 public API for reporting errors
3491 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3492 public object representing a connection that
3493 sends/receives messages. (Same object used for
3494 both client and server.)
3496 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3497 Basic abstraction for different kinds of stream
3498 that we might read/write messages from.
3500 2002-11-23 Havoc Pennington <hp@pobox.com>
3502 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3505 * dbus/dbus-test.c (main): add list test, and include
3506 dbus-test.h as intended
3508 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3509 (_dbus_hash_table_remove_int): return value indicates
3510 whether the entry existed to remove
3512 * dbus/dbus-list.c: add linked list utility class,
3515 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3518 2002-11-23 Havoc Pennington <hp@pobox.com>
3520 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3521 DBUS_END_DECLS to nothing, that should fix this once and for all
3523 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3525 * dbus/dbus-message.c, dbus/dbus-hash.c:
3526 add some missing @brief
3528 2002-11-23 Havoc Pennington <hp@pobox.com>
3530 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3531 to avoid confusing Doxygen
3533 * dbus/dbus-hash.c: @} not }@
3535 * dbus/dbus-message.c (struct DBusMessage): split out
3538 2002-11-23 Havoc Pennington <hp@pobox.com>
3540 * configure.in: pile on more warning flags if using gcc
3542 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3543 to document static functions
3545 * configure.in: add summary to end of configure so it
3546 looks nice and attractive
3548 * dbus/dbus-hash.c: finish implementation and write unit
3551 * configure.in: add --enable-tests to enable unit tests
3553 * dbus/dbus-test.c: test program to run unit tests
3554 for all files in dbus/*, initially runs a test for
3557 * dbus/dbus-internals.h: file to hold some internal utility stuff
3559 2002-11-22 Havoc Pennington <hp@redhat.com>
3561 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3562 "ported" away from Tcl
3564 * dbus/dbus-types.h: header for types such as dbus_bool_t
3566 2002-11-22 Havoc Pennington <hp@redhat.com>
3568 * dbus/dbus.h: fixups for doc warnings
3570 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3572 (QUIET): make it quiet so we can see warnings
3574 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3576 2002-11-22 Havoc Pennington <hp@redhat.com>
3578 * Makefile.am: include "Doxyfile" target in all-local
3580 * configure.in: generate the Doxyfile
3582 * Doxyfile.in: move Doxyfile here, so we can use
3583 configure to generate a Doxyfile with the right
3586 2002-11-22 Havoc Pennington <hp@redhat.com>
3588 * dbus/dbus-message.c: move inline docs into .c file
3590 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3591 so all docs are under doc/
3592 (MAN_EXTENSION): generate man pages. Use extension
3593 ".3dbus" which matches ".3qt" on my system,
3594 I guess this is OK, I don't know really.
3595 (FILE_PATTERNS): look for .c files not .h, makes sense
3598 2002-11-22 Havoc Pennington <hp@pobox.com>
3600 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3601 because any app can be a server, and any app can be a client,
3602 the bus is a special kind of server.
3604 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3606 * Doxyfile : adding. Still needs Makefile rules to be generated
3607 automatically (just run "doxygen" in the toplevel dir for now to
3610 * dbus/dbus-message.h : Adding sample docs (javadoc since
3611 resembles gtk-doc a little more)
3613 * dbus/dbus.h : Adding sample docs
3615 2002-11-21 Havoc Pennington <hp@redhat.com>
3617 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3618 so we can allow ourselves to include files directly,
3619 instead of having to use dbus.h
3621 * dbus/dbus.h: fill in
3623 * dbus/dbus-message.h: sketch out a sample header file.
3624 Include griping if you include it directly instead of
3627 * dbus/dbus-macros.h: new file with macros for extern "C",
3628 TRUE/FALSE, NULL, etc.
3630 * doc/file-boilerplate.c: put include guards in here
3632 2002-11-21 Havoc Pennington <hp@redhat.com>
3634 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3636 * COPYING: include the GPL as well, and license code
3637 under both AFL and GPL.
3639 2002-11-21 Havoc Pennington <hp@redhat.com>
3641 * acconfig.h: get rid of this
3643 * autogen.sh (run_configure): add --no-configure option
3645 * configure.in: remove AC_ARG_PROGRAM to make
3646 autoconf complain less. add AC_PREREQ.
3647 add AC_DEFINE third arg.
3649 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3652 Fix references so we can distcheck.
3654 2002-11-21 Havoc Pennington <hp@redhat.com>
3656 * Initial module creation