1 2003-04-03 Havoc Pennington <hp@redhat.com>
3 * bus/activation.c (load_directory): fix up memleaks
4 (bus_activation_entry_free): free the entry
6 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
7 we get one from the message bus; fix memleaks.
9 * dbus/dbus-message.c (dbus_set_error_from_message): new function
11 2003-04-03 Havoc Pennington <hp@pobox.com>
13 * bus/config-parser.c (bus_config_parser_unref): free
14 list of mechanisms, bug discovered by test suite enhancements
15 (putting system.conf and session.conf into suite)
17 * test/Makefile.am, test/test-service.c: add placeholder for a
18 test service that we'll activate as part of test suite. Doesn't
21 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
22 setting NULL value, and use system malloc not dbus_malloc()
23 when we have unavoidable memleakage.
25 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
26 didn't work, and support DBUS_BUS_ACTIVATION.
28 * bus/activation.c (child_setup): pass our well-known bus type to
31 * bus/config-parser.c: support <type> to specify well-known type
33 * doc/dbus-specification.sgml: document the env variables to
34 locate well-known buses and find service activator
36 2003-04-02 Havoc Pennington <hp@redhat.com>
38 * test/Makefile.am (all-local): add a rule to copy tests to
39 builddir, so we can have generated tests. Use this to remove the
40 silly hack for testing system.conf and session.conf. Will use this
41 shortly to generate .service files pointing to test binaries.
43 2003-04-02 Havoc Pennington <hp@redhat.com>
45 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
46 current alloc and needed new length, not max of the doubled
47 allocation and needed new length. Also, when building tests,
48 don't do the double-allocation stuff, just realloc every time.
50 2003-04-02 Havoc Pennington <hp@redhat.com>
52 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
54 (_dbus_string_get_dirname): new
55 (_dbus_sysdeps_test): new
56 (_dbus_directory_open): include dirnames in error messages
58 * bus/config-parser.c: interpret <include> and <includedir> and
59 <servicedir> relative to config file location if the given
60 filename is not absolute.
62 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
64 2003-04-02 Havoc Pennington <hp@redhat.com>
66 * bus/connection.c (bus_transaction_send_error_reply): set sender
67 service for the error, and unref the reply on success
69 * bus/activation.c: convert to use BusTransaction so OOM can be
71 (bus_activation_service_created): set sender of the message
73 2003-04-01 Havoc Pennington <hp@redhat.com>
75 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
76 <includedir> (at least mostly)
78 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
79 first, then the user ID
81 2003-04-01 Havoc Pennington <hp@pobox.com>
83 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
86 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
88 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
90 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
91 socket 0777, and unlink any existing socket.
93 * bus/bus.c (bus_context_new): change our UID/GID and fork if
94 the configuration file so specifies; set up auth mechanism
97 * bus/config-parser.c (bus_config_parser_content): add support
98 for <fork> option and fill in code for <auth>
100 * bus/system.conf.in: add <fork/> to default configuration,
101 and limit auth mechanisms to EXTERNAL
103 * doc/config-file.txt (Elements): add <fork>
105 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
106 (_dbus_change_identity): new function
108 2003-03-31 Havoc Pennington <hp@redhat.com>
110 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
111 (_dbus_listen_unix_socket): fix off-by-one error in null
112 termination spotted by Nalin
114 2003-03-31 Havoc Pennington <hp@redhat.com>
116 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
117 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
118 having a real home directory available.
120 2003-03-31 Havoc Pennington <hp@redhat.com>
122 * bus/Makefile.am (install-data-hook): create /var/run/dbus
124 * bus/messagebus.in: add init script for Red Hat /etc/init.d
126 * configure.in: add support for specifying a style of init script
129 2003-03-31 Havoc Pennington <hp@redhat.com>
131 Fix some annoying DBusString API and fix all affected code.
133 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
135 (_dbus_string_get_data): change to return string instead of using
137 (_dbus_string_get_const_data): ditto
138 (_dbus_string_get_data_len): ditto
139 (_dbus_string_get_const_data_len): ditto
141 2003-03-31 Havoc Pennington <hp@redhat.com>
143 * bus/main.c (main): fix up the command line arguments to be nicer
145 2003-03-31 Havoc Pennington <hp@redhat.com>
147 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
148 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
149 final location that lands in the config file
151 * bus/config-loader-expat.c (bus_config_load): fix type of
154 * doc/TODO: remove TODO item for dbus_bus_get()
156 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
158 2003-03-31 Havoc Pennington <hp@pobox.com>
160 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
161 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
162 argument since they are always client side
164 * dbus/dbus-server.c (dbus_server_get_address): new function
166 * bus/main.c (main): take the configuration file as an argument.
168 * test/data/valid-config-files/debug-allow-all.conf: new file to
169 use with dispatch.c tests for example
171 * bus/test-main.c (main): require test data dir
173 * bus/bus.c (bus_context_new): change this to take a
174 configuration file name as argument
176 * doc/config-file.txt (Elements): add <servicedir>
178 * bus/system.conf, bus/session.conf: new files
180 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
181 well-known socket if none set
183 * configure.in: create system.conf and session.conf
185 2003-03-30 Havoc Pennington <hp@pobox.com>
187 * bus/config-parser.c: hacking
189 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
190 to shut down, since it could cause weirdness with the DBusList
193 * dbus/dbus-list.c (_dbus_list_test): add tests for the
194 link-oriented stack routines
195 (alloc_link): free the mempool if the first alloc from it fails
197 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
199 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
201 (_dbus_string_skip_white): new
203 * doc/config-file.txt (Elements): add <includedir>
205 2003-03-28 Havoc Pennington <hp@pobox.com>
207 * dbus/dbus-string.c (_dbus_string_copy_data_len)
208 (_dbus_string_copy_data): new functions
210 2003-03-28 Anders Carlsson <andersca@codefactory.se>
212 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
216 * dbus/dbus-memory.c:
219 2003-03-28 Havoc Pennington <hp@pobox.com>
221 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
222 I think it may have just been superstition. Not sure.
224 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
225 failures that were not being handled.
227 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
229 * dbus/dbus-memory.c: add ability to set number of mallocs in a
230 row that will fail on out-of-memory.
232 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
233 function for testing out-of-memory handling.
235 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
236 allocation functions, they do map exactly to the expat ones.
238 2003-03-27 Havoc Pennington <hp@redhat.com>
240 * bus/config-loader-libxml.c (bus_config_load): add another error
243 2003-03-26 Anders Carlsson <andersca@codefactory.se>
246 Add note about automatic service activation.
248 * doc/dbus-specification.sgml:
249 Rename the specification and clarify a few things.
251 2003-03-26 Anders Carlsson <andersca@codefactory.se>
254 * dbus/dbus-address.c:
256 * dbus/dbus-marshal.c:
257 * dbus/dbus-server-debug-pipe.c:
258 * dbus/dbus-transport-unix.c:
259 Fix documentation warnings.
261 2003-03-26 Havoc Pennington <hp@pobox.com>
263 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
264 after every test so it's quick and easy to see which leaked, and
265 so we test multiple dbus_shutdown() calls
267 * configure.in: change configure.in XML stuff to also support
270 * config-loader-libxml.c: some hacking
272 * config-loader-expat.c: some hacking
274 * config-parser.c: some hacking, plus tests
276 2003-03-25 Havoc Pennington <hp@redhat.com>
278 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
280 * configure.in: add --with-xml option to specify XML library,
281 right now only libxml is supported.
283 * bus/config-loader-libxml.c, config-parser.c: sync some minor
284 nonworking code between home and work, still just stubs
286 2003-03-24 Havoc Pennington <hp@redhat.com>
288 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
291 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
292 NULL argument for "message" if the error is a well-known one,
293 fill in a generic message in this case.
295 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
298 * bus/test.c (bus_test_flush_bus): add
300 * bus/policy.c (bus_policy_test): test code stub
302 2003-03-24 Havoc Pennington <hp@pobox.com>
304 * bus/connection.c (bus_connections_setup_connection): set up
305 the "can this user connect" function, but it always returns
306 TRUE until we have a config file parser so we can have a config
307 file that allows connections.
309 2003-03-23 Havoc Pennington <hp@pobox.com>
311 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
312 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
313 the mutex, so we can check for proper memory management
316 * dbus/dbus-dataslot.c: remove the mutex from
317 DBusDataSlotAllocator and lock it manually when using it,
318 to simplify fitting it into the global slots framework.
320 * dbus/dbus-threads.c (init_static_locks): rework how we're
321 handling global locks so they are easily shut down.
323 * bus/policy.c (bus_policy_append_rule): fix
325 * bus/test-main.c (main): check for memleaks
327 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
328 test suite check for memleaks
330 * dbus/dbus-memory.c: add support in test mode for tracking
331 number of outstanding blocks
333 2003-03-23 Havoc Pennington <hp@pobox.com>
335 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
338 * dbus/dbus-hash.h: add ULONG hash keys
340 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
341 (_dbus_get_group_id): new function
343 2003-03-20 Havoc Pennington <hp@redhat.com>
345 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
347 (dbus_connection_get_unix_user): new function
349 2003-03-20 Havoc Pennington <hp@pobox.com>
351 * bus/connection.c (bus_connection_send_oom_error): assert that
353 (connection_execute_transaction): ditto
354 (bus_connection_preallocate_oom_error): fix to set the sender, and
355 set recipient to the destination service, not the bus driver
357 * bus/policy.c: hacking
359 * dbus/dbus-message.c (dbus_message_service_is): new function
360 (dbus_message_sender_is): new
362 2003-03-19 Havoc Pennington <hp@redhat.com>
364 * bus/policy.c: start sketching code for policy restrictions on
365 what connections can do.
367 2003-03-18 Havoc Pennington <hp@redhat.com>
369 * doc/TODO: some notes on high-level todo items. Little nitpick
370 stuff is all in @todo, so no need to add it here.
372 * doc/config-file.txt: some notes on how config file might look
374 2003-03-18 Anders Carlsson <andersca@codefactory.se>
380 2003-03-17 Havoc Pennington <hp@redhat.com>
382 * dbus/dbus-internals.h: add gcc attributes so that
383 our printf-style functions warn on bad arguments to
386 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
389 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
392 2003-03-17 Havoc Pennington <hp@redhat.com>
394 * bus/test-main.c (main): make it print something as it runs
395 so make check doesn't look stuck
397 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
398 from CVS, now obsolete
400 2003-03-17 Anders Carlsson <andersca@codefactory.se>
402 * bus/dispatch.c: (bus_dispatch):
403 Refetch the service name since it may have been reallocated
404 when dbus_message_set_sender was called.
406 * dbus/dbus-sysdeps.c: (_dbus_accept):
407 Add address and address length variables and use them to stop
408 valgrind from complaining.
410 2003-03-17 Havoc Pennington <hp@pobox.com>
412 All tests pass, no memleaks, no valgrind complaints.
414 * bus/test.c: refcount handler_slot
416 * bus/connection.c (bus_connections_new): refcount
419 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
420 bytes so that auth scripts pass.
422 * bus/dispatch.c: init message_handler_slot so it gets allocated
425 * bus/dispatch.c (message_handler_slot_ref): fix memleak
427 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
428 dealloc server_pipe_hash when no longer used for benefit of
431 * dbus/dbus-auth.c (process_command): memleak fix
433 * bus/dispatch.c (check_hello_message): memleak fix
435 2003-03-16 Havoc Pennington <hp@pobox.com>
437 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
439 2003-03-17 Anders Carlsson <andersca@codefactory.se>
441 * bus/activation.c (bus_activation_activate_service): Append
442 the pending activation entry to the list of pending activations.
444 2003-03-16 Havoc Pennington <hp@pobox.com>
446 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
449 * dbus/dbus-address.c (create_entry): fix OOM handling when
450 failing to alloc entry->method
452 2003-03-16 Havoc Pennington <hp@pobox.com>
454 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
457 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
458 add some missing dbus_set_result
460 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
461 alloc the DBusMessageHandler
463 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
464 the transport here, since we call this from the finalizer; it
465 resulted in a double-finalize.
467 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
468 where we tried to use transport->connection that was NULL,
469 happened when transport was disconnected early on due to OOM
471 * bus/*.c: adapt to handle OOM for watches/timeouts
473 * dbus/dbus-transport-unix.c: port to handle OOM during
476 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
477 reference to unused bytes instead of a copy
479 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
482 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
485 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
488 2003-03-16 Anders Carlsson <andersca@codefactory.se>
490 * doc/dbus-specification.sgml:
491 Document reply message for ActivateService.
493 2003-03-16 Anders Carlsson <andersca@codefactory.se>
495 * bus/activation.c: (bus_pending_activation_entry_free),
496 (bus_pending_activation_free), (bus_activation_new),
497 (bus_activation_unref), (bus_activation_service_created),
498 (bus_activation_activate_service):
500 * bus/bus.c: (bus_context_new):
501 * bus/desktop-file.c: (new_section):
502 * bus/driver.c: (bus_driver_send_service_deleted),
503 (bus_driver_handle_activate_service):
504 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
506 * dbus/dbus-connection.c:
507 (dbus_connection_send_with_reply_and_block):
508 * dbus/dbus-message.c: (dbus_message_append_args_valist):
509 * dbus/dbus-protocol.h:
510 Make activation work better. Now pending activations will be queued
511 and the daemon won't try to activate services that are already registered.
513 2003-03-16 Havoc Pennington <hp@pobox.com>
515 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
518 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
519 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
521 2003-03-16 Havoc Pennington <hp@pobox.com>
523 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
524 this. always run the test suite before commit...
526 * bus/*: adapt to DBusConnection API changes
528 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
529 requires renaming stuff to avoid dbus_connection_dispatch name
532 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
535 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
536 separate from _dbus_message_loader_return_buffer()
538 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
539 this, because it's now always broken to use; the number of
540 messages in queue vs. the number still buffered by the message
541 loader is undefined/meaningless. Should use
542 dbus_connection_get_dispatch_state().
543 (dbus_connection_dispatch): rename from
544 dbus_connection_dispatch_message
546 2003-03-16 Havoc Pennington <hp@pobox.com>
548 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
551 2003-03-16 Anders Carlsson <andersca@codefactory.se>
553 * dbus/dbus-connection.c:
554 (dbus_connection_send_with_reply_and_block):
555 Decrease connection->n_incoming when removing an entry
557 * dbus/dbus-dict.c: (dbus_dict_entry_free),
558 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
559 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
560 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
561 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
562 (dbus_dict_get_byte_array):
563 Handle NULL arrays and strings. Also add support for byte arrays.
565 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
566 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
567 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
568 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
569 (_dbus_demarshal_dict), (demarshal_and_validate_len),
570 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
571 * dbus/dbus-marshal.h:
572 Add support for marshalling and demarshalling empty arrays and strings.
574 * dbus/dbus-message.c: (dbus_message_append_args_valist),
575 (dbus_message_append_string_array),
576 (dbus_message_iter_get_boolean),
577 (dbus_message_iter_get_boolean_array),
578 (dbus_message_iter_get_int32_array),
579 (dbus_message_iter_get_uint32_array),
580 (dbus_message_iter_get_double_array),
581 (dbus_message_iter_get_byte_array),
582 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
583 (check_message_handling):
584 Add support for getting empty arrays and dicts.
586 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
587 Don't do any validation at all for now, that's better than just checking
590 * test/data/valid-messages/emptiness.message:
591 New test message with lots of empty arrays.
593 2003-03-16 Havoc Pennington <hp@pobox.com>
595 * dbus/dbus-connection.c
596 (_dbus_connection_queue_received_message_link): new function that
597 can't fail due to OOM
599 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
600 new function pops a message together with a list link
603 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
604 message queuing functions to avoid needing to alloc memory
606 2003-03-16 Havoc Pennington <hp@pobox.com>
608 Oops - test code was only testing failure of around 30 of the
609 mallocs in the test path, but it turns out there are 500+
610 mallocs. I believe this was due to misguided linking setup such
611 that there was one copy of dbus_malloc etc. in the daemon and one
612 in the shared lib, and only daemon mallocs were tested. In any
613 case, the test case now tests all 500+ mallocs, and doesn't pass
614 yet, though there are lots of fixes in this patch.
616 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
617 this so that it doesn't need to allocate memory, since it
618 has no way of indicating failure due to OOM (and would be
621 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
623 * bus/Makefile.am: rearrange to create two self-contained
624 libraries, to avoid having libraries with overlapping symbols.
625 that was resulting in weirdness, e.g. I'm pretty sure there
626 were two copies of global static variables.
628 * dbus/dbus-internals.c: move the malloc debug stuff to
631 * dbus/dbus-list.c (free_link): free list mempool if it becomes
634 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
636 * dbus/dbus-address.c (dbus_parse_address): free list nodes
639 * bus/dispatch.c (bus_dispatch_add_connection): free
640 message_handler_slot when no longer using it, so
641 memory leak checkers are happy for the test suite.
643 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
645 * bus/bus.c (new_connection_callback): disconnect in here if
646 bus_connections_setup_connection fails.
648 * bus/connection.c (bus_connections_unref): fix to free the
650 (bus_connections_setup_connection): if this fails, don't
651 disconnect the connection, just be sure there are no side
654 * dbus/dbus-string.c (undo_alignment): unbreak this
656 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
658 (_dbus_auth_new): fix the order in which we free strings
661 * bus/connection.c (bus_connection_disconnected): fix to
662 not send ServiceDeleted multiple times in case of memory
665 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
666 get the base service name
667 (dbus_bus_register_client): don't return base service name,
668 instead store it on the DBusConnection and have an accessor
670 (dbus_bus_register_client): rename dbus_bus_register()
672 * bus/dispatch.c (check_hello_message): verify that other
673 connections on the bus also got the correct results, not
674 just the one sending hello
676 2003-03-15 Havoc Pennington <hp@pobox.com>
678 Make it pass the Hello handling test including all OOM codepaths.
679 Now to do other messages...
681 * bus/services.c (bus_service_remove_owner): fix crash when
682 removing owner from an empty list of owners
683 (bus_registry_ensure): don't leave service in the list of
684 a connection's owned services if we fail to put the service
687 * bus/connection.c (bus_connection_preallocate_oom_error): set
688 error flag on the OOM error.
690 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
691 handle _dbus_transport_set_connection failure
693 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
694 to create watches up front and simply enable/disable them as
696 (unix_connection_set): this can now fail on OOM
698 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
699 of enabling/disabling a watch or timeout.
701 * bus/loop.c (bus_loop_iterate): don't touch disabled
704 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
706 2003-03-15 Havoc Pennington <hp@pobox.com>
708 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
709 write useful test code, after all that futzing around ;-)
711 Test does not yet pass because we can't handle OOM in
712 _dbus_transport_messages_pending (basically,
713 dbus_connection_preallocate_send() does not prealloc the write
714 watch). To fix this, I think we need to add new stuff to
715 set_watch_functions, namely a SetEnabled function so we can alloc
716 the watch earlier, then enable it later.
718 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
719 dbus-memory.c to the convenience lib
721 * bus/test.c: rename some static functions to keep them clearly
722 distinct from stuff in connection.c. Handle client disconnection.
724 2003-03-14 Havoc Pennington <hp@pobox.com>
726 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
727 transport, tests more of the real codepath. Set up clients
728 with bus_setup_debug_client.
730 * bus/test.c (bus_setup_debug_client): function to set up debug
731 "clients" on the main loop
733 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
736 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
739 * dbus/dbus-server-debug.c: support a debug server based on pipes
741 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
742 (_dbus_close): new function
744 * configure.in: check for socketpair
746 2003-03-14 Havoc Pennington <hp@redhat.com>
748 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
751 * dbus/dbus-transport-debug.c: rework this a good bit to be
752 less complicated. hopefully still works.
754 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
757 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
760 * dbus/dbus-message.c (dbus_message_copy): rename from
761 dbus_message_new_from_message, fix it up to copy
762 all the message fields, add test case
764 * bus/dispatch.c (bus_dispatch_test): add some more test code,
765 not quite passing yet
767 2003-03-14 Havoc Pennington <hp@pobox.com>
769 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
770 until no work remains" in test code. (the large diff here
771 is just code movement, no actual changes)
773 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
774 1, no point waiting around for test code.
775 (_dbus_server_debug_accept_transport): unref the timeout
776 after adding it (right?)
778 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
780 2003-03-13 Havoc Pennington <hp@redhat.com>
782 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
785 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
788 * dbus/dbus-connection.h: Make AddWatchFunction and
789 AddTimeoutFunction return a bool so they can fail on out-of-memory
791 * bus/bus.c (bus_context_new): set up timeout handlers
793 * bus/connection.c (bus_connections_setup_connection): set up
796 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
799 * bus/bus.c (bus_context_new): adapt to changes
801 * bus/connection.c: adapt to changes
803 * test/watch.c: adapt to DBusWatch changes
805 * bus/dispatch.c (bus_dispatch_test): started adding this but
808 2003-03-14 Anders Carlsson <andersca@codefactory.se>
810 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
812 2003-03-13 Havoc Pennington <hp@pobox.com>
814 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
815 set up a test framework as for the library
817 2003-03-12 Havoc Pennington <hp@pobox.com>
819 Throughout: purge global variables, introduce BusActivation,
820 BusConnections, BusRegistry, etc. objects instead.
822 * bus/bus.h, bus/bus.c: introduce BusContext as a global
825 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
826 going to redo this a bit differently I think
828 2003-03-12 Havoc Pennington <hp@redhat.com>
830 Mega-patch that gets the message bus daemon initially handling
831 out-of-memory. Work still needed. Also lots of random
832 moving stuff to DBusError instead of ResultCode.
834 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
836 * dbus/dbus-connection.c
837 (dbus_connection_send_with_reply_and_block): use DBusError
839 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
842 * dbus/dbus-connection.c (dbus_connection_send): drop the result
843 code here, as the only failure possible is OOM.
845 * bus/connection.c (bus_connection_disconnect):
846 rename bus_connection_disconnected as it's a notification only
848 * bus/driver.c (bus_driver_handle_acquire_service): don't free
849 "name" on get_args failure, should be done by get_args;
850 don't disconnect client for bad args, just return an error.
851 (bus_driver_handle_service_exists): ditto
853 * bus/services.c (bus_services_list): NULL-terminate returned array
855 * bus/driver.c (bus_driver_send_service_lost)
856 (bus_driver_send_service_acquired): send messages from driver to a
857 specific client to the client's unique name, not to the broadcast
860 * dbus/dbus-message.c (decode_header_data): reject messages that
861 contain no name field
862 (_dbus_message_get_client_serial): rename to
863 dbus_message_get_serial and make public
864 (_dbus_message_set_serial): rename from set_client_serial
865 (_dbus_message_set_reply_serial): make public
866 (_dbus_message_get_reply_serial): make public
868 * bus/connection.c (bus_connection_foreach): allow stopping
869 iteration by returning FALSE from foreach function.
871 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
872 (dbus_connection_free_preallocated_send)
873 (dbus_connection_preallocate_send): new API for sending a message
874 without possibility of malloc failure.
875 (dbus_connection_send_message): rename to just
876 dbus_connection_send (and same for whole function family)
878 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
880 * dbus/dbus-sysdeps.c (_dbus_exit): new function
882 * bus/activation.c: handle/return errors
884 * dbus/dbus-errors.h: add more DBUS_ERROR #define
886 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
887 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
888 (_dbus_result_from_errno): move to this file
890 2003-03-10 Anders Carlsson <andersca@codefactory.se>
892 * dbus/dbus-marshal.c:
893 (_dbus_marshal_set_string):
894 Take a length argument so we can marshal the correct string
897 (_dbus_marshal_dict), (_dbus_demarshal_dict),
898 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
899 (_dbus_marshal_test):
900 * dbus/dbus-marshal.h:
901 Add support for marshalling and demarshalling dicts.
903 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
904 Add support for TYPE DICT.
906 * dbus/dbus-message.c: (set_string_field):
907 Adjust header padding.
909 (dbus_message_append_args_valist), (dbus_message_append_dict),
910 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
911 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
912 (check_message_handling), (check_have_valid_message):
913 * dbus/dbus-message.h:
914 Add functions for setting and getting dicts.
916 * dbus/dbus-protocol.h:
922 * doc/dbus-specification.sgml:
923 Add information about how dicts are marshalled.
925 * test/data/invalid-messages/dict-with-nil-value.message:
926 * test/data/invalid-messages/too-short-dict.message:
927 * test/data/valid-messages/dict-simple.message:
928 * test/data/valid-messages/dict.message:
929 Add sample messages containing dicts.
931 2003-03-08 Anders Carlsson <andersca@codefactory.se>
933 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
935 2003-03-07 Anders Carlsson <andersca@codefactory.se>
938 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
939 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
940 (dbus_dict_set_int32), (dbus_dict_set_uint32),
941 (dbus_dict_set_double), (dbus_dict_set_string),
942 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
943 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
944 (dbus_dict_set_string_array), (_dbus_dict_test):
946 Fix according to comments from Havoc.
948 2003-03-06 Michael Meeks <michael@server.home>
950 * configure.in: if we don't have kde-config, disable have_qt.
952 2003-03-07 Anders Carlsson <andersca@codefactory.se>
957 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
958 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
959 (dbus_dict_remove), (dbus_dict_get_value_type),
960 (dbus_dict_get_keys), (dbus_dict_put_boolean),
961 (dbus_dict_put_int32), (dbus_dict_put_uint32),
962 (dbus_dict_put_double), (dbus_dict_put_string),
963 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
964 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
965 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
966 (dbus_dict_get_int32), (dbus_dict_get_uint32),
967 (dbus_dict_get_double), (dbus_dict_get_string),
968 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
969 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
970 (dbus_dict_get_string_array), (_dbus_dict_test):
972 Add DBusDict implementation
974 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
978 2003-03-04 Havoc Pennington <hp@pobox.com>
980 * test/data/auth/*: adapt to changes
982 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
983 USERID_BASE64 and change USERNAME_BASE64 to put in username not
986 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
987 more stuff from being in a context name, to make the protocol
990 * dbus/dbus-errors.c (dbus_error_has_name): new function
991 (dbus_error_is_set): new function
993 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
994 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
996 * dbus/dbus-connection.c (dbus_connection_flush): also read
997 messages during a flush operation
999 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
1001 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1003 * configure.in: Check for gethostbyname on Solaris.
1005 * dbus/dbus-transport.c: (_dbus_transport_open):
1006 Remove duplicate "tcp" entry.
1008 * doc/dbus-specification.sgml:
1009 Clarify some things.
1011 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1013 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
1014 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
1015 (_dbus_keyring_test):
1016 * dbus/dbus-md5.c: (_dbus_md5_compute):
1017 * dbus/dbus-sha.c: (_dbus_sha_compute):
1020 2003-03-05 Anders Carlsson <andersca@codefactory.se>
1022 * README: Add some things.
1024 2003-03-04 Anders Carlsson <andersca@codefactory.se>
1026 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
1027 after case DBUS_TYPE_BOOELAN.
1029 2003-03-02 Havoc Pennington <hp@pobox.com>
1031 * test/break-loader.c (randomly_set_extreme_ints): add test that
1032 sets really huge and small integers
1034 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
1035 that length of boolean array fits in the string, and that
1036 string has room for boolean value in single-bool case.
1038 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
1039 optional value to "ALIGN" command which is what to fill the
1042 * test/data/valid-messages/no-padding.message: add regression
1043 test for the message padding problem
1045 2003-03-02 Havoc Pennington <hp@pobox.com>
1047 * dbus/dbus-message.c (decode_header_data): fix to always init
1048 message_padding, from Benjamin Dauvergne
1050 2003-03-02 Havoc Pennington <hp@pobox.com>
1056 2003-03-01 Joe Shaw <joe@assbarn.com>
1058 * configure.in: Check for "struct cmsgcred" and try to access its
1059 members for BSD-like unices.
1061 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
1062 _dbus_read_credentials_unix_socket().
1063 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
1064 read() for reading the credential byte off the unix socket. Use
1065 struct cmsgcred on systems that support it.
1067 2003-02-27 Alexander Larsson <alexl@redhat.com>
1071 Make gthreads-2.0 dependency optional. Don't build thread test if
1074 2003-02-27 Havoc Pennington <hp@pobox.com>
1076 * dbus/dbus-connection.c
1077 (dbus_connection_send_message_with_reply_and_block): fix doh!
1078 doh! doh! bug that resulted in never removing a reply from the
1079 queue, no wonder we called get_reply_serial so much ;-)
1081 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
1082 and client serial instead of demarshaling them every time
1084 2003-02-27 Havoc Pennington <hp@pobox.com>
1086 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
1087 more inlined, using dbus-string-private.h, speeds things up
1090 * dbus/dbus-string.c (_dbus_string_free): apply align offset
1091 when freeing the string
1092 (_dbus_string_steal_data): fix for align offset
1093 (undo_alignment): new function
1095 2003-02-26 Havoc Pennington <hp@redhat.com>
1097 All kinds of audit fixes from Owen, plus initial attempt to
1098 handle unaligned memory returned from malloc.
1100 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
1101 leave room for align_offset and nul byte
1102 (fixup_alignment): function to track an align_offset and
1103 ensure real->str is aligned
1104 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
1105 to allow a nul byte plus align offset
1106 (_dbus_string_lock): fix overflow issue
1107 (_dbus_string_init_const_len): add assertions on sanity of len,
1108 assign allocated to be ALLOCATION_PADDING larger than len
1109 (set_length): fixup the overflow handling
1110 (_dbus_string_get_data_len): fix overflow in assertion
1111 (open_gap): detect overflow in size of gap to be opened
1112 (_dbus_string_lengthen): add overflow check
1113 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
1114 (_dbus_string_append): add overflow check
1115 (_dbus_string_append_unichar): overflow
1116 (_dbus_string_delete): fix overflow in assertion
1117 (_dbus_string_copy_len): overflow in assertion
1118 (_dbus_string_replace_len): overflows in assertions
1119 (_dbus_string_find): change to implement in terms of
1120 _dbus_string_find_to
1121 (_dbus_string_find_to): assorted fixage
1122 (_dbus_string_equal_c_str): assert c_str != NULL,
1123 fix logic so the function works
1124 (_dbus_string_ends_with_c_str): fix overflow thingy
1125 (_dbus_string_base64_encode): overflow fix
1126 (_dbus_string_validate_ascii): overflow
1127 (_dbus_string_validate_nul): overflow
1129 2003-02-26 Havoc Pennington <hp@redhat.com>
1131 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
1133 2003-02-26 Alexander Larsson <alexl@redhat.com>
1136 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
1138 * dbus/dbus-connection.c:
1139 * dbus/dbus-connection.h:
1140 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
1141 Add dbus_connection_set_wakeup_main_function and use it when queueing
1142 incoming and outgoing messages.
1145 * dbus/dbus-dataslot.c:
1146 Threadsafe usage of DBusDataSlotAllocator
1148 * dbus/dbus-message.c: (dbus_message_get_args_iter):
1151 * dbus/dbus-server-unix.c:
1154 * glib/dbus-gmain.c:
1155 Implement the new wakeup functions for glib.
1158 * glib/test-thread-client.c:
1159 * glib/test-thread-server.c:
1160 * glib/test-thread.h:
1161 Initial cut at some thread test code. Not really done yet.
1163 2003-02-26 Havoc Pennington <hp@pobox.com>
1165 * dbus/dbus-connection.c
1166 (dbus_connection_send_message_with_reply_and_block): fix crash
1167 where we ref'd the outgoing message instead of the returned reply
1169 * dbus/dbus-transport-unix.c (do_authentication): check read watch
1170 at the end of this function, so if we didn't need to read for
1171 authentication, we reinstall it for receiving messages
1173 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
1174 a NULL sender for peer-to-peer case
1176 * dbus/dbus-transport-unix.c (check_read_watch): handle
1177 !authenticated case correctly
1179 * glib/dbus-gmain.c: add support for DBusServer
1181 * dbus/dbus-server.c: add data slot support
1183 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
1184 return values and handle errors
1186 * dbus/dbus-dataslot.c: factor out the data slot stuff from
1189 * Doxyfile.in (INPUT): add glib subdir
1191 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
1192 setup_with_g_main instead of hookup_with_g_main; write docs
1194 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1196 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
1197 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1198 * dbus/dbus-message.c: (dbus_message_append_boolean),
1199 (dbus_message_append_boolean_array),
1200 (dbus_message_get_args_valist), (_dbus_message_test):
1201 * dbus/dbus-message.h:
1202 * doc/dbus-specification.sgml:
1203 Various fixes as pointed out by Havoc.
1205 * test/data/invalid-messages/bad-boolean-array.message:
1206 * test/data/invalid-messages/bad-boolean.message:
1207 Add invalid boolean value test cases.
1209 2003-02-24 Anders Carlsson <andersca@codefactory.se>
1211 * dbus/dbus-internals.c: (_dbus_type_to_string):
1212 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1213 (_dbus_marshal_validate_arg):
1214 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1215 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1216 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
1217 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
1218 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
1219 (dbus_message_iter_get_double),
1220 (dbus_message_iter_get_boolean_array), (message_iter_test):
1221 * dbus/dbus-message.h:
1222 * dbus/dbus-protocol.h:
1223 * doc/dbus-specification.sgml:
1224 * test/data/valid-messages/lots-of-arguments.message:
1225 Add support for boolean and boolean array types.
1227 2003-02-23 Havoc Pennington <hp@pobox.com>
1229 * dbus/dbus-keyring.c: finish most of this implementation and
1232 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
1233 these barf if the error isn't cleared to NULL
1235 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
1236 (_dbus_create_directory): new function
1238 * dbus/dbus-errors.c (dbus_set_error): fix warning
1240 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
1241 (_dbus_string_hex_decode): new function
1242 (test_hex_roundtrip): test code
1244 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
1246 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
1248 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
1249 the save-to-temp/rename trick to atomically write the new file
1250 (_dbus_string_parse_uint): new function
1252 2003-02-22 Havoc Pennington <hp@pobox.com>
1254 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
1256 2003-02-22 Havoc Pennington <hp@pobox.com>
1258 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
1259 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
1261 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
1263 * dbus/test/data/sha-1: add US government test suite for SHA-1
1265 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1267 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
1268 Make string arrays NULL-terminated.
1270 * dbus/dbus-memory.c: (dbus_free_string_array):
1271 * dbus/dbus-memory.h:
1272 New function for freeing NULL-terminated string arrays.
1274 * dbus/dbus-message-builder.c: (append_quoted_string),
1275 (_dbus_message_data_load):
1276 Add support for array types.
1278 * dbus/dbus-message.c: (check_message_handling):
1279 Add more types as test cases.
1281 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
1282 (_dbus_string_parse_double):
1283 Add the start offset to the end offset.
1285 * test/data/valid-messages/lots-of-arguments.message:
1286 New test message with lots of arguments.
1288 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1290 * dbus/dbus-message.c: (dbus_message_append_nil),
1291 (dbus_message_append_int32), (dbus_message_append_uint32),
1292 (dbus_message_append_double), (dbus_message_append_string),
1293 (dbus_message_append_int32_array),
1294 (dbus_message_append_uint32_array),
1295 (dbus_message_append_double_array),
1296 (dbus_message_append_byte_array),
1297 (dbus_message_append_string_array):
1298 Fix all out-of-memory handling in these functions.
1300 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1302 * dbus/dbus-message.c: (dbus_message_append_nil):
1305 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1307 * dbus/dbus-message.c: (dbus_message_append_args_valist),
1308 (dbus_message_append_nil), (dbus_message_append_int32_array),
1309 (dbus_message_append_uint32_array),
1310 (dbus_message_append_double_array),
1311 (dbus_message_append_byte_array),
1312 (dbus_message_append_string_array), (dbus_message_get_args_valist),
1313 (dbus_message_iter_get_int32_array),
1314 (dbus_message_iter_get_uint32_array),
1315 (dbus_message_iter_get_double_array),
1316 (dbus_message_iter_get_byte_array),
1317 (dbus_message_iter_get_string_array):
1319 * dbus/dbus-message.h:
1320 Add functions for appending and getting arrays.
1322 2003-02-21 Anders Carlsson <andersca@codefactory.se>
1324 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
1325 element size at least 8 bytes, fixes mempool tests on
1328 2003-02-20 Alexander Larsson <alexl@redhat.com>
1330 * dbus/dbus-transport-unix.c (unix_do_iteration):
1331 Unlock the connection mutex during a blocking select call.
1332 Add todo about how we need a way to wake up the select.
1334 * dbus/dbus-connection-internal.h:
1335 * dbus/dbus-connection.c:
1336 Add _dbus_connection_lock and _dbus_connection_unlock.
1338 2003-02-19 Havoc Pennington <hp@pobox.com>
1340 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
1341 Doxyfile.in, not Doxyfile
1343 * dbus/dbus-keyring.c: do some hacking on this
1345 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
1347 * dbus/dbus-errors.c (dbus_set_error_const): do not call
1349 (dbus_set_error): remove dbus_error_init, check for message ==
1350 NULL *before* we sprintf into it, and add @todo about including
1351 system headers in this file
1353 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
1355 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
1357 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
1358 get various bits of user information based on either username
1360 (_dbus_homedir_from_username): new function
1362 2003-02-19 Anders Carlsson <andersca@codefactory.se>
1365 Add check for nonposix getpwnam_r
1367 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1368 Align the pool element size to a sizeof (void *) boundary.
1370 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1371 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1372 General Solaris fixes.
1374 * test/data/valid-messages/simplest-manual.message:
1375 Explicitly state that we want little-endian packing.
1377 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1379 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1381 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1382 Added to create a transport connecting using a tcp/ip socket.
1384 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1385 to a tcp socket at given host and port.
1386 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1389 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1391 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1392 Added to create a server listening on a TCP/IP socket.
1394 2003-02-19 Havoc Pennington <hp@pobox.com>
1396 Throughout: mop up all the Doxygen warnings and undocumented
1399 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1400 to search any paths.
1402 * dbus/dbus-threads.c: move global mutex initializers to
1403 dbus-internals.h, multiple prototypes was confusing doxygen
1404 besides being kind of ugly
1406 * Doxyfile (PREDEFINED): have Doxygen define
1407 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1408 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1409 (do not abuse the feature! it's for stuff like the autogenerated
1410 macros in dbus-md5.c, not just for things you don't feel like
1413 2003-02-18 Havoc Pennington <hp@pobox.com>
1415 * dbus/dbus-string.c (_dbus_string_zero): new function
1417 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1418 wrap it in some dbus-friendly API
1420 * dbus/dbus-types.h: add 16-bit types
1422 2003-02-18 Joe Shaw <joe@assbarn.com>
1424 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1425 credentials from our currently running process.
1426 (get_word): Fix a buglet where we were copying the entire length
1427 instead of relative to our position.
1429 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1430 keys on the stack... it's 640k of data.
1432 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1433 read the credentials byte off the socket, even if we don't have
1435 (_dbus_poll): Implement poll() using select() for systems which
1438 * glib/test-dbus-glib.c (main): Print out an error if no
1439 parameters are given.
1441 * test/data/auth/fallback.auth-script: Added. Tests that a client
1442 can fallback to a secondary auth mechanism if the first fails.
1444 2003-02-18 Havoc Pennington <hp@pobox.com>
1448 2003-02-17 Havoc Pennington <hp@pobox.com>
1450 * doc/dbus-specification.sgml: lots of cosmetic
1451 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1452 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1453 s/server/bus/ (except in authentication section). Add a section
1454 "Message Bus Message Routing"
1456 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1462 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1464 * doc/dbus-specification.sgml:
1465 Specification updates.
1467 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1469 * bus/activation.c: (bus_activation_init), (child_setup),
1470 (bus_activation_activate_service):
1472 * bus/main.c: (main):
1473 Set DBUS_ADDRESS environment variable.
1475 * dbus/dbus-errors.c: (dbus_set_error):
1476 Don't use va_copy since that's a C99 feature.
1478 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1479 (_dbus_spawn_async):
1480 * dbus/dbus-sysdeps.h:
1481 Add child_setup_func to _dbus_spawn_async.
1483 * doc/dbus-specification.sgml:
1484 Update specification.
1486 * test/spawn-test.c: (setup_func), (main):
1489 2003-02-17 Alexander Larsson <alexl@redhat.com>
1491 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1494 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1498 * doc/dbus-test-plan.sgml:
1499 Add test plan document.
1504 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1506 * dbus/dbus-message.c: (decode_header_data),
1507 (_dbus_message_loader_return_buffer):
1508 Set the header padding amount when loading a message.
1510 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1512 * bus/dispatch.c: (send_one_message):
1513 Only send broadcast messages to registered connections.
1515 * dbus/dbus-message.c: (dbus_message_name_is):
1516 * dbus/dbus-message.h:
1517 New convenience function.
1519 * dbus/dbus-transport-debug.c: (do_reading):
1520 Only dispatch one message per run.
1523 * test/bus-test.c: (new_connection_callback), (die),
1524 (test_hello_client1_handler), (test_hello_client2_handler),
1525 (test_hello_replies), (main):
1527 * test/bus-test-loop.[ch]:
1530 2003-02-16 Havoc Pennington <hp@pobox.com>
1532 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1533 backward conditional
1535 2003-02-16 Alexander Larsson <alexl@redhat.com>
1537 * dbus/dbus-connection.c:
1538 Implement sent_message_with_reply. (with_reply_and block is still
1540 Made dispatch_message not lose message if OOM.
1542 * dbus/dbus-errors.h:
1543 Add NoReply error (for reply timeouts).
1545 2003-02-16 Alexander Larsson <alexl@redhat.com>
1547 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1548 Actually free keys and values when destroying hashtable.
1550 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1552 * dbus/dbus-auth.c: (client_try_next_mechanism):
1555 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1556 Return TRUE if there's no thread implementation around.
1558 * glib/dbus-gmain.c: (free_source),
1559 (dbus_connection_hookup_with_g_main):
1560 Make sure to remove the GSource when the connection is finalized.
1562 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1564 * bus/dispatch.c: (bus_dispatch_message_handler):
1565 * dbus/dbus-errors.h:
1566 Return an error if someone tries to send a message to a service
1569 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1571 * bus/activation.c: (load_directory), (bus_activation_init),
1572 (bus_activation_activate_service):
1575 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1576 More work on the activation handling.
1578 * dbus/dbus-errors.h:
1579 Add some error messages
1581 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1582 * dbus/dbus-message.h:
1583 New function that creates an error message.
1585 * dbus/dbus-protocol.h:
1586 Add ACTIVATE_SERVER message.
1588 * dbus/dbus-server-unix.c: (unix_handle_watch),
1589 (_dbus_server_new_for_domain_socket):
1590 Call _dbus_fd_set_close_on_exec.
1592 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1593 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1594 (_dbus_fd_set_close_on_exec):
1595 * dbus/dbus-sysdeps.h:
1596 Add _dbus_fd_set_close_on exec function. Also add function that checks
1597 that all open fds are set to close-on-exec and warns otherwise.
1599 * dbus/dbus-transport-unix.c:
1600 (_dbus_transport_new_for_domain_socket):
1601 Call _dbus_fd_set_close_on_exec.
1603 2003-02-16 Havoc Pennington <hp@pobox.com>
1605 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1606 allow people to avoid setting SIGPIPE to SIG_IGN
1607 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1608 we've been asked not to
1610 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1612 * dbus/dbus-list.c: (_dbus_list_append_link),
1613 (_dbus_list_prepend_link):
1614 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1618 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1621 * bus/activation.c: (bus_activation_entry_free),
1622 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1624 * bus/main.c: (main):
1625 Add simple activation support, doesn't work yet though.
1627 2003-02-15 Zack Rusin <zack@kde.org>
1629 * qt/dbus-qthread.cpp: small casting fix
1631 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1633 * dbus/dbus-errors.c: (dbus_set_error):
1634 * dbus/dbus-errors.h:
1635 Add a few errors and make dbus_set_error void.
1637 * dbus/dbus-sysdeps.c:
1638 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1639 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1640 * dbus/dbus-sysdeps.h:
1641 Add _dbus_spawn_async.
1643 * test/spawn-test.c: (main):
1644 Test for _dbus_spawn_async.
1646 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1648 * dbus/dbus-internals.h:
1649 Fix build without tests.
1651 * dbus/dbus-list.c: (alloc_link):
1652 Fix a segfault when a malloc fails.
1654 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1655 (dbus_malloc0), (dbus_realloc):
1656 Add support for malloc debugging.
1658 2003-02-15 Alexander Larsson <alexl@redhat.com>
1660 * dbus/dbus-threads.c:
1661 * dbus/dbus-threads.h:
1662 Add condvars. Remove static mutext from API.
1663 Implement static mutexes by initializing them from threads_init.
1665 * glib/dbus-gthread.c:
1666 * qt/dbus-qthread.cpp:
1667 Update with the thread api changes.
1672 Turn StaticMutex into normal mutex + init function.
1673 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1674 _dbus_list_append_link, _dbus_list_prepend_link
1677 * dbus/dbus-sysdeps.c:
1678 * dbus/dbus-sysdeps.h:
1679 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1680 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1682 * dbus/dbus-protocol.h:
1683 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1685 * dbus/dbus-message.c:
1686 Make ref/unref atomic.
1689 * dbus/dbus-connection-internal.h:
1690 * dbus/dbus-connection.c:
1691 * dbus/dbus-connection.h:
1693 Change _peek to _borrow,_return & _steal_borrowed.
1694 Change disconnect callback to event.
1695 Make dbus_connection_dispatch_messages reentrant.
1697 * dbus/dbus-transport.c:
1698 Don't ref the connection on calls to the transport
1701 * dbus/dbus-message-handler.c:
1704 * glib/dbus-gmain.c:
1705 Don't use peek_message anymore
1708 * test/debug-thread.c:
1709 * test/debug-thread.h:
1710 Simple thread implementation that asserts() on deadlocks in
1711 single-threaded code.
1714 (main) Call debug_threads_init.
1717 Use disconnect message instead of disconnect callback.
1721 Don't call dbus_connection_set_disconnect_function. Instead export
1722 bus_connection_disconnect.
1725 Call bus_connection_disconnect when we get a disconnected message.
1727 2003-02-15 Havoc Pennington <hp@pobox.com>
1729 * dbus/dbus-message.c (dbus_message_new): fool around with the
1732 2003-02-14 Havoc Pennington <hp@pobox.com>
1734 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1736 * dbus/dbus-memory.c: fail if the debug functions indicate we
1739 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1740 (_dbus_decrement_fail_alloc_counter): debug functions to
1741 simulate memory allocation failures
1743 2003-02-14 Havoc Pennington <hp@pobox.com>
1745 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1748 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1750 * bus/driver.c: (bus_driver_handle_hello):
1752 * bus/services.c: (bus_service_lookup):
1753 Reorder message sending so we get a more sane order.
1755 * test/bus-test.c: (message_handler):
1758 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1760 * bus/driver.c: (bus_driver_send_service_deleted),
1761 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1762 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1763 (bus_driver_send_welcome_message),
1764 (bus_driver_handle_list_services),
1765 (bus_driver_handle_acquire_service),
1766 (bus_driver_handle_service_exists):
1767 * dbus/dbus-bus.c: (dbus_bus_register_client),
1768 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1769 * dbus/dbus-errors.c: (dbus_result_to_string):
1770 * dbus/dbus-errors.h:
1771 * dbus/dbus-message.c: (dbus_message_append_args),
1772 (dbus_message_append_args_valist), (dbus_message_get_args),
1773 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1774 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1775 (dbus_message_iter_get_byte_array),
1776 (dbus_message_iter_get_string_array), (message_iter_test),
1777 (check_message_handling), (_dbus_message_test):
1778 * dbus/dbus-message.h:
1779 * test/bus-test.c: (main):
1780 Change fields to arguments in messages, so that they won't be
1781 confused with header fields.
1783 * glib/test-dbus-glib.c: (main):
1784 Remove append_fields from hello message.
1786 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1788 * dbus/dbus-errors.c:
1789 * dbus/dbus-message.c:
1790 * dbus/dbus-string.c:
1791 Documentation fixes.
1793 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1795 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1797 Implement support for timeouts in dbus-glib.
1799 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1801 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1802 * dbus/dbus-message.c: (process_test_subdir):
1803 * test/break-loader.c: (find_breaks_based_on):
1804 Plug some memory leaks.
1806 2003-02-13 Richard Hult <rhult@codefactory.se>
1808 * bus/main.c: Fix build.
1810 * dbus/dbus-errors.h:
1811 * dbus/dbus-errors.c: Fix copyright for Anders.
1813 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1818 * bus/connection.c: (bus_connection_foreach):
1821 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1822 (unescape_string), (new_section), (parse_section_start),
1823 (parse_key_value), (report_error), (bus_desktop_file_load),
1824 (bus_desktop_file_get_string):
1825 * bus/desktop-file.h:
1826 Use DBusError for error reporting.
1828 * bus/dispatch.c: (send_one_message),
1829 (bus_dispatch_message_handler):
1830 * bus/driver.c: (bus_driver_send_service_deleted),
1831 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1832 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1833 (bus_driver_send_welcome_message),
1834 (bus_driver_handle_list_services),
1835 (bus_driver_handle_acquire_service),
1836 (bus_driver_handle_service_exists):
1837 * bus/loop.c: (bus_loop_run):
1839 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1841 * bus/utils.c: (bus_wait_for_memory):
1843 New files with general utility functions.
1845 * dbus/dbus-internals.h:
1846 Remove _DBUS_HANDLE_OOM.
1848 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1850 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1851 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1852 * dbus/dbus-errors.h:
1853 Add DBusError structure.
1855 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1857 * test/data/valid-messages/standard-acquire-service.message:
1858 * test/data/valid-messages/standard-hello.message:
1859 * test/data/valid-messages/standard-list-services.message:
1860 * test/data/valid-messages/standard-service-exists.message:
1861 Add some standard messages.
1863 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1865 * bus/driver.c: (bus_driver_send_welcome_message),
1866 (bus_driver_handle_list_services),
1867 (bus_driver_handle_acquire_service),
1868 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1869 Update for API changes in libdbus.
1871 * dbus/dbus-message.c: (dbus_message_new_reply):
1872 * dbus/dbus-message.h:
1873 Remove the name argument. The spec states that replies shouldn't
1876 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1878 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1879 (report_error), (bus_desktop_file_load), (lookup_section),
1880 (lookup_line), (bus_desktop_file_get_raw),
1881 (bus_desktop_file_get_string):
1882 * bus/desktop-file.h:
1883 Some fixes, and new functions for getting a key value from a section.
1885 2003-02-13 Havoc Pennington <hp@pobox.com>
1887 * test/data/auth/fail-after-n-attempts.auth-script: new test
1889 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1892 2003-02-13 Havoc Pennington <hp@pobox.com>
1894 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1895 dbus_credentials_match were backward
1897 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1898 NO_CREDENTIALS and ROOT_CREDENTIALS
1900 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1901 into here. Never process more commands after we've reached an
1902 end state; store further data as unused bytes.
1904 * test/data/auth/*: add more auth tests
1906 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1907 command to match exact string and EXPECT_UNUSED to match unused
1910 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1912 2003-02-12 Havoc Pennington <hp@pobox.com>
1914 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1915 \r off of popped lines
1917 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1920 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1923 2003-02-12 Havoc Pennington <hp@pobox.com>
1925 * dbus/Makefile.am: remove break-loader from the build, since it
1928 * configure.in: add --enable-gcov to turn on coverage profiling
1929 flags and disable optimization
1931 2003-02-10 Havoc Pennington <hp@pobox.com>
1933 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1934 initial cut at test framework for DBusAuth from laptop.
1935 Doesn't quite work yet but it compiles and I need to get
1936 it off the 266mhz laptop. ;-)
1938 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1939 fix a memleak in error case
1941 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1944 * bus/desktop-file.c:
1945 * bus/desktop-file.h:
1946 Add a desktop file parser.
1948 2003-02-11 Zack Rusin <zack@kde.org>
1950 * qt/message.[h|cpp]: sample implementation
1951 of the KDE wrapper for DBusMessage
1953 2003-02-09 Zack Rusin <zack@kde.org>
1955 * test/bus-test.c: make_it_compile
1956 * doc/dbus-specification.sgml: minimal semantic fix
1958 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1964 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1967 * dbus/dbus-break-loader.c:
1969 * test/break-loader.c:
1970 Move dbus-break-loader to test/ and rename it to break-loader.
1972 2003-02-02 Havoc Pennington <hp@pobox.com>
1974 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1975 for code to manage cookies in your home directory
1977 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1979 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1980 to authenticate, then disconnect the client.
1982 2003-02-03 Alexander Larsson <alexl@redhat.com>
1984 * dbus/dbus-message.c (dbus_message_append_fields):
1987 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1989 * doc/dbus-specification.sgml:
1990 Update address format section.
1992 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1995 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1996 (message_handler), (new_connection_callback), (loop_quit),
2000 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2002 * bus/driver.c: (bus_driver_handle_service_exists):
2003 Simplify the code a bit.
2005 * dbus/dbus-bus.c: (dbus_bus_service_exists):
2008 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2011 Add libdbus-daemon.la and link to it.
2013 2003-02-01 James Willcox <jwillcox@gnome.org>
2015 * bus/driver.c: (bus_driver_handle_own_service):
2016 Actually include the service reply code in the message.
2018 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2020 * bus/driver.c: (bus_driver_handle_service_exists):
2021 Don't unref the incoming message.
2023 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2025 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
2027 2003-02-02 Anders Carlsson <andersca@codefactory.se>
2029 * dbus/dbus-server.c: (dbus_server_listen):
2030 * dbus/dbus-transport.c: (_dbus_transport_open):
2031 ifdef out the calls to the debug transport and server.
2033 2003-02-02 Alexander Larsson <alexl@redhat.com>
2035 * dbus/dbus-watch.c (dbus_watch_get_flags):
2036 Add note in the docs that ERROR or HANGUP won't be returned
2037 and are assumed always on.
2039 * glib/dbus-gmain.c (add_watch):
2040 Always add IO_ERR | IO_HUP
2042 * dbus/dbus-message.h:
2043 Add semicolon after dbus_message_iter_get_string_array().
2044 Makes qt code build again
2046 2003-02-01 Anders Carlsson <andersca@codefactory.se>
2048 * bus/driver.c: (create_unique_client_name),
2049 (bus_driver_handle_hello):
2050 Don't take a name, just use a numeric id to identify
2054 * dbus/dbus-bus.c: (dbus_bus_register_client),
2055 (dbus_bus_acquire_service), (dbus_bus_service_exists):
2057 Add new convenience functions for communicating with the bus.
2059 * dbus/dbus-message.h:
2061 * dbus/dbus-protocol.h:
2064 2003-02-01 Alexander Larsson <alexl@redhat.com>
2066 * dbus/dbus-message.c (dbus_message_append_fields):
2067 Add some more doc comments.
2069 2003-02-01 Havoc Pennington <hp@pobox.com>
2071 * dbus/dbus-break-loader.c (randomly_modify_length): change
2072 a 4-byte value in the message as if it were a length
2074 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
2075 execute bit on saved files
2077 2003-02-01 Havoc Pennington <hp@pobox.com>
2079 * dbus/dbus-break-loader.c (main): new program to find messages
2080 that break the loader.
2082 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
2083 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
2085 * dbus/dbus-string.c (_dbus_string_set_byte): new
2087 2003-01-31 Havoc Pennington <hp@pobox.com>
2089 * dbus/dbus-message.c: refactor the test code to be more general,
2090 in preparation for writing a "randomly permute test cases to
2091 try to break the loader" program.
2093 2003-01-31 Havoc Pennington <hp@pobox.com>
2095 * doc/dbus-specification.sgml: work on the specification
2097 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
2098 the protocol version of the message.
2100 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
2101 no longer specifies that.
2102 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
2105 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
2106 "break" for DBUS_TYPE_NIL, remove @todo
2108 2003-01-31 Havoc Pennington <hp@pobox.com>
2110 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
2111 just set_is_error/get_is_error as this is a commonly-used
2112 function, and write docs.
2114 2003-01-31 Anders Carlsson <andersca@codefactory.se>
2116 * dbus/dbus-address.c: (dbus_address_entry_free):
2117 Free key and value lists.
2119 * dbus/dbus-internals.c: (_dbus_type_to_string):
2120 Add the types we didn't have.
2122 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2123 (_dbus_marshal_validate_arg):
2126 * dbus/dbus-message.c: (dbus_message_set_sender):
2127 Remove todo about being able to set sender to NULL.
2129 (dbus_message_set_is_error_reply),
2130 (dbus_message_get_is_error_reply):
2131 * dbus/dbus-message.h:
2134 * dbus/dbus-protocol.h:
2135 Add error reply flag.
2137 * test/data/valid-messages/opposite-endian.message:
2138 Add NIL type to test.
2140 2003-01-31 Havoc Pennington <hp@pobox.com>
2142 * doc/dbus-specification.sgml: fully specify the header. Add
2143 flags and major protocol version, and change header/body len to
2146 * dbus/dbus-message-builder.c (append_saved_length): append length
2149 * dbus/dbus-message.c (dbus_message_create_header): change header
2150 length and body length to unsigned. Add the new fields from the
2152 (_dbus_message_loader_return_buffer): unsigned header/body len
2154 2003-01-30 Havoc Pennington <hp@pobox.com>
2156 * dbus/dbus-auth.c: rework to use only REJECTED, no
2159 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
2160 use REJECTED, suggested by Mark McLoughlin
2162 2003-01-30 Havoc Pennington <hp@pobox.com>
2164 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
2165 a better way to report errors here. e.g. "unix address lacks
2166 path" or something. also "no such file" when the path doesn't
2169 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
2171 (dbus_parse_address): add @todo about documenting address format,
2172 and allowing , and ; to be escaped
2174 2003-01-30 Anders Carlsson <andersca@codefactory.se>
2177 Add dbus-address.[ch]
2179 * dbus/dbus-address.c: (dbus_address_entry_free),
2180 (dbus_address_entries_free), (create_entry),
2181 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
2182 (dbus_parse_address), (_dbus_address_test):
2183 * dbus/dbus-address.h:
2184 New files for dealing with address parsing.
2186 * dbus/dbus-connection.c:
2187 Document timeout functions.
2189 * dbus/dbus-message.c:
2190 Document dbus_message_new_from_message.
2192 * dbus/dbus-server-debug.c:
2195 * dbus/dbus-server.c: (dbus_server_listen):
2196 Parse address and use correct server implementation.
2198 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
2199 * dbus/dbus-string.h:
2200 New function with test.
2202 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
2206 * dbus/dbus-transport-debug.c:
2209 * dbus/dbus-transport.c: (_dbus_transport_open):
2210 Parse address and use correct transport implementation.
2212 2003-01-30 Havoc Pennington <hp@pobox.com>
2214 * dbus/dbus-message.c: use message->byte_order instead of
2215 DBUS_COMPILER_BYTE_ORDER throughout.
2216 (dbus_message_create_header): pad header to align the
2217 start of the body of the message to 8-byte boundary
2219 * dbus/dbus-marshal.h: make all the demarshalers take const
2220 DBusString arguments.
2222 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
2223 validate message args here, so we don't have to do slow validation
2224 later, and so we catch bad messages as they are incoming. Also add
2225 better checks on header_len and body_len. Also fill in
2228 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
2229 implemented properly)
2230 (_dbus_string_validate_nul): new function to check all-nul
2232 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
2233 get_arg_end_pos and remove all validation
2234 (_dbus_marshal_validate_arg): actually do validation here.
2236 2003-01-29 Havoc Pennington <hp@pobox.com>
2238 * dbus/dbus-message.c (check_message_handling): fix assertion
2239 failure on set_client_serial
2241 2003-01-28 Havoc Pennington <hp@pobox.com>
2243 * dbus/dbus-server-debug.c: Add doc section comments
2245 * dbus/dbus-transport-debug.c: add doc section comments
2247 2003-01-28 Havoc Pennington <hp@redhat.com>
2249 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
2250 the reverse order from how I had it
2251 (_dbus_string_base64_encode): reverse encoding order. I was
2252 basically byteswapping everything during encoding.
2254 2003-01-28 Anders Carlsson <andersca@codefactory.se>
2256 * dbus/dbus-connection-internal.h:
2257 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
2258 (_dbus_connection_remove_timeout):
2259 Add functions for adding and removing timeouts.
2261 * dbus/dbus-message.c: (dbus_message_new_from_message):
2262 Add new function that takes a message and creates an exact
2263 copy of it, but with the refcount set to 1.
2264 (check_message_handling):
2267 * dbus/dbus-server-protected.h:
2268 * dbus/dbus-server.c: (_dbus_server_init_base),
2269 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
2270 (dbus_server_set_timeout_functions):
2271 (_dbus_server_remove_timeout):
2272 New functions so that a server can add and remove timeouts.
2274 (dbus_server_listen):
2275 Add commented out call to dbus_server_debug_new.
2277 * dbus/dbus-timeout.c: (_dbus_timeout_new):
2278 Actually set the handler, doh.
2280 * dbus/dbus-transport.c: (_dbus_transport_open):
2281 Add commented out call to dbus_transport_debug_client_new.
2284 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
2286 2003-01-28 Havoc Pennington <hp@pobox.com>
2288 * dbus/dbus-message.c (check_message_handling): function to check
2289 on the loaded message, iterates over it etc.
2291 2003-01-28 Havoc Pennington <hp@pobox.com>
2293 * test/Makefile.am (dist-hook): fix make distdir
2295 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
2297 2003-01-27 Havoc Pennington <hp@pobox.com>
2299 * dbus/dbus-mempool.c (time_for_size): replace printf with
2302 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
2303 empty lines; fix the SAVE_LENGTH stuff to be
2304 START_LENGTH/END_LENGTH so it actually works; couple other
2307 * test/Makefile.am (dist-hook): add dist-hook for .message files
2309 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
2310 can be constant or locked.
2311 (_dbus_string_free): allow freeing a const string as
2314 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
2316 * dbus/dbus-test-main.c (main): take an argument which is the
2317 directory containing test data
2319 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
2320 argument to this and load all the messages in test/data/
2321 checking that they can be loaded or not loaded as appropriate.
2323 2003-01-27 Anders Carlsson <andersca@codefactory.se>
2325 * bus/dispatch.c: (bus_dispatch_message_handler):
2326 Dispatch messages sent to services.
2328 * bus/driver.c: (bus_driver_send_service_deleted),
2329 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2330 (bus_driver_send_service_acquired):
2331 Add helper functions for sending service related messages.
2333 (bus_driver_send_welcome_message):
2334 Send HELLO_REPLY instead of WELCOME.
2336 (bus_driver_handle_list_services):
2337 Send LIST_SERVICES_REPLY instead of SERVICES.
2339 (bus_driver_handle_own_service),
2340 (bus_driver_handle_service_exists):
2341 New message handlers.
2343 (bus_driver_handle_message):
2344 Invoke new message handlers.
2346 (bus_driver_remove_connection):
2347 Don't remove any services here since that's done automatically
2348 by bus_service_remove_owner now.
2351 New function signatures.
2353 * bus/services.c: (bus_service_add_owner):
2354 Send ServiceAcquired message if we're the only primary owner.
2356 (bus_service_remove_owner):
2357 Send ServiceAcquired/ServiceLost messages.
2359 (bus_service_set_prohibit_replacement),
2360 (bus_service_get_prohibit_replacement):
2361 Functions for setting prohibit replacement.
2363 (bus_service_has_owner):
2364 New function that checks if a connection is in the owner queue of
2368 Add new function signatures.
2370 * dbus/dbus-list.c: (_dbus_list_test):
2371 Add tests for _dbus_list_remove_last and traversing the list backwards.
2374 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2375 go any further, so return NULL then.
2377 * dbus/dbus-protocol.h:
2378 Add new messages, service flags and service replies.
2380 2003-01-26 Havoc Pennington <hp@pobox.com>
2382 * dbus/dbus-message-builder.c: implement, completely untested.
2384 * test/data/*: add data to be used in testing.
2385 ".message" files are our simple loadable text format.
2386 ".message-raw" will be binary dumps of messages.
2388 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2390 2003-01-26 Havoc Pennington <hp@pobox.com>
2392 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2394 * dbus/dbus-errors.c (dbus_result_to_string): add
2397 * dbus/dbus-message-builder.c: new file, will contain code to load
2398 up messages from files. Not implemented yet.
2400 2003-01-26 Havoc Pennington <hp@pobox.com>
2402 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2403 the sender by setting to NULL
2405 2003-01-26 Havoc Pennington <hp@pobox.com>
2407 The unit tests pass, but otherwise untested. If it breaks, the
2408 tests should have been better. ;-)
2410 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2413 * dbus/dbus-message.c: redo everything so we maintain
2414 message->header as the only copy of the various fields.
2415 This avoids the possibility of out-of-memory in some cases,
2416 for example dbus_message_lock() can't run out of memory anymore,
2417 and avoids extra copying. Figured I may as well go ahead and do
2418 this since it was busted for dbus_message_lock to not return
2419 failure on OOM, and dbus_message_write_header was totally
2420 unchecked for OOM. Also fixed some random other bugs.
2422 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2423 that strings are nul-terminated. Also, end_pos can be equal
2424 to string length just not greater than, I think.
2425 (_dbus_marshal_set_int32): new function
2426 (_dbus_marshal_set_uint32): new function
2427 (_dbus_marshal_set_string): new function
2429 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2430 a warning, init timeout_list to NULL
2431 (dbus_connection_send_message): don't use uninitialized variable
2434 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2436 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2438 * bus/driver.c: (bus_driver_handle_hello),
2439 (bus_driver_send_welcome_message):
2442 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2444 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2445 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2446 (dbus_connection_unref):
2447 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2448 * dbus/dbus-message.c: (dbus_message_unref),
2451 (dbus_message_get_fields):
2452 Remove debugging printout.
2454 (_dbus_message_loader_return_buffer):
2455 Don't store the header string.
2457 (_dbus_message_test):
2460 2003-01-26 Richard Hult <rhult@codefactory.se>
2462 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2463 the file descriptor list, since it can change under us.
2465 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2467 * glib/dbus-gmain.c: (dbus_connection_prepare),
2468 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2469 (remove_watch), (dbus_connection_hookup_with_g_main):
2470 Rewrite the glib handling to use its own GSource instead of a
2471 GIOChannel so we can catch messages put in the queue while waiting
2474 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2477 * bus/connection.c: (connection_disconnect_handler),
2478 (connection_watch_callback), (bus_connection_setup):
2479 * bus/dispatch.c: (send_one_message),
2480 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2481 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2483 * bus/driver.c: (bus_driver_send_service_deleted),
2484 (bus_driver_send_service_created), (bus_driver_handle_hello),
2485 (bus_driver_send_welcome_message),
2486 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2487 (bus_driver_handle_message):
2489 Refactor code, put the message dispatching in its own file. Use
2490 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2493 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2495 * dbus/dbus-internals.h:
2496 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2498 * dbus/dbus-message.c: (dbus_message_get_sender):
2499 * dbus/dbus-message.h:
2500 Implement dbus_message_get_sender.
2502 * dbus/dbus-protocol.h:
2503 Add message and service defines.
2505 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2507 * dbus/dbus-connection.c: (dbus_connection_send_message):
2508 * dbus/dbus-message-internal.h:
2509 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2510 (dbus_message_write_header):
2511 Remove _dbus_messag_unlock and don't set the client serial on a
2512 message if one already exists.
2514 2003-01-24 Havoc Pennington <hp@pobox.com>
2516 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2519 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2522 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2524 * dbus/dbus-list.c: (alloc_link), (free_link):
2525 Use a memory pool for the links.
2527 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2529 * bus/connection.c: (bus_connection_foreach):
2531 Add new bus_connection_foreach function.
2533 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2534 Add function that broadcasts a message to all clients.
2536 (bus_driver_send_service_created), (bus_driver_handle_hello),
2537 (bus_driver_send_welcome_message),
2538 (bus_driver_handle_list_services), (bus_driver_message_handler):
2539 Implement functions that take care of listing services, and notifying
2540 clients when new services are created.
2542 * bus/services.c: (bus_services_list):
2544 Add new function that returns an array of strings with the currently
2545 registered services.
2548 * glib/dbus-gmain.c:
2549 Update copyright year.
2551 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2553 * dbus/dbus-connection.c: (dbus_connection_send_message):
2554 Unlock the message in case it was sent earlier.
2556 (dbus_connection_send_message_with_reply_and_block):
2557 Remove the reply message from the list.
2559 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2560 Set array_len and new_pos correctly.
2562 (_dbus_marshal_test):
2563 Remove debug output.
2565 * dbus/dbus-message-internal.h:
2566 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2567 New function that returns the reply serial.
2569 (_dbus_message_unlock):
2570 New function that unlocks a message and resets its header.
2572 (dbus_message_append_string_array),
2573 (dbus_message_get_fields_valist),
2574 (dbus_message_iter_get_field_type),
2575 (dbus_message_iter_get_string_array),
2576 (dbus_message_get_fields),
2577 (dbus_message_append_fields_valist):
2578 Handle string arrays.
2580 (dbus_message_set_sender):
2581 Make this function public since the bus daemon needs it.
2583 (decode_header_data):
2584 Set the reply serial to -1 initially.
2586 * dbus/dbus-message.h:
2587 Add dbus_message_set_sender.
2589 2003-01-24 Havoc Pennington <hp@pobox.com>
2591 * doc/dbus-specification.sgml: add some stuff
2593 2003-01-22 Havoc Pennington <hp@pobox.com>
2595 * doc/dbus-specification.sgml: Start to document the protocol.
2597 2003-01-22 Havoc Pennington <hp@pobox.com>
2599 * dbus/dbus-connection.c
2600 (dbus_connection_send_message_with_reply_and_block): add some @todo
2602 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2604 2003-01-21 Havoc Pennington <hp@pobox.com>
2606 (patch untested because can't compile)
2608 * bus/driver.c (create_unique_client_name): make this function
2609 never recycle client names. Also, caller should initialize
2612 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2614 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2616 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2617 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2618 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2619 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2620 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2621 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2622 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2623 * dbus/dbus-marshal.h:
2624 * dbus/dbus-protocol.h:
2625 Add support for marshalling and demarshalling integer, double
2628 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2633 * bus/connection.c: (connection_disconnect_handler):
2634 Remove the connection from the bus driver's list.
2636 (connection_watch_callback): Dispatch messages.
2638 (free_connection_data): Free connection name.
2640 (bus_connection_setup): Add connection to the bus driver's list.
2641 (bus_connection_remove_owned_service):
2642 (bus_connection_set_name), (bus_connection_get_name):
2643 Add functions for setting and getting the connection's name.
2646 Add function headers.
2648 * bus/driver.c: (create_unique_client_name),
2649 (bus_driver_handle_hello_message),
2650 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2651 (bus_driver_add_connection), (bus_driver_remove_connection):
2654 * bus/services.c: (bus_service_free):
2656 New file that handles communication and registreation with the bus
2659 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2661 * dbus/dbus-connection.c: (dbus_connection_send_message):
2662 Add a new client_serial parameter.
2664 (dbus_connection_send_message_with_reply):
2665 Remove a @todo since we've implemented the blocking function.
2667 (dbus_connection_send_message_with_reply_and_block):
2668 New function that sends a message and waits for a reply and
2669 then returns the reply.
2671 * dbus/dbus-connection.h:
2674 * dbus/dbus-errors.c: (dbus_result_to_string):
2675 * dbus/dbus-errors.h:
2676 Add new DBUS_RESULT.
2678 * dbus/dbus-message-internal.h:
2679 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2680 (_dbus_message_set_sender), (dbus_message_write_header),
2681 (dbus_message_new_reply), (decode_header_data),
2682 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2683 * dbus/dbus-message.h:
2684 Add new functions that set the reply serial and sender.
2685 Also marshal and demarshal them correctly and add test.
2687 * dbus/dbus-protocol.h:
2688 Add new DBUS_MESSAGE_TYPE_SENDER.
2691 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2692 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2693 (dbus_connection_hookup_with_g_main):
2694 * glib/test-dbus-glib.c: (main):
2695 Rewrite to use GIOChannel and remove the GSource crack.
2697 * test/echo-client.c: (main):
2698 * test/watch.c: (check_messages):
2699 Update for changed APIs
2701 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2703 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2705 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2706 Create a DBusTimeoutList.
2707 (dbus_connection_set_timeout_functions): Add new function to
2708 set timeout callbacks
2710 * dbus/dbus-connection.h: Add public DBusTimeout API.
2712 * dbus/dbus-message.c: (dbus_message_get_service):
2713 * dbus/dbus-message.h: New function.
2715 * dbus/dbus-server.c: Fix small doc typo.
2717 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2719 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2721 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2722 of the string, just as long as specified.
2724 2003-01-19 Havoc Pennington <hp@pobox.com>
2726 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2729 * dbus/dbus-server.c (dbus_server_set_max_connections)
2730 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2731 keep track of current number of connections, and add API for
2732 setting a max (but haven't implemented enforcing the max yet)
2734 2003-01-18 Havoc Pennington <hp@pobox.com>
2736 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2737 reading/writing if read_watch != NULL or write_watch != NULL.
2739 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2740 the message loader code to actually load message->header and
2741 message->body into the newly-created message.
2743 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2746 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2747 (dbus_connection_get_max_message_size)
2748 (dbus_connection_set_max_live_messages_size)
2749 (dbus_connection_get_max_live_messages_size): implement some
2750 resource limitation functions
2752 * dbus/dbus-resources.c: new file implementing some of the
2753 resource limits stuff
2755 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2756 missing docs, add @todo to handle OOM etc.
2758 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2761 2003-01-18 Havoc Pennington <hp@pobox.com>
2763 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2764 connection if it hasn't been already.
2766 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2767 replace with DisconnectFunction.
2769 2003-01-18 Havoc Pennington <hp@pobox.com>
2771 Building --disable-verbose-mode --disable-asserts --disable-tests
2772 cuts the library from 112K to 45K or so
2774 * configure.in: check for varargs macro support,
2775 add --enable-verbose-mode, --enable-asserts.
2777 * dbus/dbus-internals.h (_dbus_assert): support
2779 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2781 2003-01-18 Havoc Pennington <hp@pobox.com>
2783 * dbus/dbus-test.c: include config.h so that tests actually run
2785 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2786 so the failure mode when that assumption fails will be plenty
2789 2003-01-18 Havoc Pennington <hp@pobox.com>
2791 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2793 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2796 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2797 since we don't want to use those in make check
2799 2003-01-15 Havoc Pennington <hp@redhat.com>
2805 2003-01-15 Havoc Pennington <hp@redhat.com>
2807 * test/Makefile.am: fix so that test source code ends up in the
2808 distribution on make distcheck
2810 2003-01-15 Havoc Pennington <hp@redhat.com>
2816 2003-01-15 Havoc Pennington <hp@redhat.com>
2818 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2819 fix build when --disable-tests
2821 * Makefile.am (EXTRA_DIST): put HACKING in here
2823 * HACKING: document procedure for making a tarball release.
2825 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2827 * bus/connection.c: (connection_error_handler),
2828 (bus_connection_setup):
2829 * bus/main.c: (main):
2830 Make sure that the DBusConnectionData struct is NULLed
2831 out to prevent a segfault.
2833 * dbus/dbus-errors.c: (dbus_result_to_string):
2834 * dbus/dbus-errors.h:
2835 * dbus/dbus-message.c: (dbus_message_get_fields),
2836 (dbus_message_get_fields_valist), (_dbus_message_test):
2837 * dbus/dbus-message.h:
2838 Make dbus_message_get_fields return a result code so we can
2839 track invalid fields as well as oom.
2841 2003-01-11 Havoc Pennington <hp@pobox.com>
2843 * configure.in: change --enable-test/--enable-ansi action-if-given
2844 to enable_foo=$enableval instead of enable_foo=yes
2846 2003-01-08 Havoc Pennington <hp@pobox.com>
2848 * dbus/dbus-string.c (_dbus_string_align_length): new function
2850 * dbus/dbus-test-main.c: move main() for test app here
2852 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2853 symbol to run tests, because dbus-test isn't in the main
2856 Code review nitpicks.
2858 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2859 for people with narrow emacs ;-). Assert client_serial was filled
2860 in. Assert message->name != NULL.
2861 (dbus_message_append_fields): have "first_field_type" arg separate
2862 from va list, needed for C++ binding that also uses varargs IIRC
2863 and helps with type safety
2864 (dbus_message_new): add @todo about using DBusString to store
2865 service/name internally
2866 (dbus_message_new): don't leak ->service and ->name on OOM later
2868 (dbus_message_unref): free the service name
2869 (dbus_message_get_fields): same change to varargs
2870 i.e. first_field_type
2871 (_dbus_message_loader_return_buffer): assert that the message data
2872 is aligned (if not it's a bug in our code). Put in verbose griping
2873 about why we set corrupted = TRUE.
2874 (decode_header_data): add FIXME that char* is evil. Was going to
2875 add FIXME about evil locale-specific string.h strncmp, but just
2876 switched to wacky string-as-uint32 optimization. Move check for
2877 "no room for field name" above get_const_data_len() to avoid
2878 assertion failure in get_const_data_len if we have trailing 2
2879 bytes or the like. Check for service and name fields being
2880 provided twice. Don't leak service/name on error. Require field
2881 names to be aligned to 4 bytes.
2883 * dbus/dbus-marshal.c: move byte swap stuff to header
2884 (_dbus_pack_int32): uscore-prefix
2885 (_dbus_unpack_int32): uscore-prefix
2886 (_dbus_unpack_uint32): export
2887 (_dbus_demarshal_string): add @todo complaining about use of
2889 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2890 handling allowing corrupt data to go unchecked
2892 2003-01-08 Havoc Pennington <hp@redhat.com>
2894 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2895 to the select() as needed for authentication. (should be using
2896 _dbus_poll() not select, but for another day)
2898 * dbus/dbus.h: include dbus/dbus-protocol.h
2900 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2902 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2905 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2907 * dbus/dbus-internals.c: (_dbus_type_to_string):
2908 New function that returns a string describing a type.
2910 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2911 * dbus/dbus-marshal.h:
2912 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2913 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2914 (dbus_message_iter_get_byte_array):
2915 * dbus/dbus-message.h:
2916 Add new convenience functions for appending and getting message fields.
2917 Also add demarshalling routines for byte arrays.
2919 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2921 * dbus/dbus-connection-internal.h:
2922 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2923 (_dbus_connection_get_next_client_serial),
2924 (dbus_connection_send_message):
2925 * dbus/dbus-internals.h:
2926 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2927 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2928 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2929 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2930 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2931 (_dbus_verbose_bytes), (_dbus_marshal_test):
2932 * dbus/dbus-marshal.h:
2933 * dbus/dbus-message-internal.h:
2934 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2935 (dbus_message_write_header), (_dbus_message_lock),
2936 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2937 (dbus_message_get_name), (dbus_message_append_int32),
2938 (dbus_message_append_uint32), (dbus_message_append_double),
2939 (dbus_message_append_string), (dbus_message_append_byte_array),
2940 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2941 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2942 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2943 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2944 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2945 (decode_header_data), (_dbus_message_loader_return_buffer),
2946 (message_iter_test), (_dbus_message_test):
2947 * dbus/dbus-message.h:
2948 * dbus/dbus-protocol.h:
2949 * dbus/dbus-test.c: (main):
2951 * glib/test-dbus-glib.c: (message_handler), (main):
2952 * test/echo-client.c: (main):
2953 * test/watch.c: (check_messages):
2954 Make messages sendable and receivable for real.
2956 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2958 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2959 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2960 * dbus/dbus-message.c: (dbus_message_append_int32),
2961 (dbus_message_append_uint32), (dbus_message_append_double),
2962 (dbus_message_append_string), (dbus_message_append_byte_array):
2963 Handle OOM restoration.
2965 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2967 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2968 (_dbus_demarshal_string), (_dbus_marshal_test):
2969 * dbus/dbus-marshal.h:
2970 * dbus/dbus-message.c: (dbus_message_get_name),
2971 Document these functions.
2973 (dbus_message_append_int32), (dbus_message_append_uint32),
2974 (dbus_message_append_double), (dbus_message_append_string),
2975 (dbus_message_append_byte_array):
2976 * dbus/dbus-message.h:
2977 Add functions for adding message fields of different types.
2979 * dbus/dbus-protocol.h:
2980 Add the different types.
2982 2003-01-05 Havoc Pennington <hp@pobox.com>
2984 * bus/connection.c: implement routines for handling connections,
2985 first thing is keeping a list of owned services on each connection
2986 and setting up watches etc.
2988 * bus/services.c: implement a mapping from service names to lists
2991 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2993 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2994 to use static mutexes for global data
2996 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2997 collection of functions to set/get application-specific data
2998 on the DBusConnection.
3000 2003-01-04 Havoc Pennington <hp@pobox.com>
3002 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
3003 (_dbus_poll): new function
3005 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
3008 * bus/loop.c: initial code for the daemon main loop
3010 2003-01-04 Havoc Pennington <hp@pobox.com>
3012 * test/watch.c (error_handler): make it safe if the error handler
3013 is called multiple times (if we s/error handler/disconnect
3014 handler/ we should just guarantee it's called only once)
3016 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
3017 error handler on disconnect (it's quite possible we should
3018 just change the error handler to a "disconnect handler," I'm
3019 not sure we have any other meaningful errors)
3021 * configure.in: check for getpwnam_r
3023 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3024 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
3025 mechanism as in SASL spec, using socket credentials
3027 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
3028 (_dbus_send_credentials_unix_socket): new function
3030 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
3032 (_dbus_write): only check errno if <0 returned
3033 (_dbus_write_two): ditto
3035 2003-01-02 Anders Carlsson <andersca@codefactory.se>
3037 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
3038 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
3039 (_dbus_marshal_test):
3040 * dbus/dbus-marshal.h:
3041 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
3042 to _dbus_marshal_utf8_string. Also fix some tests.
3044 2002-12-28 Harri Porten <porten@kde.org>
3046 * configure.in: added check for C++ compiler and a very cheesy
3047 check for the Qt integration
3049 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
3051 * qt/Makefile.am: added
3053 * qt/.cvsignore: added
3055 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
3056 latter, added #ifdef QT_THREAD_SUPPORT guard.
3058 * dbus/Makefile.am: added missing headers for make dist
3060 2002-12-28 Kristian Rietveld <kris@gtk.org>
3062 * dbus/Makefile.am: fixup export-symbols-regex.
3064 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3066 * acinclude.m4: Add this file and put the
3067 PKG_CHECK_MODULE macro in it.
3069 2002-12-27 Anders Carlsson <andersca@codefactory.se>
3071 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3072 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3073 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3074 (_dbus_marshal_test):
3075 Make the demarshalling routines align the pos argument.
3076 Add string marshalling tests and fix the obvious bugs
3079 2002-12-26 Havoc Pennington <hp@pobox.com>
3081 * dbus/dbus-auth.c: fixes fixes fixes
3083 * dbus/dbus-transport-unix.c: wire up support for
3084 encoding/decoding data on the wire
3086 * dbus/dbus-auth.c (_dbus_auth_encode_data)
3087 (_dbus_auth_decode_data): append to target string
3088 instead of nuking it.
3090 2002-12-26 Havoc Pennington <hp@pobox.com>
3092 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
3093 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
3096 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
3097 avoid swap_bytes() overhead (ignoring possible assembly stuff for
3098 now). Main point is because I wanted unpack_uint32 to implement
3100 (_dbus_verbose_bytes): new function
3102 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
3104 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
3105 mechanism to handle a corrupt message stream
3106 (_dbus_message_loader_new): fix preallocation to only prealloc,
3109 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
3110 (_dbus_string_test): enhance tests for copy/move and fix the
3113 * dbus/dbus-transport-unix.c: Hold references in more places to
3114 avoid reentrancy problems
3116 * dbus/dbus-transport.c: ditto
3118 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
3119 leak reference count in no-message case
3121 * test/watch.c (do_mainloop): handle adding/removing watches
3122 during iteration over the watches. Also, ref the connection/server
3123 stored on a watch, so we don't try to mangle a destroyed one.
3125 * dbus/dbus-transport-unix.c (do_authentication): perform
3128 * dbus/dbus-auth.c (get_state): add a state
3129 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
3130 (_dbus_auth_get_unused_bytes): append the unused bytes
3131 to the passed in string, rather than prepend
3133 * dbus/dbus-transport.c (_dbus_transport_init_base): create
3134 the auth conversation DBusAuth
3136 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
3137 (_dbus_transport_new_for_domain_socket): when creating a
3138 transport, pass in whether it's a client-side or server-side
3139 transport so we know which DBusAuth to create
3141 2002-12-03 Havoc Pennington <hp@pobox.com>
3143 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
3144 _after_ finalizing the derived members
3145 (unix_connection_set): unref watch if we fail to add it
3147 * dbus/dbus-connection.c (dbus_connection_unref): delete the
3148 transport first, so that the connection owned by the
3149 transport will be valid as the transport finalizes.
3151 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
3152 if necessary, and remove watches from the connection.
3154 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
3156 2002-12-26 Anders Carlsson <andersca@codefactory.se>
3158 * dbus/dbus-marshal.c: (_dbus_marshal_string),
3159 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3160 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
3161 (_dbus_marshal_test):
3162 * dbus/dbus-marshal.h:
3163 Add string marshal functions and have the demarshal functions
3164 return the new position.
3166 2002-12-25 Havoc Pennington <hp@pobox.com>
3168 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
3169 it is a simple protocol that just maps directly to SASL.
3171 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
3172 initial implementation, not actually used yet.
3174 * dbus/dbus-string.c (_dbus_string_find): new function
3175 (_dbus_string_equal): new function
3176 (_dbus_string_base64_encode): new function
3177 (_dbus_string_base64_decode): new function
3179 2002-12-25 Anders Carlsson <andersca@codefactory.se>
3182 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
3183 (_dbus_marshal_int32), (_dbus_marshal_uint32),
3184 (_dbus_demarshal_double), (_dbus_demarshal_int32),
3185 (_dbus_demarshal_uint32), (_dbus_marshal_test):
3186 * dbus/dbus-marshal.h:
3187 * dbus/dbus-protocol.h:
3188 * dbus/dbus-test.c: (main):
3190 Add un-optimized marshalling/demarshalling routines.
3192 2002-12-25 Harri Porten <porten@kde.org>
3194 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
3196 2002-12-24 Zack Rusin <zack@kde.org>
3198 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
3199 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
3202 2002-12-24 Havoc Pennington <hp@pobox.com>
3204 * glib/dbus-gthread.c: fix include
3206 * glib/dbus-glib.h: rename DBusMessageHandler for now.
3207 I think glib API needs to change, though, as you don't
3208 want to use DBusMessageFunction, you want to use the
3209 DBusMessageHandler object. Probably
3210 dbus_connection_open_with_g_main_loop()
3211 and dbus_connection_setup_g_main_loop() or something like that
3212 (but think of better names...) that just create a connection
3213 that has watch/timeout functions etc. already set up.
3215 * dbus/dbus-connection.c
3216 (dbus_connection_send_message_with_reply): new function just to
3217 show how the message handler helps us deal with replies.
3219 * dbus/dbus-list.c (_dbus_list_remove_last): new function
3221 * dbus/dbus-string.c (_dbus_string_test): free a string that
3224 * dbus/dbus-hash.c: use memory pools for the hash entries
3225 (rebuild_table): be more paranoid about overflow, and
3226 shrink table when we can
3227 (_dbus_hash_test): reduce number of sprintfs and write
3228 valid C89. Add tests for case where we grow and then
3229 shrink the hash table.
3231 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
3233 * dbus/dbus-connection.c (dbus_connection_register_handler)
3234 (dbus_connection_unregister_handler): new functions
3236 * dbus/dbus-message.c (dbus_message_get_name): new
3238 * dbus/dbus-list.c: fix docs typo
3240 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
3241 an object representing a handler for messages.
3243 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3246 * glib/dbus-gthread.c: (dbus_gthread_init):
3247 Don't use the gdbus prefix for public functions.
3249 2002-12-16 Anders Carlsson <andersca@codefactory.se>
3253 Add GLib checks and fixup .pc files
3257 * glib/dbus-gmain.c: (gdbus_connection_prepare),
3258 (gdbus_connection_check), (gdbus_connection_dispatch),
3259 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
3260 (dbus_connection_gsource_new):
3261 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
3262 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
3263 * glib/test-dbus-glib.c: (message_handler), (main):
3266 2002-12-15 Harri Porten <porten@kde.org>
3268 * autogen.sh: check for libtoolize before attempting to use it
3270 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
3273 * .cvsignore: ignore more stamp files
3275 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
3277 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
3278 without make install.
3280 2002-12-15 Havoc Pennington <hp@pobox.com>
3282 * dbus/dbus-threads.c: add thread stubs that a higher library
3283 layer can fill in. e.g. the GLib wrapper might fill them in with
3284 GThread stuff. We still need to use this thread API to
3285 thread-safe-ize the library.
3287 2002-12-12 Havoc Pennington <hp@pobox.com>
3289 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
3290 below new interfaces and include fewer system headers.
3292 * dbus/dbus-sysdeps.c (_dbus_read): new function
3293 (_dbus_write): new function
3294 (_dbus_write_two): new function
3295 (_dbus_connect_unix_socket): new function
3296 (_dbus_listen_unix_socket): new function
3298 * dbus/dbus-message-internal.h: change interfaces to use
3301 2002-12-11 Havoc Pennington <hp@pobox.com>
3303 * dbus/dbus-types.h: add dbus_unichar
3305 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
3307 * dbus/dbus-connection.c (dbus_connection_send_message): return
3310 * dbus/dbus-transport.c: include dbus-watch.h
3312 * dbus/dbus-connection.c: include dbus-message-internal.h
3314 * HACKING: add file with coding guidelines stuff.
3316 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
3317 handling here, for security purposes (as in vsftpd). Not actually
3318 using this class yet.
3320 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
3321 system/libc usage here, as in vsftpd, for ease of auditing (and
3322 should also simplify portability). Haven't actually moved all the
3323 system/libc usage into here yet.
3325 2002-11-25 Havoc Pennington <hp@pobox.com>
3327 * dbus/dbus-internals.c (_dbus_verbose): fix to not
3328 always print the first verbose message.
3330 2002-11-24 Havoc Pennington <hp@pobox.com>
3332 * test/echo-client.c, test/echo-server.c: cheesy test
3335 * configure.in (AC_CHECK_FUNCS): check for writev
3337 * dbus/dbus-message.c (_dbus_message_get_network_data): new
3340 * dbus/dbus-list.c (_dbus_list_foreach): new function
3342 * dbus/dbus-internals.c (_dbus_verbose): new function
3344 * dbus/dbus-server.c, dbus/dbus-server.h: public object
3345 representing a server that listens for connections.
3347 * dbus/.cvsignore: create
3349 * dbus/dbus-errors.h, dbus/dbus-errors.c:
3350 public API for reporting errors
3352 * dbus/dbus-connection.h, dbus/dbus-connection.c:
3353 public object representing a connection that
3354 sends/receives messages. (Same object used for
3355 both client and server.)
3357 * dbus/dbus-transport.h, dbus/dbus-transport.c:
3358 Basic abstraction for different kinds of stream
3359 that we might read/write messages from.
3361 2002-11-23 Havoc Pennington <hp@pobox.com>
3363 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3366 * dbus/dbus-test.c (main): add list test, and include
3367 dbus-test.h as intended
3369 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3370 (_dbus_hash_table_remove_int): return value indicates
3371 whether the entry existed to remove
3373 * dbus/dbus-list.c: add linked list utility class,
3376 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3379 2002-11-23 Havoc Pennington <hp@pobox.com>
3381 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3382 DBUS_END_DECLS to nothing, that should fix this once and for all
3384 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3386 * dbus/dbus-message.c, dbus/dbus-hash.c:
3387 add some missing @brief
3389 2002-11-23 Havoc Pennington <hp@pobox.com>
3391 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3392 to avoid confusing Doxygen
3394 * dbus/dbus-hash.c: @} not }@
3396 * dbus/dbus-message.c (struct DBusMessage): split out
3399 2002-11-23 Havoc Pennington <hp@pobox.com>
3401 * configure.in: pile on more warning flags if using gcc
3403 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3404 to document static functions
3406 * configure.in: add summary to end of configure so it
3407 looks nice and attractive
3409 * dbus/dbus-hash.c: finish implementation and write unit
3412 * configure.in: add --enable-tests to enable unit tests
3414 * dbus/dbus-test.c: test program to run unit tests
3415 for all files in dbus/*, initially runs a test for
3418 * dbus/dbus-internals.h: file to hold some internal utility stuff
3420 2002-11-22 Havoc Pennington <hp@redhat.com>
3422 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3423 "ported" away from Tcl
3425 * dbus/dbus-types.h: header for types such as dbus_bool_t
3427 2002-11-22 Havoc Pennington <hp@redhat.com>
3429 * dbus/dbus.h: fixups for doc warnings
3431 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3433 (QUIET): make it quiet so we can see warnings
3435 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3437 2002-11-22 Havoc Pennington <hp@redhat.com>
3439 * Makefile.am: include "Doxyfile" target in all-local
3441 * configure.in: generate the Doxyfile
3443 * Doxyfile.in: move Doxyfile here, so we can use
3444 configure to generate a Doxyfile with the right
3447 2002-11-22 Havoc Pennington <hp@redhat.com>
3449 * dbus/dbus-message.c: move inline docs into .c file
3451 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3452 so all docs are under doc/
3453 (MAN_EXTENSION): generate man pages. Use extension
3454 ".3dbus" which matches ".3qt" on my system,
3455 I guess this is OK, I don't know really.
3456 (FILE_PATTERNS): look for .c files not .h, makes sense
3459 2002-11-22 Havoc Pennington <hp@pobox.com>
3461 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3462 because any app can be a server, and any app can be a client,
3463 the bus is a special kind of server.
3465 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3467 * Doxyfile : adding. Still needs Makefile rules to be generated
3468 automatically (just run "doxygen" in the toplevel dir for now to
3471 * dbus/dbus-message.h : Adding sample docs (javadoc since
3472 resembles gtk-doc a little more)
3474 * dbus/dbus.h : Adding sample docs
3476 2002-11-21 Havoc Pennington <hp@redhat.com>
3478 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3479 so we can allow ourselves to include files directly,
3480 instead of having to use dbus.h
3482 * dbus/dbus.h: fill in
3484 * dbus/dbus-message.h: sketch out a sample header file.
3485 Include griping if you include it directly instead of
3488 * dbus/dbus-macros.h: new file with macros for extern "C",
3489 TRUE/FALSE, NULL, etc.
3491 * doc/file-boilerplate.c: put include guards in here
3493 2002-11-21 Havoc Pennington <hp@redhat.com>
3495 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3497 * COPYING: include the GPL as well, and license code
3498 under both AFL and GPL.
3500 2002-11-21 Havoc Pennington <hp@redhat.com>
3502 * acconfig.h: get rid of this
3504 * autogen.sh (run_configure): add --no-configure option
3506 * configure.in: remove AC_ARG_PROGRAM to make
3507 autoconf complain less. add AC_PREREQ.
3508 add AC_DEFINE third arg.
3510 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3513 Fix references so we can distcheck.
3515 2002-11-21 Havoc Pennington <hp@redhat.com>
3517 * Initial module creation