1 2003-04-08 Alexander Larsson <alexl@redhat.com>
3 Implemented recursive types, named types and new-style iters
6 * glib/test-thread-client.c: (thread_func):
7 * glib/test-thread-server.c: (handle_test_message):
8 * test/test-service.c: (handle_echo):
17 * dbus/dbus-internals.c: (_dbus_type_to_string):
20 * dbus/dbus-marshal.[ch]:
21 Implement recursive types and the new marshalling format.
22 Remove hardcoded dict marshalling.
25 * dbus/dbus-message-builder.c:
27 Remove references to old types
29 * dbus/dbus-message.[ch]:
30 New non-refcounted iter API that supports recursive iters.
31 Use iters for appending, including support for recursive
33 Add byte and named type support.
34 Update everything to new marshalling formats.
35 Add tests for new API.
37 * dbus/dbus-protocol.h:
38 Remove old array types.
39 Add types: BYTE, ARRAY, DICT, NAMED
42 * dbus/dbus-sysdeps.c:
43 Make parse_double locale safe.
45 * dbus/dbus-test-main.c:
51 * doc/dbus-specification.sgml:
54 * test/data/incomplete-messages/missing-body.message:
55 * test/data/invalid-messages/bad-boolean.message:
56 * test/data/invalid-messages/bad-boolean-array.message:
57 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
58 * test/data/invalid-messages/boolean-has-no-value.message-raw:
59 * test/data/invalid-messages/too-short-dict.message:
60 * test/data/valid-messages/dict-simple.message:
61 * test/data/valid-messages/dict.message:
62 * test/data/valid-messages/emptiness.message:
63 * test/data/valid-messages/lots-of-arguments.message:
64 * test/data/valid-messages/no-padding.message:
65 * test/data/valid-messages/recursive-types.message:
66 Add missing NAME fields
69 * test/data/invalid-messages/dict-with-nil-value.message:
70 Removed, this is not invalid anymore.
72 * test/data/valid-messages/recursive-types.message:
73 Add new test for deeply recursive types.
75 2003-04-07 Havoc Pennington <hp@pobox.com>
77 * bus/driver.c (bus_driver_handle_acquire_service): return an
78 error if you try to acquire a service that starts with ':'
80 2003-04-07 Havoc Pennington <hp@redhat.com>
82 * doc/dbus-specification.sgml: require that base service names
83 start with ':' and that the base service is created/deleted
84 as first and last things a connection does on the bus
86 * bus/dispatch.c (check_existent_service_activation): lots more
87 work on the activation test; it doesn't fully pass yet...
89 * test/test-service.c (main): fix so we don't memleak the
90 connection to the message bus
91 (filter_func): accept a message asking us to exit
93 2003-04-06 Havoc Pennington <hp@pobox.com>
95 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
98 * configure.in: fixes to Qt detection from Colin Walters
100 * doc/Makefile.am: Only remove generated docbook dirs if they
101 exist, from Colin Walters
103 * dbus/dbus-bus.c: change how we set well-known connections to
104 NULL, so that it works if a single connection is stored in
105 two well-known array slots.
107 * test/Makefile.am: remove a lot of stuff that isn't immediately
108 useful, it's in CVS history if we want it.
110 * test/test-service.c: use dbus-mainloop instead of that
113 2003-04-06 Havoc Pennington <hp@pobox.com>
115 * dbus/Makefile.am: split lists of sources into stuff that goes in
116 the library, util functions that go in the lib and are also used
117 elsewhere, and util functions that are used in tests/daemon but
120 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
121 here so it can be used in test binaries also
123 2003-04-06 Havoc Pennington <hp@pobox.com>
125 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
126 here in the parent process, so we can return an error if it
127 fails. Also, move some of the code into the child so the parent
128 is less hosed if we fail midway through.
130 * bus/bus.c (bus_context_new): move pidfile detection further up
131 in the function, before we start overwriting sockets and such.
133 * bus/messagebus.in: adjust this a bit, not sure if it will work.
135 * configure.in: add --with-system-pid-file and --with-system-socket
137 2003-04-06 Colin Walters <walters@verbum.org>
139 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
141 * bus/system.conf.in: Declare a pidfile.
143 * bus/bus.c (bus_context_new): Test for an existing pid file, and
144 create one (if appropriate).
146 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
147 (struct BusConfigParser) [pidfile]: New.
148 (element_type_to_name, merge_included, start_busconfig_child)
149 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
150 (bus_config_parser_unref): Free it.
151 (bus_config_parser_get_pidfile): New function.
153 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
155 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
157 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
159 * dbus/dbus-sysdeps.h: Prototype it.
161 2003-04-06 Havoc Pennington <hp@pobox.com>
163 * bus/bus.c (bus_context_new): print the address in here, rather
164 than in main(), because we need to do it before forking the daemon
166 * bus/dispatch.c (send_service_nonexistent_error): set the sender
167 on the service nonexistent error
169 * bus/driver.c (bus_driver_handle_acquire_service): set the
170 sender on the AcquireService reply
172 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
173 server also listen on a UNIX socket so services can connect to it.
175 2003-04-06 Havoc Pennington <hp@pobox.com>
177 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
178 so it detects deadlocks and also we actually init threads when
181 2003-04-06 Havoc Pennington <hp@pobox.com>
183 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
184 save the domain socket name, and unlink it when we disconnect the
185 server. Means that at least when we exit normally, we won't leave
186 a bunch of junk in /tmp
188 * dbus/dbus-transport-unix.c
189 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
190 memory management). (I was making a real change here but then
193 2003-04-06 Havoc Pennington <hp@pobox.com>
195 * bus/bus.c (bus_context_new): fix wrong handling of
196 server_data_slot_unref() in the error case.
198 * dbus/dbus-internals.h (_dbus_assert): change so it passes
199 "(condition) != 0" to _dbus_real_assert so that
200 "_dbus_assert (pointer)" doesn't cause a warning
202 * bus/main.c (main): accept --print-address option to print out
203 the message bus address
205 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
207 * dbus/dbus-transport.c (_dbus_transport_open): special error for
208 "tmpdir" option to unix: address on client side
210 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
213 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
214 we can use to create sockets in the test suite.
216 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
217 cleanly. To be used for testing.
219 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
221 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
223 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
224 handle trying to call this when there's no servers active
226 2003-04-05 Havoc Pennington <hp@pobox.com>
232 2003-04-05 Havoc Pennington <hp@pobox.com>
234 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
235 crash on startup. Need to get "try starting the daemon"
236 in the test suite I guess. ;-)
238 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
239 tracked the number of open connections; it's better done in
240 application-specific code as you want it to span all servers etc.
242 2003-04-05 Havoc Pennington <hp@pobox.com>
244 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
245 patch from Colin Walters
247 2003-04-05 Havoc Pennington <hp@pobox.com>
249 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
250 reality; in fact multiple mechanisms are allowed.
252 * dbus/dbus-internals.c (_dbus_real_assert)
253 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
254 _dbus_assert_not_reached() into functions, so that they don't show
255 up in basic block counts for test coverage, and don't use up as
256 much disk space. Does mean slower execution speed though, so
257 assumes --disable-asserts is the normal production case.
259 2003-04-05 Havoc Pennington <hp@pobox.com>
261 * test/Makefile.am (dist-hook): also dist *.in files
267 2003-04-05 Havoc Pennington <hp@pobox.com>
269 * dbus/dbus-string.c: docs warning
271 * dbus/dbus-spawn.c: missing docs
273 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
275 2003-04-05 Havoc Pennington <hp@pobox.com>
277 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
280 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
281 to -1 once we've reaped the babysitter
282 (_dbus_babysitter_handle_watch): do as much work as we can, not
285 * bus/activation.c: add code using DBusBabysitter so that we
286 handle it when a service fails to start up properly.
287 (bus_activation_service_created): don't remove the activation
288 entries as we go, just let them get removed when we free the pending
289 activation. Unref reply messages after sending them.
291 2003-04-05 Havoc Pennington <hp@pobox.com>
293 * test/decode-gcov.c (main): print per-directory stats in the report
295 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
297 2003-04-05 Havoc Pennington <hp@pobox.com>
299 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
301 * test/decode-gcov.c: hack up a little program to suck data
302 out of gcov files. Yes this is sort of silly.
304 * configure.in: define something in config.h and do an
305 AM_CONDITIONAL when gcov is enabled
307 2003-04-04 Havoc Pennington <hp@redhat.com>
309 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
310 return a "babysitter" object that is used to monitor the status of
311 the spawned process and reap it when required.
313 * test/test-segfault.c, test/test-exit.c,
314 test/test-sleep-forever.c: binaries that do various lame things,
315 used in the test suite.
317 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
319 2003-04-03 Havoc Pennington <hp@pobox.com>
321 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
322 in preparation for modifying it, dbus-sysdeps is getting
325 2003-04-03 Havoc Pennington <hp@redhat.com>
327 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
330 * bus/*.[hc]: adapt to mainloop change
332 2003-04-03 Havoc Pennington <hp@redhat.com>
334 * bus/activation.c (load_directory): fix up memleaks
335 (bus_activation_entry_free): free the entry
337 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
338 we get one from the message bus; fix memleaks.
340 * dbus/dbus-message.c (dbus_set_error_from_message): new function
342 2003-04-03 Havoc Pennington <hp@pobox.com>
344 * bus/config-parser.c (bus_config_parser_unref): free
345 list of mechanisms, bug discovered by test suite enhancements
346 (putting system.conf and session.conf into suite)
348 * test/Makefile.am, test/test-service.c: add placeholder for a
349 test service that we'll activate as part of test suite. Doesn't
352 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
353 setting NULL value, and use system malloc not dbus_malloc()
354 when we have unavoidable memleakage.
356 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
357 didn't work, and support DBUS_BUS_ACTIVATION.
359 * bus/activation.c (child_setup): pass our well-known bus type to
362 * bus/config-parser.c: support <type> to specify well-known type
364 * doc/dbus-specification.sgml: document the env variables to
365 locate well-known buses and find service activator
367 2003-04-02 Havoc Pennington <hp@redhat.com>
369 * test/Makefile.am (all-local): add a rule to copy tests to
370 builddir, so we can have generated tests. Use this to remove the
371 silly hack for testing system.conf and session.conf. Will use this
372 shortly to generate .service files pointing to test binaries.
374 2003-04-02 Havoc Pennington <hp@redhat.com>
376 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
377 current alloc and needed new length, not max of the doubled
378 allocation and needed new length. Also, when building tests,
379 don't do the double-allocation stuff, just realloc every time.
381 2003-04-02 Havoc Pennington <hp@redhat.com>
383 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
385 (_dbus_string_get_dirname): new
386 (_dbus_sysdeps_test): new
387 (_dbus_directory_open): include dirnames in error messages
389 * bus/config-parser.c: interpret <include> and <includedir> and
390 <servicedir> relative to config file location if the given
391 filename is not absolute.
393 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
395 2003-04-02 Havoc Pennington <hp@redhat.com>
397 * bus/connection.c (bus_transaction_send_error_reply): set sender
398 service for the error, and unref the reply on success
400 * bus/activation.c: convert to use BusTransaction so OOM can be
402 (bus_activation_service_created): set sender of the message
404 2003-04-01 Havoc Pennington <hp@redhat.com>
406 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
407 <includedir> (at least mostly)
409 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
410 first, then the user ID
412 2003-04-01 Havoc Pennington <hp@pobox.com>
414 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
417 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
419 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
421 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
422 socket 0777, and unlink any existing socket.
424 * bus/bus.c (bus_context_new): change our UID/GID and fork if
425 the configuration file so specifies; set up auth mechanism
428 * bus/config-parser.c (bus_config_parser_content): add support
429 for <fork> option and fill in code for <auth>
431 * bus/system.conf.in: add <fork/> to default configuration,
432 and limit auth mechanisms to EXTERNAL
434 * doc/config-file.txt (Elements): add <fork>
436 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
437 (_dbus_change_identity): new function
439 2003-03-31 Havoc Pennington <hp@redhat.com>
441 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
442 (_dbus_listen_unix_socket): fix off-by-one error in null
443 termination spotted by Nalin
445 2003-03-31 Havoc Pennington <hp@redhat.com>
447 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
448 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
449 having a real home directory available.
451 2003-03-31 Havoc Pennington <hp@redhat.com>
453 * bus/Makefile.am (install-data-hook): create /var/run/dbus
455 * bus/messagebus.in: add init script for Red Hat /etc/init.d
457 * configure.in: add support for specifying a style of init script
460 2003-03-31 Havoc Pennington <hp@redhat.com>
462 Fix some annoying DBusString API and fix all affected code.
464 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
466 (_dbus_string_get_data): change to return string instead of using
468 (_dbus_string_get_const_data): ditto
469 (_dbus_string_get_data_len): ditto
470 (_dbus_string_get_const_data_len): ditto
472 2003-03-31 Havoc Pennington <hp@redhat.com>
474 * bus/main.c (main): fix up the command line arguments to be nicer
476 2003-03-31 Havoc Pennington <hp@redhat.com>
478 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
479 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
480 final location that lands in the config file
482 * bus/config-loader-expat.c (bus_config_load): fix type of
485 * doc/TODO: remove TODO item for dbus_bus_get()
487 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
489 2003-03-31 Havoc Pennington <hp@pobox.com>
491 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
492 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
493 argument since they are always client side
495 * dbus/dbus-server.c (dbus_server_get_address): new function
497 * bus/main.c (main): take the configuration file as an argument.
499 * test/data/valid-config-files/debug-allow-all.conf: new file to
500 use with dispatch.c tests for example
502 * bus/test-main.c (main): require test data dir
504 * bus/bus.c (bus_context_new): change this to take a
505 configuration file name as argument
507 * doc/config-file.txt (Elements): add <servicedir>
509 * bus/system.conf, bus/session.conf: new files
511 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
512 well-known socket if none set
514 * configure.in: create system.conf and session.conf
516 2003-03-30 Havoc Pennington <hp@pobox.com>
518 * bus/config-parser.c: hacking
520 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
521 to shut down, since it could cause weirdness with the DBusList
524 * dbus/dbus-list.c (_dbus_list_test): add tests for the
525 link-oriented stack routines
526 (alloc_link): free the mempool if the first alloc from it fails
528 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
530 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
532 (_dbus_string_skip_white): new
534 * doc/config-file.txt (Elements): add <includedir>
536 2003-03-28 Havoc Pennington <hp@pobox.com>
538 * dbus/dbus-string.c (_dbus_string_copy_data_len)
539 (_dbus_string_copy_data): new functions
541 2003-03-28 Anders Carlsson <andersca@codefactory.se>
543 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
547 * dbus/dbus-memory.c:
550 2003-03-28 Havoc Pennington <hp@pobox.com>
552 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
553 I think it may have just been superstition. Not sure.
555 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
556 failures that were not being handled.
558 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
560 * dbus/dbus-memory.c: add ability to set number of mallocs in a
561 row that will fail on out-of-memory.
563 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
564 function for testing out-of-memory handling.
566 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
567 allocation functions, they do map exactly to the expat ones.
569 2003-03-27 Havoc Pennington <hp@redhat.com>
571 * bus/config-loader-libxml.c (bus_config_load): add another error
574 2003-03-26 Anders Carlsson <andersca@codefactory.se>
577 Add note about automatic service activation.
579 * doc/dbus-specification.sgml:
580 Rename the specification and clarify a few things.
582 2003-03-26 Anders Carlsson <andersca@codefactory.se>
585 * dbus/dbus-address.c:
587 * dbus/dbus-marshal.c:
588 * dbus/dbus-server-debug-pipe.c:
589 * dbus/dbus-transport-unix.c:
590 Fix documentation warnings.
592 2003-03-26 Havoc Pennington <hp@pobox.com>
594 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
595 after every test so it's quick and easy to see which leaked, and
596 so we test multiple dbus_shutdown() calls
598 * configure.in: change configure.in XML stuff to also support
601 * config-loader-libxml.c: some hacking
603 * config-loader-expat.c: some hacking
605 * config-parser.c: some hacking, plus tests
607 2003-03-25 Havoc Pennington <hp@redhat.com>
609 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
611 * configure.in: add --with-xml option to specify XML library,
612 right now only libxml is supported.
614 * bus/config-loader-libxml.c, config-parser.c: sync some minor
615 nonworking code between home and work, still just stubs
617 2003-03-24 Havoc Pennington <hp@redhat.com>
619 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
622 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
623 NULL argument for "message" if the error is a well-known one,
624 fill in a generic message in this case.
626 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
629 * bus/test.c (bus_test_flush_bus): add
631 * bus/policy.c (bus_policy_test): test code stub
633 2003-03-24 Havoc Pennington <hp@pobox.com>
635 * bus/connection.c (bus_connections_setup_connection): set up
636 the "can this user connect" function, but it always returns
637 TRUE until we have a config file parser so we can have a config
638 file that allows connections.
640 2003-03-23 Havoc Pennington <hp@pobox.com>
642 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
643 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
644 the mutex, so we can check for proper memory management
647 * dbus/dbus-dataslot.c: remove the mutex from
648 DBusDataSlotAllocator and lock it manually when using it,
649 to simplify fitting it into the global slots framework.
651 * dbus/dbus-threads.c (init_static_locks): rework how we're
652 handling global locks so they are easily shut down.
654 * bus/policy.c (bus_policy_append_rule): fix
656 * bus/test-main.c (main): check for memleaks
658 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
659 test suite check for memleaks
661 * dbus/dbus-memory.c: add support in test mode for tracking
662 number of outstanding blocks
664 2003-03-23 Havoc Pennington <hp@pobox.com>
666 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
669 * dbus/dbus-hash.h: add ULONG hash keys
671 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
672 (_dbus_get_group_id): new function
674 2003-03-20 Havoc Pennington <hp@redhat.com>
676 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
678 (dbus_connection_get_unix_user): new function
680 2003-03-20 Havoc Pennington <hp@pobox.com>
682 * bus/connection.c (bus_connection_send_oom_error): assert that
684 (connection_execute_transaction): ditto
685 (bus_connection_preallocate_oom_error): fix to set the sender, and
686 set recipient to the destination service, not the bus driver
688 * bus/policy.c: hacking
690 * dbus/dbus-message.c (dbus_message_service_is): new function
691 (dbus_message_sender_is): new
693 2003-03-19 Havoc Pennington <hp@redhat.com>
695 * bus/policy.c: start sketching code for policy restrictions on
696 what connections can do.
698 2003-03-18 Havoc Pennington <hp@redhat.com>
700 * doc/TODO: some notes on high-level todo items. Little nitpick
701 stuff is all in @todo, so no need to add it here.
703 * doc/config-file.txt: some notes on how config file might look
705 2003-03-18 Anders Carlsson <andersca@codefactory.se>
711 2003-03-17 Havoc Pennington <hp@redhat.com>
713 * dbus/dbus-internals.h: add gcc attributes so that
714 our printf-style functions warn on bad arguments to
717 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
720 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
723 2003-03-17 Havoc Pennington <hp@redhat.com>
725 * bus/test-main.c (main): make it print something as it runs
726 so make check doesn't look stuck
728 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
729 from CVS, now obsolete
731 2003-03-17 Anders Carlsson <andersca@codefactory.se>
733 * bus/dispatch.c: (bus_dispatch):
734 Refetch the service name since it may have been reallocated
735 when dbus_message_set_sender was called.
737 * dbus/dbus-sysdeps.c: (_dbus_accept):
738 Add address and address length variables and use them to stop
739 valgrind from complaining.
741 2003-03-17 Havoc Pennington <hp@pobox.com>
743 All tests pass, no memleaks, no valgrind complaints.
745 * bus/test.c: refcount handler_slot
747 * bus/connection.c (bus_connections_new): refcount
750 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
751 bytes so that auth scripts pass.
753 * bus/dispatch.c: init message_handler_slot so it gets allocated
756 * bus/dispatch.c (message_handler_slot_ref): fix memleak
758 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
759 dealloc server_pipe_hash when no longer used for benefit of
762 * dbus/dbus-auth.c (process_command): memleak fix
764 * bus/dispatch.c (check_hello_message): memleak fix
766 2003-03-16 Havoc Pennington <hp@pobox.com>
768 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
770 2003-03-17 Anders Carlsson <andersca@codefactory.se>
772 * bus/activation.c (bus_activation_activate_service): Append
773 the pending activation entry to the list of pending activations.
775 2003-03-16 Havoc Pennington <hp@pobox.com>
777 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
780 * dbus/dbus-address.c (create_entry): fix OOM handling when
781 failing to alloc entry->method
783 2003-03-16 Havoc Pennington <hp@pobox.com>
785 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
788 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
789 add some missing dbus_set_result
791 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
792 alloc the DBusMessageHandler
794 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
795 the transport here, since we call this from the finalizer; it
796 resulted in a double-finalize.
798 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
799 where we tried to use transport->connection that was NULL,
800 happened when transport was disconnected early on due to OOM
802 * bus/*.c: adapt to handle OOM for watches/timeouts
804 * dbus/dbus-transport-unix.c: port to handle OOM during
807 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
808 reference to unused bytes instead of a copy
810 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
813 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
816 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
819 2003-03-16 Anders Carlsson <andersca@codefactory.se>
821 * doc/dbus-specification.sgml:
822 Document reply message for ActivateService.
824 2003-03-16 Anders Carlsson <andersca@codefactory.se>
826 * bus/activation.c: (bus_pending_activation_entry_free),
827 (bus_pending_activation_free), (bus_activation_new),
828 (bus_activation_unref), (bus_activation_service_created),
829 (bus_activation_activate_service):
831 * bus/bus.c: (bus_context_new):
832 * bus/desktop-file.c: (new_section):
833 * bus/driver.c: (bus_driver_send_service_deleted),
834 (bus_driver_handle_activate_service):
835 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
837 * dbus/dbus-connection.c:
838 (dbus_connection_send_with_reply_and_block):
839 * dbus/dbus-message.c: (dbus_message_append_args_valist):
840 * dbus/dbus-protocol.h:
841 Make activation work better. Now pending activations will be queued
842 and the daemon won't try to activate services that are already registered.
844 2003-03-16 Havoc Pennington <hp@pobox.com>
846 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
849 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
850 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
852 2003-03-16 Havoc Pennington <hp@pobox.com>
854 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
855 this. always run the test suite before commit...
857 * bus/*: adapt to DBusConnection API changes
859 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
860 requires renaming stuff to avoid dbus_connection_dispatch name
863 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
866 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
867 separate from _dbus_message_loader_return_buffer()
869 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
870 this, because it's now always broken to use; the number of
871 messages in queue vs. the number still buffered by the message
872 loader is undefined/meaningless. Should use
873 dbus_connection_get_dispatch_state().
874 (dbus_connection_dispatch): rename from
875 dbus_connection_dispatch_message
877 2003-03-16 Havoc Pennington <hp@pobox.com>
879 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
882 2003-03-16 Anders Carlsson <andersca@codefactory.se>
884 * dbus/dbus-connection.c:
885 (dbus_connection_send_with_reply_and_block):
886 Decrease connection->n_incoming when removing an entry
888 * dbus/dbus-dict.c: (dbus_dict_entry_free),
889 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
890 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
891 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
892 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
893 (dbus_dict_get_byte_array):
894 Handle NULL arrays and strings. Also add support for byte arrays.
896 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
897 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
898 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
899 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
900 (_dbus_demarshal_dict), (demarshal_and_validate_len),
901 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
902 * dbus/dbus-marshal.h:
903 Add support for marshalling and demarshalling empty arrays and strings.
905 * dbus/dbus-message.c: (dbus_message_append_args_valist),
906 (dbus_message_append_string_array),
907 (dbus_message_iter_get_boolean),
908 (dbus_message_iter_get_boolean_array),
909 (dbus_message_iter_get_int32_array),
910 (dbus_message_iter_get_uint32_array),
911 (dbus_message_iter_get_double_array),
912 (dbus_message_iter_get_byte_array),
913 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
914 (check_message_handling):
915 Add support for getting empty arrays and dicts.
917 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
918 Don't do any validation at all for now, that's better than just checking
921 * test/data/valid-messages/emptiness.message:
922 New test message with lots of empty arrays.
924 2003-03-16 Havoc Pennington <hp@pobox.com>
926 * dbus/dbus-connection.c
927 (_dbus_connection_queue_received_message_link): new function that
928 can't fail due to OOM
930 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
931 new function pops a message together with a list link
934 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
935 message queuing functions to avoid needing to alloc memory
937 2003-03-16 Havoc Pennington <hp@pobox.com>
939 Oops - test code was only testing failure of around 30 of the
940 mallocs in the test path, but it turns out there are 500+
941 mallocs. I believe this was due to misguided linking setup such
942 that there was one copy of dbus_malloc etc. in the daemon and one
943 in the shared lib, and only daemon mallocs were tested. In any
944 case, the test case now tests all 500+ mallocs, and doesn't pass
945 yet, though there are lots of fixes in this patch.
947 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
948 this so that it doesn't need to allocate memory, since it
949 has no way of indicating failure due to OOM (and would be
952 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
954 * bus/Makefile.am: rearrange to create two self-contained
955 libraries, to avoid having libraries with overlapping symbols.
956 that was resulting in weirdness, e.g. I'm pretty sure there
957 were two copies of global static variables.
959 * dbus/dbus-internals.c: move the malloc debug stuff to
962 * dbus/dbus-list.c (free_link): free list mempool if it becomes
965 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
967 * dbus/dbus-address.c (dbus_parse_address): free list nodes
970 * bus/dispatch.c (bus_dispatch_add_connection): free
971 message_handler_slot when no longer using it, so
972 memory leak checkers are happy for the test suite.
974 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
976 * bus/bus.c (new_connection_callback): disconnect in here if
977 bus_connections_setup_connection fails.
979 * bus/connection.c (bus_connections_unref): fix to free the
981 (bus_connections_setup_connection): if this fails, don't
982 disconnect the connection, just be sure there are no side
985 * dbus/dbus-string.c (undo_alignment): unbreak this
987 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
989 (_dbus_auth_new): fix the order in which we free strings
992 * bus/connection.c (bus_connection_disconnected): fix to
993 not send ServiceDeleted multiple times in case of memory
996 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
997 get the base service name
998 (dbus_bus_register_client): don't return base service name,
999 instead store it on the DBusConnection and have an accessor
1001 (dbus_bus_register_client): rename dbus_bus_register()
1003 * bus/dispatch.c (check_hello_message): verify that other
1004 connections on the bus also got the correct results, not
1005 just the one sending hello
1007 2003-03-15 Havoc Pennington <hp@pobox.com>
1009 Make it pass the Hello handling test including all OOM codepaths.
1010 Now to do other messages...
1012 * bus/services.c (bus_service_remove_owner): fix crash when
1013 removing owner from an empty list of owners
1014 (bus_registry_ensure): don't leave service in the list of
1015 a connection's owned services if we fail to put the service
1018 * bus/connection.c (bus_connection_preallocate_oom_error): set
1019 error flag on the OOM error.
1021 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1022 handle _dbus_transport_set_connection failure
1024 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1025 to create watches up front and simply enable/disable them as
1027 (unix_connection_set): this can now fail on OOM
1029 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
1030 of enabling/disabling a watch or timeout.
1032 * bus/loop.c (bus_loop_iterate): don't touch disabled
1035 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1037 2003-03-15 Havoc Pennington <hp@pobox.com>
1039 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1040 write useful test code, after all that futzing around ;-)
1042 Test does not yet pass because we can't handle OOM in
1043 _dbus_transport_messages_pending (basically,
1044 dbus_connection_preallocate_send() does not prealloc the write
1045 watch). To fix this, I think we need to add new stuff to
1046 set_watch_functions, namely a SetEnabled function so we can alloc
1047 the watch earlier, then enable it later.
1049 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
1050 dbus-memory.c to the convenience lib
1052 * bus/test.c: rename some static functions to keep them clearly
1053 distinct from stuff in connection.c. Handle client disconnection.
1055 2003-03-14 Havoc Pennington <hp@pobox.com>
1057 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
1058 transport, tests more of the real codepath. Set up clients
1059 with bus_setup_debug_client.
1061 * bus/test.c (bus_setup_debug_client): function to set up debug
1062 "clients" on the main loop
1064 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
1067 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
1070 * dbus/dbus-server-debug.c: support a debug server based on pipes
1072 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
1073 (_dbus_close): new function
1075 * configure.in: check for socketpair
1077 2003-03-14 Havoc Pennington <hp@redhat.com>
1079 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
1082 * dbus/dbus-transport-debug.c: rework this a good bit to be
1083 less complicated. hopefully still works.
1085 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
1088 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
1091 * dbus/dbus-message.c (dbus_message_copy): rename from
1092 dbus_message_new_from_message, fix it up to copy
1093 all the message fields, add test case
1095 * bus/dispatch.c (bus_dispatch_test): add some more test code,
1096 not quite passing yet
1098 2003-03-14 Havoc Pennington <hp@pobox.com>
1100 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
1101 until no work remains" in test code. (the large diff here
1102 is just code movement, no actual changes)
1104 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1105 1, no point waiting around for test code.
1106 (_dbus_server_debug_accept_transport): unref the timeout
1107 after adding it (right?)
1109 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1111 2003-03-13 Havoc Pennington <hp@redhat.com>
1113 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1116 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1119 * dbus/dbus-connection.h: Make AddWatchFunction and
1120 AddTimeoutFunction return a bool so they can fail on out-of-memory
1122 * bus/bus.c (bus_context_new): set up timeout handlers
1124 * bus/connection.c (bus_connections_setup_connection): set up
1127 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1130 * bus/bus.c (bus_context_new): adapt to changes
1132 * bus/connection.c: adapt to changes
1134 * test/watch.c: adapt to DBusWatch changes
1136 * bus/dispatch.c (bus_dispatch_test): started adding this but
1139 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1141 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1143 2003-03-13 Havoc Pennington <hp@pobox.com>
1145 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1146 set up a test framework as for the library
1148 2003-03-12 Havoc Pennington <hp@pobox.com>
1150 Throughout: purge global variables, introduce BusActivation,
1151 BusConnections, BusRegistry, etc. objects instead.
1153 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1156 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1157 going to redo this a bit differently I think
1159 2003-03-12 Havoc Pennington <hp@redhat.com>
1161 Mega-patch that gets the message bus daemon initially handling
1162 out-of-memory. Work still needed. Also lots of random
1163 moving stuff to DBusError instead of ResultCode.
1165 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1167 * dbus/dbus-connection.c
1168 (dbus_connection_send_with_reply_and_block): use DBusError
1170 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1173 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1174 code here, as the only failure possible is OOM.
1176 * bus/connection.c (bus_connection_disconnect):
1177 rename bus_connection_disconnected as it's a notification only
1179 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1180 "name" on get_args failure, should be done by get_args;
1181 don't disconnect client for bad args, just return an error.
1182 (bus_driver_handle_service_exists): ditto
1184 * bus/services.c (bus_services_list): NULL-terminate returned array
1186 * bus/driver.c (bus_driver_send_service_lost)
1187 (bus_driver_send_service_acquired): send messages from driver to a
1188 specific client to the client's unique name, not to the broadcast
1191 * dbus/dbus-message.c (decode_header_data): reject messages that
1192 contain no name field
1193 (_dbus_message_get_client_serial): rename to
1194 dbus_message_get_serial and make public
1195 (_dbus_message_set_serial): rename from set_client_serial
1196 (_dbus_message_set_reply_serial): make public
1197 (_dbus_message_get_reply_serial): make public
1199 * bus/connection.c (bus_connection_foreach): allow stopping
1200 iteration by returning FALSE from foreach function.
1202 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1203 (dbus_connection_free_preallocated_send)
1204 (dbus_connection_preallocate_send): new API for sending a message
1205 without possibility of malloc failure.
1206 (dbus_connection_send_message): rename to just
1207 dbus_connection_send (and same for whole function family)
1209 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1211 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1213 * bus/activation.c: handle/return errors
1215 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1217 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1218 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1219 (_dbus_result_from_errno): move to this file
1221 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1223 * dbus/dbus-marshal.c:
1224 (_dbus_marshal_set_string):
1225 Take a length argument so we can marshal the correct string
1228 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1229 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1230 (_dbus_marshal_test):
1231 * dbus/dbus-marshal.h:
1232 Add support for marshalling and demarshalling dicts.
1234 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1235 Add support for TYPE DICT.
1237 * dbus/dbus-message.c: (set_string_field):
1238 Adjust header padding.
1240 (dbus_message_append_args_valist), (dbus_message_append_dict),
1241 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1242 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1243 (check_message_handling), (check_have_valid_message):
1244 * dbus/dbus-message.h:
1245 Add functions for setting and getting dicts.
1247 * dbus/dbus-protocol.h:
1253 * doc/dbus-specification.sgml:
1254 Add information about how dicts are marshalled.
1256 * test/data/invalid-messages/dict-with-nil-value.message:
1257 * test/data/invalid-messages/too-short-dict.message:
1258 * test/data/valid-messages/dict-simple.message:
1259 * test/data/valid-messages/dict.message:
1260 Add sample messages containing dicts.
1262 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1264 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1266 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1269 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1270 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1271 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1272 (dbus_dict_set_double), (dbus_dict_set_string),
1273 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1274 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1275 (dbus_dict_set_string_array), (_dbus_dict_test):
1277 Fix according to comments from Havoc.
1279 2003-03-06 Michael Meeks <michael@server.home>
1281 * configure.in: if we don't have kde-config, disable have_qt.
1283 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1288 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1289 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1290 (dbus_dict_remove), (dbus_dict_get_value_type),
1291 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1292 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1293 (dbus_dict_put_double), (dbus_dict_put_string),
1294 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1295 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1296 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1297 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1298 (dbus_dict_get_double), (dbus_dict_get_string),
1299 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1300 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1301 (dbus_dict_get_string_array), (_dbus_dict_test):
1303 Add DBusDict implementation
1305 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1309 2003-03-04 Havoc Pennington <hp@pobox.com>
1311 * test/data/auth/*: adapt to changes
1313 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1314 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1317 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1318 more stuff from being in a context name, to make the protocol
1319 simpler to deal with
1321 * dbus/dbus-errors.c (dbus_error_has_name): new function
1322 (dbus_error_is_set): new function
1324 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1325 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1327 * dbus/dbus-connection.c (dbus_connection_flush): also read
1328 messages during a flush operation
1330 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1332 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1334 * configure.in: Check for gethostbyname on Solaris.
1336 * dbus/dbus-transport.c: (_dbus_transport_open):
1337 Remove duplicate "tcp" entry.
1339 * doc/dbus-specification.sgml:
1340 Clarify some things.
1342 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1344 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1345 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1346 (_dbus_keyring_test):
1347 * dbus/dbus-md5.c: (_dbus_md5_compute):
1348 * dbus/dbus-sha.c: (_dbus_sha_compute):
1351 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1353 * README: Add some things.
1355 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1357 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1358 after case DBUS_TYPE_BOOELAN.
1360 2003-03-02 Havoc Pennington <hp@pobox.com>
1362 * test/break-loader.c (randomly_set_extreme_ints): add test that
1363 sets really huge and small integers
1365 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1366 that length of boolean array fits in the string, and that
1367 string has room for boolean value in single-bool case.
1369 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1370 optional value to "ALIGN" command which is what to fill the
1373 * test/data/valid-messages/no-padding.message: add regression
1374 test for the message padding problem
1376 2003-03-02 Havoc Pennington <hp@pobox.com>
1378 * dbus/dbus-message.c (decode_header_data): fix to always init
1379 message_padding, from Benjamin Dauvergne
1381 2003-03-02 Havoc Pennington <hp@pobox.com>
1387 2003-03-01 Joe Shaw <joe@assbarn.com>
1389 * configure.in: Check for "struct cmsgcred" and try to access its
1390 members for BSD-like unices.
1392 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1393 _dbus_read_credentials_unix_socket().
1394 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1395 read() for reading the credential byte off the unix socket. Use
1396 struct cmsgcred on systems that support it.
1398 2003-02-27 Alexander Larsson <alexl@redhat.com>
1402 Make gthreads-2.0 dependency optional. Don't build thread test if
1405 2003-02-27 Havoc Pennington <hp@pobox.com>
1407 * dbus/dbus-connection.c
1408 (dbus_connection_send_message_with_reply_and_block): fix doh!
1409 doh! doh! bug that resulted in never removing a reply from the
1410 queue, no wonder we called get_reply_serial so much ;-)
1412 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1413 and client serial instead of demarshaling them every time
1415 2003-02-27 Havoc Pennington <hp@pobox.com>
1417 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1418 more inlined, using dbus-string-private.h, speeds things up
1421 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1422 when freeing the string
1423 (_dbus_string_steal_data): fix for align offset
1424 (undo_alignment): new function
1426 2003-02-26 Havoc Pennington <hp@redhat.com>
1428 All kinds of audit fixes from Owen, plus initial attempt to
1429 handle unaligned memory returned from malloc.
1431 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1432 leave room for align_offset and nul byte
1433 (fixup_alignment): function to track an align_offset and
1434 ensure real->str is aligned
1435 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1436 to allow a nul byte plus align offset
1437 (_dbus_string_lock): fix overflow issue
1438 (_dbus_string_init_const_len): add assertions on sanity of len,
1439 assign allocated to be ALLOCATION_PADDING larger than len
1440 (set_length): fixup the overflow handling
1441 (_dbus_string_get_data_len): fix overflow in assertion
1442 (open_gap): detect overflow in size of gap to be opened
1443 (_dbus_string_lengthen): add overflow check
1444 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1445 (_dbus_string_append): add overflow check
1446 (_dbus_string_append_unichar): overflow
1447 (_dbus_string_delete): fix overflow in assertion
1448 (_dbus_string_copy_len): overflow in assertion
1449 (_dbus_string_replace_len): overflows in assertions
1450 (_dbus_string_find): change to implement in terms of
1451 _dbus_string_find_to
1452 (_dbus_string_find_to): assorted fixage
1453 (_dbus_string_equal_c_str): assert c_str != NULL,
1454 fix logic so the function works
1455 (_dbus_string_ends_with_c_str): fix overflow thingy
1456 (_dbus_string_base64_encode): overflow fix
1457 (_dbus_string_validate_ascii): overflow
1458 (_dbus_string_validate_nul): overflow
1460 2003-02-26 Havoc Pennington <hp@redhat.com>
1462 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1464 2003-02-26 Alexander Larsson <alexl@redhat.com>
1467 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1469 * dbus/dbus-connection.c:
1470 * dbus/dbus-connection.h:
1471 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1472 Add dbus_connection_set_wakeup_main_function and use it when queueing
1473 incoming and outgoing messages.
1476 * dbus/dbus-dataslot.c:
1477 Threadsafe usage of DBusDataSlotAllocator
1479 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1482 * dbus/dbus-server-unix.c:
1485 * glib/dbus-gmain.c:
1486 Implement the new wakeup functions for glib.
1489 * glib/test-thread-client.c:
1490 * glib/test-thread-server.c:
1491 * glib/test-thread.h:
1492 Initial cut at some thread test code. Not really done yet.
1494 2003-02-26 Havoc Pennington <hp@pobox.com>
1496 * dbus/dbus-connection.c
1497 (dbus_connection_send_message_with_reply_and_block): fix crash
1498 where we ref'd the outgoing message instead of the returned reply
1500 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1501 at the end of this function, so if we didn't need to read for
1502 authentication, we reinstall it for receiving messages
1504 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1505 a NULL sender for peer-to-peer case
1507 * dbus/dbus-transport-unix.c (check_read_watch): handle
1508 !authenticated case correctly
1510 * glib/dbus-gmain.c: add support for DBusServer
1512 * dbus/dbus-server.c: add data slot support
1514 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1515 return values and handle errors
1517 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1520 * Doxyfile.in (INPUT): add glib subdir
1522 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1523 setup_with_g_main instead of hookup_with_g_main; write docs
1525 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1527 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1528 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1529 * dbus/dbus-message.c: (dbus_message_append_boolean),
1530 (dbus_message_append_boolean_array),
1531 (dbus_message_get_args_valist), (_dbus_message_test):
1532 * dbus/dbus-message.h:
1533 * doc/dbus-specification.sgml:
1534 Various fixes as pointed out by Havoc.
1536 * test/data/invalid-messages/bad-boolean-array.message:
1537 * test/data/invalid-messages/bad-boolean.message:
1538 Add invalid boolean value test cases.
1540 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1542 * dbus/dbus-internals.c: (_dbus_type_to_string):
1543 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1544 (_dbus_marshal_validate_arg):
1545 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1546 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1547 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1548 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1549 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1550 (dbus_message_iter_get_double),
1551 (dbus_message_iter_get_boolean_array), (message_iter_test):
1552 * dbus/dbus-message.h:
1553 * dbus/dbus-protocol.h:
1554 * doc/dbus-specification.sgml:
1555 * test/data/valid-messages/lots-of-arguments.message:
1556 Add support for boolean and boolean array types.
1558 2003-02-23 Havoc Pennington <hp@pobox.com>
1560 * dbus/dbus-keyring.c: finish most of this implementation and
1563 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1564 these barf if the error isn't cleared to NULL
1566 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1567 (_dbus_create_directory): new function
1569 * dbus/dbus-errors.c (dbus_set_error): fix warning
1571 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1572 (_dbus_string_hex_decode): new function
1573 (test_hex_roundtrip): test code
1575 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1577 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1579 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1580 the save-to-temp/rename trick to atomically write the new file
1581 (_dbus_string_parse_uint): new function
1583 2003-02-22 Havoc Pennington <hp@pobox.com>
1585 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1587 2003-02-22 Havoc Pennington <hp@pobox.com>
1589 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1590 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1592 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1594 * dbus/test/data/sha-1: add US government test suite for SHA-1
1596 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1598 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1599 Make string arrays NULL-terminated.
1601 * dbus/dbus-memory.c: (dbus_free_string_array):
1602 * dbus/dbus-memory.h:
1603 New function for freeing NULL-terminated string arrays.
1605 * dbus/dbus-message-builder.c: (append_quoted_string),
1606 (_dbus_message_data_load):
1607 Add support for array types.
1609 * dbus/dbus-message.c: (check_message_handling):
1610 Add more types as test cases.
1612 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1613 (_dbus_string_parse_double):
1614 Add the start offset to the end offset.
1616 * test/data/valid-messages/lots-of-arguments.message:
1617 New test message with lots of arguments.
1619 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1621 * dbus/dbus-message.c: (dbus_message_append_nil),
1622 (dbus_message_append_int32), (dbus_message_append_uint32),
1623 (dbus_message_append_double), (dbus_message_append_string),
1624 (dbus_message_append_int32_array),
1625 (dbus_message_append_uint32_array),
1626 (dbus_message_append_double_array),
1627 (dbus_message_append_byte_array),
1628 (dbus_message_append_string_array):
1629 Fix all out-of-memory handling in these functions.
1631 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1633 * dbus/dbus-message.c: (dbus_message_append_nil):
1636 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1638 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1639 (dbus_message_append_nil), (dbus_message_append_int32_array),
1640 (dbus_message_append_uint32_array),
1641 (dbus_message_append_double_array),
1642 (dbus_message_append_byte_array),
1643 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1644 (dbus_message_iter_get_int32_array),
1645 (dbus_message_iter_get_uint32_array),
1646 (dbus_message_iter_get_double_array),
1647 (dbus_message_iter_get_byte_array),
1648 (dbus_message_iter_get_string_array):
1650 * dbus/dbus-message.h:
1651 Add functions for appending and getting arrays.
1653 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1655 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1656 element size at least 8 bytes, fixes mempool tests on
1659 2003-02-20 Alexander Larsson <alexl@redhat.com>
1661 * dbus/dbus-transport-unix.c (unix_do_iteration):
1662 Unlock the connection mutex during a blocking select call.
1663 Add todo about how we need a way to wake up the select.
1665 * dbus/dbus-connection-internal.h:
1666 * dbus/dbus-connection.c:
1667 Add _dbus_connection_lock and _dbus_connection_unlock.
1669 2003-02-19 Havoc Pennington <hp@pobox.com>
1671 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1672 Doxyfile.in, not Doxyfile
1674 * dbus/dbus-keyring.c: do some hacking on this
1676 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1678 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1680 (dbus_set_error): remove dbus_error_init, check for message ==
1681 NULL *before* we sprintf into it, and add @todo about including
1682 system headers in this file
1684 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1686 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1688 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1689 get various bits of user information based on either username
1691 (_dbus_homedir_from_username): new function
1693 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1696 Add check for nonposix getpwnam_r
1698 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1699 Align the pool element size to a sizeof (void *) boundary.
1701 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1702 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1703 General Solaris fixes.
1705 * test/data/valid-messages/simplest-manual.message:
1706 Explicitly state that we want little-endian packing.
1708 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1710 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1712 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1713 Added to create a transport connecting using a tcp/ip socket.
1715 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1716 to a tcp socket at given host and port.
1717 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1720 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1722 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1723 Added to create a server listening on a TCP/IP socket.
1725 2003-02-19 Havoc Pennington <hp@pobox.com>
1727 Throughout: mop up all the Doxygen warnings and undocumented
1730 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1731 to search any paths.
1733 * dbus/dbus-threads.c: move global mutex initializers to
1734 dbus-internals.h, multiple prototypes was confusing doxygen
1735 besides being kind of ugly
1737 * Doxyfile (PREDEFINED): have Doxygen define
1738 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1739 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1740 (do not abuse the feature! it's for stuff like the autogenerated
1741 macros in dbus-md5.c, not just for things you don't feel like
1744 2003-02-18 Havoc Pennington <hp@pobox.com>
1746 * dbus/dbus-string.c (_dbus_string_zero): new function
1748 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1749 wrap it in some dbus-friendly API
1751 * dbus/dbus-types.h: add 16-bit types
1753 2003-02-18 Joe Shaw <joe@assbarn.com>
1755 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1756 credentials from our currently running process.
1757 (get_word): Fix a buglet where we were copying the entire length
1758 instead of relative to our position.
1760 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1761 keys on the stack... it's 640k of data.
1763 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1764 read the credentials byte off the socket, even if we don't have
1766 (_dbus_poll): Implement poll() using select() for systems which
1769 * glib/test-dbus-glib.c (main): Print out an error if no
1770 parameters are given.
1772 * test/data/auth/fallback.auth-script: Added. Tests that a client
1773 can fallback to a secondary auth mechanism if the first fails.
1775 2003-02-18 Havoc Pennington <hp@pobox.com>
1779 2003-02-17 Havoc Pennington <hp@pobox.com>
1781 * doc/dbus-specification.sgml: lots of cosmetic
1782 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1783 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1784 s/server/bus/ (except in authentication section). Add a section
1785 "Message Bus Message Routing"
1787 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1793 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1795 * doc/dbus-specification.sgml:
1796 Specification updates.
1798 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1800 * bus/activation.c: (bus_activation_init), (child_setup),
1801 (bus_activation_activate_service):
1803 * bus/main.c: (main):
1804 Set DBUS_ADDRESS environment variable.
1806 * dbus/dbus-errors.c: (dbus_set_error):
1807 Don't use va_copy since that's a C99 feature.
1809 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1810 (_dbus_spawn_async):
1811 * dbus/dbus-sysdeps.h:
1812 Add child_setup_func to _dbus_spawn_async.
1814 * doc/dbus-specification.sgml:
1815 Update specification.
1817 * test/spawn-test.c: (setup_func), (main):
1820 2003-02-17 Alexander Larsson <alexl@redhat.com>
1822 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1825 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1829 * doc/dbus-test-plan.sgml:
1830 Add test plan document.
1835 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1837 * dbus/dbus-message.c: (decode_header_data),
1838 (_dbus_message_loader_return_buffer):
1839 Set the header padding amount when loading a message.
1841 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1843 * bus/dispatch.c: (send_one_message):
1844 Only send broadcast messages to registered connections.
1846 * dbus/dbus-message.c: (dbus_message_name_is):
1847 * dbus/dbus-message.h:
1848 New convenience function.
1850 * dbus/dbus-transport-debug.c: (do_reading):
1851 Only dispatch one message per run.
1854 * test/bus-test.c: (new_connection_callback), (die),
1855 (test_hello_client1_handler), (test_hello_client2_handler),
1856 (test_hello_replies), (main):
1858 * test/bus-test-loop.[ch]:
1861 2003-02-16 Havoc Pennington <hp@pobox.com>
1863 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1864 backward conditional
1866 2003-02-16 Alexander Larsson <alexl@redhat.com>
1868 * dbus/dbus-connection.c:
1869 Implement sent_message_with_reply. (with_reply_and block is still
1871 Made dispatch_message not lose message if OOM.
1873 * dbus/dbus-errors.h:
1874 Add NoReply error (for reply timeouts).
1876 2003-02-16 Alexander Larsson <alexl@redhat.com>
1878 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1879 Actually free keys and values when destroying hashtable.
1881 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1883 * dbus/dbus-auth.c: (client_try_next_mechanism):
1886 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1887 Return TRUE if there's no thread implementation around.
1889 * glib/dbus-gmain.c: (free_source),
1890 (dbus_connection_hookup_with_g_main):
1891 Make sure to remove the GSource when the connection is finalized.
1893 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1895 * bus/dispatch.c: (bus_dispatch_message_handler):
1896 * dbus/dbus-errors.h:
1897 Return an error if someone tries to send a message to a service
1900 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1902 * bus/activation.c: (load_directory), (bus_activation_init),
1903 (bus_activation_activate_service):
1906 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1907 More work on the activation handling.
1909 * dbus/dbus-errors.h:
1910 Add some error messages
1912 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1913 * dbus/dbus-message.h:
1914 New function that creates an error message.
1916 * dbus/dbus-protocol.h:
1917 Add ACTIVATE_SERVER message.
1919 * dbus/dbus-server-unix.c: (unix_handle_watch),
1920 (_dbus_server_new_for_domain_socket):
1921 Call _dbus_fd_set_close_on_exec.
1923 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1924 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1925 (_dbus_fd_set_close_on_exec):
1926 * dbus/dbus-sysdeps.h:
1927 Add _dbus_fd_set_close_on exec function. Also add function that checks
1928 that all open fds are set to close-on-exec and warns otherwise.
1930 * dbus/dbus-transport-unix.c:
1931 (_dbus_transport_new_for_domain_socket):
1932 Call _dbus_fd_set_close_on_exec.
1934 2003-02-16 Havoc Pennington <hp@pobox.com>
1936 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1937 allow people to avoid setting SIGPIPE to SIG_IGN
1938 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1939 we've been asked not to
1941 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1943 * dbus/dbus-list.c: (_dbus_list_append_link),
1944 (_dbus_list_prepend_link):
1945 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1949 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1952 * bus/activation.c: (bus_activation_entry_free),
1953 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1955 * bus/main.c: (main):
1956 Add simple activation support, doesn't work yet though.
1958 2003-02-15 Zack Rusin <zack@kde.org>
1960 * qt/dbus-qthread.cpp: small casting fix
1962 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1964 * dbus/dbus-errors.c: (dbus_set_error):
1965 * dbus/dbus-errors.h:
1966 Add a few errors and make dbus_set_error void.
1968 * dbus/dbus-sysdeps.c:
1969 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1970 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1971 * dbus/dbus-sysdeps.h:
1972 Add _dbus_spawn_async.
1974 * test/spawn-test.c: (main):
1975 Test for _dbus_spawn_async.
1977 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1979 * dbus/dbus-internals.h:
1980 Fix build without tests.
1982 * dbus/dbus-list.c: (alloc_link):
1983 Fix a segfault when a malloc fails.
1985 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1986 (dbus_malloc0), (dbus_realloc):
1987 Add support for malloc debugging.
1989 2003-02-15 Alexander Larsson <alexl@redhat.com>
1991 * dbus/dbus-threads.c:
1992 * dbus/dbus-threads.h:
1993 Add condvars. Remove static mutext from API.
1994 Implement static mutexes by initializing them from threads_init.
1996 * glib/dbus-gthread.c:
1997 * qt/dbus-qthread.cpp:
1998 Update with the thread api changes.
2003 Turn StaticMutex into normal mutex + init function.
2004 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2005 _dbus_list_append_link, _dbus_list_prepend_link
2008 * dbus/dbus-sysdeps.c:
2009 * dbus/dbus-sysdeps.h:
2010 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2011 _dbus_atomic_dec. Only slow fallback implementation at the moment.
2013 * dbus/dbus-protocol.h:
2014 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2016 * dbus/dbus-message.c:
2017 Make ref/unref atomic.
2020 * dbus/dbus-connection-internal.h:
2021 * dbus/dbus-connection.c:
2022 * dbus/dbus-connection.h:
2024 Change _peek to _borrow,_return & _steal_borrowed.
2025 Change disconnect callback to event.
2026 Make dbus_connection_dispatch_messages reentrant.
2028 * dbus/dbus-transport.c:
2029 Don't ref the connection on calls to the transport
2032 * dbus/dbus-message-handler.c:
2035 * glib/dbus-gmain.c:
2036 Don't use peek_message anymore
2039 * test/debug-thread.c:
2040 * test/debug-thread.h:
2041 Simple thread implementation that asserts() on deadlocks in
2042 single-threaded code.
2045 (main) Call debug_threads_init.
2048 Use disconnect message instead of disconnect callback.
2052 Don't call dbus_connection_set_disconnect_function. Instead export
2053 bus_connection_disconnect.
2056 Call bus_connection_disconnect when we get a disconnected message.
2058 2003-02-15 Havoc Pennington <hp@pobox.com>
2060 * dbus/dbus-message.c (dbus_message_new): fool around with the
2063 2003-02-14 Havoc Pennington <hp@pobox.com>
2065 * dbus/dbus-mempool.c: fail if the debug functions so indicate
2067 * dbus/dbus-memory.c: fail if the debug functions indicate we
2070 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
2071 (_dbus_decrement_fail_alloc_counter): debug functions to
2072 simulate memory allocation failures
2074 2003-02-14 Havoc Pennington <hp@pobox.com>
2076 * dbus/dbus-errors.h (struct DBusError): add a word of padding
2079 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2081 * bus/driver.c: (bus_driver_handle_hello):
2083 * bus/services.c: (bus_service_lookup):
2084 Reorder message sending so we get a more sane order.
2086 * test/bus-test.c: (message_handler):
2089 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2091 * bus/driver.c: (bus_driver_send_service_deleted),
2092 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2093 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2094 (bus_driver_send_welcome_message),
2095 (bus_driver_handle_list_services),
2096 (bus_driver_handle_acquire_service),
2097 (bus_driver_handle_service_exists):
2098 * dbus/dbus-bus.c: (dbus_bus_register_client),
2099 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2100 * dbus/dbus-errors.c: (dbus_result_to_string):
2101 * dbus/dbus-errors.h:
2102 * dbus/dbus-message.c: (dbus_message_append_args),
2103 (dbus_message_append_args_valist), (dbus_message_get_args),
2104 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2105 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2106 (dbus_message_iter_get_byte_array),
2107 (dbus_message_iter_get_string_array), (message_iter_test),
2108 (check_message_handling), (_dbus_message_test):
2109 * dbus/dbus-message.h:
2110 * test/bus-test.c: (main):
2111 Change fields to arguments in messages, so that they won't be
2112 confused with header fields.
2114 * glib/test-dbus-glib.c: (main):
2115 Remove append_fields from hello message.
2117 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2119 * dbus/dbus-errors.c:
2120 * dbus/dbus-message.c:
2121 * dbus/dbus-string.c:
2122 Documentation fixes.
2124 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2126 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2128 Implement support for timeouts in dbus-glib.
2130 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2132 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2133 * dbus/dbus-message.c: (process_test_subdir):
2134 * test/break-loader.c: (find_breaks_based_on):
2135 Plug some memory leaks.
2137 2003-02-13 Richard Hult <rhult@codefactory.se>
2139 * bus/main.c: Fix build.
2141 * dbus/dbus-errors.h:
2142 * dbus/dbus-errors.c: Fix copyright for Anders.
2144 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2149 * bus/connection.c: (bus_connection_foreach):
2152 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2153 (unescape_string), (new_section), (parse_section_start),
2154 (parse_key_value), (report_error), (bus_desktop_file_load),
2155 (bus_desktop_file_get_string):
2156 * bus/desktop-file.h:
2157 Use DBusError for error reporting.
2159 * bus/dispatch.c: (send_one_message),
2160 (bus_dispatch_message_handler):
2161 * bus/driver.c: (bus_driver_send_service_deleted),
2162 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2163 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2164 (bus_driver_send_welcome_message),
2165 (bus_driver_handle_list_services),
2166 (bus_driver_handle_acquire_service),
2167 (bus_driver_handle_service_exists):
2168 * bus/loop.c: (bus_loop_run):
2170 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2172 * bus/utils.c: (bus_wait_for_memory):
2174 New files with general utility functions.
2176 * dbus/dbus-internals.h:
2177 Remove _DBUS_HANDLE_OOM.
2179 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2181 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2182 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2183 * dbus/dbus-errors.h:
2184 Add DBusError structure.
2186 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2188 * test/data/valid-messages/standard-acquire-service.message:
2189 * test/data/valid-messages/standard-hello.message:
2190 * test/data/valid-messages/standard-list-services.message:
2191 * test/data/valid-messages/standard-service-exists.message:
2192 Add some standard messages.
2194 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2196 * bus/driver.c: (bus_driver_send_welcome_message),
2197 (bus_driver_handle_list_services),
2198 (bus_driver_handle_acquire_service),
2199 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2200 Update for API changes in libdbus.
2202 * dbus/dbus-message.c: (dbus_message_new_reply):
2203 * dbus/dbus-message.h:
2204 Remove the name argument. The spec states that replies shouldn't
2207 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2209 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2210 (report_error), (bus_desktop_file_load), (lookup_section),
2211 (lookup_line), (bus_desktop_file_get_raw),
2212 (bus_desktop_file_get_string):
2213 * bus/desktop-file.h:
2214 Some fixes, and new functions for getting a key value from a section.
2216 2003-02-13 Havoc Pennington <hp@pobox.com>
2218 * test/data/auth/fail-after-n-attempts.auth-script: new test
2220 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2223 2003-02-13 Havoc Pennington <hp@pobox.com>
2225 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2226 dbus_credentials_match were backward
2228 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2229 NO_CREDENTIALS and ROOT_CREDENTIALS
2231 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2232 into here. Never process more commands after we've reached an
2233 end state; store further data as unused bytes.
2235 * test/data/auth/*: add more auth tests
2237 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2238 command to match exact string and EXPECT_UNUSED to match unused
2241 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2243 2003-02-12 Havoc Pennington <hp@pobox.com>
2245 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2246 \r off of popped lines
2248 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2251 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2254 2003-02-12 Havoc Pennington <hp@pobox.com>
2256 * dbus/Makefile.am: remove break-loader from the build, since it
2259 * configure.in: add --enable-gcov to turn on coverage profiling
2260 flags and disable optimization
2262 2003-02-10 Havoc Pennington <hp@pobox.com>
2264 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2265 initial cut at test framework for DBusAuth from laptop.
2266 Doesn't quite work yet but it compiles and I need to get
2267 it off the 266mhz laptop. ;-)
2269 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2270 fix a memleak in error case
2272 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2275 * bus/desktop-file.c:
2276 * bus/desktop-file.h:
2277 Add a desktop file parser.
2279 2003-02-11 Zack Rusin <zack@kde.org>
2281 * qt/message.[h|cpp]: sample implementation
2282 of the KDE wrapper for DBusMessage
2284 2003-02-09 Zack Rusin <zack@kde.org>
2286 * test/bus-test.c: make_it_compile
2287 * doc/dbus-specification.sgml: minimal semantic fix
2289 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2295 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2298 * dbus/dbus-break-loader.c:
2300 * test/break-loader.c:
2301 Move dbus-break-loader to test/ and rename it to break-loader.
2303 2003-02-02 Havoc Pennington <hp@pobox.com>
2305 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2306 for code to manage cookies in your home directory
2308 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2310 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2311 to authenticate, then disconnect the client.
2313 2003-02-03 Alexander Larsson <alexl@redhat.com>
2315 * dbus/dbus-message.c (dbus_message_append_fields):
2318 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2320 * doc/dbus-specification.sgml:
2321 Update address format section.
2323 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2326 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2327 (message_handler), (new_connection_callback), (loop_quit),
2331 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2333 * bus/driver.c: (bus_driver_handle_service_exists):
2334 Simplify the code a bit.
2336 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2339 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2342 Add libdbus-daemon.la and link to it.
2344 2003-02-01 James Willcox <jwillcox@gnome.org>
2346 * bus/driver.c: (bus_driver_handle_own_service):
2347 Actually include the service reply code in the message.
2349 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2351 * bus/driver.c: (bus_driver_handle_service_exists):
2352 Don't unref the incoming message.
2354 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2356 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2358 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2360 * dbus/dbus-server.c: (dbus_server_listen):
2361 * dbus/dbus-transport.c: (_dbus_transport_open):
2362 ifdef out the calls to the debug transport and server.
2364 2003-02-02 Alexander Larsson <alexl@redhat.com>
2366 * dbus/dbus-watch.c (dbus_watch_get_flags):
2367 Add note in the docs that ERROR or HANGUP won't be returned
2368 and are assumed always on.
2370 * glib/dbus-gmain.c (add_watch):
2371 Always add IO_ERR | IO_HUP
2373 * dbus/dbus-message.h:
2374 Add semicolon after dbus_message_iter_get_string_array().
2375 Makes qt code build again
2377 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2379 * bus/driver.c: (create_unique_client_name),
2380 (bus_driver_handle_hello):
2381 Don't take a name, just use a numeric id to identify
2385 * dbus/dbus-bus.c: (dbus_bus_register_client),
2386 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2388 Add new convenience functions for communicating with the bus.
2390 * dbus/dbus-message.h:
2392 * dbus/dbus-protocol.h:
2395 2003-02-01 Alexander Larsson <alexl@redhat.com>
2397 * dbus/dbus-message.c (dbus_message_append_fields):
2398 Add some more doc comments.
2400 2003-02-01 Havoc Pennington <hp@pobox.com>
2402 * dbus/dbus-break-loader.c (randomly_modify_length): change
2403 a 4-byte value in the message as if it were a length
2405 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2406 execute bit on saved files
2408 2003-02-01 Havoc Pennington <hp@pobox.com>
2410 * dbus/dbus-break-loader.c (main): new program to find messages
2411 that break the loader.
2413 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2414 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2416 * dbus/dbus-string.c (_dbus_string_set_byte): new
2418 2003-01-31 Havoc Pennington <hp@pobox.com>
2420 * dbus/dbus-message.c: refactor the test code to be more general,
2421 in preparation for writing a "randomly permute test cases to
2422 try to break the loader" program.
2424 2003-01-31 Havoc Pennington <hp@pobox.com>
2426 * doc/dbus-specification.sgml: work on the specification
2428 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2429 the protocol version of the message.
2431 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2432 no longer specifies that.
2433 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2436 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2437 "break" for DBUS_TYPE_NIL, remove @todo
2439 2003-01-31 Havoc Pennington <hp@pobox.com>
2441 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2442 just set_is_error/get_is_error as this is a commonly-used
2443 function, and write docs.
2445 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2447 * dbus/dbus-address.c: (dbus_address_entry_free):
2448 Free key and value lists.
2450 * dbus/dbus-internals.c: (_dbus_type_to_string):
2451 Add the types we didn't have.
2453 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2454 (_dbus_marshal_validate_arg):
2457 * dbus/dbus-message.c: (dbus_message_set_sender):
2458 Remove todo about being able to set sender to NULL.
2460 (dbus_message_set_is_error_reply),
2461 (dbus_message_get_is_error_reply):
2462 * dbus/dbus-message.h:
2465 * dbus/dbus-protocol.h:
2466 Add error reply flag.
2468 * test/data/valid-messages/opposite-endian.message:
2469 Add NIL type to test.
2471 2003-01-31 Havoc Pennington <hp@pobox.com>
2473 * doc/dbus-specification.sgml: fully specify the header. Add
2474 flags and major protocol version, and change header/body len to
2477 * dbus/dbus-message-builder.c (append_saved_length): append length
2480 * dbus/dbus-message.c (dbus_message_create_header): change header
2481 length and body length to unsigned. Add the new fields from the
2483 (_dbus_message_loader_return_buffer): unsigned header/body len
2485 2003-01-30 Havoc Pennington <hp@pobox.com>
2487 * dbus/dbus-auth.c: rework to use only REJECTED, no
2490 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2491 use REJECTED, suggested by Mark McLoughlin
2493 2003-01-30 Havoc Pennington <hp@pobox.com>
2495 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2496 a better way to report errors here. e.g. "unix address lacks
2497 path" or something. also "no such file" when the path doesn't
2500 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2502 (dbus_parse_address): add @todo about documenting address format,
2503 and allowing , and ; to be escaped
2505 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2508 Add dbus-address.[ch]
2510 * dbus/dbus-address.c: (dbus_address_entry_free),
2511 (dbus_address_entries_free), (create_entry),
2512 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2513 (dbus_parse_address), (_dbus_address_test):
2514 * dbus/dbus-address.h:
2515 New files for dealing with address parsing.
2517 * dbus/dbus-connection.c:
2518 Document timeout functions.
2520 * dbus/dbus-message.c:
2521 Document dbus_message_new_from_message.
2523 * dbus/dbus-server-debug.c:
2526 * dbus/dbus-server.c: (dbus_server_listen):
2527 Parse address and use correct server implementation.
2529 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2530 * dbus/dbus-string.h:
2531 New function with test.
2533 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2537 * dbus/dbus-transport-debug.c:
2540 * dbus/dbus-transport.c: (_dbus_transport_open):
2541 Parse address and use correct transport implementation.
2543 2003-01-30 Havoc Pennington <hp@pobox.com>
2545 * dbus/dbus-message.c: use message->byte_order instead of
2546 DBUS_COMPILER_BYTE_ORDER throughout.
2547 (dbus_message_create_header): pad header to align the
2548 start of the body of the message to 8-byte boundary
2550 * dbus/dbus-marshal.h: make all the demarshalers take const
2551 DBusString arguments.
2553 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2554 validate message args here, so we don't have to do slow validation
2555 later, and so we catch bad messages as they are incoming. Also add
2556 better checks on header_len and body_len. Also fill in
2559 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2560 implemented properly)
2561 (_dbus_string_validate_nul): new function to check all-nul
2563 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2564 get_arg_end_pos and remove all validation
2565 (_dbus_marshal_validate_arg): actually do validation here.
2567 2003-01-29 Havoc Pennington <hp@pobox.com>
2569 * dbus/dbus-message.c (check_message_handling): fix assertion
2570 failure on set_client_serial
2572 2003-01-28 Havoc Pennington <hp@pobox.com>
2574 * dbus/dbus-server-debug.c: Add doc section comments
2576 * dbus/dbus-transport-debug.c: add doc section comments
2578 2003-01-28 Havoc Pennington <hp@redhat.com>
2580 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2581 the reverse order from how I had it
2582 (_dbus_string_base64_encode): reverse encoding order. I was
2583 basically byteswapping everything during encoding.
2585 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2587 * dbus/dbus-connection-internal.h:
2588 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2589 (_dbus_connection_remove_timeout):
2590 Add functions for adding and removing timeouts.
2592 * dbus/dbus-message.c: (dbus_message_new_from_message):
2593 Add new function that takes a message and creates an exact
2594 copy of it, but with the refcount set to 1.
2595 (check_message_handling):
2598 * dbus/dbus-server-protected.h:
2599 * dbus/dbus-server.c: (_dbus_server_init_base),
2600 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2601 (dbus_server_set_timeout_functions):
2602 (_dbus_server_remove_timeout):
2603 New functions so that a server can add and remove timeouts.
2605 (dbus_server_listen):
2606 Add commented out call to dbus_server_debug_new.
2608 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2609 Actually set the handler, doh.
2611 * dbus/dbus-transport.c: (_dbus_transport_open):
2612 Add commented out call to dbus_transport_debug_client_new.
2615 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2617 2003-01-28 Havoc Pennington <hp@pobox.com>
2619 * dbus/dbus-message.c (check_message_handling): function to check
2620 on the loaded message, iterates over it etc.
2622 2003-01-28 Havoc Pennington <hp@pobox.com>
2624 * test/Makefile.am (dist-hook): fix make distdir
2626 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2628 2003-01-27 Havoc Pennington <hp@pobox.com>
2630 * dbus/dbus-mempool.c (time_for_size): replace printf with
2633 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2634 empty lines; fix the SAVE_LENGTH stuff to be
2635 START_LENGTH/END_LENGTH so it actually works; couple other
2638 * test/Makefile.am (dist-hook): add dist-hook for .message files
2640 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2641 can be constant or locked.
2642 (_dbus_string_free): allow freeing a const string as
2645 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2647 * dbus/dbus-test-main.c (main): take an argument which is the
2648 directory containing test data
2650 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2651 argument to this and load all the messages in test/data/
2652 checking that they can be loaded or not loaded as appropriate.
2654 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2656 * bus/dispatch.c: (bus_dispatch_message_handler):
2657 Dispatch messages sent to services.
2659 * bus/driver.c: (bus_driver_send_service_deleted),
2660 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2661 (bus_driver_send_service_acquired):
2662 Add helper functions for sending service related messages.
2664 (bus_driver_send_welcome_message):
2665 Send HELLO_REPLY instead of WELCOME.
2667 (bus_driver_handle_list_services):
2668 Send LIST_SERVICES_REPLY instead of SERVICES.
2670 (bus_driver_handle_own_service),
2671 (bus_driver_handle_service_exists):
2672 New message handlers.
2674 (bus_driver_handle_message):
2675 Invoke new message handlers.
2677 (bus_driver_remove_connection):
2678 Don't remove any services here since that's done automatically
2679 by bus_service_remove_owner now.
2682 New function signatures.
2684 * bus/services.c: (bus_service_add_owner):
2685 Send ServiceAcquired message if we're the only primary owner.
2687 (bus_service_remove_owner):
2688 Send ServiceAcquired/ServiceLost messages.
2690 (bus_service_set_prohibit_replacement),
2691 (bus_service_get_prohibit_replacement):
2692 Functions for setting prohibit replacement.
2694 (bus_service_has_owner):
2695 New function that checks if a connection is in the owner queue of
2699 Add new function signatures.
2701 * dbus/dbus-list.c: (_dbus_list_test):
2702 Add tests for _dbus_list_remove_last and traversing the list backwards.
2705 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2706 go any further, so return NULL then.
2708 * dbus/dbus-protocol.h:
2709 Add new messages, service flags and service replies.
2711 2003-01-26 Havoc Pennington <hp@pobox.com>
2713 * dbus/dbus-message-builder.c: implement, completely untested.
2715 * test/data/*: add data to be used in testing.
2716 ".message" files are our simple loadable text format.
2717 ".message-raw" will be binary dumps of messages.
2719 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2721 2003-01-26 Havoc Pennington <hp@pobox.com>
2723 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2725 * dbus/dbus-errors.c (dbus_result_to_string): add
2728 * dbus/dbus-message-builder.c: new file, will contain code to load
2729 up messages from files. Not implemented yet.
2731 2003-01-26 Havoc Pennington <hp@pobox.com>
2733 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2734 the sender by setting to NULL
2736 2003-01-26 Havoc Pennington <hp@pobox.com>
2738 The unit tests pass, but otherwise untested. If it breaks, the
2739 tests should have been better. ;-)
2741 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2744 * dbus/dbus-message.c: redo everything so we maintain
2745 message->header as the only copy of the various fields.
2746 This avoids the possibility of out-of-memory in some cases,
2747 for example dbus_message_lock() can't run out of memory anymore,
2748 and avoids extra copying. Figured I may as well go ahead and do
2749 this since it was busted for dbus_message_lock to not return
2750 failure on OOM, and dbus_message_write_header was totally
2751 unchecked for OOM. Also fixed some random other bugs.
2753 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2754 that strings are nul-terminated. Also, end_pos can be equal
2755 to string length just not greater than, I think.
2756 (_dbus_marshal_set_int32): new function
2757 (_dbus_marshal_set_uint32): new function
2758 (_dbus_marshal_set_string): new function
2760 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2761 a warning, init timeout_list to NULL
2762 (dbus_connection_send_message): don't use uninitialized variable
2765 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2767 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2769 * bus/driver.c: (bus_driver_handle_hello),
2770 (bus_driver_send_welcome_message):
2773 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2775 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2776 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2777 (dbus_connection_unref):
2778 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2779 * dbus/dbus-message.c: (dbus_message_unref),
2782 (dbus_message_get_fields):
2783 Remove debugging printout.
2785 (_dbus_message_loader_return_buffer):
2786 Don't store the header string.
2788 (_dbus_message_test):
2791 2003-01-26 Richard Hult <rhult@codefactory.se>
2793 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2794 the file descriptor list, since it can change under us.
2796 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2798 * glib/dbus-gmain.c: (dbus_connection_prepare),
2799 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2800 (remove_watch), (dbus_connection_hookup_with_g_main):
2801 Rewrite the glib handling to use its own GSource instead of a
2802 GIOChannel so we can catch messages put in the queue while waiting
2805 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2808 * bus/connection.c: (connection_disconnect_handler),
2809 (connection_watch_callback), (bus_connection_setup):
2810 * bus/dispatch.c: (send_one_message),
2811 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2812 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2814 * bus/driver.c: (bus_driver_send_service_deleted),
2815 (bus_driver_send_service_created), (bus_driver_handle_hello),
2816 (bus_driver_send_welcome_message),
2817 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2818 (bus_driver_handle_message):
2820 Refactor code, put the message dispatching in its own file. Use
2821 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2824 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2826 * dbus/dbus-internals.h:
2827 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2829 * dbus/dbus-message.c: (dbus_message_get_sender):
2830 * dbus/dbus-message.h:
2831 Implement dbus_message_get_sender.
2833 * dbus/dbus-protocol.h:
2834 Add message and service defines.
2836 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2838 * dbus/dbus-connection.c: (dbus_connection_send_message):
2839 * dbus/dbus-message-internal.h:
2840 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2841 (dbus_message_write_header):
2842 Remove _dbus_messag_unlock and don't set the client serial on a
2843 message if one already exists.
2845 2003-01-24 Havoc Pennington <hp@pobox.com>
2847 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2850 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2853 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2855 * dbus/dbus-list.c: (alloc_link), (free_link):
2856 Use a memory pool for the links.
2858 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2860 * bus/connection.c: (bus_connection_foreach):
2862 Add new bus_connection_foreach function.
2864 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2865 Add function that broadcasts a message to all clients.
2867 (bus_driver_send_service_created), (bus_driver_handle_hello),
2868 (bus_driver_send_welcome_message),
2869 (bus_driver_handle_list_services), (bus_driver_message_handler):
2870 Implement functions that take care of listing services, and notifying
2871 clients when new services are created.
2873 * bus/services.c: (bus_services_list):
2875 Add new function that returns an array of strings with the currently
2876 registered services.
2879 * glib/dbus-gmain.c:
2880 Update copyright year.
2882 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2884 * dbus/dbus-connection.c: (dbus_connection_send_message):
2885 Unlock the message in case it was sent earlier.
2887 (dbus_connection_send_message_with_reply_and_block):
2888 Remove the reply message from the list.
2890 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2891 Set array_len and new_pos correctly.
2893 (_dbus_marshal_test):
2894 Remove debug output.
2896 * dbus/dbus-message-internal.h:
2897 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2898 New function that returns the reply serial.
2900 (_dbus_message_unlock):
2901 New function that unlocks a message and resets its header.
2903 (dbus_message_append_string_array),
2904 (dbus_message_get_fields_valist),
2905 (dbus_message_iter_get_field_type),
2906 (dbus_message_iter_get_string_array),
2907 (dbus_message_get_fields),
2908 (dbus_message_append_fields_valist):
2909 Handle string arrays.
2911 (dbus_message_set_sender):
2912 Make this function public since the bus daemon needs it.
2914 (decode_header_data):
2915 Set the reply serial to -1 initially.
2917 * dbus/dbus-message.h:
2918 Add dbus_message_set_sender.
2920 2003-01-24 Havoc Pennington <hp@pobox.com>
2922 * doc/dbus-specification.sgml: add some stuff
2924 2003-01-22 Havoc Pennington <hp@pobox.com>
2926 * doc/dbus-specification.sgml: Start to document the protocol.
2928 2003-01-22 Havoc Pennington <hp@pobox.com>
2930 * dbus/dbus-connection.c
2931 (dbus_connection_send_message_with_reply_and_block): add some @todo
2933 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2935 2003-01-21 Havoc Pennington <hp@pobox.com>
2937 (patch untested because can't compile)
2939 * bus/driver.c (create_unique_client_name): make this function
2940 never recycle client names. Also, caller should initialize
2943 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2945 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2947 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2948 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2949 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2950 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2951 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2952 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2953 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2954 * dbus/dbus-marshal.h:
2955 * dbus/dbus-protocol.h:
2956 Add support for marshalling and demarshalling integer, double
2959 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2964 * bus/connection.c: (connection_disconnect_handler):
2965 Remove the connection from the bus driver's list.
2967 (connection_watch_callback): Dispatch messages.
2969 (free_connection_data): Free connection name.
2971 (bus_connection_setup): Add connection to the bus driver's list.
2972 (bus_connection_remove_owned_service):
2973 (bus_connection_set_name), (bus_connection_get_name):
2974 Add functions for setting and getting the connection's name.
2977 Add function headers.
2979 * bus/driver.c: (create_unique_client_name),
2980 (bus_driver_handle_hello_message),
2981 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2982 (bus_driver_add_connection), (bus_driver_remove_connection):
2985 * bus/services.c: (bus_service_free):
2987 New file that handles communication and registreation with the bus
2990 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2992 * dbus/dbus-connection.c: (dbus_connection_send_message):
2993 Add a new client_serial parameter.
2995 (dbus_connection_send_message_with_reply):
2996 Remove a @todo since we've implemented the blocking function.
2998 (dbus_connection_send_message_with_reply_and_block):
2999 New function that sends a message and waits for a reply and
3000 then returns the reply.
3002 * dbus/dbus-connection.h:
3005 * dbus/dbus-errors.c: (dbus_result_to_string):
3006 * dbus/dbus-errors.h:
3007 Add new DBUS_RESULT.
3009 * dbus/dbus-message-internal.h:
3010 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3011 (_dbus_message_set_sender), (dbus_message_write_header),
3012 (dbus_message_new_reply), (decode_header_data),
3013 (_dbus_message_loader_return_buffer), (_dbus_message_test):
3014 * dbus/dbus-message.h:
3015 Add new functions that set the reply serial and sender.
3016 Also marshal and demarshal them correctly and add test.
3018 * dbus/dbus-protocol.h:
3019 Add new DBUS_MESSAGE_TYPE_SENDER.
3022 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3023 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3024 (dbus_connection_hookup_with_g_main):
3025 * glib/test-dbus-glib.c: (main):
3026 Rewrite to use GIOChannel and remove the GSource crack.
3028 * test/echo-client.c: (main):
3029 * test/watch.c: (check_messages):
3030 Update for changed APIs
3032 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3034 * dbus/Makefile.am: Add dbus-timeout.[cħ]
3036 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3037 Create a DBusTimeoutList.
3038 (dbus_connection_set_timeout_functions): Add new function to
3039 set timeout callbacks
3041 * dbus/dbus-connection.h: Add public DBusTimeout API.
3043 * dbus/dbus-message.c: (dbus_message_get_service):
3044 * dbus/dbus-message.h: New function.
3046 * dbus/dbus-server.c: Fix small doc typo.
3048 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
3050 2003-01-19 Anders Carlsson <andersca@codefactory.se>
3052 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
3053 of the string, just as long as specified.
3055 2003-01-19 Havoc Pennington <hp@pobox.com>
3057 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
3060 * dbus/dbus-server.c (dbus_server_set_max_connections)
3061 (dbus_server_get_max_connections, dbus_server_get_n_connections):
3062 keep track of current number of connections, and add API for
3063 setting a max (but haven't implemented enforcing the max yet)
3065 2003-01-18 Havoc Pennington <hp@pobox.com>
3067 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
3068 reading/writing if read_watch != NULL or write_watch != NULL.
3070 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
3071 the message loader code to actually load message->header and
3072 message->body into the newly-created message.
3074 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
3077 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
3078 (dbus_connection_get_max_message_size)
3079 (dbus_connection_set_max_live_messages_size)
3080 (dbus_connection_get_max_live_messages_size): implement some
3081 resource limitation functions
3083 * dbus/dbus-resources.c: new file implementing some of the
3084 resource limits stuff
3086 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
3087 missing docs, add @todo to handle OOM etc.
3089 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
3092 2003-01-18 Havoc Pennington <hp@pobox.com>
3094 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
3095 connection if it hasn't been already.
3097 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
3098 replace with DisconnectFunction.
3100 2003-01-18 Havoc Pennington <hp@pobox.com>
3102 Building --disable-verbose-mode --disable-asserts --disable-tests
3103 cuts the library from 112K to 45K or so
3105 * configure.in: check for varargs macro support,
3106 add --enable-verbose-mode, --enable-asserts.
3108 * dbus/dbus-internals.h (_dbus_assert): support
3110 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3112 2003-01-18 Havoc Pennington <hp@pobox.com>
3114 * dbus/dbus-test.c: include config.h so that tests actually run
3116 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3117 so the failure mode when that assumption fails will be plenty
3120 2003-01-18 Havoc Pennington <hp@pobox.com>
3122 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3124 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3127 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3128 since we don't want to use those in make check
3130 2003-01-15 Havoc Pennington <hp@redhat.com>
3136 2003-01-15 Havoc Pennington <hp@redhat.com>
3138 * test/Makefile.am: fix so that test source code ends up in the
3139 distribution on make distcheck
3141 2003-01-15 Havoc Pennington <hp@redhat.com>
3147 2003-01-15 Havoc Pennington <hp@redhat.com>
3149 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3150 fix build when --disable-tests
3152 * Makefile.am (EXTRA_DIST): put HACKING in here
3154 * HACKING: document procedure for making a tarball release.
3156 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3158 * bus/connection.c: (connection_error_handler),
3159 (bus_connection_setup):
3160 * bus/main.c: (main):
3161 Make sure that the DBusConnectionData struct is NULLed
3162 out to prevent a segfault.
3164 * dbus/dbus-errors.c: (dbus_result_to_string):
3165 * dbus/dbus-errors.h:
3166 * dbus/dbus-message.c: (dbus_message_get_fields),
3167 (dbus_message_get_fields_valist), (_dbus_message_test):
3168 * dbus/dbus-message.h:
3169 Make dbus_message_get_fields return a result code so we can
3170 track invalid fields as well as oom.
3172 2003-01-11 Havoc Pennington <hp@pobox.com>
3174 * configure.in: change --enable-test/--enable-ansi action-if-given
3175 to enable_foo=$enableval instead of enable_foo=yes
3177 2003-01-08 Havoc Pennington <hp@pobox.com>
3179 * dbus/dbus-string.c (_dbus_string_align_length): new function
3181 * dbus/dbus-test-main.c: move main() for test app here
3183 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3184 symbol to run tests, because dbus-test isn't in the main
3187 Code review nitpicks.
3189 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3190 for people with narrow emacs ;-). Assert client_serial was filled
3191 in. Assert message->name != NULL.
3192 (dbus_message_append_fields): have "first_field_type" arg separate
3193 from va list, needed for C++ binding that also uses varargs IIRC
3194 and helps with type safety
3195 (dbus_message_new): add @todo about using DBusString to store
3196 service/name internally
3197 (dbus_message_new): don't leak ->service and ->name on OOM later
3199 (dbus_message_unref): free the service name
3200 (dbus_message_get_fields): same change to varargs
3201 i.e. first_field_type
3202 (_dbus_message_loader_return_buffer): assert that the message data
3203 is aligned (if not it's a bug in our code). Put in verbose griping
3204 about why we set corrupted = TRUE.
3205 (decode_header_data): add FIXME that char* is evil. Was going to
3206 add FIXME about evil locale-specific string.h strncmp, but just
3207 switched to wacky string-as-uint32 optimization. Move check for
3208 "no room for field name" above get_const_data_len() to avoid
3209 assertion failure in get_const_data_len if we have trailing 2
3210 bytes or the like. Check for service and name fields being
3211 provided twice. Don't leak service/name on error. Require field
3212 names to be aligned to 4 bytes.
3214 * dbus/dbus-marshal.c: move byte swap stuff to header
3215 (_dbus_pack_int32): uscore-prefix
3216 (_dbus_unpack_int32): uscore-prefix
3217 (_dbus_unpack_uint32): export
3218 (_dbus_demarshal_string): add @todo complaining about use of
3220 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3221 handling allowing corrupt data to go unchecked
3223 2003-01-08 Havoc Pennington <hp@redhat.com>
3225 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3226 to the select() as needed for authentication. (should be using
3227 _dbus_poll() not select, but for another day)
3229 * dbus/dbus.h: include dbus/dbus-protocol.h
3231 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3233 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3236 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3238 * dbus/dbus-internals.c: (_dbus_type_to_string):
3239 New function that returns a string describing a type.
3241 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3242 * dbus/dbus-marshal.h:
3243 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3244 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3245 (dbus_message_iter_get_byte_array):
3246 * dbus/dbus-message.h:
3247 Add new convenience functions for appending and getting message fields.
3248 Also add demarshalling routines for byte arrays.
3250 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3252 * dbus/dbus-connection-internal.h:
3253 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3254 (_dbus_connection_get_next_client_serial),
3255 (dbus_connection_send_message):
3256 * dbus/dbus-internals.h:
3257 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3258 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3259 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3260 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3261 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3262 (_dbus_verbose_bytes), (_dbus_marshal_test):
3263 * dbus/dbus-marshal.h:
3264 * dbus/dbus-message-internal.h:
3265 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3266 (dbus_message_write_header), (_dbus_message_lock),
3267 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3268 (dbus_message_get_name), (dbus_message_append_int32),
3269 (dbus_message_append_uint32), (dbus_message_append_double),
3270 (dbus_message_append_string), (dbus_message_append_byte_array),
3271 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3272 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3273 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3274 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3275 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3276 (decode_header_data), (_dbus_message_loader_return_buffer),
3277 (message_iter_test), (_dbus_message_test):
3278 * dbus/dbus-message.h:
3279 * dbus/dbus-protocol.h:
3280 * dbus/dbus-test.c: (main):
3282 * glib/test-dbus-glib.c: (message_handler), (main):
3283 * test/echo-client.c: (main):
3284 * test/watch.c: (check_messages):
3285 Make messages sendable and receivable for real.
3287 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3289 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3290 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3291 * dbus/dbus-message.c: (dbus_message_append_int32),
3292 (dbus_message_append_uint32), (dbus_message_append_double),
3293 (dbus_message_append_string), (dbus_message_append_byte_array):
3294 Handle OOM restoration.
3296 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3298 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3299 (_dbus_demarshal_string), (_dbus_marshal_test):
3300 * dbus/dbus-marshal.h:
3301 * dbus/dbus-message.c: (dbus_message_get_name),
3302 Document these functions.
3304 (dbus_message_append_int32), (dbus_message_append_uint32),
3305 (dbus_message_append_double), (dbus_message_append_string),
3306 (dbus_message_append_byte_array):
3307 * dbus/dbus-message.h:
3308 Add functions for adding message fields of different types.
3310 * dbus/dbus-protocol.h:
3311 Add the different types.
3313 2003-01-05 Havoc Pennington <hp@pobox.com>
3315 * bus/connection.c: implement routines for handling connections,
3316 first thing is keeping a list of owned services on each connection
3317 and setting up watches etc.
3319 * bus/services.c: implement a mapping from service names to lists
3322 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3324 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3325 to use static mutexes for global data
3327 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3328 collection of functions to set/get application-specific data
3329 on the DBusConnection.
3331 2003-01-04 Havoc Pennington <hp@pobox.com>
3333 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3334 (_dbus_poll): new function
3336 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3339 * bus/loop.c: initial code for the daemon main loop
3341 2003-01-04 Havoc Pennington <hp@pobox.com>
3343 * test/watch.c (error_handler): make it safe if the error handler
3344 is called multiple times (if we s/error handler/disconnect
3345 handler/ we should just guarantee it's called only once)
3347 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3348 error handler on disconnect (it's quite possible we should
3349 just change the error handler to a "disconnect handler," I'm
3350 not sure we have any other meaningful errors)
3352 * configure.in: check for getpwnam_r
3354 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3355 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3356 mechanism as in SASL spec, using socket credentials
3358 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3359 (_dbus_send_credentials_unix_socket): new function
3361 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3363 (_dbus_write): only check errno if <0 returned
3364 (_dbus_write_two): ditto
3366 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3368 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3369 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3370 (_dbus_marshal_test):
3371 * dbus/dbus-marshal.h:
3372 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3373 to _dbus_marshal_utf8_string. Also fix some tests.
3375 2002-12-28 Harri Porten <porten@kde.org>
3377 * configure.in: added check for C++ compiler and a very cheesy
3378 check for the Qt integration
3380 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3382 * qt/Makefile.am: added
3384 * qt/.cvsignore: added
3386 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3387 latter, added #ifdef QT_THREAD_SUPPORT guard.
3389 * dbus/Makefile.am: added missing headers for make dist
3391 2002-12-28 Kristian Rietveld <kris@gtk.org>
3393 * dbus/Makefile.am: fixup export-symbols-regex.
3395 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3397 * acinclude.m4: Add this file and put the
3398 PKG_CHECK_MODULE macro in it.
3400 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3402 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3403 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3404 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3405 (_dbus_marshal_test):
3406 Make the demarshalling routines align the pos argument.
3407 Add string marshalling tests and fix the obvious bugs
3410 2002-12-26 Havoc Pennington <hp@pobox.com>
3412 * dbus/dbus-auth.c: fixes fixes fixes
3414 * dbus/dbus-transport-unix.c: wire up support for
3415 encoding/decoding data on the wire
3417 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3418 (_dbus_auth_decode_data): append to target string
3419 instead of nuking it.
3421 2002-12-26 Havoc Pennington <hp@pobox.com>
3423 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3424 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3427 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3428 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3429 now). Main point is because I wanted unpack_uint32 to implement
3431 (_dbus_verbose_bytes): new function
3433 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3435 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3436 mechanism to handle a corrupt message stream
3437 (_dbus_message_loader_new): fix preallocation to only prealloc,
3440 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3441 (_dbus_string_test): enhance tests for copy/move and fix the
3444 * dbus/dbus-transport-unix.c: Hold references in more places to
3445 avoid reentrancy problems
3447 * dbus/dbus-transport.c: ditto
3449 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3450 leak reference count in no-message case
3452 * test/watch.c (do_mainloop): handle adding/removing watches
3453 during iteration over the watches. Also, ref the connection/server
3454 stored on a watch, so we don't try to mangle a destroyed one.
3456 * dbus/dbus-transport-unix.c (do_authentication): perform
3459 * dbus/dbus-auth.c (get_state): add a state
3460 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3461 (_dbus_auth_get_unused_bytes): append the unused bytes
3462 to the passed in string, rather than prepend
3464 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3465 the auth conversation DBusAuth
3467 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3468 (_dbus_transport_new_for_domain_socket): when creating a
3469 transport, pass in whether it's a client-side or server-side
3470 transport so we know which DBusAuth to create
3472 2002-12-03 Havoc Pennington <hp@pobox.com>
3474 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3475 _after_ finalizing the derived members
3476 (unix_connection_set): unref watch if we fail to add it
3478 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3479 transport first, so that the connection owned by the
3480 transport will be valid as the transport finalizes.
3482 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3483 if necessary, and remove watches from the connection.
3485 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3487 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3489 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3490 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3491 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3492 (_dbus_marshal_test):
3493 * dbus/dbus-marshal.h:
3494 Add string marshal functions and have the demarshal functions
3495 return the new position.
3497 2002-12-25 Havoc Pennington <hp@pobox.com>
3499 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3500 it is a simple protocol that just maps directly to SASL.
3502 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3503 initial implementation, not actually used yet.
3505 * dbus/dbus-string.c (_dbus_string_find): new function
3506 (_dbus_string_equal): new function
3507 (_dbus_string_base64_encode): new function
3508 (_dbus_string_base64_decode): new function
3510 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3513 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3514 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3515 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3516 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3517 * dbus/dbus-marshal.h:
3518 * dbus/dbus-protocol.h:
3519 * dbus/dbus-test.c: (main):
3521 Add un-optimized marshalling/demarshalling routines.
3523 2002-12-25 Harri Porten <porten@kde.org>
3525 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3527 2002-12-24 Zack Rusin <zack@kde.org>
3529 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3530 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3533 2002-12-24 Havoc Pennington <hp@pobox.com>
3535 * glib/dbus-gthread.c: fix include
3537 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3538 I think glib API needs to change, though, as you don't
3539 want to use DBusMessageFunction, you want to use the
3540 DBusMessageHandler object. Probably
3541 dbus_connection_open_with_g_main_loop()
3542 and dbus_connection_setup_g_main_loop() or something like that
3543 (but think of better names...) that just create a connection
3544 that has watch/timeout functions etc. already set up.
3546 * dbus/dbus-connection.c
3547 (dbus_connection_send_message_with_reply): new function just to
3548 show how the message handler helps us deal with replies.
3550 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3552 * dbus/dbus-string.c (_dbus_string_test): free a string that
3555 * dbus/dbus-hash.c: use memory pools for the hash entries
3556 (rebuild_table): be more paranoid about overflow, and
3557 shrink table when we can
3558 (_dbus_hash_test): reduce number of sprintfs and write
3559 valid C89. Add tests for case where we grow and then
3560 shrink the hash table.
3562 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3564 * dbus/dbus-connection.c (dbus_connection_register_handler)
3565 (dbus_connection_unregister_handler): new functions
3567 * dbus/dbus-message.c (dbus_message_get_name): new
3569 * dbus/dbus-list.c: fix docs typo
3571 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3572 an object representing a handler for messages.
3574 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3577 * glib/dbus-gthread.c: (dbus_gthread_init):
3578 Don't use the gdbus prefix for public functions.
3580 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3584 Add GLib checks and fixup .pc files
3588 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3589 (gdbus_connection_check), (gdbus_connection_dispatch),
3590 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3591 (dbus_connection_gsource_new):
3592 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3593 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3594 * glib/test-dbus-glib.c: (message_handler), (main):
3597 2002-12-15 Harri Porten <porten@kde.org>
3599 * autogen.sh: check for libtoolize before attempting to use it
3601 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3604 * .cvsignore: ignore more stamp files
3606 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3608 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3609 without make install.
3611 2002-12-15 Havoc Pennington <hp@pobox.com>
3613 * dbus/dbus-threads.c: add thread stubs that a higher library
3614 layer can fill in. e.g. the GLib wrapper might fill them in with
3615 GThread stuff. We still need to use this thread API to
3616 thread-safe-ize the library.
3618 2002-12-12 Havoc Pennington <hp@pobox.com>
3620 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3621 below new interfaces and include fewer system headers.
3623 * dbus/dbus-sysdeps.c (_dbus_read): new function
3624 (_dbus_write): new function
3625 (_dbus_write_two): new function
3626 (_dbus_connect_unix_socket): new function
3627 (_dbus_listen_unix_socket): new function
3629 * dbus/dbus-message-internal.h: change interfaces to use
3632 2002-12-11 Havoc Pennington <hp@pobox.com>
3634 * dbus/dbus-types.h: add dbus_unichar
3636 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3638 * dbus/dbus-connection.c (dbus_connection_send_message): return
3641 * dbus/dbus-transport.c: include dbus-watch.h
3643 * dbus/dbus-connection.c: include dbus-message-internal.h
3645 * HACKING: add file with coding guidelines stuff.
3647 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3648 handling here, for security purposes (as in vsftpd). Not actually
3649 using this class yet.
3651 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3652 system/libc usage here, as in vsftpd, for ease of auditing (and
3653 should also simplify portability). Haven't actually moved all the
3654 system/libc usage into here yet.
3656 2002-11-25 Havoc Pennington <hp@pobox.com>
3658 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3659 always print the first verbose message.
3661 2002-11-24 Havoc Pennington <hp@pobox.com>
3663 * test/echo-client.c, test/echo-server.c: cheesy test
3666 * configure.in (AC_CHECK_FUNCS): check for writev
3668 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3671 * dbus/dbus-list.c (_dbus_list_foreach): new function
3673 * dbus/dbus-internals.c (_dbus_verbose): new function
3675 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3676 representing a server that listens for connections.
3678 * dbus/.cvsignore: create
3680 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3681 public API for reporting errors
3683 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3684 public object representing a connection that
3685 sends/receives messages. (Same object used for
3686 both client and server.)
3688 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3689 Basic abstraction for different kinds of stream
3690 that we might read/write messages from.
3692 2002-11-23 Havoc Pennington <hp@pobox.com>
3694 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3697 * dbus/dbus-test.c (main): add list test, and include
3698 dbus-test.h as intended
3700 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3701 (_dbus_hash_table_remove_int): return value indicates
3702 whether the entry existed to remove
3704 * dbus/dbus-list.c: add linked list utility class,
3707 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3710 2002-11-23 Havoc Pennington <hp@pobox.com>
3712 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3713 DBUS_END_DECLS to nothing, that should fix this once and for all
3715 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3717 * dbus/dbus-message.c, dbus/dbus-hash.c:
3718 add some missing @brief
3720 2002-11-23 Havoc Pennington <hp@pobox.com>
3722 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3723 to avoid confusing Doxygen
3725 * dbus/dbus-hash.c: @} not }@
3727 * dbus/dbus-message.c (struct DBusMessage): split out
3730 2002-11-23 Havoc Pennington <hp@pobox.com>
3732 * configure.in: pile on more warning flags if using gcc
3734 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3735 to document static functions
3737 * configure.in: add summary to end of configure so it
3738 looks nice and attractive
3740 * dbus/dbus-hash.c: finish implementation and write unit
3743 * configure.in: add --enable-tests to enable unit tests
3745 * dbus/dbus-test.c: test program to run unit tests
3746 for all files in dbus/*, initially runs a test for
3749 * dbus/dbus-internals.h: file to hold some internal utility stuff
3751 2002-11-22 Havoc Pennington <hp@redhat.com>
3753 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3754 "ported" away from Tcl
3756 * dbus/dbus-types.h: header for types such as dbus_bool_t
3758 2002-11-22 Havoc Pennington <hp@redhat.com>
3760 * dbus/dbus.h: fixups for doc warnings
3762 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3764 (QUIET): make it quiet so we can see warnings
3766 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3768 2002-11-22 Havoc Pennington <hp@redhat.com>
3770 * Makefile.am: include "Doxyfile" target in all-local
3772 * configure.in: generate the Doxyfile
3774 * Doxyfile.in: move Doxyfile here, so we can use
3775 configure to generate a Doxyfile with the right
3778 2002-11-22 Havoc Pennington <hp@redhat.com>
3780 * dbus/dbus-message.c: move inline docs into .c file
3782 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3783 so all docs are under doc/
3784 (MAN_EXTENSION): generate man pages. Use extension
3785 ".3dbus" which matches ".3qt" on my system,
3786 I guess this is OK, I don't know really.
3787 (FILE_PATTERNS): look for .c files not .h, makes sense
3790 2002-11-22 Havoc Pennington <hp@pobox.com>
3792 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3793 because any app can be a server, and any app can be a client,
3794 the bus is a special kind of server.
3796 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3798 * Doxyfile : adding. Still needs Makefile rules to be generated
3799 automatically (just run "doxygen" in the toplevel dir for now to
3802 * dbus/dbus-message.h : Adding sample docs (javadoc since
3803 resembles gtk-doc a little more)
3805 * dbus/dbus.h : Adding sample docs
3807 2002-11-21 Havoc Pennington <hp@redhat.com>
3809 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3810 so we can allow ourselves to include files directly,
3811 instead of having to use dbus.h
3813 * dbus/dbus.h: fill in
3815 * dbus/dbus-message.h: sketch out a sample header file.
3816 Include griping if you include it directly instead of
3819 * dbus/dbus-macros.h: new file with macros for extern "C",
3820 TRUE/FALSE, NULL, etc.
3822 * doc/file-boilerplate.c: put include guards in here
3824 2002-11-21 Havoc Pennington <hp@redhat.com>
3826 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3828 * COPYING: include the GPL as well, and license code
3829 under both AFL and GPL.
3831 2002-11-21 Havoc Pennington <hp@redhat.com>
3833 * acconfig.h: get rid of this
3835 * autogen.sh (run_configure): add --no-configure option
3837 * configure.in: remove AC_ARG_PROGRAM to make
3838 autoconf complain less. add AC_PREREQ.
3839 add AC_DEFINE third arg.
3841 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3844 Fix references so we can distcheck.
3846 2002-11-21 Havoc Pennington <hp@redhat.com>
3848 * Initial module creation