1 2003-04-05 Havoc Pennington <hp@pobox.com>
3 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4 patch from Colin Walters
6 2003-04-05 Havoc Pennington <hp@pobox.com>
8 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
9 reality; in fact multiple mechanisms are allowed.
11 * dbus/dbus-internals.c (_dbus_real_assert)
12 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
13 _dbus_assert_not_reached() into functions, so that they don't show
14 up in basic block counts for test coverage, and don't use up as
15 much disk space. Does mean slower execution speed though, so
16 assumes --disable-asserts is the normal production case.
18 2003-04-05 Havoc Pennington <hp@pobox.com>
20 * test/Makefile.am (dist-hook): also dist *.in files
26 2003-04-05 Havoc Pennington <hp@pobox.com>
28 * dbus/dbus-string.c: docs warning
30 * dbus/dbus-spawn.c: missing docs
32 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
34 2003-04-05 Havoc Pennington <hp@pobox.com>
36 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
39 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
40 to -1 once we've reaped the babysitter
41 (_dbus_babysitter_handle_watch): do as much work as we can, not
44 * bus/activation.c: add code using DBusBabysitter so that we
45 handle it when a service fails to start up properly.
46 (bus_activation_service_created): don't remove the activation
47 entries as we go, just let them get removed when we free the pending
48 activation. Unref reply messages after sending them.
50 2003-04-05 Havoc Pennington <hp@pobox.com>
52 * test/decode-gcov.c (main): print per-directory stats in the report
54 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
56 2003-04-05 Havoc Pennington <hp@pobox.com>
58 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
60 * test/decode-gcov.c: hack up a little program to suck data
61 out of gcov files. Yes this is sort of silly.
63 * configure.in: define something in config.h and do an
64 AM_CONDITIONAL when gcov is enabled
66 2003-04-04 Havoc Pennington <hp@redhat.com>
68 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
69 return a "babysitter" object that is used to monitor the status of
70 the spawned process and reap it when required.
72 * test/test-segfault.c, test/test-exit.c,
73 test/test-sleep-forever.c: binaries that do various lame things,
74 used in the test suite.
76 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
78 2003-04-03 Havoc Pennington <hp@pobox.com>
80 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
81 in preparation for modifying it, dbus-sysdeps is getting
84 2003-04-03 Havoc Pennington <hp@redhat.com>
86 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
89 * bus/*.[hc]: adapt to mainloop change
91 2003-04-03 Havoc Pennington <hp@redhat.com>
93 * bus/activation.c (load_directory): fix up memleaks
94 (bus_activation_entry_free): free the entry
96 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
97 we get one from the message bus; fix memleaks.
99 * dbus/dbus-message.c (dbus_set_error_from_message): new function
101 2003-04-03 Havoc Pennington <hp@pobox.com>
103 * bus/config-parser.c (bus_config_parser_unref): free
104 list of mechanisms, bug discovered by test suite enhancements
105 (putting system.conf and session.conf into suite)
107 * test/Makefile.am, test/test-service.c: add placeholder for a
108 test service that we'll activate as part of test suite. Doesn't
111 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
112 setting NULL value, and use system malloc not dbus_malloc()
113 when we have unavoidable memleakage.
115 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
116 didn't work, and support DBUS_BUS_ACTIVATION.
118 * bus/activation.c (child_setup): pass our well-known bus type to
121 * bus/config-parser.c: support <type> to specify well-known type
123 * doc/dbus-specification.sgml: document the env variables to
124 locate well-known buses and find service activator
126 2003-04-02 Havoc Pennington <hp@redhat.com>
128 * test/Makefile.am (all-local): add a rule to copy tests to
129 builddir, so we can have generated tests. Use this to remove the
130 silly hack for testing system.conf and session.conf. Will use this
131 shortly to generate .service files pointing to test binaries.
133 2003-04-02 Havoc Pennington <hp@redhat.com>
135 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
136 current alloc and needed new length, not max of the doubled
137 allocation and needed new length. Also, when building tests,
138 don't do the double-allocation stuff, just realloc every time.
140 2003-04-02 Havoc Pennington <hp@redhat.com>
142 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
144 (_dbus_string_get_dirname): new
145 (_dbus_sysdeps_test): new
146 (_dbus_directory_open): include dirnames in error messages
148 * bus/config-parser.c: interpret <include> and <includedir> and
149 <servicedir> relative to config file location if the given
150 filename is not absolute.
152 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
154 2003-04-02 Havoc Pennington <hp@redhat.com>
156 * bus/connection.c (bus_transaction_send_error_reply): set sender
157 service for the error, and unref the reply on success
159 * bus/activation.c: convert to use BusTransaction so OOM can be
161 (bus_activation_service_created): set sender of the message
163 2003-04-01 Havoc Pennington <hp@redhat.com>
165 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
166 <includedir> (at least mostly)
168 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
169 first, then the user ID
171 2003-04-01 Havoc Pennington <hp@pobox.com>
173 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
176 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
178 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
180 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
181 socket 0777, and unlink any existing socket.
183 * bus/bus.c (bus_context_new): change our UID/GID and fork if
184 the configuration file so specifies; set up auth mechanism
187 * bus/config-parser.c (bus_config_parser_content): add support
188 for <fork> option and fill in code for <auth>
190 * bus/system.conf.in: add <fork/> to default configuration,
191 and limit auth mechanisms to EXTERNAL
193 * doc/config-file.txt (Elements): add <fork>
195 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
196 (_dbus_change_identity): new function
198 2003-03-31 Havoc Pennington <hp@redhat.com>
200 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
201 (_dbus_listen_unix_socket): fix off-by-one error in null
202 termination spotted by Nalin
204 2003-03-31 Havoc Pennington <hp@redhat.com>
206 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
207 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
208 having a real home directory available.
210 2003-03-31 Havoc Pennington <hp@redhat.com>
212 * bus/Makefile.am (install-data-hook): create /var/run/dbus
214 * bus/messagebus.in: add init script for Red Hat /etc/init.d
216 * configure.in: add support for specifying a style of init script
219 2003-03-31 Havoc Pennington <hp@redhat.com>
221 Fix some annoying DBusString API and fix all affected code.
223 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
225 (_dbus_string_get_data): change to return string instead of using
227 (_dbus_string_get_const_data): ditto
228 (_dbus_string_get_data_len): ditto
229 (_dbus_string_get_const_data_len): ditto
231 2003-03-31 Havoc Pennington <hp@redhat.com>
233 * bus/main.c (main): fix up the command line arguments to be nicer
235 2003-03-31 Havoc Pennington <hp@redhat.com>
237 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
238 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
239 final location that lands in the config file
241 * bus/config-loader-expat.c (bus_config_load): fix type of
244 * doc/TODO: remove TODO item for dbus_bus_get()
246 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
248 2003-03-31 Havoc Pennington <hp@pobox.com>
250 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
251 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
252 argument since they are always client side
254 * dbus/dbus-server.c (dbus_server_get_address): new function
256 * bus/main.c (main): take the configuration file as an argument.
258 * test/data/valid-config-files/debug-allow-all.conf: new file to
259 use with dispatch.c tests for example
261 * bus/test-main.c (main): require test data dir
263 * bus/bus.c (bus_context_new): change this to take a
264 configuration file name as argument
266 * doc/config-file.txt (Elements): add <servicedir>
268 * bus/system.conf, bus/session.conf: new files
270 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
271 well-known socket if none set
273 * configure.in: create system.conf and session.conf
275 2003-03-30 Havoc Pennington <hp@pobox.com>
277 * bus/config-parser.c: hacking
279 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
280 to shut down, since it could cause weirdness with the DBusList
283 * dbus/dbus-list.c (_dbus_list_test): add tests for the
284 link-oriented stack routines
285 (alloc_link): free the mempool if the first alloc from it fails
287 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
289 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
291 (_dbus_string_skip_white): new
293 * doc/config-file.txt (Elements): add <includedir>
295 2003-03-28 Havoc Pennington <hp@pobox.com>
297 * dbus/dbus-string.c (_dbus_string_copy_data_len)
298 (_dbus_string_copy_data): new functions
300 2003-03-28 Anders Carlsson <andersca@codefactory.se>
302 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
306 * dbus/dbus-memory.c:
309 2003-03-28 Havoc Pennington <hp@pobox.com>
311 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
312 I think it may have just been superstition. Not sure.
314 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
315 failures that were not being handled.
317 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
319 * dbus/dbus-memory.c: add ability to set number of mallocs in a
320 row that will fail on out-of-memory.
322 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
323 function for testing out-of-memory handling.
325 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
326 allocation functions, they do map exactly to the expat ones.
328 2003-03-27 Havoc Pennington <hp@redhat.com>
330 * bus/config-loader-libxml.c (bus_config_load): add another error
333 2003-03-26 Anders Carlsson <andersca@codefactory.se>
336 Add note about automatic service activation.
338 * doc/dbus-specification.sgml:
339 Rename the specification and clarify a few things.
341 2003-03-26 Anders Carlsson <andersca@codefactory.se>
344 * dbus/dbus-address.c:
346 * dbus/dbus-marshal.c:
347 * dbus/dbus-server-debug-pipe.c:
348 * dbus/dbus-transport-unix.c:
349 Fix documentation warnings.
351 2003-03-26 Havoc Pennington <hp@pobox.com>
353 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
354 after every test so it's quick and easy to see which leaked, and
355 so we test multiple dbus_shutdown() calls
357 * configure.in: change configure.in XML stuff to also support
360 * config-loader-libxml.c: some hacking
362 * config-loader-expat.c: some hacking
364 * config-parser.c: some hacking, plus tests
366 2003-03-25 Havoc Pennington <hp@redhat.com>
368 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
370 * configure.in: add --with-xml option to specify XML library,
371 right now only libxml is supported.
373 * bus/config-loader-libxml.c, config-parser.c: sync some minor
374 nonworking code between home and work, still just stubs
376 2003-03-24 Havoc Pennington <hp@redhat.com>
378 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
381 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
382 NULL argument for "message" if the error is a well-known one,
383 fill in a generic message in this case.
385 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
388 * bus/test.c (bus_test_flush_bus): add
390 * bus/policy.c (bus_policy_test): test code stub
392 2003-03-24 Havoc Pennington <hp@pobox.com>
394 * bus/connection.c (bus_connections_setup_connection): set up
395 the "can this user connect" function, but it always returns
396 TRUE until we have a config file parser so we can have a config
397 file that allows connections.
399 2003-03-23 Havoc Pennington <hp@pobox.com>
401 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
402 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
403 the mutex, so we can check for proper memory management
406 * dbus/dbus-dataslot.c: remove the mutex from
407 DBusDataSlotAllocator and lock it manually when using it,
408 to simplify fitting it into the global slots framework.
410 * dbus/dbus-threads.c (init_static_locks): rework how we're
411 handling global locks so they are easily shut down.
413 * bus/policy.c (bus_policy_append_rule): fix
415 * bus/test-main.c (main): check for memleaks
417 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
418 test suite check for memleaks
420 * dbus/dbus-memory.c: add support in test mode for tracking
421 number of outstanding blocks
423 2003-03-23 Havoc Pennington <hp@pobox.com>
425 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
428 * dbus/dbus-hash.h: add ULONG hash keys
430 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
431 (_dbus_get_group_id): new function
433 2003-03-20 Havoc Pennington <hp@redhat.com>
435 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
437 (dbus_connection_get_unix_user): new function
439 2003-03-20 Havoc Pennington <hp@pobox.com>
441 * bus/connection.c (bus_connection_send_oom_error): assert that
443 (connection_execute_transaction): ditto
444 (bus_connection_preallocate_oom_error): fix to set the sender, and
445 set recipient to the destination service, not the bus driver
447 * bus/policy.c: hacking
449 * dbus/dbus-message.c (dbus_message_service_is): new function
450 (dbus_message_sender_is): new
452 2003-03-19 Havoc Pennington <hp@redhat.com>
454 * bus/policy.c: start sketching code for policy restrictions on
455 what connections can do.
457 2003-03-18 Havoc Pennington <hp@redhat.com>
459 * doc/TODO: some notes on high-level todo items. Little nitpick
460 stuff is all in @todo, so no need to add it here.
462 * doc/config-file.txt: some notes on how config file might look
464 2003-03-18 Anders Carlsson <andersca@codefactory.se>
470 2003-03-17 Havoc Pennington <hp@redhat.com>
472 * dbus/dbus-internals.h: add gcc attributes so that
473 our printf-style functions warn on bad arguments to
476 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
479 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
482 2003-03-17 Havoc Pennington <hp@redhat.com>
484 * bus/test-main.c (main): make it print something as it runs
485 so make check doesn't look stuck
487 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
488 from CVS, now obsolete
490 2003-03-17 Anders Carlsson <andersca@codefactory.se>
492 * bus/dispatch.c: (bus_dispatch):
493 Refetch the service name since it may have been reallocated
494 when dbus_message_set_sender was called.
496 * dbus/dbus-sysdeps.c: (_dbus_accept):
497 Add address and address length variables and use them to stop
498 valgrind from complaining.
500 2003-03-17 Havoc Pennington <hp@pobox.com>
502 All tests pass, no memleaks, no valgrind complaints.
504 * bus/test.c: refcount handler_slot
506 * bus/connection.c (bus_connections_new): refcount
509 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
510 bytes so that auth scripts pass.
512 * bus/dispatch.c: init message_handler_slot so it gets allocated
515 * bus/dispatch.c (message_handler_slot_ref): fix memleak
517 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
518 dealloc server_pipe_hash when no longer used for benefit of
521 * dbus/dbus-auth.c (process_command): memleak fix
523 * bus/dispatch.c (check_hello_message): memleak fix
525 2003-03-16 Havoc Pennington <hp@pobox.com>
527 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
529 2003-03-17 Anders Carlsson <andersca@codefactory.se>
531 * bus/activation.c (bus_activation_activate_service): Append
532 the pending activation entry to the list of pending activations.
534 2003-03-16 Havoc Pennington <hp@pobox.com>
536 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
539 * dbus/dbus-address.c (create_entry): fix OOM handling when
540 failing to alloc entry->method
542 2003-03-16 Havoc Pennington <hp@pobox.com>
544 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
547 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
548 add some missing dbus_set_result
550 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
551 alloc the DBusMessageHandler
553 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
554 the transport here, since we call this from the finalizer; it
555 resulted in a double-finalize.
557 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
558 where we tried to use transport->connection that was NULL,
559 happened when transport was disconnected early on due to OOM
561 * bus/*.c: adapt to handle OOM for watches/timeouts
563 * dbus/dbus-transport-unix.c: port to handle OOM during
566 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
567 reference to unused bytes instead of a copy
569 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
572 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
575 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
578 2003-03-16 Anders Carlsson <andersca@codefactory.se>
580 * doc/dbus-specification.sgml:
581 Document reply message for ActivateService.
583 2003-03-16 Anders Carlsson <andersca@codefactory.se>
585 * bus/activation.c: (bus_pending_activation_entry_free),
586 (bus_pending_activation_free), (bus_activation_new),
587 (bus_activation_unref), (bus_activation_service_created),
588 (bus_activation_activate_service):
590 * bus/bus.c: (bus_context_new):
591 * bus/desktop-file.c: (new_section):
592 * bus/driver.c: (bus_driver_send_service_deleted),
593 (bus_driver_handle_activate_service):
594 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
596 * dbus/dbus-connection.c:
597 (dbus_connection_send_with_reply_and_block):
598 * dbus/dbus-message.c: (dbus_message_append_args_valist):
599 * dbus/dbus-protocol.h:
600 Make activation work better. Now pending activations will be queued
601 and the daemon won't try to activate services that are already registered.
603 2003-03-16 Havoc Pennington <hp@pobox.com>
605 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
608 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
609 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
611 2003-03-16 Havoc Pennington <hp@pobox.com>
613 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
614 this. always run the test suite before commit...
616 * bus/*: adapt to DBusConnection API changes
618 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
619 requires renaming stuff to avoid dbus_connection_dispatch name
622 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
625 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
626 separate from _dbus_message_loader_return_buffer()
628 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
629 this, because it's now always broken to use; the number of
630 messages in queue vs. the number still buffered by the message
631 loader is undefined/meaningless. Should use
632 dbus_connection_get_dispatch_state().
633 (dbus_connection_dispatch): rename from
634 dbus_connection_dispatch_message
636 2003-03-16 Havoc Pennington <hp@pobox.com>
638 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
641 2003-03-16 Anders Carlsson <andersca@codefactory.se>
643 * dbus/dbus-connection.c:
644 (dbus_connection_send_with_reply_and_block):
645 Decrease connection->n_incoming when removing an entry
647 * dbus/dbus-dict.c: (dbus_dict_entry_free),
648 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
649 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
650 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
651 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
652 (dbus_dict_get_byte_array):
653 Handle NULL arrays and strings. Also add support for byte arrays.
655 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
656 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
657 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
658 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
659 (_dbus_demarshal_dict), (demarshal_and_validate_len),
660 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
661 * dbus/dbus-marshal.h:
662 Add support for marshalling and demarshalling empty arrays and strings.
664 * dbus/dbus-message.c: (dbus_message_append_args_valist),
665 (dbus_message_append_string_array),
666 (dbus_message_iter_get_boolean),
667 (dbus_message_iter_get_boolean_array),
668 (dbus_message_iter_get_int32_array),
669 (dbus_message_iter_get_uint32_array),
670 (dbus_message_iter_get_double_array),
671 (dbus_message_iter_get_byte_array),
672 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
673 (check_message_handling):
674 Add support for getting empty arrays and dicts.
676 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
677 Don't do any validation at all for now, that's better than just checking
680 * test/data/valid-messages/emptiness.message:
681 New test message with lots of empty arrays.
683 2003-03-16 Havoc Pennington <hp@pobox.com>
685 * dbus/dbus-connection.c
686 (_dbus_connection_queue_received_message_link): new function that
687 can't fail due to OOM
689 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
690 new function pops a message together with a list link
693 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
694 message queuing functions to avoid needing to alloc memory
696 2003-03-16 Havoc Pennington <hp@pobox.com>
698 Oops - test code was only testing failure of around 30 of the
699 mallocs in the test path, but it turns out there are 500+
700 mallocs. I believe this was due to misguided linking setup such
701 that there was one copy of dbus_malloc etc. in the daemon and one
702 in the shared lib, and only daemon mallocs were tested. In any
703 case, the test case now tests all 500+ mallocs, and doesn't pass
704 yet, though there are lots of fixes in this patch.
706 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
707 this so that it doesn't need to allocate memory, since it
708 has no way of indicating failure due to OOM (and would be
711 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
713 * bus/Makefile.am: rearrange to create two self-contained
714 libraries, to avoid having libraries with overlapping symbols.
715 that was resulting in weirdness, e.g. I'm pretty sure there
716 were two copies of global static variables.
718 * dbus/dbus-internals.c: move the malloc debug stuff to
721 * dbus/dbus-list.c (free_link): free list mempool if it becomes
724 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
726 * dbus/dbus-address.c (dbus_parse_address): free list nodes
729 * bus/dispatch.c (bus_dispatch_add_connection): free
730 message_handler_slot when no longer using it, so
731 memory leak checkers are happy for the test suite.
733 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
735 * bus/bus.c (new_connection_callback): disconnect in here if
736 bus_connections_setup_connection fails.
738 * bus/connection.c (bus_connections_unref): fix to free the
740 (bus_connections_setup_connection): if this fails, don't
741 disconnect the connection, just be sure there are no side
744 * dbus/dbus-string.c (undo_alignment): unbreak this
746 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
748 (_dbus_auth_new): fix the order in which we free strings
751 * bus/connection.c (bus_connection_disconnected): fix to
752 not send ServiceDeleted multiple times in case of memory
755 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
756 get the base service name
757 (dbus_bus_register_client): don't return base service name,
758 instead store it on the DBusConnection and have an accessor
760 (dbus_bus_register_client): rename dbus_bus_register()
762 * bus/dispatch.c (check_hello_message): verify that other
763 connections on the bus also got the correct results, not
764 just the one sending hello
766 2003-03-15 Havoc Pennington <hp@pobox.com>
768 Make it pass the Hello handling test including all OOM codepaths.
769 Now to do other messages...
771 * bus/services.c (bus_service_remove_owner): fix crash when
772 removing owner from an empty list of owners
773 (bus_registry_ensure): don't leave service in the list of
774 a connection's owned services if we fail to put the service
777 * bus/connection.c (bus_connection_preallocate_oom_error): set
778 error flag on the OOM error.
780 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
781 handle _dbus_transport_set_connection failure
783 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
784 to create watches up front and simply enable/disable them as
786 (unix_connection_set): this can now fail on OOM
788 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
789 of enabling/disabling a watch or timeout.
791 * bus/loop.c (bus_loop_iterate): don't touch disabled
794 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
796 2003-03-15 Havoc Pennington <hp@pobox.com>
798 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
799 write useful test code, after all that futzing around ;-)
801 Test does not yet pass because we can't handle OOM in
802 _dbus_transport_messages_pending (basically,
803 dbus_connection_preallocate_send() does not prealloc the write
804 watch). To fix this, I think we need to add new stuff to
805 set_watch_functions, namely a SetEnabled function so we can alloc
806 the watch earlier, then enable it later.
808 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
809 dbus-memory.c to the convenience lib
811 * bus/test.c: rename some static functions to keep them clearly
812 distinct from stuff in connection.c. Handle client disconnection.
814 2003-03-14 Havoc Pennington <hp@pobox.com>
816 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
817 transport, tests more of the real codepath. Set up clients
818 with bus_setup_debug_client.
820 * bus/test.c (bus_setup_debug_client): function to set up debug
821 "clients" on the main loop
823 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
826 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
829 * dbus/dbus-server-debug.c: support a debug server based on pipes
831 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
832 (_dbus_close): new function
834 * configure.in: check for socketpair
836 2003-03-14 Havoc Pennington <hp@redhat.com>
838 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
841 * dbus/dbus-transport-debug.c: rework this a good bit to be
842 less complicated. hopefully still works.
844 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
847 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
850 * dbus/dbus-message.c (dbus_message_copy): rename from
851 dbus_message_new_from_message, fix it up to copy
852 all the message fields, add test case
854 * bus/dispatch.c (bus_dispatch_test): add some more test code,
855 not quite passing yet
857 2003-03-14 Havoc Pennington <hp@pobox.com>
859 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
860 until no work remains" in test code. (the large diff here
861 is just code movement, no actual changes)
863 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
864 1, no point waiting around for test code.
865 (_dbus_server_debug_accept_transport): unref the timeout
866 after adding it (right?)
868 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
870 2003-03-13 Havoc Pennington <hp@redhat.com>
872 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
875 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
878 * dbus/dbus-connection.h: Make AddWatchFunction and
879 AddTimeoutFunction return a bool so they can fail on out-of-memory
881 * bus/bus.c (bus_context_new): set up timeout handlers
883 * bus/connection.c (bus_connections_setup_connection): set up
886 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
889 * bus/bus.c (bus_context_new): adapt to changes
891 * bus/connection.c: adapt to changes
893 * test/watch.c: adapt to DBusWatch changes
895 * bus/dispatch.c (bus_dispatch_test): started adding this but
898 2003-03-14 Anders Carlsson <andersca@codefactory.se>
900 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
902 2003-03-13 Havoc Pennington <hp@pobox.com>
904 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
905 set up a test framework as for the library
907 2003-03-12 Havoc Pennington <hp@pobox.com>
909 Throughout: purge global variables, introduce BusActivation,
910 BusConnections, BusRegistry, etc. objects instead.
912 * bus/bus.h, bus/bus.c: introduce BusContext as a global
915 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
916 going to redo this a bit differently I think
918 2003-03-12 Havoc Pennington <hp@redhat.com>
920 Mega-patch that gets the message bus daemon initially handling
921 out-of-memory. Work still needed. Also lots of random
922 moving stuff to DBusError instead of ResultCode.
924 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
926 * dbus/dbus-connection.c
927 (dbus_connection_send_with_reply_and_block): use DBusError
929 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
932 * dbus/dbus-connection.c (dbus_connection_send): drop the result
933 code here, as the only failure possible is OOM.
935 * bus/connection.c (bus_connection_disconnect):
936 rename bus_connection_disconnected as it's a notification only
938 * bus/driver.c (bus_driver_handle_acquire_service): don't free
939 "name" on get_args failure, should be done by get_args;
940 don't disconnect client for bad args, just return an error.
941 (bus_driver_handle_service_exists): ditto
943 * bus/services.c (bus_services_list): NULL-terminate returned array
945 * bus/driver.c (bus_driver_send_service_lost)
946 (bus_driver_send_service_acquired): send messages from driver to a
947 specific client to the client's unique name, not to the broadcast
950 * dbus/dbus-message.c (decode_header_data): reject messages that
951 contain no name field
952 (_dbus_message_get_client_serial): rename to
953 dbus_message_get_serial and make public
954 (_dbus_message_set_serial): rename from set_client_serial
955 (_dbus_message_set_reply_serial): make public
956 (_dbus_message_get_reply_serial): make public
958 * bus/connection.c (bus_connection_foreach): allow stopping
959 iteration by returning FALSE from foreach function.
961 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
962 (dbus_connection_free_preallocated_send)
963 (dbus_connection_preallocate_send): new API for sending a message
964 without possibility of malloc failure.
965 (dbus_connection_send_message): rename to just
966 dbus_connection_send (and same for whole function family)
968 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
970 * dbus/dbus-sysdeps.c (_dbus_exit): new function
972 * bus/activation.c: handle/return errors
974 * dbus/dbus-errors.h: add more DBUS_ERROR #define
976 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
977 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
978 (_dbus_result_from_errno): move to this file
980 2003-03-10 Anders Carlsson <andersca@codefactory.se>
982 * dbus/dbus-marshal.c:
983 (_dbus_marshal_set_string):
984 Take a length argument so we can marshal the correct string
987 (_dbus_marshal_dict), (_dbus_demarshal_dict),
988 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
989 (_dbus_marshal_test):
990 * dbus/dbus-marshal.h:
991 Add support for marshalling and demarshalling dicts.
993 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
994 Add support for TYPE DICT.
996 * dbus/dbus-message.c: (set_string_field):
997 Adjust header padding.
999 (dbus_message_append_args_valist), (dbus_message_append_dict),
1000 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
1001 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
1002 (check_message_handling), (check_have_valid_message):
1003 * dbus/dbus-message.h:
1004 Add functions for setting and getting dicts.
1006 * dbus/dbus-protocol.h:
1012 * doc/dbus-specification.sgml:
1013 Add information about how dicts are marshalled.
1015 * test/data/invalid-messages/dict-with-nil-value.message:
1016 * test/data/invalid-messages/too-short-dict.message:
1017 * test/data/valid-messages/dict-simple.message:
1018 * test/data/valid-messages/dict.message:
1019 Add sample messages containing dicts.
1021 2003-03-08 Anders Carlsson <andersca@codefactory.se>
1023 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
1025 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1028 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1029 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
1030 (dbus_dict_set_int32), (dbus_dict_set_uint32),
1031 (dbus_dict_set_double), (dbus_dict_set_string),
1032 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1033 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1034 (dbus_dict_set_string_array), (_dbus_dict_test):
1036 Fix according to comments from Havoc.
1038 2003-03-06 Michael Meeks <michael@server.home>
1040 * configure.in: if we don't have kde-config, disable have_qt.
1042 2003-03-07 Anders Carlsson <andersca@codefactory.se>
1047 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
1048 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1049 (dbus_dict_remove), (dbus_dict_get_value_type),
1050 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1051 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1052 (dbus_dict_put_double), (dbus_dict_put_string),
1053 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1054 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1055 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1056 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1057 (dbus_dict_get_double), (dbus_dict_get_string),
1058 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1059 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1060 (dbus_dict_get_string_array), (_dbus_dict_test):
1062 Add DBusDict implementation
1064 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1068 2003-03-04 Havoc Pennington <hp@pobox.com>
1070 * test/data/auth/*: adapt to changes
1072 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1073 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1076 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1077 more stuff from being in a context name, to make the protocol
1078 simpler to deal with
1080 * dbus/dbus-errors.c (dbus_error_has_name): new function
1081 (dbus_error_is_set): new function
1083 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1084 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1086 * dbus/dbus-connection.c (dbus_connection_flush): also read
1087 messages during a flush operation
1089 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1091 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1093 * configure.in: Check for gethostbyname on Solaris.
1095 * dbus/dbus-transport.c: (_dbus_transport_open):
1096 Remove duplicate "tcp" entry.
1098 * doc/dbus-specification.sgml:
1099 Clarify some things.
1101 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1103 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1104 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1105 (_dbus_keyring_test):
1106 * dbus/dbus-md5.c: (_dbus_md5_compute):
1107 * dbus/dbus-sha.c: (_dbus_sha_compute):
1110 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1112 * README: Add some things.
1114 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1116 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1117 after case DBUS_TYPE_BOOELAN.
1119 2003-03-02 Havoc Pennington <hp@pobox.com>
1121 * test/break-loader.c (randomly_set_extreme_ints): add test that
1122 sets really huge and small integers
1124 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1125 that length of boolean array fits in the string, and that
1126 string has room for boolean value in single-bool case.
1128 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1129 optional value to "ALIGN" command which is what to fill the
1132 * test/data/valid-messages/no-padding.message: add regression
1133 test for the message padding problem
1135 2003-03-02 Havoc Pennington <hp@pobox.com>
1137 * dbus/dbus-message.c (decode_header_data): fix to always init
1138 message_padding, from Benjamin Dauvergne
1140 2003-03-02 Havoc Pennington <hp@pobox.com>
1146 2003-03-01 Joe Shaw <joe@assbarn.com>
1148 * configure.in: Check for "struct cmsgcred" and try to access its
1149 members for BSD-like unices.
1151 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1152 _dbus_read_credentials_unix_socket().
1153 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1154 read() for reading the credential byte off the unix socket. Use
1155 struct cmsgcred on systems that support it.
1157 2003-02-27 Alexander Larsson <alexl@redhat.com>
1161 Make gthreads-2.0 dependency optional. Don't build thread test if
1164 2003-02-27 Havoc Pennington <hp@pobox.com>
1166 * dbus/dbus-connection.c
1167 (dbus_connection_send_message_with_reply_and_block): fix doh!
1168 doh! doh! bug that resulted in never removing a reply from the
1169 queue, no wonder we called get_reply_serial so much ;-)
1171 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1172 and client serial instead of demarshaling them every time
1174 2003-02-27 Havoc Pennington <hp@pobox.com>
1176 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1177 more inlined, using dbus-string-private.h, speeds things up
1180 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1181 when freeing the string
1182 (_dbus_string_steal_data): fix for align offset
1183 (undo_alignment): new function
1185 2003-02-26 Havoc Pennington <hp@redhat.com>
1187 All kinds of audit fixes from Owen, plus initial attempt to
1188 handle unaligned memory returned from malloc.
1190 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1191 leave room for align_offset and nul byte
1192 (fixup_alignment): function to track an align_offset and
1193 ensure real->str is aligned
1194 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1195 to allow a nul byte plus align offset
1196 (_dbus_string_lock): fix overflow issue
1197 (_dbus_string_init_const_len): add assertions on sanity of len,
1198 assign allocated to be ALLOCATION_PADDING larger than len
1199 (set_length): fixup the overflow handling
1200 (_dbus_string_get_data_len): fix overflow in assertion
1201 (open_gap): detect overflow in size of gap to be opened
1202 (_dbus_string_lengthen): add overflow check
1203 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1204 (_dbus_string_append): add overflow check
1205 (_dbus_string_append_unichar): overflow
1206 (_dbus_string_delete): fix overflow in assertion
1207 (_dbus_string_copy_len): overflow in assertion
1208 (_dbus_string_replace_len): overflows in assertions
1209 (_dbus_string_find): change to implement in terms of
1210 _dbus_string_find_to
1211 (_dbus_string_find_to): assorted fixage
1212 (_dbus_string_equal_c_str): assert c_str != NULL,
1213 fix logic so the function works
1214 (_dbus_string_ends_with_c_str): fix overflow thingy
1215 (_dbus_string_base64_encode): overflow fix
1216 (_dbus_string_validate_ascii): overflow
1217 (_dbus_string_validate_nul): overflow
1219 2003-02-26 Havoc Pennington <hp@redhat.com>
1221 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1223 2003-02-26 Alexander Larsson <alexl@redhat.com>
1226 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1228 * dbus/dbus-connection.c:
1229 * dbus/dbus-connection.h:
1230 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1231 Add dbus_connection_set_wakeup_main_function and use it when queueing
1232 incoming and outgoing messages.
1235 * dbus/dbus-dataslot.c:
1236 Threadsafe usage of DBusDataSlotAllocator
1238 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1241 * dbus/dbus-server-unix.c:
1244 * glib/dbus-gmain.c:
1245 Implement the new wakeup functions for glib.
1248 * glib/test-thread-client.c:
1249 * glib/test-thread-server.c:
1250 * glib/test-thread.h:
1251 Initial cut at some thread test code. Not really done yet.
1253 2003-02-26 Havoc Pennington <hp@pobox.com>
1255 * dbus/dbus-connection.c
1256 (dbus_connection_send_message_with_reply_and_block): fix crash
1257 where we ref'd the outgoing message instead of the returned reply
1259 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1260 at the end of this function, so if we didn't need to read for
1261 authentication, we reinstall it for receiving messages
1263 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1264 a NULL sender for peer-to-peer case
1266 * dbus/dbus-transport-unix.c (check_read_watch): handle
1267 !authenticated case correctly
1269 * glib/dbus-gmain.c: add support for DBusServer
1271 * dbus/dbus-server.c: add data slot support
1273 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1274 return values and handle errors
1276 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1279 * Doxyfile.in (INPUT): add glib subdir
1281 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1282 setup_with_g_main instead of hookup_with_g_main; write docs
1284 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1286 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1287 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1288 * dbus/dbus-message.c: (dbus_message_append_boolean),
1289 (dbus_message_append_boolean_array),
1290 (dbus_message_get_args_valist), (_dbus_message_test):
1291 * dbus/dbus-message.h:
1292 * doc/dbus-specification.sgml:
1293 Various fixes as pointed out by Havoc.
1295 * test/data/invalid-messages/bad-boolean-array.message:
1296 * test/data/invalid-messages/bad-boolean.message:
1297 Add invalid boolean value test cases.
1299 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1301 * dbus/dbus-internals.c: (_dbus_type_to_string):
1302 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1303 (_dbus_marshal_validate_arg):
1304 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1305 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1306 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1307 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1308 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1309 (dbus_message_iter_get_double),
1310 (dbus_message_iter_get_boolean_array), (message_iter_test):
1311 * dbus/dbus-message.h:
1312 * dbus/dbus-protocol.h:
1313 * doc/dbus-specification.sgml:
1314 * test/data/valid-messages/lots-of-arguments.message:
1315 Add support for boolean and boolean array types.
1317 2003-02-23 Havoc Pennington <hp@pobox.com>
1319 * dbus/dbus-keyring.c: finish most of this implementation and
1322 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1323 these barf if the error isn't cleared to NULL
1325 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1326 (_dbus_create_directory): new function
1328 * dbus/dbus-errors.c (dbus_set_error): fix warning
1330 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1331 (_dbus_string_hex_decode): new function
1332 (test_hex_roundtrip): test code
1334 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1336 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1338 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1339 the save-to-temp/rename trick to atomically write the new file
1340 (_dbus_string_parse_uint): new function
1342 2003-02-22 Havoc Pennington <hp@pobox.com>
1344 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1346 2003-02-22 Havoc Pennington <hp@pobox.com>
1348 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1349 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1351 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1353 * dbus/test/data/sha-1: add US government test suite for SHA-1
1355 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1357 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1358 Make string arrays NULL-terminated.
1360 * dbus/dbus-memory.c: (dbus_free_string_array):
1361 * dbus/dbus-memory.h:
1362 New function for freeing NULL-terminated string arrays.
1364 * dbus/dbus-message-builder.c: (append_quoted_string),
1365 (_dbus_message_data_load):
1366 Add support for array types.
1368 * dbus/dbus-message.c: (check_message_handling):
1369 Add more types as test cases.
1371 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1372 (_dbus_string_parse_double):
1373 Add the start offset to the end offset.
1375 * test/data/valid-messages/lots-of-arguments.message:
1376 New test message with lots of arguments.
1378 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1380 * dbus/dbus-message.c: (dbus_message_append_nil),
1381 (dbus_message_append_int32), (dbus_message_append_uint32),
1382 (dbus_message_append_double), (dbus_message_append_string),
1383 (dbus_message_append_int32_array),
1384 (dbus_message_append_uint32_array),
1385 (dbus_message_append_double_array),
1386 (dbus_message_append_byte_array),
1387 (dbus_message_append_string_array):
1388 Fix all out-of-memory handling in these functions.
1390 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1392 * dbus/dbus-message.c: (dbus_message_append_nil):
1395 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1397 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1398 (dbus_message_append_nil), (dbus_message_append_int32_array),
1399 (dbus_message_append_uint32_array),
1400 (dbus_message_append_double_array),
1401 (dbus_message_append_byte_array),
1402 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1403 (dbus_message_iter_get_int32_array),
1404 (dbus_message_iter_get_uint32_array),
1405 (dbus_message_iter_get_double_array),
1406 (dbus_message_iter_get_byte_array),
1407 (dbus_message_iter_get_string_array):
1409 * dbus/dbus-message.h:
1410 Add functions for appending and getting arrays.
1412 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1414 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1415 element size at least 8 bytes, fixes mempool tests on
1418 2003-02-20 Alexander Larsson <alexl@redhat.com>
1420 * dbus/dbus-transport-unix.c (unix_do_iteration):
1421 Unlock the connection mutex during a blocking select call.
1422 Add todo about how we need a way to wake up the select.
1424 * dbus/dbus-connection-internal.h:
1425 * dbus/dbus-connection.c:
1426 Add _dbus_connection_lock and _dbus_connection_unlock.
1428 2003-02-19 Havoc Pennington <hp@pobox.com>
1430 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1431 Doxyfile.in, not Doxyfile
1433 * dbus/dbus-keyring.c: do some hacking on this
1435 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1437 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1439 (dbus_set_error): remove dbus_error_init, check for message ==
1440 NULL *before* we sprintf into it, and add @todo about including
1441 system headers in this file
1443 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1445 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1447 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1448 get various bits of user information based on either username
1450 (_dbus_homedir_from_username): new function
1452 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1455 Add check for nonposix getpwnam_r
1457 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1458 Align the pool element size to a sizeof (void *) boundary.
1460 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1461 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1462 General Solaris fixes.
1464 * test/data/valid-messages/simplest-manual.message:
1465 Explicitly state that we want little-endian packing.
1467 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1469 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1471 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1472 Added to create a transport connecting using a tcp/ip socket.
1474 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1475 to a tcp socket at given host and port.
1476 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1479 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1481 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1482 Added to create a server listening on a TCP/IP socket.
1484 2003-02-19 Havoc Pennington <hp@pobox.com>
1486 Throughout: mop up all the Doxygen warnings and undocumented
1489 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1490 to search any paths.
1492 * dbus/dbus-threads.c: move global mutex initializers to
1493 dbus-internals.h, multiple prototypes was confusing doxygen
1494 besides being kind of ugly
1496 * Doxyfile (PREDEFINED): have Doxygen define
1497 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1498 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1499 (do not abuse the feature! it's for stuff like the autogenerated
1500 macros in dbus-md5.c, not just for things you don't feel like
1503 2003-02-18 Havoc Pennington <hp@pobox.com>
1505 * dbus/dbus-string.c (_dbus_string_zero): new function
1507 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1508 wrap it in some dbus-friendly API
1510 * dbus/dbus-types.h: add 16-bit types
1512 2003-02-18 Joe Shaw <joe@assbarn.com>
1514 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1515 credentials from our currently running process.
1516 (get_word): Fix a buglet where we were copying the entire length
1517 instead of relative to our position.
1519 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1520 keys on the stack... it's 640k of data.
1522 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1523 read the credentials byte off the socket, even if we don't have
1525 (_dbus_poll): Implement poll() using select() for systems which
1528 * glib/test-dbus-glib.c (main): Print out an error if no
1529 parameters are given.
1531 * test/data/auth/fallback.auth-script: Added. Tests that a client
1532 can fallback to a secondary auth mechanism if the first fails.
1534 2003-02-18 Havoc Pennington <hp@pobox.com>
1538 2003-02-17 Havoc Pennington <hp@pobox.com>
1540 * doc/dbus-specification.sgml: lots of cosmetic
1541 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1542 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1543 s/server/bus/ (except in authentication section). Add a section
1544 "Message Bus Message Routing"
1546 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1552 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1554 * doc/dbus-specification.sgml:
1555 Specification updates.
1557 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1559 * bus/activation.c: (bus_activation_init), (child_setup),
1560 (bus_activation_activate_service):
1562 * bus/main.c: (main):
1563 Set DBUS_ADDRESS environment variable.
1565 * dbus/dbus-errors.c: (dbus_set_error):
1566 Don't use va_copy since that's a C99 feature.
1568 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1569 (_dbus_spawn_async):
1570 * dbus/dbus-sysdeps.h:
1571 Add child_setup_func to _dbus_spawn_async.
1573 * doc/dbus-specification.sgml:
1574 Update specification.
1576 * test/spawn-test.c: (setup_func), (main):
1579 2003-02-17 Alexander Larsson <alexl@redhat.com>
1581 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1584 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1588 * doc/dbus-test-plan.sgml:
1589 Add test plan document.
1594 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1596 * dbus/dbus-message.c: (decode_header_data),
1597 (_dbus_message_loader_return_buffer):
1598 Set the header padding amount when loading a message.
1600 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1602 * bus/dispatch.c: (send_one_message):
1603 Only send broadcast messages to registered connections.
1605 * dbus/dbus-message.c: (dbus_message_name_is):
1606 * dbus/dbus-message.h:
1607 New convenience function.
1609 * dbus/dbus-transport-debug.c: (do_reading):
1610 Only dispatch one message per run.
1613 * test/bus-test.c: (new_connection_callback), (die),
1614 (test_hello_client1_handler), (test_hello_client2_handler),
1615 (test_hello_replies), (main):
1617 * test/bus-test-loop.[ch]:
1620 2003-02-16 Havoc Pennington <hp@pobox.com>
1622 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1623 backward conditional
1625 2003-02-16 Alexander Larsson <alexl@redhat.com>
1627 * dbus/dbus-connection.c:
1628 Implement sent_message_with_reply. (with_reply_and block is still
1630 Made dispatch_message not lose message if OOM.
1632 * dbus/dbus-errors.h:
1633 Add NoReply error (for reply timeouts).
1635 2003-02-16 Alexander Larsson <alexl@redhat.com>
1637 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1638 Actually free keys and values when destroying hashtable.
1640 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1642 * dbus/dbus-auth.c: (client_try_next_mechanism):
1645 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1646 Return TRUE if there's no thread implementation around.
1648 * glib/dbus-gmain.c: (free_source),
1649 (dbus_connection_hookup_with_g_main):
1650 Make sure to remove the GSource when the connection is finalized.
1652 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1654 * bus/dispatch.c: (bus_dispatch_message_handler):
1655 * dbus/dbus-errors.h:
1656 Return an error if someone tries to send a message to a service
1659 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1661 * bus/activation.c: (load_directory), (bus_activation_init),
1662 (bus_activation_activate_service):
1665 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1666 More work on the activation handling.
1668 * dbus/dbus-errors.h:
1669 Add some error messages
1671 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1672 * dbus/dbus-message.h:
1673 New function that creates an error message.
1675 * dbus/dbus-protocol.h:
1676 Add ACTIVATE_SERVER message.
1678 * dbus/dbus-server-unix.c: (unix_handle_watch),
1679 (_dbus_server_new_for_domain_socket):
1680 Call _dbus_fd_set_close_on_exec.
1682 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1683 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1684 (_dbus_fd_set_close_on_exec):
1685 * dbus/dbus-sysdeps.h:
1686 Add _dbus_fd_set_close_on exec function. Also add function that checks
1687 that all open fds are set to close-on-exec and warns otherwise.
1689 * dbus/dbus-transport-unix.c:
1690 (_dbus_transport_new_for_domain_socket):
1691 Call _dbus_fd_set_close_on_exec.
1693 2003-02-16 Havoc Pennington <hp@pobox.com>
1695 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1696 allow people to avoid setting SIGPIPE to SIG_IGN
1697 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1698 we've been asked not to
1700 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1702 * dbus/dbus-list.c: (_dbus_list_append_link),
1703 (_dbus_list_prepend_link):
1704 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1708 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1711 * bus/activation.c: (bus_activation_entry_free),
1712 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1714 * bus/main.c: (main):
1715 Add simple activation support, doesn't work yet though.
1717 2003-02-15 Zack Rusin <zack@kde.org>
1719 * qt/dbus-qthread.cpp: small casting fix
1721 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1723 * dbus/dbus-errors.c: (dbus_set_error):
1724 * dbus/dbus-errors.h:
1725 Add a few errors and make dbus_set_error void.
1727 * dbus/dbus-sysdeps.c:
1728 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1729 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1730 * dbus/dbus-sysdeps.h:
1731 Add _dbus_spawn_async.
1733 * test/spawn-test.c: (main):
1734 Test for _dbus_spawn_async.
1736 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1738 * dbus/dbus-internals.h:
1739 Fix build without tests.
1741 * dbus/dbus-list.c: (alloc_link):
1742 Fix a segfault when a malloc fails.
1744 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1745 (dbus_malloc0), (dbus_realloc):
1746 Add support for malloc debugging.
1748 2003-02-15 Alexander Larsson <alexl@redhat.com>
1750 * dbus/dbus-threads.c:
1751 * dbus/dbus-threads.h:
1752 Add condvars. Remove static mutext from API.
1753 Implement static mutexes by initializing them from threads_init.
1755 * glib/dbus-gthread.c:
1756 * qt/dbus-qthread.cpp:
1757 Update with the thread api changes.
1762 Turn StaticMutex into normal mutex + init function.
1763 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1764 _dbus_list_append_link, _dbus_list_prepend_link
1767 * dbus/dbus-sysdeps.c:
1768 * dbus/dbus-sysdeps.h:
1769 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1770 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1772 * dbus/dbus-protocol.h:
1773 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1775 * dbus/dbus-message.c:
1776 Make ref/unref atomic.
1779 * dbus/dbus-connection-internal.h:
1780 * dbus/dbus-connection.c:
1781 * dbus/dbus-connection.h:
1783 Change _peek to _borrow,_return & _steal_borrowed.
1784 Change disconnect callback to event.
1785 Make dbus_connection_dispatch_messages reentrant.
1787 * dbus/dbus-transport.c:
1788 Don't ref the connection on calls to the transport
1791 * dbus/dbus-message-handler.c:
1794 * glib/dbus-gmain.c:
1795 Don't use peek_message anymore
1798 * test/debug-thread.c:
1799 * test/debug-thread.h:
1800 Simple thread implementation that asserts() on deadlocks in
1801 single-threaded code.
1804 (main) Call debug_threads_init.
1807 Use disconnect message instead of disconnect callback.
1811 Don't call dbus_connection_set_disconnect_function. Instead export
1812 bus_connection_disconnect.
1815 Call bus_connection_disconnect when we get a disconnected message.
1817 2003-02-15 Havoc Pennington <hp@pobox.com>
1819 * dbus/dbus-message.c (dbus_message_new): fool around with the
1822 2003-02-14 Havoc Pennington <hp@pobox.com>
1824 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1826 * dbus/dbus-memory.c: fail if the debug functions indicate we
1829 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1830 (_dbus_decrement_fail_alloc_counter): debug functions to
1831 simulate memory allocation failures
1833 2003-02-14 Havoc Pennington <hp@pobox.com>
1835 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1838 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1840 * bus/driver.c: (bus_driver_handle_hello):
1842 * bus/services.c: (bus_service_lookup):
1843 Reorder message sending so we get a more sane order.
1845 * test/bus-test.c: (message_handler):
1848 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1850 * bus/driver.c: (bus_driver_send_service_deleted),
1851 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1852 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1853 (bus_driver_send_welcome_message),
1854 (bus_driver_handle_list_services),
1855 (bus_driver_handle_acquire_service),
1856 (bus_driver_handle_service_exists):
1857 * dbus/dbus-bus.c: (dbus_bus_register_client),
1858 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1859 * dbus/dbus-errors.c: (dbus_result_to_string):
1860 * dbus/dbus-errors.h:
1861 * dbus/dbus-message.c: (dbus_message_append_args),
1862 (dbus_message_append_args_valist), (dbus_message_get_args),
1863 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1864 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1865 (dbus_message_iter_get_byte_array),
1866 (dbus_message_iter_get_string_array), (message_iter_test),
1867 (check_message_handling), (_dbus_message_test):
1868 * dbus/dbus-message.h:
1869 * test/bus-test.c: (main):
1870 Change fields to arguments in messages, so that they won't be
1871 confused with header fields.
1873 * glib/test-dbus-glib.c: (main):
1874 Remove append_fields from hello message.
1876 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1878 * dbus/dbus-errors.c:
1879 * dbus/dbus-message.c:
1880 * dbus/dbus-string.c:
1881 Documentation fixes.
1883 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1885 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1887 Implement support for timeouts in dbus-glib.
1889 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1891 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1892 * dbus/dbus-message.c: (process_test_subdir):
1893 * test/break-loader.c: (find_breaks_based_on):
1894 Plug some memory leaks.
1896 2003-02-13 Richard Hult <rhult@codefactory.se>
1898 * bus/main.c: Fix build.
1900 * dbus/dbus-errors.h:
1901 * dbus/dbus-errors.c: Fix copyright for Anders.
1903 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1908 * bus/connection.c: (bus_connection_foreach):
1911 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1912 (unescape_string), (new_section), (parse_section_start),
1913 (parse_key_value), (report_error), (bus_desktop_file_load),
1914 (bus_desktop_file_get_string):
1915 * bus/desktop-file.h:
1916 Use DBusError for error reporting.
1918 * bus/dispatch.c: (send_one_message),
1919 (bus_dispatch_message_handler):
1920 * bus/driver.c: (bus_driver_send_service_deleted),
1921 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1922 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1923 (bus_driver_send_welcome_message),
1924 (bus_driver_handle_list_services),
1925 (bus_driver_handle_acquire_service),
1926 (bus_driver_handle_service_exists):
1927 * bus/loop.c: (bus_loop_run):
1929 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1931 * bus/utils.c: (bus_wait_for_memory):
1933 New files with general utility functions.
1935 * dbus/dbus-internals.h:
1936 Remove _DBUS_HANDLE_OOM.
1938 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1940 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1941 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1942 * dbus/dbus-errors.h:
1943 Add DBusError structure.
1945 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1947 * test/data/valid-messages/standard-acquire-service.message:
1948 * test/data/valid-messages/standard-hello.message:
1949 * test/data/valid-messages/standard-list-services.message:
1950 * test/data/valid-messages/standard-service-exists.message:
1951 Add some standard messages.
1953 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1955 * bus/driver.c: (bus_driver_send_welcome_message),
1956 (bus_driver_handle_list_services),
1957 (bus_driver_handle_acquire_service),
1958 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1959 Update for API changes in libdbus.
1961 * dbus/dbus-message.c: (dbus_message_new_reply):
1962 * dbus/dbus-message.h:
1963 Remove the name argument. The spec states that replies shouldn't
1966 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1968 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1969 (report_error), (bus_desktop_file_load), (lookup_section),
1970 (lookup_line), (bus_desktop_file_get_raw),
1971 (bus_desktop_file_get_string):
1972 * bus/desktop-file.h:
1973 Some fixes, and new functions for getting a key value from a section.
1975 2003-02-13 Havoc Pennington <hp@pobox.com>
1977 * test/data/auth/fail-after-n-attempts.auth-script: new test
1979 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1982 2003-02-13 Havoc Pennington <hp@pobox.com>
1984 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1985 dbus_credentials_match were backward
1987 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1988 NO_CREDENTIALS and ROOT_CREDENTIALS
1990 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1991 into here. Never process more commands after we've reached an
1992 end state; store further data as unused bytes.
1994 * test/data/auth/*: add more auth tests
1996 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1997 command to match exact string and EXPECT_UNUSED to match unused
2000 * test/Makefile.am (dist-hook): fix to dist all the test stuff
2002 2003-02-12 Havoc Pennington <hp@pobox.com>
2004 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
2005 \r off of popped lines
2007 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
2010 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
2013 2003-02-12 Havoc Pennington <hp@pobox.com>
2015 * dbus/Makefile.am: remove break-loader from the build, since it
2018 * configure.in: add --enable-gcov to turn on coverage profiling
2019 flags and disable optimization
2021 2003-02-10 Havoc Pennington <hp@pobox.com>
2023 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
2024 initial cut at test framework for DBusAuth from laptop.
2025 Doesn't quite work yet but it compiles and I need to get
2026 it off the 266mhz laptop. ;-)
2028 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
2029 fix a memleak in error case
2031 2003-02-12 Anders Carlsson <andersca@codefactory.se>
2034 * bus/desktop-file.c:
2035 * bus/desktop-file.h:
2036 Add a desktop file parser.
2038 2003-02-11 Zack Rusin <zack@kde.org>
2040 * qt/message.[h|cpp]: sample implementation
2041 of the KDE wrapper for DBusMessage
2043 2003-02-09 Zack Rusin <zack@kde.org>
2045 * test/bus-test.c: make_it_compile
2046 * doc/dbus-specification.sgml: minimal semantic fix
2048 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2054 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2057 * dbus/dbus-break-loader.c:
2059 * test/break-loader.c:
2060 Move dbus-break-loader to test/ and rename it to break-loader.
2062 2003-02-02 Havoc Pennington <hp@pobox.com>
2064 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2065 for code to manage cookies in your home directory
2067 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2069 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2070 to authenticate, then disconnect the client.
2072 2003-02-03 Alexander Larsson <alexl@redhat.com>
2074 * dbus/dbus-message.c (dbus_message_append_fields):
2077 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2079 * doc/dbus-specification.sgml:
2080 Update address format section.
2082 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2085 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2086 (message_handler), (new_connection_callback), (loop_quit),
2090 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2092 * bus/driver.c: (bus_driver_handle_service_exists):
2093 Simplify the code a bit.
2095 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2098 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2101 Add libdbus-daemon.la and link to it.
2103 2003-02-01 James Willcox <jwillcox@gnome.org>
2105 * bus/driver.c: (bus_driver_handle_own_service):
2106 Actually include the service reply code in the message.
2108 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2110 * bus/driver.c: (bus_driver_handle_service_exists):
2111 Don't unref the incoming message.
2113 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2115 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2117 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2119 * dbus/dbus-server.c: (dbus_server_listen):
2120 * dbus/dbus-transport.c: (_dbus_transport_open):
2121 ifdef out the calls to the debug transport and server.
2123 2003-02-02 Alexander Larsson <alexl@redhat.com>
2125 * dbus/dbus-watch.c (dbus_watch_get_flags):
2126 Add note in the docs that ERROR or HANGUP won't be returned
2127 and are assumed always on.
2129 * glib/dbus-gmain.c (add_watch):
2130 Always add IO_ERR | IO_HUP
2132 * dbus/dbus-message.h:
2133 Add semicolon after dbus_message_iter_get_string_array().
2134 Makes qt code build again
2136 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2138 * bus/driver.c: (create_unique_client_name),
2139 (bus_driver_handle_hello):
2140 Don't take a name, just use a numeric id to identify
2144 * dbus/dbus-bus.c: (dbus_bus_register_client),
2145 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2147 Add new convenience functions for communicating with the bus.
2149 * dbus/dbus-message.h:
2151 * dbus/dbus-protocol.h:
2154 2003-02-01 Alexander Larsson <alexl@redhat.com>
2156 * dbus/dbus-message.c (dbus_message_append_fields):
2157 Add some more doc comments.
2159 2003-02-01 Havoc Pennington <hp@pobox.com>
2161 * dbus/dbus-break-loader.c (randomly_modify_length): change
2162 a 4-byte value in the message as if it were a length
2164 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2165 execute bit on saved files
2167 2003-02-01 Havoc Pennington <hp@pobox.com>
2169 * dbus/dbus-break-loader.c (main): new program to find messages
2170 that break the loader.
2172 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2173 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2175 * dbus/dbus-string.c (_dbus_string_set_byte): new
2177 2003-01-31 Havoc Pennington <hp@pobox.com>
2179 * dbus/dbus-message.c: refactor the test code to be more general,
2180 in preparation for writing a "randomly permute test cases to
2181 try to break the loader" program.
2183 2003-01-31 Havoc Pennington <hp@pobox.com>
2185 * doc/dbus-specification.sgml: work on the specification
2187 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2188 the protocol version of the message.
2190 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2191 no longer specifies that.
2192 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2195 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2196 "break" for DBUS_TYPE_NIL, remove @todo
2198 2003-01-31 Havoc Pennington <hp@pobox.com>
2200 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2201 just set_is_error/get_is_error as this is a commonly-used
2202 function, and write docs.
2204 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2206 * dbus/dbus-address.c: (dbus_address_entry_free):
2207 Free key and value lists.
2209 * dbus/dbus-internals.c: (_dbus_type_to_string):
2210 Add the types we didn't have.
2212 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2213 (_dbus_marshal_validate_arg):
2216 * dbus/dbus-message.c: (dbus_message_set_sender):
2217 Remove todo about being able to set sender to NULL.
2219 (dbus_message_set_is_error_reply),
2220 (dbus_message_get_is_error_reply):
2221 * dbus/dbus-message.h:
2224 * dbus/dbus-protocol.h:
2225 Add error reply flag.
2227 * test/data/valid-messages/opposite-endian.message:
2228 Add NIL type to test.
2230 2003-01-31 Havoc Pennington <hp@pobox.com>
2232 * doc/dbus-specification.sgml: fully specify the header. Add
2233 flags and major protocol version, and change header/body len to
2236 * dbus/dbus-message-builder.c (append_saved_length): append length
2239 * dbus/dbus-message.c (dbus_message_create_header): change header
2240 length and body length to unsigned. Add the new fields from the
2242 (_dbus_message_loader_return_buffer): unsigned header/body len
2244 2003-01-30 Havoc Pennington <hp@pobox.com>
2246 * dbus/dbus-auth.c: rework to use only REJECTED, no
2249 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2250 use REJECTED, suggested by Mark McLoughlin
2252 2003-01-30 Havoc Pennington <hp@pobox.com>
2254 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2255 a better way to report errors here. e.g. "unix address lacks
2256 path" or something. also "no such file" when the path doesn't
2259 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2261 (dbus_parse_address): add @todo about documenting address format,
2262 and allowing , and ; to be escaped
2264 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2267 Add dbus-address.[ch]
2269 * dbus/dbus-address.c: (dbus_address_entry_free),
2270 (dbus_address_entries_free), (create_entry),
2271 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2272 (dbus_parse_address), (_dbus_address_test):
2273 * dbus/dbus-address.h:
2274 New files for dealing with address parsing.
2276 * dbus/dbus-connection.c:
2277 Document timeout functions.
2279 * dbus/dbus-message.c:
2280 Document dbus_message_new_from_message.
2282 * dbus/dbus-server-debug.c:
2285 * dbus/dbus-server.c: (dbus_server_listen):
2286 Parse address and use correct server implementation.
2288 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2289 * dbus/dbus-string.h:
2290 New function with test.
2292 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2296 * dbus/dbus-transport-debug.c:
2299 * dbus/dbus-transport.c: (_dbus_transport_open):
2300 Parse address and use correct transport implementation.
2302 2003-01-30 Havoc Pennington <hp@pobox.com>
2304 * dbus/dbus-message.c: use message->byte_order instead of
2305 DBUS_COMPILER_BYTE_ORDER throughout.
2306 (dbus_message_create_header): pad header to align the
2307 start of the body of the message to 8-byte boundary
2309 * dbus/dbus-marshal.h: make all the demarshalers take const
2310 DBusString arguments.
2312 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2313 validate message args here, so we don't have to do slow validation
2314 later, and so we catch bad messages as they are incoming. Also add
2315 better checks on header_len and body_len. Also fill in
2318 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2319 implemented properly)
2320 (_dbus_string_validate_nul): new function to check all-nul
2322 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2323 get_arg_end_pos and remove all validation
2324 (_dbus_marshal_validate_arg): actually do validation here.
2326 2003-01-29 Havoc Pennington <hp@pobox.com>
2328 * dbus/dbus-message.c (check_message_handling): fix assertion
2329 failure on set_client_serial
2331 2003-01-28 Havoc Pennington <hp@pobox.com>
2333 * dbus/dbus-server-debug.c: Add doc section comments
2335 * dbus/dbus-transport-debug.c: add doc section comments
2337 2003-01-28 Havoc Pennington <hp@redhat.com>
2339 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2340 the reverse order from how I had it
2341 (_dbus_string_base64_encode): reverse encoding order. I was
2342 basically byteswapping everything during encoding.
2344 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2346 * dbus/dbus-connection-internal.h:
2347 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2348 (_dbus_connection_remove_timeout):
2349 Add functions for adding and removing timeouts.
2351 * dbus/dbus-message.c: (dbus_message_new_from_message):
2352 Add new function that takes a message and creates an exact
2353 copy of it, but with the refcount set to 1.
2354 (check_message_handling):
2357 * dbus/dbus-server-protected.h:
2358 * dbus/dbus-server.c: (_dbus_server_init_base),
2359 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2360 (dbus_server_set_timeout_functions):
2361 (_dbus_server_remove_timeout):
2362 New functions so that a server can add and remove timeouts.
2364 (dbus_server_listen):
2365 Add commented out call to dbus_server_debug_new.
2367 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2368 Actually set the handler, doh.
2370 * dbus/dbus-transport.c: (_dbus_transport_open):
2371 Add commented out call to dbus_transport_debug_client_new.
2374 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2376 2003-01-28 Havoc Pennington <hp@pobox.com>
2378 * dbus/dbus-message.c (check_message_handling): function to check
2379 on the loaded message, iterates over it etc.
2381 2003-01-28 Havoc Pennington <hp@pobox.com>
2383 * test/Makefile.am (dist-hook): fix make distdir
2385 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2387 2003-01-27 Havoc Pennington <hp@pobox.com>
2389 * dbus/dbus-mempool.c (time_for_size): replace printf with
2392 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2393 empty lines; fix the SAVE_LENGTH stuff to be
2394 START_LENGTH/END_LENGTH so it actually works; couple other
2397 * test/Makefile.am (dist-hook): add dist-hook for .message files
2399 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2400 can be constant or locked.
2401 (_dbus_string_free): allow freeing a const string as
2404 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2406 * dbus/dbus-test-main.c (main): take an argument which is the
2407 directory containing test data
2409 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2410 argument to this and load all the messages in test/data/
2411 checking that they can be loaded or not loaded as appropriate.
2413 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2415 * bus/dispatch.c: (bus_dispatch_message_handler):
2416 Dispatch messages sent to services.
2418 * bus/driver.c: (bus_driver_send_service_deleted),
2419 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2420 (bus_driver_send_service_acquired):
2421 Add helper functions for sending service related messages.
2423 (bus_driver_send_welcome_message):
2424 Send HELLO_REPLY instead of WELCOME.
2426 (bus_driver_handle_list_services):
2427 Send LIST_SERVICES_REPLY instead of SERVICES.
2429 (bus_driver_handle_own_service),
2430 (bus_driver_handle_service_exists):
2431 New message handlers.
2433 (bus_driver_handle_message):
2434 Invoke new message handlers.
2436 (bus_driver_remove_connection):
2437 Don't remove any services here since that's done automatically
2438 by bus_service_remove_owner now.
2441 New function signatures.
2443 * bus/services.c: (bus_service_add_owner):
2444 Send ServiceAcquired message if we're the only primary owner.
2446 (bus_service_remove_owner):
2447 Send ServiceAcquired/ServiceLost messages.
2449 (bus_service_set_prohibit_replacement),
2450 (bus_service_get_prohibit_replacement):
2451 Functions for setting prohibit replacement.
2453 (bus_service_has_owner):
2454 New function that checks if a connection is in the owner queue of
2458 Add new function signatures.
2460 * dbus/dbus-list.c: (_dbus_list_test):
2461 Add tests for _dbus_list_remove_last and traversing the list backwards.
2464 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2465 go any further, so return NULL then.
2467 * dbus/dbus-protocol.h:
2468 Add new messages, service flags and service replies.
2470 2003-01-26 Havoc Pennington <hp@pobox.com>
2472 * dbus/dbus-message-builder.c: implement, completely untested.
2474 * test/data/*: add data to be used in testing.
2475 ".message" files are our simple loadable text format.
2476 ".message-raw" will be binary dumps of messages.
2478 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2480 2003-01-26 Havoc Pennington <hp@pobox.com>
2482 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2484 * dbus/dbus-errors.c (dbus_result_to_string): add
2487 * dbus/dbus-message-builder.c: new file, will contain code to load
2488 up messages from files. Not implemented yet.
2490 2003-01-26 Havoc Pennington <hp@pobox.com>
2492 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2493 the sender by setting to NULL
2495 2003-01-26 Havoc Pennington <hp@pobox.com>
2497 The unit tests pass, but otherwise untested. If it breaks, the
2498 tests should have been better. ;-)
2500 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2503 * dbus/dbus-message.c: redo everything so we maintain
2504 message->header as the only copy of the various fields.
2505 This avoids the possibility of out-of-memory in some cases,
2506 for example dbus_message_lock() can't run out of memory anymore,
2507 and avoids extra copying. Figured I may as well go ahead and do
2508 this since it was busted for dbus_message_lock to not return
2509 failure on OOM, and dbus_message_write_header was totally
2510 unchecked for OOM. Also fixed some random other bugs.
2512 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2513 that strings are nul-terminated. Also, end_pos can be equal
2514 to string length just not greater than, I think.
2515 (_dbus_marshal_set_int32): new function
2516 (_dbus_marshal_set_uint32): new function
2517 (_dbus_marshal_set_string): new function
2519 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2520 a warning, init timeout_list to NULL
2521 (dbus_connection_send_message): don't use uninitialized variable
2524 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2526 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2528 * bus/driver.c: (bus_driver_handle_hello),
2529 (bus_driver_send_welcome_message):
2532 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2534 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2535 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2536 (dbus_connection_unref):
2537 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2538 * dbus/dbus-message.c: (dbus_message_unref),
2541 (dbus_message_get_fields):
2542 Remove debugging printout.
2544 (_dbus_message_loader_return_buffer):
2545 Don't store the header string.
2547 (_dbus_message_test):
2550 2003-01-26 Richard Hult <rhult@codefactory.se>
2552 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2553 the file descriptor list, since it can change under us.
2555 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2557 * glib/dbus-gmain.c: (dbus_connection_prepare),
2558 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2559 (remove_watch), (dbus_connection_hookup_with_g_main):
2560 Rewrite the glib handling to use its own GSource instead of a
2561 GIOChannel so we can catch messages put in the queue while waiting
2564 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2567 * bus/connection.c: (connection_disconnect_handler),
2568 (connection_watch_callback), (bus_connection_setup):
2569 * bus/dispatch.c: (send_one_message),
2570 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2571 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2573 * bus/driver.c: (bus_driver_send_service_deleted),
2574 (bus_driver_send_service_created), (bus_driver_handle_hello),
2575 (bus_driver_send_welcome_message),
2576 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2577 (bus_driver_handle_message):
2579 Refactor code, put the message dispatching in its own file. Use
2580 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2583 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2585 * dbus/dbus-internals.h:
2586 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2588 * dbus/dbus-message.c: (dbus_message_get_sender):
2589 * dbus/dbus-message.h:
2590 Implement dbus_message_get_sender.
2592 * dbus/dbus-protocol.h:
2593 Add message and service defines.
2595 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2597 * dbus/dbus-connection.c: (dbus_connection_send_message):
2598 * dbus/dbus-message-internal.h:
2599 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2600 (dbus_message_write_header):
2601 Remove _dbus_messag_unlock and don't set the client serial on a
2602 message if one already exists.
2604 2003-01-24 Havoc Pennington <hp@pobox.com>
2606 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2609 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2612 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2614 * dbus/dbus-list.c: (alloc_link), (free_link):
2615 Use a memory pool for the links.
2617 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2619 * bus/connection.c: (bus_connection_foreach):
2621 Add new bus_connection_foreach function.
2623 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2624 Add function that broadcasts a message to all clients.
2626 (bus_driver_send_service_created), (bus_driver_handle_hello),
2627 (bus_driver_send_welcome_message),
2628 (bus_driver_handle_list_services), (bus_driver_message_handler):
2629 Implement functions that take care of listing services, and notifying
2630 clients when new services are created.
2632 * bus/services.c: (bus_services_list):
2634 Add new function that returns an array of strings with the currently
2635 registered services.
2638 * glib/dbus-gmain.c:
2639 Update copyright year.
2641 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2643 * dbus/dbus-connection.c: (dbus_connection_send_message):
2644 Unlock the message in case it was sent earlier.
2646 (dbus_connection_send_message_with_reply_and_block):
2647 Remove the reply message from the list.
2649 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2650 Set array_len and new_pos correctly.
2652 (_dbus_marshal_test):
2653 Remove debug output.
2655 * dbus/dbus-message-internal.h:
2656 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2657 New function that returns the reply serial.
2659 (_dbus_message_unlock):
2660 New function that unlocks a message and resets its header.
2662 (dbus_message_append_string_array),
2663 (dbus_message_get_fields_valist),
2664 (dbus_message_iter_get_field_type),
2665 (dbus_message_iter_get_string_array),
2666 (dbus_message_get_fields),
2667 (dbus_message_append_fields_valist):
2668 Handle string arrays.
2670 (dbus_message_set_sender):
2671 Make this function public since the bus daemon needs it.
2673 (decode_header_data):
2674 Set the reply serial to -1 initially.
2676 * dbus/dbus-message.h:
2677 Add dbus_message_set_sender.
2679 2003-01-24 Havoc Pennington <hp@pobox.com>
2681 * doc/dbus-specification.sgml: add some stuff
2683 2003-01-22 Havoc Pennington <hp@pobox.com>
2685 * doc/dbus-specification.sgml: Start to document the protocol.
2687 2003-01-22 Havoc Pennington <hp@pobox.com>
2689 * dbus/dbus-connection.c
2690 (dbus_connection_send_message_with_reply_and_block): add some @todo
2692 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2694 2003-01-21 Havoc Pennington <hp@pobox.com>
2696 (patch untested because can't compile)
2698 * bus/driver.c (create_unique_client_name): make this function
2699 never recycle client names. Also, caller should initialize
2702 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2704 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2706 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2707 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2708 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2709 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2710 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2711 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2712 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2713 * dbus/dbus-marshal.h:
2714 * dbus/dbus-protocol.h:
2715 Add support for marshalling and demarshalling integer, double
2718 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2723 * bus/connection.c: (connection_disconnect_handler):
2724 Remove the connection from the bus driver's list.
2726 (connection_watch_callback): Dispatch messages.
2728 (free_connection_data): Free connection name.
2730 (bus_connection_setup): Add connection to the bus driver's list.
2731 (bus_connection_remove_owned_service):
2732 (bus_connection_set_name), (bus_connection_get_name):
2733 Add functions for setting and getting the connection's name.
2736 Add function headers.
2738 * bus/driver.c: (create_unique_client_name),
2739 (bus_driver_handle_hello_message),
2740 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2741 (bus_driver_add_connection), (bus_driver_remove_connection):
2744 * bus/services.c: (bus_service_free):
2746 New file that handles communication and registreation with the bus
2749 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2751 * dbus/dbus-connection.c: (dbus_connection_send_message):
2752 Add a new client_serial parameter.
2754 (dbus_connection_send_message_with_reply):
2755 Remove a @todo since we've implemented the blocking function.
2757 (dbus_connection_send_message_with_reply_and_block):
2758 New function that sends a message and waits for a reply and
2759 then returns the reply.
2761 * dbus/dbus-connection.h:
2764 * dbus/dbus-errors.c: (dbus_result_to_string):
2765 * dbus/dbus-errors.h:
2766 Add new DBUS_RESULT.
2768 * dbus/dbus-message-internal.h:
2769 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2770 (_dbus_message_set_sender), (dbus_message_write_header),
2771 (dbus_message_new_reply), (decode_header_data),
2772 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2773 * dbus/dbus-message.h:
2774 Add new functions that set the reply serial and sender.
2775 Also marshal and demarshal them correctly and add test.
2777 * dbus/dbus-protocol.h:
2778 Add new DBUS_MESSAGE_TYPE_SENDER.
2781 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2782 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2783 (dbus_connection_hookup_with_g_main):
2784 * glib/test-dbus-glib.c: (main):
2785 Rewrite to use GIOChannel and remove the GSource crack.
2787 * test/echo-client.c: (main):
2788 * test/watch.c: (check_messages):
2789 Update for changed APIs
2791 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2793 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2795 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2796 Create a DBusTimeoutList.
2797 (dbus_connection_set_timeout_functions): Add new function to
2798 set timeout callbacks
2800 * dbus/dbus-connection.h: Add public DBusTimeout API.
2802 * dbus/dbus-message.c: (dbus_message_get_service):
2803 * dbus/dbus-message.h: New function.
2805 * dbus/dbus-server.c: Fix small doc typo.
2807 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2809 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2811 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2812 of the string, just as long as specified.
2814 2003-01-19 Havoc Pennington <hp@pobox.com>
2816 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2819 * dbus/dbus-server.c (dbus_server_set_max_connections)
2820 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2821 keep track of current number of connections, and add API for
2822 setting a max (but haven't implemented enforcing the max yet)
2824 2003-01-18 Havoc Pennington <hp@pobox.com>
2826 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2827 reading/writing if read_watch != NULL or write_watch != NULL.
2829 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2830 the message loader code to actually load message->header and
2831 message->body into the newly-created message.
2833 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2836 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2837 (dbus_connection_get_max_message_size)
2838 (dbus_connection_set_max_live_messages_size)
2839 (dbus_connection_get_max_live_messages_size): implement some
2840 resource limitation functions
2842 * dbus/dbus-resources.c: new file implementing some of the
2843 resource limits stuff
2845 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2846 missing docs, add @todo to handle OOM etc.
2848 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2851 2003-01-18 Havoc Pennington <hp@pobox.com>
2853 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2854 connection if it hasn't been already.
2856 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2857 replace with DisconnectFunction.
2859 2003-01-18 Havoc Pennington <hp@pobox.com>
2861 Building --disable-verbose-mode --disable-asserts --disable-tests
2862 cuts the library from 112K to 45K or so
2864 * configure.in: check for varargs macro support,
2865 add --enable-verbose-mode, --enable-asserts.
2867 * dbus/dbus-internals.h (_dbus_assert): support
2869 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2871 2003-01-18 Havoc Pennington <hp@pobox.com>
2873 * dbus/dbus-test.c: include config.h so that tests actually run
2875 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2876 so the failure mode when that assumption fails will be plenty
2879 2003-01-18 Havoc Pennington <hp@pobox.com>
2881 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2883 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2886 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2887 since we don't want to use those in make check
2889 2003-01-15 Havoc Pennington <hp@redhat.com>
2895 2003-01-15 Havoc Pennington <hp@redhat.com>
2897 * test/Makefile.am: fix so that test source code ends up in the
2898 distribution on make distcheck
2900 2003-01-15 Havoc Pennington <hp@redhat.com>
2906 2003-01-15 Havoc Pennington <hp@redhat.com>
2908 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2909 fix build when --disable-tests
2911 * Makefile.am (EXTRA_DIST): put HACKING in here
2913 * HACKING: document procedure for making a tarball release.
2915 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2917 * bus/connection.c: (connection_error_handler),
2918 (bus_connection_setup):
2919 * bus/main.c: (main):
2920 Make sure that the DBusConnectionData struct is NULLed
2921 out to prevent a segfault.
2923 * dbus/dbus-errors.c: (dbus_result_to_string):
2924 * dbus/dbus-errors.h:
2925 * dbus/dbus-message.c: (dbus_message_get_fields),
2926 (dbus_message_get_fields_valist), (_dbus_message_test):
2927 * dbus/dbus-message.h:
2928 Make dbus_message_get_fields return a result code so we can
2929 track invalid fields as well as oom.
2931 2003-01-11 Havoc Pennington <hp@pobox.com>
2933 * configure.in: change --enable-test/--enable-ansi action-if-given
2934 to enable_foo=$enableval instead of enable_foo=yes
2936 2003-01-08 Havoc Pennington <hp@pobox.com>
2938 * dbus/dbus-string.c (_dbus_string_align_length): new function
2940 * dbus/dbus-test-main.c: move main() for test app here
2942 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2943 symbol to run tests, because dbus-test isn't in the main
2946 Code review nitpicks.
2948 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2949 for people with narrow emacs ;-). Assert client_serial was filled
2950 in. Assert message->name != NULL.
2951 (dbus_message_append_fields): have "first_field_type" arg separate
2952 from va list, needed for C++ binding that also uses varargs IIRC
2953 and helps with type safety
2954 (dbus_message_new): add @todo about using DBusString to store
2955 service/name internally
2956 (dbus_message_new): don't leak ->service and ->name on OOM later
2958 (dbus_message_unref): free the service name
2959 (dbus_message_get_fields): same change to varargs
2960 i.e. first_field_type
2961 (_dbus_message_loader_return_buffer): assert that the message data
2962 is aligned (if not it's a bug in our code). Put in verbose griping
2963 about why we set corrupted = TRUE.
2964 (decode_header_data): add FIXME that char* is evil. Was going to
2965 add FIXME about evil locale-specific string.h strncmp, but just
2966 switched to wacky string-as-uint32 optimization. Move check for
2967 "no room for field name" above get_const_data_len() to avoid
2968 assertion failure in get_const_data_len if we have trailing 2
2969 bytes or the like. Check for service and name fields being
2970 provided twice. Don't leak service/name on error. Require field
2971 names to be aligned to 4 bytes.
2973 * dbus/dbus-marshal.c: move byte swap stuff to header
2974 (_dbus_pack_int32): uscore-prefix
2975 (_dbus_unpack_int32): uscore-prefix
2976 (_dbus_unpack_uint32): export
2977 (_dbus_demarshal_string): add @todo complaining about use of
2979 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2980 handling allowing corrupt data to go unchecked
2982 2003-01-08 Havoc Pennington <hp@redhat.com>
2984 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2985 to the select() as needed for authentication. (should be using
2986 _dbus_poll() not select, but for another day)
2988 * dbus/dbus.h: include dbus/dbus-protocol.h
2990 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2992 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2995 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2997 * dbus/dbus-internals.c: (_dbus_type_to_string):
2998 New function that returns a string describing a type.
3000 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
3001 * dbus/dbus-marshal.h:
3002 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
3003 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
3004 (dbus_message_iter_get_byte_array):
3005 * dbus/dbus-message.h:
3006 Add new convenience functions for appending and getting message fields.
3007 Also add demarshalling routines for byte arrays.
3009 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3011 * dbus/dbus-connection-internal.h:
3012 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3013 (_dbus_connection_get_next_client_serial),
3014 (dbus_connection_send_message):
3015 * dbus/dbus-internals.h:
3016 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
3017 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
3018 (_dbus_marshal_uint32), (_dbus_demarshal_double),
3019 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
3020 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
3021 (_dbus_verbose_bytes), (_dbus_marshal_test):
3022 * dbus/dbus-marshal.h:
3023 * dbus/dbus-message-internal.h:
3024 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
3025 (dbus_message_write_header), (_dbus_message_lock),
3026 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
3027 (dbus_message_get_name), (dbus_message_append_int32),
3028 (dbus_message_append_uint32), (dbus_message_append_double),
3029 (dbus_message_append_string), (dbus_message_append_byte_array),
3030 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
3031 (dbus_message_iter_unref), (dbus_message_iter_has_next),
3032 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
3033 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
3034 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
3035 (decode_header_data), (_dbus_message_loader_return_buffer),
3036 (message_iter_test), (_dbus_message_test):
3037 * dbus/dbus-message.h:
3038 * dbus/dbus-protocol.h:
3039 * dbus/dbus-test.c: (main):
3041 * glib/test-dbus-glib.c: (message_handler), (main):
3042 * test/echo-client.c: (main):
3043 * test/watch.c: (check_messages):
3044 Make messages sendable and receivable for real.
3046 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3048 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3049 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3050 * dbus/dbus-message.c: (dbus_message_append_int32),
3051 (dbus_message_append_uint32), (dbus_message_append_double),
3052 (dbus_message_append_string), (dbus_message_append_byte_array):
3053 Handle OOM restoration.
3055 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3057 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3058 (_dbus_demarshal_string), (_dbus_marshal_test):
3059 * dbus/dbus-marshal.h:
3060 * dbus/dbus-message.c: (dbus_message_get_name),
3061 Document these functions.
3063 (dbus_message_append_int32), (dbus_message_append_uint32),
3064 (dbus_message_append_double), (dbus_message_append_string),
3065 (dbus_message_append_byte_array):
3066 * dbus/dbus-message.h:
3067 Add functions for adding message fields of different types.
3069 * dbus/dbus-protocol.h:
3070 Add the different types.
3072 2003-01-05 Havoc Pennington <hp@pobox.com>
3074 * bus/connection.c: implement routines for handling connections,
3075 first thing is keeping a list of owned services on each connection
3076 and setting up watches etc.
3078 * bus/services.c: implement a mapping from service names to lists
3081 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3083 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3084 to use static mutexes for global data
3086 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3087 collection of functions to set/get application-specific data
3088 on the DBusConnection.
3090 2003-01-04 Havoc Pennington <hp@pobox.com>
3092 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3093 (_dbus_poll): new function
3095 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3098 * bus/loop.c: initial code for the daemon main loop
3100 2003-01-04 Havoc Pennington <hp@pobox.com>
3102 * test/watch.c (error_handler): make it safe if the error handler
3103 is called multiple times (if we s/error handler/disconnect
3104 handler/ we should just guarantee it's called only once)
3106 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3107 error handler on disconnect (it's quite possible we should
3108 just change the error handler to a "disconnect handler," I'm
3109 not sure we have any other meaningful errors)
3111 * configure.in: check for getpwnam_r
3113 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3114 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3115 mechanism as in SASL spec, using socket credentials
3117 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3118 (_dbus_send_credentials_unix_socket): new function
3120 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3122 (_dbus_write): only check errno if <0 returned
3123 (_dbus_write_two): ditto
3125 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3127 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3128 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3129 (_dbus_marshal_test):
3130 * dbus/dbus-marshal.h:
3131 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3132 to _dbus_marshal_utf8_string. Also fix some tests.
3134 2002-12-28 Harri Porten <porten@kde.org>
3136 * configure.in: added check for C++ compiler and a very cheesy
3137 check for the Qt integration
3139 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3141 * qt/Makefile.am: added
3143 * qt/.cvsignore: added
3145 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3146 latter, added #ifdef QT_THREAD_SUPPORT guard.
3148 * dbus/Makefile.am: added missing headers for make dist
3150 2002-12-28 Kristian Rietveld <kris@gtk.org>
3152 * dbus/Makefile.am: fixup export-symbols-regex.
3154 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3156 * acinclude.m4: Add this file and put the
3157 PKG_CHECK_MODULE macro in it.
3159 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3161 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3162 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3163 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3164 (_dbus_marshal_test):
3165 Make the demarshalling routines align the pos argument.
3166 Add string marshalling tests and fix the obvious bugs
3169 2002-12-26 Havoc Pennington <hp@pobox.com>
3171 * dbus/dbus-auth.c: fixes fixes fixes
3173 * dbus/dbus-transport-unix.c: wire up support for
3174 encoding/decoding data on the wire
3176 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3177 (_dbus_auth_decode_data): append to target string
3178 instead of nuking it.
3180 2002-12-26 Havoc Pennington <hp@pobox.com>
3182 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3183 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3186 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3187 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3188 now). Main point is because I wanted unpack_uint32 to implement
3190 (_dbus_verbose_bytes): new function
3192 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3194 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3195 mechanism to handle a corrupt message stream
3196 (_dbus_message_loader_new): fix preallocation to only prealloc,
3199 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3200 (_dbus_string_test): enhance tests for copy/move and fix the
3203 * dbus/dbus-transport-unix.c: Hold references in more places to
3204 avoid reentrancy problems
3206 * dbus/dbus-transport.c: ditto
3208 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3209 leak reference count in no-message case
3211 * test/watch.c (do_mainloop): handle adding/removing watches
3212 during iteration over the watches. Also, ref the connection/server
3213 stored on a watch, so we don't try to mangle a destroyed one.
3215 * dbus/dbus-transport-unix.c (do_authentication): perform
3218 * dbus/dbus-auth.c (get_state): add a state
3219 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3220 (_dbus_auth_get_unused_bytes): append the unused bytes
3221 to the passed in string, rather than prepend
3223 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3224 the auth conversation DBusAuth
3226 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3227 (_dbus_transport_new_for_domain_socket): when creating a
3228 transport, pass in whether it's a client-side or server-side
3229 transport so we know which DBusAuth to create
3231 2002-12-03 Havoc Pennington <hp@pobox.com>
3233 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3234 _after_ finalizing the derived members
3235 (unix_connection_set): unref watch if we fail to add it
3237 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3238 transport first, so that the connection owned by the
3239 transport will be valid as the transport finalizes.
3241 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3242 if necessary, and remove watches from the connection.
3244 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3246 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3248 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3249 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3250 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3251 (_dbus_marshal_test):
3252 * dbus/dbus-marshal.h:
3253 Add string marshal functions and have the demarshal functions
3254 return the new position.
3256 2002-12-25 Havoc Pennington <hp@pobox.com>
3258 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3259 it is a simple protocol that just maps directly to SASL.
3261 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3262 initial implementation, not actually used yet.
3264 * dbus/dbus-string.c (_dbus_string_find): new function
3265 (_dbus_string_equal): new function
3266 (_dbus_string_base64_encode): new function
3267 (_dbus_string_base64_decode): new function
3269 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3272 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3273 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3274 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3275 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3276 * dbus/dbus-marshal.h:
3277 * dbus/dbus-protocol.h:
3278 * dbus/dbus-test.c: (main):
3280 Add un-optimized marshalling/demarshalling routines.
3282 2002-12-25 Harri Porten <porten@kde.org>
3284 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3286 2002-12-24 Zack Rusin <zack@kde.org>
3288 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3289 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3292 2002-12-24 Havoc Pennington <hp@pobox.com>
3294 * glib/dbus-gthread.c: fix include
3296 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3297 I think glib API needs to change, though, as you don't
3298 want to use DBusMessageFunction, you want to use the
3299 DBusMessageHandler object. Probably
3300 dbus_connection_open_with_g_main_loop()
3301 and dbus_connection_setup_g_main_loop() or something like that
3302 (but think of better names...) that just create a connection
3303 that has watch/timeout functions etc. already set up.
3305 * dbus/dbus-connection.c
3306 (dbus_connection_send_message_with_reply): new function just to
3307 show how the message handler helps us deal with replies.
3309 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3311 * dbus/dbus-string.c (_dbus_string_test): free a string that
3314 * dbus/dbus-hash.c: use memory pools for the hash entries
3315 (rebuild_table): be more paranoid about overflow, and
3316 shrink table when we can
3317 (_dbus_hash_test): reduce number of sprintfs and write
3318 valid C89. Add tests for case where we grow and then
3319 shrink the hash table.
3321 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3323 * dbus/dbus-connection.c (dbus_connection_register_handler)
3324 (dbus_connection_unregister_handler): new functions
3326 * dbus/dbus-message.c (dbus_message_get_name): new
3328 * dbus/dbus-list.c: fix docs typo
3330 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3331 an object representing a handler for messages.
3333 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3336 * glib/dbus-gthread.c: (dbus_gthread_init):
3337 Don't use the gdbus prefix for public functions.
3339 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3343 Add GLib checks and fixup .pc files
3347 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3348 (gdbus_connection_check), (gdbus_connection_dispatch),
3349 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3350 (dbus_connection_gsource_new):
3351 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3352 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3353 * glib/test-dbus-glib.c: (message_handler), (main):
3356 2002-12-15 Harri Porten <porten@kde.org>
3358 * autogen.sh: check for libtoolize before attempting to use it
3360 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3363 * .cvsignore: ignore more stamp files
3365 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3367 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3368 without make install.
3370 2002-12-15 Havoc Pennington <hp@pobox.com>
3372 * dbus/dbus-threads.c: add thread stubs that a higher library
3373 layer can fill in. e.g. the GLib wrapper might fill them in with
3374 GThread stuff. We still need to use this thread API to
3375 thread-safe-ize the library.
3377 2002-12-12 Havoc Pennington <hp@pobox.com>
3379 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3380 below new interfaces and include fewer system headers.
3382 * dbus/dbus-sysdeps.c (_dbus_read): new function
3383 (_dbus_write): new function
3384 (_dbus_write_two): new function
3385 (_dbus_connect_unix_socket): new function
3386 (_dbus_listen_unix_socket): new function
3388 * dbus/dbus-message-internal.h: change interfaces to use
3391 2002-12-11 Havoc Pennington <hp@pobox.com>
3393 * dbus/dbus-types.h: add dbus_unichar
3395 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3397 * dbus/dbus-connection.c (dbus_connection_send_message): return
3400 * dbus/dbus-transport.c: include dbus-watch.h
3402 * dbus/dbus-connection.c: include dbus-message-internal.h
3404 * HACKING: add file with coding guidelines stuff.
3406 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3407 handling here, for security purposes (as in vsftpd). Not actually
3408 using this class yet.
3410 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3411 system/libc usage here, as in vsftpd, for ease of auditing (and
3412 should also simplify portability). Haven't actually moved all the
3413 system/libc usage into here yet.
3415 2002-11-25 Havoc Pennington <hp@pobox.com>
3417 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3418 always print the first verbose message.
3420 2002-11-24 Havoc Pennington <hp@pobox.com>
3422 * test/echo-client.c, test/echo-server.c: cheesy test
3425 * configure.in (AC_CHECK_FUNCS): check for writev
3427 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3430 * dbus/dbus-list.c (_dbus_list_foreach): new function
3432 * dbus/dbus-internals.c (_dbus_verbose): new function
3434 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3435 representing a server that listens for connections.
3437 * dbus/.cvsignore: create
3439 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3440 public API for reporting errors
3442 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3443 public object representing a connection that
3444 sends/receives messages. (Same object used for
3445 both client and server.)
3447 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3448 Basic abstraction for different kinds of stream
3449 that we might read/write messages from.
3451 2002-11-23 Havoc Pennington <hp@pobox.com>
3453 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3456 * dbus/dbus-test.c (main): add list test, and include
3457 dbus-test.h as intended
3459 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3460 (_dbus_hash_table_remove_int): return value indicates
3461 whether the entry existed to remove
3463 * dbus/dbus-list.c: add linked list utility class,
3466 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3469 2002-11-23 Havoc Pennington <hp@pobox.com>
3471 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3472 DBUS_END_DECLS to nothing, that should fix this once and for all
3474 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3476 * dbus/dbus-message.c, dbus/dbus-hash.c:
3477 add some missing @brief
3479 2002-11-23 Havoc Pennington <hp@pobox.com>
3481 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3482 to avoid confusing Doxygen
3484 * dbus/dbus-hash.c: @} not }@
3486 * dbus/dbus-message.c (struct DBusMessage): split out
3489 2002-11-23 Havoc Pennington <hp@pobox.com>
3491 * configure.in: pile on more warning flags if using gcc
3493 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3494 to document static functions
3496 * configure.in: add summary to end of configure so it
3497 looks nice and attractive
3499 * dbus/dbus-hash.c: finish implementation and write unit
3502 * configure.in: add --enable-tests to enable unit tests
3504 * dbus/dbus-test.c: test program to run unit tests
3505 for all files in dbus/*, initially runs a test for
3508 * dbus/dbus-internals.h: file to hold some internal utility stuff
3510 2002-11-22 Havoc Pennington <hp@redhat.com>
3512 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3513 "ported" away from Tcl
3515 * dbus/dbus-types.h: header for types such as dbus_bool_t
3517 2002-11-22 Havoc Pennington <hp@redhat.com>
3519 * dbus/dbus.h: fixups for doc warnings
3521 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3523 (QUIET): make it quiet so we can see warnings
3525 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3527 2002-11-22 Havoc Pennington <hp@redhat.com>
3529 * Makefile.am: include "Doxyfile" target in all-local
3531 * configure.in: generate the Doxyfile
3533 * Doxyfile.in: move Doxyfile here, so we can use
3534 configure to generate a Doxyfile with the right
3537 2002-11-22 Havoc Pennington <hp@redhat.com>
3539 * dbus/dbus-message.c: move inline docs into .c file
3541 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3542 so all docs are under doc/
3543 (MAN_EXTENSION): generate man pages. Use extension
3544 ".3dbus" which matches ".3qt" on my system,
3545 I guess this is OK, I don't know really.
3546 (FILE_PATTERNS): look for .c files not .h, makes sense
3549 2002-11-22 Havoc Pennington <hp@pobox.com>
3551 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3552 because any app can be a server, and any app can be a client,
3553 the bus is a special kind of server.
3555 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3557 * Doxyfile : adding. Still needs Makefile rules to be generated
3558 automatically (just run "doxygen" in the toplevel dir for now to
3561 * dbus/dbus-message.h : Adding sample docs (javadoc since
3562 resembles gtk-doc a little more)
3564 * dbus/dbus.h : Adding sample docs
3566 2002-11-21 Havoc Pennington <hp@redhat.com>
3568 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3569 so we can allow ourselves to include files directly,
3570 instead of having to use dbus.h
3572 * dbus/dbus.h: fill in
3574 * dbus/dbus-message.h: sketch out a sample header file.
3575 Include griping if you include it directly instead of
3578 * dbus/dbus-macros.h: new file with macros for extern "C",
3579 TRUE/FALSE, NULL, etc.
3581 * doc/file-boilerplate.c: put include guards in here
3583 2002-11-21 Havoc Pennington <hp@redhat.com>
3585 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3587 * COPYING: include the GPL as well, and license code
3588 under both AFL and GPL.
3590 2002-11-21 Havoc Pennington <hp@redhat.com>
3592 * acconfig.h: get rid of this
3594 * autogen.sh (run_configure): add --no-configure option
3596 * configure.in: remove AC_ARG_PROGRAM to make
3597 autoconf complain less. add AC_PREREQ.
3598 add AC_DEFINE third arg.
3600 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3603 Fix references so we can distcheck.
3605 2002-11-21 Havoc Pennington <hp@redhat.com>
3607 * Initial module creation