1 2003-04-05 Havoc Pennington <hp@pobox.com>
3 * test/decode-gcov.c (main): print per-directory stats in the report
5 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
7 2003-04-05 Havoc Pennington <hp@pobox.com>
9 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
11 * test/decode-gcov.c: hack up a little program to suck data
12 out of gcov files. Yes this is sort of silly.
14 * configure.in: define something in config.h and do an
15 AM_CONDITIONAL when gcov is enabled
17 2003-04-04 Havoc Pennington <hp@redhat.com>
19 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
20 return a "babysitter" object that is used to monitor the status of
21 the spawned process and reap it when required.
23 * test/test-segfault.c, test/test-exit.c,
24 test/test-sleep-forever.c: binaries that do various lame things,
25 used in the test suite.
27 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
29 2003-04-03 Havoc Pennington <hp@pobox.com>
31 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
32 in preparation for modifying it, dbus-sysdeps is getting
35 2003-04-03 Havoc Pennington <hp@redhat.com>
37 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
40 * bus/*.[hc]: adapt to mainloop change
42 2003-04-03 Havoc Pennington <hp@redhat.com>
44 * bus/activation.c (load_directory): fix up memleaks
45 (bus_activation_entry_free): free the entry
47 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
48 we get one from the message bus; fix memleaks.
50 * dbus/dbus-message.c (dbus_set_error_from_message): new function
52 2003-04-03 Havoc Pennington <hp@pobox.com>
54 * bus/config-parser.c (bus_config_parser_unref): free
55 list of mechanisms, bug discovered by test suite enhancements
56 (putting system.conf and session.conf into suite)
58 * test/Makefile.am, test/test-service.c: add placeholder for a
59 test service that we'll activate as part of test suite. Doesn't
62 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
63 setting NULL value, and use system malloc not dbus_malloc()
64 when we have unavoidable memleakage.
66 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
67 didn't work, and support DBUS_BUS_ACTIVATION.
69 * bus/activation.c (child_setup): pass our well-known bus type to
72 * bus/config-parser.c: support <type> to specify well-known type
74 * doc/dbus-specification.sgml: document the env variables to
75 locate well-known buses and find service activator
77 2003-04-02 Havoc Pennington <hp@redhat.com>
79 * test/Makefile.am (all-local): add a rule to copy tests to
80 builddir, so we can have generated tests. Use this to remove the
81 silly hack for testing system.conf and session.conf. Will use this
82 shortly to generate .service files pointing to test binaries.
84 2003-04-02 Havoc Pennington <hp@redhat.com>
86 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
87 current alloc and needed new length, not max of the doubled
88 allocation and needed new length. Also, when building tests,
89 don't do the double-allocation stuff, just realloc every time.
91 2003-04-02 Havoc Pennington <hp@redhat.com>
93 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
95 (_dbus_string_get_dirname): new
96 (_dbus_sysdeps_test): new
97 (_dbus_directory_open): include dirnames in error messages
99 * bus/config-parser.c: interpret <include> and <includedir> and
100 <servicedir> relative to config file location if the given
101 filename is not absolute.
103 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
105 2003-04-02 Havoc Pennington <hp@redhat.com>
107 * bus/connection.c (bus_transaction_send_error_reply): set sender
108 service for the error, and unref the reply on success
110 * bus/activation.c: convert to use BusTransaction so OOM can be
112 (bus_activation_service_created): set sender of the message
114 2003-04-01 Havoc Pennington <hp@redhat.com>
116 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
117 <includedir> (at least mostly)
119 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
120 first, then the user ID
122 2003-04-01 Havoc Pennington <hp@pobox.com>
124 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
127 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
129 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
131 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
132 socket 0777, and unlink any existing socket.
134 * bus/bus.c (bus_context_new): change our UID/GID and fork if
135 the configuration file so specifies; set up auth mechanism
138 * bus/config-parser.c (bus_config_parser_content): add support
139 for <fork> option and fill in code for <auth>
141 * bus/system.conf.in: add <fork/> to default configuration,
142 and limit auth mechanisms to EXTERNAL
144 * doc/config-file.txt (Elements): add <fork>
146 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
147 (_dbus_change_identity): new function
149 2003-03-31 Havoc Pennington <hp@redhat.com>
151 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
152 (_dbus_listen_unix_socket): fix off-by-one error in null
153 termination spotted by Nalin
155 2003-03-31 Havoc Pennington <hp@redhat.com>
157 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
158 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
159 having a real home directory available.
161 2003-03-31 Havoc Pennington <hp@redhat.com>
163 * bus/Makefile.am (install-data-hook): create /var/run/dbus
165 * bus/messagebus.in: add init script for Red Hat /etc/init.d
167 * configure.in: add support for specifying a style of init script
170 2003-03-31 Havoc Pennington <hp@redhat.com>
172 Fix some annoying DBusString API and fix all affected code.
174 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
176 (_dbus_string_get_data): change to return string instead of using
178 (_dbus_string_get_const_data): ditto
179 (_dbus_string_get_data_len): ditto
180 (_dbus_string_get_const_data_len): ditto
182 2003-03-31 Havoc Pennington <hp@redhat.com>
184 * bus/main.c (main): fix up the command line arguments to be nicer
186 2003-03-31 Havoc Pennington <hp@redhat.com>
188 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
189 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
190 final location that lands in the config file
192 * bus/config-loader-expat.c (bus_config_load): fix type of
195 * doc/TODO: remove TODO item for dbus_bus_get()
197 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
199 2003-03-31 Havoc Pennington <hp@pobox.com>
201 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
202 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
203 argument since they are always client side
205 * dbus/dbus-server.c (dbus_server_get_address): new function
207 * bus/main.c (main): take the configuration file as an argument.
209 * test/data/valid-config-files/debug-allow-all.conf: new file to
210 use with dispatch.c tests for example
212 * bus/test-main.c (main): require test data dir
214 * bus/bus.c (bus_context_new): change this to take a
215 configuration file name as argument
217 * doc/config-file.txt (Elements): add <servicedir>
219 * bus/system.conf, bus/session.conf: new files
221 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
222 well-known socket if none set
224 * configure.in: create system.conf and session.conf
226 2003-03-30 Havoc Pennington <hp@pobox.com>
228 * bus/config-parser.c: hacking
230 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
231 to shut down, since it could cause weirdness with the DBusList
234 * dbus/dbus-list.c (_dbus_list_test): add tests for the
235 link-oriented stack routines
236 (alloc_link): free the mempool if the first alloc from it fails
238 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
240 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
242 (_dbus_string_skip_white): new
244 * doc/config-file.txt (Elements): add <includedir>
246 2003-03-28 Havoc Pennington <hp@pobox.com>
248 * dbus/dbus-string.c (_dbus_string_copy_data_len)
249 (_dbus_string_copy_data): new functions
251 2003-03-28 Anders Carlsson <andersca@codefactory.se>
253 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
257 * dbus/dbus-memory.c:
260 2003-03-28 Havoc Pennington <hp@pobox.com>
262 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
263 I think it may have just been superstition. Not sure.
265 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
266 failures that were not being handled.
268 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
270 * dbus/dbus-memory.c: add ability to set number of mallocs in a
271 row that will fail on out-of-memory.
273 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
274 function for testing out-of-memory handling.
276 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
277 allocation functions, they do map exactly to the expat ones.
279 2003-03-27 Havoc Pennington <hp@redhat.com>
281 * bus/config-loader-libxml.c (bus_config_load): add another error
284 2003-03-26 Anders Carlsson <andersca@codefactory.se>
287 Add note about automatic service activation.
289 * doc/dbus-specification.sgml:
290 Rename the specification and clarify a few things.
292 2003-03-26 Anders Carlsson <andersca@codefactory.se>
295 * dbus/dbus-address.c:
297 * dbus/dbus-marshal.c:
298 * dbus/dbus-server-debug-pipe.c:
299 * dbus/dbus-transport-unix.c:
300 Fix documentation warnings.
302 2003-03-26 Havoc Pennington <hp@pobox.com>
304 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
305 after every test so it's quick and easy to see which leaked, and
306 so we test multiple dbus_shutdown() calls
308 * configure.in: change configure.in XML stuff to also support
311 * config-loader-libxml.c: some hacking
313 * config-loader-expat.c: some hacking
315 * config-parser.c: some hacking, plus tests
317 2003-03-25 Havoc Pennington <hp@redhat.com>
319 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
321 * configure.in: add --with-xml option to specify XML library,
322 right now only libxml is supported.
324 * bus/config-loader-libxml.c, config-parser.c: sync some minor
325 nonworking code between home and work, still just stubs
327 2003-03-24 Havoc Pennington <hp@redhat.com>
329 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
332 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
333 NULL argument for "message" if the error is a well-known one,
334 fill in a generic message in this case.
336 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
339 * bus/test.c (bus_test_flush_bus): add
341 * bus/policy.c (bus_policy_test): test code stub
343 2003-03-24 Havoc Pennington <hp@pobox.com>
345 * bus/connection.c (bus_connections_setup_connection): set up
346 the "can this user connect" function, but it always returns
347 TRUE until we have a config file parser so we can have a config
348 file that allows connections.
350 2003-03-23 Havoc Pennington <hp@pobox.com>
352 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
353 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
354 the mutex, so we can check for proper memory management
357 * dbus/dbus-dataslot.c: remove the mutex from
358 DBusDataSlotAllocator and lock it manually when using it,
359 to simplify fitting it into the global slots framework.
361 * dbus/dbus-threads.c (init_static_locks): rework how we're
362 handling global locks so they are easily shut down.
364 * bus/policy.c (bus_policy_append_rule): fix
366 * bus/test-main.c (main): check for memleaks
368 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
369 test suite check for memleaks
371 * dbus/dbus-memory.c: add support in test mode for tracking
372 number of outstanding blocks
374 2003-03-23 Havoc Pennington <hp@pobox.com>
376 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
379 * dbus/dbus-hash.h: add ULONG hash keys
381 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
382 (_dbus_get_group_id): new function
384 2003-03-20 Havoc Pennington <hp@redhat.com>
386 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
388 (dbus_connection_get_unix_user): new function
390 2003-03-20 Havoc Pennington <hp@pobox.com>
392 * bus/connection.c (bus_connection_send_oom_error): assert that
394 (connection_execute_transaction): ditto
395 (bus_connection_preallocate_oom_error): fix to set the sender, and
396 set recipient to the destination service, not the bus driver
398 * bus/policy.c: hacking
400 * dbus/dbus-message.c (dbus_message_service_is): new function
401 (dbus_message_sender_is): new
403 2003-03-19 Havoc Pennington <hp@redhat.com>
405 * bus/policy.c: start sketching code for policy restrictions on
406 what connections can do.
408 2003-03-18 Havoc Pennington <hp@redhat.com>
410 * doc/TODO: some notes on high-level todo items. Little nitpick
411 stuff is all in @todo, so no need to add it here.
413 * doc/config-file.txt: some notes on how config file might look
415 2003-03-18 Anders Carlsson <andersca@codefactory.se>
421 2003-03-17 Havoc Pennington <hp@redhat.com>
423 * dbus/dbus-internals.h: add gcc attributes so that
424 our printf-style functions warn on bad arguments to
427 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
430 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
433 2003-03-17 Havoc Pennington <hp@redhat.com>
435 * bus/test-main.c (main): make it print something as it runs
436 so make check doesn't look stuck
438 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
439 from CVS, now obsolete
441 2003-03-17 Anders Carlsson <andersca@codefactory.se>
443 * bus/dispatch.c: (bus_dispatch):
444 Refetch the service name since it may have been reallocated
445 when dbus_message_set_sender was called.
447 * dbus/dbus-sysdeps.c: (_dbus_accept):
448 Add address and address length variables and use them to stop
449 valgrind from complaining.
451 2003-03-17 Havoc Pennington <hp@pobox.com>
453 All tests pass, no memleaks, no valgrind complaints.
455 * bus/test.c: refcount handler_slot
457 * bus/connection.c (bus_connections_new): refcount
460 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
461 bytes so that auth scripts pass.
463 * bus/dispatch.c: init message_handler_slot so it gets allocated
466 * bus/dispatch.c (message_handler_slot_ref): fix memleak
468 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
469 dealloc server_pipe_hash when no longer used for benefit of
472 * dbus/dbus-auth.c (process_command): memleak fix
474 * bus/dispatch.c (check_hello_message): memleak fix
476 2003-03-16 Havoc Pennington <hp@pobox.com>
478 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
480 2003-03-17 Anders Carlsson <andersca@codefactory.se>
482 * bus/activation.c (bus_activation_activate_service): Append
483 the pending activation entry to the list of pending activations.
485 2003-03-16 Havoc Pennington <hp@pobox.com>
487 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
490 * dbus/dbus-address.c (create_entry): fix OOM handling when
491 failing to alloc entry->method
493 2003-03-16 Havoc Pennington <hp@pobox.com>
495 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
498 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
499 add some missing dbus_set_result
501 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
502 alloc the DBusMessageHandler
504 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
505 the transport here, since we call this from the finalizer; it
506 resulted in a double-finalize.
508 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
509 where we tried to use transport->connection that was NULL,
510 happened when transport was disconnected early on due to OOM
512 * bus/*.c: adapt to handle OOM for watches/timeouts
514 * dbus/dbus-transport-unix.c: port to handle OOM during
517 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
518 reference to unused bytes instead of a copy
520 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
523 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
526 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
529 2003-03-16 Anders Carlsson <andersca@codefactory.se>
531 * doc/dbus-specification.sgml:
532 Document reply message for ActivateService.
534 2003-03-16 Anders Carlsson <andersca@codefactory.se>
536 * bus/activation.c: (bus_pending_activation_entry_free),
537 (bus_pending_activation_free), (bus_activation_new),
538 (bus_activation_unref), (bus_activation_service_created),
539 (bus_activation_activate_service):
541 * bus/bus.c: (bus_context_new):
542 * bus/desktop-file.c: (new_section):
543 * bus/driver.c: (bus_driver_send_service_deleted),
544 (bus_driver_handle_activate_service):
545 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
547 * dbus/dbus-connection.c:
548 (dbus_connection_send_with_reply_and_block):
549 * dbus/dbus-message.c: (dbus_message_append_args_valist):
550 * dbus/dbus-protocol.h:
551 Make activation work better. Now pending activations will be queued
552 and the daemon won't try to activate services that are already registered.
554 2003-03-16 Havoc Pennington <hp@pobox.com>
556 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
559 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
560 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
562 2003-03-16 Havoc Pennington <hp@pobox.com>
564 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
565 this. always run the test suite before commit...
567 * bus/*: adapt to DBusConnection API changes
569 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
570 requires renaming stuff to avoid dbus_connection_dispatch name
573 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
576 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
577 separate from _dbus_message_loader_return_buffer()
579 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
580 this, because it's now always broken to use; the number of
581 messages in queue vs. the number still buffered by the message
582 loader is undefined/meaningless. Should use
583 dbus_connection_get_dispatch_state().
584 (dbus_connection_dispatch): rename from
585 dbus_connection_dispatch_message
587 2003-03-16 Havoc Pennington <hp@pobox.com>
589 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
592 2003-03-16 Anders Carlsson <andersca@codefactory.se>
594 * dbus/dbus-connection.c:
595 (dbus_connection_send_with_reply_and_block):
596 Decrease connection->n_incoming when removing an entry
598 * dbus/dbus-dict.c: (dbus_dict_entry_free),
599 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
600 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
601 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
602 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
603 (dbus_dict_get_byte_array):
604 Handle NULL arrays and strings. Also add support for byte arrays.
606 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
607 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
608 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
609 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
610 (_dbus_demarshal_dict), (demarshal_and_validate_len),
611 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
612 * dbus/dbus-marshal.h:
613 Add support for marshalling and demarshalling empty arrays and strings.
615 * dbus/dbus-message.c: (dbus_message_append_args_valist),
616 (dbus_message_append_string_array),
617 (dbus_message_iter_get_boolean),
618 (dbus_message_iter_get_boolean_array),
619 (dbus_message_iter_get_int32_array),
620 (dbus_message_iter_get_uint32_array),
621 (dbus_message_iter_get_double_array),
622 (dbus_message_iter_get_byte_array),
623 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
624 (check_message_handling):
625 Add support for getting empty arrays and dicts.
627 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
628 Don't do any validation at all for now, that's better than just checking
631 * test/data/valid-messages/emptiness.message:
632 New test message with lots of empty arrays.
634 2003-03-16 Havoc Pennington <hp@pobox.com>
636 * dbus/dbus-connection.c
637 (_dbus_connection_queue_received_message_link): new function that
638 can't fail due to OOM
640 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
641 new function pops a message together with a list link
644 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
645 message queuing functions to avoid needing to alloc memory
647 2003-03-16 Havoc Pennington <hp@pobox.com>
649 Oops - test code was only testing failure of around 30 of the
650 mallocs in the test path, but it turns out there are 500+
651 mallocs. I believe this was due to misguided linking setup such
652 that there was one copy of dbus_malloc etc. in the daemon and one
653 in the shared lib, and only daemon mallocs were tested. In any
654 case, the test case now tests all 500+ mallocs, and doesn't pass
655 yet, though there are lots of fixes in this patch.
657 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
658 this so that it doesn't need to allocate memory, since it
659 has no way of indicating failure due to OOM (and would be
662 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
664 * bus/Makefile.am: rearrange to create two self-contained
665 libraries, to avoid having libraries with overlapping symbols.
666 that was resulting in weirdness, e.g. I'm pretty sure there
667 were two copies of global static variables.
669 * dbus/dbus-internals.c: move the malloc debug stuff to
672 * dbus/dbus-list.c (free_link): free list mempool if it becomes
675 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
677 * dbus/dbus-address.c (dbus_parse_address): free list nodes
680 * bus/dispatch.c (bus_dispatch_add_connection): free
681 message_handler_slot when no longer using it, so
682 memory leak checkers are happy for the test suite.
684 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
686 * bus/bus.c (new_connection_callback): disconnect in here if
687 bus_connections_setup_connection fails.
689 * bus/connection.c (bus_connections_unref): fix to free the
691 (bus_connections_setup_connection): if this fails, don't
692 disconnect the connection, just be sure there are no side
695 * dbus/dbus-string.c (undo_alignment): unbreak this
697 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
699 (_dbus_auth_new): fix the order in which we free strings
702 * bus/connection.c (bus_connection_disconnected): fix to
703 not send ServiceDeleted multiple times in case of memory
706 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
707 get the base service name
708 (dbus_bus_register_client): don't return base service name,
709 instead store it on the DBusConnection and have an accessor
711 (dbus_bus_register_client): rename dbus_bus_register()
713 * bus/dispatch.c (check_hello_message): verify that other
714 connections on the bus also got the correct results, not
715 just the one sending hello
717 2003-03-15 Havoc Pennington <hp@pobox.com>
719 Make it pass the Hello handling test including all OOM codepaths.
720 Now to do other messages...
722 * bus/services.c (bus_service_remove_owner): fix crash when
723 removing owner from an empty list of owners
724 (bus_registry_ensure): don't leave service in the list of
725 a connection's owned services if we fail to put the service
728 * bus/connection.c (bus_connection_preallocate_oom_error): set
729 error flag on the OOM error.
731 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
732 handle _dbus_transport_set_connection failure
734 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
735 to create watches up front and simply enable/disable them as
737 (unix_connection_set): this can now fail on OOM
739 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
740 of enabling/disabling a watch or timeout.
742 * bus/loop.c (bus_loop_iterate): don't touch disabled
745 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
747 2003-03-15 Havoc Pennington <hp@pobox.com>
749 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
750 write useful test code, after all that futzing around ;-)
752 Test does not yet pass because we can't handle OOM in
753 _dbus_transport_messages_pending (basically,
754 dbus_connection_preallocate_send() does not prealloc the write
755 watch). To fix this, I think we need to add new stuff to
756 set_watch_functions, namely a SetEnabled function so we can alloc
757 the watch earlier, then enable it later.
759 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
760 dbus-memory.c to the convenience lib
762 * bus/test.c: rename some static functions to keep them clearly
763 distinct from stuff in connection.c. Handle client disconnection.
765 2003-03-14 Havoc Pennington <hp@pobox.com>
767 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
768 transport, tests more of the real codepath. Set up clients
769 with bus_setup_debug_client.
771 * bus/test.c (bus_setup_debug_client): function to set up debug
772 "clients" on the main loop
774 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
777 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
780 * dbus/dbus-server-debug.c: support a debug server based on pipes
782 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
783 (_dbus_close): new function
785 * configure.in: check for socketpair
787 2003-03-14 Havoc Pennington <hp@redhat.com>
789 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
792 * dbus/dbus-transport-debug.c: rework this a good bit to be
793 less complicated. hopefully still works.
795 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
798 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
801 * dbus/dbus-message.c (dbus_message_copy): rename from
802 dbus_message_new_from_message, fix it up to copy
803 all the message fields, add test case
805 * bus/dispatch.c (bus_dispatch_test): add some more test code,
806 not quite passing yet
808 2003-03-14 Havoc Pennington <hp@pobox.com>
810 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
811 until no work remains" in test code. (the large diff here
812 is just code movement, no actual changes)
814 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
815 1, no point waiting around for test code.
816 (_dbus_server_debug_accept_transport): unref the timeout
817 after adding it (right?)
819 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
821 2003-03-13 Havoc Pennington <hp@redhat.com>
823 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
826 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
829 * dbus/dbus-connection.h: Make AddWatchFunction and
830 AddTimeoutFunction return a bool so they can fail on out-of-memory
832 * bus/bus.c (bus_context_new): set up timeout handlers
834 * bus/connection.c (bus_connections_setup_connection): set up
837 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
840 * bus/bus.c (bus_context_new): adapt to changes
842 * bus/connection.c: adapt to changes
844 * test/watch.c: adapt to DBusWatch changes
846 * bus/dispatch.c (bus_dispatch_test): started adding this but
849 2003-03-14 Anders Carlsson <andersca@codefactory.se>
851 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
853 2003-03-13 Havoc Pennington <hp@pobox.com>
855 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
856 set up a test framework as for the library
858 2003-03-12 Havoc Pennington <hp@pobox.com>
860 Throughout: purge global variables, introduce BusActivation,
861 BusConnections, BusRegistry, etc. objects instead.
863 * bus/bus.h, bus/bus.c: introduce BusContext as a global
866 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
867 going to redo this a bit differently I think
869 2003-03-12 Havoc Pennington <hp@redhat.com>
871 Mega-patch that gets the message bus daemon initially handling
872 out-of-memory. Work still needed. Also lots of random
873 moving stuff to DBusError instead of ResultCode.
875 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
877 * dbus/dbus-connection.c
878 (dbus_connection_send_with_reply_and_block): use DBusError
880 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
883 * dbus/dbus-connection.c (dbus_connection_send): drop the result
884 code here, as the only failure possible is OOM.
886 * bus/connection.c (bus_connection_disconnect):
887 rename bus_connection_disconnected as it's a notification only
889 * bus/driver.c (bus_driver_handle_acquire_service): don't free
890 "name" on get_args failure, should be done by get_args;
891 don't disconnect client for bad args, just return an error.
892 (bus_driver_handle_service_exists): ditto
894 * bus/services.c (bus_services_list): NULL-terminate returned array
896 * bus/driver.c (bus_driver_send_service_lost)
897 (bus_driver_send_service_acquired): send messages from driver to a
898 specific client to the client's unique name, not to the broadcast
901 * dbus/dbus-message.c (decode_header_data): reject messages that
902 contain no name field
903 (_dbus_message_get_client_serial): rename to
904 dbus_message_get_serial and make public
905 (_dbus_message_set_serial): rename from set_client_serial
906 (_dbus_message_set_reply_serial): make public
907 (_dbus_message_get_reply_serial): make public
909 * bus/connection.c (bus_connection_foreach): allow stopping
910 iteration by returning FALSE from foreach function.
912 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
913 (dbus_connection_free_preallocated_send)
914 (dbus_connection_preallocate_send): new API for sending a message
915 without possibility of malloc failure.
916 (dbus_connection_send_message): rename to just
917 dbus_connection_send (and same for whole function family)
919 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
921 * dbus/dbus-sysdeps.c (_dbus_exit): new function
923 * bus/activation.c: handle/return errors
925 * dbus/dbus-errors.h: add more DBUS_ERROR #define
927 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
928 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
929 (_dbus_result_from_errno): move to this file
931 2003-03-10 Anders Carlsson <andersca@codefactory.se>
933 * dbus/dbus-marshal.c:
934 (_dbus_marshal_set_string):
935 Take a length argument so we can marshal the correct string
938 (_dbus_marshal_dict), (_dbus_demarshal_dict),
939 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
940 (_dbus_marshal_test):
941 * dbus/dbus-marshal.h:
942 Add support for marshalling and demarshalling dicts.
944 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
945 Add support for TYPE DICT.
947 * dbus/dbus-message.c: (set_string_field):
948 Adjust header padding.
950 (dbus_message_append_args_valist), (dbus_message_append_dict),
951 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
952 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
953 (check_message_handling), (check_have_valid_message):
954 * dbus/dbus-message.h:
955 Add functions for setting and getting dicts.
957 * dbus/dbus-protocol.h:
963 * doc/dbus-specification.sgml:
964 Add information about how dicts are marshalled.
966 * test/data/invalid-messages/dict-with-nil-value.message:
967 * test/data/invalid-messages/too-short-dict.message:
968 * test/data/valid-messages/dict-simple.message:
969 * test/data/valid-messages/dict.message:
970 Add sample messages containing dicts.
972 2003-03-08 Anders Carlsson <andersca@codefactory.se>
974 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
976 2003-03-07 Anders Carlsson <andersca@codefactory.se>
979 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
980 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
981 (dbus_dict_set_int32), (dbus_dict_set_uint32),
982 (dbus_dict_set_double), (dbus_dict_set_string),
983 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
984 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
985 (dbus_dict_set_string_array), (_dbus_dict_test):
987 Fix according to comments from Havoc.
989 2003-03-06 Michael Meeks <michael@server.home>
991 * configure.in: if we don't have kde-config, disable have_qt.
993 2003-03-07 Anders Carlsson <andersca@codefactory.se>
998 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
999 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
1000 (dbus_dict_remove), (dbus_dict_get_value_type),
1001 (dbus_dict_get_keys), (dbus_dict_put_boolean),
1002 (dbus_dict_put_int32), (dbus_dict_put_uint32),
1003 (dbus_dict_put_double), (dbus_dict_put_string),
1004 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
1005 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
1006 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
1007 (dbus_dict_get_int32), (dbus_dict_get_uint32),
1008 (dbus_dict_get_double), (dbus_dict_get_string),
1009 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
1010 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
1011 (dbus_dict_get_string_array), (_dbus_dict_test):
1013 Add DBusDict implementation
1015 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1019 2003-03-04 Havoc Pennington <hp@pobox.com>
1021 * test/data/auth/*: adapt to changes
1023 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1024 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1027 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1028 more stuff from being in a context name, to make the protocol
1029 simpler to deal with
1031 * dbus/dbus-errors.c (dbus_error_has_name): new function
1032 (dbus_error_is_set): new function
1034 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1035 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1037 * dbus/dbus-connection.c (dbus_connection_flush): also read
1038 messages during a flush operation
1040 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1042 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1044 * configure.in: Check for gethostbyname on Solaris.
1046 * dbus/dbus-transport.c: (_dbus_transport_open):
1047 Remove duplicate "tcp" entry.
1049 * doc/dbus-specification.sgml:
1050 Clarify some things.
1052 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1054 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1055 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1056 (_dbus_keyring_test):
1057 * dbus/dbus-md5.c: (_dbus_md5_compute):
1058 * dbus/dbus-sha.c: (_dbus_sha_compute):
1061 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1063 * README: Add some things.
1065 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1067 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1068 after case DBUS_TYPE_BOOELAN.
1070 2003-03-02 Havoc Pennington <hp@pobox.com>
1072 * test/break-loader.c (randomly_set_extreme_ints): add test that
1073 sets really huge and small integers
1075 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1076 that length of boolean array fits in the string, and that
1077 string has room for boolean value in single-bool case.
1079 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1080 optional value to "ALIGN" command which is what to fill the
1083 * test/data/valid-messages/no-padding.message: add regression
1084 test for the message padding problem
1086 2003-03-02 Havoc Pennington <hp@pobox.com>
1088 * dbus/dbus-message.c (decode_header_data): fix to always init
1089 message_padding, from Benjamin Dauvergne
1091 2003-03-02 Havoc Pennington <hp@pobox.com>
1097 2003-03-01 Joe Shaw <joe@assbarn.com>
1099 * configure.in: Check for "struct cmsgcred" and try to access its
1100 members for BSD-like unices.
1102 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1103 _dbus_read_credentials_unix_socket().
1104 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1105 read() for reading the credential byte off the unix socket. Use
1106 struct cmsgcred on systems that support it.
1108 2003-02-27 Alexander Larsson <alexl@redhat.com>
1112 Make gthreads-2.0 dependency optional. Don't build thread test if
1115 2003-02-27 Havoc Pennington <hp@pobox.com>
1117 * dbus/dbus-connection.c
1118 (dbus_connection_send_message_with_reply_and_block): fix doh!
1119 doh! doh! bug that resulted in never removing a reply from the
1120 queue, no wonder we called get_reply_serial so much ;-)
1122 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1123 and client serial instead of demarshaling them every time
1125 2003-02-27 Havoc Pennington <hp@pobox.com>
1127 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1128 more inlined, using dbus-string-private.h, speeds things up
1131 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1132 when freeing the string
1133 (_dbus_string_steal_data): fix for align offset
1134 (undo_alignment): new function
1136 2003-02-26 Havoc Pennington <hp@redhat.com>
1138 All kinds of audit fixes from Owen, plus initial attempt to
1139 handle unaligned memory returned from malloc.
1141 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1142 leave room for align_offset and nul byte
1143 (fixup_alignment): function to track an align_offset and
1144 ensure real->str is aligned
1145 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1146 to allow a nul byte plus align offset
1147 (_dbus_string_lock): fix overflow issue
1148 (_dbus_string_init_const_len): add assertions on sanity of len,
1149 assign allocated to be ALLOCATION_PADDING larger than len
1150 (set_length): fixup the overflow handling
1151 (_dbus_string_get_data_len): fix overflow in assertion
1152 (open_gap): detect overflow in size of gap to be opened
1153 (_dbus_string_lengthen): add overflow check
1154 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1155 (_dbus_string_append): add overflow check
1156 (_dbus_string_append_unichar): overflow
1157 (_dbus_string_delete): fix overflow in assertion
1158 (_dbus_string_copy_len): overflow in assertion
1159 (_dbus_string_replace_len): overflows in assertions
1160 (_dbus_string_find): change to implement in terms of
1161 _dbus_string_find_to
1162 (_dbus_string_find_to): assorted fixage
1163 (_dbus_string_equal_c_str): assert c_str != NULL,
1164 fix logic so the function works
1165 (_dbus_string_ends_with_c_str): fix overflow thingy
1166 (_dbus_string_base64_encode): overflow fix
1167 (_dbus_string_validate_ascii): overflow
1168 (_dbus_string_validate_nul): overflow
1170 2003-02-26 Havoc Pennington <hp@redhat.com>
1172 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1174 2003-02-26 Alexander Larsson <alexl@redhat.com>
1177 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1179 * dbus/dbus-connection.c:
1180 * dbus/dbus-connection.h:
1181 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1182 Add dbus_connection_set_wakeup_main_function and use it when queueing
1183 incoming and outgoing messages.
1186 * dbus/dbus-dataslot.c:
1187 Threadsafe usage of DBusDataSlotAllocator
1189 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1192 * dbus/dbus-server-unix.c:
1195 * glib/dbus-gmain.c:
1196 Implement the new wakeup functions for glib.
1199 * glib/test-thread-client.c:
1200 * glib/test-thread-server.c:
1201 * glib/test-thread.h:
1202 Initial cut at some thread test code. Not really done yet.
1204 2003-02-26 Havoc Pennington <hp@pobox.com>
1206 * dbus/dbus-connection.c
1207 (dbus_connection_send_message_with_reply_and_block): fix crash
1208 where we ref'd the outgoing message instead of the returned reply
1210 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1211 at the end of this function, so if we didn't need to read for
1212 authentication, we reinstall it for receiving messages
1214 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1215 a NULL sender for peer-to-peer case
1217 * dbus/dbus-transport-unix.c (check_read_watch): handle
1218 !authenticated case correctly
1220 * glib/dbus-gmain.c: add support for DBusServer
1222 * dbus/dbus-server.c: add data slot support
1224 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1225 return values and handle errors
1227 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1230 * Doxyfile.in (INPUT): add glib subdir
1232 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1233 setup_with_g_main instead of hookup_with_g_main; write docs
1235 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1237 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1238 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1239 * dbus/dbus-message.c: (dbus_message_append_boolean),
1240 (dbus_message_append_boolean_array),
1241 (dbus_message_get_args_valist), (_dbus_message_test):
1242 * dbus/dbus-message.h:
1243 * doc/dbus-specification.sgml:
1244 Various fixes as pointed out by Havoc.
1246 * test/data/invalid-messages/bad-boolean-array.message:
1247 * test/data/invalid-messages/bad-boolean.message:
1248 Add invalid boolean value test cases.
1250 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1252 * dbus/dbus-internals.c: (_dbus_type_to_string):
1253 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1254 (_dbus_marshal_validate_arg):
1255 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1256 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1257 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1258 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1259 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1260 (dbus_message_iter_get_double),
1261 (dbus_message_iter_get_boolean_array), (message_iter_test):
1262 * dbus/dbus-message.h:
1263 * dbus/dbus-protocol.h:
1264 * doc/dbus-specification.sgml:
1265 * test/data/valid-messages/lots-of-arguments.message:
1266 Add support for boolean and boolean array types.
1268 2003-02-23 Havoc Pennington <hp@pobox.com>
1270 * dbus/dbus-keyring.c: finish most of this implementation and
1273 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1274 these barf if the error isn't cleared to NULL
1276 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1277 (_dbus_create_directory): new function
1279 * dbus/dbus-errors.c (dbus_set_error): fix warning
1281 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1282 (_dbus_string_hex_decode): new function
1283 (test_hex_roundtrip): test code
1285 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1287 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1289 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1290 the save-to-temp/rename trick to atomically write the new file
1291 (_dbus_string_parse_uint): new function
1293 2003-02-22 Havoc Pennington <hp@pobox.com>
1295 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1297 2003-02-22 Havoc Pennington <hp@pobox.com>
1299 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1300 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1302 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1304 * dbus/test/data/sha-1: add US government test suite for SHA-1
1306 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1308 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1309 Make string arrays NULL-terminated.
1311 * dbus/dbus-memory.c: (dbus_free_string_array):
1312 * dbus/dbus-memory.h:
1313 New function for freeing NULL-terminated string arrays.
1315 * dbus/dbus-message-builder.c: (append_quoted_string),
1316 (_dbus_message_data_load):
1317 Add support for array types.
1319 * dbus/dbus-message.c: (check_message_handling):
1320 Add more types as test cases.
1322 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1323 (_dbus_string_parse_double):
1324 Add the start offset to the end offset.
1326 * test/data/valid-messages/lots-of-arguments.message:
1327 New test message with lots of arguments.
1329 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1331 * dbus/dbus-message.c: (dbus_message_append_nil),
1332 (dbus_message_append_int32), (dbus_message_append_uint32),
1333 (dbus_message_append_double), (dbus_message_append_string),
1334 (dbus_message_append_int32_array),
1335 (dbus_message_append_uint32_array),
1336 (dbus_message_append_double_array),
1337 (dbus_message_append_byte_array),
1338 (dbus_message_append_string_array):
1339 Fix all out-of-memory handling in these functions.
1341 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1343 * dbus/dbus-message.c: (dbus_message_append_nil):
1346 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1348 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1349 (dbus_message_append_nil), (dbus_message_append_int32_array),
1350 (dbus_message_append_uint32_array),
1351 (dbus_message_append_double_array),
1352 (dbus_message_append_byte_array),
1353 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1354 (dbus_message_iter_get_int32_array),
1355 (dbus_message_iter_get_uint32_array),
1356 (dbus_message_iter_get_double_array),
1357 (dbus_message_iter_get_byte_array),
1358 (dbus_message_iter_get_string_array):
1360 * dbus/dbus-message.h:
1361 Add functions for appending and getting arrays.
1363 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1365 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1366 element size at least 8 bytes, fixes mempool tests on
1369 2003-02-20 Alexander Larsson <alexl@redhat.com>
1371 * dbus/dbus-transport-unix.c (unix_do_iteration):
1372 Unlock the connection mutex during a blocking select call.
1373 Add todo about how we need a way to wake up the select.
1375 * dbus/dbus-connection-internal.h:
1376 * dbus/dbus-connection.c:
1377 Add _dbus_connection_lock and _dbus_connection_unlock.
1379 2003-02-19 Havoc Pennington <hp@pobox.com>
1381 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1382 Doxyfile.in, not Doxyfile
1384 * dbus/dbus-keyring.c: do some hacking on this
1386 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1388 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1390 (dbus_set_error): remove dbus_error_init, check for message ==
1391 NULL *before* we sprintf into it, and add @todo about including
1392 system headers in this file
1394 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1396 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1398 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1399 get various bits of user information based on either username
1401 (_dbus_homedir_from_username): new function
1403 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1406 Add check for nonposix getpwnam_r
1408 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1409 Align the pool element size to a sizeof (void *) boundary.
1411 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1412 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1413 General Solaris fixes.
1415 * test/data/valid-messages/simplest-manual.message:
1416 Explicitly state that we want little-endian packing.
1418 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1420 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1422 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1423 Added to create a transport connecting using a tcp/ip socket.
1425 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1426 to a tcp socket at given host and port.
1427 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1430 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1432 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1433 Added to create a server listening on a TCP/IP socket.
1435 2003-02-19 Havoc Pennington <hp@pobox.com>
1437 Throughout: mop up all the Doxygen warnings and undocumented
1440 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1441 to search any paths.
1443 * dbus/dbus-threads.c: move global mutex initializers to
1444 dbus-internals.h, multiple prototypes was confusing doxygen
1445 besides being kind of ugly
1447 * Doxyfile (PREDEFINED): have Doxygen define
1448 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1449 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1450 (do not abuse the feature! it's for stuff like the autogenerated
1451 macros in dbus-md5.c, not just for things you don't feel like
1454 2003-02-18 Havoc Pennington <hp@pobox.com>
1456 * dbus/dbus-string.c (_dbus_string_zero): new function
1458 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1459 wrap it in some dbus-friendly API
1461 * dbus/dbus-types.h: add 16-bit types
1463 2003-02-18 Joe Shaw <joe@assbarn.com>
1465 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1466 credentials from our currently running process.
1467 (get_word): Fix a buglet where we were copying the entire length
1468 instead of relative to our position.
1470 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1471 keys on the stack... it's 640k of data.
1473 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1474 read the credentials byte off the socket, even if we don't have
1476 (_dbus_poll): Implement poll() using select() for systems which
1479 * glib/test-dbus-glib.c (main): Print out an error if no
1480 parameters are given.
1482 * test/data/auth/fallback.auth-script: Added. Tests that a client
1483 can fallback to a secondary auth mechanism if the first fails.
1485 2003-02-18 Havoc Pennington <hp@pobox.com>
1489 2003-02-17 Havoc Pennington <hp@pobox.com>
1491 * doc/dbus-specification.sgml: lots of cosmetic
1492 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1493 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1494 s/server/bus/ (except in authentication section). Add a section
1495 "Message Bus Message Routing"
1497 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1503 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1505 * doc/dbus-specification.sgml:
1506 Specification updates.
1508 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1510 * bus/activation.c: (bus_activation_init), (child_setup),
1511 (bus_activation_activate_service):
1513 * bus/main.c: (main):
1514 Set DBUS_ADDRESS environment variable.
1516 * dbus/dbus-errors.c: (dbus_set_error):
1517 Don't use va_copy since that's a C99 feature.
1519 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1520 (_dbus_spawn_async):
1521 * dbus/dbus-sysdeps.h:
1522 Add child_setup_func to _dbus_spawn_async.
1524 * doc/dbus-specification.sgml:
1525 Update specification.
1527 * test/spawn-test.c: (setup_func), (main):
1530 2003-02-17 Alexander Larsson <alexl@redhat.com>
1532 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1535 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1539 * doc/dbus-test-plan.sgml:
1540 Add test plan document.
1545 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1547 * dbus/dbus-message.c: (decode_header_data),
1548 (_dbus_message_loader_return_buffer):
1549 Set the header padding amount when loading a message.
1551 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1553 * bus/dispatch.c: (send_one_message):
1554 Only send broadcast messages to registered connections.
1556 * dbus/dbus-message.c: (dbus_message_name_is):
1557 * dbus/dbus-message.h:
1558 New convenience function.
1560 * dbus/dbus-transport-debug.c: (do_reading):
1561 Only dispatch one message per run.
1564 * test/bus-test.c: (new_connection_callback), (die),
1565 (test_hello_client1_handler), (test_hello_client2_handler),
1566 (test_hello_replies), (main):
1568 * test/bus-test-loop.[ch]:
1571 2003-02-16 Havoc Pennington <hp@pobox.com>
1573 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1574 backward conditional
1576 2003-02-16 Alexander Larsson <alexl@redhat.com>
1578 * dbus/dbus-connection.c:
1579 Implement sent_message_with_reply. (with_reply_and block is still
1581 Made dispatch_message not lose message if OOM.
1583 * dbus/dbus-errors.h:
1584 Add NoReply error (for reply timeouts).
1586 2003-02-16 Alexander Larsson <alexl@redhat.com>
1588 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1589 Actually free keys and values when destroying hashtable.
1591 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1593 * dbus/dbus-auth.c: (client_try_next_mechanism):
1596 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1597 Return TRUE if there's no thread implementation around.
1599 * glib/dbus-gmain.c: (free_source),
1600 (dbus_connection_hookup_with_g_main):
1601 Make sure to remove the GSource when the connection is finalized.
1603 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1605 * bus/dispatch.c: (bus_dispatch_message_handler):
1606 * dbus/dbus-errors.h:
1607 Return an error if someone tries to send a message to a service
1610 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1612 * bus/activation.c: (load_directory), (bus_activation_init),
1613 (bus_activation_activate_service):
1616 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1617 More work on the activation handling.
1619 * dbus/dbus-errors.h:
1620 Add some error messages
1622 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1623 * dbus/dbus-message.h:
1624 New function that creates an error message.
1626 * dbus/dbus-protocol.h:
1627 Add ACTIVATE_SERVER message.
1629 * dbus/dbus-server-unix.c: (unix_handle_watch),
1630 (_dbus_server_new_for_domain_socket):
1631 Call _dbus_fd_set_close_on_exec.
1633 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1634 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1635 (_dbus_fd_set_close_on_exec):
1636 * dbus/dbus-sysdeps.h:
1637 Add _dbus_fd_set_close_on exec function. Also add function that checks
1638 that all open fds are set to close-on-exec and warns otherwise.
1640 * dbus/dbus-transport-unix.c:
1641 (_dbus_transport_new_for_domain_socket):
1642 Call _dbus_fd_set_close_on_exec.
1644 2003-02-16 Havoc Pennington <hp@pobox.com>
1646 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1647 allow people to avoid setting SIGPIPE to SIG_IGN
1648 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1649 we've been asked not to
1651 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1653 * dbus/dbus-list.c: (_dbus_list_append_link),
1654 (_dbus_list_prepend_link):
1655 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1659 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1662 * bus/activation.c: (bus_activation_entry_free),
1663 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1665 * bus/main.c: (main):
1666 Add simple activation support, doesn't work yet though.
1668 2003-02-15 Zack Rusin <zack@kde.org>
1670 * qt/dbus-qthread.cpp: small casting fix
1672 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1674 * dbus/dbus-errors.c: (dbus_set_error):
1675 * dbus/dbus-errors.h:
1676 Add a few errors and make dbus_set_error void.
1678 * dbus/dbus-sysdeps.c:
1679 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1680 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1681 * dbus/dbus-sysdeps.h:
1682 Add _dbus_spawn_async.
1684 * test/spawn-test.c: (main):
1685 Test for _dbus_spawn_async.
1687 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1689 * dbus/dbus-internals.h:
1690 Fix build without tests.
1692 * dbus/dbus-list.c: (alloc_link):
1693 Fix a segfault when a malloc fails.
1695 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1696 (dbus_malloc0), (dbus_realloc):
1697 Add support for malloc debugging.
1699 2003-02-15 Alexander Larsson <alexl@redhat.com>
1701 * dbus/dbus-threads.c:
1702 * dbus/dbus-threads.h:
1703 Add condvars. Remove static mutext from API.
1704 Implement static mutexes by initializing them from threads_init.
1706 * glib/dbus-gthread.c:
1707 * qt/dbus-qthread.cpp:
1708 Update with the thread api changes.
1713 Turn StaticMutex into normal mutex + init function.
1714 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1715 _dbus_list_append_link, _dbus_list_prepend_link
1718 * dbus/dbus-sysdeps.c:
1719 * dbus/dbus-sysdeps.h:
1720 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1721 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1723 * dbus/dbus-protocol.h:
1724 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1726 * dbus/dbus-message.c:
1727 Make ref/unref atomic.
1730 * dbus/dbus-connection-internal.h:
1731 * dbus/dbus-connection.c:
1732 * dbus/dbus-connection.h:
1734 Change _peek to _borrow,_return & _steal_borrowed.
1735 Change disconnect callback to event.
1736 Make dbus_connection_dispatch_messages reentrant.
1738 * dbus/dbus-transport.c:
1739 Don't ref the connection on calls to the transport
1742 * dbus/dbus-message-handler.c:
1745 * glib/dbus-gmain.c:
1746 Don't use peek_message anymore
1749 * test/debug-thread.c:
1750 * test/debug-thread.h:
1751 Simple thread implementation that asserts() on deadlocks in
1752 single-threaded code.
1755 (main) Call debug_threads_init.
1758 Use disconnect message instead of disconnect callback.
1762 Don't call dbus_connection_set_disconnect_function. Instead export
1763 bus_connection_disconnect.
1766 Call bus_connection_disconnect when we get a disconnected message.
1768 2003-02-15 Havoc Pennington <hp@pobox.com>
1770 * dbus/dbus-message.c (dbus_message_new): fool around with the
1773 2003-02-14 Havoc Pennington <hp@pobox.com>
1775 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1777 * dbus/dbus-memory.c: fail if the debug functions indicate we
1780 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1781 (_dbus_decrement_fail_alloc_counter): debug functions to
1782 simulate memory allocation failures
1784 2003-02-14 Havoc Pennington <hp@pobox.com>
1786 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1789 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1791 * bus/driver.c: (bus_driver_handle_hello):
1793 * bus/services.c: (bus_service_lookup):
1794 Reorder message sending so we get a more sane order.
1796 * test/bus-test.c: (message_handler):
1799 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1801 * bus/driver.c: (bus_driver_send_service_deleted),
1802 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1803 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1804 (bus_driver_send_welcome_message),
1805 (bus_driver_handle_list_services),
1806 (bus_driver_handle_acquire_service),
1807 (bus_driver_handle_service_exists):
1808 * dbus/dbus-bus.c: (dbus_bus_register_client),
1809 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1810 * dbus/dbus-errors.c: (dbus_result_to_string):
1811 * dbus/dbus-errors.h:
1812 * dbus/dbus-message.c: (dbus_message_append_args),
1813 (dbus_message_append_args_valist), (dbus_message_get_args),
1814 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1815 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1816 (dbus_message_iter_get_byte_array),
1817 (dbus_message_iter_get_string_array), (message_iter_test),
1818 (check_message_handling), (_dbus_message_test):
1819 * dbus/dbus-message.h:
1820 * test/bus-test.c: (main):
1821 Change fields to arguments in messages, so that they won't be
1822 confused with header fields.
1824 * glib/test-dbus-glib.c: (main):
1825 Remove append_fields from hello message.
1827 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1829 * dbus/dbus-errors.c:
1830 * dbus/dbus-message.c:
1831 * dbus/dbus-string.c:
1832 Documentation fixes.
1834 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1836 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1838 Implement support for timeouts in dbus-glib.
1840 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1842 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1843 * dbus/dbus-message.c: (process_test_subdir):
1844 * test/break-loader.c: (find_breaks_based_on):
1845 Plug some memory leaks.
1847 2003-02-13 Richard Hult <rhult@codefactory.se>
1849 * bus/main.c: Fix build.
1851 * dbus/dbus-errors.h:
1852 * dbus/dbus-errors.c: Fix copyright for Anders.
1854 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1859 * bus/connection.c: (bus_connection_foreach):
1862 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1863 (unescape_string), (new_section), (parse_section_start),
1864 (parse_key_value), (report_error), (bus_desktop_file_load),
1865 (bus_desktop_file_get_string):
1866 * bus/desktop-file.h:
1867 Use DBusError for error reporting.
1869 * bus/dispatch.c: (send_one_message),
1870 (bus_dispatch_message_handler):
1871 * bus/driver.c: (bus_driver_send_service_deleted),
1872 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1873 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1874 (bus_driver_send_welcome_message),
1875 (bus_driver_handle_list_services),
1876 (bus_driver_handle_acquire_service),
1877 (bus_driver_handle_service_exists):
1878 * bus/loop.c: (bus_loop_run):
1880 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1882 * bus/utils.c: (bus_wait_for_memory):
1884 New files with general utility functions.
1886 * dbus/dbus-internals.h:
1887 Remove _DBUS_HANDLE_OOM.
1889 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1891 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1892 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1893 * dbus/dbus-errors.h:
1894 Add DBusError structure.
1896 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1898 * test/data/valid-messages/standard-acquire-service.message:
1899 * test/data/valid-messages/standard-hello.message:
1900 * test/data/valid-messages/standard-list-services.message:
1901 * test/data/valid-messages/standard-service-exists.message:
1902 Add some standard messages.
1904 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1906 * bus/driver.c: (bus_driver_send_welcome_message),
1907 (bus_driver_handle_list_services),
1908 (bus_driver_handle_acquire_service),
1909 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1910 Update for API changes in libdbus.
1912 * dbus/dbus-message.c: (dbus_message_new_reply):
1913 * dbus/dbus-message.h:
1914 Remove the name argument. The spec states that replies shouldn't
1917 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1919 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1920 (report_error), (bus_desktop_file_load), (lookup_section),
1921 (lookup_line), (bus_desktop_file_get_raw),
1922 (bus_desktop_file_get_string):
1923 * bus/desktop-file.h:
1924 Some fixes, and new functions for getting a key value from a section.
1926 2003-02-13 Havoc Pennington <hp@pobox.com>
1928 * test/data/auth/fail-after-n-attempts.auth-script: new test
1930 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1933 2003-02-13 Havoc Pennington <hp@pobox.com>
1935 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1936 dbus_credentials_match were backward
1938 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1939 NO_CREDENTIALS and ROOT_CREDENTIALS
1941 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1942 into here. Never process more commands after we've reached an
1943 end state; store further data as unused bytes.
1945 * test/data/auth/*: add more auth tests
1947 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1948 command to match exact string and EXPECT_UNUSED to match unused
1951 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1953 2003-02-12 Havoc Pennington <hp@pobox.com>
1955 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1956 \r off of popped lines
1958 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1961 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1964 2003-02-12 Havoc Pennington <hp@pobox.com>
1966 * dbus/Makefile.am: remove break-loader from the build, since it
1969 * configure.in: add --enable-gcov to turn on coverage profiling
1970 flags and disable optimization
1972 2003-02-10 Havoc Pennington <hp@pobox.com>
1974 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1975 initial cut at test framework for DBusAuth from laptop.
1976 Doesn't quite work yet but it compiles and I need to get
1977 it off the 266mhz laptop. ;-)
1979 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1980 fix a memleak in error case
1982 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1985 * bus/desktop-file.c:
1986 * bus/desktop-file.h:
1987 Add a desktop file parser.
1989 2003-02-11 Zack Rusin <zack@kde.org>
1991 * qt/message.[h|cpp]: sample implementation
1992 of the KDE wrapper for DBusMessage
1994 2003-02-09 Zack Rusin <zack@kde.org>
1996 * test/bus-test.c: make_it_compile
1997 * doc/dbus-specification.sgml: minimal semantic fix
1999 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2005 2003-02-06 Anders Carlsson <andersca@codefactory.se>
2008 * dbus/dbus-break-loader.c:
2010 * test/break-loader.c:
2011 Move dbus-break-loader to test/ and rename it to break-loader.
2013 2003-02-02 Havoc Pennington <hp@pobox.com>
2015 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2016 for code to manage cookies in your home directory
2018 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2020 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2021 to authenticate, then disconnect the client.
2023 2003-02-03 Alexander Larsson <alexl@redhat.com>
2025 * dbus/dbus-message.c (dbus_message_append_fields):
2028 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2030 * doc/dbus-specification.sgml:
2031 Update address format section.
2033 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2036 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2037 (message_handler), (new_connection_callback), (loop_quit),
2041 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2043 * bus/driver.c: (bus_driver_handle_service_exists):
2044 Simplify the code a bit.
2046 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2049 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2052 Add libdbus-daemon.la and link to it.
2054 2003-02-01 James Willcox <jwillcox@gnome.org>
2056 * bus/driver.c: (bus_driver_handle_own_service):
2057 Actually include the service reply code in the message.
2059 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2061 * bus/driver.c: (bus_driver_handle_service_exists):
2062 Don't unref the incoming message.
2064 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2066 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2068 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2070 * dbus/dbus-server.c: (dbus_server_listen):
2071 * dbus/dbus-transport.c: (_dbus_transport_open):
2072 ifdef out the calls to the debug transport and server.
2074 2003-02-02 Alexander Larsson <alexl@redhat.com>
2076 * dbus/dbus-watch.c (dbus_watch_get_flags):
2077 Add note in the docs that ERROR or HANGUP won't be returned
2078 and are assumed always on.
2080 * glib/dbus-gmain.c (add_watch):
2081 Always add IO_ERR | IO_HUP
2083 * dbus/dbus-message.h:
2084 Add semicolon after dbus_message_iter_get_string_array().
2085 Makes qt code build again
2087 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2089 * bus/driver.c: (create_unique_client_name),
2090 (bus_driver_handle_hello):
2091 Don't take a name, just use a numeric id to identify
2095 * dbus/dbus-bus.c: (dbus_bus_register_client),
2096 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2098 Add new convenience functions for communicating with the bus.
2100 * dbus/dbus-message.h:
2102 * dbus/dbus-protocol.h:
2105 2003-02-01 Alexander Larsson <alexl@redhat.com>
2107 * dbus/dbus-message.c (dbus_message_append_fields):
2108 Add some more doc comments.
2110 2003-02-01 Havoc Pennington <hp@pobox.com>
2112 * dbus/dbus-break-loader.c (randomly_modify_length): change
2113 a 4-byte value in the message as if it were a length
2115 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2116 execute bit on saved files
2118 2003-02-01 Havoc Pennington <hp@pobox.com>
2120 * dbus/dbus-break-loader.c (main): new program to find messages
2121 that break the loader.
2123 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2124 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2126 * dbus/dbus-string.c (_dbus_string_set_byte): new
2128 2003-01-31 Havoc Pennington <hp@pobox.com>
2130 * dbus/dbus-message.c: refactor the test code to be more general,
2131 in preparation for writing a "randomly permute test cases to
2132 try to break the loader" program.
2134 2003-01-31 Havoc Pennington <hp@pobox.com>
2136 * doc/dbus-specification.sgml: work on the specification
2138 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2139 the protocol version of the message.
2141 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2142 no longer specifies that.
2143 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2146 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2147 "break" for DBUS_TYPE_NIL, remove @todo
2149 2003-01-31 Havoc Pennington <hp@pobox.com>
2151 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2152 just set_is_error/get_is_error as this is a commonly-used
2153 function, and write docs.
2155 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2157 * dbus/dbus-address.c: (dbus_address_entry_free):
2158 Free key and value lists.
2160 * dbus/dbus-internals.c: (_dbus_type_to_string):
2161 Add the types we didn't have.
2163 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2164 (_dbus_marshal_validate_arg):
2167 * dbus/dbus-message.c: (dbus_message_set_sender):
2168 Remove todo about being able to set sender to NULL.
2170 (dbus_message_set_is_error_reply),
2171 (dbus_message_get_is_error_reply):
2172 * dbus/dbus-message.h:
2175 * dbus/dbus-protocol.h:
2176 Add error reply flag.
2178 * test/data/valid-messages/opposite-endian.message:
2179 Add NIL type to test.
2181 2003-01-31 Havoc Pennington <hp@pobox.com>
2183 * doc/dbus-specification.sgml: fully specify the header. Add
2184 flags and major protocol version, and change header/body len to
2187 * dbus/dbus-message-builder.c (append_saved_length): append length
2190 * dbus/dbus-message.c (dbus_message_create_header): change header
2191 length and body length to unsigned. Add the new fields from the
2193 (_dbus_message_loader_return_buffer): unsigned header/body len
2195 2003-01-30 Havoc Pennington <hp@pobox.com>
2197 * dbus/dbus-auth.c: rework to use only REJECTED, no
2200 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2201 use REJECTED, suggested by Mark McLoughlin
2203 2003-01-30 Havoc Pennington <hp@pobox.com>
2205 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2206 a better way to report errors here. e.g. "unix address lacks
2207 path" or something. also "no such file" when the path doesn't
2210 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2212 (dbus_parse_address): add @todo about documenting address format,
2213 and allowing , and ; to be escaped
2215 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2218 Add dbus-address.[ch]
2220 * dbus/dbus-address.c: (dbus_address_entry_free),
2221 (dbus_address_entries_free), (create_entry),
2222 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2223 (dbus_parse_address), (_dbus_address_test):
2224 * dbus/dbus-address.h:
2225 New files for dealing with address parsing.
2227 * dbus/dbus-connection.c:
2228 Document timeout functions.
2230 * dbus/dbus-message.c:
2231 Document dbus_message_new_from_message.
2233 * dbus/dbus-server-debug.c:
2236 * dbus/dbus-server.c: (dbus_server_listen):
2237 Parse address and use correct server implementation.
2239 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2240 * dbus/dbus-string.h:
2241 New function with test.
2243 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2247 * dbus/dbus-transport-debug.c:
2250 * dbus/dbus-transport.c: (_dbus_transport_open):
2251 Parse address and use correct transport implementation.
2253 2003-01-30 Havoc Pennington <hp@pobox.com>
2255 * dbus/dbus-message.c: use message->byte_order instead of
2256 DBUS_COMPILER_BYTE_ORDER throughout.
2257 (dbus_message_create_header): pad header to align the
2258 start of the body of the message to 8-byte boundary
2260 * dbus/dbus-marshal.h: make all the demarshalers take const
2261 DBusString arguments.
2263 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2264 validate message args here, so we don't have to do slow validation
2265 later, and so we catch bad messages as they are incoming. Also add
2266 better checks on header_len and body_len. Also fill in
2269 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2270 implemented properly)
2271 (_dbus_string_validate_nul): new function to check all-nul
2273 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2274 get_arg_end_pos and remove all validation
2275 (_dbus_marshal_validate_arg): actually do validation here.
2277 2003-01-29 Havoc Pennington <hp@pobox.com>
2279 * dbus/dbus-message.c (check_message_handling): fix assertion
2280 failure on set_client_serial
2282 2003-01-28 Havoc Pennington <hp@pobox.com>
2284 * dbus/dbus-server-debug.c: Add doc section comments
2286 * dbus/dbus-transport-debug.c: add doc section comments
2288 2003-01-28 Havoc Pennington <hp@redhat.com>
2290 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2291 the reverse order from how I had it
2292 (_dbus_string_base64_encode): reverse encoding order. I was
2293 basically byteswapping everything during encoding.
2295 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2297 * dbus/dbus-connection-internal.h:
2298 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2299 (_dbus_connection_remove_timeout):
2300 Add functions for adding and removing timeouts.
2302 * dbus/dbus-message.c: (dbus_message_new_from_message):
2303 Add new function that takes a message and creates an exact
2304 copy of it, but with the refcount set to 1.
2305 (check_message_handling):
2308 * dbus/dbus-server-protected.h:
2309 * dbus/dbus-server.c: (_dbus_server_init_base),
2310 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2311 (dbus_server_set_timeout_functions):
2312 (_dbus_server_remove_timeout):
2313 New functions so that a server can add and remove timeouts.
2315 (dbus_server_listen):
2316 Add commented out call to dbus_server_debug_new.
2318 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2319 Actually set the handler, doh.
2321 * dbus/dbus-transport.c: (_dbus_transport_open):
2322 Add commented out call to dbus_transport_debug_client_new.
2325 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2327 2003-01-28 Havoc Pennington <hp@pobox.com>
2329 * dbus/dbus-message.c (check_message_handling): function to check
2330 on the loaded message, iterates over it etc.
2332 2003-01-28 Havoc Pennington <hp@pobox.com>
2334 * test/Makefile.am (dist-hook): fix make distdir
2336 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2338 2003-01-27 Havoc Pennington <hp@pobox.com>
2340 * dbus/dbus-mempool.c (time_for_size): replace printf with
2343 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2344 empty lines; fix the SAVE_LENGTH stuff to be
2345 START_LENGTH/END_LENGTH so it actually works; couple other
2348 * test/Makefile.am (dist-hook): add dist-hook for .message files
2350 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2351 can be constant or locked.
2352 (_dbus_string_free): allow freeing a const string as
2355 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2357 * dbus/dbus-test-main.c (main): take an argument which is the
2358 directory containing test data
2360 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2361 argument to this and load all the messages in test/data/
2362 checking that they can be loaded or not loaded as appropriate.
2364 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2366 * bus/dispatch.c: (bus_dispatch_message_handler):
2367 Dispatch messages sent to services.
2369 * bus/driver.c: (bus_driver_send_service_deleted),
2370 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2371 (bus_driver_send_service_acquired):
2372 Add helper functions for sending service related messages.
2374 (bus_driver_send_welcome_message):
2375 Send HELLO_REPLY instead of WELCOME.
2377 (bus_driver_handle_list_services):
2378 Send LIST_SERVICES_REPLY instead of SERVICES.
2380 (bus_driver_handle_own_service),
2381 (bus_driver_handle_service_exists):
2382 New message handlers.
2384 (bus_driver_handle_message):
2385 Invoke new message handlers.
2387 (bus_driver_remove_connection):
2388 Don't remove any services here since that's done automatically
2389 by bus_service_remove_owner now.
2392 New function signatures.
2394 * bus/services.c: (bus_service_add_owner):
2395 Send ServiceAcquired message if we're the only primary owner.
2397 (bus_service_remove_owner):
2398 Send ServiceAcquired/ServiceLost messages.
2400 (bus_service_set_prohibit_replacement),
2401 (bus_service_get_prohibit_replacement):
2402 Functions for setting prohibit replacement.
2404 (bus_service_has_owner):
2405 New function that checks if a connection is in the owner queue of
2409 Add new function signatures.
2411 * dbus/dbus-list.c: (_dbus_list_test):
2412 Add tests for _dbus_list_remove_last and traversing the list backwards.
2415 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2416 go any further, so return NULL then.
2418 * dbus/dbus-protocol.h:
2419 Add new messages, service flags and service replies.
2421 2003-01-26 Havoc Pennington <hp@pobox.com>
2423 * dbus/dbus-message-builder.c: implement, completely untested.
2425 * test/data/*: add data to be used in testing.
2426 ".message" files are our simple loadable text format.
2427 ".message-raw" will be binary dumps of messages.
2429 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2431 2003-01-26 Havoc Pennington <hp@pobox.com>
2433 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2435 * dbus/dbus-errors.c (dbus_result_to_string): add
2438 * dbus/dbus-message-builder.c: new file, will contain code to load
2439 up messages from files. Not implemented yet.
2441 2003-01-26 Havoc Pennington <hp@pobox.com>
2443 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2444 the sender by setting to NULL
2446 2003-01-26 Havoc Pennington <hp@pobox.com>
2448 The unit tests pass, but otherwise untested. If it breaks, the
2449 tests should have been better. ;-)
2451 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2454 * dbus/dbus-message.c: redo everything so we maintain
2455 message->header as the only copy of the various fields.
2456 This avoids the possibility of out-of-memory in some cases,
2457 for example dbus_message_lock() can't run out of memory anymore,
2458 and avoids extra copying. Figured I may as well go ahead and do
2459 this since it was busted for dbus_message_lock to not return
2460 failure on OOM, and dbus_message_write_header was totally
2461 unchecked for OOM. Also fixed some random other bugs.
2463 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2464 that strings are nul-terminated. Also, end_pos can be equal
2465 to string length just not greater than, I think.
2466 (_dbus_marshal_set_int32): new function
2467 (_dbus_marshal_set_uint32): new function
2468 (_dbus_marshal_set_string): new function
2470 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2471 a warning, init timeout_list to NULL
2472 (dbus_connection_send_message): don't use uninitialized variable
2475 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2477 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2479 * bus/driver.c: (bus_driver_handle_hello),
2480 (bus_driver_send_welcome_message):
2483 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2485 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2486 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2487 (dbus_connection_unref):
2488 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2489 * dbus/dbus-message.c: (dbus_message_unref),
2492 (dbus_message_get_fields):
2493 Remove debugging printout.
2495 (_dbus_message_loader_return_buffer):
2496 Don't store the header string.
2498 (_dbus_message_test):
2501 2003-01-26 Richard Hult <rhult@codefactory.se>
2503 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2504 the file descriptor list, since it can change under us.
2506 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2508 * glib/dbus-gmain.c: (dbus_connection_prepare),
2509 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2510 (remove_watch), (dbus_connection_hookup_with_g_main):
2511 Rewrite the glib handling to use its own GSource instead of a
2512 GIOChannel so we can catch messages put in the queue while waiting
2515 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2518 * bus/connection.c: (connection_disconnect_handler),
2519 (connection_watch_callback), (bus_connection_setup):
2520 * bus/dispatch.c: (send_one_message),
2521 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2522 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2524 * bus/driver.c: (bus_driver_send_service_deleted),
2525 (bus_driver_send_service_created), (bus_driver_handle_hello),
2526 (bus_driver_send_welcome_message),
2527 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2528 (bus_driver_handle_message):
2530 Refactor code, put the message dispatching in its own file. Use
2531 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2534 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2536 * dbus/dbus-internals.h:
2537 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2539 * dbus/dbus-message.c: (dbus_message_get_sender):
2540 * dbus/dbus-message.h:
2541 Implement dbus_message_get_sender.
2543 * dbus/dbus-protocol.h:
2544 Add message and service defines.
2546 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2548 * dbus/dbus-connection.c: (dbus_connection_send_message):
2549 * dbus/dbus-message-internal.h:
2550 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2551 (dbus_message_write_header):
2552 Remove _dbus_messag_unlock and don't set the client serial on a
2553 message if one already exists.
2555 2003-01-24 Havoc Pennington <hp@pobox.com>
2557 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2560 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2563 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2565 * dbus/dbus-list.c: (alloc_link), (free_link):
2566 Use a memory pool for the links.
2568 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2570 * bus/connection.c: (bus_connection_foreach):
2572 Add new bus_connection_foreach function.
2574 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2575 Add function that broadcasts a message to all clients.
2577 (bus_driver_send_service_created), (bus_driver_handle_hello),
2578 (bus_driver_send_welcome_message),
2579 (bus_driver_handle_list_services), (bus_driver_message_handler):
2580 Implement functions that take care of listing services, and notifying
2581 clients when new services are created.
2583 * bus/services.c: (bus_services_list):
2585 Add new function that returns an array of strings with the currently
2586 registered services.
2589 * glib/dbus-gmain.c:
2590 Update copyright year.
2592 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2594 * dbus/dbus-connection.c: (dbus_connection_send_message):
2595 Unlock the message in case it was sent earlier.
2597 (dbus_connection_send_message_with_reply_and_block):
2598 Remove the reply message from the list.
2600 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2601 Set array_len and new_pos correctly.
2603 (_dbus_marshal_test):
2604 Remove debug output.
2606 * dbus/dbus-message-internal.h:
2607 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2608 New function that returns the reply serial.
2610 (_dbus_message_unlock):
2611 New function that unlocks a message and resets its header.
2613 (dbus_message_append_string_array),
2614 (dbus_message_get_fields_valist),
2615 (dbus_message_iter_get_field_type),
2616 (dbus_message_iter_get_string_array),
2617 (dbus_message_get_fields),
2618 (dbus_message_append_fields_valist):
2619 Handle string arrays.
2621 (dbus_message_set_sender):
2622 Make this function public since the bus daemon needs it.
2624 (decode_header_data):
2625 Set the reply serial to -1 initially.
2627 * dbus/dbus-message.h:
2628 Add dbus_message_set_sender.
2630 2003-01-24 Havoc Pennington <hp@pobox.com>
2632 * doc/dbus-specification.sgml: add some stuff
2634 2003-01-22 Havoc Pennington <hp@pobox.com>
2636 * doc/dbus-specification.sgml: Start to document the protocol.
2638 2003-01-22 Havoc Pennington <hp@pobox.com>
2640 * dbus/dbus-connection.c
2641 (dbus_connection_send_message_with_reply_and_block): add some @todo
2643 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2645 2003-01-21 Havoc Pennington <hp@pobox.com>
2647 (patch untested because can't compile)
2649 * bus/driver.c (create_unique_client_name): make this function
2650 never recycle client names. Also, caller should initialize
2653 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2655 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2657 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2658 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2659 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2660 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2661 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2662 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2663 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2664 * dbus/dbus-marshal.h:
2665 * dbus/dbus-protocol.h:
2666 Add support for marshalling and demarshalling integer, double
2669 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2674 * bus/connection.c: (connection_disconnect_handler):
2675 Remove the connection from the bus driver's list.
2677 (connection_watch_callback): Dispatch messages.
2679 (free_connection_data): Free connection name.
2681 (bus_connection_setup): Add connection to the bus driver's list.
2682 (bus_connection_remove_owned_service):
2683 (bus_connection_set_name), (bus_connection_get_name):
2684 Add functions for setting and getting the connection's name.
2687 Add function headers.
2689 * bus/driver.c: (create_unique_client_name),
2690 (bus_driver_handle_hello_message),
2691 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2692 (bus_driver_add_connection), (bus_driver_remove_connection):
2695 * bus/services.c: (bus_service_free):
2697 New file that handles communication and registreation with the bus
2700 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2702 * dbus/dbus-connection.c: (dbus_connection_send_message):
2703 Add a new client_serial parameter.
2705 (dbus_connection_send_message_with_reply):
2706 Remove a @todo since we've implemented the blocking function.
2708 (dbus_connection_send_message_with_reply_and_block):
2709 New function that sends a message and waits for a reply and
2710 then returns the reply.
2712 * dbus/dbus-connection.h:
2715 * dbus/dbus-errors.c: (dbus_result_to_string):
2716 * dbus/dbus-errors.h:
2717 Add new DBUS_RESULT.
2719 * dbus/dbus-message-internal.h:
2720 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2721 (_dbus_message_set_sender), (dbus_message_write_header),
2722 (dbus_message_new_reply), (decode_header_data),
2723 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2724 * dbus/dbus-message.h:
2725 Add new functions that set the reply serial and sender.
2726 Also marshal and demarshal them correctly and add test.
2728 * dbus/dbus-protocol.h:
2729 Add new DBUS_MESSAGE_TYPE_SENDER.
2732 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2733 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2734 (dbus_connection_hookup_with_g_main):
2735 * glib/test-dbus-glib.c: (main):
2736 Rewrite to use GIOChannel and remove the GSource crack.
2738 * test/echo-client.c: (main):
2739 * test/watch.c: (check_messages):
2740 Update for changed APIs
2742 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2744 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2746 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2747 Create a DBusTimeoutList.
2748 (dbus_connection_set_timeout_functions): Add new function to
2749 set timeout callbacks
2751 * dbus/dbus-connection.h: Add public DBusTimeout API.
2753 * dbus/dbus-message.c: (dbus_message_get_service):
2754 * dbus/dbus-message.h: New function.
2756 * dbus/dbus-server.c: Fix small doc typo.
2758 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2760 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2762 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2763 of the string, just as long as specified.
2765 2003-01-19 Havoc Pennington <hp@pobox.com>
2767 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2770 * dbus/dbus-server.c (dbus_server_set_max_connections)
2771 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2772 keep track of current number of connections, and add API for
2773 setting a max (but haven't implemented enforcing the max yet)
2775 2003-01-18 Havoc Pennington <hp@pobox.com>
2777 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2778 reading/writing if read_watch != NULL or write_watch != NULL.
2780 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2781 the message loader code to actually load message->header and
2782 message->body into the newly-created message.
2784 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2787 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2788 (dbus_connection_get_max_message_size)
2789 (dbus_connection_set_max_live_messages_size)
2790 (dbus_connection_get_max_live_messages_size): implement some
2791 resource limitation functions
2793 * dbus/dbus-resources.c: new file implementing some of the
2794 resource limits stuff
2796 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2797 missing docs, add @todo to handle OOM etc.
2799 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2802 2003-01-18 Havoc Pennington <hp@pobox.com>
2804 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2805 connection if it hasn't been already.
2807 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2808 replace with DisconnectFunction.
2810 2003-01-18 Havoc Pennington <hp@pobox.com>
2812 Building --disable-verbose-mode --disable-asserts --disable-tests
2813 cuts the library from 112K to 45K or so
2815 * configure.in: check for varargs macro support,
2816 add --enable-verbose-mode, --enable-asserts.
2818 * dbus/dbus-internals.h (_dbus_assert): support
2820 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2822 2003-01-18 Havoc Pennington <hp@pobox.com>
2824 * dbus/dbus-test.c: include config.h so that tests actually run
2826 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2827 so the failure mode when that assumption fails will be plenty
2830 2003-01-18 Havoc Pennington <hp@pobox.com>
2832 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2834 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2837 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2838 since we don't want to use those in make check
2840 2003-01-15 Havoc Pennington <hp@redhat.com>
2846 2003-01-15 Havoc Pennington <hp@redhat.com>
2848 * test/Makefile.am: fix so that test source code ends up in the
2849 distribution on make distcheck
2851 2003-01-15 Havoc Pennington <hp@redhat.com>
2857 2003-01-15 Havoc Pennington <hp@redhat.com>
2859 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2860 fix build when --disable-tests
2862 * Makefile.am (EXTRA_DIST): put HACKING in here
2864 * HACKING: document procedure for making a tarball release.
2866 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2868 * bus/connection.c: (connection_error_handler),
2869 (bus_connection_setup):
2870 * bus/main.c: (main):
2871 Make sure that the DBusConnectionData struct is NULLed
2872 out to prevent a segfault.
2874 * dbus/dbus-errors.c: (dbus_result_to_string):
2875 * dbus/dbus-errors.h:
2876 * dbus/dbus-message.c: (dbus_message_get_fields),
2877 (dbus_message_get_fields_valist), (_dbus_message_test):
2878 * dbus/dbus-message.h:
2879 Make dbus_message_get_fields return a result code so we can
2880 track invalid fields as well as oom.
2882 2003-01-11 Havoc Pennington <hp@pobox.com>
2884 * configure.in: change --enable-test/--enable-ansi action-if-given
2885 to enable_foo=$enableval instead of enable_foo=yes
2887 2003-01-08 Havoc Pennington <hp@pobox.com>
2889 * dbus/dbus-string.c (_dbus_string_align_length): new function
2891 * dbus/dbus-test-main.c: move main() for test app here
2893 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2894 symbol to run tests, because dbus-test isn't in the main
2897 Code review nitpicks.
2899 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2900 for people with narrow emacs ;-). Assert client_serial was filled
2901 in. Assert message->name != NULL.
2902 (dbus_message_append_fields): have "first_field_type" arg separate
2903 from va list, needed for C++ binding that also uses varargs IIRC
2904 and helps with type safety
2905 (dbus_message_new): add @todo about using DBusString to store
2906 service/name internally
2907 (dbus_message_new): don't leak ->service and ->name on OOM later
2909 (dbus_message_unref): free the service name
2910 (dbus_message_get_fields): same change to varargs
2911 i.e. first_field_type
2912 (_dbus_message_loader_return_buffer): assert that the message data
2913 is aligned (if not it's a bug in our code). Put in verbose griping
2914 about why we set corrupted = TRUE.
2915 (decode_header_data): add FIXME that char* is evil. Was going to
2916 add FIXME about evil locale-specific string.h strncmp, but just
2917 switched to wacky string-as-uint32 optimization. Move check for
2918 "no room for field name" above get_const_data_len() to avoid
2919 assertion failure in get_const_data_len if we have trailing 2
2920 bytes or the like. Check for service and name fields being
2921 provided twice. Don't leak service/name on error. Require field
2922 names to be aligned to 4 bytes.
2924 * dbus/dbus-marshal.c: move byte swap stuff to header
2925 (_dbus_pack_int32): uscore-prefix
2926 (_dbus_unpack_int32): uscore-prefix
2927 (_dbus_unpack_uint32): export
2928 (_dbus_demarshal_string): add @todo complaining about use of
2930 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2931 handling allowing corrupt data to go unchecked
2933 2003-01-08 Havoc Pennington <hp@redhat.com>
2935 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2936 to the select() as needed for authentication. (should be using
2937 _dbus_poll() not select, but for another day)
2939 * dbus/dbus.h: include dbus/dbus-protocol.h
2941 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2943 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2946 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2948 * dbus/dbus-internals.c: (_dbus_type_to_string):
2949 New function that returns a string describing a type.
2951 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2952 * dbus/dbus-marshal.h:
2953 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2954 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2955 (dbus_message_iter_get_byte_array):
2956 * dbus/dbus-message.h:
2957 Add new convenience functions for appending and getting message fields.
2958 Also add demarshalling routines for byte arrays.
2960 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2962 * dbus/dbus-connection-internal.h:
2963 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2964 (_dbus_connection_get_next_client_serial),
2965 (dbus_connection_send_message):
2966 * dbus/dbus-internals.h:
2967 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2968 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2969 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2970 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2971 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2972 (_dbus_verbose_bytes), (_dbus_marshal_test):
2973 * dbus/dbus-marshal.h:
2974 * dbus/dbus-message-internal.h:
2975 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2976 (dbus_message_write_header), (_dbus_message_lock),
2977 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2978 (dbus_message_get_name), (dbus_message_append_int32),
2979 (dbus_message_append_uint32), (dbus_message_append_double),
2980 (dbus_message_append_string), (dbus_message_append_byte_array),
2981 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2982 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2983 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2984 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2985 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2986 (decode_header_data), (_dbus_message_loader_return_buffer),
2987 (message_iter_test), (_dbus_message_test):
2988 * dbus/dbus-message.h:
2989 * dbus/dbus-protocol.h:
2990 * dbus/dbus-test.c: (main):
2992 * glib/test-dbus-glib.c: (message_handler), (main):
2993 * test/echo-client.c: (main):
2994 * test/watch.c: (check_messages):
2995 Make messages sendable and receivable for real.
2997 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2999 * dbus/dbus-marshal.c: (_dbus_marshal_double),
3000 (_dbus_marshal_string), (_dbus_marshal_byte_array):
3001 * dbus/dbus-message.c: (dbus_message_append_int32),
3002 (dbus_message_append_uint32), (dbus_message_append_double),
3003 (dbus_message_append_string), (dbus_message_append_byte_array):
3004 Handle OOM restoration.
3006 2003-01-07 Anders Carlsson <andersca@codefactory.se>
3008 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3009 (_dbus_demarshal_string), (_dbus_marshal_test):
3010 * dbus/dbus-marshal.h:
3011 * dbus/dbus-message.c: (dbus_message_get_name),
3012 Document these functions.
3014 (dbus_message_append_int32), (dbus_message_append_uint32),
3015 (dbus_message_append_double), (dbus_message_append_string),
3016 (dbus_message_append_byte_array):
3017 * dbus/dbus-message.h:
3018 Add functions for adding message fields of different types.
3020 * dbus/dbus-protocol.h:
3021 Add the different types.
3023 2003-01-05 Havoc Pennington <hp@pobox.com>
3025 * bus/connection.c: implement routines for handling connections,
3026 first thing is keeping a list of owned services on each connection
3027 and setting up watches etc.
3029 * bus/services.c: implement a mapping from service names to lists
3032 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3034 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3035 to use static mutexes for global data
3037 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3038 collection of functions to set/get application-specific data
3039 on the DBusConnection.
3041 2003-01-04 Havoc Pennington <hp@pobox.com>
3043 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3044 (_dbus_poll): new function
3046 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3049 * bus/loop.c: initial code for the daemon main loop
3051 2003-01-04 Havoc Pennington <hp@pobox.com>
3053 * test/watch.c (error_handler): make it safe if the error handler
3054 is called multiple times (if we s/error handler/disconnect
3055 handler/ we should just guarantee it's called only once)
3057 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3058 error handler on disconnect (it's quite possible we should
3059 just change the error handler to a "disconnect handler," I'm
3060 not sure we have any other meaningful errors)
3062 * configure.in: check for getpwnam_r
3064 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3065 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3066 mechanism as in SASL spec, using socket credentials
3068 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3069 (_dbus_send_credentials_unix_socket): new function
3071 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3073 (_dbus_write): only check errno if <0 returned
3074 (_dbus_write_two): ditto
3076 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3078 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3079 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3080 (_dbus_marshal_test):
3081 * dbus/dbus-marshal.h:
3082 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3083 to _dbus_marshal_utf8_string. Also fix some tests.
3085 2002-12-28 Harri Porten <porten@kde.org>
3087 * configure.in: added check for C++ compiler and a very cheesy
3088 check for the Qt integration
3090 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3092 * qt/Makefile.am: added
3094 * qt/.cvsignore: added
3096 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3097 latter, added #ifdef QT_THREAD_SUPPORT guard.
3099 * dbus/Makefile.am: added missing headers for make dist
3101 2002-12-28 Kristian Rietveld <kris@gtk.org>
3103 * dbus/Makefile.am: fixup export-symbols-regex.
3105 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3107 * acinclude.m4: Add this file and put the
3108 PKG_CHECK_MODULE macro in it.
3110 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3112 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3113 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3114 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3115 (_dbus_marshal_test):
3116 Make the demarshalling routines align the pos argument.
3117 Add string marshalling tests and fix the obvious bugs
3120 2002-12-26 Havoc Pennington <hp@pobox.com>
3122 * dbus/dbus-auth.c: fixes fixes fixes
3124 * dbus/dbus-transport-unix.c: wire up support for
3125 encoding/decoding data on the wire
3127 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3128 (_dbus_auth_decode_data): append to target string
3129 instead of nuking it.
3131 2002-12-26 Havoc Pennington <hp@pobox.com>
3133 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3134 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3137 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3138 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3139 now). Main point is because I wanted unpack_uint32 to implement
3141 (_dbus_verbose_bytes): new function
3143 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3145 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3146 mechanism to handle a corrupt message stream
3147 (_dbus_message_loader_new): fix preallocation to only prealloc,
3150 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3151 (_dbus_string_test): enhance tests for copy/move and fix the
3154 * dbus/dbus-transport-unix.c: Hold references in more places to
3155 avoid reentrancy problems
3157 * dbus/dbus-transport.c: ditto
3159 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3160 leak reference count in no-message case
3162 * test/watch.c (do_mainloop): handle adding/removing watches
3163 during iteration over the watches. Also, ref the connection/server
3164 stored on a watch, so we don't try to mangle a destroyed one.
3166 * dbus/dbus-transport-unix.c (do_authentication): perform
3169 * dbus/dbus-auth.c (get_state): add a state
3170 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3171 (_dbus_auth_get_unused_bytes): append the unused bytes
3172 to the passed in string, rather than prepend
3174 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3175 the auth conversation DBusAuth
3177 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3178 (_dbus_transport_new_for_domain_socket): when creating a
3179 transport, pass in whether it's a client-side or server-side
3180 transport so we know which DBusAuth to create
3182 2002-12-03 Havoc Pennington <hp@pobox.com>
3184 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3185 _after_ finalizing the derived members
3186 (unix_connection_set): unref watch if we fail to add it
3188 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3189 transport first, so that the connection owned by the
3190 transport will be valid as the transport finalizes.
3192 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3193 if necessary, and remove watches from the connection.
3195 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3197 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3199 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3200 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3201 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3202 (_dbus_marshal_test):
3203 * dbus/dbus-marshal.h:
3204 Add string marshal functions and have the demarshal functions
3205 return the new position.
3207 2002-12-25 Havoc Pennington <hp@pobox.com>
3209 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3210 it is a simple protocol that just maps directly to SASL.
3212 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3213 initial implementation, not actually used yet.
3215 * dbus/dbus-string.c (_dbus_string_find): new function
3216 (_dbus_string_equal): new function
3217 (_dbus_string_base64_encode): new function
3218 (_dbus_string_base64_decode): new function
3220 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3223 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3224 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3225 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3226 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3227 * dbus/dbus-marshal.h:
3228 * dbus/dbus-protocol.h:
3229 * dbus/dbus-test.c: (main):
3231 Add un-optimized marshalling/demarshalling routines.
3233 2002-12-25 Harri Porten <porten@kde.org>
3235 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3237 2002-12-24 Zack Rusin <zack@kde.org>
3239 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3240 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3243 2002-12-24 Havoc Pennington <hp@pobox.com>
3245 * glib/dbus-gthread.c: fix include
3247 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3248 I think glib API needs to change, though, as you don't
3249 want to use DBusMessageFunction, you want to use the
3250 DBusMessageHandler object. Probably
3251 dbus_connection_open_with_g_main_loop()
3252 and dbus_connection_setup_g_main_loop() or something like that
3253 (but think of better names...) that just create a connection
3254 that has watch/timeout functions etc. already set up.
3256 * dbus/dbus-connection.c
3257 (dbus_connection_send_message_with_reply): new function just to
3258 show how the message handler helps us deal with replies.
3260 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3262 * dbus/dbus-string.c (_dbus_string_test): free a string that
3265 * dbus/dbus-hash.c: use memory pools for the hash entries
3266 (rebuild_table): be more paranoid about overflow, and
3267 shrink table when we can
3268 (_dbus_hash_test): reduce number of sprintfs and write
3269 valid C89. Add tests for case where we grow and then
3270 shrink the hash table.
3272 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3274 * dbus/dbus-connection.c (dbus_connection_register_handler)
3275 (dbus_connection_unregister_handler): new functions
3277 * dbus/dbus-message.c (dbus_message_get_name): new
3279 * dbus/dbus-list.c: fix docs typo
3281 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3282 an object representing a handler for messages.
3284 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3287 * glib/dbus-gthread.c: (dbus_gthread_init):
3288 Don't use the gdbus prefix for public functions.
3290 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3294 Add GLib checks and fixup .pc files
3298 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3299 (gdbus_connection_check), (gdbus_connection_dispatch),
3300 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3301 (dbus_connection_gsource_new):
3302 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3303 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3304 * glib/test-dbus-glib.c: (message_handler), (main):
3307 2002-12-15 Harri Porten <porten@kde.org>
3309 * autogen.sh: check for libtoolize before attempting to use it
3311 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3314 * .cvsignore: ignore more stamp files
3316 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3318 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3319 without make install.
3321 2002-12-15 Havoc Pennington <hp@pobox.com>
3323 * dbus/dbus-threads.c: add thread stubs that a higher library
3324 layer can fill in. e.g. the GLib wrapper might fill them in with
3325 GThread stuff. We still need to use this thread API to
3326 thread-safe-ize the library.
3328 2002-12-12 Havoc Pennington <hp@pobox.com>
3330 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3331 below new interfaces and include fewer system headers.
3333 * dbus/dbus-sysdeps.c (_dbus_read): new function
3334 (_dbus_write): new function
3335 (_dbus_write_two): new function
3336 (_dbus_connect_unix_socket): new function
3337 (_dbus_listen_unix_socket): new function
3339 * dbus/dbus-message-internal.h: change interfaces to use
3342 2002-12-11 Havoc Pennington <hp@pobox.com>
3344 * dbus/dbus-types.h: add dbus_unichar
3346 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3348 * dbus/dbus-connection.c (dbus_connection_send_message): return
3351 * dbus/dbus-transport.c: include dbus-watch.h
3353 * dbus/dbus-connection.c: include dbus-message-internal.h
3355 * HACKING: add file with coding guidelines stuff.
3357 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3358 handling here, for security purposes (as in vsftpd). Not actually
3359 using this class yet.
3361 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3362 system/libc usage here, as in vsftpd, for ease of auditing (and
3363 should also simplify portability). Haven't actually moved all the
3364 system/libc usage into here yet.
3366 2002-11-25 Havoc Pennington <hp@pobox.com>
3368 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3369 always print the first verbose message.
3371 2002-11-24 Havoc Pennington <hp@pobox.com>
3373 * test/echo-client.c, test/echo-server.c: cheesy test
3376 * configure.in (AC_CHECK_FUNCS): check for writev
3378 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3381 * dbus/dbus-list.c (_dbus_list_foreach): new function
3383 * dbus/dbus-internals.c (_dbus_verbose): new function
3385 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3386 representing a server that listens for connections.
3388 * dbus/.cvsignore: create
3390 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3391 public API for reporting errors
3393 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3394 public object representing a connection that
3395 sends/receives messages. (Same object used for
3396 both client and server.)
3398 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3399 Basic abstraction for different kinds of stream
3400 that we might read/write messages from.
3402 2002-11-23 Havoc Pennington <hp@pobox.com>
3404 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3407 * dbus/dbus-test.c (main): add list test, and include
3408 dbus-test.h as intended
3410 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3411 (_dbus_hash_table_remove_int): return value indicates
3412 whether the entry existed to remove
3414 * dbus/dbus-list.c: add linked list utility class,
3417 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3420 2002-11-23 Havoc Pennington <hp@pobox.com>
3422 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3423 DBUS_END_DECLS to nothing, that should fix this once and for all
3425 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3427 * dbus/dbus-message.c, dbus/dbus-hash.c:
3428 add some missing @brief
3430 2002-11-23 Havoc Pennington <hp@pobox.com>
3432 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3433 to avoid confusing Doxygen
3435 * dbus/dbus-hash.c: @} not }@
3437 * dbus/dbus-message.c (struct DBusMessage): split out
3440 2002-11-23 Havoc Pennington <hp@pobox.com>
3442 * configure.in: pile on more warning flags if using gcc
3444 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3445 to document static functions
3447 * configure.in: add summary to end of configure so it
3448 looks nice and attractive
3450 * dbus/dbus-hash.c: finish implementation and write unit
3453 * configure.in: add --enable-tests to enable unit tests
3455 * dbus/dbus-test.c: test program to run unit tests
3456 for all files in dbus/*, initially runs a test for
3459 * dbus/dbus-internals.h: file to hold some internal utility stuff
3461 2002-11-22 Havoc Pennington <hp@redhat.com>
3463 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3464 "ported" away from Tcl
3466 * dbus/dbus-types.h: header for types such as dbus_bool_t
3468 2002-11-22 Havoc Pennington <hp@redhat.com>
3470 * dbus/dbus.h: fixups for doc warnings
3472 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3474 (QUIET): make it quiet so we can see warnings
3476 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3478 2002-11-22 Havoc Pennington <hp@redhat.com>
3480 * Makefile.am: include "Doxyfile" target in all-local
3482 * configure.in: generate the Doxyfile
3484 * Doxyfile.in: move Doxyfile here, so we can use
3485 configure to generate a Doxyfile with the right
3488 2002-11-22 Havoc Pennington <hp@redhat.com>
3490 * dbus/dbus-message.c: move inline docs into .c file
3492 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3493 so all docs are under doc/
3494 (MAN_EXTENSION): generate man pages. Use extension
3495 ".3dbus" which matches ".3qt" on my system,
3496 I guess this is OK, I don't know really.
3497 (FILE_PATTERNS): look for .c files not .h, makes sense
3500 2002-11-22 Havoc Pennington <hp@pobox.com>
3502 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3503 because any app can be a server, and any app can be a client,
3504 the bus is a special kind of server.
3506 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3508 * Doxyfile : adding. Still needs Makefile rules to be generated
3509 automatically (just run "doxygen" in the toplevel dir for now to
3512 * dbus/dbus-message.h : Adding sample docs (javadoc since
3513 resembles gtk-doc a little more)
3515 * dbus/dbus.h : Adding sample docs
3517 2002-11-21 Havoc Pennington <hp@redhat.com>
3519 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3520 so we can allow ourselves to include files directly,
3521 instead of having to use dbus.h
3523 * dbus/dbus.h: fill in
3525 * dbus/dbus-message.h: sketch out a sample header file.
3526 Include griping if you include it directly instead of
3529 * dbus/dbus-macros.h: new file with macros for extern "C",
3530 TRUE/FALSE, NULL, etc.
3532 * doc/file-boilerplate.c: put include guards in here
3534 2002-11-21 Havoc Pennington <hp@redhat.com>
3536 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3538 * COPYING: include the GPL as well, and license code
3539 under both AFL and GPL.
3541 2002-11-21 Havoc Pennington <hp@redhat.com>
3543 * acconfig.h: get rid of this
3545 * autogen.sh (run_configure): add --no-configure option
3547 * configure.in: remove AC_ARG_PROGRAM to make
3548 autoconf complain less. add AC_PREREQ.
3549 add AC_DEFINE third arg.
3551 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3554 Fix references so we can distcheck.
3556 2002-11-21 Havoc Pennington <hp@redhat.com>
3558 * Initial module creation