1 2003-04-06 Havoc Pennington <hp@pobox.com>
3 * test/Makefile.am: remove a lot of stuff that isn't immediately
4 useful, it's in CVS history if we want it.
6 * test/test-service.c: use dbus-mainloop instead of that
9 2003-04-06 Havoc Pennington <hp@pobox.com>
11 * dbus/Makefile.am: split lists of sources into stuff that goes in
12 the library, util functions that go in the lib and are also used
13 elsewhere, and util functions that are used in tests/daemon but
16 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
17 here so it can be used in test binaries also
19 2003-04-06 Havoc Pennington <hp@pobox.com>
21 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
22 here in the parent process, so we can return an error if it
23 fails. Also, move some of the code into the child so the parent
24 is less hosed if we fail midway through.
26 * bus/bus.c (bus_context_new): move pidfile detection further up
27 in the function, before we start overwriting sockets and such.
29 * bus/messagebus.in: adjust this a bit, not sure if it will work.
31 * configure.in: add --with-system-pid-file and --with-system-socket
33 2003-04-06 Colin Walters <walters@verbum.org>
35 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
37 * bus/system.conf.in: Declare a pidfile.
39 * bus/bus.c (bus_context_new): Test for an existing pid file, and
40 create one (if appropriate).
42 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
43 (struct BusConfigParser) [pidfile]: New.
44 (element_type_to_name, merge_included, start_busconfig_child)
45 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
46 (bus_config_parser_unref): Free it.
47 (bus_config_parser_get_pidfile): New function.
49 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
51 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
53 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
55 * dbus/dbus-sysdeps.h: Prototype it.
57 2003-04-06 Havoc Pennington <hp@pobox.com>
59 * bus/bus.c (bus_context_new): print the address in here, rather
60 than in main(), because we need to do it before forking the daemon
62 * bus/dispatch.c (send_service_nonexistent_error): set the sender
63 on the service nonexistent error
65 * bus/driver.c (bus_driver_handle_acquire_service): set the
66 sender on the AcquireService reply
68 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
69 server also listen on a UNIX socket so services can connect to it.
71 2003-04-06 Havoc Pennington <hp@pobox.com>
73 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
74 so it detects deadlocks and also we actually init threads when
77 2003-04-06 Havoc Pennington <hp@pobox.com>
79 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
80 save the domain socket name, and unlink it when we disconnect the
81 server. Means that at least when we exit normally, we won't leave
82 a bunch of junk in /tmp
84 * dbus/dbus-transport-unix.c
85 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
86 memory management). (I was making a real change here but then
89 2003-04-06 Havoc Pennington <hp@pobox.com>
91 * bus/bus.c (bus_context_new): fix wrong handling of
92 server_data_slot_unref() in the error case.
94 * dbus/dbus-internals.h (_dbus_assert): change so it passes
95 "(condition) != 0" to _dbus_real_assert so that
96 "_dbus_assert (pointer)" doesn't cause a warning
98 * bus/main.c (main): accept --print-address option to print out
99 the message bus address
101 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
103 * dbus/dbus-transport.c (_dbus_transport_open): special error for
104 "tmpdir" option to unix: address on client side
106 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
109 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
110 we can use to create sockets in the test suite.
112 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
113 cleanly. To be used for testing.
115 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
117 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
119 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
120 handle trying to call this when there's no servers active
122 2003-04-05 Havoc Pennington <hp@pobox.com>
128 2003-04-05 Havoc Pennington <hp@pobox.com>
130 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
131 crash on startup. Need to get "try starting the daemon"
132 in the test suite I guess. ;-)
134 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
135 tracked the number of open connections; it's better done in
136 application-specific code as you want it to span all servers etc.
138 2003-04-05 Havoc Pennington <hp@pobox.com>
140 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
141 patch from Colin Walters
143 2003-04-05 Havoc Pennington <hp@pobox.com>
145 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
146 reality; in fact multiple mechanisms are allowed.
148 * dbus/dbus-internals.c (_dbus_real_assert)
149 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
150 _dbus_assert_not_reached() into functions, so that they don't show
151 up in basic block counts for test coverage, and don't use up as
152 much disk space. Does mean slower execution speed though, so
153 assumes --disable-asserts is the normal production case.
155 2003-04-05 Havoc Pennington <hp@pobox.com>
157 * test/Makefile.am (dist-hook): also dist *.in files
163 2003-04-05 Havoc Pennington <hp@pobox.com>
165 * dbus/dbus-string.c: docs warning
167 * dbus/dbus-spawn.c: missing docs
169 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
171 2003-04-05 Havoc Pennington <hp@pobox.com>
173 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
176 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
177 to -1 once we've reaped the babysitter
178 (_dbus_babysitter_handle_watch): do as much work as we can, not
181 * bus/activation.c: add code using DBusBabysitter so that we
182 handle it when a service fails to start up properly.
183 (bus_activation_service_created): don't remove the activation
184 entries as we go, just let them get removed when we free the pending
185 activation. Unref reply messages after sending them.
187 2003-04-05 Havoc Pennington <hp@pobox.com>
189 * test/decode-gcov.c (main): print per-directory stats in the report
191 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
193 2003-04-05 Havoc Pennington <hp@pobox.com>
195 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
197 * test/decode-gcov.c: hack up a little program to suck data
198 out of gcov files. Yes this is sort of silly.
200 * configure.in: define something in config.h and do an
201 AM_CONDITIONAL when gcov is enabled
203 2003-04-04 Havoc Pennington <hp@redhat.com>
205 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
206 return a "babysitter" object that is used to monitor the status of
207 the spawned process and reap it when required.
209 * test/test-segfault.c, test/test-exit.c,
210 test/test-sleep-forever.c: binaries that do various lame things,
211 used in the test suite.
213 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
215 2003-04-03 Havoc Pennington <hp@pobox.com>
217 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
218 in preparation for modifying it, dbus-sysdeps is getting
221 2003-04-03 Havoc Pennington <hp@redhat.com>
223 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
226 * bus/*.[hc]: adapt to mainloop change
228 2003-04-03 Havoc Pennington <hp@redhat.com>
230 * bus/activation.c (load_directory): fix up memleaks
231 (bus_activation_entry_free): free the entry
233 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
234 we get one from the message bus; fix memleaks.
236 * dbus/dbus-message.c (dbus_set_error_from_message): new function
238 2003-04-03 Havoc Pennington <hp@pobox.com>
240 * bus/config-parser.c (bus_config_parser_unref): free
241 list of mechanisms, bug discovered by test suite enhancements
242 (putting system.conf and session.conf into suite)
244 * test/Makefile.am, test/test-service.c: add placeholder for a
245 test service that we'll activate as part of test suite. Doesn't
248 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
249 setting NULL value, and use system malloc not dbus_malloc()
250 when we have unavoidable memleakage.
252 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
253 didn't work, and support DBUS_BUS_ACTIVATION.
255 * bus/activation.c (child_setup): pass our well-known bus type to
258 * bus/config-parser.c: support <type> to specify well-known type
260 * doc/dbus-specification.sgml: document the env variables to
261 locate well-known buses and find service activator
263 2003-04-02 Havoc Pennington <hp@redhat.com>
265 * test/Makefile.am (all-local): add a rule to copy tests to
266 builddir, so we can have generated tests. Use this to remove the
267 silly hack for testing system.conf and session.conf. Will use this
268 shortly to generate .service files pointing to test binaries.
270 2003-04-02 Havoc Pennington <hp@redhat.com>
272 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
273 current alloc and needed new length, not max of the doubled
274 allocation and needed new length. Also, when building tests,
275 don't do the double-allocation stuff, just realloc every time.
277 2003-04-02 Havoc Pennington <hp@redhat.com>
279 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
281 (_dbus_string_get_dirname): new
282 (_dbus_sysdeps_test): new
283 (_dbus_directory_open): include dirnames in error messages
285 * bus/config-parser.c: interpret <include> and <includedir> and
286 <servicedir> relative to config file location if the given
287 filename is not absolute.
289 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
291 2003-04-02 Havoc Pennington <hp@redhat.com>
293 * bus/connection.c (bus_transaction_send_error_reply): set sender
294 service for the error, and unref the reply on success
296 * bus/activation.c: convert to use BusTransaction so OOM can be
298 (bus_activation_service_created): set sender of the message
300 2003-04-01 Havoc Pennington <hp@redhat.com>
302 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
303 <includedir> (at least mostly)
305 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
306 first, then the user ID
308 2003-04-01 Havoc Pennington <hp@pobox.com>
310 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
313 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
315 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
317 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
318 socket 0777, and unlink any existing socket.
320 * bus/bus.c (bus_context_new): change our UID/GID and fork if
321 the configuration file so specifies; set up auth mechanism
324 * bus/config-parser.c (bus_config_parser_content): add support
325 for <fork> option and fill in code for <auth>
327 * bus/system.conf.in: add <fork/> to default configuration,
328 and limit auth mechanisms to EXTERNAL
330 * doc/config-file.txt (Elements): add <fork>
332 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
333 (_dbus_change_identity): new function
335 2003-03-31 Havoc Pennington <hp@redhat.com>
337 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
338 (_dbus_listen_unix_socket): fix off-by-one error in null
339 termination spotted by Nalin
341 2003-03-31 Havoc Pennington <hp@redhat.com>
343 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
344 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
345 having a real home directory available.
347 2003-03-31 Havoc Pennington <hp@redhat.com>
349 * bus/Makefile.am (install-data-hook): create /var/run/dbus
351 * bus/messagebus.in: add init script for Red Hat /etc/init.d
353 * configure.in: add support for specifying a style of init script
356 2003-03-31 Havoc Pennington <hp@redhat.com>
358 Fix some annoying DBusString API and fix all affected code.
360 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
362 (_dbus_string_get_data): change to return string instead of using
364 (_dbus_string_get_const_data): ditto
365 (_dbus_string_get_data_len): ditto
366 (_dbus_string_get_const_data_len): ditto
368 2003-03-31 Havoc Pennington <hp@redhat.com>
370 * bus/main.c (main): fix up the command line arguments to be nicer
372 2003-03-31 Havoc Pennington <hp@redhat.com>
374 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
375 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
376 final location that lands in the config file
378 * bus/config-loader-expat.c (bus_config_load): fix type of
381 * doc/TODO: remove TODO item for dbus_bus_get()
383 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
385 2003-03-31 Havoc Pennington <hp@pobox.com>
387 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
388 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
389 argument since they are always client side
391 * dbus/dbus-server.c (dbus_server_get_address): new function
393 * bus/main.c (main): take the configuration file as an argument.
395 * test/data/valid-config-files/debug-allow-all.conf: new file to
396 use with dispatch.c tests for example
398 * bus/test-main.c (main): require test data dir
400 * bus/bus.c (bus_context_new): change this to take a
401 configuration file name as argument
403 * doc/config-file.txt (Elements): add <servicedir>
405 * bus/system.conf, bus/session.conf: new files
407 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
408 well-known socket if none set
410 * configure.in: create system.conf and session.conf
412 2003-03-30 Havoc Pennington <hp@pobox.com>
414 * bus/config-parser.c: hacking
416 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
417 to shut down, since it could cause weirdness with the DBusList
420 * dbus/dbus-list.c (_dbus_list_test): add tests for the
421 link-oriented stack routines
422 (alloc_link): free the mempool if the first alloc from it fails
424 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
426 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
428 (_dbus_string_skip_white): new
430 * doc/config-file.txt (Elements): add <includedir>
432 2003-03-28 Havoc Pennington <hp@pobox.com>
434 * dbus/dbus-string.c (_dbus_string_copy_data_len)
435 (_dbus_string_copy_data): new functions
437 2003-03-28 Anders Carlsson <andersca@codefactory.se>
439 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
443 * dbus/dbus-memory.c:
446 2003-03-28 Havoc Pennington <hp@pobox.com>
448 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
449 I think it may have just been superstition. Not sure.
451 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
452 failures that were not being handled.
454 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
456 * dbus/dbus-memory.c: add ability to set number of mallocs in a
457 row that will fail on out-of-memory.
459 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
460 function for testing out-of-memory handling.
462 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
463 allocation functions, they do map exactly to the expat ones.
465 2003-03-27 Havoc Pennington <hp@redhat.com>
467 * bus/config-loader-libxml.c (bus_config_load): add another error
470 2003-03-26 Anders Carlsson <andersca@codefactory.se>
473 Add note about automatic service activation.
475 * doc/dbus-specification.sgml:
476 Rename the specification and clarify a few things.
478 2003-03-26 Anders Carlsson <andersca@codefactory.se>
481 * dbus/dbus-address.c:
483 * dbus/dbus-marshal.c:
484 * dbus/dbus-server-debug-pipe.c:
485 * dbus/dbus-transport-unix.c:
486 Fix documentation warnings.
488 2003-03-26 Havoc Pennington <hp@pobox.com>
490 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
491 after every test so it's quick and easy to see which leaked, and
492 so we test multiple dbus_shutdown() calls
494 * configure.in: change configure.in XML stuff to also support
497 * config-loader-libxml.c: some hacking
499 * config-loader-expat.c: some hacking
501 * config-parser.c: some hacking, plus tests
503 2003-03-25 Havoc Pennington <hp@redhat.com>
505 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
507 * configure.in: add --with-xml option to specify XML library,
508 right now only libxml is supported.
510 * bus/config-loader-libxml.c, config-parser.c: sync some minor
511 nonworking code between home and work, still just stubs
513 2003-03-24 Havoc Pennington <hp@redhat.com>
515 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
518 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
519 NULL argument for "message" if the error is a well-known one,
520 fill in a generic message in this case.
522 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
525 * bus/test.c (bus_test_flush_bus): add
527 * bus/policy.c (bus_policy_test): test code stub
529 2003-03-24 Havoc Pennington <hp@pobox.com>
531 * bus/connection.c (bus_connections_setup_connection): set up
532 the "can this user connect" function, but it always returns
533 TRUE until we have a config file parser so we can have a config
534 file that allows connections.
536 2003-03-23 Havoc Pennington <hp@pobox.com>
538 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
539 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
540 the mutex, so we can check for proper memory management
543 * dbus/dbus-dataslot.c: remove the mutex from
544 DBusDataSlotAllocator and lock it manually when using it,
545 to simplify fitting it into the global slots framework.
547 * dbus/dbus-threads.c (init_static_locks): rework how we're
548 handling global locks so they are easily shut down.
550 * bus/policy.c (bus_policy_append_rule): fix
552 * bus/test-main.c (main): check for memleaks
554 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
555 test suite check for memleaks
557 * dbus/dbus-memory.c: add support in test mode for tracking
558 number of outstanding blocks
560 2003-03-23 Havoc Pennington <hp@pobox.com>
562 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
565 * dbus/dbus-hash.h: add ULONG hash keys
567 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
568 (_dbus_get_group_id): new function
570 2003-03-20 Havoc Pennington <hp@redhat.com>
572 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
574 (dbus_connection_get_unix_user): new function
576 2003-03-20 Havoc Pennington <hp@pobox.com>
578 * bus/connection.c (bus_connection_send_oom_error): assert that
580 (connection_execute_transaction): ditto
581 (bus_connection_preallocate_oom_error): fix to set the sender, and
582 set recipient to the destination service, not the bus driver
584 * bus/policy.c: hacking
586 * dbus/dbus-message.c (dbus_message_service_is): new function
587 (dbus_message_sender_is): new
589 2003-03-19 Havoc Pennington <hp@redhat.com>
591 * bus/policy.c: start sketching code for policy restrictions on
592 what connections can do.
594 2003-03-18 Havoc Pennington <hp@redhat.com>
596 * doc/TODO: some notes on high-level todo items. Little nitpick
597 stuff is all in @todo, so no need to add it here.
599 * doc/config-file.txt: some notes on how config file might look
601 2003-03-18 Anders Carlsson <andersca@codefactory.se>
607 2003-03-17 Havoc Pennington <hp@redhat.com>
609 * dbus/dbus-internals.h: add gcc attributes so that
610 our printf-style functions warn on bad arguments to
613 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
616 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
619 2003-03-17 Havoc Pennington <hp@redhat.com>
621 * bus/test-main.c (main): make it print something as it runs
622 so make check doesn't look stuck
624 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
625 from CVS, now obsolete
627 2003-03-17 Anders Carlsson <andersca@codefactory.se>
629 * bus/dispatch.c: (bus_dispatch):
630 Refetch the service name since it may have been reallocated
631 when dbus_message_set_sender was called.
633 * dbus/dbus-sysdeps.c: (_dbus_accept):
634 Add address and address length variables and use them to stop
635 valgrind from complaining.
637 2003-03-17 Havoc Pennington <hp@pobox.com>
639 All tests pass, no memleaks, no valgrind complaints.
641 * bus/test.c: refcount handler_slot
643 * bus/connection.c (bus_connections_new): refcount
646 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
647 bytes so that auth scripts pass.
649 * bus/dispatch.c: init message_handler_slot so it gets allocated
652 * bus/dispatch.c (message_handler_slot_ref): fix memleak
654 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
655 dealloc server_pipe_hash when no longer used for benefit of
658 * dbus/dbus-auth.c (process_command): memleak fix
660 * bus/dispatch.c (check_hello_message): memleak fix
662 2003-03-16 Havoc Pennington <hp@pobox.com>
664 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
666 2003-03-17 Anders Carlsson <andersca@codefactory.se>
668 * bus/activation.c (bus_activation_activate_service): Append
669 the pending activation entry to the list of pending activations.
671 2003-03-16 Havoc Pennington <hp@pobox.com>
673 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
676 * dbus/dbus-address.c (create_entry): fix OOM handling when
677 failing to alloc entry->method
679 2003-03-16 Havoc Pennington <hp@pobox.com>
681 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
684 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
685 add some missing dbus_set_result
687 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
688 alloc the DBusMessageHandler
690 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
691 the transport here, since we call this from the finalizer; it
692 resulted in a double-finalize.
694 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
695 where we tried to use transport->connection that was NULL,
696 happened when transport was disconnected early on due to OOM
698 * bus/*.c: adapt to handle OOM for watches/timeouts
700 * dbus/dbus-transport-unix.c: port to handle OOM during
703 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
704 reference to unused bytes instead of a copy
706 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
709 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
712 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
715 2003-03-16 Anders Carlsson <andersca@codefactory.se>
717 * doc/dbus-specification.sgml:
718 Document reply message for ActivateService.
720 2003-03-16 Anders Carlsson <andersca@codefactory.se>
722 * bus/activation.c: (bus_pending_activation_entry_free),
723 (bus_pending_activation_free), (bus_activation_new),
724 (bus_activation_unref), (bus_activation_service_created),
725 (bus_activation_activate_service):
727 * bus/bus.c: (bus_context_new):
728 * bus/desktop-file.c: (new_section):
729 * bus/driver.c: (bus_driver_send_service_deleted),
730 (bus_driver_handle_activate_service):
731 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
733 * dbus/dbus-connection.c:
734 (dbus_connection_send_with_reply_and_block):
735 * dbus/dbus-message.c: (dbus_message_append_args_valist):
736 * dbus/dbus-protocol.h:
737 Make activation work better. Now pending activations will be queued
738 and the daemon won't try to activate services that are already registered.
740 2003-03-16 Havoc Pennington <hp@pobox.com>
742 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
745 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
746 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
748 2003-03-16 Havoc Pennington <hp@pobox.com>
750 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
751 this. always run the test suite before commit...
753 * bus/*: adapt to DBusConnection API changes
755 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
756 requires renaming stuff to avoid dbus_connection_dispatch name
759 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
762 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
763 separate from _dbus_message_loader_return_buffer()
765 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
766 this, because it's now always broken to use; the number of
767 messages in queue vs. the number still buffered by the message
768 loader is undefined/meaningless. Should use
769 dbus_connection_get_dispatch_state().
770 (dbus_connection_dispatch): rename from
771 dbus_connection_dispatch_message
773 2003-03-16 Havoc Pennington <hp@pobox.com>
775 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
778 2003-03-16 Anders Carlsson <andersca@codefactory.se>
780 * dbus/dbus-connection.c:
781 (dbus_connection_send_with_reply_and_block):
782 Decrease connection->n_incoming when removing an entry
784 * dbus/dbus-dict.c: (dbus_dict_entry_free),
785 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
786 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
787 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
788 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
789 (dbus_dict_get_byte_array):
790 Handle NULL arrays and strings. Also add support for byte arrays.
792 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
793 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
794 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
795 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
796 (_dbus_demarshal_dict), (demarshal_and_validate_len),
797 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
798 * dbus/dbus-marshal.h:
799 Add support for marshalling and demarshalling empty arrays and strings.
801 * dbus/dbus-message.c: (dbus_message_append_args_valist),
802 (dbus_message_append_string_array),
803 (dbus_message_iter_get_boolean),
804 (dbus_message_iter_get_boolean_array),
805 (dbus_message_iter_get_int32_array),
806 (dbus_message_iter_get_uint32_array),
807 (dbus_message_iter_get_double_array),
808 (dbus_message_iter_get_byte_array),
809 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
810 (check_message_handling):
811 Add support for getting empty arrays and dicts.
813 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
814 Don't do any validation at all for now, that's better than just checking
817 * test/data/valid-messages/emptiness.message:
818 New test message with lots of empty arrays.
820 2003-03-16 Havoc Pennington <hp@pobox.com>
822 * dbus/dbus-connection.c
823 (_dbus_connection_queue_received_message_link): new function that
824 can't fail due to OOM
826 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
827 new function pops a message together with a list link
830 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
831 message queuing functions to avoid needing to alloc memory
833 2003-03-16 Havoc Pennington <hp@pobox.com>
835 Oops - test code was only testing failure of around 30 of the
836 mallocs in the test path, but it turns out there are 500+
837 mallocs. I believe this was due to misguided linking setup such
838 that there was one copy of dbus_malloc etc. in the daemon and one
839 in the shared lib, and only daemon mallocs were tested. In any
840 case, the test case now tests all 500+ mallocs, and doesn't pass
841 yet, though there are lots of fixes in this patch.
843 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
844 this so that it doesn't need to allocate memory, since it
845 has no way of indicating failure due to OOM (and would be
848 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
850 * bus/Makefile.am: rearrange to create two self-contained
851 libraries, to avoid having libraries with overlapping symbols.
852 that was resulting in weirdness, e.g. I'm pretty sure there
853 were two copies of global static variables.
855 * dbus/dbus-internals.c: move the malloc debug stuff to
858 * dbus/dbus-list.c (free_link): free list mempool if it becomes
861 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
863 * dbus/dbus-address.c (dbus_parse_address): free list nodes
866 * bus/dispatch.c (bus_dispatch_add_connection): free
867 message_handler_slot when no longer using it, so
868 memory leak checkers are happy for the test suite.
870 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
872 * bus/bus.c (new_connection_callback): disconnect in here if
873 bus_connections_setup_connection fails.
875 * bus/connection.c (bus_connections_unref): fix to free the
877 (bus_connections_setup_connection): if this fails, don't
878 disconnect the connection, just be sure there are no side
881 * dbus/dbus-string.c (undo_alignment): unbreak this
883 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
885 (_dbus_auth_new): fix the order in which we free strings
888 * bus/connection.c (bus_connection_disconnected): fix to
889 not send ServiceDeleted multiple times in case of memory
892 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
893 get the base service name
894 (dbus_bus_register_client): don't return base service name,
895 instead store it on the DBusConnection and have an accessor
897 (dbus_bus_register_client): rename dbus_bus_register()
899 * bus/dispatch.c (check_hello_message): verify that other
900 connections on the bus also got the correct results, not
901 just the one sending hello
903 2003-03-15 Havoc Pennington <hp@pobox.com>
905 Make it pass the Hello handling test including all OOM codepaths.
906 Now to do other messages...
908 * bus/services.c (bus_service_remove_owner): fix crash when
909 removing owner from an empty list of owners
910 (bus_registry_ensure): don't leave service in the list of
911 a connection's owned services if we fail to put the service
914 * bus/connection.c (bus_connection_preallocate_oom_error): set
915 error flag on the OOM error.
917 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
918 handle _dbus_transport_set_connection failure
920 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
921 to create watches up front and simply enable/disable them as
923 (unix_connection_set): this can now fail on OOM
925 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
926 of enabling/disabling a watch or timeout.
928 * bus/loop.c (bus_loop_iterate): don't touch disabled
931 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
933 2003-03-15 Havoc Pennington <hp@pobox.com>
935 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
936 write useful test code, after all that futzing around ;-)
938 Test does not yet pass because we can't handle OOM in
939 _dbus_transport_messages_pending (basically,
940 dbus_connection_preallocate_send() does not prealloc the write
941 watch). To fix this, I think we need to add new stuff to
942 set_watch_functions, namely a SetEnabled function so we can alloc
943 the watch earlier, then enable it later.
945 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
946 dbus-memory.c to the convenience lib
948 * bus/test.c: rename some static functions to keep them clearly
949 distinct from stuff in connection.c. Handle client disconnection.
951 2003-03-14 Havoc Pennington <hp@pobox.com>
953 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
954 transport, tests more of the real codepath. Set up clients
955 with bus_setup_debug_client.
957 * bus/test.c (bus_setup_debug_client): function to set up debug
958 "clients" on the main loop
960 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
963 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
966 * dbus/dbus-server-debug.c: support a debug server based on pipes
968 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
969 (_dbus_close): new function
971 * configure.in: check for socketpair
973 2003-03-14 Havoc Pennington <hp@redhat.com>
975 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
978 * dbus/dbus-transport-debug.c: rework this a good bit to be
979 less complicated. hopefully still works.
981 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
984 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
987 * dbus/dbus-message.c (dbus_message_copy): rename from
988 dbus_message_new_from_message, fix it up to copy
989 all the message fields, add test case
991 * bus/dispatch.c (bus_dispatch_test): add some more test code,
992 not quite passing yet
994 2003-03-14 Havoc Pennington <hp@pobox.com>
996 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
997 until no work remains" in test code. (the large diff here
998 is just code movement, no actual changes)
1000 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
1001 1, no point waiting around for test code.
1002 (_dbus_server_debug_accept_transport): unref the timeout
1003 after adding it (right?)
1005 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
1007 2003-03-13 Havoc Pennington <hp@redhat.com>
1009 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
1012 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
1015 * dbus/dbus-connection.h: Make AddWatchFunction and
1016 AddTimeoutFunction return a bool so they can fail on out-of-memory
1018 * bus/bus.c (bus_context_new): set up timeout handlers
1020 * bus/connection.c (bus_connections_setup_connection): set up
1023 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
1026 * bus/bus.c (bus_context_new): adapt to changes
1028 * bus/connection.c: adapt to changes
1030 * test/watch.c: adapt to DBusWatch changes
1032 * bus/dispatch.c (bus_dispatch_test): started adding this but
1035 2003-03-14 Anders Carlsson <andersca@codefactory.se>
1037 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
1039 2003-03-13 Havoc Pennington <hp@pobox.com>
1041 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
1042 set up a test framework as for the library
1044 2003-03-12 Havoc Pennington <hp@pobox.com>
1046 Throughout: purge global variables, introduce BusActivation,
1047 BusConnections, BusRegistry, etc. objects instead.
1049 * bus/bus.h, bus/bus.c: introduce BusContext as a global
1052 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
1053 going to redo this a bit differently I think
1055 2003-03-12 Havoc Pennington <hp@redhat.com>
1057 Mega-patch that gets the message bus daemon initially handling
1058 out-of-memory. Work still needed. Also lots of random
1059 moving stuff to DBusError instead of ResultCode.
1061 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
1063 * dbus/dbus-connection.c
1064 (dbus_connection_send_with_reply_and_block): use DBusError
1066 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
1069 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1070 code here, as the only failure possible is OOM.
1072 * bus/connection.c (bus_connection_disconnect):
1073 rename bus_connection_disconnected as it's a notification only
1075 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1076 "name" on get_args failure, should be done by get_args;
1077 don't disconnect client for bad args, just return an error.
1078 (bus_driver_handle_service_exists): ditto
1080 * bus/services.c (bus_services_list): NULL-terminate returned array
1082 * bus/driver.c (bus_driver_send_service_lost)
1083 (bus_driver_send_service_acquired): send messages from driver to a
1084 specific client to the client's unique name, not to the broadcast
1087 * dbus/dbus-message.c (decode_header_data): reject messages that
1088 contain no name field
1089 (_dbus_message_get_client_serial): rename to
1090 dbus_message_get_serial and make public
1091 (_dbus_message_set_serial): rename from set_client_serial
1092 (_dbus_message_set_reply_serial): make public
1093 (_dbus_message_get_reply_serial): make public
1095 * bus/connection.c (bus_connection_foreach): allow stopping
1096 iteration by returning FALSE from foreach function.
1098 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1099 (dbus_connection_free_preallocated_send)
1100 (dbus_connection_preallocate_send): new API for sending a message
1101 without possibility of malloc failure.
1102 (dbus_connection_send_message): rename to just
1103 dbus_connection_send (and same for whole function family)
1105 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1107 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1109 * bus/activation.c: handle/return errors
1111 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1113 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1114 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1115 (_dbus_result_from_errno): move to this file
1117 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1119 * dbus/dbus-marshal.c:
1120 (_dbus_marshal_set_string):
1121 Take a length argument so we can marshal the correct string
1124 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1125 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1126 (_dbus_marshal_test):
1127 * dbus/dbus-marshal.h:
1128 Add support for marshalling and demarshalling dicts.
1130 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1131 Add support for TYPE DICT.
1133 * dbus/dbus-message.c: (set_string_field):
1134 Adjust header padding.
1136 (dbus_message_append_args_valist), (dbus_message_append_dict),
1137 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1138 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1139 (check_message_handling), (check_have_valid_message):
1140 * dbus/dbus-message.h:
1141 Add functions for setting and getting dicts.
1143 * dbus/dbus-protocol.h:
1149 * doc/dbus-specification.sgml:
1150 Add information about how dicts are marshalled.
1152 * test/data/invalid-messages/dict-with-nil-value.message:
1153 * test/data/invalid-messages/too-short-dict.message:
1154 * test/data/valid-messages/dict-simple.message:
1155 * test/data/valid-messages/dict.message:
1156 Add sample messages containing dicts.
1158 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1160 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1162 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1165 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1166 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1167 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1168 (dbus_dict_set_double), (dbus_dict_set_string),
1169 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1170 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1171 (dbus_dict_set_string_array), (_dbus_dict_test):
1173 Fix according to comments from Havoc.
1175 2003-03-06 Michael Meeks <michael@server.home>
1177 * configure.in: if we don't have kde-config, disable have_qt.
1179 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1184 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1185 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1186 (dbus_dict_remove), (dbus_dict_get_value_type),
1187 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1188 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1189 (dbus_dict_put_double), (dbus_dict_put_string),
1190 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1191 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1192 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1193 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1194 (dbus_dict_get_double), (dbus_dict_get_string),
1195 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1196 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1197 (dbus_dict_get_string_array), (_dbus_dict_test):
1199 Add DBusDict implementation
1201 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1205 2003-03-04 Havoc Pennington <hp@pobox.com>
1207 * test/data/auth/*: adapt to changes
1209 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1210 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1213 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1214 more stuff from being in a context name, to make the protocol
1215 simpler to deal with
1217 * dbus/dbus-errors.c (dbus_error_has_name): new function
1218 (dbus_error_is_set): new function
1220 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1221 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1223 * dbus/dbus-connection.c (dbus_connection_flush): also read
1224 messages during a flush operation
1226 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1228 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1230 * configure.in: Check for gethostbyname on Solaris.
1232 * dbus/dbus-transport.c: (_dbus_transport_open):
1233 Remove duplicate "tcp" entry.
1235 * doc/dbus-specification.sgml:
1236 Clarify some things.
1238 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1240 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1241 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1242 (_dbus_keyring_test):
1243 * dbus/dbus-md5.c: (_dbus_md5_compute):
1244 * dbus/dbus-sha.c: (_dbus_sha_compute):
1247 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1249 * README: Add some things.
1251 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1253 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1254 after case DBUS_TYPE_BOOELAN.
1256 2003-03-02 Havoc Pennington <hp@pobox.com>
1258 * test/break-loader.c (randomly_set_extreme_ints): add test that
1259 sets really huge and small integers
1261 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1262 that length of boolean array fits in the string, and that
1263 string has room for boolean value in single-bool case.
1265 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1266 optional value to "ALIGN" command which is what to fill the
1269 * test/data/valid-messages/no-padding.message: add regression
1270 test for the message padding problem
1272 2003-03-02 Havoc Pennington <hp@pobox.com>
1274 * dbus/dbus-message.c (decode_header_data): fix to always init
1275 message_padding, from Benjamin Dauvergne
1277 2003-03-02 Havoc Pennington <hp@pobox.com>
1283 2003-03-01 Joe Shaw <joe@assbarn.com>
1285 * configure.in: Check for "struct cmsgcred" and try to access its
1286 members for BSD-like unices.
1288 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1289 _dbus_read_credentials_unix_socket().
1290 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1291 read() for reading the credential byte off the unix socket. Use
1292 struct cmsgcred on systems that support it.
1294 2003-02-27 Alexander Larsson <alexl@redhat.com>
1298 Make gthreads-2.0 dependency optional. Don't build thread test if
1301 2003-02-27 Havoc Pennington <hp@pobox.com>
1303 * dbus/dbus-connection.c
1304 (dbus_connection_send_message_with_reply_and_block): fix doh!
1305 doh! doh! bug that resulted in never removing a reply from the
1306 queue, no wonder we called get_reply_serial so much ;-)
1308 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1309 and client serial instead of demarshaling them every time
1311 2003-02-27 Havoc Pennington <hp@pobox.com>
1313 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1314 more inlined, using dbus-string-private.h, speeds things up
1317 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1318 when freeing the string
1319 (_dbus_string_steal_data): fix for align offset
1320 (undo_alignment): new function
1322 2003-02-26 Havoc Pennington <hp@redhat.com>
1324 All kinds of audit fixes from Owen, plus initial attempt to
1325 handle unaligned memory returned from malloc.
1327 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1328 leave room for align_offset and nul byte
1329 (fixup_alignment): function to track an align_offset and
1330 ensure real->str is aligned
1331 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1332 to allow a nul byte plus align offset
1333 (_dbus_string_lock): fix overflow issue
1334 (_dbus_string_init_const_len): add assertions on sanity of len,
1335 assign allocated to be ALLOCATION_PADDING larger than len
1336 (set_length): fixup the overflow handling
1337 (_dbus_string_get_data_len): fix overflow in assertion
1338 (open_gap): detect overflow in size of gap to be opened
1339 (_dbus_string_lengthen): add overflow check
1340 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1341 (_dbus_string_append): add overflow check
1342 (_dbus_string_append_unichar): overflow
1343 (_dbus_string_delete): fix overflow in assertion
1344 (_dbus_string_copy_len): overflow in assertion
1345 (_dbus_string_replace_len): overflows in assertions
1346 (_dbus_string_find): change to implement in terms of
1347 _dbus_string_find_to
1348 (_dbus_string_find_to): assorted fixage
1349 (_dbus_string_equal_c_str): assert c_str != NULL,
1350 fix logic so the function works
1351 (_dbus_string_ends_with_c_str): fix overflow thingy
1352 (_dbus_string_base64_encode): overflow fix
1353 (_dbus_string_validate_ascii): overflow
1354 (_dbus_string_validate_nul): overflow
1356 2003-02-26 Havoc Pennington <hp@redhat.com>
1358 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1360 2003-02-26 Alexander Larsson <alexl@redhat.com>
1363 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1365 * dbus/dbus-connection.c:
1366 * dbus/dbus-connection.h:
1367 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1368 Add dbus_connection_set_wakeup_main_function and use it when queueing
1369 incoming and outgoing messages.
1372 * dbus/dbus-dataslot.c:
1373 Threadsafe usage of DBusDataSlotAllocator
1375 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1378 * dbus/dbus-server-unix.c:
1381 * glib/dbus-gmain.c:
1382 Implement the new wakeup functions for glib.
1385 * glib/test-thread-client.c:
1386 * glib/test-thread-server.c:
1387 * glib/test-thread.h:
1388 Initial cut at some thread test code. Not really done yet.
1390 2003-02-26 Havoc Pennington <hp@pobox.com>
1392 * dbus/dbus-connection.c
1393 (dbus_connection_send_message_with_reply_and_block): fix crash
1394 where we ref'd the outgoing message instead of the returned reply
1396 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1397 at the end of this function, so if we didn't need to read for
1398 authentication, we reinstall it for receiving messages
1400 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1401 a NULL sender for peer-to-peer case
1403 * dbus/dbus-transport-unix.c (check_read_watch): handle
1404 !authenticated case correctly
1406 * glib/dbus-gmain.c: add support for DBusServer
1408 * dbus/dbus-server.c: add data slot support
1410 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1411 return values and handle errors
1413 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1416 * Doxyfile.in (INPUT): add glib subdir
1418 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1419 setup_with_g_main instead of hookup_with_g_main; write docs
1421 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1423 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1424 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1425 * dbus/dbus-message.c: (dbus_message_append_boolean),
1426 (dbus_message_append_boolean_array),
1427 (dbus_message_get_args_valist), (_dbus_message_test):
1428 * dbus/dbus-message.h:
1429 * doc/dbus-specification.sgml:
1430 Various fixes as pointed out by Havoc.
1432 * test/data/invalid-messages/bad-boolean-array.message:
1433 * test/data/invalid-messages/bad-boolean.message:
1434 Add invalid boolean value test cases.
1436 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1438 * dbus/dbus-internals.c: (_dbus_type_to_string):
1439 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1440 (_dbus_marshal_validate_arg):
1441 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1442 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1443 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1444 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1445 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1446 (dbus_message_iter_get_double),
1447 (dbus_message_iter_get_boolean_array), (message_iter_test):
1448 * dbus/dbus-message.h:
1449 * dbus/dbus-protocol.h:
1450 * doc/dbus-specification.sgml:
1451 * test/data/valid-messages/lots-of-arguments.message:
1452 Add support for boolean and boolean array types.
1454 2003-02-23 Havoc Pennington <hp@pobox.com>
1456 * dbus/dbus-keyring.c: finish most of this implementation and
1459 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1460 these barf if the error isn't cleared to NULL
1462 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1463 (_dbus_create_directory): new function
1465 * dbus/dbus-errors.c (dbus_set_error): fix warning
1467 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1468 (_dbus_string_hex_decode): new function
1469 (test_hex_roundtrip): test code
1471 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1473 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1475 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1476 the save-to-temp/rename trick to atomically write the new file
1477 (_dbus_string_parse_uint): new function
1479 2003-02-22 Havoc Pennington <hp@pobox.com>
1481 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1483 2003-02-22 Havoc Pennington <hp@pobox.com>
1485 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1486 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1488 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1490 * dbus/test/data/sha-1: add US government test suite for SHA-1
1492 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1494 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1495 Make string arrays NULL-terminated.
1497 * dbus/dbus-memory.c: (dbus_free_string_array):
1498 * dbus/dbus-memory.h:
1499 New function for freeing NULL-terminated string arrays.
1501 * dbus/dbus-message-builder.c: (append_quoted_string),
1502 (_dbus_message_data_load):
1503 Add support for array types.
1505 * dbus/dbus-message.c: (check_message_handling):
1506 Add more types as test cases.
1508 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1509 (_dbus_string_parse_double):
1510 Add the start offset to the end offset.
1512 * test/data/valid-messages/lots-of-arguments.message:
1513 New test message with lots of arguments.
1515 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1517 * dbus/dbus-message.c: (dbus_message_append_nil),
1518 (dbus_message_append_int32), (dbus_message_append_uint32),
1519 (dbus_message_append_double), (dbus_message_append_string),
1520 (dbus_message_append_int32_array),
1521 (dbus_message_append_uint32_array),
1522 (dbus_message_append_double_array),
1523 (dbus_message_append_byte_array),
1524 (dbus_message_append_string_array):
1525 Fix all out-of-memory handling in these functions.
1527 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1529 * dbus/dbus-message.c: (dbus_message_append_nil):
1532 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1534 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1535 (dbus_message_append_nil), (dbus_message_append_int32_array),
1536 (dbus_message_append_uint32_array),
1537 (dbus_message_append_double_array),
1538 (dbus_message_append_byte_array),
1539 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1540 (dbus_message_iter_get_int32_array),
1541 (dbus_message_iter_get_uint32_array),
1542 (dbus_message_iter_get_double_array),
1543 (dbus_message_iter_get_byte_array),
1544 (dbus_message_iter_get_string_array):
1546 * dbus/dbus-message.h:
1547 Add functions for appending and getting arrays.
1549 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1551 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1552 element size at least 8 bytes, fixes mempool tests on
1555 2003-02-20 Alexander Larsson <alexl@redhat.com>
1557 * dbus/dbus-transport-unix.c (unix_do_iteration):
1558 Unlock the connection mutex during a blocking select call.
1559 Add todo about how we need a way to wake up the select.
1561 * dbus/dbus-connection-internal.h:
1562 * dbus/dbus-connection.c:
1563 Add _dbus_connection_lock and _dbus_connection_unlock.
1565 2003-02-19 Havoc Pennington <hp@pobox.com>
1567 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1568 Doxyfile.in, not Doxyfile
1570 * dbus/dbus-keyring.c: do some hacking on this
1572 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1574 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1576 (dbus_set_error): remove dbus_error_init, check for message ==
1577 NULL *before* we sprintf into it, and add @todo about including
1578 system headers in this file
1580 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1582 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1584 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1585 get various bits of user information based on either username
1587 (_dbus_homedir_from_username): new function
1589 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1592 Add check for nonposix getpwnam_r
1594 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1595 Align the pool element size to a sizeof (void *) boundary.
1597 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1598 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1599 General Solaris fixes.
1601 * test/data/valid-messages/simplest-manual.message:
1602 Explicitly state that we want little-endian packing.
1604 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1606 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1608 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1609 Added to create a transport connecting using a tcp/ip socket.
1611 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1612 to a tcp socket at given host and port.
1613 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1616 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1618 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1619 Added to create a server listening on a TCP/IP socket.
1621 2003-02-19 Havoc Pennington <hp@pobox.com>
1623 Throughout: mop up all the Doxygen warnings and undocumented
1626 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1627 to search any paths.
1629 * dbus/dbus-threads.c: move global mutex initializers to
1630 dbus-internals.h, multiple prototypes was confusing doxygen
1631 besides being kind of ugly
1633 * Doxyfile (PREDEFINED): have Doxygen define
1634 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1635 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1636 (do not abuse the feature! it's for stuff like the autogenerated
1637 macros in dbus-md5.c, not just for things you don't feel like
1640 2003-02-18 Havoc Pennington <hp@pobox.com>
1642 * dbus/dbus-string.c (_dbus_string_zero): new function
1644 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1645 wrap it in some dbus-friendly API
1647 * dbus/dbus-types.h: add 16-bit types
1649 2003-02-18 Joe Shaw <joe@assbarn.com>
1651 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1652 credentials from our currently running process.
1653 (get_word): Fix a buglet where we were copying the entire length
1654 instead of relative to our position.
1656 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1657 keys on the stack... it's 640k of data.
1659 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1660 read the credentials byte off the socket, even if we don't have
1662 (_dbus_poll): Implement poll() using select() for systems which
1665 * glib/test-dbus-glib.c (main): Print out an error if no
1666 parameters are given.
1668 * test/data/auth/fallback.auth-script: Added. Tests that a client
1669 can fallback to a secondary auth mechanism if the first fails.
1671 2003-02-18 Havoc Pennington <hp@pobox.com>
1675 2003-02-17 Havoc Pennington <hp@pobox.com>
1677 * doc/dbus-specification.sgml: lots of cosmetic
1678 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1679 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1680 s/server/bus/ (except in authentication section). Add a section
1681 "Message Bus Message Routing"
1683 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1689 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1691 * doc/dbus-specification.sgml:
1692 Specification updates.
1694 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1696 * bus/activation.c: (bus_activation_init), (child_setup),
1697 (bus_activation_activate_service):
1699 * bus/main.c: (main):
1700 Set DBUS_ADDRESS environment variable.
1702 * dbus/dbus-errors.c: (dbus_set_error):
1703 Don't use va_copy since that's a C99 feature.
1705 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1706 (_dbus_spawn_async):
1707 * dbus/dbus-sysdeps.h:
1708 Add child_setup_func to _dbus_spawn_async.
1710 * doc/dbus-specification.sgml:
1711 Update specification.
1713 * test/spawn-test.c: (setup_func), (main):
1716 2003-02-17 Alexander Larsson <alexl@redhat.com>
1718 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1721 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1725 * doc/dbus-test-plan.sgml:
1726 Add test plan document.
1731 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1733 * dbus/dbus-message.c: (decode_header_data),
1734 (_dbus_message_loader_return_buffer):
1735 Set the header padding amount when loading a message.
1737 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1739 * bus/dispatch.c: (send_one_message):
1740 Only send broadcast messages to registered connections.
1742 * dbus/dbus-message.c: (dbus_message_name_is):
1743 * dbus/dbus-message.h:
1744 New convenience function.
1746 * dbus/dbus-transport-debug.c: (do_reading):
1747 Only dispatch one message per run.
1750 * test/bus-test.c: (new_connection_callback), (die),
1751 (test_hello_client1_handler), (test_hello_client2_handler),
1752 (test_hello_replies), (main):
1754 * test/bus-test-loop.[ch]:
1757 2003-02-16 Havoc Pennington <hp@pobox.com>
1759 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1760 backward conditional
1762 2003-02-16 Alexander Larsson <alexl@redhat.com>
1764 * dbus/dbus-connection.c:
1765 Implement sent_message_with_reply. (with_reply_and block is still
1767 Made dispatch_message not lose message if OOM.
1769 * dbus/dbus-errors.h:
1770 Add NoReply error (for reply timeouts).
1772 2003-02-16 Alexander Larsson <alexl@redhat.com>
1774 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1775 Actually free keys and values when destroying hashtable.
1777 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1779 * dbus/dbus-auth.c: (client_try_next_mechanism):
1782 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1783 Return TRUE if there's no thread implementation around.
1785 * glib/dbus-gmain.c: (free_source),
1786 (dbus_connection_hookup_with_g_main):
1787 Make sure to remove the GSource when the connection is finalized.
1789 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1791 * bus/dispatch.c: (bus_dispatch_message_handler):
1792 * dbus/dbus-errors.h:
1793 Return an error if someone tries to send a message to a service
1796 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1798 * bus/activation.c: (load_directory), (bus_activation_init),
1799 (bus_activation_activate_service):
1802 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1803 More work on the activation handling.
1805 * dbus/dbus-errors.h:
1806 Add some error messages
1808 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1809 * dbus/dbus-message.h:
1810 New function that creates an error message.
1812 * dbus/dbus-protocol.h:
1813 Add ACTIVATE_SERVER message.
1815 * dbus/dbus-server-unix.c: (unix_handle_watch),
1816 (_dbus_server_new_for_domain_socket):
1817 Call _dbus_fd_set_close_on_exec.
1819 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1820 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1821 (_dbus_fd_set_close_on_exec):
1822 * dbus/dbus-sysdeps.h:
1823 Add _dbus_fd_set_close_on exec function. Also add function that checks
1824 that all open fds are set to close-on-exec and warns otherwise.
1826 * dbus/dbus-transport-unix.c:
1827 (_dbus_transport_new_for_domain_socket):
1828 Call _dbus_fd_set_close_on_exec.
1830 2003-02-16 Havoc Pennington <hp@pobox.com>
1832 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1833 allow people to avoid setting SIGPIPE to SIG_IGN
1834 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1835 we've been asked not to
1837 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1839 * dbus/dbus-list.c: (_dbus_list_append_link),
1840 (_dbus_list_prepend_link):
1841 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1845 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1848 * bus/activation.c: (bus_activation_entry_free),
1849 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1851 * bus/main.c: (main):
1852 Add simple activation support, doesn't work yet though.
1854 2003-02-15 Zack Rusin <zack@kde.org>
1856 * qt/dbus-qthread.cpp: small casting fix
1858 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1860 * dbus/dbus-errors.c: (dbus_set_error):
1861 * dbus/dbus-errors.h:
1862 Add a few errors and make dbus_set_error void.
1864 * dbus/dbus-sysdeps.c:
1865 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1866 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1867 * dbus/dbus-sysdeps.h:
1868 Add _dbus_spawn_async.
1870 * test/spawn-test.c: (main):
1871 Test for _dbus_spawn_async.
1873 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1875 * dbus/dbus-internals.h:
1876 Fix build without tests.
1878 * dbus/dbus-list.c: (alloc_link):
1879 Fix a segfault when a malloc fails.
1881 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1882 (dbus_malloc0), (dbus_realloc):
1883 Add support for malloc debugging.
1885 2003-02-15 Alexander Larsson <alexl@redhat.com>
1887 * dbus/dbus-threads.c:
1888 * dbus/dbus-threads.h:
1889 Add condvars. Remove static mutext from API.
1890 Implement static mutexes by initializing them from threads_init.
1892 * glib/dbus-gthread.c:
1893 * qt/dbus-qthread.cpp:
1894 Update with the thread api changes.
1899 Turn StaticMutex into normal mutex + init function.
1900 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1901 _dbus_list_append_link, _dbus_list_prepend_link
1904 * dbus/dbus-sysdeps.c:
1905 * dbus/dbus-sysdeps.h:
1906 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1907 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1909 * dbus/dbus-protocol.h:
1910 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1912 * dbus/dbus-message.c:
1913 Make ref/unref atomic.
1916 * dbus/dbus-connection-internal.h:
1917 * dbus/dbus-connection.c:
1918 * dbus/dbus-connection.h:
1920 Change _peek to _borrow,_return & _steal_borrowed.
1921 Change disconnect callback to event.
1922 Make dbus_connection_dispatch_messages reentrant.
1924 * dbus/dbus-transport.c:
1925 Don't ref the connection on calls to the transport
1928 * dbus/dbus-message-handler.c:
1931 * glib/dbus-gmain.c:
1932 Don't use peek_message anymore
1935 * test/debug-thread.c:
1936 * test/debug-thread.h:
1937 Simple thread implementation that asserts() on deadlocks in
1938 single-threaded code.
1941 (main) Call debug_threads_init.
1944 Use disconnect message instead of disconnect callback.
1948 Don't call dbus_connection_set_disconnect_function. Instead export
1949 bus_connection_disconnect.
1952 Call bus_connection_disconnect when we get a disconnected message.
1954 2003-02-15 Havoc Pennington <hp@pobox.com>
1956 * dbus/dbus-message.c (dbus_message_new): fool around with the
1959 2003-02-14 Havoc Pennington <hp@pobox.com>
1961 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1963 * dbus/dbus-memory.c: fail if the debug functions indicate we
1966 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1967 (_dbus_decrement_fail_alloc_counter): debug functions to
1968 simulate memory allocation failures
1970 2003-02-14 Havoc Pennington <hp@pobox.com>
1972 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1975 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1977 * bus/driver.c: (bus_driver_handle_hello):
1979 * bus/services.c: (bus_service_lookup):
1980 Reorder message sending so we get a more sane order.
1982 * test/bus-test.c: (message_handler):
1985 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1987 * bus/driver.c: (bus_driver_send_service_deleted),
1988 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1989 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1990 (bus_driver_send_welcome_message),
1991 (bus_driver_handle_list_services),
1992 (bus_driver_handle_acquire_service),
1993 (bus_driver_handle_service_exists):
1994 * dbus/dbus-bus.c: (dbus_bus_register_client),
1995 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1996 * dbus/dbus-errors.c: (dbus_result_to_string):
1997 * dbus/dbus-errors.h:
1998 * dbus/dbus-message.c: (dbus_message_append_args),
1999 (dbus_message_append_args_valist), (dbus_message_get_args),
2000 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
2001 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
2002 (dbus_message_iter_get_byte_array),
2003 (dbus_message_iter_get_string_array), (message_iter_test),
2004 (check_message_handling), (_dbus_message_test):
2005 * dbus/dbus-message.h:
2006 * test/bus-test.c: (main):
2007 Change fields to arguments in messages, so that they won't be
2008 confused with header fields.
2010 * glib/test-dbus-glib.c: (main):
2011 Remove append_fields from hello message.
2013 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2015 * dbus/dbus-errors.c:
2016 * dbus/dbus-message.c:
2017 * dbus/dbus-string.c:
2018 Documentation fixes.
2020 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2022 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
2024 Implement support for timeouts in dbus-glib.
2026 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2028 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2029 * dbus/dbus-message.c: (process_test_subdir):
2030 * test/break-loader.c: (find_breaks_based_on):
2031 Plug some memory leaks.
2033 2003-02-13 Richard Hult <rhult@codefactory.se>
2035 * bus/main.c: Fix build.
2037 * dbus/dbus-errors.h:
2038 * dbus/dbus-errors.c: Fix copyright for Anders.
2040 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2045 * bus/connection.c: (bus_connection_foreach):
2048 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
2049 (unescape_string), (new_section), (parse_section_start),
2050 (parse_key_value), (report_error), (bus_desktop_file_load),
2051 (bus_desktop_file_get_string):
2052 * bus/desktop-file.h:
2053 Use DBusError for error reporting.
2055 * bus/dispatch.c: (send_one_message),
2056 (bus_dispatch_message_handler):
2057 * bus/driver.c: (bus_driver_send_service_deleted),
2058 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2059 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
2060 (bus_driver_send_welcome_message),
2061 (bus_driver_handle_list_services),
2062 (bus_driver_handle_acquire_service),
2063 (bus_driver_handle_service_exists):
2064 * bus/loop.c: (bus_loop_run):
2066 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
2068 * bus/utils.c: (bus_wait_for_memory):
2070 New files with general utility functions.
2072 * dbus/dbus-internals.h:
2073 Remove _DBUS_HANDLE_OOM.
2075 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2077 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2078 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2079 * dbus/dbus-errors.h:
2080 Add DBusError structure.
2082 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2084 * test/data/valid-messages/standard-acquire-service.message:
2085 * test/data/valid-messages/standard-hello.message:
2086 * test/data/valid-messages/standard-list-services.message:
2087 * test/data/valid-messages/standard-service-exists.message:
2088 Add some standard messages.
2090 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2092 * bus/driver.c: (bus_driver_send_welcome_message),
2093 (bus_driver_handle_list_services),
2094 (bus_driver_handle_acquire_service),
2095 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2096 Update for API changes in libdbus.
2098 * dbus/dbus-message.c: (dbus_message_new_reply):
2099 * dbus/dbus-message.h:
2100 Remove the name argument. The spec states that replies shouldn't
2103 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2105 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2106 (report_error), (bus_desktop_file_load), (lookup_section),
2107 (lookup_line), (bus_desktop_file_get_raw),
2108 (bus_desktop_file_get_string):
2109 * bus/desktop-file.h:
2110 Some fixes, and new functions for getting a key value from a section.
2112 2003-02-13 Havoc Pennington <hp@pobox.com>
2114 * test/data/auth/fail-after-n-attempts.auth-script: new test
2116 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2119 2003-02-13 Havoc Pennington <hp@pobox.com>
2121 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2122 dbus_credentials_match were backward
2124 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2125 NO_CREDENTIALS and ROOT_CREDENTIALS
2127 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2128 into here. Never process more commands after we've reached an
2129 end state; store further data as unused bytes.
2131 * test/data/auth/*: add more auth tests
2133 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2134 command to match exact string and EXPECT_UNUSED to match unused
2137 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2139 2003-02-12 Havoc Pennington <hp@pobox.com>
2141 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2142 \r off of popped lines
2144 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2147 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2150 2003-02-12 Havoc Pennington <hp@pobox.com>
2152 * dbus/Makefile.am: remove break-loader from the build, since it
2155 * configure.in: add --enable-gcov to turn on coverage profiling
2156 flags and disable optimization
2158 2003-02-10 Havoc Pennington <hp@pobox.com>
2160 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2161 initial cut at test framework for DBusAuth from laptop.
2162 Doesn't quite work yet but it compiles and I need to get
2163 it off the 266mhz laptop. ;-)
2165 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2166 fix a memleak in error case
2168 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2171 * bus/desktop-file.c:
2172 * bus/desktop-file.h:
2173 Add a desktop file parser.
2175 2003-02-11 Zack Rusin <zack@kde.org>
2177 * qt/message.[h|cpp]: sample implementation
2178 of the KDE wrapper for DBusMessage
2180 2003-02-09 Zack Rusin <zack@kde.org>
2182 * test/bus-test.c: make_it_compile
2183 * doc/dbus-specification.sgml: minimal semantic fix
2185 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2191 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2194 * dbus/dbus-break-loader.c:
2196 * test/break-loader.c:
2197 Move dbus-break-loader to test/ and rename it to break-loader.
2199 2003-02-02 Havoc Pennington <hp@pobox.com>
2201 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2202 for code to manage cookies in your home directory
2204 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2206 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2207 to authenticate, then disconnect the client.
2209 2003-02-03 Alexander Larsson <alexl@redhat.com>
2211 * dbus/dbus-message.c (dbus_message_append_fields):
2214 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2216 * doc/dbus-specification.sgml:
2217 Update address format section.
2219 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2222 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2223 (message_handler), (new_connection_callback), (loop_quit),
2227 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2229 * bus/driver.c: (bus_driver_handle_service_exists):
2230 Simplify the code a bit.
2232 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2235 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2238 Add libdbus-daemon.la and link to it.
2240 2003-02-01 James Willcox <jwillcox@gnome.org>
2242 * bus/driver.c: (bus_driver_handle_own_service):
2243 Actually include the service reply code in the message.
2245 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2247 * bus/driver.c: (bus_driver_handle_service_exists):
2248 Don't unref the incoming message.
2250 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2252 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2254 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2256 * dbus/dbus-server.c: (dbus_server_listen):
2257 * dbus/dbus-transport.c: (_dbus_transport_open):
2258 ifdef out the calls to the debug transport and server.
2260 2003-02-02 Alexander Larsson <alexl@redhat.com>
2262 * dbus/dbus-watch.c (dbus_watch_get_flags):
2263 Add note in the docs that ERROR or HANGUP won't be returned
2264 and are assumed always on.
2266 * glib/dbus-gmain.c (add_watch):
2267 Always add IO_ERR | IO_HUP
2269 * dbus/dbus-message.h:
2270 Add semicolon after dbus_message_iter_get_string_array().
2271 Makes qt code build again
2273 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2275 * bus/driver.c: (create_unique_client_name),
2276 (bus_driver_handle_hello):
2277 Don't take a name, just use a numeric id to identify
2281 * dbus/dbus-bus.c: (dbus_bus_register_client),
2282 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2284 Add new convenience functions for communicating with the bus.
2286 * dbus/dbus-message.h:
2288 * dbus/dbus-protocol.h:
2291 2003-02-01 Alexander Larsson <alexl@redhat.com>
2293 * dbus/dbus-message.c (dbus_message_append_fields):
2294 Add some more doc comments.
2296 2003-02-01 Havoc Pennington <hp@pobox.com>
2298 * dbus/dbus-break-loader.c (randomly_modify_length): change
2299 a 4-byte value in the message as if it were a length
2301 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2302 execute bit on saved files
2304 2003-02-01 Havoc Pennington <hp@pobox.com>
2306 * dbus/dbus-break-loader.c (main): new program to find messages
2307 that break the loader.
2309 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2310 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2312 * dbus/dbus-string.c (_dbus_string_set_byte): new
2314 2003-01-31 Havoc Pennington <hp@pobox.com>
2316 * dbus/dbus-message.c: refactor the test code to be more general,
2317 in preparation for writing a "randomly permute test cases to
2318 try to break the loader" program.
2320 2003-01-31 Havoc Pennington <hp@pobox.com>
2322 * doc/dbus-specification.sgml: work on the specification
2324 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2325 the protocol version of the message.
2327 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2328 no longer specifies that.
2329 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2332 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2333 "break" for DBUS_TYPE_NIL, remove @todo
2335 2003-01-31 Havoc Pennington <hp@pobox.com>
2337 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2338 just set_is_error/get_is_error as this is a commonly-used
2339 function, and write docs.
2341 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2343 * dbus/dbus-address.c: (dbus_address_entry_free):
2344 Free key and value lists.
2346 * dbus/dbus-internals.c: (_dbus_type_to_string):
2347 Add the types we didn't have.
2349 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2350 (_dbus_marshal_validate_arg):
2353 * dbus/dbus-message.c: (dbus_message_set_sender):
2354 Remove todo about being able to set sender to NULL.
2356 (dbus_message_set_is_error_reply),
2357 (dbus_message_get_is_error_reply):
2358 * dbus/dbus-message.h:
2361 * dbus/dbus-protocol.h:
2362 Add error reply flag.
2364 * test/data/valid-messages/opposite-endian.message:
2365 Add NIL type to test.
2367 2003-01-31 Havoc Pennington <hp@pobox.com>
2369 * doc/dbus-specification.sgml: fully specify the header. Add
2370 flags and major protocol version, and change header/body len to
2373 * dbus/dbus-message-builder.c (append_saved_length): append length
2376 * dbus/dbus-message.c (dbus_message_create_header): change header
2377 length and body length to unsigned. Add the new fields from the
2379 (_dbus_message_loader_return_buffer): unsigned header/body len
2381 2003-01-30 Havoc Pennington <hp@pobox.com>
2383 * dbus/dbus-auth.c: rework to use only REJECTED, no
2386 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2387 use REJECTED, suggested by Mark McLoughlin
2389 2003-01-30 Havoc Pennington <hp@pobox.com>
2391 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2392 a better way to report errors here. e.g. "unix address lacks
2393 path" or something. also "no such file" when the path doesn't
2396 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2398 (dbus_parse_address): add @todo about documenting address format,
2399 and allowing , and ; to be escaped
2401 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2404 Add dbus-address.[ch]
2406 * dbus/dbus-address.c: (dbus_address_entry_free),
2407 (dbus_address_entries_free), (create_entry),
2408 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2409 (dbus_parse_address), (_dbus_address_test):
2410 * dbus/dbus-address.h:
2411 New files for dealing with address parsing.
2413 * dbus/dbus-connection.c:
2414 Document timeout functions.
2416 * dbus/dbus-message.c:
2417 Document dbus_message_new_from_message.
2419 * dbus/dbus-server-debug.c:
2422 * dbus/dbus-server.c: (dbus_server_listen):
2423 Parse address and use correct server implementation.
2425 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2426 * dbus/dbus-string.h:
2427 New function with test.
2429 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2433 * dbus/dbus-transport-debug.c:
2436 * dbus/dbus-transport.c: (_dbus_transport_open):
2437 Parse address and use correct transport implementation.
2439 2003-01-30 Havoc Pennington <hp@pobox.com>
2441 * dbus/dbus-message.c: use message->byte_order instead of
2442 DBUS_COMPILER_BYTE_ORDER throughout.
2443 (dbus_message_create_header): pad header to align the
2444 start of the body of the message to 8-byte boundary
2446 * dbus/dbus-marshal.h: make all the demarshalers take const
2447 DBusString arguments.
2449 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2450 validate message args here, so we don't have to do slow validation
2451 later, and so we catch bad messages as they are incoming. Also add
2452 better checks on header_len and body_len. Also fill in
2455 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2456 implemented properly)
2457 (_dbus_string_validate_nul): new function to check all-nul
2459 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2460 get_arg_end_pos and remove all validation
2461 (_dbus_marshal_validate_arg): actually do validation here.
2463 2003-01-29 Havoc Pennington <hp@pobox.com>
2465 * dbus/dbus-message.c (check_message_handling): fix assertion
2466 failure on set_client_serial
2468 2003-01-28 Havoc Pennington <hp@pobox.com>
2470 * dbus/dbus-server-debug.c: Add doc section comments
2472 * dbus/dbus-transport-debug.c: add doc section comments
2474 2003-01-28 Havoc Pennington <hp@redhat.com>
2476 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2477 the reverse order from how I had it
2478 (_dbus_string_base64_encode): reverse encoding order. I was
2479 basically byteswapping everything during encoding.
2481 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2483 * dbus/dbus-connection-internal.h:
2484 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2485 (_dbus_connection_remove_timeout):
2486 Add functions for adding and removing timeouts.
2488 * dbus/dbus-message.c: (dbus_message_new_from_message):
2489 Add new function that takes a message and creates an exact
2490 copy of it, but with the refcount set to 1.
2491 (check_message_handling):
2494 * dbus/dbus-server-protected.h:
2495 * dbus/dbus-server.c: (_dbus_server_init_base),
2496 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2497 (dbus_server_set_timeout_functions):
2498 (_dbus_server_remove_timeout):
2499 New functions so that a server can add and remove timeouts.
2501 (dbus_server_listen):
2502 Add commented out call to dbus_server_debug_new.
2504 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2505 Actually set the handler, doh.
2507 * dbus/dbus-transport.c: (_dbus_transport_open):
2508 Add commented out call to dbus_transport_debug_client_new.
2511 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2513 2003-01-28 Havoc Pennington <hp@pobox.com>
2515 * dbus/dbus-message.c (check_message_handling): function to check
2516 on the loaded message, iterates over it etc.
2518 2003-01-28 Havoc Pennington <hp@pobox.com>
2520 * test/Makefile.am (dist-hook): fix make distdir
2522 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2524 2003-01-27 Havoc Pennington <hp@pobox.com>
2526 * dbus/dbus-mempool.c (time_for_size): replace printf with
2529 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2530 empty lines; fix the SAVE_LENGTH stuff to be
2531 START_LENGTH/END_LENGTH so it actually works; couple other
2534 * test/Makefile.am (dist-hook): add dist-hook for .message files
2536 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2537 can be constant or locked.
2538 (_dbus_string_free): allow freeing a const string as
2541 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2543 * dbus/dbus-test-main.c (main): take an argument which is the
2544 directory containing test data
2546 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2547 argument to this and load all the messages in test/data/
2548 checking that they can be loaded or not loaded as appropriate.
2550 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2552 * bus/dispatch.c: (bus_dispatch_message_handler):
2553 Dispatch messages sent to services.
2555 * bus/driver.c: (bus_driver_send_service_deleted),
2556 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2557 (bus_driver_send_service_acquired):
2558 Add helper functions for sending service related messages.
2560 (bus_driver_send_welcome_message):
2561 Send HELLO_REPLY instead of WELCOME.
2563 (bus_driver_handle_list_services):
2564 Send LIST_SERVICES_REPLY instead of SERVICES.
2566 (bus_driver_handle_own_service),
2567 (bus_driver_handle_service_exists):
2568 New message handlers.
2570 (bus_driver_handle_message):
2571 Invoke new message handlers.
2573 (bus_driver_remove_connection):
2574 Don't remove any services here since that's done automatically
2575 by bus_service_remove_owner now.
2578 New function signatures.
2580 * bus/services.c: (bus_service_add_owner):
2581 Send ServiceAcquired message if we're the only primary owner.
2583 (bus_service_remove_owner):
2584 Send ServiceAcquired/ServiceLost messages.
2586 (bus_service_set_prohibit_replacement),
2587 (bus_service_get_prohibit_replacement):
2588 Functions for setting prohibit replacement.
2590 (bus_service_has_owner):
2591 New function that checks if a connection is in the owner queue of
2595 Add new function signatures.
2597 * dbus/dbus-list.c: (_dbus_list_test):
2598 Add tests for _dbus_list_remove_last and traversing the list backwards.
2601 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2602 go any further, so return NULL then.
2604 * dbus/dbus-protocol.h:
2605 Add new messages, service flags and service replies.
2607 2003-01-26 Havoc Pennington <hp@pobox.com>
2609 * dbus/dbus-message-builder.c: implement, completely untested.
2611 * test/data/*: add data to be used in testing.
2612 ".message" files are our simple loadable text format.
2613 ".message-raw" will be binary dumps of messages.
2615 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2617 2003-01-26 Havoc Pennington <hp@pobox.com>
2619 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2621 * dbus/dbus-errors.c (dbus_result_to_string): add
2624 * dbus/dbus-message-builder.c: new file, will contain code to load
2625 up messages from files. Not implemented yet.
2627 2003-01-26 Havoc Pennington <hp@pobox.com>
2629 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2630 the sender by setting to NULL
2632 2003-01-26 Havoc Pennington <hp@pobox.com>
2634 The unit tests pass, but otherwise untested. If it breaks, the
2635 tests should have been better. ;-)
2637 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2640 * dbus/dbus-message.c: redo everything so we maintain
2641 message->header as the only copy of the various fields.
2642 This avoids the possibility of out-of-memory in some cases,
2643 for example dbus_message_lock() can't run out of memory anymore,
2644 and avoids extra copying. Figured I may as well go ahead and do
2645 this since it was busted for dbus_message_lock to not return
2646 failure on OOM, and dbus_message_write_header was totally
2647 unchecked for OOM. Also fixed some random other bugs.
2649 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2650 that strings are nul-terminated. Also, end_pos can be equal
2651 to string length just not greater than, I think.
2652 (_dbus_marshal_set_int32): new function
2653 (_dbus_marshal_set_uint32): new function
2654 (_dbus_marshal_set_string): new function
2656 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2657 a warning, init timeout_list to NULL
2658 (dbus_connection_send_message): don't use uninitialized variable
2661 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2663 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2665 * bus/driver.c: (bus_driver_handle_hello),
2666 (bus_driver_send_welcome_message):
2669 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2671 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2672 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2673 (dbus_connection_unref):
2674 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2675 * dbus/dbus-message.c: (dbus_message_unref),
2678 (dbus_message_get_fields):
2679 Remove debugging printout.
2681 (_dbus_message_loader_return_buffer):
2682 Don't store the header string.
2684 (_dbus_message_test):
2687 2003-01-26 Richard Hult <rhult@codefactory.se>
2689 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2690 the file descriptor list, since it can change under us.
2692 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2694 * glib/dbus-gmain.c: (dbus_connection_prepare),
2695 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2696 (remove_watch), (dbus_connection_hookup_with_g_main):
2697 Rewrite the glib handling to use its own GSource instead of a
2698 GIOChannel so we can catch messages put in the queue while waiting
2701 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2704 * bus/connection.c: (connection_disconnect_handler),
2705 (connection_watch_callback), (bus_connection_setup):
2706 * bus/dispatch.c: (send_one_message),
2707 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2708 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2710 * bus/driver.c: (bus_driver_send_service_deleted),
2711 (bus_driver_send_service_created), (bus_driver_handle_hello),
2712 (bus_driver_send_welcome_message),
2713 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2714 (bus_driver_handle_message):
2716 Refactor code, put the message dispatching in its own file. Use
2717 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2720 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2722 * dbus/dbus-internals.h:
2723 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2725 * dbus/dbus-message.c: (dbus_message_get_sender):
2726 * dbus/dbus-message.h:
2727 Implement dbus_message_get_sender.
2729 * dbus/dbus-protocol.h:
2730 Add message and service defines.
2732 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2734 * dbus/dbus-connection.c: (dbus_connection_send_message):
2735 * dbus/dbus-message-internal.h:
2736 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2737 (dbus_message_write_header):
2738 Remove _dbus_messag_unlock and don't set the client serial on a
2739 message if one already exists.
2741 2003-01-24 Havoc Pennington <hp@pobox.com>
2743 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2746 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2749 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2751 * dbus/dbus-list.c: (alloc_link), (free_link):
2752 Use a memory pool for the links.
2754 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2756 * bus/connection.c: (bus_connection_foreach):
2758 Add new bus_connection_foreach function.
2760 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2761 Add function that broadcasts a message to all clients.
2763 (bus_driver_send_service_created), (bus_driver_handle_hello),
2764 (bus_driver_send_welcome_message),
2765 (bus_driver_handle_list_services), (bus_driver_message_handler):
2766 Implement functions that take care of listing services, and notifying
2767 clients when new services are created.
2769 * bus/services.c: (bus_services_list):
2771 Add new function that returns an array of strings with the currently
2772 registered services.
2775 * glib/dbus-gmain.c:
2776 Update copyright year.
2778 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2780 * dbus/dbus-connection.c: (dbus_connection_send_message):
2781 Unlock the message in case it was sent earlier.
2783 (dbus_connection_send_message_with_reply_and_block):
2784 Remove the reply message from the list.
2786 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2787 Set array_len and new_pos correctly.
2789 (_dbus_marshal_test):
2790 Remove debug output.
2792 * dbus/dbus-message-internal.h:
2793 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2794 New function that returns the reply serial.
2796 (_dbus_message_unlock):
2797 New function that unlocks a message and resets its header.
2799 (dbus_message_append_string_array),
2800 (dbus_message_get_fields_valist),
2801 (dbus_message_iter_get_field_type),
2802 (dbus_message_iter_get_string_array),
2803 (dbus_message_get_fields),
2804 (dbus_message_append_fields_valist):
2805 Handle string arrays.
2807 (dbus_message_set_sender):
2808 Make this function public since the bus daemon needs it.
2810 (decode_header_data):
2811 Set the reply serial to -1 initially.
2813 * dbus/dbus-message.h:
2814 Add dbus_message_set_sender.
2816 2003-01-24 Havoc Pennington <hp@pobox.com>
2818 * doc/dbus-specification.sgml: add some stuff
2820 2003-01-22 Havoc Pennington <hp@pobox.com>
2822 * doc/dbus-specification.sgml: Start to document the protocol.
2824 2003-01-22 Havoc Pennington <hp@pobox.com>
2826 * dbus/dbus-connection.c
2827 (dbus_connection_send_message_with_reply_and_block): add some @todo
2829 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2831 2003-01-21 Havoc Pennington <hp@pobox.com>
2833 (patch untested because can't compile)
2835 * bus/driver.c (create_unique_client_name): make this function
2836 never recycle client names. Also, caller should initialize
2839 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2841 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2843 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2844 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2845 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2846 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2847 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2848 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2849 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2850 * dbus/dbus-marshal.h:
2851 * dbus/dbus-protocol.h:
2852 Add support for marshalling and demarshalling integer, double
2855 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2860 * bus/connection.c: (connection_disconnect_handler):
2861 Remove the connection from the bus driver's list.
2863 (connection_watch_callback): Dispatch messages.
2865 (free_connection_data): Free connection name.
2867 (bus_connection_setup): Add connection to the bus driver's list.
2868 (bus_connection_remove_owned_service):
2869 (bus_connection_set_name), (bus_connection_get_name):
2870 Add functions for setting and getting the connection's name.
2873 Add function headers.
2875 * bus/driver.c: (create_unique_client_name),
2876 (bus_driver_handle_hello_message),
2877 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2878 (bus_driver_add_connection), (bus_driver_remove_connection):
2881 * bus/services.c: (bus_service_free):
2883 New file that handles communication and registreation with the bus
2886 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2888 * dbus/dbus-connection.c: (dbus_connection_send_message):
2889 Add a new client_serial parameter.
2891 (dbus_connection_send_message_with_reply):
2892 Remove a @todo since we've implemented the blocking function.
2894 (dbus_connection_send_message_with_reply_and_block):
2895 New function that sends a message and waits for a reply and
2896 then returns the reply.
2898 * dbus/dbus-connection.h:
2901 * dbus/dbus-errors.c: (dbus_result_to_string):
2902 * dbus/dbus-errors.h:
2903 Add new DBUS_RESULT.
2905 * dbus/dbus-message-internal.h:
2906 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2907 (_dbus_message_set_sender), (dbus_message_write_header),
2908 (dbus_message_new_reply), (decode_header_data),
2909 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2910 * dbus/dbus-message.h:
2911 Add new functions that set the reply serial and sender.
2912 Also marshal and demarshal them correctly and add test.
2914 * dbus/dbus-protocol.h:
2915 Add new DBUS_MESSAGE_TYPE_SENDER.
2918 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2919 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2920 (dbus_connection_hookup_with_g_main):
2921 * glib/test-dbus-glib.c: (main):
2922 Rewrite to use GIOChannel and remove the GSource crack.
2924 * test/echo-client.c: (main):
2925 * test/watch.c: (check_messages):
2926 Update for changed APIs
2928 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2930 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2932 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2933 Create a DBusTimeoutList.
2934 (dbus_connection_set_timeout_functions): Add new function to
2935 set timeout callbacks
2937 * dbus/dbus-connection.h: Add public DBusTimeout API.
2939 * dbus/dbus-message.c: (dbus_message_get_service):
2940 * dbus/dbus-message.h: New function.
2942 * dbus/dbus-server.c: Fix small doc typo.
2944 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2946 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2948 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2949 of the string, just as long as specified.
2951 2003-01-19 Havoc Pennington <hp@pobox.com>
2953 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2956 * dbus/dbus-server.c (dbus_server_set_max_connections)
2957 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2958 keep track of current number of connections, and add API for
2959 setting a max (but haven't implemented enforcing the max yet)
2961 2003-01-18 Havoc Pennington <hp@pobox.com>
2963 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2964 reading/writing if read_watch != NULL or write_watch != NULL.
2966 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2967 the message loader code to actually load message->header and
2968 message->body into the newly-created message.
2970 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2973 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2974 (dbus_connection_get_max_message_size)
2975 (dbus_connection_set_max_live_messages_size)
2976 (dbus_connection_get_max_live_messages_size): implement some
2977 resource limitation functions
2979 * dbus/dbus-resources.c: new file implementing some of the
2980 resource limits stuff
2982 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2983 missing docs, add @todo to handle OOM etc.
2985 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2988 2003-01-18 Havoc Pennington <hp@pobox.com>
2990 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2991 connection if it hasn't been already.
2993 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2994 replace with DisconnectFunction.
2996 2003-01-18 Havoc Pennington <hp@pobox.com>
2998 Building --disable-verbose-mode --disable-asserts --disable-tests
2999 cuts the library from 112K to 45K or so
3001 * configure.in: check for varargs macro support,
3002 add --enable-verbose-mode, --enable-asserts.
3004 * dbus/dbus-internals.h (_dbus_assert): support
3006 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
3008 2003-01-18 Havoc Pennington <hp@pobox.com>
3010 * dbus/dbus-test.c: include config.h so that tests actually run
3012 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
3013 so the failure mode when that assumption fails will be plenty
3016 2003-01-18 Havoc Pennington <hp@pobox.com>
3018 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
3020 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
3023 * test/Makefile.am: don't use special variable "TESTS" for echo-*
3024 since we don't want to use those in make check
3026 2003-01-15 Havoc Pennington <hp@redhat.com>
3032 2003-01-15 Havoc Pennington <hp@redhat.com>
3034 * test/Makefile.am: fix so that test source code ends up in the
3035 distribution on make distcheck
3037 2003-01-15 Havoc Pennington <hp@redhat.com>
3043 2003-01-15 Havoc Pennington <hp@redhat.com>
3045 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
3046 fix build when --disable-tests
3048 * Makefile.am (EXTRA_DIST): put HACKING in here
3050 * HACKING: document procedure for making a tarball release.
3052 2003-01-14 Anders Carlsson <andersca@codefactory.se>
3054 * bus/connection.c: (connection_error_handler),
3055 (bus_connection_setup):
3056 * bus/main.c: (main):
3057 Make sure that the DBusConnectionData struct is NULLed
3058 out to prevent a segfault.
3060 * dbus/dbus-errors.c: (dbus_result_to_string):
3061 * dbus/dbus-errors.h:
3062 * dbus/dbus-message.c: (dbus_message_get_fields),
3063 (dbus_message_get_fields_valist), (_dbus_message_test):
3064 * dbus/dbus-message.h:
3065 Make dbus_message_get_fields return a result code so we can
3066 track invalid fields as well as oom.
3068 2003-01-11 Havoc Pennington <hp@pobox.com>
3070 * configure.in: change --enable-test/--enable-ansi action-if-given
3071 to enable_foo=$enableval instead of enable_foo=yes
3073 2003-01-08 Havoc Pennington <hp@pobox.com>
3075 * dbus/dbus-string.c (_dbus_string_align_length): new function
3077 * dbus/dbus-test-main.c: move main() for test app here
3079 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3080 symbol to run tests, because dbus-test isn't in the main
3083 Code review nitpicks.
3085 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3086 for people with narrow emacs ;-). Assert client_serial was filled
3087 in. Assert message->name != NULL.
3088 (dbus_message_append_fields): have "first_field_type" arg separate
3089 from va list, needed for C++ binding that also uses varargs IIRC
3090 and helps with type safety
3091 (dbus_message_new): add @todo about using DBusString to store
3092 service/name internally
3093 (dbus_message_new): don't leak ->service and ->name on OOM later
3095 (dbus_message_unref): free the service name
3096 (dbus_message_get_fields): same change to varargs
3097 i.e. first_field_type
3098 (_dbus_message_loader_return_buffer): assert that the message data
3099 is aligned (if not it's a bug in our code). Put in verbose griping
3100 about why we set corrupted = TRUE.
3101 (decode_header_data): add FIXME that char* is evil. Was going to
3102 add FIXME about evil locale-specific string.h strncmp, but just
3103 switched to wacky string-as-uint32 optimization. Move check for
3104 "no room for field name" above get_const_data_len() to avoid
3105 assertion failure in get_const_data_len if we have trailing 2
3106 bytes or the like. Check for service and name fields being
3107 provided twice. Don't leak service/name on error. Require field
3108 names to be aligned to 4 bytes.
3110 * dbus/dbus-marshal.c: move byte swap stuff to header
3111 (_dbus_pack_int32): uscore-prefix
3112 (_dbus_unpack_int32): uscore-prefix
3113 (_dbus_unpack_uint32): export
3114 (_dbus_demarshal_string): add @todo complaining about use of
3116 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3117 handling allowing corrupt data to go unchecked
3119 2003-01-08 Havoc Pennington <hp@redhat.com>
3121 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3122 to the select() as needed for authentication. (should be using
3123 _dbus_poll() not select, but for another day)
3125 * dbus/dbus.h: include dbus/dbus-protocol.h
3127 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3129 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3132 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3134 * dbus/dbus-internals.c: (_dbus_type_to_string):
3135 New function that returns a string describing a type.
3137 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3138 * dbus/dbus-marshal.h:
3139 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3140 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3141 (dbus_message_iter_get_byte_array):
3142 * dbus/dbus-message.h:
3143 Add new convenience functions for appending and getting message fields.
3144 Also add demarshalling routines for byte arrays.
3146 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3148 * dbus/dbus-connection-internal.h:
3149 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3150 (_dbus_connection_get_next_client_serial),
3151 (dbus_connection_send_message):
3152 * dbus/dbus-internals.h:
3153 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3154 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3155 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3156 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3157 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3158 (_dbus_verbose_bytes), (_dbus_marshal_test):
3159 * dbus/dbus-marshal.h:
3160 * dbus/dbus-message-internal.h:
3161 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3162 (dbus_message_write_header), (_dbus_message_lock),
3163 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3164 (dbus_message_get_name), (dbus_message_append_int32),
3165 (dbus_message_append_uint32), (dbus_message_append_double),
3166 (dbus_message_append_string), (dbus_message_append_byte_array),
3167 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3168 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3169 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3170 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3171 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3172 (decode_header_data), (_dbus_message_loader_return_buffer),
3173 (message_iter_test), (_dbus_message_test):
3174 * dbus/dbus-message.h:
3175 * dbus/dbus-protocol.h:
3176 * dbus/dbus-test.c: (main):
3178 * glib/test-dbus-glib.c: (message_handler), (main):
3179 * test/echo-client.c: (main):
3180 * test/watch.c: (check_messages):
3181 Make messages sendable and receivable for real.
3183 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3185 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3186 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3187 * dbus/dbus-message.c: (dbus_message_append_int32),
3188 (dbus_message_append_uint32), (dbus_message_append_double),
3189 (dbus_message_append_string), (dbus_message_append_byte_array):
3190 Handle OOM restoration.
3192 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3194 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3195 (_dbus_demarshal_string), (_dbus_marshal_test):
3196 * dbus/dbus-marshal.h:
3197 * dbus/dbus-message.c: (dbus_message_get_name),
3198 Document these functions.
3200 (dbus_message_append_int32), (dbus_message_append_uint32),
3201 (dbus_message_append_double), (dbus_message_append_string),
3202 (dbus_message_append_byte_array):
3203 * dbus/dbus-message.h:
3204 Add functions for adding message fields of different types.
3206 * dbus/dbus-protocol.h:
3207 Add the different types.
3209 2003-01-05 Havoc Pennington <hp@pobox.com>
3211 * bus/connection.c: implement routines for handling connections,
3212 first thing is keeping a list of owned services on each connection
3213 and setting up watches etc.
3215 * bus/services.c: implement a mapping from service names to lists
3218 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3220 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3221 to use static mutexes for global data
3223 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3224 collection of functions to set/get application-specific data
3225 on the DBusConnection.
3227 2003-01-04 Havoc Pennington <hp@pobox.com>
3229 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3230 (_dbus_poll): new function
3232 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3235 * bus/loop.c: initial code for the daemon main loop
3237 2003-01-04 Havoc Pennington <hp@pobox.com>
3239 * test/watch.c (error_handler): make it safe if the error handler
3240 is called multiple times (if we s/error handler/disconnect
3241 handler/ we should just guarantee it's called only once)
3243 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3244 error handler on disconnect (it's quite possible we should
3245 just change the error handler to a "disconnect handler," I'm
3246 not sure we have any other meaningful errors)
3248 * configure.in: check for getpwnam_r
3250 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3251 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3252 mechanism as in SASL spec, using socket credentials
3254 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3255 (_dbus_send_credentials_unix_socket): new function
3257 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3259 (_dbus_write): only check errno if <0 returned
3260 (_dbus_write_two): ditto
3262 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3264 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3265 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3266 (_dbus_marshal_test):
3267 * dbus/dbus-marshal.h:
3268 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3269 to _dbus_marshal_utf8_string. Also fix some tests.
3271 2002-12-28 Harri Porten <porten@kde.org>
3273 * configure.in: added check for C++ compiler and a very cheesy
3274 check for the Qt integration
3276 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3278 * qt/Makefile.am: added
3280 * qt/.cvsignore: added
3282 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3283 latter, added #ifdef QT_THREAD_SUPPORT guard.
3285 * dbus/Makefile.am: added missing headers for make dist
3287 2002-12-28 Kristian Rietveld <kris@gtk.org>
3289 * dbus/Makefile.am: fixup export-symbols-regex.
3291 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3293 * acinclude.m4: Add this file and put the
3294 PKG_CHECK_MODULE macro in it.
3296 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3298 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3299 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3300 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3301 (_dbus_marshal_test):
3302 Make the demarshalling routines align the pos argument.
3303 Add string marshalling tests and fix the obvious bugs
3306 2002-12-26 Havoc Pennington <hp@pobox.com>
3308 * dbus/dbus-auth.c: fixes fixes fixes
3310 * dbus/dbus-transport-unix.c: wire up support for
3311 encoding/decoding data on the wire
3313 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3314 (_dbus_auth_decode_data): append to target string
3315 instead of nuking it.
3317 2002-12-26 Havoc Pennington <hp@pobox.com>
3319 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3320 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3323 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3324 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3325 now). Main point is because I wanted unpack_uint32 to implement
3327 (_dbus_verbose_bytes): new function
3329 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3331 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3332 mechanism to handle a corrupt message stream
3333 (_dbus_message_loader_new): fix preallocation to only prealloc,
3336 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3337 (_dbus_string_test): enhance tests for copy/move and fix the
3340 * dbus/dbus-transport-unix.c: Hold references in more places to
3341 avoid reentrancy problems
3343 * dbus/dbus-transport.c: ditto
3345 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3346 leak reference count in no-message case
3348 * test/watch.c (do_mainloop): handle adding/removing watches
3349 during iteration over the watches. Also, ref the connection/server
3350 stored on a watch, so we don't try to mangle a destroyed one.
3352 * dbus/dbus-transport-unix.c (do_authentication): perform
3355 * dbus/dbus-auth.c (get_state): add a state
3356 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3357 (_dbus_auth_get_unused_bytes): append the unused bytes
3358 to the passed in string, rather than prepend
3360 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3361 the auth conversation DBusAuth
3363 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3364 (_dbus_transport_new_for_domain_socket): when creating a
3365 transport, pass in whether it's a client-side or server-side
3366 transport so we know which DBusAuth to create
3368 2002-12-03 Havoc Pennington <hp@pobox.com>
3370 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3371 _after_ finalizing the derived members
3372 (unix_connection_set): unref watch if we fail to add it
3374 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3375 transport first, so that the connection owned by the
3376 transport will be valid as the transport finalizes.
3378 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3379 if necessary, and remove watches from the connection.
3381 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3383 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3385 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3386 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3387 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3388 (_dbus_marshal_test):
3389 * dbus/dbus-marshal.h:
3390 Add string marshal functions and have the demarshal functions
3391 return the new position.
3393 2002-12-25 Havoc Pennington <hp@pobox.com>
3395 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3396 it is a simple protocol that just maps directly to SASL.
3398 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3399 initial implementation, not actually used yet.
3401 * dbus/dbus-string.c (_dbus_string_find): new function
3402 (_dbus_string_equal): new function
3403 (_dbus_string_base64_encode): new function
3404 (_dbus_string_base64_decode): new function
3406 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3409 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3410 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3411 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3412 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3413 * dbus/dbus-marshal.h:
3414 * dbus/dbus-protocol.h:
3415 * dbus/dbus-test.c: (main):
3417 Add un-optimized marshalling/demarshalling routines.
3419 2002-12-25 Harri Porten <porten@kde.org>
3421 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3423 2002-12-24 Zack Rusin <zack@kde.org>
3425 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3426 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3429 2002-12-24 Havoc Pennington <hp@pobox.com>
3431 * glib/dbus-gthread.c: fix include
3433 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3434 I think glib API needs to change, though, as you don't
3435 want to use DBusMessageFunction, you want to use the
3436 DBusMessageHandler object. Probably
3437 dbus_connection_open_with_g_main_loop()
3438 and dbus_connection_setup_g_main_loop() or something like that
3439 (but think of better names...) that just create a connection
3440 that has watch/timeout functions etc. already set up.
3442 * dbus/dbus-connection.c
3443 (dbus_connection_send_message_with_reply): new function just to
3444 show how the message handler helps us deal with replies.
3446 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3448 * dbus/dbus-string.c (_dbus_string_test): free a string that
3451 * dbus/dbus-hash.c: use memory pools for the hash entries
3452 (rebuild_table): be more paranoid about overflow, and
3453 shrink table when we can
3454 (_dbus_hash_test): reduce number of sprintfs and write
3455 valid C89. Add tests for case where we grow and then
3456 shrink the hash table.
3458 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3460 * dbus/dbus-connection.c (dbus_connection_register_handler)
3461 (dbus_connection_unregister_handler): new functions
3463 * dbus/dbus-message.c (dbus_message_get_name): new
3465 * dbus/dbus-list.c: fix docs typo
3467 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3468 an object representing a handler for messages.
3470 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3473 * glib/dbus-gthread.c: (dbus_gthread_init):
3474 Don't use the gdbus prefix for public functions.
3476 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3480 Add GLib checks and fixup .pc files
3484 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3485 (gdbus_connection_check), (gdbus_connection_dispatch),
3486 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3487 (dbus_connection_gsource_new):
3488 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3489 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3490 * glib/test-dbus-glib.c: (message_handler), (main):
3493 2002-12-15 Harri Porten <porten@kde.org>
3495 * autogen.sh: check for libtoolize before attempting to use it
3497 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3500 * .cvsignore: ignore more stamp files
3502 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3504 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3505 without make install.
3507 2002-12-15 Havoc Pennington <hp@pobox.com>
3509 * dbus/dbus-threads.c: add thread stubs that a higher library
3510 layer can fill in. e.g. the GLib wrapper might fill them in with
3511 GThread stuff. We still need to use this thread API to
3512 thread-safe-ize the library.
3514 2002-12-12 Havoc Pennington <hp@pobox.com>
3516 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3517 below new interfaces and include fewer system headers.
3519 * dbus/dbus-sysdeps.c (_dbus_read): new function
3520 (_dbus_write): new function
3521 (_dbus_write_two): new function
3522 (_dbus_connect_unix_socket): new function
3523 (_dbus_listen_unix_socket): new function
3525 * dbus/dbus-message-internal.h: change interfaces to use
3528 2002-12-11 Havoc Pennington <hp@pobox.com>
3530 * dbus/dbus-types.h: add dbus_unichar
3532 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3534 * dbus/dbus-connection.c (dbus_connection_send_message): return
3537 * dbus/dbus-transport.c: include dbus-watch.h
3539 * dbus/dbus-connection.c: include dbus-message-internal.h
3541 * HACKING: add file with coding guidelines stuff.
3543 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3544 handling here, for security purposes (as in vsftpd). Not actually
3545 using this class yet.
3547 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3548 system/libc usage here, as in vsftpd, for ease of auditing (and
3549 should also simplify portability). Haven't actually moved all the
3550 system/libc usage into here yet.
3552 2002-11-25 Havoc Pennington <hp@pobox.com>
3554 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3555 always print the first verbose message.
3557 2002-11-24 Havoc Pennington <hp@pobox.com>
3559 * test/echo-client.c, test/echo-server.c: cheesy test
3562 * configure.in (AC_CHECK_FUNCS): check for writev
3564 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3567 * dbus/dbus-list.c (_dbus_list_foreach): new function
3569 * dbus/dbus-internals.c (_dbus_verbose): new function
3571 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3572 representing a server that listens for connections.
3574 * dbus/.cvsignore: create
3576 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3577 public API for reporting errors
3579 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3580 public object representing a connection that
3581 sends/receives messages. (Same object used for
3582 both client and server.)
3584 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3585 Basic abstraction for different kinds of stream
3586 that we might read/write messages from.
3588 2002-11-23 Havoc Pennington <hp@pobox.com>
3590 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3593 * dbus/dbus-test.c (main): add list test, and include
3594 dbus-test.h as intended
3596 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3597 (_dbus_hash_table_remove_int): return value indicates
3598 whether the entry existed to remove
3600 * dbus/dbus-list.c: add linked list utility class,
3603 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3606 2002-11-23 Havoc Pennington <hp@pobox.com>
3608 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3609 DBUS_END_DECLS to nothing, that should fix this once and for all
3611 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3613 * dbus/dbus-message.c, dbus/dbus-hash.c:
3614 add some missing @brief
3616 2002-11-23 Havoc Pennington <hp@pobox.com>
3618 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3619 to avoid confusing Doxygen
3621 * dbus/dbus-hash.c: @} not }@
3623 * dbus/dbus-message.c (struct DBusMessage): split out
3626 2002-11-23 Havoc Pennington <hp@pobox.com>
3628 * configure.in: pile on more warning flags if using gcc
3630 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3631 to document static functions
3633 * configure.in: add summary to end of configure so it
3634 looks nice and attractive
3636 * dbus/dbus-hash.c: finish implementation and write unit
3639 * configure.in: add --enable-tests to enable unit tests
3641 * dbus/dbus-test.c: test program to run unit tests
3642 for all files in dbus/*, initially runs a test for
3645 * dbus/dbus-internals.h: file to hold some internal utility stuff
3647 2002-11-22 Havoc Pennington <hp@redhat.com>
3649 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3650 "ported" away from Tcl
3652 * dbus/dbus-types.h: header for types such as dbus_bool_t
3654 2002-11-22 Havoc Pennington <hp@redhat.com>
3656 * dbus/dbus.h: fixups for doc warnings
3658 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3660 (QUIET): make it quiet so we can see warnings
3662 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3664 2002-11-22 Havoc Pennington <hp@redhat.com>
3666 * Makefile.am: include "Doxyfile" target in all-local
3668 * configure.in: generate the Doxyfile
3670 * Doxyfile.in: move Doxyfile here, so we can use
3671 configure to generate a Doxyfile with the right
3674 2002-11-22 Havoc Pennington <hp@redhat.com>
3676 * dbus/dbus-message.c: move inline docs into .c file
3678 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3679 so all docs are under doc/
3680 (MAN_EXTENSION): generate man pages. Use extension
3681 ".3dbus" which matches ".3qt" on my system,
3682 I guess this is OK, I don't know really.
3683 (FILE_PATTERNS): look for .c files not .h, makes sense
3686 2002-11-22 Havoc Pennington <hp@pobox.com>
3688 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3689 because any app can be a server, and any app can be a client,
3690 the bus is a special kind of server.
3692 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3694 * Doxyfile : adding. Still needs Makefile rules to be generated
3695 automatically (just run "doxygen" in the toplevel dir for now to
3698 * dbus/dbus-message.h : Adding sample docs (javadoc since
3699 resembles gtk-doc a little more)
3701 * dbus/dbus.h : Adding sample docs
3703 2002-11-21 Havoc Pennington <hp@redhat.com>
3705 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3706 so we can allow ourselves to include files directly,
3707 instead of having to use dbus.h
3709 * dbus/dbus.h: fill in
3711 * dbus/dbus-message.h: sketch out a sample header file.
3712 Include griping if you include it directly instead of
3715 * dbus/dbus-macros.h: new file with macros for extern "C",
3716 TRUE/FALSE, NULL, etc.
3718 * doc/file-boilerplate.c: put include guards in here
3720 2002-11-21 Havoc Pennington <hp@redhat.com>
3722 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3724 * COPYING: include the GPL as well, and license code
3725 under both AFL and GPL.
3727 2002-11-21 Havoc Pennington <hp@redhat.com>
3729 * acconfig.h: get rid of this
3731 * autogen.sh (run_configure): add --no-configure option
3733 * configure.in: remove AC_ARG_PROGRAM to make
3734 autoconf complain less. add AC_PREREQ.
3735 add AC_DEFINE third arg.
3737 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3740 Fix references so we can distcheck.
3742 2002-11-21 Havoc Pennington <hp@redhat.com>
3744 * Initial module creation