1 2003-04-04 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4 return a "babysitter" object that is used to monitor the status of
5 the spawned process and reap it when required.
7 * test/test-segfault.c, test/test-exit.c,
8 test/test-sleep-forever.c: binaries that do various lame things,
9 used in the test suite.
11 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
13 2003-04-03 Havoc Pennington <hp@pobox.com>
15 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
16 in preparation for modifying it, dbus-sysdeps is getting
19 2003-04-03 Havoc Pennington <hp@redhat.com>
21 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
24 * bus/*.[hc]: adapt to mainloop change
26 2003-04-03 Havoc Pennington <hp@redhat.com>
28 * bus/activation.c (load_directory): fix up memleaks
29 (bus_activation_entry_free): free the entry
31 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
32 we get one from the message bus; fix memleaks.
34 * dbus/dbus-message.c (dbus_set_error_from_message): new function
36 2003-04-03 Havoc Pennington <hp@pobox.com>
38 * bus/config-parser.c (bus_config_parser_unref): free
39 list of mechanisms, bug discovered by test suite enhancements
40 (putting system.conf and session.conf into suite)
42 * test/Makefile.am, test/test-service.c: add placeholder for a
43 test service that we'll activate as part of test suite. Doesn't
46 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
47 setting NULL value, and use system malloc not dbus_malloc()
48 when we have unavoidable memleakage.
50 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
51 didn't work, and support DBUS_BUS_ACTIVATION.
53 * bus/activation.c (child_setup): pass our well-known bus type to
56 * bus/config-parser.c: support <type> to specify well-known type
58 * doc/dbus-specification.sgml: document the env variables to
59 locate well-known buses and find service activator
61 2003-04-02 Havoc Pennington <hp@redhat.com>
63 * test/Makefile.am (all-local): add a rule to copy tests to
64 builddir, so we can have generated tests. Use this to remove the
65 silly hack for testing system.conf and session.conf. Will use this
66 shortly to generate .service files pointing to test binaries.
68 2003-04-02 Havoc Pennington <hp@redhat.com>
70 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
71 current alloc and needed new length, not max of the doubled
72 allocation and needed new length. Also, when building tests,
73 don't do the double-allocation stuff, just realloc every time.
75 2003-04-02 Havoc Pennington <hp@redhat.com>
77 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
79 (_dbus_string_get_dirname): new
80 (_dbus_sysdeps_test): new
81 (_dbus_directory_open): include dirnames in error messages
83 * bus/config-parser.c: interpret <include> and <includedir> and
84 <servicedir> relative to config file location if the given
85 filename is not absolute.
87 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
89 2003-04-02 Havoc Pennington <hp@redhat.com>
91 * bus/connection.c (bus_transaction_send_error_reply): set sender
92 service for the error, and unref the reply on success
94 * bus/activation.c: convert to use BusTransaction so OOM can be
96 (bus_activation_service_created): set sender of the message
98 2003-04-01 Havoc Pennington <hp@redhat.com>
100 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
101 <includedir> (at least mostly)
103 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
104 first, then the user ID
106 2003-04-01 Havoc Pennington <hp@pobox.com>
108 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
111 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
113 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
115 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
116 socket 0777, and unlink any existing socket.
118 * bus/bus.c (bus_context_new): change our UID/GID and fork if
119 the configuration file so specifies; set up auth mechanism
122 * bus/config-parser.c (bus_config_parser_content): add support
123 for <fork> option and fill in code for <auth>
125 * bus/system.conf.in: add <fork/> to default configuration,
126 and limit auth mechanisms to EXTERNAL
128 * doc/config-file.txt (Elements): add <fork>
130 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
131 (_dbus_change_identity): new function
133 2003-03-31 Havoc Pennington <hp@redhat.com>
135 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
136 (_dbus_listen_unix_socket): fix off-by-one error in null
137 termination spotted by Nalin
139 2003-03-31 Havoc Pennington <hp@redhat.com>
141 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
142 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
143 having a real home directory available.
145 2003-03-31 Havoc Pennington <hp@redhat.com>
147 * bus/Makefile.am (install-data-hook): create /var/run/dbus
149 * bus/messagebus.in: add init script for Red Hat /etc/init.d
151 * configure.in: add support for specifying a style of init script
154 2003-03-31 Havoc Pennington <hp@redhat.com>
156 Fix some annoying DBusString API and fix all affected code.
158 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
160 (_dbus_string_get_data): change to return string instead of using
162 (_dbus_string_get_const_data): ditto
163 (_dbus_string_get_data_len): ditto
164 (_dbus_string_get_const_data_len): ditto
166 2003-03-31 Havoc Pennington <hp@redhat.com>
168 * bus/main.c (main): fix up the command line arguments to be nicer
170 2003-03-31 Havoc Pennington <hp@redhat.com>
172 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
173 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
174 final location that lands in the config file
176 * bus/config-loader-expat.c (bus_config_load): fix type of
179 * doc/TODO: remove TODO item for dbus_bus_get()
181 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
183 2003-03-31 Havoc Pennington <hp@pobox.com>
185 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
186 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
187 argument since they are always client side
189 * dbus/dbus-server.c (dbus_server_get_address): new function
191 * bus/main.c (main): take the configuration file as an argument.
193 * test/data/valid-config-files/debug-allow-all.conf: new file to
194 use with dispatch.c tests for example
196 * bus/test-main.c (main): require test data dir
198 * bus/bus.c (bus_context_new): change this to take a
199 configuration file name as argument
201 * doc/config-file.txt (Elements): add <servicedir>
203 * bus/system.conf, bus/session.conf: new files
205 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
206 well-known socket if none set
208 * configure.in: create system.conf and session.conf
210 2003-03-30 Havoc Pennington <hp@pobox.com>
212 * bus/config-parser.c: hacking
214 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
215 to shut down, since it could cause weirdness with the DBusList
218 * dbus/dbus-list.c (_dbus_list_test): add tests for the
219 link-oriented stack routines
220 (alloc_link): free the mempool if the first alloc from it fails
222 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
224 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
226 (_dbus_string_skip_white): new
228 * doc/config-file.txt (Elements): add <includedir>
230 2003-03-28 Havoc Pennington <hp@pobox.com>
232 * dbus/dbus-string.c (_dbus_string_copy_data_len)
233 (_dbus_string_copy_data): new functions
235 2003-03-28 Anders Carlsson <andersca@codefactory.se>
237 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
241 * dbus/dbus-memory.c:
244 2003-03-28 Havoc Pennington <hp@pobox.com>
246 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
247 I think it may have just been superstition. Not sure.
249 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
250 failures that were not being handled.
252 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
254 * dbus/dbus-memory.c: add ability to set number of mallocs in a
255 row that will fail on out-of-memory.
257 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
258 function for testing out-of-memory handling.
260 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
261 allocation functions, they do map exactly to the expat ones.
263 2003-03-27 Havoc Pennington <hp@redhat.com>
265 * bus/config-loader-libxml.c (bus_config_load): add another error
268 2003-03-26 Anders Carlsson <andersca@codefactory.se>
271 Add note about automatic service activation.
273 * doc/dbus-specification.sgml:
274 Rename the specification and clarify a few things.
276 2003-03-26 Anders Carlsson <andersca@codefactory.se>
279 * dbus/dbus-address.c:
281 * dbus/dbus-marshal.c:
282 * dbus/dbus-server-debug-pipe.c:
283 * dbus/dbus-transport-unix.c:
284 Fix documentation warnings.
286 2003-03-26 Havoc Pennington <hp@pobox.com>
288 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
289 after every test so it's quick and easy to see which leaked, and
290 so we test multiple dbus_shutdown() calls
292 * configure.in: change configure.in XML stuff to also support
295 * config-loader-libxml.c: some hacking
297 * config-loader-expat.c: some hacking
299 * config-parser.c: some hacking, plus tests
301 2003-03-25 Havoc Pennington <hp@redhat.com>
303 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
305 * configure.in: add --with-xml option to specify XML library,
306 right now only libxml is supported.
308 * bus/config-loader-libxml.c, config-parser.c: sync some minor
309 nonworking code between home and work, still just stubs
311 2003-03-24 Havoc Pennington <hp@redhat.com>
313 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
316 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
317 NULL argument for "message" if the error is a well-known one,
318 fill in a generic message in this case.
320 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
323 * bus/test.c (bus_test_flush_bus): add
325 * bus/policy.c (bus_policy_test): test code stub
327 2003-03-24 Havoc Pennington <hp@pobox.com>
329 * bus/connection.c (bus_connections_setup_connection): set up
330 the "can this user connect" function, but it always returns
331 TRUE until we have a config file parser so we can have a config
332 file that allows connections.
334 2003-03-23 Havoc Pennington <hp@pobox.com>
336 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
337 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
338 the mutex, so we can check for proper memory management
341 * dbus/dbus-dataslot.c: remove the mutex from
342 DBusDataSlotAllocator and lock it manually when using it,
343 to simplify fitting it into the global slots framework.
345 * dbus/dbus-threads.c (init_static_locks): rework how we're
346 handling global locks so they are easily shut down.
348 * bus/policy.c (bus_policy_append_rule): fix
350 * bus/test-main.c (main): check for memleaks
352 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
353 test suite check for memleaks
355 * dbus/dbus-memory.c: add support in test mode for tracking
356 number of outstanding blocks
358 2003-03-23 Havoc Pennington <hp@pobox.com>
360 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
363 * dbus/dbus-hash.h: add ULONG hash keys
365 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
366 (_dbus_get_group_id): new function
368 2003-03-20 Havoc Pennington <hp@redhat.com>
370 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
372 (dbus_connection_get_unix_user): new function
374 2003-03-20 Havoc Pennington <hp@pobox.com>
376 * bus/connection.c (bus_connection_send_oom_error): assert that
378 (connection_execute_transaction): ditto
379 (bus_connection_preallocate_oom_error): fix to set the sender, and
380 set recipient to the destination service, not the bus driver
382 * bus/policy.c: hacking
384 * dbus/dbus-message.c (dbus_message_service_is): new function
385 (dbus_message_sender_is): new
387 2003-03-19 Havoc Pennington <hp@redhat.com>
389 * bus/policy.c: start sketching code for policy restrictions on
390 what connections can do.
392 2003-03-18 Havoc Pennington <hp@redhat.com>
394 * doc/TODO: some notes on high-level todo items. Little nitpick
395 stuff is all in @todo, so no need to add it here.
397 * doc/config-file.txt: some notes on how config file might look
399 2003-03-18 Anders Carlsson <andersca@codefactory.se>
405 2003-03-17 Havoc Pennington <hp@redhat.com>
407 * dbus/dbus-internals.h: add gcc attributes so that
408 our printf-style functions warn on bad arguments to
411 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
414 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
417 2003-03-17 Havoc Pennington <hp@redhat.com>
419 * bus/test-main.c (main): make it print something as it runs
420 so make check doesn't look stuck
422 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
423 from CVS, now obsolete
425 2003-03-17 Anders Carlsson <andersca@codefactory.se>
427 * bus/dispatch.c: (bus_dispatch):
428 Refetch the service name since it may have been reallocated
429 when dbus_message_set_sender was called.
431 * dbus/dbus-sysdeps.c: (_dbus_accept):
432 Add address and address length variables and use them to stop
433 valgrind from complaining.
435 2003-03-17 Havoc Pennington <hp@pobox.com>
437 All tests pass, no memleaks, no valgrind complaints.
439 * bus/test.c: refcount handler_slot
441 * bus/connection.c (bus_connections_new): refcount
444 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
445 bytes so that auth scripts pass.
447 * bus/dispatch.c: init message_handler_slot so it gets allocated
450 * bus/dispatch.c (message_handler_slot_ref): fix memleak
452 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
453 dealloc server_pipe_hash when no longer used for benefit of
456 * dbus/dbus-auth.c (process_command): memleak fix
458 * bus/dispatch.c (check_hello_message): memleak fix
460 2003-03-16 Havoc Pennington <hp@pobox.com>
462 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
464 2003-03-17 Anders Carlsson <andersca@codefactory.se>
466 * bus/activation.c (bus_activation_activate_service): Append
467 the pending activation entry to the list of pending activations.
469 2003-03-16 Havoc Pennington <hp@pobox.com>
471 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
474 * dbus/dbus-address.c (create_entry): fix OOM handling when
475 failing to alloc entry->method
477 2003-03-16 Havoc Pennington <hp@pobox.com>
479 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
482 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
483 add some missing dbus_set_result
485 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
486 alloc the DBusMessageHandler
488 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
489 the transport here, since we call this from the finalizer; it
490 resulted in a double-finalize.
492 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
493 where we tried to use transport->connection that was NULL,
494 happened when transport was disconnected early on due to OOM
496 * bus/*.c: adapt to handle OOM for watches/timeouts
498 * dbus/dbus-transport-unix.c: port to handle OOM during
501 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
502 reference to unused bytes instead of a copy
504 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
507 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
510 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
513 2003-03-16 Anders Carlsson <andersca@codefactory.se>
515 * doc/dbus-specification.sgml:
516 Document reply message for ActivateService.
518 2003-03-16 Anders Carlsson <andersca@codefactory.se>
520 * bus/activation.c: (bus_pending_activation_entry_free),
521 (bus_pending_activation_free), (bus_activation_new),
522 (bus_activation_unref), (bus_activation_service_created),
523 (bus_activation_activate_service):
525 * bus/bus.c: (bus_context_new):
526 * bus/desktop-file.c: (new_section):
527 * bus/driver.c: (bus_driver_send_service_deleted),
528 (bus_driver_handle_activate_service):
529 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
531 * dbus/dbus-connection.c:
532 (dbus_connection_send_with_reply_and_block):
533 * dbus/dbus-message.c: (dbus_message_append_args_valist):
534 * dbus/dbus-protocol.h:
535 Make activation work better. Now pending activations will be queued
536 and the daemon won't try to activate services that are already registered.
538 2003-03-16 Havoc Pennington <hp@pobox.com>
540 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
543 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
544 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
546 2003-03-16 Havoc Pennington <hp@pobox.com>
548 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
549 this. always run the test suite before commit...
551 * bus/*: adapt to DBusConnection API changes
553 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
554 requires renaming stuff to avoid dbus_connection_dispatch name
557 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
560 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
561 separate from _dbus_message_loader_return_buffer()
563 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
564 this, because it's now always broken to use; the number of
565 messages in queue vs. the number still buffered by the message
566 loader is undefined/meaningless. Should use
567 dbus_connection_get_dispatch_state().
568 (dbus_connection_dispatch): rename from
569 dbus_connection_dispatch_message
571 2003-03-16 Havoc Pennington <hp@pobox.com>
573 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
576 2003-03-16 Anders Carlsson <andersca@codefactory.se>
578 * dbus/dbus-connection.c:
579 (dbus_connection_send_with_reply_and_block):
580 Decrease connection->n_incoming when removing an entry
582 * dbus/dbus-dict.c: (dbus_dict_entry_free),
583 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
584 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
585 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
586 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
587 (dbus_dict_get_byte_array):
588 Handle NULL arrays and strings. Also add support for byte arrays.
590 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
591 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
592 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
593 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
594 (_dbus_demarshal_dict), (demarshal_and_validate_len),
595 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
596 * dbus/dbus-marshal.h:
597 Add support for marshalling and demarshalling empty arrays and strings.
599 * dbus/dbus-message.c: (dbus_message_append_args_valist),
600 (dbus_message_append_string_array),
601 (dbus_message_iter_get_boolean),
602 (dbus_message_iter_get_boolean_array),
603 (dbus_message_iter_get_int32_array),
604 (dbus_message_iter_get_uint32_array),
605 (dbus_message_iter_get_double_array),
606 (dbus_message_iter_get_byte_array),
607 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
608 (check_message_handling):
609 Add support for getting empty arrays and dicts.
611 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
612 Don't do any validation at all for now, that's better than just checking
615 * test/data/valid-messages/emptiness.message:
616 New test message with lots of empty arrays.
618 2003-03-16 Havoc Pennington <hp@pobox.com>
620 * dbus/dbus-connection.c
621 (_dbus_connection_queue_received_message_link): new function that
622 can't fail due to OOM
624 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
625 new function pops a message together with a list link
628 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
629 message queuing functions to avoid needing to alloc memory
631 2003-03-16 Havoc Pennington <hp@pobox.com>
633 Oops - test code was only testing failure of around 30 of the
634 mallocs in the test path, but it turns out there are 500+
635 mallocs. I believe this was due to misguided linking setup such
636 that there was one copy of dbus_malloc etc. in the daemon and one
637 in the shared lib, and only daemon mallocs were tested. In any
638 case, the test case now tests all 500+ mallocs, and doesn't pass
639 yet, though there are lots of fixes in this patch.
641 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
642 this so that it doesn't need to allocate memory, since it
643 has no way of indicating failure due to OOM (and would be
646 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
648 * bus/Makefile.am: rearrange to create two self-contained
649 libraries, to avoid having libraries with overlapping symbols.
650 that was resulting in weirdness, e.g. I'm pretty sure there
651 were two copies of global static variables.
653 * dbus/dbus-internals.c: move the malloc debug stuff to
656 * dbus/dbus-list.c (free_link): free list mempool if it becomes
659 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
661 * dbus/dbus-address.c (dbus_parse_address): free list nodes
664 * bus/dispatch.c (bus_dispatch_add_connection): free
665 message_handler_slot when no longer using it, so
666 memory leak checkers are happy for the test suite.
668 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
670 * bus/bus.c (new_connection_callback): disconnect in here if
671 bus_connections_setup_connection fails.
673 * bus/connection.c (bus_connections_unref): fix to free the
675 (bus_connections_setup_connection): if this fails, don't
676 disconnect the connection, just be sure there are no side
679 * dbus/dbus-string.c (undo_alignment): unbreak this
681 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
683 (_dbus_auth_new): fix the order in which we free strings
686 * bus/connection.c (bus_connection_disconnected): fix to
687 not send ServiceDeleted multiple times in case of memory
690 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
691 get the base service name
692 (dbus_bus_register_client): don't return base service name,
693 instead store it on the DBusConnection and have an accessor
695 (dbus_bus_register_client): rename dbus_bus_register()
697 * bus/dispatch.c (check_hello_message): verify that other
698 connections on the bus also got the correct results, not
699 just the one sending hello
701 2003-03-15 Havoc Pennington <hp@pobox.com>
703 Make it pass the Hello handling test including all OOM codepaths.
704 Now to do other messages...
706 * bus/services.c (bus_service_remove_owner): fix crash when
707 removing owner from an empty list of owners
708 (bus_registry_ensure): don't leave service in the list of
709 a connection's owned services if we fail to put the service
712 * bus/connection.c (bus_connection_preallocate_oom_error): set
713 error flag on the OOM error.
715 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
716 handle _dbus_transport_set_connection failure
718 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
719 to create watches up front and simply enable/disable them as
721 (unix_connection_set): this can now fail on OOM
723 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
724 of enabling/disabling a watch or timeout.
726 * bus/loop.c (bus_loop_iterate): don't touch disabled
729 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
731 2003-03-15 Havoc Pennington <hp@pobox.com>
733 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
734 write useful test code, after all that futzing around ;-)
736 Test does not yet pass because we can't handle OOM in
737 _dbus_transport_messages_pending (basically,
738 dbus_connection_preallocate_send() does not prealloc the write
739 watch). To fix this, I think we need to add new stuff to
740 set_watch_functions, namely a SetEnabled function so we can alloc
741 the watch earlier, then enable it later.
743 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
744 dbus-memory.c to the convenience lib
746 * bus/test.c: rename some static functions to keep them clearly
747 distinct from stuff in connection.c. Handle client disconnection.
749 2003-03-14 Havoc Pennington <hp@pobox.com>
751 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
752 transport, tests more of the real codepath. Set up clients
753 with bus_setup_debug_client.
755 * bus/test.c (bus_setup_debug_client): function to set up debug
756 "clients" on the main loop
758 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
761 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
764 * dbus/dbus-server-debug.c: support a debug server based on pipes
766 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
767 (_dbus_close): new function
769 * configure.in: check for socketpair
771 2003-03-14 Havoc Pennington <hp@redhat.com>
773 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
776 * dbus/dbus-transport-debug.c: rework this a good bit to be
777 less complicated. hopefully still works.
779 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
782 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
785 * dbus/dbus-message.c (dbus_message_copy): rename from
786 dbus_message_new_from_message, fix it up to copy
787 all the message fields, add test case
789 * bus/dispatch.c (bus_dispatch_test): add some more test code,
790 not quite passing yet
792 2003-03-14 Havoc Pennington <hp@pobox.com>
794 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
795 until no work remains" in test code. (the large diff here
796 is just code movement, no actual changes)
798 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
799 1, no point waiting around for test code.
800 (_dbus_server_debug_accept_transport): unref the timeout
801 after adding it (right?)
803 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
805 2003-03-13 Havoc Pennington <hp@redhat.com>
807 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
810 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
813 * dbus/dbus-connection.h: Make AddWatchFunction and
814 AddTimeoutFunction return a bool so they can fail on out-of-memory
816 * bus/bus.c (bus_context_new): set up timeout handlers
818 * bus/connection.c (bus_connections_setup_connection): set up
821 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
824 * bus/bus.c (bus_context_new): adapt to changes
826 * bus/connection.c: adapt to changes
828 * test/watch.c: adapt to DBusWatch changes
830 * bus/dispatch.c (bus_dispatch_test): started adding this but
833 2003-03-14 Anders Carlsson <andersca@codefactory.se>
835 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
837 2003-03-13 Havoc Pennington <hp@pobox.com>
839 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
840 set up a test framework as for the library
842 2003-03-12 Havoc Pennington <hp@pobox.com>
844 Throughout: purge global variables, introduce BusActivation,
845 BusConnections, BusRegistry, etc. objects instead.
847 * bus/bus.h, bus/bus.c: introduce BusContext as a global
850 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
851 going to redo this a bit differently I think
853 2003-03-12 Havoc Pennington <hp@redhat.com>
855 Mega-patch that gets the message bus daemon initially handling
856 out-of-memory. Work still needed. Also lots of random
857 moving stuff to DBusError instead of ResultCode.
859 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
861 * dbus/dbus-connection.c
862 (dbus_connection_send_with_reply_and_block): use DBusError
864 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
867 * dbus/dbus-connection.c (dbus_connection_send): drop the result
868 code here, as the only failure possible is OOM.
870 * bus/connection.c (bus_connection_disconnect):
871 rename bus_connection_disconnected as it's a notification only
873 * bus/driver.c (bus_driver_handle_acquire_service): don't free
874 "name" on get_args failure, should be done by get_args;
875 don't disconnect client for bad args, just return an error.
876 (bus_driver_handle_service_exists): ditto
878 * bus/services.c (bus_services_list): NULL-terminate returned array
880 * bus/driver.c (bus_driver_send_service_lost)
881 (bus_driver_send_service_acquired): send messages from driver to a
882 specific client to the client's unique name, not to the broadcast
885 * dbus/dbus-message.c (decode_header_data): reject messages that
886 contain no name field
887 (_dbus_message_get_client_serial): rename to
888 dbus_message_get_serial and make public
889 (_dbus_message_set_serial): rename from set_client_serial
890 (_dbus_message_set_reply_serial): make public
891 (_dbus_message_get_reply_serial): make public
893 * bus/connection.c (bus_connection_foreach): allow stopping
894 iteration by returning FALSE from foreach function.
896 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
897 (dbus_connection_free_preallocated_send)
898 (dbus_connection_preallocate_send): new API for sending a message
899 without possibility of malloc failure.
900 (dbus_connection_send_message): rename to just
901 dbus_connection_send (and same for whole function family)
903 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
905 * dbus/dbus-sysdeps.c (_dbus_exit): new function
907 * bus/activation.c: handle/return errors
909 * dbus/dbus-errors.h: add more DBUS_ERROR #define
911 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
912 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
913 (_dbus_result_from_errno): move to this file
915 2003-03-10 Anders Carlsson <andersca@codefactory.se>
917 * dbus/dbus-marshal.c:
918 (_dbus_marshal_set_string):
919 Take a length argument so we can marshal the correct string
922 (_dbus_marshal_dict), (_dbus_demarshal_dict),
923 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
924 (_dbus_marshal_test):
925 * dbus/dbus-marshal.h:
926 Add support for marshalling and demarshalling dicts.
928 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
929 Add support for TYPE DICT.
931 * dbus/dbus-message.c: (set_string_field):
932 Adjust header padding.
934 (dbus_message_append_args_valist), (dbus_message_append_dict),
935 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
936 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
937 (check_message_handling), (check_have_valid_message):
938 * dbus/dbus-message.h:
939 Add functions for setting and getting dicts.
941 * dbus/dbus-protocol.h:
947 * doc/dbus-specification.sgml:
948 Add information about how dicts are marshalled.
950 * test/data/invalid-messages/dict-with-nil-value.message:
951 * test/data/invalid-messages/too-short-dict.message:
952 * test/data/valid-messages/dict-simple.message:
953 * test/data/valid-messages/dict.message:
954 Add sample messages containing dicts.
956 2003-03-08 Anders Carlsson <andersca@codefactory.se>
958 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
960 2003-03-07 Anders Carlsson <andersca@codefactory.se>
963 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
964 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
965 (dbus_dict_set_int32), (dbus_dict_set_uint32),
966 (dbus_dict_set_double), (dbus_dict_set_string),
967 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
968 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
969 (dbus_dict_set_string_array), (_dbus_dict_test):
971 Fix according to comments from Havoc.
973 2003-03-06 Michael Meeks <michael@server.home>
975 * configure.in: if we don't have kde-config, disable have_qt.
977 2003-03-07 Anders Carlsson <andersca@codefactory.se>
982 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
983 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
984 (dbus_dict_remove), (dbus_dict_get_value_type),
985 (dbus_dict_get_keys), (dbus_dict_put_boolean),
986 (dbus_dict_put_int32), (dbus_dict_put_uint32),
987 (dbus_dict_put_double), (dbus_dict_put_string),
988 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
989 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
990 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
991 (dbus_dict_get_int32), (dbus_dict_get_uint32),
992 (dbus_dict_get_double), (dbus_dict_get_string),
993 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
994 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
995 (dbus_dict_get_string_array), (_dbus_dict_test):
997 Add DBusDict implementation
999 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
1003 2003-03-04 Havoc Pennington <hp@pobox.com>
1005 * test/data/auth/*: adapt to changes
1007 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
1008 USERID_BASE64 and change USERNAME_BASE64 to put in username not
1011 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
1012 more stuff from being in a context name, to make the protocol
1013 simpler to deal with
1015 * dbus/dbus-errors.c (dbus_error_has_name): new function
1016 (dbus_error_is_set): new function
1018 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
1019 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
1021 * dbus/dbus-connection.c (dbus_connection_flush): also read
1022 messages during a flush operation
1024 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1026 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1028 * configure.in: Check for gethostbyname on Solaris.
1030 * dbus/dbus-transport.c: (_dbus_transport_open):
1031 Remove duplicate "tcp" entry.
1033 * doc/dbus-specification.sgml:
1034 Clarify some things.
1036 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1038 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1039 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1040 (_dbus_keyring_test):
1041 * dbus/dbus-md5.c: (_dbus_md5_compute):
1042 * dbus/dbus-sha.c: (_dbus_sha_compute):
1045 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1047 * README: Add some things.
1049 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1051 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1052 after case DBUS_TYPE_BOOELAN.
1054 2003-03-02 Havoc Pennington <hp@pobox.com>
1056 * test/break-loader.c (randomly_set_extreme_ints): add test that
1057 sets really huge and small integers
1059 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1060 that length of boolean array fits in the string, and that
1061 string has room for boolean value in single-bool case.
1063 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1064 optional value to "ALIGN" command which is what to fill the
1067 * test/data/valid-messages/no-padding.message: add regression
1068 test for the message padding problem
1070 2003-03-02 Havoc Pennington <hp@pobox.com>
1072 * dbus/dbus-message.c (decode_header_data): fix to always init
1073 message_padding, from Benjamin Dauvergne
1075 2003-03-02 Havoc Pennington <hp@pobox.com>
1081 2003-03-01 Joe Shaw <joe@assbarn.com>
1083 * configure.in: Check for "struct cmsgcred" and try to access its
1084 members for BSD-like unices.
1086 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1087 _dbus_read_credentials_unix_socket().
1088 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1089 read() for reading the credential byte off the unix socket. Use
1090 struct cmsgcred on systems that support it.
1092 2003-02-27 Alexander Larsson <alexl@redhat.com>
1096 Make gthreads-2.0 dependency optional. Don't build thread test if
1099 2003-02-27 Havoc Pennington <hp@pobox.com>
1101 * dbus/dbus-connection.c
1102 (dbus_connection_send_message_with_reply_and_block): fix doh!
1103 doh! doh! bug that resulted in never removing a reply from the
1104 queue, no wonder we called get_reply_serial so much ;-)
1106 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1107 and client serial instead of demarshaling them every time
1109 2003-02-27 Havoc Pennington <hp@pobox.com>
1111 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1112 more inlined, using dbus-string-private.h, speeds things up
1115 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1116 when freeing the string
1117 (_dbus_string_steal_data): fix for align offset
1118 (undo_alignment): new function
1120 2003-02-26 Havoc Pennington <hp@redhat.com>
1122 All kinds of audit fixes from Owen, plus initial attempt to
1123 handle unaligned memory returned from malloc.
1125 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1126 leave room for align_offset and nul byte
1127 (fixup_alignment): function to track an align_offset and
1128 ensure real->str is aligned
1129 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1130 to allow a nul byte plus align offset
1131 (_dbus_string_lock): fix overflow issue
1132 (_dbus_string_init_const_len): add assertions on sanity of len,
1133 assign allocated to be ALLOCATION_PADDING larger than len
1134 (set_length): fixup the overflow handling
1135 (_dbus_string_get_data_len): fix overflow in assertion
1136 (open_gap): detect overflow in size of gap to be opened
1137 (_dbus_string_lengthen): add overflow check
1138 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1139 (_dbus_string_append): add overflow check
1140 (_dbus_string_append_unichar): overflow
1141 (_dbus_string_delete): fix overflow in assertion
1142 (_dbus_string_copy_len): overflow in assertion
1143 (_dbus_string_replace_len): overflows in assertions
1144 (_dbus_string_find): change to implement in terms of
1145 _dbus_string_find_to
1146 (_dbus_string_find_to): assorted fixage
1147 (_dbus_string_equal_c_str): assert c_str != NULL,
1148 fix logic so the function works
1149 (_dbus_string_ends_with_c_str): fix overflow thingy
1150 (_dbus_string_base64_encode): overflow fix
1151 (_dbus_string_validate_ascii): overflow
1152 (_dbus_string_validate_nul): overflow
1154 2003-02-26 Havoc Pennington <hp@redhat.com>
1156 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1158 2003-02-26 Alexander Larsson <alexl@redhat.com>
1161 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1163 * dbus/dbus-connection.c:
1164 * dbus/dbus-connection.h:
1165 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1166 Add dbus_connection_set_wakeup_main_function and use it when queueing
1167 incoming and outgoing messages.
1170 * dbus/dbus-dataslot.c:
1171 Threadsafe usage of DBusDataSlotAllocator
1173 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1176 * dbus/dbus-server-unix.c:
1179 * glib/dbus-gmain.c:
1180 Implement the new wakeup functions for glib.
1183 * glib/test-thread-client.c:
1184 * glib/test-thread-server.c:
1185 * glib/test-thread.h:
1186 Initial cut at some thread test code. Not really done yet.
1188 2003-02-26 Havoc Pennington <hp@pobox.com>
1190 * dbus/dbus-connection.c
1191 (dbus_connection_send_message_with_reply_and_block): fix crash
1192 where we ref'd the outgoing message instead of the returned reply
1194 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1195 at the end of this function, so if we didn't need to read for
1196 authentication, we reinstall it for receiving messages
1198 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1199 a NULL sender for peer-to-peer case
1201 * dbus/dbus-transport-unix.c (check_read_watch): handle
1202 !authenticated case correctly
1204 * glib/dbus-gmain.c: add support for DBusServer
1206 * dbus/dbus-server.c: add data slot support
1208 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1209 return values and handle errors
1211 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1214 * Doxyfile.in (INPUT): add glib subdir
1216 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1217 setup_with_g_main instead of hookup_with_g_main; write docs
1219 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1221 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1222 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1223 * dbus/dbus-message.c: (dbus_message_append_boolean),
1224 (dbus_message_append_boolean_array),
1225 (dbus_message_get_args_valist), (_dbus_message_test):
1226 * dbus/dbus-message.h:
1227 * doc/dbus-specification.sgml:
1228 Various fixes as pointed out by Havoc.
1230 * test/data/invalid-messages/bad-boolean-array.message:
1231 * test/data/invalid-messages/bad-boolean.message:
1232 Add invalid boolean value test cases.
1234 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1236 * dbus/dbus-internals.c: (_dbus_type_to_string):
1237 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1238 (_dbus_marshal_validate_arg):
1239 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1240 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1241 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1242 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1243 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1244 (dbus_message_iter_get_double),
1245 (dbus_message_iter_get_boolean_array), (message_iter_test):
1246 * dbus/dbus-message.h:
1247 * dbus/dbus-protocol.h:
1248 * doc/dbus-specification.sgml:
1249 * test/data/valid-messages/lots-of-arguments.message:
1250 Add support for boolean and boolean array types.
1252 2003-02-23 Havoc Pennington <hp@pobox.com>
1254 * dbus/dbus-keyring.c: finish most of this implementation and
1257 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1258 these barf if the error isn't cleared to NULL
1260 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1261 (_dbus_create_directory): new function
1263 * dbus/dbus-errors.c (dbus_set_error): fix warning
1265 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1266 (_dbus_string_hex_decode): new function
1267 (test_hex_roundtrip): test code
1269 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1271 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1273 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1274 the save-to-temp/rename trick to atomically write the new file
1275 (_dbus_string_parse_uint): new function
1277 2003-02-22 Havoc Pennington <hp@pobox.com>
1279 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1281 2003-02-22 Havoc Pennington <hp@pobox.com>
1283 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1284 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1286 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1288 * dbus/test/data/sha-1: add US government test suite for SHA-1
1290 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1292 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1293 Make string arrays NULL-terminated.
1295 * dbus/dbus-memory.c: (dbus_free_string_array):
1296 * dbus/dbus-memory.h:
1297 New function for freeing NULL-terminated string arrays.
1299 * dbus/dbus-message-builder.c: (append_quoted_string),
1300 (_dbus_message_data_load):
1301 Add support for array types.
1303 * dbus/dbus-message.c: (check_message_handling):
1304 Add more types as test cases.
1306 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1307 (_dbus_string_parse_double):
1308 Add the start offset to the end offset.
1310 * test/data/valid-messages/lots-of-arguments.message:
1311 New test message with lots of arguments.
1313 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1315 * dbus/dbus-message.c: (dbus_message_append_nil),
1316 (dbus_message_append_int32), (dbus_message_append_uint32),
1317 (dbus_message_append_double), (dbus_message_append_string),
1318 (dbus_message_append_int32_array),
1319 (dbus_message_append_uint32_array),
1320 (dbus_message_append_double_array),
1321 (dbus_message_append_byte_array),
1322 (dbus_message_append_string_array):
1323 Fix all out-of-memory handling in these functions.
1325 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1327 * dbus/dbus-message.c: (dbus_message_append_nil):
1330 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1332 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1333 (dbus_message_append_nil), (dbus_message_append_int32_array),
1334 (dbus_message_append_uint32_array),
1335 (dbus_message_append_double_array),
1336 (dbus_message_append_byte_array),
1337 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1338 (dbus_message_iter_get_int32_array),
1339 (dbus_message_iter_get_uint32_array),
1340 (dbus_message_iter_get_double_array),
1341 (dbus_message_iter_get_byte_array),
1342 (dbus_message_iter_get_string_array):
1344 * dbus/dbus-message.h:
1345 Add functions for appending and getting arrays.
1347 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1349 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1350 element size at least 8 bytes, fixes mempool tests on
1353 2003-02-20 Alexander Larsson <alexl@redhat.com>
1355 * dbus/dbus-transport-unix.c (unix_do_iteration):
1356 Unlock the connection mutex during a blocking select call.
1357 Add todo about how we need a way to wake up the select.
1359 * dbus/dbus-connection-internal.h:
1360 * dbus/dbus-connection.c:
1361 Add _dbus_connection_lock and _dbus_connection_unlock.
1363 2003-02-19 Havoc Pennington <hp@pobox.com>
1365 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1366 Doxyfile.in, not Doxyfile
1368 * dbus/dbus-keyring.c: do some hacking on this
1370 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1372 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1374 (dbus_set_error): remove dbus_error_init, check for message ==
1375 NULL *before* we sprintf into it, and add @todo about including
1376 system headers in this file
1378 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1380 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1382 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1383 get various bits of user information based on either username
1385 (_dbus_homedir_from_username): new function
1387 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1390 Add check for nonposix getpwnam_r
1392 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1393 Align the pool element size to a sizeof (void *) boundary.
1395 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1396 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1397 General Solaris fixes.
1399 * test/data/valid-messages/simplest-manual.message:
1400 Explicitly state that we want little-endian packing.
1402 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1404 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1406 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1407 Added to create a transport connecting using a tcp/ip socket.
1409 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1410 to a tcp socket at given host and port.
1411 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1414 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1416 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1417 Added to create a server listening on a TCP/IP socket.
1419 2003-02-19 Havoc Pennington <hp@pobox.com>
1421 Throughout: mop up all the Doxygen warnings and undocumented
1424 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1425 to search any paths.
1427 * dbus/dbus-threads.c: move global mutex initializers to
1428 dbus-internals.h, multiple prototypes was confusing doxygen
1429 besides being kind of ugly
1431 * Doxyfile (PREDEFINED): have Doxygen define
1432 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1433 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1434 (do not abuse the feature! it's for stuff like the autogenerated
1435 macros in dbus-md5.c, not just for things you don't feel like
1438 2003-02-18 Havoc Pennington <hp@pobox.com>
1440 * dbus/dbus-string.c (_dbus_string_zero): new function
1442 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1443 wrap it in some dbus-friendly API
1445 * dbus/dbus-types.h: add 16-bit types
1447 2003-02-18 Joe Shaw <joe@assbarn.com>
1449 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1450 credentials from our currently running process.
1451 (get_word): Fix a buglet where we were copying the entire length
1452 instead of relative to our position.
1454 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1455 keys on the stack... it's 640k of data.
1457 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1458 read the credentials byte off the socket, even if we don't have
1460 (_dbus_poll): Implement poll() using select() for systems which
1463 * glib/test-dbus-glib.c (main): Print out an error if no
1464 parameters are given.
1466 * test/data/auth/fallback.auth-script: Added. Tests that a client
1467 can fallback to a secondary auth mechanism if the first fails.
1469 2003-02-18 Havoc Pennington <hp@pobox.com>
1473 2003-02-17 Havoc Pennington <hp@pobox.com>
1475 * doc/dbus-specification.sgml: lots of cosmetic
1476 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1477 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1478 s/server/bus/ (except in authentication section). Add a section
1479 "Message Bus Message Routing"
1481 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1487 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1489 * doc/dbus-specification.sgml:
1490 Specification updates.
1492 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1494 * bus/activation.c: (bus_activation_init), (child_setup),
1495 (bus_activation_activate_service):
1497 * bus/main.c: (main):
1498 Set DBUS_ADDRESS environment variable.
1500 * dbus/dbus-errors.c: (dbus_set_error):
1501 Don't use va_copy since that's a C99 feature.
1503 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1504 (_dbus_spawn_async):
1505 * dbus/dbus-sysdeps.h:
1506 Add child_setup_func to _dbus_spawn_async.
1508 * doc/dbus-specification.sgml:
1509 Update specification.
1511 * test/spawn-test.c: (setup_func), (main):
1514 2003-02-17 Alexander Larsson <alexl@redhat.com>
1516 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1519 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1523 * doc/dbus-test-plan.sgml:
1524 Add test plan document.
1529 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1531 * dbus/dbus-message.c: (decode_header_data),
1532 (_dbus_message_loader_return_buffer):
1533 Set the header padding amount when loading a message.
1535 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1537 * bus/dispatch.c: (send_one_message):
1538 Only send broadcast messages to registered connections.
1540 * dbus/dbus-message.c: (dbus_message_name_is):
1541 * dbus/dbus-message.h:
1542 New convenience function.
1544 * dbus/dbus-transport-debug.c: (do_reading):
1545 Only dispatch one message per run.
1548 * test/bus-test.c: (new_connection_callback), (die),
1549 (test_hello_client1_handler), (test_hello_client2_handler),
1550 (test_hello_replies), (main):
1552 * test/bus-test-loop.[ch]:
1555 2003-02-16 Havoc Pennington <hp@pobox.com>
1557 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1558 backward conditional
1560 2003-02-16 Alexander Larsson <alexl@redhat.com>
1562 * dbus/dbus-connection.c:
1563 Implement sent_message_with_reply. (with_reply_and block is still
1565 Made dispatch_message not lose message if OOM.
1567 * dbus/dbus-errors.h:
1568 Add NoReply error (for reply timeouts).
1570 2003-02-16 Alexander Larsson <alexl@redhat.com>
1572 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1573 Actually free keys and values when destroying hashtable.
1575 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1577 * dbus/dbus-auth.c: (client_try_next_mechanism):
1580 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1581 Return TRUE if there's no thread implementation around.
1583 * glib/dbus-gmain.c: (free_source),
1584 (dbus_connection_hookup_with_g_main):
1585 Make sure to remove the GSource when the connection is finalized.
1587 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1589 * bus/dispatch.c: (bus_dispatch_message_handler):
1590 * dbus/dbus-errors.h:
1591 Return an error if someone tries to send a message to a service
1594 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1596 * bus/activation.c: (load_directory), (bus_activation_init),
1597 (bus_activation_activate_service):
1600 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1601 More work on the activation handling.
1603 * dbus/dbus-errors.h:
1604 Add some error messages
1606 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1607 * dbus/dbus-message.h:
1608 New function that creates an error message.
1610 * dbus/dbus-protocol.h:
1611 Add ACTIVATE_SERVER message.
1613 * dbus/dbus-server-unix.c: (unix_handle_watch),
1614 (_dbus_server_new_for_domain_socket):
1615 Call _dbus_fd_set_close_on_exec.
1617 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1618 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1619 (_dbus_fd_set_close_on_exec):
1620 * dbus/dbus-sysdeps.h:
1621 Add _dbus_fd_set_close_on exec function. Also add function that checks
1622 that all open fds are set to close-on-exec and warns otherwise.
1624 * dbus/dbus-transport-unix.c:
1625 (_dbus_transport_new_for_domain_socket):
1626 Call _dbus_fd_set_close_on_exec.
1628 2003-02-16 Havoc Pennington <hp@pobox.com>
1630 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1631 allow people to avoid setting SIGPIPE to SIG_IGN
1632 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1633 we've been asked not to
1635 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1637 * dbus/dbus-list.c: (_dbus_list_append_link),
1638 (_dbus_list_prepend_link):
1639 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1643 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1646 * bus/activation.c: (bus_activation_entry_free),
1647 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1649 * bus/main.c: (main):
1650 Add simple activation support, doesn't work yet though.
1652 2003-02-15 Zack Rusin <zack@kde.org>
1654 * qt/dbus-qthread.cpp: small casting fix
1656 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1658 * dbus/dbus-errors.c: (dbus_set_error):
1659 * dbus/dbus-errors.h:
1660 Add a few errors and make dbus_set_error void.
1662 * dbus/dbus-sysdeps.c:
1663 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1664 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1665 * dbus/dbus-sysdeps.h:
1666 Add _dbus_spawn_async.
1668 * test/spawn-test.c: (main):
1669 Test for _dbus_spawn_async.
1671 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1673 * dbus/dbus-internals.h:
1674 Fix build without tests.
1676 * dbus/dbus-list.c: (alloc_link):
1677 Fix a segfault when a malloc fails.
1679 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1680 (dbus_malloc0), (dbus_realloc):
1681 Add support for malloc debugging.
1683 2003-02-15 Alexander Larsson <alexl@redhat.com>
1685 * dbus/dbus-threads.c:
1686 * dbus/dbus-threads.h:
1687 Add condvars. Remove static mutext from API.
1688 Implement static mutexes by initializing them from threads_init.
1690 * glib/dbus-gthread.c:
1691 * qt/dbus-qthread.cpp:
1692 Update with the thread api changes.
1697 Turn StaticMutex into normal mutex + init function.
1698 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1699 _dbus_list_append_link, _dbus_list_prepend_link
1702 * dbus/dbus-sysdeps.c:
1703 * dbus/dbus-sysdeps.h:
1704 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1705 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1707 * dbus/dbus-protocol.h:
1708 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1710 * dbus/dbus-message.c:
1711 Make ref/unref atomic.
1714 * dbus/dbus-connection-internal.h:
1715 * dbus/dbus-connection.c:
1716 * dbus/dbus-connection.h:
1718 Change _peek to _borrow,_return & _steal_borrowed.
1719 Change disconnect callback to event.
1720 Make dbus_connection_dispatch_messages reentrant.
1722 * dbus/dbus-transport.c:
1723 Don't ref the connection on calls to the transport
1726 * dbus/dbus-message-handler.c:
1729 * glib/dbus-gmain.c:
1730 Don't use peek_message anymore
1733 * test/debug-thread.c:
1734 * test/debug-thread.h:
1735 Simple thread implementation that asserts() on deadlocks in
1736 single-threaded code.
1739 (main) Call debug_threads_init.
1742 Use disconnect message instead of disconnect callback.
1746 Don't call dbus_connection_set_disconnect_function. Instead export
1747 bus_connection_disconnect.
1750 Call bus_connection_disconnect when we get a disconnected message.
1752 2003-02-15 Havoc Pennington <hp@pobox.com>
1754 * dbus/dbus-message.c (dbus_message_new): fool around with the
1757 2003-02-14 Havoc Pennington <hp@pobox.com>
1759 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1761 * dbus/dbus-memory.c: fail if the debug functions indicate we
1764 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1765 (_dbus_decrement_fail_alloc_counter): debug functions to
1766 simulate memory allocation failures
1768 2003-02-14 Havoc Pennington <hp@pobox.com>
1770 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1773 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1775 * bus/driver.c: (bus_driver_handle_hello):
1777 * bus/services.c: (bus_service_lookup):
1778 Reorder message sending so we get a more sane order.
1780 * test/bus-test.c: (message_handler):
1783 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1785 * bus/driver.c: (bus_driver_send_service_deleted),
1786 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1787 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1788 (bus_driver_send_welcome_message),
1789 (bus_driver_handle_list_services),
1790 (bus_driver_handle_acquire_service),
1791 (bus_driver_handle_service_exists):
1792 * dbus/dbus-bus.c: (dbus_bus_register_client),
1793 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1794 * dbus/dbus-errors.c: (dbus_result_to_string):
1795 * dbus/dbus-errors.h:
1796 * dbus/dbus-message.c: (dbus_message_append_args),
1797 (dbus_message_append_args_valist), (dbus_message_get_args),
1798 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1799 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1800 (dbus_message_iter_get_byte_array),
1801 (dbus_message_iter_get_string_array), (message_iter_test),
1802 (check_message_handling), (_dbus_message_test):
1803 * dbus/dbus-message.h:
1804 * test/bus-test.c: (main):
1805 Change fields to arguments in messages, so that they won't be
1806 confused with header fields.
1808 * glib/test-dbus-glib.c: (main):
1809 Remove append_fields from hello message.
1811 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1813 * dbus/dbus-errors.c:
1814 * dbus/dbus-message.c:
1815 * dbus/dbus-string.c:
1816 Documentation fixes.
1818 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1820 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1822 Implement support for timeouts in dbus-glib.
1824 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1826 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1827 * dbus/dbus-message.c: (process_test_subdir):
1828 * test/break-loader.c: (find_breaks_based_on):
1829 Plug some memory leaks.
1831 2003-02-13 Richard Hult <rhult@codefactory.se>
1833 * bus/main.c: Fix build.
1835 * dbus/dbus-errors.h:
1836 * dbus/dbus-errors.c: Fix copyright for Anders.
1838 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1843 * bus/connection.c: (bus_connection_foreach):
1846 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1847 (unescape_string), (new_section), (parse_section_start),
1848 (parse_key_value), (report_error), (bus_desktop_file_load),
1849 (bus_desktop_file_get_string):
1850 * bus/desktop-file.h:
1851 Use DBusError for error reporting.
1853 * bus/dispatch.c: (send_one_message),
1854 (bus_dispatch_message_handler):
1855 * bus/driver.c: (bus_driver_send_service_deleted),
1856 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1857 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1858 (bus_driver_send_welcome_message),
1859 (bus_driver_handle_list_services),
1860 (bus_driver_handle_acquire_service),
1861 (bus_driver_handle_service_exists):
1862 * bus/loop.c: (bus_loop_run):
1864 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1866 * bus/utils.c: (bus_wait_for_memory):
1868 New files with general utility functions.
1870 * dbus/dbus-internals.h:
1871 Remove _DBUS_HANDLE_OOM.
1873 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1875 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1876 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1877 * dbus/dbus-errors.h:
1878 Add DBusError structure.
1880 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1882 * test/data/valid-messages/standard-acquire-service.message:
1883 * test/data/valid-messages/standard-hello.message:
1884 * test/data/valid-messages/standard-list-services.message:
1885 * test/data/valid-messages/standard-service-exists.message:
1886 Add some standard messages.
1888 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1890 * bus/driver.c: (bus_driver_send_welcome_message),
1891 (bus_driver_handle_list_services),
1892 (bus_driver_handle_acquire_service),
1893 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1894 Update for API changes in libdbus.
1896 * dbus/dbus-message.c: (dbus_message_new_reply):
1897 * dbus/dbus-message.h:
1898 Remove the name argument. The spec states that replies shouldn't
1901 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1903 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1904 (report_error), (bus_desktop_file_load), (lookup_section),
1905 (lookup_line), (bus_desktop_file_get_raw),
1906 (bus_desktop_file_get_string):
1907 * bus/desktop-file.h:
1908 Some fixes, and new functions for getting a key value from a section.
1910 2003-02-13 Havoc Pennington <hp@pobox.com>
1912 * test/data/auth/fail-after-n-attempts.auth-script: new test
1914 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1917 2003-02-13 Havoc Pennington <hp@pobox.com>
1919 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1920 dbus_credentials_match were backward
1922 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1923 NO_CREDENTIALS and ROOT_CREDENTIALS
1925 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1926 into here. Never process more commands after we've reached an
1927 end state; store further data as unused bytes.
1929 * test/data/auth/*: add more auth tests
1931 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1932 command to match exact string and EXPECT_UNUSED to match unused
1935 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1937 2003-02-12 Havoc Pennington <hp@pobox.com>
1939 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1940 \r off of popped lines
1942 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1945 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1948 2003-02-12 Havoc Pennington <hp@pobox.com>
1950 * dbus/Makefile.am: remove break-loader from the build, since it
1953 * configure.in: add --enable-gcov to turn on coverage profiling
1954 flags and disable optimization
1956 2003-02-10 Havoc Pennington <hp@pobox.com>
1958 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1959 initial cut at test framework for DBusAuth from laptop.
1960 Doesn't quite work yet but it compiles and I need to get
1961 it off the 266mhz laptop. ;-)
1963 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1964 fix a memleak in error case
1966 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1969 * bus/desktop-file.c:
1970 * bus/desktop-file.h:
1971 Add a desktop file parser.
1973 2003-02-11 Zack Rusin <zack@kde.org>
1975 * qt/message.[h|cpp]: sample implementation
1976 of the KDE wrapper for DBusMessage
1978 2003-02-09 Zack Rusin <zack@kde.org>
1980 * test/bus-test.c: make_it_compile
1981 * doc/dbus-specification.sgml: minimal semantic fix
1983 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1989 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1992 * dbus/dbus-break-loader.c:
1994 * test/break-loader.c:
1995 Move dbus-break-loader to test/ and rename it to break-loader.
1997 2003-02-02 Havoc Pennington <hp@pobox.com>
1999 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
2000 for code to manage cookies in your home directory
2002 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
2004 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
2005 to authenticate, then disconnect the client.
2007 2003-02-03 Alexander Larsson <alexl@redhat.com>
2009 * dbus/dbus-message.c (dbus_message_append_fields):
2012 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2014 * doc/dbus-specification.sgml:
2015 Update address format section.
2017 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2020 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
2021 (message_handler), (new_connection_callback), (loop_quit),
2025 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2027 * bus/driver.c: (bus_driver_handle_service_exists):
2028 Simplify the code a bit.
2030 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2033 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2036 Add libdbus-daemon.la and link to it.
2038 2003-02-01 James Willcox <jwillcox@gnome.org>
2040 * bus/driver.c: (bus_driver_handle_own_service):
2041 Actually include the service reply code in the message.
2043 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2045 * bus/driver.c: (bus_driver_handle_service_exists):
2046 Don't unref the incoming message.
2048 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2050 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2052 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2054 * dbus/dbus-server.c: (dbus_server_listen):
2055 * dbus/dbus-transport.c: (_dbus_transport_open):
2056 ifdef out the calls to the debug transport and server.
2058 2003-02-02 Alexander Larsson <alexl@redhat.com>
2060 * dbus/dbus-watch.c (dbus_watch_get_flags):
2061 Add note in the docs that ERROR or HANGUP won't be returned
2062 and are assumed always on.
2064 * glib/dbus-gmain.c (add_watch):
2065 Always add IO_ERR | IO_HUP
2067 * dbus/dbus-message.h:
2068 Add semicolon after dbus_message_iter_get_string_array().
2069 Makes qt code build again
2071 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2073 * bus/driver.c: (create_unique_client_name),
2074 (bus_driver_handle_hello):
2075 Don't take a name, just use a numeric id to identify
2079 * dbus/dbus-bus.c: (dbus_bus_register_client),
2080 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2082 Add new convenience functions for communicating with the bus.
2084 * dbus/dbus-message.h:
2086 * dbus/dbus-protocol.h:
2089 2003-02-01 Alexander Larsson <alexl@redhat.com>
2091 * dbus/dbus-message.c (dbus_message_append_fields):
2092 Add some more doc comments.
2094 2003-02-01 Havoc Pennington <hp@pobox.com>
2096 * dbus/dbus-break-loader.c (randomly_modify_length): change
2097 a 4-byte value in the message as if it were a length
2099 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2100 execute bit on saved files
2102 2003-02-01 Havoc Pennington <hp@pobox.com>
2104 * dbus/dbus-break-loader.c (main): new program to find messages
2105 that break the loader.
2107 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2108 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2110 * dbus/dbus-string.c (_dbus_string_set_byte): new
2112 2003-01-31 Havoc Pennington <hp@pobox.com>
2114 * dbus/dbus-message.c: refactor the test code to be more general,
2115 in preparation for writing a "randomly permute test cases to
2116 try to break the loader" program.
2118 2003-01-31 Havoc Pennington <hp@pobox.com>
2120 * doc/dbus-specification.sgml: work on the specification
2122 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2123 the protocol version of the message.
2125 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2126 no longer specifies that.
2127 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2130 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2131 "break" for DBUS_TYPE_NIL, remove @todo
2133 2003-01-31 Havoc Pennington <hp@pobox.com>
2135 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2136 just set_is_error/get_is_error as this is a commonly-used
2137 function, and write docs.
2139 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2141 * dbus/dbus-address.c: (dbus_address_entry_free):
2142 Free key and value lists.
2144 * dbus/dbus-internals.c: (_dbus_type_to_string):
2145 Add the types we didn't have.
2147 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2148 (_dbus_marshal_validate_arg):
2151 * dbus/dbus-message.c: (dbus_message_set_sender):
2152 Remove todo about being able to set sender to NULL.
2154 (dbus_message_set_is_error_reply),
2155 (dbus_message_get_is_error_reply):
2156 * dbus/dbus-message.h:
2159 * dbus/dbus-protocol.h:
2160 Add error reply flag.
2162 * test/data/valid-messages/opposite-endian.message:
2163 Add NIL type to test.
2165 2003-01-31 Havoc Pennington <hp@pobox.com>
2167 * doc/dbus-specification.sgml: fully specify the header. Add
2168 flags and major protocol version, and change header/body len to
2171 * dbus/dbus-message-builder.c (append_saved_length): append length
2174 * dbus/dbus-message.c (dbus_message_create_header): change header
2175 length and body length to unsigned. Add the new fields from the
2177 (_dbus_message_loader_return_buffer): unsigned header/body len
2179 2003-01-30 Havoc Pennington <hp@pobox.com>
2181 * dbus/dbus-auth.c: rework to use only REJECTED, no
2184 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2185 use REJECTED, suggested by Mark McLoughlin
2187 2003-01-30 Havoc Pennington <hp@pobox.com>
2189 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2190 a better way to report errors here. e.g. "unix address lacks
2191 path" or something. also "no such file" when the path doesn't
2194 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2196 (dbus_parse_address): add @todo about documenting address format,
2197 and allowing , and ; to be escaped
2199 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2202 Add dbus-address.[ch]
2204 * dbus/dbus-address.c: (dbus_address_entry_free),
2205 (dbus_address_entries_free), (create_entry),
2206 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2207 (dbus_parse_address), (_dbus_address_test):
2208 * dbus/dbus-address.h:
2209 New files for dealing with address parsing.
2211 * dbus/dbus-connection.c:
2212 Document timeout functions.
2214 * dbus/dbus-message.c:
2215 Document dbus_message_new_from_message.
2217 * dbus/dbus-server-debug.c:
2220 * dbus/dbus-server.c: (dbus_server_listen):
2221 Parse address and use correct server implementation.
2223 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2224 * dbus/dbus-string.h:
2225 New function with test.
2227 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2231 * dbus/dbus-transport-debug.c:
2234 * dbus/dbus-transport.c: (_dbus_transport_open):
2235 Parse address and use correct transport implementation.
2237 2003-01-30 Havoc Pennington <hp@pobox.com>
2239 * dbus/dbus-message.c: use message->byte_order instead of
2240 DBUS_COMPILER_BYTE_ORDER throughout.
2241 (dbus_message_create_header): pad header to align the
2242 start of the body of the message to 8-byte boundary
2244 * dbus/dbus-marshal.h: make all the demarshalers take const
2245 DBusString arguments.
2247 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2248 validate message args here, so we don't have to do slow validation
2249 later, and so we catch bad messages as they are incoming. Also add
2250 better checks on header_len and body_len. Also fill in
2253 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2254 implemented properly)
2255 (_dbus_string_validate_nul): new function to check all-nul
2257 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2258 get_arg_end_pos and remove all validation
2259 (_dbus_marshal_validate_arg): actually do validation here.
2261 2003-01-29 Havoc Pennington <hp@pobox.com>
2263 * dbus/dbus-message.c (check_message_handling): fix assertion
2264 failure on set_client_serial
2266 2003-01-28 Havoc Pennington <hp@pobox.com>
2268 * dbus/dbus-server-debug.c: Add doc section comments
2270 * dbus/dbus-transport-debug.c: add doc section comments
2272 2003-01-28 Havoc Pennington <hp@redhat.com>
2274 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2275 the reverse order from how I had it
2276 (_dbus_string_base64_encode): reverse encoding order. I was
2277 basically byteswapping everything during encoding.
2279 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2281 * dbus/dbus-connection-internal.h:
2282 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2283 (_dbus_connection_remove_timeout):
2284 Add functions for adding and removing timeouts.
2286 * dbus/dbus-message.c: (dbus_message_new_from_message):
2287 Add new function that takes a message and creates an exact
2288 copy of it, but with the refcount set to 1.
2289 (check_message_handling):
2292 * dbus/dbus-server-protected.h:
2293 * dbus/dbus-server.c: (_dbus_server_init_base),
2294 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2295 (dbus_server_set_timeout_functions):
2296 (_dbus_server_remove_timeout):
2297 New functions so that a server can add and remove timeouts.
2299 (dbus_server_listen):
2300 Add commented out call to dbus_server_debug_new.
2302 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2303 Actually set the handler, doh.
2305 * dbus/dbus-transport.c: (_dbus_transport_open):
2306 Add commented out call to dbus_transport_debug_client_new.
2309 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2311 2003-01-28 Havoc Pennington <hp@pobox.com>
2313 * dbus/dbus-message.c (check_message_handling): function to check
2314 on the loaded message, iterates over it etc.
2316 2003-01-28 Havoc Pennington <hp@pobox.com>
2318 * test/Makefile.am (dist-hook): fix make distdir
2320 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2322 2003-01-27 Havoc Pennington <hp@pobox.com>
2324 * dbus/dbus-mempool.c (time_for_size): replace printf with
2327 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2328 empty lines; fix the SAVE_LENGTH stuff to be
2329 START_LENGTH/END_LENGTH so it actually works; couple other
2332 * test/Makefile.am (dist-hook): add dist-hook for .message files
2334 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2335 can be constant or locked.
2336 (_dbus_string_free): allow freeing a const string as
2339 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2341 * dbus/dbus-test-main.c (main): take an argument which is the
2342 directory containing test data
2344 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2345 argument to this and load all the messages in test/data/
2346 checking that they can be loaded or not loaded as appropriate.
2348 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2350 * bus/dispatch.c: (bus_dispatch_message_handler):
2351 Dispatch messages sent to services.
2353 * bus/driver.c: (bus_driver_send_service_deleted),
2354 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2355 (bus_driver_send_service_acquired):
2356 Add helper functions for sending service related messages.
2358 (bus_driver_send_welcome_message):
2359 Send HELLO_REPLY instead of WELCOME.
2361 (bus_driver_handle_list_services):
2362 Send LIST_SERVICES_REPLY instead of SERVICES.
2364 (bus_driver_handle_own_service),
2365 (bus_driver_handle_service_exists):
2366 New message handlers.
2368 (bus_driver_handle_message):
2369 Invoke new message handlers.
2371 (bus_driver_remove_connection):
2372 Don't remove any services here since that's done automatically
2373 by bus_service_remove_owner now.
2376 New function signatures.
2378 * bus/services.c: (bus_service_add_owner):
2379 Send ServiceAcquired message if we're the only primary owner.
2381 (bus_service_remove_owner):
2382 Send ServiceAcquired/ServiceLost messages.
2384 (bus_service_set_prohibit_replacement),
2385 (bus_service_get_prohibit_replacement):
2386 Functions for setting prohibit replacement.
2388 (bus_service_has_owner):
2389 New function that checks if a connection is in the owner queue of
2393 Add new function signatures.
2395 * dbus/dbus-list.c: (_dbus_list_test):
2396 Add tests for _dbus_list_remove_last and traversing the list backwards.
2399 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2400 go any further, so return NULL then.
2402 * dbus/dbus-protocol.h:
2403 Add new messages, service flags and service replies.
2405 2003-01-26 Havoc Pennington <hp@pobox.com>
2407 * dbus/dbus-message-builder.c: implement, completely untested.
2409 * test/data/*: add data to be used in testing.
2410 ".message" files are our simple loadable text format.
2411 ".message-raw" will be binary dumps of messages.
2413 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2415 2003-01-26 Havoc Pennington <hp@pobox.com>
2417 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2419 * dbus/dbus-errors.c (dbus_result_to_string): add
2422 * dbus/dbus-message-builder.c: new file, will contain code to load
2423 up messages from files. Not implemented yet.
2425 2003-01-26 Havoc Pennington <hp@pobox.com>
2427 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2428 the sender by setting to NULL
2430 2003-01-26 Havoc Pennington <hp@pobox.com>
2432 The unit tests pass, but otherwise untested. If it breaks, the
2433 tests should have been better. ;-)
2435 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2438 * dbus/dbus-message.c: redo everything so we maintain
2439 message->header as the only copy of the various fields.
2440 This avoids the possibility of out-of-memory in some cases,
2441 for example dbus_message_lock() can't run out of memory anymore,
2442 and avoids extra copying. Figured I may as well go ahead and do
2443 this since it was busted for dbus_message_lock to not return
2444 failure on OOM, and dbus_message_write_header was totally
2445 unchecked for OOM. Also fixed some random other bugs.
2447 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2448 that strings are nul-terminated. Also, end_pos can be equal
2449 to string length just not greater than, I think.
2450 (_dbus_marshal_set_int32): new function
2451 (_dbus_marshal_set_uint32): new function
2452 (_dbus_marshal_set_string): new function
2454 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2455 a warning, init timeout_list to NULL
2456 (dbus_connection_send_message): don't use uninitialized variable
2459 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2461 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2463 * bus/driver.c: (bus_driver_handle_hello),
2464 (bus_driver_send_welcome_message):
2467 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2469 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2470 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2471 (dbus_connection_unref):
2472 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2473 * dbus/dbus-message.c: (dbus_message_unref),
2476 (dbus_message_get_fields):
2477 Remove debugging printout.
2479 (_dbus_message_loader_return_buffer):
2480 Don't store the header string.
2482 (_dbus_message_test):
2485 2003-01-26 Richard Hult <rhult@codefactory.se>
2487 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2488 the file descriptor list, since it can change under us.
2490 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2492 * glib/dbus-gmain.c: (dbus_connection_prepare),
2493 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2494 (remove_watch), (dbus_connection_hookup_with_g_main):
2495 Rewrite the glib handling to use its own GSource instead of a
2496 GIOChannel so we can catch messages put in the queue while waiting
2499 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2502 * bus/connection.c: (connection_disconnect_handler),
2503 (connection_watch_callback), (bus_connection_setup):
2504 * bus/dispatch.c: (send_one_message),
2505 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2506 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2508 * bus/driver.c: (bus_driver_send_service_deleted),
2509 (bus_driver_send_service_created), (bus_driver_handle_hello),
2510 (bus_driver_send_welcome_message),
2511 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2512 (bus_driver_handle_message):
2514 Refactor code, put the message dispatching in its own file. Use
2515 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2518 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2520 * dbus/dbus-internals.h:
2521 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2523 * dbus/dbus-message.c: (dbus_message_get_sender):
2524 * dbus/dbus-message.h:
2525 Implement dbus_message_get_sender.
2527 * dbus/dbus-protocol.h:
2528 Add message and service defines.
2530 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2532 * dbus/dbus-connection.c: (dbus_connection_send_message):
2533 * dbus/dbus-message-internal.h:
2534 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2535 (dbus_message_write_header):
2536 Remove _dbus_messag_unlock and don't set the client serial on a
2537 message if one already exists.
2539 2003-01-24 Havoc Pennington <hp@pobox.com>
2541 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2544 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2547 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2549 * dbus/dbus-list.c: (alloc_link), (free_link):
2550 Use a memory pool for the links.
2552 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2554 * bus/connection.c: (bus_connection_foreach):
2556 Add new bus_connection_foreach function.
2558 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2559 Add function that broadcasts a message to all clients.
2561 (bus_driver_send_service_created), (bus_driver_handle_hello),
2562 (bus_driver_send_welcome_message),
2563 (bus_driver_handle_list_services), (bus_driver_message_handler):
2564 Implement functions that take care of listing services, and notifying
2565 clients when new services are created.
2567 * bus/services.c: (bus_services_list):
2569 Add new function that returns an array of strings with the currently
2570 registered services.
2573 * glib/dbus-gmain.c:
2574 Update copyright year.
2576 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2578 * dbus/dbus-connection.c: (dbus_connection_send_message):
2579 Unlock the message in case it was sent earlier.
2581 (dbus_connection_send_message_with_reply_and_block):
2582 Remove the reply message from the list.
2584 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2585 Set array_len and new_pos correctly.
2587 (_dbus_marshal_test):
2588 Remove debug output.
2590 * dbus/dbus-message-internal.h:
2591 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2592 New function that returns the reply serial.
2594 (_dbus_message_unlock):
2595 New function that unlocks a message and resets its header.
2597 (dbus_message_append_string_array),
2598 (dbus_message_get_fields_valist),
2599 (dbus_message_iter_get_field_type),
2600 (dbus_message_iter_get_string_array),
2601 (dbus_message_get_fields),
2602 (dbus_message_append_fields_valist):
2603 Handle string arrays.
2605 (dbus_message_set_sender):
2606 Make this function public since the bus daemon needs it.
2608 (decode_header_data):
2609 Set the reply serial to -1 initially.
2611 * dbus/dbus-message.h:
2612 Add dbus_message_set_sender.
2614 2003-01-24 Havoc Pennington <hp@pobox.com>
2616 * doc/dbus-specification.sgml: add some stuff
2618 2003-01-22 Havoc Pennington <hp@pobox.com>
2620 * doc/dbus-specification.sgml: Start to document the protocol.
2622 2003-01-22 Havoc Pennington <hp@pobox.com>
2624 * dbus/dbus-connection.c
2625 (dbus_connection_send_message_with_reply_and_block): add some @todo
2627 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2629 2003-01-21 Havoc Pennington <hp@pobox.com>
2631 (patch untested because can't compile)
2633 * bus/driver.c (create_unique_client_name): make this function
2634 never recycle client names. Also, caller should initialize
2637 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2639 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2641 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2642 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2643 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2644 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2645 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2646 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2647 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2648 * dbus/dbus-marshal.h:
2649 * dbus/dbus-protocol.h:
2650 Add support for marshalling and demarshalling integer, double
2653 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2658 * bus/connection.c: (connection_disconnect_handler):
2659 Remove the connection from the bus driver's list.
2661 (connection_watch_callback): Dispatch messages.
2663 (free_connection_data): Free connection name.
2665 (bus_connection_setup): Add connection to the bus driver's list.
2666 (bus_connection_remove_owned_service):
2667 (bus_connection_set_name), (bus_connection_get_name):
2668 Add functions for setting and getting the connection's name.
2671 Add function headers.
2673 * bus/driver.c: (create_unique_client_name),
2674 (bus_driver_handle_hello_message),
2675 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2676 (bus_driver_add_connection), (bus_driver_remove_connection):
2679 * bus/services.c: (bus_service_free):
2681 New file that handles communication and registreation with the bus
2684 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2686 * dbus/dbus-connection.c: (dbus_connection_send_message):
2687 Add a new client_serial parameter.
2689 (dbus_connection_send_message_with_reply):
2690 Remove a @todo since we've implemented the blocking function.
2692 (dbus_connection_send_message_with_reply_and_block):
2693 New function that sends a message and waits for a reply and
2694 then returns the reply.
2696 * dbus/dbus-connection.h:
2699 * dbus/dbus-errors.c: (dbus_result_to_string):
2700 * dbus/dbus-errors.h:
2701 Add new DBUS_RESULT.
2703 * dbus/dbus-message-internal.h:
2704 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2705 (_dbus_message_set_sender), (dbus_message_write_header),
2706 (dbus_message_new_reply), (decode_header_data),
2707 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2708 * dbus/dbus-message.h:
2709 Add new functions that set the reply serial and sender.
2710 Also marshal and demarshal them correctly and add test.
2712 * dbus/dbus-protocol.h:
2713 Add new DBUS_MESSAGE_TYPE_SENDER.
2716 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2717 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2718 (dbus_connection_hookup_with_g_main):
2719 * glib/test-dbus-glib.c: (main):
2720 Rewrite to use GIOChannel and remove the GSource crack.
2722 * test/echo-client.c: (main):
2723 * test/watch.c: (check_messages):
2724 Update for changed APIs
2726 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2728 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2730 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2731 Create a DBusTimeoutList.
2732 (dbus_connection_set_timeout_functions): Add new function to
2733 set timeout callbacks
2735 * dbus/dbus-connection.h: Add public DBusTimeout API.
2737 * dbus/dbus-message.c: (dbus_message_get_service):
2738 * dbus/dbus-message.h: New function.
2740 * dbus/dbus-server.c: Fix small doc typo.
2742 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2744 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2746 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2747 of the string, just as long as specified.
2749 2003-01-19 Havoc Pennington <hp@pobox.com>
2751 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2754 * dbus/dbus-server.c (dbus_server_set_max_connections)
2755 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2756 keep track of current number of connections, and add API for
2757 setting a max (but haven't implemented enforcing the max yet)
2759 2003-01-18 Havoc Pennington <hp@pobox.com>
2761 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2762 reading/writing if read_watch != NULL or write_watch != NULL.
2764 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2765 the message loader code to actually load message->header and
2766 message->body into the newly-created message.
2768 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2771 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2772 (dbus_connection_get_max_message_size)
2773 (dbus_connection_set_max_live_messages_size)
2774 (dbus_connection_get_max_live_messages_size): implement some
2775 resource limitation functions
2777 * dbus/dbus-resources.c: new file implementing some of the
2778 resource limits stuff
2780 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2781 missing docs, add @todo to handle OOM etc.
2783 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2786 2003-01-18 Havoc Pennington <hp@pobox.com>
2788 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2789 connection if it hasn't been already.
2791 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2792 replace with DisconnectFunction.
2794 2003-01-18 Havoc Pennington <hp@pobox.com>
2796 Building --disable-verbose-mode --disable-asserts --disable-tests
2797 cuts the library from 112K to 45K or so
2799 * configure.in: check for varargs macro support,
2800 add --enable-verbose-mode, --enable-asserts.
2802 * dbus/dbus-internals.h (_dbus_assert): support
2804 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2806 2003-01-18 Havoc Pennington <hp@pobox.com>
2808 * dbus/dbus-test.c: include config.h so that tests actually run
2810 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2811 so the failure mode when that assumption fails will be plenty
2814 2003-01-18 Havoc Pennington <hp@pobox.com>
2816 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2818 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2821 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2822 since we don't want to use those in make check
2824 2003-01-15 Havoc Pennington <hp@redhat.com>
2830 2003-01-15 Havoc Pennington <hp@redhat.com>
2832 * test/Makefile.am: fix so that test source code ends up in the
2833 distribution on make distcheck
2835 2003-01-15 Havoc Pennington <hp@redhat.com>
2841 2003-01-15 Havoc Pennington <hp@redhat.com>
2843 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2844 fix build when --disable-tests
2846 * Makefile.am (EXTRA_DIST): put HACKING in here
2848 * HACKING: document procedure for making a tarball release.
2850 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2852 * bus/connection.c: (connection_error_handler),
2853 (bus_connection_setup):
2854 * bus/main.c: (main):
2855 Make sure that the DBusConnectionData struct is NULLed
2856 out to prevent a segfault.
2858 * dbus/dbus-errors.c: (dbus_result_to_string):
2859 * dbus/dbus-errors.h:
2860 * dbus/dbus-message.c: (dbus_message_get_fields),
2861 (dbus_message_get_fields_valist), (_dbus_message_test):
2862 * dbus/dbus-message.h:
2863 Make dbus_message_get_fields return a result code so we can
2864 track invalid fields as well as oom.
2866 2003-01-11 Havoc Pennington <hp@pobox.com>
2868 * configure.in: change --enable-test/--enable-ansi action-if-given
2869 to enable_foo=$enableval instead of enable_foo=yes
2871 2003-01-08 Havoc Pennington <hp@pobox.com>
2873 * dbus/dbus-string.c (_dbus_string_align_length): new function
2875 * dbus/dbus-test-main.c: move main() for test app here
2877 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2878 symbol to run tests, because dbus-test isn't in the main
2881 Code review nitpicks.
2883 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2884 for people with narrow emacs ;-). Assert client_serial was filled
2885 in. Assert message->name != NULL.
2886 (dbus_message_append_fields): have "first_field_type" arg separate
2887 from va list, needed for C++ binding that also uses varargs IIRC
2888 and helps with type safety
2889 (dbus_message_new): add @todo about using DBusString to store
2890 service/name internally
2891 (dbus_message_new): don't leak ->service and ->name on OOM later
2893 (dbus_message_unref): free the service name
2894 (dbus_message_get_fields): same change to varargs
2895 i.e. first_field_type
2896 (_dbus_message_loader_return_buffer): assert that the message data
2897 is aligned (if not it's a bug in our code). Put in verbose griping
2898 about why we set corrupted = TRUE.
2899 (decode_header_data): add FIXME that char* is evil. Was going to
2900 add FIXME about evil locale-specific string.h strncmp, but just
2901 switched to wacky string-as-uint32 optimization. Move check for
2902 "no room for field name" above get_const_data_len() to avoid
2903 assertion failure in get_const_data_len if we have trailing 2
2904 bytes or the like. Check for service and name fields being
2905 provided twice. Don't leak service/name on error. Require field
2906 names to be aligned to 4 bytes.
2908 * dbus/dbus-marshal.c: move byte swap stuff to header
2909 (_dbus_pack_int32): uscore-prefix
2910 (_dbus_unpack_int32): uscore-prefix
2911 (_dbus_unpack_uint32): export
2912 (_dbus_demarshal_string): add @todo complaining about use of
2914 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2915 handling allowing corrupt data to go unchecked
2917 2003-01-08 Havoc Pennington <hp@redhat.com>
2919 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2920 to the select() as needed for authentication. (should be using
2921 _dbus_poll() not select, but for another day)
2923 * dbus/dbus.h: include dbus/dbus-protocol.h
2925 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2927 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2930 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2932 * dbus/dbus-internals.c: (_dbus_type_to_string):
2933 New function that returns a string describing a type.
2935 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2936 * dbus/dbus-marshal.h:
2937 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2938 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2939 (dbus_message_iter_get_byte_array):
2940 * dbus/dbus-message.h:
2941 Add new convenience functions for appending and getting message fields.
2942 Also add demarshalling routines for byte arrays.
2944 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2946 * dbus/dbus-connection-internal.h:
2947 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2948 (_dbus_connection_get_next_client_serial),
2949 (dbus_connection_send_message):
2950 * dbus/dbus-internals.h:
2951 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2952 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2953 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2954 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2955 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2956 (_dbus_verbose_bytes), (_dbus_marshal_test):
2957 * dbus/dbus-marshal.h:
2958 * dbus/dbus-message-internal.h:
2959 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2960 (dbus_message_write_header), (_dbus_message_lock),
2961 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2962 (dbus_message_get_name), (dbus_message_append_int32),
2963 (dbus_message_append_uint32), (dbus_message_append_double),
2964 (dbus_message_append_string), (dbus_message_append_byte_array),
2965 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2966 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2967 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2968 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2969 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2970 (decode_header_data), (_dbus_message_loader_return_buffer),
2971 (message_iter_test), (_dbus_message_test):
2972 * dbus/dbus-message.h:
2973 * dbus/dbus-protocol.h:
2974 * dbus/dbus-test.c: (main):
2976 * glib/test-dbus-glib.c: (message_handler), (main):
2977 * test/echo-client.c: (main):
2978 * test/watch.c: (check_messages):
2979 Make messages sendable and receivable for real.
2981 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2983 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2984 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2985 * dbus/dbus-message.c: (dbus_message_append_int32),
2986 (dbus_message_append_uint32), (dbus_message_append_double),
2987 (dbus_message_append_string), (dbus_message_append_byte_array):
2988 Handle OOM restoration.
2990 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2992 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2993 (_dbus_demarshal_string), (_dbus_marshal_test):
2994 * dbus/dbus-marshal.h:
2995 * dbus/dbus-message.c: (dbus_message_get_name),
2996 Document these functions.
2998 (dbus_message_append_int32), (dbus_message_append_uint32),
2999 (dbus_message_append_double), (dbus_message_append_string),
3000 (dbus_message_append_byte_array):
3001 * dbus/dbus-message.h:
3002 Add functions for adding message fields of different types.
3004 * dbus/dbus-protocol.h:
3005 Add the different types.
3007 2003-01-05 Havoc Pennington <hp@pobox.com>
3009 * bus/connection.c: implement routines for handling connections,
3010 first thing is keeping a list of owned services on each connection
3011 and setting up watches etc.
3013 * bus/services.c: implement a mapping from service names to lists
3016 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
3018 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
3019 to use static mutexes for global data
3021 * dbus/dbus-connection.c (dbus_connection_set_data): add new
3022 collection of functions to set/get application-specific data
3023 on the DBusConnection.
3025 2003-01-04 Havoc Pennington <hp@pobox.com>
3027 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3028 (_dbus_poll): new function
3030 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3033 * bus/loop.c: initial code for the daemon main loop
3035 2003-01-04 Havoc Pennington <hp@pobox.com>
3037 * test/watch.c (error_handler): make it safe if the error handler
3038 is called multiple times (if we s/error handler/disconnect
3039 handler/ we should just guarantee it's called only once)
3041 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3042 error handler on disconnect (it's quite possible we should
3043 just change the error handler to a "disconnect handler," I'm
3044 not sure we have any other meaningful errors)
3046 * configure.in: check for getpwnam_r
3048 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3049 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3050 mechanism as in SASL spec, using socket credentials
3052 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3053 (_dbus_send_credentials_unix_socket): new function
3055 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3057 (_dbus_write): only check errno if <0 returned
3058 (_dbus_write_two): ditto
3060 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3062 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3063 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3064 (_dbus_marshal_test):
3065 * dbus/dbus-marshal.h:
3066 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3067 to _dbus_marshal_utf8_string. Also fix some tests.
3069 2002-12-28 Harri Porten <porten@kde.org>
3071 * configure.in: added check for C++ compiler and a very cheesy
3072 check for the Qt integration
3074 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3076 * qt/Makefile.am: added
3078 * qt/.cvsignore: added
3080 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3081 latter, added #ifdef QT_THREAD_SUPPORT guard.
3083 * dbus/Makefile.am: added missing headers for make dist
3085 2002-12-28 Kristian Rietveld <kris@gtk.org>
3087 * dbus/Makefile.am: fixup export-symbols-regex.
3089 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3091 * acinclude.m4: Add this file and put the
3092 PKG_CHECK_MODULE macro in it.
3094 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3096 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3097 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3098 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3099 (_dbus_marshal_test):
3100 Make the demarshalling routines align the pos argument.
3101 Add string marshalling tests and fix the obvious bugs
3104 2002-12-26 Havoc Pennington <hp@pobox.com>
3106 * dbus/dbus-auth.c: fixes fixes fixes
3108 * dbus/dbus-transport-unix.c: wire up support for
3109 encoding/decoding data on the wire
3111 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3112 (_dbus_auth_decode_data): append to target string
3113 instead of nuking it.
3115 2002-12-26 Havoc Pennington <hp@pobox.com>
3117 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3118 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3121 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3122 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3123 now). Main point is because I wanted unpack_uint32 to implement
3125 (_dbus_verbose_bytes): new function
3127 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3129 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3130 mechanism to handle a corrupt message stream
3131 (_dbus_message_loader_new): fix preallocation to only prealloc,
3134 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3135 (_dbus_string_test): enhance tests for copy/move and fix the
3138 * dbus/dbus-transport-unix.c: Hold references in more places to
3139 avoid reentrancy problems
3141 * dbus/dbus-transport.c: ditto
3143 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3144 leak reference count in no-message case
3146 * test/watch.c (do_mainloop): handle adding/removing watches
3147 during iteration over the watches. Also, ref the connection/server
3148 stored on a watch, so we don't try to mangle a destroyed one.
3150 * dbus/dbus-transport-unix.c (do_authentication): perform
3153 * dbus/dbus-auth.c (get_state): add a state
3154 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3155 (_dbus_auth_get_unused_bytes): append the unused bytes
3156 to the passed in string, rather than prepend
3158 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3159 the auth conversation DBusAuth
3161 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3162 (_dbus_transport_new_for_domain_socket): when creating a
3163 transport, pass in whether it's a client-side or server-side
3164 transport so we know which DBusAuth to create
3166 2002-12-03 Havoc Pennington <hp@pobox.com>
3168 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3169 _after_ finalizing the derived members
3170 (unix_connection_set): unref watch if we fail to add it
3172 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3173 transport first, so that the connection owned by the
3174 transport will be valid as the transport finalizes.
3176 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3177 if necessary, and remove watches from the connection.
3179 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3181 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3183 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3184 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3185 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3186 (_dbus_marshal_test):
3187 * dbus/dbus-marshal.h:
3188 Add string marshal functions and have the demarshal functions
3189 return the new position.
3191 2002-12-25 Havoc Pennington <hp@pobox.com>
3193 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3194 it is a simple protocol that just maps directly to SASL.
3196 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3197 initial implementation, not actually used yet.
3199 * dbus/dbus-string.c (_dbus_string_find): new function
3200 (_dbus_string_equal): new function
3201 (_dbus_string_base64_encode): new function
3202 (_dbus_string_base64_decode): new function
3204 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3207 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3208 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3209 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3210 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3211 * dbus/dbus-marshal.h:
3212 * dbus/dbus-protocol.h:
3213 * dbus/dbus-test.c: (main):
3215 Add un-optimized marshalling/demarshalling routines.
3217 2002-12-25 Harri Porten <porten@kde.org>
3219 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3221 2002-12-24 Zack Rusin <zack@kde.org>
3223 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3224 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3227 2002-12-24 Havoc Pennington <hp@pobox.com>
3229 * glib/dbus-gthread.c: fix include
3231 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3232 I think glib API needs to change, though, as you don't
3233 want to use DBusMessageFunction, you want to use the
3234 DBusMessageHandler object. Probably
3235 dbus_connection_open_with_g_main_loop()
3236 and dbus_connection_setup_g_main_loop() or something like that
3237 (but think of better names...) that just create a connection
3238 that has watch/timeout functions etc. already set up.
3240 * dbus/dbus-connection.c
3241 (dbus_connection_send_message_with_reply): new function just to
3242 show how the message handler helps us deal with replies.
3244 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3246 * dbus/dbus-string.c (_dbus_string_test): free a string that
3249 * dbus/dbus-hash.c: use memory pools for the hash entries
3250 (rebuild_table): be more paranoid about overflow, and
3251 shrink table when we can
3252 (_dbus_hash_test): reduce number of sprintfs and write
3253 valid C89. Add tests for case where we grow and then
3254 shrink the hash table.
3256 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3258 * dbus/dbus-connection.c (dbus_connection_register_handler)
3259 (dbus_connection_unregister_handler): new functions
3261 * dbus/dbus-message.c (dbus_message_get_name): new
3263 * dbus/dbus-list.c: fix docs typo
3265 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3266 an object representing a handler for messages.
3268 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3271 * glib/dbus-gthread.c: (dbus_gthread_init):
3272 Don't use the gdbus prefix for public functions.
3274 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3278 Add GLib checks and fixup .pc files
3282 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3283 (gdbus_connection_check), (gdbus_connection_dispatch),
3284 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3285 (dbus_connection_gsource_new):
3286 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3287 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3288 * glib/test-dbus-glib.c: (message_handler), (main):
3291 2002-12-15 Harri Porten <porten@kde.org>
3293 * autogen.sh: check for libtoolize before attempting to use it
3295 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3298 * .cvsignore: ignore more stamp files
3300 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3302 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3303 without make install.
3305 2002-12-15 Havoc Pennington <hp@pobox.com>
3307 * dbus/dbus-threads.c: add thread stubs that a higher library
3308 layer can fill in. e.g. the GLib wrapper might fill them in with
3309 GThread stuff. We still need to use this thread API to
3310 thread-safe-ize the library.
3312 2002-12-12 Havoc Pennington <hp@pobox.com>
3314 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3315 below new interfaces and include fewer system headers.
3317 * dbus/dbus-sysdeps.c (_dbus_read): new function
3318 (_dbus_write): new function
3319 (_dbus_write_two): new function
3320 (_dbus_connect_unix_socket): new function
3321 (_dbus_listen_unix_socket): new function
3323 * dbus/dbus-message-internal.h: change interfaces to use
3326 2002-12-11 Havoc Pennington <hp@pobox.com>
3328 * dbus/dbus-types.h: add dbus_unichar
3330 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3332 * dbus/dbus-connection.c (dbus_connection_send_message): return
3335 * dbus/dbus-transport.c: include dbus-watch.h
3337 * dbus/dbus-connection.c: include dbus-message-internal.h
3339 * HACKING: add file with coding guidelines stuff.
3341 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3342 handling here, for security purposes (as in vsftpd). Not actually
3343 using this class yet.
3345 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3346 system/libc usage here, as in vsftpd, for ease of auditing (and
3347 should also simplify portability). Haven't actually moved all the
3348 system/libc usage into here yet.
3350 2002-11-25 Havoc Pennington <hp@pobox.com>
3352 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3353 always print the first verbose message.
3355 2002-11-24 Havoc Pennington <hp@pobox.com>
3357 * test/echo-client.c, test/echo-server.c: cheesy test
3360 * configure.in (AC_CHECK_FUNCS): check for writev
3362 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3365 * dbus/dbus-list.c (_dbus_list_foreach): new function
3367 * dbus/dbus-internals.c (_dbus_verbose): new function
3369 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3370 representing a server that listens for connections.
3372 * dbus/.cvsignore: create
3374 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3375 public API for reporting errors
3377 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3378 public object representing a connection that
3379 sends/receives messages. (Same object used for
3380 both client and server.)
3382 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3383 Basic abstraction for different kinds of stream
3384 that we might read/write messages from.
3386 2002-11-23 Havoc Pennington <hp@pobox.com>
3388 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3391 * dbus/dbus-test.c (main): add list test, and include
3392 dbus-test.h as intended
3394 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3395 (_dbus_hash_table_remove_int): return value indicates
3396 whether the entry existed to remove
3398 * dbus/dbus-list.c: add linked list utility class,
3401 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3404 2002-11-23 Havoc Pennington <hp@pobox.com>
3406 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3407 DBUS_END_DECLS to nothing, that should fix this once and for all
3409 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3411 * dbus/dbus-message.c, dbus/dbus-hash.c:
3412 add some missing @brief
3414 2002-11-23 Havoc Pennington <hp@pobox.com>
3416 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3417 to avoid confusing Doxygen
3419 * dbus/dbus-hash.c: @} not }@
3421 * dbus/dbus-message.c (struct DBusMessage): split out
3424 2002-11-23 Havoc Pennington <hp@pobox.com>
3426 * configure.in: pile on more warning flags if using gcc
3428 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3429 to document static functions
3431 * configure.in: add summary to end of configure so it
3432 looks nice and attractive
3434 * dbus/dbus-hash.c: finish implementation and write unit
3437 * configure.in: add --enable-tests to enable unit tests
3439 * dbus/dbus-test.c: test program to run unit tests
3440 for all files in dbus/*, initially runs a test for
3443 * dbus/dbus-internals.h: file to hold some internal utility stuff
3445 2002-11-22 Havoc Pennington <hp@redhat.com>
3447 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3448 "ported" away from Tcl
3450 * dbus/dbus-types.h: header for types such as dbus_bool_t
3452 2002-11-22 Havoc Pennington <hp@redhat.com>
3454 * dbus/dbus.h: fixups for doc warnings
3456 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3458 (QUIET): make it quiet so we can see warnings
3460 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3462 2002-11-22 Havoc Pennington <hp@redhat.com>
3464 * Makefile.am: include "Doxyfile" target in all-local
3466 * configure.in: generate the Doxyfile
3468 * Doxyfile.in: move Doxyfile here, so we can use
3469 configure to generate a Doxyfile with the right
3472 2002-11-22 Havoc Pennington <hp@redhat.com>
3474 * dbus/dbus-message.c: move inline docs into .c file
3476 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3477 so all docs are under doc/
3478 (MAN_EXTENSION): generate man pages. Use extension
3479 ".3dbus" which matches ".3qt" on my system,
3480 I guess this is OK, I don't know really.
3481 (FILE_PATTERNS): look for .c files not .h, makes sense
3484 2002-11-22 Havoc Pennington <hp@pobox.com>
3486 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3487 because any app can be a server, and any app can be a client,
3488 the bus is a special kind of server.
3490 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3492 * Doxyfile : adding. Still needs Makefile rules to be generated
3493 automatically (just run "doxygen" in the toplevel dir for now to
3496 * dbus/dbus-message.h : Adding sample docs (javadoc since
3497 resembles gtk-doc a little more)
3499 * dbus/dbus.h : Adding sample docs
3501 2002-11-21 Havoc Pennington <hp@redhat.com>
3503 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3504 so we can allow ourselves to include files directly,
3505 instead of having to use dbus.h
3507 * dbus/dbus.h: fill in
3509 * dbus/dbus-message.h: sketch out a sample header file.
3510 Include griping if you include it directly instead of
3513 * dbus/dbus-macros.h: new file with macros for extern "C",
3514 TRUE/FALSE, NULL, etc.
3516 * doc/file-boilerplate.c: put include guards in here
3518 2002-11-21 Havoc Pennington <hp@redhat.com>
3520 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3522 * COPYING: include the GPL as well, and license code
3523 under both AFL and GPL.
3525 2002-11-21 Havoc Pennington <hp@redhat.com>
3527 * acconfig.h: get rid of this
3529 * autogen.sh (run_configure): add --no-configure option
3531 * configure.in: remove AC_ARG_PROGRAM to make
3532 autoconf complain less. add AC_PREREQ.
3533 add AC_DEFINE third arg.
3535 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3538 Fix references so we can distcheck.
3540 2002-11-21 Havoc Pennington <hp@redhat.com>
3542 * Initial module creation