1 2003-04-06 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
4 so it detects deadlocks and also we actually init threads when
7 2003-04-06 Havoc Pennington <hp@pobox.com>
9 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
10 save the domain socket name, and unlink it when we disconnect the
11 server. Means that at least when we exit normally, we won't leave
12 a bunch of junk in /tmp
14 * dbus/dbus-transport-unix.c
15 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
16 memory management). (I was making a real change here but then
19 2003-04-06 Havoc Pennington <hp@pobox.com>
21 * bus/bus.c (bus_context_new): fix wrong handling of
22 server_data_slot_unref() in the error case.
24 * dbus/dbus-internals.h (_dbus_assert): change so it passes
25 "(condition) != 0" to _dbus_real_assert so that
26 "_dbus_assert (pointer)" doesn't cause a warning
28 * bus/main.c (main): accept --print-address option to print out
29 the message bus address
31 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
33 * dbus/dbus-transport.c (_dbus_transport_open): special error for
34 "tmpdir" option to unix: address on client side
36 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
39 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
40 we can use to create sockets in the test suite.
42 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
43 cleanly. To be used for testing.
45 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
47 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
49 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
50 handle trying to call this when there's no servers active
52 2003-04-05 Havoc Pennington <hp@pobox.com>
58 2003-04-05 Havoc Pennington <hp@pobox.com>
60 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
61 crash on startup. Need to get "try starting the daemon"
62 in the test suite I guess. ;-)
64 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
65 tracked the number of open connections; it's better done in
66 application-specific code as you want it to span all servers etc.
68 2003-04-05 Havoc Pennington <hp@pobox.com>
70 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
71 patch from Colin Walters
73 2003-04-05 Havoc Pennington <hp@pobox.com>
75 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
76 reality; in fact multiple mechanisms are allowed.
78 * dbus/dbus-internals.c (_dbus_real_assert)
79 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
80 _dbus_assert_not_reached() into functions, so that they don't show
81 up in basic block counts for test coverage, and don't use up as
82 much disk space. Does mean slower execution speed though, so
83 assumes --disable-asserts is the normal production case.
85 2003-04-05 Havoc Pennington <hp@pobox.com>
87 * test/Makefile.am (dist-hook): also dist *.in files
93 2003-04-05 Havoc Pennington <hp@pobox.com>
95 * dbus/dbus-string.c: docs warning
97 * dbus/dbus-spawn.c: missing docs
99 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
101 2003-04-05 Havoc Pennington <hp@pobox.com>
103 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
106 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
107 to -1 once we've reaped the babysitter
108 (_dbus_babysitter_handle_watch): do as much work as we can, not
111 * bus/activation.c: add code using DBusBabysitter so that we
112 handle it when a service fails to start up properly.
113 (bus_activation_service_created): don't remove the activation
114 entries as we go, just let them get removed when we free the pending
115 activation. Unref reply messages after sending them.
117 2003-04-05 Havoc Pennington <hp@pobox.com>
119 * test/decode-gcov.c (main): print per-directory stats in the report
121 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
123 2003-04-05 Havoc Pennington <hp@pobox.com>
125 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
127 * test/decode-gcov.c: hack up a little program to suck data
128 out of gcov files. Yes this is sort of silly.
130 * configure.in: define something in config.h and do an
131 AM_CONDITIONAL when gcov is enabled
133 2003-04-04 Havoc Pennington <hp@redhat.com>
135 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
136 return a "babysitter" object that is used to monitor the status of
137 the spawned process and reap it when required.
139 * test/test-segfault.c, test/test-exit.c,
140 test/test-sleep-forever.c: binaries that do various lame things,
141 used in the test suite.
143 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
145 2003-04-03 Havoc Pennington <hp@pobox.com>
147 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
148 in preparation for modifying it, dbus-sysdeps is getting
151 2003-04-03 Havoc Pennington <hp@redhat.com>
153 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
156 * bus/*.[hc]: adapt to mainloop change
158 2003-04-03 Havoc Pennington <hp@redhat.com>
160 * bus/activation.c (load_directory): fix up memleaks
161 (bus_activation_entry_free): free the entry
163 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
164 we get one from the message bus; fix memleaks.
166 * dbus/dbus-message.c (dbus_set_error_from_message): new function
168 2003-04-03 Havoc Pennington <hp@pobox.com>
170 * bus/config-parser.c (bus_config_parser_unref): free
171 list of mechanisms, bug discovered by test suite enhancements
172 (putting system.conf and session.conf into suite)
174 * test/Makefile.am, test/test-service.c: add placeholder for a
175 test service that we'll activate as part of test suite. Doesn't
178 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
179 setting NULL value, and use system malloc not dbus_malloc()
180 when we have unavoidable memleakage.
182 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
183 didn't work, and support DBUS_BUS_ACTIVATION.
185 * bus/activation.c (child_setup): pass our well-known bus type to
188 * bus/config-parser.c: support <type> to specify well-known type
190 * doc/dbus-specification.sgml: document the env variables to
191 locate well-known buses and find service activator
193 2003-04-02 Havoc Pennington <hp@redhat.com>
195 * test/Makefile.am (all-local): add a rule to copy tests to
196 builddir, so we can have generated tests. Use this to remove the
197 silly hack for testing system.conf and session.conf. Will use this
198 shortly to generate .service files pointing to test binaries.
200 2003-04-02 Havoc Pennington <hp@redhat.com>
202 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
203 current alloc and needed new length, not max of the doubled
204 allocation and needed new length. Also, when building tests,
205 don't do the double-allocation stuff, just realloc every time.
207 2003-04-02 Havoc Pennington <hp@redhat.com>
209 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
211 (_dbus_string_get_dirname): new
212 (_dbus_sysdeps_test): new
213 (_dbus_directory_open): include dirnames in error messages
215 * bus/config-parser.c: interpret <include> and <includedir> and
216 <servicedir> relative to config file location if the given
217 filename is not absolute.
219 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
221 2003-04-02 Havoc Pennington <hp@redhat.com>
223 * bus/connection.c (bus_transaction_send_error_reply): set sender
224 service for the error, and unref the reply on success
226 * bus/activation.c: convert to use BusTransaction so OOM can be
228 (bus_activation_service_created): set sender of the message
230 2003-04-01 Havoc Pennington <hp@redhat.com>
232 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
233 <includedir> (at least mostly)
235 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
236 first, then the user ID
238 2003-04-01 Havoc Pennington <hp@pobox.com>
240 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
243 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
245 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
247 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
248 socket 0777, and unlink any existing socket.
250 * bus/bus.c (bus_context_new): change our UID/GID and fork if
251 the configuration file so specifies; set up auth mechanism
254 * bus/config-parser.c (bus_config_parser_content): add support
255 for <fork> option and fill in code for <auth>
257 * bus/system.conf.in: add <fork/> to default configuration,
258 and limit auth mechanisms to EXTERNAL
260 * doc/config-file.txt (Elements): add <fork>
262 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
263 (_dbus_change_identity): new function
265 2003-03-31 Havoc Pennington <hp@redhat.com>
267 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
268 (_dbus_listen_unix_socket): fix off-by-one error in null
269 termination spotted by Nalin
271 2003-03-31 Havoc Pennington <hp@redhat.com>
273 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
274 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
275 having a real home directory available.
277 2003-03-31 Havoc Pennington <hp@redhat.com>
279 * bus/Makefile.am (install-data-hook): create /var/run/dbus
281 * bus/messagebus.in: add init script for Red Hat /etc/init.d
283 * configure.in: add support for specifying a style of init script
286 2003-03-31 Havoc Pennington <hp@redhat.com>
288 Fix some annoying DBusString API and fix all affected code.
290 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
292 (_dbus_string_get_data): change to return string instead of using
294 (_dbus_string_get_const_data): ditto
295 (_dbus_string_get_data_len): ditto
296 (_dbus_string_get_const_data_len): ditto
298 2003-03-31 Havoc Pennington <hp@redhat.com>
300 * bus/main.c (main): fix up the command line arguments to be nicer
302 2003-03-31 Havoc Pennington <hp@redhat.com>
304 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
305 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
306 final location that lands in the config file
308 * bus/config-loader-expat.c (bus_config_load): fix type of
311 * doc/TODO: remove TODO item for dbus_bus_get()
313 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
315 2003-03-31 Havoc Pennington <hp@pobox.com>
317 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
318 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
319 argument since they are always client side
321 * dbus/dbus-server.c (dbus_server_get_address): new function
323 * bus/main.c (main): take the configuration file as an argument.
325 * test/data/valid-config-files/debug-allow-all.conf: new file to
326 use with dispatch.c tests for example
328 * bus/test-main.c (main): require test data dir
330 * bus/bus.c (bus_context_new): change this to take a
331 configuration file name as argument
333 * doc/config-file.txt (Elements): add <servicedir>
335 * bus/system.conf, bus/session.conf: new files
337 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
338 well-known socket if none set
340 * configure.in: create system.conf and session.conf
342 2003-03-30 Havoc Pennington <hp@pobox.com>
344 * bus/config-parser.c: hacking
346 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
347 to shut down, since it could cause weirdness with the DBusList
350 * dbus/dbus-list.c (_dbus_list_test): add tests for the
351 link-oriented stack routines
352 (alloc_link): free the mempool if the first alloc from it fails
354 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
356 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
358 (_dbus_string_skip_white): new
360 * doc/config-file.txt (Elements): add <includedir>
362 2003-03-28 Havoc Pennington <hp@pobox.com>
364 * dbus/dbus-string.c (_dbus_string_copy_data_len)
365 (_dbus_string_copy_data): new functions
367 2003-03-28 Anders Carlsson <andersca@codefactory.se>
369 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
373 * dbus/dbus-memory.c:
376 2003-03-28 Havoc Pennington <hp@pobox.com>
378 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
379 I think it may have just been superstition. Not sure.
381 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
382 failures that were not being handled.
384 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
386 * dbus/dbus-memory.c: add ability to set number of mallocs in a
387 row that will fail on out-of-memory.
389 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
390 function for testing out-of-memory handling.
392 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
393 allocation functions, they do map exactly to the expat ones.
395 2003-03-27 Havoc Pennington <hp@redhat.com>
397 * bus/config-loader-libxml.c (bus_config_load): add another error
400 2003-03-26 Anders Carlsson <andersca@codefactory.se>
403 Add note about automatic service activation.
405 * doc/dbus-specification.sgml:
406 Rename the specification and clarify a few things.
408 2003-03-26 Anders Carlsson <andersca@codefactory.se>
411 * dbus/dbus-address.c:
413 * dbus/dbus-marshal.c:
414 * dbus/dbus-server-debug-pipe.c:
415 * dbus/dbus-transport-unix.c:
416 Fix documentation warnings.
418 2003-03-26 Havoc Pennington <hp@pobox.com>
420 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
421 after every test so it's quick and easy to see which leaked, and
422 so we test multiple dbus_shutdown() calls
424 * configure.in: change configure.in XML stuff to also support
427 * config-loader-libxml.c: some hacking
429 * config-loader-expat.c: some hacking
431 * config-parser.c: some hacking, plus tests
433 2003-03-25 Havoc Pennington <hp@redhat.com>
435 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
437 * configure.in: add --with-xml option to specify XML library,
438 right now only libxml is supported.
440 * bus/config-loader-libxml.c, config-parser.c: sync some minor
441 nonworking code between home and work, still just stubs
443 2003-03-24 Havoc Pennington <hp@redhat.com>
445 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
448 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
449 NULL argument for "message" if the error is a well-known one,
450 fill in a generic message in this case.
452 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
455 * bus/test.c (bus_test_flush_bus): add
457 * bus/policy.c (bus_policy_test): test code stub
459 2003-03-24 Havoc Pennington <hp@pobox.com>
461 * bus/connection.c (bus_connections_setup_connection): set up
462 the "can this user connect" function, but it always returns
463 TRUE until we have a config file parser so we can have a config
464 file that allows connections.
466 2003-03-23 Havoc Pennington <hp@pobox.com>
468 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
469 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
470 the mutex, so we can check for proper memory management
473 * dbus/dbus-dataslot.c: remove the mutex from
474 DBusDataSlotAllocator and lock it manually when using it,
475 to simplify fitting it into the global slots framework.
477 * dbus/dbus-threads.c (init_static_locks): rework how we're
478 handling global locks so they are easily shut down.
480 * bus/policy.c (bus_policy_append_rule): fix
482 * bus/test-main.c (main): check for memleaks
484 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
485 test suite check for memleaks
487 * dbus/dbus-memory.c: add support in test mode for tracking
488 number of outstanding blocks
490 2003-03-23 Havoc Pennington <hp@pobox.com>
492 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
495 * dbus/dbus-hash.h: add ULONG hash keys
497 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
498 (_dbus_get_group_id): new function
500 2003-03-20 Havoc Pennington <hp@redhat.com>
502 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
504 (dbus_connection_get_unix_user): new function
506 2003-03-20 Havoc Pennington <hp@pobox.com>
508 * bus/connection.c (bus_connection_send_oom_error): assert that
510 (connection_execute_transaction): ditto
511 (bus_connection_preallocate_oom_error): fix to set the sender, and
512 set recipient to the destination service, not the bus driver
514 * bus/policy.c: hacking
516 * dbus/dbus-message.c (dbus_message_service_is): new function
517 (dbus_message_sender_is): new
519 2003-03-19 Havoc Pennington <hp@redhat.com>
521 * bus/policy.c: start sketching code for policy restrictions on
522 what connections can do.
524 2003-03-18 Havoc Pennington <hp@redhat.com>
526 * doc/TODO: some notes on high-level todo items. Little nitpick
527 stuff is all in @todo, so no need to add it here.
529 * doc/config-file.txt: some notes on how config file might look
531 2003-03-18 Anders Carlsson <andersca@codefactory.se>
537 2003-03-17 Havoc Pennington <hp@redhat.com>
539 * dbus/dbus-internals.h: add gcc attributes so that
540 our printf-style functions warn on bad arguments to
543 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
546 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
549 2003-03-17 Havoc Pennington <hp@redhat.com>
551 * bus/test-main.c (main): make it print something as it runs
552 so make check doesn't look stuck
554 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
555 from CVS, now obsolete
557 2003-03-17 Anders Carlsson <andersca@codefactory.se>
559 * bus/dispatch.c: (bus_dispatch):
560 Refetch the service name since it may have been reallocated
561 when dbus_message_set_sender was called.
563 * dbus/dbus-sysdeps.c: (_dbus_accept):
564 Add address and address length variables and use them to stop
565 valgrind from complaining.
567 2003-03-17 Havoc Pennington <hp@pobox.com>
569 All tests pass, no memleaks, no valgrind complaints.
571 * bus/test.c: refcount handler_slot
573 * bus/connection.c (bus_connections_new): refcount
576 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
577 bytes so that auth scripts pass.
579 * bus/dispatch.c: init message_handler_slot so it gets allocated
582 * bus/dispatch.c (message_handler_slot_ref): fix memleak
584 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
585 dealloc server_pipe_hash when no longer used for benefit of
588 * dbus/dbus-auth.c (process_command): memleak fix
590 * bus/dispatch.c (check_hello_message): memleak fix
592 2003-03-16 Havoc Pennington <hp@pobox.com>
594 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
596 2003-03-17 Anders Carlsson <andersca@codefactory.se>
598 * bus/activation.c (bus_activation_activate_service): Append
599 the pending activation entry to the list of pending activations.
601 2003-03-16 Havoc Pennington <hp@pobox.com>
603 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
606 * dbus/dbus-address.c (create_entry): fix OOM handling when
607 failing to alloc entry->method
609 2003-03-16 Havoc Pennington <hp@pobox.com>
611 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
614 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
615 add some missing dbus_set_result
617 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
618 alloc the DBusMessageHandler
620 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
621 the transport here, since we call this from the finalizer; it
622 resulted in a double-finalize.
624 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
625 where we tried to use transport->connection that was NULL,
626 happened when transport was disconnected early on due to OOM
628 * bus/*.c: adapt to handle OOM for watches/timeouts
630 * dbus/dbus-transport-unix.c: port to handle OOM during
633 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
634 reference to unused bytes instead of a copy
636 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
639 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
642 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
645 2003-03-16 Anders Carlsson <andersca@codefactory.se>
647 * doc/dbus-specification.sgml:
648 Document reply message for ActivateService.
650 2003-03-16 Anders Carlsson <andersca@codefactory.se>
652 * bus/activation.c: (bus_pending_activation_entry_free),
653 (bus_pending_activation_free), (bus_activation_new),
654 (bus_activation_unref), (bus_activation_service_created),
655 (bus_activation_activate_service):
657 * bus/bus.c: (bus_context_new):
658 * bus/desktop-file.c: (new_section):
659 * bus/driver.c: (bus_driver_send_service_deleted),
660 (bus_driver_handle_activate_service):
661 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
663 * dbus/dbus-connection.c:
664 (dbus_connection_send_with_reply_and_block):
665 * dbus/dbus-message.c: (dbus_message_append_args_valist):
666 * dbus/dbus-protocol.h:
667 Make activation work better. Now pending activations will be queued
668 and the daemon won't try to activate services that are already registered.
670 2003-03-16 Havoc Pennington <hp@pobox.com>
672 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
675 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
676 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
678 2003-03-16 Havoc Pennington <hp@pobox.com>
680 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
681 this. always run the test suite before commit...
683 * bus/*: adapt to DBusConnection API changes
685 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
686 requires renaming stuff to avoid dbus_connection_dispatch name
689 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
692 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
693 separate from _dbus_message_loader_return_buffer()
695 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
696 this, because it's now always broken to use; the number of
697 messages in queue vs. the number still buffered by the message
698 loader is undefined/meaningless. Should use
699 dbus_connection_get_dispatch_state().
700 (dbus_connection_dispatch): rename from
701 dbus_connection_dispatch_message
703 2003-03-16 Havoc Pennington <hp@pobox.com>
705 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
708 2003-03-16 Anders Carlsson <andersca@codefactory.se>
710 * dbus/dbus-connection.c:
711 (dbus_connection_send_with_reply_and_block):
712 Decrease connection->n_incoming when removing an entry
714 * dbus/dbus-dict.c: (dbus_dict_entry_free),
715 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
716 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
717 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
718 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
719 (dbus_dict_get_byte_array):
720 Handle NULL arrays and strings. Also add support for byte arrays.
722 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
723 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
724 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
725 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
726 (_dbus_demarshal_dict), (demarshal_and_validate_len),
727 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
728 * dbus/dbus-marshal.h:
729 Add support for marshalling and demarshalling empty arrays and strings.
731 * dbus/dbus-message.c: (dbus_message_append_args_valist),
732 (dbus_message_append_string_array),
733 (dbus_message_iter_get_boolean),
734 (dbus_message_iter_get_boolean_array),
735 (dbus_message_iter_get_int32_array),
736 (dbus_message_iter_get_uint32_array),
737 (dbus_message_iter_get_double_array),
738 (dbus_message_iter_get_byte_array),
739 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
740 (check_message_handling):
741 Add support for getting empty arrays and dicts.
743 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
744 Don't do any validation at all for now, that's better than just checking
747 * test/data/valid-messages/emptiness.message:
748 New test message with lots of empty arrays.
750 2003-03-16 Havoc Pennington <hp@pobox.com>
752 * dbus/dbus-connection.c
753 (_dbus_connection_queue_received_message_link): new function that
754 can't fail due to OOM
756 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
757 new function pops a message together with a list link
760 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
761 message queuing functions to avoid needing to alloc memory
763 2003-03-16 Havoc Pennington <hp@pobox.com>
765 Oops - test code was only testing failure of around 30 of the
766 mallocs in the test path, but it turns out there are 500+
767 mallocs. I believe this was due to misguided linking setup such
768 that there was one copy of dbus_malloc etc. in the daemon and one
769 in the shared lib, and only daemon mallocs were tested. In any
770 case, the test case now tests all 500+ mallocs, and doesn't pass
771 yet, though there are lots of fixes in this patch.
773 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
774 this so that it doesn't need to allocate memory, since it
775 has no way of indicating failure due to OOM (and would be
778 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
780 * bus/Makefile.am: rearrange to create two self-contained
781 libraries, to avoid having libraries with overlapping symbols.
782 that was resulting in weirdness, e.g. I'm pretty sure there
783 were two copies of global static variables.
785 * dbus/dbus-internals.c: move the malloc debug stuff to
788 * dbus/dbus-list.c (free_link): free list mempool if it becomes
791 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
793 * dbus/dbus-address.c (dbus_parse_address): free list nodes
796 * bus/dispatch.c (bus_dispatch_add_connection): free
797 message_handler_slot when no longer using it, so
798 memory leak checkers are happy for the test suite.
800 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
802 * bus/bus.c (new_connection_callback): disconnect in here if
803 bus_connections_setup_connection fails.
805 * bus/connection.c (bus_connections_unref): fix to free the
807 (bus_connections_setup_connection): if this fails, don't
808 disconnect the connection, just be sure there are no side
811 * dbus/dbus-string.c (undo_alignment): unbreak this
813 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
815 (_dbus_auth_new): fix the order in which we free strings
818 * bus/connection.c (bus_connection_disconnected): fix to
819 not send ServiceDeleted multiple times in case of memory
822 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
823 get the base service name
824 (dbus_bus_register_client): don't return base service name,
825 instead store it on the DBusConnection and have an accessor
827 (dbus_bus_register_client): rename dbus_bus_register()
829 * bus/dispatch.c (check_hello_message): verify that other
830 connections on the bus also got the correct results, not
831 just the one sending hello
833 2003-03-15 Havoc Pennington <hp@pobox.com>
835 Make it pass the Hello handling test including all OOM codepaths.
836 Now to do other messages...
838 * bus/services.c (bus_service_remove_owner): fix crash when
839 removing owner from an empty list of owners
840 (bus_registry_ensure): don't leave service in the list of
841 a connection's owned services if we fail to put the service
844 * bus/connection.c (bus_connection_preallocate_oom_error): set
845 error flag on the OOM error.
847 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
848 handle _dbus_transport_set_connection failure
850 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
851 to create watches up front and simply enable/disable them as
853 (unix_connection_set): this can now fail on OOM
855 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
856 of enabling/disabling a watch or timeout.
858 * bus/loop.c (bus_loop_iterate): don't touch disabled
861 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
863 2003-03-15 Havoc Pennington <hp@pobox.com>
865 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
866 write useful test code, after all that futzing around ;-)
868 Test does not yet pass because we can't handle OOM in
869 _dbus_transport_messages_pending (basically,
870 dbus_connection_preallocate_send() does not prealloc the write
871 watch). To fix this, I think we need to add new stuff to
872 set_watch_functions, namely a SetEnabled function so we can alloc
873 the watch earlier, then enable it later.
875 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
876 dbus-memory.c to the convenience lib
878 * bus/test.c: rename some static functions to keep them clearly
879 distinct from stuff in connection.c. Handle client disconnection.
881 2003-03-14 Havoc Pennington <hp@pobox.com>
883 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
884 transport, tests more of the real codepath. Set up clients
885 with bus_setup_debug_client.
887 * bus/test.c (bus_setup_debug_client): function to set up debug
888 "clients" on the main loop
890 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
893 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
896 * dbus/dbus-server-debug.c: support a debug server based on pipes
898 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
899 (_dbus_close): new function
901 * configure.in: check for socketpair
903 2003-03-14 Havoc Pennington <hp@redhat.com>
905 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
908 * dbus/dbus-transport-debug.c: rework this a good bit to be
909 less complicated. hopefully still works.
911 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
914 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
917 * dbus/dbus-message.c (dbus_message_copy): rename from
918 dbus_message_new_from_message, fix it up to copy
919 all the message fields, add test case
921 * bus/dispatch.c (bus_dispatch_test): add some more test code,
922 not quite passing yet
924 2003-03-14 Havoc Pennington <hp@pobox.com>
926 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
927 until no work remains" in test code. (the large diff here
928 is just code movement, no actual changes)
930 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
931 1, no point waiting around for test code.
932 (_dbus_server_debug_accept_transport): unref the timeout
933 after adding it (right?)
935 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
937 2003-03-13 Havoc Pennington <hp@redhat.com>
939 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
942 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
945 * dbus/dbus-connection.h: Make AddWatchFunction and
946 AddTimeoutFunction return a bool so they can fail on out-of-memory
948 * bus/bus.c (bus_context_new): set up timeout handlers
950 * bus/connection.c (bus_connections_setup_connection): set up
953 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
956 * bus/bus.c (bus_context_new): adapt to changes
958 * bus/connection.c: adapt to changes
960 * test/watch.c: adapt to DBusWatch changes
962 * bus/dispatch.c (bus_dispatch_test): started adding this but
965 2003-03-14 Anders Carlsson <andersca@codefactory.se>
967 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
969 2003-03-13 Havoc Pennington <hp@pobox.com>
971 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
972 set up a test framework as for the library
974 2003-03-12 Havoc Pennington <hp@pobox.com>
976 Throughout: purge global variables, introduce BusActivation,
977 BusConnections, BusRegistry, etc. objects instead.
979 * bus/bus.h, bus/bus.c: introduce BusContext as a global
982 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
983 going to redo this a bit differently I think
985 2003-03-12 Havoc Pennington <hp@redhat.com>
987 Mega-patch that gets the message bus daemon initially handling
988 out-of-memory. Work still needed. Also lots of random
989 moving stuff to DBusError instead of ResultCode.
991 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
993 * dbus/dbus-connection.c
994 (dbus_connection_send_with_reply_and_block): use DBusError
996 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
999 * dbus/dbus-connection.c (dbus_connection_send): drop the result
1000 code here, as the only failure possible is OOM.
1002 * bus/connection.c (bus_connection_disconnect):
1003 rename bus_connection_disconnected as it's a notification only
1005 * bus/driver.c (bus_driver_handle_acquire_service): don't free
1006 "name" on get_args failure, should be done by get_args;
1007 don't disconnect client for bad args, just return an error.
1008 (bus_driver_handle_service_exists): ditto
1010 * bus/services.c (bus_services_list): NULL-terminate returned array
1012 * bus/driver.c (bus_driver_send_service_lost)
1013 (bus_driver_send_service_acquired): send messages from driver to a
1014 specific client to the client's unique name, not to the broadcast
1017 * dbus/dbus-message.c (decode_header_data): reject messages that
1018 contain no name field
1019 (_dbus_message_get_client_serial): rename to
1020 dbus_message_get_serial and make public
1021 (_dbus_message_set_serial): rename from set_client_serial
1022 (_dbus_message_set_reply_serial): make public
1023 (_dbus_message_get_reply_serial): make public
1025 * bus/connection.c (bus_connection_foreach): allow stopping
1026 iteration by returning FALSE from foreach function.
1028 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
1029 (dbus_connection_free_preallocated_send)
1030 (dbus_connection_preallocate_send): new API for sending a message
1031 without possibility of malloc failure.
1032 (dbus_connection_send_message): rename to just
1033 dbus_connection_send (and same for whole function family)
1035 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
1037 * dbus/dbus-sysdeps.c (_dbus_exit): new function
1039 * bus/activation.c: handle/return errors
1041 * dbus/dbus-errors.h: add more DBUS_ERROR #define
1043 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
1044 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
1045 (_dbus_result_from_errno): move to this file
1047 2003-03-10 Anders Carlsson <andersca@codefactory.se>
1049 * dbus/dbus-marshal.c:
1050 (_dbus_marshal_set_string):
1051 Take a length argument so we can marshal the correct string
1054 (_dbus_marshal_dict), (_dbus_demarshal_dict),
1055 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
1056 (_dbus_marshal_test):
1057 * dbus/dbus-marshal.h:
1058 Add support for marshalling and demarshalling dicts.
1060 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1061 Add support for TYPE DICT.
1063 * dbus/dbus-message.c: (set_string_field):
1064 Adjust header padding.
1066 (dbus_message_append_args_valist), (dbus_message_append_dict),
1067 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1068 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1069 (check_message_handling), (check_have_valid_message):
1070 * dbus/dbus-message.h:
1071 Add functions for setting and getting dicts.
1073 * dbus/dbus-protocol.h:
1079 * doc/dbus-specification.sgml:
1080 Add information about how dicts are marshalled.
1082 * test/data/invalid-messages/dict-with-nil-value.message:
1083 * test/data/invalid-messages/too-short-dict.message:
1084 * test/data/valid-messages/dict-simple.message:
1085 * test/data/valid-messages/dict.message:
1086 Add sample messages containing dicts.
1088 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1090 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1092 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1095 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1096 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1097 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1098 (dbus_dict_set_double), (dbus_dict_set_string),
1099 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1100 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1101 (dbus_dict_set_string_array), (_dbus_dict_test):
1103 Fix according to comments from Havoc.
1105 2003-03-06 Michael Meeks <michael@server.home>
1107 * configure.in: if we don't have kde-config, disable have_qt.
1109 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1114 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1115 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1116 (dbus_dict_remove), (dbus_dict_get_value_type),
1117 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1118 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1119 (dbus_dict_put_double), (dbus_dict_put_string),
1120 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1121 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1122 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1123 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1124 (dbus_dict_get_double), (dbus_dict_get_string),
1125 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1126 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1127 (dbus_dict_get_string_array), (_dbus_dict_test):
1129 Add DBusDict implementation
1131 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1135 2003-03-04 Havoc Pennington <hp@pobox.com>
1137 * test/data/auth/*: adapt to changes
1139 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1140 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1143 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1144 more stuff from being in a context name, to make the protocol
1145 simpler to deal with
1147 * dbus/dbus-errors.c (dbus_error_has_name): new function
1148 (dbus_error_is_set): new function
1150 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1151 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1153 * dbus/dbus-connection.c (dbus_connection_flush): also read
1154 messages during a flush operation
1156 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1158 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1160 * configure.in: Check for gethostbyname on Solaris.
1162 * dbus/dbus-transport.c: (_dbus_transport_open):
1163 Remove duplicate "tcp" entry.
1165 * doc/dbus-specification.sgml:
1166 Clarify some things.
1168 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1170 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1171 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1172 (_dbus_keyring_test):
1173 * dbus/dbus-md5.c: (_dbus_md5_compute):
1174 * dbus/dbus-sha.c: (_dbus_sha_compute):
1177 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1179 * README: Add some things.
1181 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1183 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1184 after case DBUS_TYPE_BOOELAN.
1186 2003-03-02 Havoc Pennington <hp@pobox.com>
1188 * test/break-loader.c (randomly_set_extreme_ints): add test that
1189 sets really huge and small integers
1191 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1192 that length of boolean array fits in the string, and that
1193 string has room for boolean value in single-bool case.
1195 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1196 optional value to "ALIGN" command which is what to fill the
1199 * test/data/valid-messages/no-padding.message: add regression
1200 test for the message padding problem
1202 2003-03-02 Havoc Pennington <hp@pobox.com>
1204 * dbus/dbus-message.c (decode_header_data): fix to always init
1205 message_padding, from Benjamin Dauvergne
1207 2003-03-02 Havoc Pennington <hp@pobox.com>
1213 2003-03-01 Joe Shaw <joe@assbarn.com>
1215 * configure.in: Check for "struct cmsgcred" and try to access its
1216 members for BSD-like unices.
1218 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1219 _dbus_read_credentials_unix_socket().
1220 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1221 read() for reading the credential byte off the unix socket. Use
1222 struct cmsgcred on systems that support it.
1224 2003-02-27 Alexander Larsson <alexl@redhat.com>
1228 Make gthreads-2.0 dependency optional. Don't build thread test if
1231 2003-02-27 Havoc Pennington <hp@pobox.com>
1233 * dbus/dbus-connection.c
1234 (dbus_connection_send_message_with_reply_and_block): fix doh!
1235 doh! doh! bug that resulted in never removing a reply from the
1236 queue, no wonder we called get_reply_serial so much ;-)
1238 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1239 and client serial instead of demarshaling them every time
1241 2003-02-27 Havoc Pennington <hp@pobox.com>
1243 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1244 more inlined, using dbus-string-private.h, speeds things up
1247 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1248 when freeing the string
1249 (_dbus_string_steal_data): fix for align offset
1250 (undo_alignment): new function
1252 2003-02-26 Havoc Pennington <hp@redhat.com>
1254 All kinds of audit fixes from Owen, plus initial attempt to
1255 handle unaligned memory returned from malloc.
1257 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1258 leave room for align_offset and nul byte
1259 (fixup_alignment): function to track an align_offset and
1260 ensure real->str is aligned
1261 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1262 to allow a nul byte plus align offset
1263 (_dbus_string_lock): fix overflow issue
1264 (_dbus_string_init_const_len): add assertions on sanity of len,
1265 assign allocated to be ALLOCATION_PADDING larger than len
1266 (set_length): fixup the overflow handling
1267 (_dbus_string_get_data_len): fix overflow in assertion
1268 (open_gap): detect overflow in size of gap to be opened
1269 (_dbus_string_lengthen): add overflow check
1270 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1271 (_dbus_string_append): add overflow check
1272 (_dbus_string_append_unichar): overflow
1273 (_dbus_string_delete): fix overflow in assertion
1274 (_dbus_string_copy_len): overflow in assertion
1275 (_dbus_string_replace_len): overflows in assertions
1276 (_dbus_string_find): change to implement in terms of
1277 _dbus_string_find_to
1278 (_dbus_string_find_to): assorted fixage
1279 (_dbus_string_equal_c_str): assert c_str != NULL,
1280 fix logic so the function works
1281 (_dbus_string_ends_with_c_str): fix overflow thingy
1282 (_dbus_string_base64_encode): overflow fix
1283 (_dbus_string_validate_ascii): overflow
1284 (_dbus_string_validate_nul): overflow
1286 2003-02-26 Havoc Pennington <hp@redhat.com>
1288 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1290 2003-02-26 Alexander Larsson <alexl@redhat.com>
1293 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1295 * dbus/dbus-connection.c:
1296 * dbus/dbus-connection.h:
1297 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1298 Add dbus_connection_set_wakeup_main_function and use it when queueing
1299 incoming and outgoing messages.
1302 * dbus/dbus-dataslot.c:
1303 Threadsafe usage of DBusDataSlotAllocator
1305 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1308 * dbus/dbus-server-unix.c:
1311 * glib/dbus-gmain.c:
1312 Implement the new wakeup functions for glib.
1315 * glib/test-thread-client.c:
1316 * glib/test-thread-server.c:
1317 * glib/test-thread.h:
1318 Initial cut at some thread test code. Not really done yet.
1320 2003-02-26 Havoc Pennington <hp@pobox.com>
1322 * dbus/dbus-connection.c
1323 (dbus_connection_send_message_with_reply_and_block): fix crash
1324 where we ref'd the outgoing message instead of the returned reply
1326 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1327 at the end of this function, so if we didn't need to read for
1328 authentication, we reinstall it for receiving messages
1330 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1331 a NULL sender for peer-to-peer case
1333 * dbus/dbus-transport-unix.c (check_read_watch): handle
1334 !authenticated case correctly
1336 * glib/dbus-gmain.c: add support for DBusServer
1338 * dbus/dbus-server.c: add data slot support
1340 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1341 return values and handle errors
1343 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1346 * Doxyfile.in (INPUT): add glib subdir
1348 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1349 setup_with_g_main instead of hookup_with_g_main; write docs
1351 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1353 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1354 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1355 * dbus/dbus-message.c: (dbus_message_append_boolean),
1356 (dbus_message_append_boolean_array),
1357 (dbus_message_get_args_valist), (_dbus_message_test):
1358 * dbus/dbus-message.h:
1359 * doc/dbus-specification.sgml:
1360 Various fixes as pointed out by Havoc.
1362 * test/data/invalid-messages/bad-boolean-array.message:
1363 * test/data/invalid-messages/bad-boolean.message:
1364 Add invalid boolean value test cases.
1366 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1368 * dbus/dbus-internals.c: (_dbus_type_to_string):
1369 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1370 (_dbus_marshal_validate_arg):
1371 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1372 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1373 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1374 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1375 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1376 (dbus_message_iter_get_double),
1377 (dbus_message_iter_get_boolean_array), (message_iter_test):
1378 * dbus/dbus-message.h:
1379 * dbus/dbus-protocol.h:
1380 * doc/dbus-specification.sgml:
1381 * test/data/valid-messages/lots-of-arguments.message:
1382 Add support for boolean and boolean array types.
1384 2003-02-23 Havoc Pennington <hp@pobox.com>
1386 * dbus/dbus-keyring.c: finish most of this implementation and
1389 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1390 these barf if the error isn't cleared to NULL
1392 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1393 (_dbus_create_directory): new function
1395 * dbus/dbus-errors.c (dbus_set_error): fix warning
1397 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1398 (_dbus_string_hex_decode): new function
1399 (test_hex_roundtrip): test code
1401 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1403 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1405 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1406 the save-to-temp/rename trick to atomically write the new file
1407 (_dbus_string_parse_uint): new function
1409 2003-02-22 Havoc Pennington <hp@pobox.com>
1411 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1413 2003-02-22 Havoc Pennington <hp@pobox.com>
1415 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1416 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1418 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1420 * dbus/test/data/sha-1: add US government test suite for SHA-1
1422 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1424 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1425 Make string arrays NULL-terminated.
1427 * dbus/dbus-memory.c: (dbus_free_string_array):
1428 * dbus/dbus-memory.h:
1429 New function for freeing NULL-terminated string arrays.
1431 * dbus/dbus-message-builder.c: (append_quoted_string),
1432 (_dbus_message_data_load):
1433 Add support for array types.
1435 * dbus/dbus-message.c: (check_message_handling):
1436 Add more types as test cases.
1438 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1439 (_dbus_string_parse_double):
1440 Add the start offset to the end offset.
1442 * test/data/valid-messages/lots-of-arguments.message:
1443 New test message with lots of arguments.
1445 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1447 * dbus/dbus-message.c: (dbus_message_append_nil),
1448 (dbus_message_append_int32), (dbus_message_append_uint32),
1449 (dbus_message_append_double), (dbus_message_append_string),
1450 (dbus_message_append_int32_array),
1451 (dbus_message_append_uint32_array),
1452 (dbus_message_append_double_array),
1453 (dbus_message_append_byte_array),
1454 (dbus_message_append_string_array):
1455 Fix all out-of-memory handling in these functions.
1457 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1459 * dbus/dbus-message.c: (dbus_message_append_nil):
1462 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1464 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1465 (dbus_message_append_nil), (dbus_message_append_int32_array),
1466 (dbus_message_append_uint32_array),
1467 (dbus_message_append_double_array),
1468 (dbus_message_append_byte_array),
1469 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1470 (dbus_message_iter_get_int32_array),
1471 (dbus_message_iter_get_uint32_array),
1472 (dbus_message_iter_get_double_array),
1473 (dbus_message_iter_get_byte_array),
1474 (dbus_message_iter_get_string_array):
1476 * dbus/dbus-message.h:
1477 Add functions for appending and getting arrays.
1479 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1481 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1482 element size at least 8 bytes, fixes mempool tests on
1485 2003-02-20 Alexander Larsson <alexl@redhat.com>
1487 * dbus/dbus-transport-unix.c (unix_do_iteration):
1488 Unlock the connection mutex during a blocking select call.
1489 Add todo about how we need a way to wake up the select.
1491 * dbus/dbus-connection-internal.h:
1492 * dbus/dbus-connection.c:
1493 Add _dbus_connection_lock and _dbus_connection_unlock.
1495 2003-02-19 Havoc Pennington <hp@pobox.com>
1497 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1498 Doxyfile.in, not Doxyfile
1500 * dbus/dbus-keyring.c: do some hacking on this
1502 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1504 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1506 (dbus_set_error): remove dbus_error_init, check for message ==
1507 NULL *before* we sprintf into it, and add @todo about including
1508 system headers in this file
1510 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1512 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1514 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1515 get various bits of user information based on either username
1517 (_dbus_homedir_from_username): new function
1519 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1522 Add check for nonposix getpwnam_r
1524 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1525 Align the pool element size to a sizeof (void *) boundary.
1527 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1528 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1529 General Solaris fixes.
1531 * test/data/valid-messages/simplest-manual.message:
1532 Explicitly state that we want little-endian packing.
1534 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1536 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1538 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1539 Added to create a transport connecting using a tcp/ip socket.
1541 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1542 to a tcp socket at given host and port.
1543 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1546 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1548 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1549 Added to create a server listening on a TCP/IP socket.
1551 2003-02-19 Havoc Pennington <hp@pobox.com>
1553 Throughout: mop up all the Doxygen warnings and undocumented
1556 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1557 to search any paths.
1559 * dbus/dbus-threads.c: move global mutex initializers to
1560 dbus-internals.h, multiple prototypes was confusing doxygen
1561 besides being kind of ugly
1563 * Doxyfile (PREDEFINED): have Doxygen define
1564 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1565 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1566 (do not abuse the feature! it's for stuff like the autogenerated
1567 macros in dbus-md5.c, not just for things you don't feel like
1570 2003-02-18 Havoc Pennington <hp@pobox.com>
1572 * dbus/dbus-string.c (_dbus_string_zero): new function
1574 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1575 wrap it in some dbus-friendly API
1577 * dbus/dbus-types.h: add 16-bit types
1579 2003-02-18 Joe Shaw <joe@assbarn.com>
1581 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1582 credentials from our currently running process.
1583 (get_word): Fix a buglet where we were copying the entire length
1584 instead of relative to our position.
1586 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1587 keys on the stack... it's 640k of data.
1589 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1590 read the credentials byte off the socket, even if we don't have
1592 (_dbus_poll): Implement poll() using select() for systems which
1595 * glib/test-dbus-glib.c (main): Print out an error if no
1596 parameters are given.
1598 * test/data/auth/fallback.auth-script: Added. Tests that a client
1599 can fallback to a secondary auth mechanism if the first fails.
1601 2003-02-18 Havoc Pennington <hp@pobox.com>
1605 2003-02-17 Havoc Pennington <hp@pobox.com>
1607 * doc/dbus-specification.sgml: lots of cosmetic
1608 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1609 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1610 s/server/bus/ (except in authentication section). Add a section
1611 "Message Bus Message Routing"
1613 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1619 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1621 * doc/dbus-specification.sgml:
1622 Specification updates.
1624 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1626 * bus/activation.c: (bus_activation_init), (child_setup),
1627 (bus_activation_activate_service):
1629 * bus/main.c: (main):
1630 Set DBUS_ADDRESS environment variable.
1632 * dbus/dbus-errors.c: (dbus_set_error):
1633 Don't use va_copy since that's a C99 feature.
1635 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1636 (_dbus_spawn_async):
1637 * dbus/dbus-sysdeps.h:
1638 Add child_setup_func to _dbus_spawn_async.
1640 * doc/dbus-specification.sgml:
1641 Update specification.
1643 * test/spawn-test.c: (setup_func), (main):
1646 2003-02-17 Alexander Larsson <alexl@redhat.com>
1648 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1651 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1655 * doc/dbus-test-plan.sgml:
1656 Add test plan document.
1661 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1663 * dbus/dbus-message.c: (decode_header_data),
1664 (_dbus_message_loader_return_buffer):
1665 Set the header padding amount when loading a message.
1667 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1669 * bus/dispatch.c: (send_one_message):
1670 Only send broadcast messages to registered connections.
1672 * dbus/dbus-message.c: (dbus_message_name_is):
1673 * dbus/dbus-message.h:
1674 New convenience function.
1676 * dbus/dbus-transport-debug.c: (do_reading):
1677 Only dispatch one message per run.
1680 * test/bus-test.c: (new_connection_callback), (die),
1681 (test_hello_client1_handler), (test_hello_client2_handler),
1682 (test_hello_replies), (main):
1684 * test/bus-test-loop.[ch]:
1687 2003-02-16 Havoc Pennington <hp@pobox.com>
1689 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1690 backward conditional
1692 2003-02-16 Alexander Larsson <alexl@redhat.com>
1694 * dbus/dbus-connection.c:
1695 Implement sent_message_with_reply. (with_reply_and block is still
1697 Made dispatch_message not lose message if OOM.
1699 * dbus/dbus-errors.h:
1700 Add NoReply error (for reply timeouts).
1702 2003-02-16 Alexander Larsson <alexl@redhat.com>
1704 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1705 Actually free keys and values when destroying hashtable.
1707 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1709 * dbus/dbus-auth.c: (client_try_next_mechanism):
1712 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1713 Return TRUE if there's no thread implementation around.
1715 * glib/dbus-gmain.c: (free_source),
1716 (dbus_connection_hookup_with_g_main):
1717 Make sure to remove the GSource when the connection is finalized.
1719 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1721 * bus/dispatch.c: (bus_dispatch_message_handler):
1722 * dbus/dbus-errors.h:
1723 Return an error if someone tries to send a message to a service
1726 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1728 * bus/activation.c: (load_directory), (bus_activation_init),
1729 (bus_activation_activate_service):
1732 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1733 More work on the activation handling.
1735 * dbus/dbus-errors.h:
1736 Add some error messages
1738 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1739 * dbus/dbus-message.h:
1740 New function that creates an error message.
1742 * dbus/dbus-protocol.h:
1743 Add ACTIVATE_SERVER message.
1745 * dbus/dbus-server-unix.c: (unix_handle_watch),
1746 (_dbus_server_new_for_domain_socket):
1747 Call _dbus_fd_set_close_on_exec.
1749 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1750 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1751 (_dbus_fd_set_close_on_exec):
1752 * dbus/dbus-sysdeps.h:
1753 Add _dbus_fd_set_close_on exec function. Also add function that checks
1754 that all open fds are set to close-on-exec and warns otherwise.
1756 * dbus/dbus-transport-unix.c:
1757 (_dbus_transport_new_for_domain_socket):
1758 Call _dbus_fd_set_close_on_exec.
1760 2003-02-16 Havoc Pennington <hp@pobox.com>
1762 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1763 allow people to avoid setting SIGPIPE to SIG_IGN
1764 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1765 we've been asked not to
1767 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1769 * dbus/dbus-list.c: (_dbus_list_append_link),
1770 (_dbus_list_prepend_link):
1771 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1775 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1778 * bus/activation.c: (bus_activation_entry_free),
1779 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1781 * bus/main.c: (main):
1782 Add simple activation support, doesn't work yet though.
1784 2003-02-15 Zack Rusin <zack@kde.org>
1786 * qt/dbus-qthread.cpp: small casting fix
1788 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1790 * dbus/dbus-errors.c: (dbus_set_error):
1791 * dbus/dbus-errors.h:
1792 Add a few errors and make dbus_set_error void.
1794 * dbus/dbus-sysdeps.c:
1795 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1796 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1797 * dbus/dbus-sysdeps.h:
1798 Add _dbus_spawn_async.
1800 * test/spawn-test.c: (main):
1801 Test for _dbus_spawn_async.
1803 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1805 * dbus/dbus-internals.h:
1806 Fix build without tests.
1808 * dbus/dbus-list.c: (alloc_link):
1809 Fix a segfault when a malloc fails.
1811 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1812 (dbus_malloc0), (dbus_realloc):
1813 Add support for malloc debugging.
1815 2003-02-15 Alexander Larsson <alexl@redhat.com>
1817 * dbus/dbus-threads.c:
1818 * dbus/dbus-threads.h:
1819 Add condvars. Remove static mutext from API.
1820 Implement static mutexes by initializing them from threads_init.
1822 * glib/dbus-gthread.c:
1823 * qt/dbus-qthread.cpp:
1824 Update with the thread api changes.
1829 Turn StaticMutex into normal mutex + init function.
1830 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1831 _dbus_list_append_link, _dbus_list_prepend_link
1834 * dbus/dbus-sysdeps.c:
1835 * dbus/dbus-sysdeps.h:
1836 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1837 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1839 * dbus/dbus-protocol.h:
1840 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1842 * dbus/dbus-message.c:
1843 Make ref/unref atomic.
1846 * dbus/dbus-connection-internal.h:
1847 * dbus/dbus-connection.c:
1848 * dbus/dbus-connection.h:
1850 Change _peek to _borrow,_return & _steal_borrowed.
1851 Change disconnect callback to event.
1852 Make dbus_connection_dispatch_messages reentrant.
1854 * dbus/dbus-transport.c:
1855 Don't ref the connection on calls to the transport
1858 * dbus/dbus-message-handler.c:
1861 * glib/dbus-gmain.c:
1862 Don't use peek_message anymore
1865 * test/debug-thread.c:
1866 * test/debug-thread.h:
1867 Simple thread implementation that asserts() on deadlocks in
1868 single-threaded code.
1871 (main) Call debug_threads_init.
1874 Use disconnect message instead of disconnect callback.
1878 Don't call dbus_connection_set_disconnect_function. Instead export
1879 bus_connection_disconnect.
1882 Call bus_connection_disconnect when we get a disconnected message.
1884 2003-02-15 Havoc Pennington <hp@pobox.com>
1886 * dbus/dbus-message.c (dbus_message_new): fool around with the
1889 2003-02-14 Havoc Pennington <hp@pobox.com>
1891 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1893 * dbus/dbus-memory.c: fail if the debug functions indicate we
1896 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1897 (_dbus_decrement_fail_alloc_counter): debug functions to
1898 simulate memory allocation failures
1900 2003-02-14 Havoc Pennington <hp@pobox.com>
1902 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1905 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1907 * bus/driver.c: (bus_driver_handle_hello):
1909 * bus/services.c: (bus_service_lookup):
1910 Reorder message sending so we get a more sane order.
1912 * test/bus-test.c: (message_handler):
1915 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1917 * bus/driver.c: (bus_driver_send_service_deleted),
1918 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1919 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1920 (bus_driver_send_welcome_message),
1921 (bus_driver_handle_list_services),
1922 (bus_driver_handle_acquire_service),
1923 (bus_driver_handle_service_exists):
1924 * dbus/dbus-bus.c: (dbus_bus_register_client),
1925 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1926 * dbus/dbus-errors.c: (dbus_result_to_string):
1927 * dbus/dbus-errors.h:
1928 * dbus/dbus-message.c: (dbus_message_append_args),
1929 (dbus_message_append_args_valist), (dbus_message_get_args),
1930 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1931 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1932 (dbus_message_iter_get_byte_array),
1933 (dbus_message_iter_get_string_array), (message_iter_test),
1934 (check_message_handling), (_dbus_message_test):
1935 * dbus/dbus-message.h:
1936 * test/bus-test.c: (main):
1937 Change fields to arguments in messages, so that they won't be
1938 confused with header fields.
1940 * glib/test-dbus-glib.c: (main):
1941 Remove append_fields from hello message.
1943 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1945 * dbus/dbus-errors.c:
1946 * dbus/dbus-message.c:
1947 * dbus/dbus-string.c:
1948 Documentation fixes.
1950 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1952 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1954 Implement support for timeouts in dbus-glib.
1956 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1958 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1959 * dbus/dbus-message.c: (process_test_subdir):
1960 * test/break-loader.c: (find_breaks_based_on):
1961 Plug some memory leaks.
1963 2003-02-13 Richard Hult <rhult@codefactory.se>
1965 * bus/main.c: Fix build.
1967 * dbus/dbus-errors.h:
1968 * dbus/dbus-errors.c: Fix copyright for Anders.
1970 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1975 * bus/connection.c: (bus_connection_foreach):
1978 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1979 (unescape_string), (new_section), (parse_section_start),
1980 (parse_key_value), (report_error), (bus_desktop_file_load),
1981 (bus_desktop_file_get_string):
1982 * bus/desktop-file.h:
1983 Use DBusError for error reporting.
1985 * bus/dispatch.c: (send_one_message),
1986 (bus_dispatch_message_handler):
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 * bus/loop.c: (bus_loop_run):
1996 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1998 * bus/utils.c: (bus_wait_for_memory):
2000 New files with general utility functions.
2002 * dbus/dbus-internals.h:
2003 Remove _DBUS_HANDLE_OOM.
2005 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2007 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
2008 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
2009 * dbus/dbus-errors.h:
2010 Add DBusError structure.
2012 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2014 * test/data/valid-messages/standard-acquire-service.message:
2015 * test/data/valid-messages/standard-hello.message:
2016 * test/data/valid-messages/standard-list-services.message:
2017 * test/data/valid-messages/standard-service-exists.message:
2018 Add some standard messages.
2020 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2022 * bus/driver.c: (bus_driver_send_welcome_message),
2023 (bus_driver_handle_list_services),
2024 (bus_driver_handle_acquire_service),
2025 (bus_driver_handle_service_exists), (bus_driver_handle_message):
2026 Update for API changes in libdbus.
2028 * dbus/dbus-message.c: (dbus_message_new_reply):
2029 * dbus/dbus-message.h:
2030 Remove the name argument. The spec states that replies shouldn't
2033 2003-02-13 Anders Carlsson <andersca@codefactory.se>
2035 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
2036 (report_error), (bus_desktop_file_load), (lookup_section),
2037 (lookup_line), (bus_desktop_file_get_raw),
2038 (bus_desktop_file_get_string):
2039 * bus/desktop-file.h:
2040 Some fixes, and new functions for getting a key value from a section.
2042 2003-02-13 Havoc Pennington <hp@pobox.com>
2044 * test/data/auth/fail-after-n-attempts.auth-script: new test
2046 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
2049 2003-02-13 Havoc Pennington <hp@pobox.com>
2051 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
2052 dbus_credentials_match were backward
2054 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
2055 NO_CREDENTIALS and ROOT_CREDENTIALS
2057 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
2058 into here. Never process more commands after we've reached an
2059 end state; store further data as unused bytes.
2061 * test/data/auth/*: add more auth tests
2063 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
2064 command to match exact string and EXPECT_UNUSED to match unused
2067 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2069 2003-02-12 Havoc Pennington <hp@pobox.com>
2071 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2072 \r off of popped lines
2074 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2077 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2080 2003-02-12 Havoc Pennington <hp@pobox.com>
2082 * dbus/Makefile.am: remove break-loader from the build, since it
2085 * configure.in: add --enable-gcov to turn on coverage profiling
2086 flags and disable optimization
2088 2003-02-10 Havoc Pennington <hp@pobox.com>
2090 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2091 initial cut at test framework for DBusAuth from laptop.
2092 Doesn't quite work yet but it compiles and I need to get
2093 it off the 266mhz laptop. ;-)
2095 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2096 fix a memleak in error case
2098 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2101 * bus/desktop-file.c:
2102 * bus/desktop-file.h:
2103 Add a desktop file parser.
2105 2003-02-11 Zack Rusin <zack@kde.org>
2107 * qt/message.[h|cpp]: sample implementation
2108 of the KDE wrapper for DBusMessage
2110 2003-02-09 Zack Rusin <zack@kde.org>
2112 * test/bus-test.c: make_it_compile
2113 * doc/dbus-specification.sgml: minimal semantic fix
2115 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2121 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2124 * dbus/dbus-break-loader.c:
2126 * test/break-loader.c:
2127 Move dbus-break-loader to test/ and rename it to break-loader.
2129 2003-02-02 Havoc Pennington <hp@pobox.com>
2131 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2132 for code to manage cookies in your home directory
2134 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2136 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2137 to authenticate, then disconnect the client.
2139 2003-02-03 Alexander Larsson <alexl@redhat.com>
2141 * dbus/dbus-message.c (dbus_message_append_fields):
2144 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2146 * doc/dbus-specification.sgml:
2147 Update address format section.
2149 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2152 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2153 (message_handler), (new_connection_callback), (loop_quit),
2157 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2159 * bus/driver.c: (bus_driver_handle_service_exists):
2160 Simplify the code a bit.
2162 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2165 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2168 Add libdbus-daemon.la and link to it.
2170 2003-02-01 James Willcox <jwillcox@gnome.org>
2172 * bus/driver.c: (bus_driver_handle_own_service):
2173 Actually include the service reply code in the message.
2175 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2177 * bus/driver.c: (bus_driver_handle_service_exists):
2178 Don't unref the incoming message.
2180 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2182 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2184 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2186 * dbus/dbus-server.c: (dbus_server_listen):
2187 * dbus/dbus-transport.c: (_dbus_transport_open):
2188 ifdef out the calls to the debug transport and server.
2190 2003-02-02 Alexander Larsson <alexl@redhat.com>
2192 * dbus/dbus-watch.c (dbus_watch_get_flags):
2193 Add note in the docs that ERROR or HANGUP won't be returned
2194 and are assumed always on.
2196 * glib/dbus-gmain.c (add_watch):
2197 Always add IO_ERR | IO_HUP
2199 * dbus/dbus-message.h:
2200 Add semicolon after dbus_message_iter_get_string_array().
2201 Makes qt code build again
2203 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2205 * bus/driver.c: (create_unique_client_name),
2206 (bus_driver_handle_hello):
2207 Don't take a name, just use a numeric id to identify
2211 * dbus/dbus-bus.c: (dbus_bus_register_client),
2212 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2214 Add new convenience functions for communicating with the bus.
2216 * dbus/dbus-message.h:
2218 * dbus/dbus-protocol.h:
2221 2003-02-01 Alexander Larsson <alexl@redhat.com>
2223 * dbus/dbus-message.c (dbus_message_append_fields):
2224 Add some more doc comments.
2226 2003-02-01 Havoc Pennington <hp@pobox.com>
2228 * dbus/dbus-break-loader.c (randomly_modify_length): change
2229 a 4-byte value in the message as if it were a length
2231 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2232 execute bit on saved files
2234 2003-02-01 Havoc Pennington <hp@pobox.com>
2236 * dbus/dbus-break-loader.c (main): new program to find messages
2237 that break the loader.
2239 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2240 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2242 * dbus/dbus-string.c (_dbus_string_set_byte): new
2244 2003-01-31 Havoc Pennington <hp@pobox.com>
2246 * dbus/dbus-message.c: refactor the test code to be more general,
2247 in preparation for writing a "randomly permute test cases to
2248 try to break the loader" program.
2250 2003-01-31 Havoc Pennington <hp@pobox.com>
2252 * doc/dbus-specification.sgml: work on the specification
2254 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2255 the protocol version of the message.
2257 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2258 no longer specifies that.
2259 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2262 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2263 "break" for DBUS_TYPE_NIL, remove @todo
2265 2003-01-31 Havoc Pennington <hp@pobox.com>
2267 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2268 just set_is_error/get_is_error as this is a commonly-used
2269 function, and write docs.
2271 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2273 * dbus/dbus-address.c: (dbus_address_entry_free):
2274 Free key and value lists.
2276 * dbus/dbus-internals.c: (_dbus_type_to_string):
2277 Add the types we didn't have.
2279 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2280 (_dbus_marshal_validate_arg):
2283 * dbus/dbus-message.c: (dbus_message_set_sender):
2284 Remove todo about being able to set sender to NULL.
2286 (dbus_message_set_is_error_reply),
2287 (dbus_message_get_is_error_reply):
2288 * dbus/dbus-message.h:
2291 * dbus/dbus-protocol.h:
2292 Add error reply flag.
2294 * test/data/valid-messages/opposite-endian.message:
2295 Add NIL type to test.
2297 2003-01-31 Havoc Pennington <hp@pobox.com>
2299 * doc/dbus-specification.sgml: fully specify the header. Add
2300 flags and major protocol version, and change header/body len to
2303 * dbus/dbus-message-builder.c (append_saved_length): append length
2306 * dbus/dbus-message.c (dbus_message_create_header): change header
2307 length and body length to unsigned. Add the new fields from the
2309 (_dbus_message_loader_return_buffer): unsigned header/body len
2311 2003-01-30 Havoc Pennington <hp@pobox.com>
2313 * dbus/dbus-auth.c: rework to use only REJECTED, no
2316 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2317 use REJECTED, suggested by Mark McLoughlin
2319 2003-01-30 Havoc Pennington <hp@pobox.com>
2321 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2322 a better way to report errors here. e.g. "unix address lacks
2323 path" or something. also "no such file" when the path doesn't
2326 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2328 (dbus_parse_address): add @todo about documenting address format,
2329 and allowing , and ; to be escaped
2331 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2334 Add dbus-address.[ch]
2336 * dbus/dbus-address.c: (dbus_address_entry_free),
2337 (dbus_address_entries_free), (create_entry),
2338 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2339 (dbus_parse_address), (_dbus_address_test):
2340 * dbus/dbus-address.h:
2341 New files for dealing with address parsing.
2343 * dbus/dbus-connection.c:
2344 Document timeout functions.
2346 * dbus/dbus-message.c:
2347 Document dbus_message_new_from_message.
2349 * dbus/dbus-server-debug.c:
2352 * dbus/dbus-server.c: (dbus_server_listen):
2353 Parse address and use correct server implementation.
2355 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2356 * dbus/dbus-string.h:
2357 New function with test.
2359 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2363 * dbus/dbus-transport-debug.c:
2366 * dbus/dbus-transport.c: (_dbus_transport_open):
2367 Parse address and use correct transport implementation.
2369 2003-01-30 Havoc Pennington <hp@pobox.com>
2371 * dbus/dbus-message.c: use message->byte_order instead of
2372 DBUS_COMPILER_BYTE_ORDER throughout.
2373 (dbus_message_create_header): pad header to align the
2374 start of the body of the message to 8-byte boundary
2376 * dbus/dbus-marshal.h: make all the demarshalers take const
2377 DBusString arguments.
2379 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2380 validate message args here, so we don't have to do slow validation
2381 later, and so we catch bad messages as they are incoming. Also add
2382 better checks on header_len and body_len. Also fill in
2385 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2386 implemented properly)
2387 (_dbus_string_validate_nul): new function to check all-nul
2389 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2390 get_arg_end_pos and remove all validation
2391 (_dbus_marshal_validate_arg): actually do validation here.
2393 2003-01-29 Havoc Pennington <hp@pobox.com>
2395 * dbus/dbus-message.c (check_message_handling): fix assertion
2396 failure on set_client_serial
2398 2003-01-28 Havoc Pennington <hp@pobox.com>
2400 * dbus/dbus-server-debug.c: Add doc section comments
2402 * dbus/dbus-transport-debug.c: add doc section comments
2404 2003-01-28 Havoc Pennington <hp@redhat.com>
2406 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2407 the reverse order from how I had it
2408 (_dbus_string_base64_encode): reverse encoding order. I was
2409 basically byteswapping everything during encoding.
2411 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2413 * dbus/dbus-connection-internal.h:
2414 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2415 (_dbus_connection_remove_timeout):
2416 Add functions for adding and removing timeouts.
2418 * dbus/dbus-message.c: (dbus_message_new_from_message):
2419 Add new function that takes a message and creates an exact
2420 copy of it, but with the refcount set to 1.
2421 (check_message_handling):
2424 * dbus/dbus-server-protected.h:
2425 * dbus/dbus-server.c: (_dbus_server_init_base),
2426 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2427 (dbus_server_set_timeout_functions):
2428 (_dbus_server_remove_timeout):
2429 New functions so that a server can add and remove timeouts.
2431 (dbus_server_listen):
2432 Add commented out call to dbus_server_debug_new.
2434 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2435 Actually set the handler, doh.
2437 * dbus/dbus-transport.c: (_dbus_transport_open):
2438 Add commented out call to dbus_transport_debug_client_new.
2441 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2443 2003-01-28 Havoc Pennington <hp@pobox.com>
2445 * dbus/dbus-message.c (check_message_handling): function to check
2446 on the loaded message, iterates over it etc.
2448 2003-01-28 Havoc Pennington <hp@pobox.com>
2450 * test/Makefile.am (dist-hook): fix make distdir
2452 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2454 2003-01-27 Havoc Pennington <hp@pobox.com>
2456 * dbus/dbus-mempool.c (time_for_size): replace printf with
2459 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2460 empty lines; fix the SAVE_LENGTH stuff to be
2461 START_LENGTH/END_LENGTH so it actually works; couple other
2464 * test/Makefile.am (dist-hook): add dist-hook for .message files
2466 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2467 can be constant or locked.
2468 (_dbus_string_free): allow freeing a const string as
2471 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2473 * dbus/dbus-test-main.c (main): take an argument which is the
2474 directory containing test data
2476 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2477 argument to this and load all the messages in test/data/
2478 checking that they can be loaded or not loaded as appropriate.
2480 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2482 * bus/dispatch.c: (bus_dispatch_message_handler):
2483 Dispatch messages sent to services.
2485 * bus/driver.c: (bus_driver_send_service_deleted),
2486 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2487 (bus_driver_send_service_acquired):
2488 Add helper functions for sending service related messages.
2490 (bus_driver_send_welcome_message):
2491 Send HELLO_REPLY instead of WELCOME.
2493 (bus_driver_handle_list_services):
2494 Send LIST_SERVICES_REPLY instead of SERVICES.
2496 (bus_driver_handle_own_service),
2497 (bus_driver_handle_service_exists):
2498 New message handlers.
2500 (bus_driver_handle_message):
2501 Invoke new message handlers.
2503 (bus_driver_remove_connection):
2504 Don't remove any services here since that's done automatically
2505 by bus_service_remove_owner now.
2508 New function signatures.
2510 * bus/services.c: (bus_service_add_owner):
2511 Send ServiceAcquired message if we're the only primary owner.
2513 (bus_service_remove_owner):
2514 Send ServiceAcquired/ServiceLost messages.
2516 (bus_service_set_prohibit_replacement),
2517 (bus_service_get_prohibit_replacement):
2518 Functions for setting prohibit replacement.
2520 (bus_service_has_owner):
2521 New function that checks if a connection is in the owner queue of
2525 Add new function signatures.
2527 * dbus/dbus-list.c: (_dbus_list_test):
2528 Add tests for _dbus_list_remove_last and traversing the list backwards.
2531 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2532 go any further, so return NULL then.
2534 * dbus/dbus-protocol.h:
2535 Add new messages, service flags and service replies.
2537 2003-01-26 Havoc Pennington <hp@pobox.com>
2539 * dbus/dbus-message-builder.c: implement, completely untested.
2541 * test/data/*: add data to be used in testing.
2542 ".message" files are our simple loadable text format.
2543 ".message-raw" will be binary dumps of messages.
2545 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2547 2003-01-26 Havoc Pennington <hp@pobox.com>
2549 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2551 * dbus/dbus-errors.c (dbus_result_to_string): add
2554 * dbus/dbus-message-builder.c: new file, will contain code to load
2555 up messages from files. Not implemented yet.
2557 2003-01-26 Havoc Pennington <hp@pobox.com>
2559 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2560 the sender by setting to NULL
2562 2003-01-26 Havoc Pennington <hp@pobox.com>
2564 The unit tests pass, but otherwise untested. If it breaks, the
2565 tests should have been better. ;-)
2567 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2570 * dbus/dbus-message.c: redo everything so we maintain
2571 message->header as the only copy of the various fields.
2572 This avoids the possibility of out-of-memory in some cases,
2573 for example dbus_message_lock() can't run out of memory anymore,
2574 and avoids extra copying. Figured I may as well go ahead and do
2575 this since it was busted for dbus_message_lock to not return
2576 failure on OOM, and dbus_message_write_header was totally
2577 unchecked for OOM. Also fixed some random other bugs.
2579 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2580 that strings are nul-terminated. Also, end_pos can be equal
2581 to string length just not greater than, I think.
2582 (_dbus_marshal_set_int32): new function
2583 (_dbus_marshal_set_uint32): new function
2584 (_dbus_marshal_set_string): new function
2586 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2587 a warning, init timeout_list to NULL
2588 (dbus_connection_send_message): don't use uninitialized variable
2591 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2593 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2595 * bus/driver.c: (bus_driver_handle_hello),
2596 (bus_driver_send_welcome_message):
2599 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2601 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2602 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2603 (dbus_connection_unref):
2604 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2605 * dbus/dbus-message.c: (dbus_message_unref),
2608 (dbus_message_get_fields):
2609 Remove debugging printout.
2611 (_dbus_message_loader_return_buffer):
2612 Don't store the header string.
2614 (_dbus_message_test):
2617 2003-01-26 Richard Hult <rhult@codefactory.se>
2619 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2620 the file descriptor list, since it can change under us.
2622 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2624 * glib/dbus-gmain.c: (dbus_connection_prepare),
2625 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2626 (remove_watch), (dbus_connection_hookup_with_g_main):
2627 Rewrite the glib handling to use its own GSource instead of a
2628 GIOChannel so we can catch messages put in the queue while waiting
2631 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2634 * bus/connection.c: (connection_disconnect_handler),
2635 (connection_watch_callback), (bus_connection_setup):
2636 * bus/dispatch.c: (send_one_message),
2637 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2638 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2640 * bus/driver.c: (bus_driver_send_service_deleted),
2641 (bus_driver_send_service_created), (bus_driver_handle_hello),
2642 (bus_driver_send_welcome_message),
2643 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2644 (bus_driver_handle_message):
2646 Refactor code, put the message dispatching in its own file. Use
2647 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2650 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2652 * dbus/dbus-internals.h:
2653 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2655 * dbus/dbus-message.c: (dbus_message_get_sender):
2656 * dbus/dbus-message.h:
2657 Implement dbus_message_get_sender.
2659 * dbus/dbus-protocol.h:
2660 Add message and service defines.
2662 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2664 * dbus/dbus-connection.c: (dbus_connection_send_message):
2665 * dbus/dbus-message-internal.h:
2666 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2667 (dbus_message_write_header):
2668 Remove _dbus_messag_unlock and don't set the client serial on a
2669 message if one already exists.
2671 2003-01-24 Havoc Pennington <hp@pobox.com>
2673 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2676 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2679 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2681 * dbus/dbus-list.c: (alloc_link), (free_link):
2682 Use a memory pool for the links.
2684 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2686 * bus/connection.c: (bus_connection_foreach):
2688 Add new bus_connection_foreach function.
2690 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2691 Add function that broadcasts a message to all clients.
2693 (bus_driver_send_service_created), (bus_driver_handle_hello),
2694 (bus_driver_send_welcome_message),
2695 (bus_driver_handle_list_services), (bus_driver_message_handler):
2696 Implement functions that take care of listing services, and notifying
2697 clients when new services are created.
2699 * bus/services.c: (bus_services_list):
2701 Add new function that returns an array of strings with the currently
2702 registered services.
2705 * glib/dbus-gmain.c:
2706 Update copyright year.
2708 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2710 * dbus/dbus-connection.c: (dbus_connection_send_message):
2711 Unlock the message in case it was sent earlier.
2713 (dbus_connection_send_message_with_reply_and_block):
2714 Remove the reply message from the list.
2716 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2717 Set array_len and new_pos correctly.
2719 (_dbus_marshal_test):
2720 Remove debug output.
2722 * dbus/dbus-message-internal.h:
2723 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2724 New function that returns the reply serial.
2726 (_dbus_message_unlock):
2727 New function that unlocks a message and resets its header.
2729 (dbus_message_append_string_array),
2730 (dbus_message_get_fields_valist),
2731 (dbus_message_iter_get_field_type),
2732 (dbus_message_iter_get_string_array),
2733 (dbus_message_get_fields),
2734 (dbus_message_append_fields_valist):
2735 Handle string arrays.
2737 (dbus_message_set_sender):
2738 Make this function public since the bus daemon needs it.
2740 (decode_header_data):
2741 Set the reply serial to -1 initially.
2743 * dbus/dbus-message.h:
2744 Add dbus_message_set_sender.
2746 2003-01-24 Havoc Pennington <hp@pobox.com>
2748 * doc/dbus-specification.sgml: add some stuff
2750 2003-01-22 Havoc Pennington <hp@pobox.com>
2752 * doc/dbus-specification.sgml: Start to document the protocol.
2754 2003-01-22 Havoc Pennington <hp@pobox.com>
2756 * dbus/dbus-connection.c
2757 (dbus_connection_send_message_with_reply_and_block): add some @todo
2759 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2761 2003-01-21 Havoc Pennington <hp@pobox.com>
2763 (patch untested because can't compile)
2765 * bus/driver.c (create_unique_client_name): make this function
2766 never recycle client names. Also, caller should initialize
2769 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2771 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2773 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2774 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2775 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2776 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2777 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2778 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2779 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2780 * dbus/dbus-marshal.h:
2781 * dbus/dbus-protocol.h:
2782 Add support for marshalling and demarshalling integer, double
2785 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2790 * bus/connection.c: (connection_disconnect_handler):
2791 Remove the connection from the bus driver's list.
2793 (connection_watch_callback): Dispatch messages.
2795 (free_connection_data): Free connection name.
2797 (bus_connection_setup): Add connection to the bus driver's list.
2798 (bus_connection_remove_owned_service):
2799 (bus_connection_set_name), (bus_connection_get_name):
2800 Add functions for setting and getting the connection's name.
2803 Add function headers.
2805 * bus/driver.c: (create_unique_client_name),
2806 (bus_driver_handle_hello_message),
2807 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2808 (bus_driver_add_connection), (bus_driver_remove_connection):
2811 * bus/services.c: (bus_service_free):
2813 New file that handles communication and registreation with the bus
2816 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2818 * dbus/dbus-connection.c: (dbus_connection_send_message):
2819 Add a new client_serial parameter.
2821 (dbus_connection_send_message_with_reply):
2822 Remove a @todo since we've implemented the blocking function.
2824 (dbus_connection_send_message_with_reply_and_block):
2825 New function that sends a message and waits for a reply and
2826 then returns the reply.
2828 * dbus/dbus-connection.h:
2831 * dbus/dbus-errors.c: (dbus_result_to_string):
2832 * dbus/dbus-errors.h:
2833 Add new DBUS_RESULT.
2835 * dbus/dbus-message-internal.h:
2836 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2837 (_dbus_message_set_sender), (dbus_message_write_header),
2838 (dbus_message_new_reply), (decode_header_data),
2839 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2840 * dbus/dbus-message.h:
2841 Add new functions that set the reply serial and sender.
2842 Also marshal and demarshal them correctly and add test.
2844 * dbus/dbus-protocol.h:
2845 Add new DBUS_MESSAGE_TYPE_SENDER.
2848 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2849 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2850 (dbus_connection_hookup_with_g_main):
2851 * glib/test-dbus-glib.c: (main):
2852 Rewrite to use GIOChannel and remove the GSource crack.
2854 * test/echo-client.c: (main):
2855 * test/watch.c: (check_messages):
2856 Update for changed APIs
2858 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2860 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2862 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2863 Create a DBusTimeoutList.
2864 (dbus_connection_set_timeout_functions): Add new function to
2865 set timeout callbacks
2867 * dbus/dbus-connection.h: Add public DBusTimeout API.
2869 * dbus/dbus-message.c: (dbus_message_get_service):
2870 * dbus/dbus-message.h: New function.
2872 * dbus/dbus-server.c: Fix small doc typo.
2874 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2876 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2878 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2879 of the string, just as long as specified.
2881 2003-01-19 Havoc Pennington <hp@pobox.com>
2883 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2886 * dbus/dbus-server.c (dbus_server_set_max_connections)
2887 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2888 keep track of current number of connections, and add API for
2889 setting a max (but haven't implemented enforcing the max yet)
2891 2003-01-18 Havoc Pennington <hp@pobox.com>
2893 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2894 reading/writing if read_watch != NULL or write_watch != NULL.
2896 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2897 the message loader code to actually load message->header and
2898 message->body into the newly-created message.
2900 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2903 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2904 (dbus_connection_get_max_message_size)
2905 (dbus_connection_set_max_live_messages_size)
2906 (dbus_connection_get_max_live_messages_size): implement some
2907 resource limitation functions
2909 * dbus/dbus-resources.c: new file implementing some of the
2910 resource limits stuff
2912 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2913 missing docs, add @todo to handle OOM etc.
2915 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2918 2003-01-18 Havoc Pennington <hp@pobox.com>
2920 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2921 connection if it hasn't been already.
2923 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2924 replace with DisconnectFunction.
2926 2003-01-18 Havoc Pennington <hp@pobox.com>
2928 Building --disable-verbose-mode --disable-asserts --disable-tests
2929 cuts the library from 112K to 45K or so
2931 * configure.in: check for varargs macro support,
2932 add --enable-verbose-mode, --enable-asserts.
2934 * dbus/dbus-internals.h (_dbus_assert): support
2936 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2938 2003-01-18 Havoc Pennington <hp@pobox.com>
2940 * dbus/dbus-test.c: include config.h so that tests actually run
2942 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2943 so the failure mode when that assumption fails will be plenty
2946 2003-01-18 Havoc Pennington <hp@pobox.com>
2948 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2950 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2953 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2954 since we don't want to use those in make check
2956 2003-01-15 Havoc Pennington <hp@redhat.com>
2962 2003-01-15 Havoc Pennington <hp@redhat.com>
2964 * test/Makefile.am: fix so that test source code ends up in the
2965 distribution on make distcheck
2967 2003-01-15 Havoc Pennington <hp@redhat.com>
2973 2003-01-15 Havoc Pennington <hp@redhat.com>
2975 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2976 fix build when --disable-tests
2978 * Makefile.am (EXTRA_DIST): put HACKING in here
2980 * HACKING: document procedure for making a tarball release.
2982 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2984 * bus/connection.c: (connection_error_handler),
2985 (bus_connection_setup):
2986 * bus/main.c: (main):
2987 Make sure that the DBusConnectionData struct is NULLed
2988 out to prevent a segfault.
2990 * dbus/dbus-errors.c: (dbus_result_to_string):
2991 * dbus/dbus-errors.h:
2992 * dbus/dbus-message.c: (dbus_message_get_fields),
2993 (dbus_message_get_fields_valist), (_dbus_message_test):
2994 * dbus/dbus-message.h:
2995 Make dbus_message_get_fields return a result code so we can
2996 track invalid fields as well as oom.
2998 2003-01-11 Havoc Pennington <hp@pobox.com>
3000 * configure.in: change --enable-test/--enable-ansi action-if-given
3001 to enable_foo=$enableval instead of enable_foo=yes
3003 2003-01-08 Havoc Pennington <hp@pobox.com>
3005 * dbus/dbus-string.c (_dbus_string_align_length): new function
3007 * dbus/dbus-test-main.c: move main() for test app here
3009 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
3010 symbol to run tests, because dbus-test isn't in the main
3013 Code review nitpicks.
3015 * dbus/dbus-message.c (dbus_message_write_header): add newlines
3016 for people with narrow emacs ;-). Assert client_serial was filled
3017 in. Assert message->name != NULL.
3018 (dbus_message_append_fields): have "first_field_type" arg separate
3019 from va list, needed for C++ binding that also uses varargs IIRC
3020 and helps with type safety
3021 (dbus_message_new): add @todo about using DBusString to store
3022 service/name internally
3023 (dbus_message_new): don't leak ->service and ->name on OOM later
3025 (dbus_message_unref): free the service name
3026 (dbus_message_get_fields): same change to varargs
3027 i.e. first_field_type
3028 (_dbus_message_loader_return_buffer): assert that the message data
3029 is aligned (if not it's a bug in our code). Put in verbose griping
3030 about why we set corrupted = TRUE.
3031 (decode_header_data): add FIXME that char* is evil. Was going to
3032 add FIXME about evil locale-specific string.h strncmp, but just
3033 switched to wacky string-as-uint32 optimization. Move check for
3034 "no room for field name" above get_const_data_len() to avoid
3035 assertion failure in get_const_data_len if we have trailing 2
3036 bytes or the like. Check for service and name fields being
3037 provided twice. Don't leak service/name on error. Require field
3038 names to be aligned to 4 bytes.
3040 * dbus/dbus-marshal.c: move byte swap stuff to header
3041 (_dbus_pack_int32): uscore-prefix
3042 (_dbus_unpack_int32): uscore-prefix
3043 (_dbus_unpack_uint32): export
3044 (_dbus_demarshal_string): add @todo complaining about use of
3046 (_dbus_marshal_get_field_end_pos): add @todo about bad error
3047 handling allowing corrupt data to go unchecked
3049 2003-01-08 Havoc Pennington <hp@redhat.com>
3051 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
3052 to the select() as needed for authentication. (should be using
3053 _dbus_poll() not select, but for another day)
3055 * dbus/dbus.h: include dbus/dbus-protocol.h
3057 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3059 * dbus/Makefile.am (dbusinclude_HEADERS): Install
3062 2003-01-08 Anders Carlsson <andersca@codefactory.se>
3064 * dbus/dbus-internals.c: (_dbus_type_to_string):
3065 New function that returns a string describing a type.
3067 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3068 * dbus/dbus-marshal.h:
3069 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3070 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3071 (dbus_message_iter_get_byte_array):
3072 * dbus/dbus-message.h:
3073 Add new convenience functions for appending and getting message fields.
3074 Also add demarshalling routines for byte arrays.
3076 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3078 * dbus/dbus-connection-internal.h:
3079 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3080 (_dbus_connection_get_next_client_serial),
3081 (dbus_connection_send_message):
3082 * dbus/dbus-internals.h:
3083 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3084 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3085 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3086 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3087 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3088 (_dbus_verbose_bytes), (_dbus_marshal_test):
3089 * dbus/dbus-marshal.h:
3090 * dbus/dbus-message-internal.h:
3091 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3092 (dbus_message_write_header), (_dbus_message_lock),
3093 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3094 (dbus_message_get_name), (dbus_message_append_int32),
3095 (dbus_message_append_uint32), (dbus_message_append_double),
3096 (dbus_message_append_string), (dbus_message_append_byte_array),
3097 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3098 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3099 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3100 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3101 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3102 (decode_header_data), (_dbus_message_loader_return_buffer),
3103 (message_iter_test), (_dbus_message_test):
3104 * dbus/dbus-message.h:
3105 * dbus/dbus-protocol.h:
3106 * dbus/dbus-test.c: (main):
3108 * glib/test-dbus-glib.c: (message_handler), (main):
3109 * test/echo-client.c: (main):
3110 * test/watch.c: (check_messages):
3111 Make messages sendable and receivable for real.
3113 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3115 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3116 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3117 * dbus/dbus-message.c: (dbus_message_append_int32),
3118 (dbus_message_append_uint32), (dbus_message_append_double),
3119 (dbus_message_append_string), (dbus_message_append_byte_array):
3120 Handle OOM restoration.
3122 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3124 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3125 (_dbus_demarshal_string), (_dbus_marshal_test):
3126 * dbus/dbus-marshal.h:
3127 * dbus/dbus-message.c: (dbus_message_get_name),
3128 Document these functions.
3130 (dbus_message_append_int32), (dbus_message_append_uint32),
3131 (dbus_message_append_double), (dbus_message_append_string),
3132 (dbus_message_append_byte_array):
3133 * dbus/dbus-message.h:
3134 Add functions for adding message fields of different types.
3136 * dbus/dbus-protocol.h:
3137 Add the different types.
3139 2003-01-05 Havoc Pennington <hp@pobox.com>
3141 * bus/connection.c: implement routines for handling connections,
3142 first thing is keeping a list of owned services on each connection
3143 and setting up watches etc.
3145 * bus/services.c: implement a mapping from service names to lists
3148 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3150 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3151 to use static mutexes for global data
3153 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3154 collection of functions to set/get application-specific data
3155 on the DBusConnection.
3157 2003-01-04 Havoc Pennington <hp@pobox.com>
3159 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3160 (_dbus_poll): new function
3162 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3165 * bus/loop.c: initial code for the daemon main loop
3167 2003-01-04 Havoc Pennington <hp@pobox.com>
3169 * test/watch.c (error_handler): make it safe if the error handler
3170 is called multiple times (if we s/error handler/disconnect
3171 handler/ we should just guarantee it's called only once)
3173 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3174 error handler on disconnect (it's quite possible we should
3175 just change the error handler to a "disconnect handler," I'm
3176 not sure we have any other meaningful errors)
3178 * configure.in: check for getpwnam_r
3180 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3181 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3182 mechanism as in SASL spec, using socket credentials
3184 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3185 (_dbus_send_credentials_unix_socket): new function
3187 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3189 (_dbus_write): only check errno if <0 returned
3190 (_dbus_write_two): ditto
3192 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3194 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3195 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3196 (_dbus_marshal_test):
3197 * dbus/dbus-marshal.h:
3198 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3199 to _dbus_marshal_utf8_string. Also fix some tests.
3201 2002-12-28 Harri Porten <porten@kde.org>
3203 * configure.in: added check for C++ compiler and a very cheesy
3204 check for the Qt integration
3206 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3208 * qt/Makefile.am: added
3210 * qt/.cvsignore: added
3212 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3213 latter, added #ifdef QT_THREAD_SUPPORT guard.
3215 * dbus/Makefile.am: added missing headers for make dist
3217 2002-12-28 Kristian Rietveld <kris@gtk.org>
3219 * dbus/Makefile.am: fixup export-symbols-regex.
3221 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3223 * acinclude.m4: Add this file and put the
3224 PKG_CHECK_MODULE macro in it.
3226 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3228 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3229 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3230 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3231 (_dbus_marshal_test):
3232 Make the demarshalling routines align the pos argument.
3233 Add string marshalling tests and fix the obvious bugs
3236 2002-12-26 Havoc Pennington <hp@pobox.com>
3238 * dbus/dbus-auth.c: fixes fixes fixes
3240 * dbus/dbus-transport-unix.c: wire up support for
3241 encoding/decoding data on the wire
3243 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3244 (_dbus_auth_decode_data): append to target string
3245 instead of nuking it.
3247 2002-12-26 Havoc Pennington <hp@pobox.com>
3249 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3250 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3253 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3254 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3255 now). Main point is because I wanted unpack_uint32 to implement
3257 (_dbus_verbose_bytes): new function
3259 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3261 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3262 mechanism to handle a corrupt message stream
3263 (_dbus_message_loader_new): fix preallocation to only prealloc,
3266 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3267 (_dbus_string_test): enhance tests for copy/move and fix the
3270 * dbus/dbus-transport-unix.c: Hold references in more places to
3271 avoid reentrancy problems
3273 * dbus/dbus-transport.c: ditto
3275 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3276 leak reference count in no-message case
3278 * test/watch.c (do_mainloop): handle adding/removing watches
3279 during iteration over the watches. Also, ref the connection/server
3280 stored on a watch, so we don't try to mangle a destroyed one.
3282 * dbus/dbus-transport-unix.c (do_authentication): perform
3285 * dbus/dbus-auth.c (get_state): add a state
3286 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3287 (_dbus_auth_get_unused_bytes): append the unused bytes
3288 to the passed in string, rather than prepend
3290 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3291 the auth conversation DBusAuth
3293 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3294 (_dbus_transport_new_for_domain_socket): when creating a
3295 transport, pass in whether it's a client-side or server-side
3296 transport so we know which DBusAuth to create
3298 2002-12-03 Havoc Pennington <hp@pobox.com>
3300 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3301 _after_ finalizing the derived members
3302 (unix_connection_set): unref watch if we fail to add it
3304 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3305 transport first, so that the connection owned by the
3306 transport will be valid as the transport finalizes.
3308 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3309 if necessary, and remove watches from the connection.
3311 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3313 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3315 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3316 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3317 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3318 (_dbus_marshal_test):
3319 * dbus/dbus-marshal.h:
3320 Add string marshal functions and have the demarshal functions
3321 return the new position.
3323 2002-12-25 Havoc Pennington <hp@pobox.com>
3325 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3326 it is a simple protocol that just maps directly to SASL.
3328 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3329 initial implementation, not actually used yet.
3331 * dbus/dbus-string.c (_dbus_string_find): new function
3332 (_dbus_string_equal): new function
3333 (_dbus_string_base64_encode): new function
3334 (_dbus_string_base64_decode): new function
3336 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3339 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3340 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3341 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3342 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3343 * dbus/dbus-marshal.h:
3344 * dbus/dbus-protocol.h:
3345 * dbus/dbus-test.c: (main):
3347 Add un-optimized marshalling/demarshalling routines.
3349 2002-12-25 Harri Porten <porten@kde.org>
3351 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3353 2002-12-24 Zack Rusin <zack@kde.org>
3355 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3356 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3359 2002-12-24 Havoc Pennington <hp@pobox.com>
3361 * glib/dbus-gthread.c: fix include
3363 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3364 I think glib API needs to change, though, as you don't
3365 want to use DBusMessageFunction, you want to use the
3366 DBusMessageHandler object. Probably
3367 dbus_connection_open_with_g_main_loop()
3368 and dbus_connection_setup_g_main_loop() or something like that
3369 (but think of better names...) that just create a connection
3370 that has watch/timeout functions etc. already set up.
3372 * dbus/dbus-connection.c
3373 (dbus_connection_send_message_with_reply): new function just to
3374 show how the message handler helps us deal with replies.
3376 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3378 * dbus/dbus-string.c (_dbus_string_test): free a string that
3381 * dbus/dbus-hash.c: use memory pools for the hash entries
3382 (rebuild_table): be more paranoid about overflow, and
3383 shrink table when we can
3384 (_dbus_hash_test): reduce number of sprintfs and write
3385 valid C89. Add tests for case where we grow and then
3386 shrink the hash table.
3388 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3390 * dbus/dbus-connection.c (dbus_connection_register_handler)
3391 (dbus_connection_unregister_handler): new functions
3393 * dbus/dbus-message.c (dbus_message_get_name): new
3395 * dbus/dbus-list.c: fix docs typo
3397 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3398 an object representing a handler for messages.
3400 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3403 * glib/dbus-gthread.c: (dbus_gthread_init):
3404 Don't use the gdbus prefix for public functions.
3406 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3410 Add GLib checks and fixup .pc files
3414 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3415 (gdbus_connection_check), (gdbus_connection_dispatch),
3416 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3417 (dbus_connection_gsource_new):
3418 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3419 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3420 * glib/test-dbus-glib.c: (message_handler), (main):
3423 2002-12-15 Harri Porten <porten@kde.org>
3425 * autogen.sh: check for libtoolize before attempting to use it
3427 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3430 * .cvsignore: ignore more stamp files
3432 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3434 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3435 without make install.
3437 2002-12-15 Havoc Pennington <hp@pobox.com>
3439 * dbus/dbus-threads.c: add thread stubs that a higher library
3440 layer can fill in. e.g. the GLib wrapper might fill them in with
3441 GThread stuff. We still need to use this thread API to
3442 thread-safe-ize the library.
3444 2002-12-12 Havoc Pennington <hp@pobox.com>
3446 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3447 below new interfaces and include fewer system headers.
3449 * dbus/dbus-sysdeps.c (_dbus_read): new function
3450 (_dbus_write): new function
3451 (_dbus_write_two): new function
3452 (_dbus_connect_unix_socket): new function
3453 (_dbus_listen_unix_socket): new function
3455 * dbus/dbus-message-internal.h: change interfaces to use
3458 2002-12-11 Havoc Pennington <hp@pobox.com>
3460 * dbus/dbus-types.h: add dbus_unichar
3462 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3464 * dbus/dbus-connection.c (dbus_connection_send_message): return
3467 * dbus/dbus-transport.c: include dbus-watch.h
3469 * dbus/dbus-connection.c: include dbus-message-internal.h
3471 * HACKING: add file with coding guidelines stuff.
3473 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3474 handling here, for security purposes (as in vsftpd). Not actually
3475 using this class yet.
3477 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3478 system/libc usage here, as in vsftpd, for ease of auditing (and
3479 should also simplify portability). Haven't actually moved all the
3480 system/libc usage into here yet.
3482 2002-11-25 Havoc Pennington <hp@pobox.com>
3484 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3485 always print the first verbose message.
3487 2002-11-24 Havoc Pennington <hp@pobox.com>
3489 * test/echo-client.c, test/echo-server.c: cheesy test
3492 * configure.in (AC_CHECK_FUNCS): check for writev
3494 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3497 * dbus/dbus-list.c (_dbus_list_foreach): new function
3499 * dbus/dbus-internals.c (_dbus_verbose): new function
3501 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3502 representing a server that listens for connections.
3504 * dbus/.cvsignore: create
3506 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3507 public API for reporting errors
3509 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3510 public object representing a connection that
3511 sends/receives messages. (Same object used for
3512 both client and server.)
3514 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3515 Basic abstraction for different kinds of stream
3516 that we might read/write messages from.
3518 2002-11-23 Havoc Pennington <hp@pobox.com>
3520 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3523 * dbus/dbus-test.c (main): add list test, and include
3524 dbus-test.h as intended
3526 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3527 (_dbus_hash_table_remove_int): return value indicates
3528 whether the entry existed to remove
3530 * dbus/dbus-list.c: add linked list utility class,
3533 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3536 2002-11-23 Havoc Pennington <hp@pobox.com>
3538 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3539 DBUS_END_DECLS to nothing, that should fix this once and for all
3541 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3543 * dbus/dbus-message.c, dbus/dbus-hash.c:
3544 add some missing @brief
3546 2002-11-23 Havoc Pennington <hp@pobox.com>
3548 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3549 to avoid confusing Doxygen
3551 * dbus/dbus-hash.c: @} not }@
3553 * dbus/dbus-message.c (struct DBusMessage): split out
3556 2002-11-23 Havoc Pennington <hp@pobox.com>
3558 * configure.in: pile on more warning flags if using gcc
3560 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3561 to document static functions
3563 * configure.in: add summary to end of configure so it
3564 looks nice and attractive
3566 * dbus/dbus-hash.c: finish implementation and write unit
3569 * configure.in: add --enable-tests to enable unit tests
3571 * dbus/dbus-test.c: test program to run unit tests
3572 for all files in dbus/*, initially runs a test for
3575 * dbus/dbus-internals.h: file to hold some internal utility stuff
3577 2002-11-22 Havoc Pennington <hp@redhat.com>
3579 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3580 "ported" away from Tcl
3582 * dbus/dbus-types.h: header for types such as dbus_bool_t
3584 2002-11-22 Havoc Pennington <hp@redhat.com>
3586 * dbus/dbus.h: fixups for doc warnings
3588 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3590 (QUIET): make it quiet so we can see warnings
3592 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3594 2002-11-22 Havoc Pennington <hp@redhat.com>
3596 * Makefile.am: include "Doxyfile" target in all-local
3598 * configure.in: generate the Doxyfile
3600 * Doxyfile.in: move Doxyfile here, so we can use
3601 configure to generate a Doxyfile with the right
3604 2002-11-22 Havoc Pennington <hp@redhat.com>
3606 * dbus/dbus-message.c: move inline docs into .c file
3608 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3609 so all docs are under doc/
3610 (MAN_EXTENSION): generate man pages. Use extension
3611 ".3dbus" which matches ".3qt" on my system,
3612 I guess this is OK, I don't know really.
3613 (FILE_PATTERNS): look for .c files not .h, makes sense
3616 2002-11-22 Havoc Pennington <hp@pobox.com>
3618 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3619 because any app can be a server, and any app can be a client,
3620 the bus is a special kind of server.
3622 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3624 * Doxyfile : adding. Still needs Makefile rules to be generated
3625 automatically (just run "doxygen" in the toplevel dir for now to
3628 * dbus/dbus-message.h : Adding sample docs (javadoc since
3629 resembles gtk-doc a little more)
3631 * dbus/dbus.h : Adding sample docs
3633 2002-11-21 Havoc Pennington <hp@redhat.com>
3635 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3636 so we can allow ourselves to include files directly,
3637 instead of having to use dbus.h
3639 * dbus/dbus.h: fill in
3641 * dbus/dbus-message.h: sketch out a sample header file.
3642 Include griping if you include it directly instead of
3645 * dbus/dbus-macros.h: new file with macros for extern "C",
3646 TRUE/FALSE, NULL, etc.
3648 * doc/file-boilerplate.c: put include guards in here
3650 2002-11-21 Havoc Pennington <hp@redhat.com>
3652 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3654 * COPYING: include the GPL as well, and license code
3655 under both AFL and GPL.
3657 2002-11-21 Havoc Pennington <hp@redhat.com>
3659 * acconfig.h: get rid of this
3661 * autogen.sh (run_configure): add --no-configure option
3663 * configure.in: remove AC_ARG_PROGRAM to make
3664 autoconf complain less. add AC_PREREQ.
3665 add AC_DEFINE third arg.
3667 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3670 Fix references so we can distcheck.
3672 2002-11-21 Havoc Pennington <hp@redhat.com>
3674 * Initial module creation