1 2003-03-17 Havoc Pennington <hp@pobox.com>
3 All tests pass, no memleaks, no valgrind complaints.
5 * bus/test.c: refcount handler_slot
7 * bus/connection.c (bus_connections_new): refcount
10 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
11 bytes so that auth scripts pass.
13 * bus/dispatch.c: init message_handler_slot so it gets allocated
16 * bus/dispatch.c (message_handler_slot_ref): fix memleak
18 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
19 dealloc server_pipe_hash when no longer used for benefit of
22 * dbus/dbus-auth.c (process_command): memleak fix
24 * bus/dispatch.c (check_hello_message): memleak fix
26 2003-03-16 Havoc Pennington <hp@pobox.com>
28 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
30 2003-03-17 Anders Carlsson <andersca@codefactory.se>
32 * bus/activation.c (bus_activation_activate_service): Append
33 the pending activation entry to the list of pending activations.
35 2003-03-16 Havoc Pennington <hp@pobox.com>
37 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
40 * dbus/dbus-address.c (create_entry): fix OOM handling when
41 failing to alloc entry->method
43 2003-03-16 Havoc Pennington <hp@pobox.com>
45 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
48 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
49 add some missing dbus_set_result
51 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
52 alloc the DBusMessageHandler
54 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
55 the transport here, since we call this from the finalizer; it
56 resulted in a double-finalize.
58 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
59 where we tried to use transport->connection that was NULL,
60 happened when transport was disconnected early on due to OOM
62 * bus/*.c: adapt to handle OOM for watches/timeouts
64 * dbus/dbus-transport-unix.c: port to handle OOM during
67 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
68 reference to unused bytes instead of a copy
70 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
73 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
76 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
79 2003-03-16 Anders Carlsson <andersca@codefactory.se>
81 * doc/dbus-specification.sgml:
82 Document reply message for ActivateService.
84 2003-03-16 Anders Carlsson <andersca@codefactory.se>
86 * bus/activation.c: (bus_pending_activation_entry_free),
87 (bus_pending_activation_free), (bus_activation_new),
88 (bus_activation_unref), (bus_activation_service_created),
89 (bus_activation_activate_service):
91 * bus/bus.c: (bus_context_new):
92 * bus/desktop-file.c: (new_section):
93 * bus/driver.c: (bus_driver_send_service_deleted),
94 (bus_driver_handle_activate_service):
95 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
97 * dbus/dbus-connection.c:
98 (dbus_connection_send_with_reply_and_block):
99 * dbus/dbus-message.c: (dbus_message_append_args_valist):
100 * dbus/dbus-protocol.h:
101 Make activation work better. Now pending activations will be queued
102 and the daemon won't try to activate services that are already registered.
104 2003-03-16 Havoc Pennington <hp@pobox.com>
106 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
109 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
110 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
112 2003-03-16 Havoc Pennington <hp@pobox.com>
114 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
115 this. always run the test suite before commit...
117 * bus/*: adapt to DBusConnection API changes
119 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
120 requires renaming stuff to avoid dbus_connection_dispatch name
123 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
126 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
127 separate from _dbus_message_loader_return_buffer()
129 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
130 this, because it's now always broken to use; the number of
131 messages in queue vs. the number still buffered by the message
132 loader is undefined/meaningless. Should use
133 dbus_connection_get_dispatch_state().
134 (dbus_connection_dispatch): rename from
135 dbus_connection_dispatch_message
137 2003-03-16 Havoc Pennington <hp@pobox.com>
139 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
142 2003-03-16 Anders Carlsson <andersca@codefactory.se>
144 * dbus/dbus-connection.c:
145 (dbus_connection_send_with_reply_and_block):
146 Decrease connection->n_incoming when removing an entry
148 * dbus/dbus-dict.c: (dbus_dict_entry_free),
149 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
150 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
151 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
152 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
153 (dbus_dict_get_byte_array):
154 Handle NULL arrays and strings. Also add support for byte arrays.
156 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
157 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
158 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
159 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
160 (_dbus_demarshal_dict), (demarshal_and_validate_len),
161 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
162 * dbus/dbus-marshal.h:
163 Add support for marshalling and demarshalling empty arrays and strings.
165 * dbus/dbus-message.c: (dbus_message_append_args_valist),
166 (dbus_message_append_string_array),
167 (dbus_message_iter_get_boolean),
168 (dbus_message_iter_get_boolean_array),
169 (dbus_message_iter_get_int32_array),
170 (dbus_message_iter_get_uint32_array),
171 (dbus_message_iter_get_double_array),
172 (dbus_message_iter_get_byte_array),
173 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
174 (check_message_handling):
175 Add support for getting empty arrays and dicts.
177 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
178 Don't do any validation at all for now, that's better than just checking
181 * test/data/valid-messages/emptiness.message:
182 New test message with lots of empty arrays.
184 2003-03-16 Havoc Pennington <hp@pobox.com>
186 * dbus/dbus-connection.c
187 (_dbus_connection_queue_received_message_link): new function that
188 can't fail due to OOM
190 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
191 new function pops a message together with a list link
194 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
195 message queuing functions to avoid needing to alloc memory
197 2003-03-16 Havoc Pennington <hp@pobox.com>
199 Oops - test code was only testing failure of around 30 of the
200 mallocs in the test path, but it turns out there are 500+
201 mallocs. I believe this was due to misguided linking setup such
202 that there was one copy of dbus_malloc etc. in the daemon and one
203 in the shared lib, and only daemon mallocs were tested. In any
204 case, the test case now tests all 500+ mallocs, and doesn't pass
205 yet, though there are lots of fixes in this patch.
207 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
208 this so that it doesn't need to allocate memory, since it
209 has no way of indicating failure due to OOM (and would be
212 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
214 * bus/Makefile.am: rearrange to create two self-contained
215 libraries, to avoid having libraries with overlapping symbols.
216 that was resulting in weirdness, e.g. I'm pretty sure there
217 were two copies of global static variables.
219 * dbus/dbus-internals.c: move the malloc debug stuff to
222 * dbus/dbus-list.c (free_link): free list mempool if it becomes
225 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
227 * dbus/dbus-address.c (dbus_parse_address): free list nodes
230 * bus/dispatch.c (bus_dispatch_add_connection): free
231 message_handler_slot when no longer using it, so
232 memory leak checkers are happy for the test suite.
234 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
236 * bus/bus.c (new_connection_callback): disconnect in here if
237 bus_connections_setup_connection fails.
239 * bus/connection.c (bus_connections_unref): fix to free the
241 (bus_connections_setup_connection): if this fails, don't
242 disconnect the connection, just be sure there are no side
245 * dbus/dbus-string.c (undo_alignment): unbreak this
247 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
249 (_dbus_auth_new): fix the order in which we free strings
252 * bus/connection.c (bus_connection_disconnected): fix to
253 not send ServiceDeleted multiple times in case of memory
256 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
257 get the base service name
258 (dbus_bus_register_client): don't return base service name,
259 instead store it on the DBusConnection and have an accessor
261 (dbus_bus_register_client): rename dbus_bus_register()
263 * bus/dispatch.c (check_hello_message): verify that other
264 connections on the bus also got the correct results, not
265 just the one sending hello
267 2003-03-15 Havoc Pennington <hp@pobox.com>
269 Make it pass the Hello handling test including all OOM codepaths.
270 Now to do other messages...
272 * bus/services.c (bus_service_remove_owner): fix crash when
273 removing owner from an empty list of owners
274 (bus_registry_ensure): don't leave service in the list of
275 a connection's owned services if we fail to put the service
278 * bus/connection.c (bus_connection_preallocate_oom_error): set
279 error flag on the OOM error.
281 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
282 handle _dbus_transport_set_connection failure
284 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
285 to create watches up front and simply enable/disable them as
287 (unix_connection_set): this can now fail on OOM
289 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
290 of enabling/disabling a watch or timeout.
292 * bus/loop.c (bus_loop_iterate): don't touch disabled
295 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
297 2003-03-15 Havoc Pennington <hp@pobox.com>
299 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
300 write useful test code, after all that futzing around ;-)
302 Test does not yet pass because we can't handle OOM in
303 _dbus_transport_messages_pending (basically,
304 dbus_connection_preallocate_send() does not prealloc the write
305 watch). To fix this, I think we need to add new stuff to
306 set_watch_functions, namely a SetEnabled function so we can alloc
307 the watch earlier, then enable it later.
309 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
310 dbus-memory.c to the convenience lib
312 * bus/test.c: rename some static functions to keep them clearly
313 distinct from stuff in connection.c. Handle client disconnection.
315 2003-03-14 Havoc Pennington <hp@pobox.com>
317 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
318 transport, tests more of the real codepath. Set up clients
319 with bus_setup_debug_client.
321 * bus/test.c (bus_setup_debug_client): function to set up debug
322 "clients" on the main loop
324 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
327 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
330 * dbus/dbus-server-debug.c: support a debug server based on pipes
332 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
333 (_dbus_close): new function
335 * configure.in: check for socketpair
337 2003-03-14 Havoc Pennington <hp@redhat.com>
339 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
342 * dbus/dbus-transport-debug.c: rework this a good bit to be
343 less complicated. hopefully still works.
345 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
348 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
351 * dbus/dbus-message.c (dbus_message_copy): rename from
352 dbus_message_new_from_message, fix it up to copy
353 all the message fields, add test case
355 * bus/dispatch.c (bus_dispatch_test): add some more test code,
356 not quite passing yet
358 2003-03-14 Havoc Pennington <hp@pobox.com>
360 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
361 until no work remains" in test code. (the large diff here
362 is just code movement, no actual changes)
364 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
365 1, no point waiting around for test code.
366 (_dbus_server_debug_accept_transport): unref the timeout
367 after adding it (right?)
369 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
371 2003-03-13 Havoc Pennington <hp@redhat.com>
373 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
376 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
379 * dbus/dbus-connection.h: Make AddWatchFunction and
380 AddTimeoutFunction return a bool so they can fail on out-of-memory
382 * bus/bus.c (bus_context_new): set up timeout handlers
384 * bus/connection.c (bus_connections_setup_connection): set up
387 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
390 * bus/bus.c (bus_context_new): adapt to changes
392 * bus/connection.c: adapt to changes
394 * test/watch.c: adapt to DBusWatch changes
396 * bus/dispatch.c (bus_dispatch_test): started adding this but
399 2003-03-14 Anders Carlsson <andersca@codefactory.se>
401 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
403 2003-03-13 Havoc Pennington <hp@pobox.com>
405 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
406 set up a test framework as for the library
408 2003-03-12 Havoc Pennington <hp@pobox.com>
410 Throughout: purge global variables, introduce BusActivation,
411 BusConnections, BusRegistry, etc. objects instead.
413 * bus/bus.h, bus/bus.c: introduce BusContext as a global
416 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
417 going to redo this a bit differently I think
419 2003-03-12 Havoc Pennington <hp@redhat.com>
421 Mega-patch that gets the message bus daemon initially handling
422 out-of-memory. Work still needed. Also lots of random
423 moving stuff to DBusError instead of ResultCode.
425 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
427 * dbus/dbus-connection.c
428 (dbus_connection_send_with_reply_and_block): use DBusError
430 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
433 * dbus/dbus-connection.c (dbus_connection_send): drop the result
434 code here, as the only failure possible is OOM.
436 * bus/connection.c (bus_connection_disconnect):
437 rename bus_connection_disconnected as it's a notification only
439 * bus/driver.c (bus_driver_handle_acquire_service): don't free
440 "name" on get_args failure, should be done by get_args;
441 don't disconnect client for bad args, just return an error.
442 (bus_driver_handle_service_exists): ditto
444 * bus/services.c (bus_services_list): NULL-terminate returned array
446 * bus/driver.c (bus_driver_send_service_lost)
447 (bus_driver_send_service_acquired): send messages from driver to a
448 specific client to the client's unique name, not to the broadcast
451 * dbus/dbus-message.c (decode_header_data): reject messages that
452 contain no name field
453 (_dbus_message_get_client_serial): rename to
454 dbus_message_get_serial and make public
455 (_dbus_message_set_serial): rename from set_client_serial
456 (_dbus_message_set_reply_serial): make public
457 (_dbus_message_get_reply_serial): make public
459 * bus/connection.c (bus_connection_foreach): allow stopping
460 iteration by returning FALSE from foreach function.
462 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
463 (dbus_connection_free_preallocated_send)
464 (dbus_connection_preallocate_send): new API for sending a message
465 without possibility of malloc failure.
466 (dbus_connection_send_message): rename to just
467 dbus_connection_send (and same for whole function family)
469 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
471 * dbus/dbus-sysdeps.c (_dbus_exit): new function
473 * bus/activation.c: handle/return errors
475 * dbus/dbus-errors.h: add more DBUS_ERROR #define
477 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
478 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
479 (_dbus_result_from_errno): move to this file
481 2003-03-10 Anders Carlsson <andersca@codefactory.se>
483 * dbus/dbus-marshal.c:
484 (_dbus_marshal_set_string):
485 Take a length argument so we can marshal the correct string
488 (_dbus_marshal_dict), (_dbus_demarshal_dict),
489 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
490 (_dbus_marshal_test):
491 * dbus/dbus-marshal.h:
492 Add support for marshalling and demarshalling dicts.
494 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
495 Add support for TYPE DICT.
497 * dbus/dbus-message.c: (set_string_field):
498 Adjust header padding.
500 (dbus_message_append_args_valist), (dbus_message_append_dict),
501 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
502 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
503 (check_message_handling), (check_have_valid_message):
504 * dbus/dbus-message.h:
505 Add functions for setting and getting dicts.
507 * dbus/dbus-protocol.h:
513 * doc/dbus-specification.sgml:
514 Add information about how dicts are marshalled.
516 * test/data/invalid-messages/dict-with-nil-value.message:
517 * test/data/invalid-messages/too-short-dict.message:
518 * test/data/valid-messages/dict-simple.message:
519 * test/data/valid-messages/dict.message:
520 Add sample messages containing dicts.
522 2003-03-08 Anders Carlsson <andersca@codefactory.se>
524 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
526 2003-03-07 Anders Carlsson <andersca@codefactory.se>
529 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
530 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
531 (dbus_dict_set_int32), (dbus_dict_set_uint32),
532 (dbus_dict_set_double), (dbus_dict_set_string),
533 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
534 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
535 (dbus_dict_set_string_array), (_dbus_dict_test):
537 Fix according to comments from Havoc.
539 2003-03-06 Michael Meeks <michael@server.home>
541 * configure.in: if we don't have kde-config, disable have_qt.
543 2003-03-07 Anders Carlsson <andersca@codefactory.se>
548 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
549 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
550 (dbus_dict_remove), (dbus_dict_get_value_type),
551 (dbus_dict_get_keys), (dbus_dict_put_boolean),
552 (dbus_dict_put_int32), (dbus_dict_put_uint32),
553 (dbus_dict_put_double), (dbus_dict_put_string),
554 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
555 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
556 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
557 (dbus_dict_get_int32), (dbus_dict_get_uint32),
558 (dbus_dict_get_double), (dbus_dict_get_string),
559 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
560 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
561 (dbus_dict_get_string_array), (_dbus_dict_test):
563 Add DBusDict implementation
565 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
569 2003-03-04 Havoc Pennington <hp@pobox.com>
571 * test/data/auth/*: adapt to changes
573 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
574 USERID_BASE64 and change USERNAME_BASE64 to put in username not
577 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
578 more stuff from being in a context name, to make the protocol
581 * dbus/dbus-errors.c (dbus_error_has_name): new function
582 (dbus_error_is_set): new function
584 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
585 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
587 * dbus/dbus-connection.c (dbus_connection_flush): also read
588 messages during a flush operation
590 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
592 2003-03-05 Anders Carlsson <andersca@codefactory.se>
594 * configure.in: Check for gethostbyname on Solaris.
596 * dbus/dbus-transport.c: (_dbus_transport_open):
597 Remove duplicate "tcp" entry.
599 * doc/dbus-specification.sgml:
602 2003-03-05 Anders Carlsson <andersca@codefactory.se>
604 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
605 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
606 (_dbus_keyring_test):
607 * dbus/dbus-md5.c: (_dbus_md5_compute):
608 * dbus/dbus-sha.c: (_dbus_sha_compute):
611 2003-03-05 Anders Carlsson <andersca@codefactory.se>
613 * README: Add some things.
615 2003-03-04 Anders Carlsson <andersca@codefactory.se>
617 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
618 after case DBUS_TYPE_BOOELAN.
620 2003-03-02 Havoc Pennington <hp@pobox.com>
622 * test/break-loader.c (randomly_set_extreme_ints): add test that
623 sets really huge and small integers
625 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
626 that length of boolean array fits in the string, and that
627 string has room for boolean value in single-bool case.
629 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
630 optional value to "ALIGN" command which is what to fill the
633 * test/data/valid-messages/no-padding.message: add regression
634 test for the message padding problem
636 2003-03-02 Havoc Pennington <hp@pobox.com>
638 * dbus/dbus-message.c (decode_header_data): fix to always init
639 message_padding, from Benjamin Dauvergne
641 2003-03-02 Havoc Pennington <hp@pobox.com>
647 2003-03-01 Joe Shaw <joe@assbarn.com>
649 * configure.in: Check for "struct cmsgcred" and try to access its
650 members for BSD-like unices.
652 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
653 _dbus_read_credentials_unix_socket().
654 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
655 read() for reading the credential byte off the unix socket. Use
656 struct cmsgcred on systems that support it.
658 2003-02-27 Alexander Larsson <alexl@redhat.com>
662 Make gthreads-2.0 dependency optional. Don't build thread test if
665 2003-02-27 Havoc Pennington <hp@pobox.com>
667 * dbus/dbus-connection.c
668 (dbus_connection_send_message_with_reply_and_block): fix doh!
669 doh! doh! bug that resulted in never removing a reply from the
670 queue, no wonder we called get_reply_serial so much ;-)
672 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
673 and client serial instead of demarshaling them every time
675 2003-02-27 Havoc Pennington <hp@pobox.com>
677 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
678 more inlined, using dbus-string-private.h, speeds things up
681 * dbus/dbus-string.c (_dbus_string_free): apply align offset
682 when freeing the string
683 (_dbus_string_steal_data): fix for align offset
684 (undo_alignment): new function
686 2003-02-26 Havoc Pennington <hp@redhat.com>
688 All kinds of audit fixes from Owen, plus initial attempt to
689 handle unaligned memory returned from malloc.
691 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
692 leave room for align_offset and nul byte
693 (fixup_alignment): function to track an align_offset and
694 ensure real->str is aligned
695 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
696 to allow a nul byte plus align offset
697 (_dbus_string_lock): fix overflow issue
698 (_dbus_string_init_const_len): add assertions on sanity of len,
699 assign allocated to be ALLOCATION_PADDING larger than len
700 (set_length): fixup the overflow handling
701 (_dbus_string_get_data_len): fix overflow in assertion
702 (open_gap): detect overflow in size of gap to be opened
703 (_dbus_string_lengthen): add overflow check
704 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
705 (_dbus_string_append): add overflow check
706 (_dbus_string_append_unichar): overflow
707 (_dbus_string_delete): fix overflow in assertion
708 (_dbus_string_copy_len): overflow in assertion
709 (_dbus_string_replace_len): overflows in assertions
710 (_dbus_string_find): change to implement in terms of
712 (_dbus_string_find_to): assorted fixage
713 (_dbus_string_equal_c_str): assert c_str != NULL,
714 fix logic so the function works
715 (_dbus_string_ends_with_c_str): fix overflow thingy
716 (_dbus_string_base64_encode): overflow fix
717 (_dbus_string_validate_ascii): overflow
718 (_dbus_string_validate_nul): overflow
720 2003-02-26 Havoc Pennington <hp@redhat.com>
722 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
724 2003-02-26 Alexander Larsson <alexl@redhat.com>
727 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
729 * dbus/dbus-connection.c:
730 * dbus/dbus-connection.h:
731 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
732 Add dbus_connection_set_wakeup_main_function and use it when queueing
733 incoming and outgoing messages.
736 * dbus/dbus-dataslot.c:
737 Threadsafe usage of DBusDataSlotAllocator
739 * dbus/dbus-message.c: (dbus_message_get_args_iter):
742 * dbus/dbus-server-unix.c:
746 Implement the new wakeup functions for glib.
749 * glib/test-thread-client.c:
750 * glib/test-thread-server.c:
751 * glib/test-thread.h:
752 Initial cut at some thread test code. Not really done yet.
754 2003-02-26 Havoc Pennington <hp@pobox.com>
756 * dbus/dbus-connection.c
757 (dbus_connection_send_message_with_reply_and_block): fix crash
758 where we ref'd the outgoing message instead of the returned reply
760 * dbus/dbus-transport-unix.c (do_authentication): check read watch
761 at the end of this function, so if we didn't need to read for
762 authentication, we reinstall it for receiving messages
764 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
765 a NULL sender for peer-to-peer case
767 * dbus/dbus-transport-unix.c (check_read_watch): handle
768 !authenticated case correctly
770 * glib/dbus-gmain.c: add support for DBusServer
772 * dbus/dbus-server.c: add data slot support
774 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
775 return values and handle errors
777 * dbus/dbus-dataslot.c: factor out the data slot stuff from
780 * Doxyfile.in (INPUT): add glib subdir
782 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
783 setup_with_g_main instead of hookup_with_g_main; write docs
785 2003-02-24 Anders Carlsson <andersca@codefactory.se>
787 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
788 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
789 * dbus/dbus-message.c: (dbus_message_append_boolean),
790 (dbus_message_append_boolean_array),
791 (dbus_message_get_args_valist), (_dbus_message_test):
792 * dbus/dbus-message.h:
793 * doc/dbus-specification.sgml:
794 Various fixes as pointed out by Havoc.
796 * test/data/invalid-messages/bad-boolean-array.message:
797 * test/data/invalid-messages/bad-boolean.message:
798 Add invalid boolean value test cases.
800 2003-02-24 Anders Carlsson <andersca@codefactory.se>
802 * dbus/dbus-internals.c: (_dbus_type_to_string):
803 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
804 (_dbus_marshal_validate_arg):
805 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
806 * dbus/dbus-message.c: (dbus_message_append_args_valist),
807 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
808 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
809 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
810 (dbus_message_iter_get_double),
811 (dbus_message_iter_get_boolean_array), (message_iter_test):
812 * dbus/dbus-message.h:
813 * dbus/dbus-protocol.h:
814 * doc/dbus-specification.sgml:
815 * test/data/valid-messages/lots-of-arguments.message:
816 Add support for boolean and boolean array types.
818 2003-02-23 Havoc Pennington <hp@pobox.com>
820 * dbus/dbus-keyring.c: finish most of this implementation and
823 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
824 these barf if the error isn't cleared to NULL
826 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
827 (_dbus_create_directory): new function
829 * dbus/dbus-errors.c (dbus_set_error): fix warning
831 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
832 (_dbus_string_hex_decode): new function
833 (test_hex_roundtrip): test code
835 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
837 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
839 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
840 the save-to-temp/rename trick to atomically write the new file
841 (_dbus_string_parse_uint): new function
843 2003-02-22 Havoc Pennington <hp@pobox.com>
845 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
847 2003-02-22 Havoc Pennington <hp@pobox.com>
849 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
850 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
852 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
854 * dbus/test/data/sha-1: add US government test suite for SHA-1
856 2003-02-21 Anders Carlsson <andersca@codefactory.se>
858 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
859 Make string arrays NULL-terminated.
861 * dbus/dbus-memory.c: (dbus_free_string_array):
862 * dbus/dbus-memory.h:
863 New function for freeing NULL-terminated string arrays.
865 * dbus/dbus-message-builder.c: (append_quoted_string),
866 (_dbus_message_data_load):
867 Add support for array types.
869 * dbus/dbus-message.c: (check_message_handling):
870 Add more types as test cases.
872 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
873 (_dbus_string_parse_double):
874 Add the start offset to the end offset.
876 * test/data/valid-messages/lots-of-arguments.message:
877 New test message with lots of arguments.
879 2003-02-21 Anders Carlsson <andersca@codefactory.se>
881 * dbus/dbus-message.c: (dbus_message_append_nil),
882 (dbus_message_append_int32), (dbus_message_append_uint32),
883 (dbus_message_append_double), (dbus_message_append_string),
884 (dbus_message_append_int32_array),
885 (dbus_message_append_uint32_array),
886 (dbus_message_append_double_array),
887 (dbus_message_append_byte_array),
888 (dbus_message_append_string_array):
889 Fix all out-of-memory handling in these functions.
891 2003-02-21 Anders Carlsson <andersca@codefactory.se>
893 * dbus/dbus-message.c: (dbus_message_append_nil):
896 2003-02-21 Anders Carlsson <andersca@codefactory.se>
898 * dbus/dbus-message.c: (dbus_message_append_args_valist),
899 (dbus_message_append_nil), (dbus_message_append_int32_array),
900 (dbus_message_append_uint32_array),
901 (dbus_message_append_double_array),
902 (dbus_message_append_byte_array),
903 (dbus_message_append_string_array), (dbus_message_get_args_valist),
904 (dbus_message_iter_get_int32_array),
905 (dbus_message_iter_get_uint32_array),
906 (dbus_message_iter_get_double_array),
907 (dbus_message_iter_get_byte_array),
908 (dbus_message_iter_get_string_array):
910 * dbus/dbus-message.h:
911 Add functions for appending and getting arrays.
913 2003-02-21 Anders Carlsson <andersca@codefactory.se>
915 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
916 element size at least 8 bytes, fixes mempool tests on
919 2003-02-20 Alexander Larsson <alexl@redhat.com>
921 * dbus/dbus-transport-unix.c (unix_do_iteration):
922 Unlock the connection mutex during a blocking select call.
923 Add todo about how we need a way to wake up the select.
925 * dbus/dbus-connection-internal.h:
926 * dbus/dbus-connection.c:
927 Add _dbus_connection_lock and _dbus_connection_unlock.
929 2003-02-19 Havoc Pennington <hp@pobox.com>
931 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
932 Doxyfile.in, not Doxyfile
934 * dbus/dbus-keyring.c: do some hacking on this
936 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
938 * dbus/dbus-errors.c (dbus_set_error_const): do not call
940 (dbus_set_error): remove dbus_error_init, check for message ==
941 NULL *before* we sprintf into it, and add @todo about including
942 system headers in this file
944 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
946 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
948 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
949 get various bits of user information based on either username
951 (_dbus_homedir_from_username): new function
953 2003-02-19 Anders Carlsson <andersca@codefactory.se>
956 Add check for nonposix getpwnam_r
958 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
959 Align the pool element size to a sizeof (void *) boundary.
961 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
962 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
963 General Solaris fixes.
965 * test/data/valid-messages/simplest-manual.message:
966 Explicitly state that we want little-endian packing.
968 2003-02-19 Mikael Hallendal <micke@codefactory.se>
970 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
972 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
973 Added to create a transport connecting using a tcp/ip socket.
975 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
976 to a tcp socket at given host and port.
977 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
980 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
982 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
983 Added to create a server listening on a TCP/IP socket.
985 2003-02-19 Havoc Pennington <hp@pobox.com>
987 Throughout: mop up all the Doxygen warnings and undocumented
990 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
993 * dbus/dbus-threads.c: move global mutex initializers to
994 dbus-internals.h, multiple prototypes was confusing doxygen
995 besides being kind of ugly
997 * Doxyfile (PREDEFINED): have Doxygen define
998 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
999 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1000 (do not abuse the feature! it's for stuff like the autogenerated
1001 macros in dbus-md5.c, not just for things you don't feel like
1004 2003-02-18 Havoc Pennington <hp@pobox.com>
1006 * dbus/dbus-string.c (_dbus_string_zero): new function
1008 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1009 wrap it in some dbus-friendly API
1011 * dbus/dbus-types.h: add 16-bit types
1013 2003-02-18 Joe Shaw <joe@assbarn.com>
1015 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1016 credentials from our currently running process.
1017 (get_word): Fix a buglet where we were copying the entire length
1018 instead of relative to our position.
1020 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1021 keys on the stack... it's 640k of data.
1023 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1024 read the credentials byte off the socket, even if we don't have
1026 (_dbus_poll): Implement poll() using select() for systems which
1029 * glib/test-dbus-glib.c (main): Print out an error if no
1030 parameters are given.
1032 * test/data/auth/fallback.auth-script: Added. Tests that a client
1033 can fallback to a secondary auth mechanism if the first fails.
1035 2003-02-18 Havoc Pennington <hp@pobox.com>
1039 2003-02-17 Havoc Pennington <hp@pobox.com>
1041 * doc/dbus-specification.sgml: lots of cosmetic
1042 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1043 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1044 s/server/bus/ (except in authentication section). Add a section
1045 "Message Bus Message Routing"
1047 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1053 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1055 * doc/dbus-specification.sgml:
1056 Specification updates.
1058 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1060 * bus/activation.c: (bus_activation_init), (child_setup),
1061 (bus_activation_activate_service):
1063 * bus/main.c: (main):
1064 Set DBUS_ADDRESS environment variable.
1066 * dbus/dbus-errors.c: (dbus_set_error):
1067 Don't use va_copy since that's a C99 feature.
1069 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1070 (_dbus_spawn_async):
1071 * dbus/dbus-sysdeps.h:
1072 Add child_setup_func to _dbus_spawn_async.
1074 * doc/dbus-specification.sgml:
1075 Update specification.
1077 * test/spawn-test.c: (setup_func), (main):
1080 2003-02-17 Alexander Larsson <alexl@redhat.com>
1082 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1085 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1089 * doc/dbus-test-plan.sgml:
1090 Add test plan document.
1095 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1097 * dbus/dbus-message.c: (decode_header_data),
1098 (_dbus_message_loader_return_buffer):
1099 Set the header padding amount when loading a message.
1101 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1103 * bus/dispatch.c: (send_one_message):
1104 Only send broadcast messages to registered connections.
1106 * dbus/dbus-message.c: (dbus_message_name_is):
1107 * dbus/dbus-message.h:
1108 New convenience function.
1110 * dbus/dbus-transport-debug.c: (do_reading):
1111 Only dispatch one message per run.
1114 * test/bus-test.c: (new_connection_callback), (die),
1115 (test_hello_client1_handler), (test_hello_client2_handler),
1116 (test_hello_replies), (main):
1118 * test/bus-test-loop.[ch]:
1121 2003-02-16 Havoc Pennington <hp@pobox.com>
1123 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1124 backward conditional
1126 2003-02-16 Alexander Larsson <alexl@redhat.com>
1128 * dbus/dbus-connection.c:
1129 Implement sent_message_with_reply. (with_reply_and block is still
1131 Made dispatch_message not lose message if OOM.
1133 * dbus/dbus-errors.h:
1134 Add NoReply error (for reply timeouts).
1136 2003-02-16 Alexander Larsson <alexl@redhat.com>
1138 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1139 Actually free keys and values when destroying hashtable.
1141 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1143 * dbus/dbus-auth.c: (client_try_next_mechanism):
1146 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1147 Return TRUE if there's no thread implementation around.
1149 * glib/dbus-gmain.c: (free_source),
1150 (dbus_connection_hookup_with_g_main):
1151 Make sure to remove the GSource when the connection is finalized.
1153 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1155 * bus/dispatch.c: (bus_dispatch_message_handler):
1156 * dbus/dbus-errors.h:
1157 Return an error if someone tries to send a message to a service
1160 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1162 * bus/activation.c: (load_directory), (bus_activation_init),
1163 (bus_activation_activate_service):
1166 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1167 More work on the activation handling.
1169 * dbus/dbus-errors.h:
1170 Add some error messages
1172 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1173 * dbus/dbus-message.h:
1174 New function that creates an error message.
1176 * dbus/dbus-protocol.h:
1177 Add ACTIVATE_SERVER message.
1179 * dbus/dbus-server-unix.c: (unix_handle_watch),
1180 (_dbus_server_new_for_domain_socket):
1181 Call _dbus_fd_set_close_on_exec.
1183 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1184 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1185 (_dbus_fd_set_close_on_exec):
1186 * dbus/dbus-sysdeps.h:
1187 Add _dbus_fd_set_close_on exec function. Also add function that checks
1188 that all open fds are set to close-on-exec and warns otherwise.
1190 * dbus/dbus-transport-unix.c:
1191 (_dbus_transport_new_for_domain_socket):
1192 Call _dbus_fd_set_close_on_exec.
1194 2003-02-16 Havoc Pennington <hp@pobox.com>
1196 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1197 allow people to avoid setting SIGPIPE to SIG_IGN
1198 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1199 we've been asked not to
1201 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1203 * dbus/dbus-list.c: (_dbus_list_append_link),
1204 (_dbus_list_prepend_link):
1205 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1209 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1212 * bus/activation.c: (bus_activation_entry_free),
1213 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1215 * bus/main.c: (main):
1216 Add simple activation support, doesn't work yet though.
1218 2003-02-15 Zack Rusin <zack@kde.org>
1220 * qt/dbus-qthread.cpp: small casting fix
1222 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1224 * dbus/dbus-errors.c: (dbus_set_error):
1225 * dbus/dbus-errors.h:
1226 Add a few errors and make dbus_set_error void.
1228 * dbus/dbus-sysdeps.c:
1229 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1230 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1231 * dbus/dbus-sysdeps.h:
1232 Add _dbus_spawn_async.
1234 * test/spawn-test.c: (main):
1235 Test for _dbus_spawn_async.
1237 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1239 * dbus/dbus-internals.h:
1240 Fix build without tests.
1242 * dbus/dbus-list.c: (alloc_link):
1243 Fix a segfault when a malloc fails.
1245 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1246 (dbus_malloc0), (dbus_realloc):
1247 Add support for malloc debugging.
1249 2003-02-15 Alexander Larsson <alexl@redhat.com>
1251 * dbus/dbus-threads.c:
1252 * dbus/dbus-threads.h:
1253 Add condvars. Remove static mutext from API.
1254 Implement static mutexes by initializing them from threads_init.
1256 * glib/dbus-gthread.c:
1257 * qt/dbus-qthread.cpp:
1258 Update with the thread api changes.
1263 Turn StaticMutex into normal mutex + init function.
1264 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1265 _dbus_list_append_link, _dbus_list_prepend_link
1268 * dbus/dbus-sysdeps.c:
1269 * dbus/dbus-sysdeps.h:
1270 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1271 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1273 * dbus/dbus-protocol.h:
1274 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1276 * dbus/dbus-message.c:
1277 Make ref/unref atomic.
1280 * dbus/dbus-connection-internal.h:
1281 * dbus/dbus-connection.c:
1282 * dbus/dbus-connection.h:
1284 Change _peek to _borrow,_return & _steal_borrowed.
1285 Change disconnect callback to event.
1286 Make dbus_connection_dispatch_messages reentrant.
1288 * dbus/dbus-transport.c:
1289 Don't ref the connection on calls to the transport
1292 * dbus/dbus-message-handler.c:
1295 * glib/dbus-gmain.c:
1296 Don't use peek_message anymore
1299 * test/debug-thread.c:
1300 * test/debug-thread.h:
1301 Simple thread implementation that asserts() on deadlocks in
1302 single-threaded code.
1305 (main) Call debug_threads_init.
1308 Use disconnect message instead of disconnect callback.
1312 Don't call dbus_connection_set_disconnect_function. Instead export
1313 bus_connection_disconnect.
1316 Call bus_connection_disconnect when we get a disconnected message.
1318 2003-02-15 Havoc Pennington <hp@pobox.com>
1320 * dbus/dbus-message.c (dbus_message_new): fool around with the
1323 2003-02-14 Havoc Pennington <hp@pobox.com>
1325 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1327 * dbus/dbus-memory.c: fail if the debug functions indicate we
1330 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1331 (_dbus_decrement_fail_alloc_counter): debug functions to
1332 simulate memory allocation failures
1334 2003-02-14 Havoc Pennington <hp@pobox.com>
1336 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1339 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1341 * bus/driver.c: (bus_driver_handle_hello):
1343 * bus/services.c: (bus_service_lookup):
1344 Reorder message sending so we get a more sane order.
1346 * test/bus-test.c: (message_handler):
1349 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1351 * bus/driver.c: (bus_driver_send_service_deleted),
1352 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1353 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1354 (bus_driver_send_welcome_message),
1355 (bus_driver_handle_list_services),
1356 (bus_driver_handle_acquire_service),
1357 (bus_driver_handle_service_exists):
1358 * dbus/dbus-bus.c: (dbus_bus_register_client),
1359 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1360 * dbus/dbus-errors.c: (dbus_result_to_string):
1361 * dbus/dbus-errors.h:
1362 * dbus/dbus-message.c: (dbus_message_append_args),
1363 (dbus_message_append_args_valist), (dbus_message_get_args),
1364 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1365 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1366 (dbus_message_iter_get_byte_array),
1367 (dbus_message_iter_get_string_array), (message_iter_test),
1368 (check_message_handling), (_dbus_message_test):
1369 * dbus/dbus-message.h:
1370 * test/bus-test.c: (main):
1371 Change fields to arguments in messages, so that they won't be
1372 confused with header fields.
1374 * glib/test-dbus-glib.c: (main):
1375 Remove append_fields from hello message.
1377 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1379 * dbus/dbus-errors.c:
1380 * dbus/dbus-message.c:
1381 * dbus/dbus-string.c:
1382 Documentation fixes.
1384 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1386 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1388 Implement support for timeouts in dbus-glib.
1390 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1392 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1393 * dbus/dbus-message.c: (process_test_subdir):
1394 * test/break-loader.c: (find_breaks_based_on):
1395 Plug some memory leaks.
1397 2003-02-13 Richard Hult <rhult@codefactory.se>
1399 * bus/main.c: Fix build.
1401 * dbus/dbus-errors.h:
1402 * dbus/dbus-errors.c: Fix copyright for Anders.
1404 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1409 * bus/connection.c: (bus_connection_foreach):
1412 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1413 (unescape_string), (new_section), (parse_section_start),
1414 (parse_key_value), (report_error), (bus_desktop_file_load),
1415 (bus_desktop_file_get_string):
1416 * bus/desktop-file.h:
1417 Use DBusError for error reporting.
1419 * bus/dispatch.c: (send_one_message),
1420 (bus_dispatch_message_handler):
1421 * bus/driver.c: (bus_driver_send_service_deleted),
1422 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1423 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1424 (bus_driver_send_welcome_message),
1425 (bus_driver_handle_list_services),
1426 (bus_driver_handle_acquire_service),
1427 (bus_driver_handle_service_exists):
1428 * bus/loop.c: (bus_loop_run):
1430 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1432 * bus/utils.c: (bus_wait_for_memory):
1434 New files with general utility functions.
1436 * dbus/dbus-internals.h:
1437 Remove _DBUS_HANDLE_OOM.
1439 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1441 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1442 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1443 * dbus/dbus-errors.h:
1444 Add DBusError structure.
1446 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1448 * test/data/valid-messages/standard-acquire-service.message:
1449 * test/data/valid-messages/standard-hello.message:
1450 * test/data/valid-messages/standard-list-services.message:
1451 * test/data/valid-messages/standard-service-exists.message:
1452 Add some standard messages.
1454 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1456 * bus/driver.c: (bus_driver_send_welcome_message),
1457 (bus_driver_handle_list_services),
1458 (bus_driver_handle_acquire_service),
1459 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1460 Update for API changes in libdbus.
1462 * dbus/dbus-message.c: (dbus_message_new_reply):
1463 * dbus/dbus-message.h:
1464 Remove the name argument. The spec states that replies shouldn't
1467 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1469 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1470 (report_error), (bus_desktop_file_load), (lookup_section),
1471 (lookup_line), (bus_desktop_file_get_raw),
1472 (bus_desktop_file_get_string):
1473 * bus/desktop-file.h:
1474 Some fixes, and new functions for getting a key value from a section.
1476 2003-02-13 Havoc Pennington <hp@pobox.com>
1478 * test/data/auth/fail-after-n-attempts.auth-script: new test
1480 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1483 2003-02-13 Havoc Pennington <hp@pobox.com>
1485 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1486 dbus_credentials_match were backward
1488 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1489 NO_CREDENTIALS and ROOT_CREDENTIALS
1491 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1492 into here. Never process more commands after we've reached an
1493 end state; store further data as unused bytes.
1495 * test/data/auth/*: add more auth tests
1497 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1498 command to match exact string and EXPECT_UNUSED to match unused
1501 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1503 2003-02-12 Havoc Pennington <hp@pobox.com>
1505 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1506 \r off of popped lines
1508 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1511 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1514 2003-02-12 Havoc Pennington <hp@pobox.com>
1516 * dbus/Makefile.am: remove break-loader from the build, since it
1519 * configure.in: add --enable-gcov to turn on coverage profiling
1520 flags and disable optimization
1522 2003-02-10 Havoc Pennington <hp@pobox.com>
1524 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1525 initial cut at test framework for DBusAuth from laptop.
1526 Doesn't quite work yet but it compiles and I need to get
1527 it off the 266mhz laptop. ;-)
1529 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1530 fix a memleak in error case
1532 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1535 * bus/desktop-file.c:
1536 * bus/desktop-file.h:
1537 Add a desktop file parser.
1539 2003-02-11 Zack Rusin <zack@kde.org>
1541 * qt/message.[h|cpp]: sample implementation
1542 of the KDE wrapper for DBusMessage
1544 2003-02-09 Zack Rusin <zack@kde.org>
1546 * test/bus-test.c: make_it_compile
1547 * doc/dbus-specification.sgml: minimal semantic fix
1549 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1555 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1558 * dbus/dbus-break-loader.c:
1560 * test/break-loader.c:
1561 Move dbus-break-loader to test/ and rename it to break-loader.
1563 2003-02-02 Havoc Pennington <hp@pobox.com>
1565 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1566 for code to manage cookies in your home directory
1568 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1570 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1571 to authenticate, then disconnect the client.
1573 2003-02-03 Alexander Larsson <alexl@redhat.com>
1575 * dbus/dbus-message.c (dbus_message_append_fields):
1578 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1580 * doc/dbus-specification.sgml:
1581 Update address format section.
1583 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1586 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1587 (message_handler), (new_connection_callback), (loop_quit),
1591 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1593 * bus/driver.c: (bus_driver_handle_service_exists):
1594 Simplify the code a bit.
1596 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1599 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1602 Add libdbus-daemon.la and link to it.
1604 2003-02-01 James Willcox <jwillcox@gnome.org>
1606 * bus/driver.c: (bus_driver_handle_own_service):
1607 Actually include the service reply code in the message.
1609 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1611 * bus/driver.c: (bus_driver_handle_service_exists):
1612 Don't unref the incoming message.
1614 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1616 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1618 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1620 * dbus/dbus-server.c: (dbus_server_listen):
1621 * dbus/dbus-transport.c: (_dbus_transport_open):
1622 ifdef out the calls to the debug transport and server.
1624 2003-02-02 Alexander Larsson <alexl@redhat.com>
1626 * dbus/dbus-watch.c (dbus_watch_get_flags):
1627 Add note in the docs that ERROR or HANGUP won't be returned
1628 and are assumed always on.
1630 * glib/dbus-gmain.c (add_watch):
1631 Always add IO_ERR | IO_HUP
1633 * dbus/dbus-message.h:
1634 Add semicolon after dbus_message_iter_get_string_array().
1635 Makes qt code build again
1637 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1639 * bus/driver.c: (create_unique_client_name),
1640 (bus_driver_handle_hello):
1641 Don't take a name, just use a numeric id to identify
1645 * dbus/dbus-bus.c: (dbus_bus_register_client),
1646 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1648 Add new convenience functions for communicating with the bus.
1650 * dbus/dbus-message.h:
1652 * dbus/dbus-protocol.h:
1655 2003-02-01 Alexander Larsson <alexl@redhat.com>
1657 * dbus/dbus-message.c (dbus_message_append_fields):
1658 Add some more doc comments.
1660 2003-02-01 Havoc Pennington <hp@pobox.com>
1662 * dbus/dbus-break-loader.c (randomly_modify_length): change
1663 a 4-byte value in the message as if it were a length
1665 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1666 execute bit on saved files
1668 2003-02-01 Havoc Pennington <hp@pobox.com>
1670 * dbus/dbus-break-loader.c (main): new program to find messages
1671 that break the loader.
1673 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1674 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1676 * dbus/dbus-string.c (_dbus_string_set_byte): new
1678 2003-01-31 Havoc Pennington <hp@pobox.com>
1680 * dbus/dbus-message.c: refactor the test code to be more general,
1681 in preparation for writing a "randomly permute test cases to
1682 try to break the loader" program.
1684 2003-01-31 Havoc Pennington <hp@pobox.com>
1686 * doc/dbus-specification.sgml: work on the specification
1688 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1689 the protocol version of the message.
1691 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1692 no longer specifies that.
1693 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1696 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1697 "break" for DBUS_TYPE_NIL, remove @todo
1699 2003-01-31 Havoc Pennington <hp@pobox.com>
1701 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1702 just set_is_error/get_is_error as this is a commonly-used
1703 function, and write docs.
1705 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1707 * dbus/dbus-address.c: (dbus_address_entry_free):
1708 Free key and value lists.
1710 * dbus/dbus-internals.c: (_dbus_type_to_string):
1711 Add the types we didn't have.
1713 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1714 (_dbus_marshal_validate_arg):
1717 * dbus/dbus-message.c: (dbus_message_set_sender):
1718 Remove todo about being able to set sender to NULL.
1720 (dbus_message_set_is_error_reply),
1721 (dbus_message_get_is_error_reply):
1722 * dbus/dbus-message.h:
1725 * dbus/dbus-protocol.h:
1726 Add error reply flag.
1728 * test/data/valid-messages/opposite-endian.message:
1729 Add NIL type to test.
1731 2003-01-31 Havoc Pennington <hp@pobox.com>
1733 * doc/dbus-specification.sgml: fully specify the header. Add
1734 flags and major protocol version, and change header/body len to
1737 * dbus/dbus-message-builder.c (append_saved_length): append length
1740 * dbus/dbus-message.c (dbus_message_create_header): change header
1741 length and body length to unsigned. Add the new fields from the
1743 (_dbus_message_loader_return_buffer): unsigned header/body len
1745 2003-01-30 Havoc Pennington <hp@pobox.com>
1747 * dbus/dbus-auth.c: rework to use only REJECTED, no
1750 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1751 use REJECTED, suggested by Mark McLoughlin
1753 2003-01-30 Havoc Pennington <hp@pobox.com>
1755 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1756 a better way to report errors here. e.g. "unix address lacks
1757 path" or something. also "no such file" when the path doesn't
1760 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1762 (dbus_parse_address): add @todo about documenting address format,
1763 and allowing , and ; to be escaped
1765 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1768 Add dbus-address.[ch]
1770 * dbus/dbus-address.c: (dbus_address_entry_free),
1771 (dbus_address_entries_free), (create_entry),
1772 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1773 (dbus_parse_address), (_dbus_address_test):
1774 * dbus/dbus-address.h:
1775 New files for dealing with address parsing.
1777 * dbus/dbus-connection.c:
1778 Document timeout functions.
1780 * dbus/dbus-message.c:
1781 Document dbus_message_new_from_message.
1783 * dbus/dbus-server-debug.c:
1786 * dbus/dbus-server.c: (dbus_server_listen):
1787 Parse address and use correct server implementation.
1789 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1790 * dbus/dbus-string.h:
1791 New function with test.
1793 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1797 * dbus/dbus-transport-debug.c:
1800 * dbus/dbus-transport.c: (_dbus_transport_open):
1801 Parse address and use correct transport implementation.
1803 2003-01-30 Havoc Pennington <hp@pobox.com>
1805 * dbus/dbus-message.c: use message->byte_order instead of
1806 DBUS_COMPILER_BYTE_ORDER throughout.
1807 (dbus_message_create_header): pad header to align the
1808 start of the body of the message to 8-byte boundary
1810 * dbus/dbus-marshal.h: make all the demarshalers take const
1811 DBusString arguments.
1813 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1814 validate message args here, so we don't have to do slow validation
1815 later, and so we catch bad messages as they are incoming. Also add
1816 better checks on header_len and body_len. Also fill in
1819 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1820 implemented properly)
1821 (_dbus_string_validate_nul): new function to check all-nul
1823 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1824 get_arg_end_pos and remove all validation
1825 (_dbus_marshal_validate_arg): actually do validation here.
1827 2003-01-29 Havoc Pennington <hp@pobox.com>
1829 * dbus/dbus-message.c (check_message_handling): fix assertion
1830 failure on set_client_serial
1832 2003-01-28 Havoc Pennington <hp@pobox.com>
1834 * dbus/dbus-server-debug.c: Add doc section comments
1836 * dbus/dbus-transport-debug.c: add doc section comments
1838 2003-01-28 Havoc Pennington <hp@redhat.com>
1840 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1841 the reverse order from how I had it
1842 (_dbus_string_base64_encode): reverse encoding order. I was
1843 basically byteswapping everything during encoding.
1845 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1847 * dbus/dbus-connection-internal.h:
1848 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1849 (_dbus_connection_remove_timeout):
1850 Add functions for adding and removing timeouts.
1852 * dbus/dbus-message.c: (dbus_message_new_from_message):
1853 Add new function that takes a message and creates an exact
1854 copy of it, but with the refcount set to 1.
1855 (check_message_handling):
1858 * dbus/dbus-server-protected.h:
1859 * dbus/dbus-server.c: (_dbus_server_init_base),
1860 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1861 (dbus_server_set_timeout_functions):
1862 (_dbus_server_remove_timeout):
1863 New functions so that a server can add and remove timeouts.
1865 (dbus_server_listen):
1866 Add commented out call to dbus_server_debug_new.
1868 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1869 Actually set the handler, doh.
1871 * dbus/dbus-transport.c: (_dbus_transport_open):
1872 Add commented out call to dbus_transport_debug_client_new.
1875 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1877 2003-01-28 Havoc Pennington <hp@pobox.com>
1879 * dbus/dbus-message.c (check_message_handling): function to check
1880 on the loaded message, iterates over it etc.
1882 2003-01-28 Havoc Pennington <hp@pobox.com>
1884 * test/Makefile.am (dist-hook): fix make distdir
1886 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1888 2003-01-27 Havoc Pennington <hp@pobox.com>
1890 * dbus/dbus-mempool.c (time_for_size): replace printf with
1893 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1894 empty lines; fix the SAVE_LENGTH stuff to be
1895 START_LENGTH/END_LENGTH so it actually works; couple other
1898 * test/Makefile.am (dist-hook): add dist-hook for .message files
1900 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1901 can be constant or locked.
1902 (_dbus_string_free): allow freeing a const string as
1905 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1907 * dbus/dbus-test-main.c (main): take an argument which is the
1908 directory containing test data
1910 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1911 argument to this and load all the messages in test/data/
1912 checking that they can be loaded or not loaded as appropriate.
1914 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1916 * bus/dispatch.c: (bus_dispatch_message_handler):
1917 Dispatch messages sent to services.
1919 * bus/driver.c: (bus_driver_send_service_deleted),
1920 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1921 (bus_driver_send_service_acquired):
1922 Add helper functions for sending service related messages.
1924 (bus_driver_send_welcome_message):
1925 Send HELLO_REPLY instead of WELCOME.
1927 (bus_driver_handle_list_services):
1928 Send LIST_SERVICES_REPLY instead of SERVICES.
1930 (bus_driver_handle_own_service),
1931 (bus_driver_handle_service_exists):
1932 New message handlers.
1934 (bus_driver_handle_message):
1935 Invoke new message handlers.
1937 (bus_driver_remove_connection):
1938 Don't remove any services here since that's done automatically
1939 by bus_service_remove_owner now.
1942 New function signatures.
1944 * bus/services.c: (bus_service_add_owner):
1945 Send ServiceAcquired message if we're the only primary owner.
1947 (bus_service_remove_owner):
1948 Send ServiceAcquired/ServiceLost messages.
1950 (bus_service_set_prohibit_replacement),
1951 (bus_service_get_prohibit_replacement):
1952 Functions for setting prohibit replacement.
1954 (bus_service_has_owner):
1955 New function that checks if a connection is in the owner queue of
1959 Add new function signatures.
1961 * dbus/dbus-list.c: (_dbus_list_test):
1962 Add tests for _dbus_list_remove_last and traversing the list backwards.
1965 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1966 go any further, so return NULL then.
1968 * dbus/dbus-protocol.h:
1969 Add new messages, service flags and service replies.
1971 2003-01-26 Havoc Pennington <hp@pobox.com>
1973 * dbus/dbus-message-builder.c: implement, completely untested.
1975 * test/data/*: add data to be used in testing.
1976 ".message" files are our simple loadable text format.
1977 ".message-raw" will be binary dumps of messages.
1979 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1981 2003-01-26 Havoc Pennington <hp@pobox.com>
1983 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1985 * dbus/dbus-errors.c (dbus_result_to_string): add
1988 * dbus/dbus-message-builder.c: new file, will contain code to load
1989 up messages from files. Not implemented yet.
1991 2003-01-26 Havoc Pennington <hp@pobox.com>
1993 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1994 the sender by setting to NULL
1996 2003-01-26 Havoc Pennington <hp@pobox.com>
1998 The unit tests pass, but otherwise untested. If it breaks, the
1999 tests should have been better. ;-)
2001 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2004 * dbus/dbus-message.c: redo everything so we maintain
2005 message->header as the only copy of the various fields.
2006 This avoids the possibility of out-of-memory in some cases,
2007 for example dbus_message_lock() can't run out of memory anymore,
2008 and avoids extra copying. Figured I may as well go ahead and do
2009 this since it was busted for dbus_message_lock to not return
2010 failure on OOM, and dbus_message_write_header was totally
2011 unchecked for OOM. Also fixed some random other bugs.
2013 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2014 that strings are nul-terminated. Also, end_pos can be equal
2015 to string length just not greater than, I think.
2016 (_dbus_marshal_set_int32): new function
2017 (_dbus_marshal_set_uint32): new function
2018 (_dbus_marshal_set_string): new function
2020 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2021 a warning, init timeout_list to NULL
2022 (dbus_connection_send_message): don't use uninitialized variable
2025 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2027 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2029 * bus/driver.c: (bus_driver_handle_hello),
2030 (bus_driver_send_welcome_message):
2033 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2035 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2036 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2037 (dbus_connection_unref):
2038 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2039 * dbus/dbus-message.c: (dbus_message_unref),
2042 (dbus_message_get_fields):
2043 Remove debugging printout.
2045 (_dbus_message_loader_return_buffer):
2046 Don't store the header string.
2048 (_dbus_message_test):
2051 2003-01-26 Richard Hult <rhult@codefactory.se>
2053 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2054 the file descriptor list, since it can change under us.
2056 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2058 * glib/dbus-gmain.c: (dbus_connection_prepare),
2059 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2060 (remove_watch), (dbus_connection_hookup_with_g_main):
2061 Rewrite the glib handling to use its own GSource instead of a
2062 GIOChannel so we can catch messages put in the queue while waiting
2065 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2068 * bus/connection.c: (connection_disconnect_handler),
2069 (connection_watch_callback), (bus_connection_setup):
2070 * bus/dispatch.c: (send_one_message),
2071 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2072 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2074 * bus/driver.c: (bus_driver_send_service_deleted),
2075 (bus_driver_send_service_created), (bus_driver_handle_hello),
2076 (bus_driver_send_welcome_message),
2077 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2078 (bus_driver_handle_message):
2080 Refactor code, put the message dispatching in its own file. Use
2081 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2084 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2086 * dbus/dbus-internals.h:
2087 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2089 * dbus/dbus-message.c: (dbus_message_get_sender):
2090 * dbus/dbus-message.h:
2091 Implement dbus_message_get_sender.
2093 * dbus/dbus-protocol.h:
2094 Add message and service defines.
2096 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2098 * dbus/dbus-connection.c: (dbus_connection_send_message):
2099 * dbus/dbus-message-internal.h:
2100 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2101 (dbus_message_write_header):
2102 Remove _dbus_messag_unlock and don't set the client serial on a
2103 message if one already exists.
2105 2003-01-24 Havoc Pennington <hp@pobox.com>
2107 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2110 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2113 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2115 * dbus/dbus-list.c: (alloc_link), (free_link):
2116 Use a memory pool for the links.
2118 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2120 * bus/connection.c: (bus_connection_foreach):
2122 Add new bus_connection_foreach function.
2124 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2125 Add function that broadcasts a message to all clients.
2127 (bus_driver_send_service_created), (bus_driver_handle_hello),
2128 (bus_driver_send_welcome_message),
2129 (bus_driver_handle_list_services), (bus_driver_message_handler):
2130 Implement functions that take care of listing services, and notifying
2131 clients when new services are created.
2133 * bus/services.c: (bus_services_list):
2135 Add new function that returns an array of strings with the currently
2136 registered services.
2139 * glib/dbus-gmain.c:
2140 Update copyright year.
2142 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2144 * dbus/dbus-connection.c: (dbus_connection_send_message):
2145 Unlock the message in case it was sent earlier.
2147 (dbus_connection_send_message_with_reply_and_block):
2148 Remove the reply message from the list.
2150 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2151 Set array_len and new_pos correctly.
2153 (_dbus_marshal_test):
2154 Remove debug output.
2156 * dbus/dbus-message-internal.h:
2157 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2158 New function that returns the reply serial.
2160 (_dbus_message_unlock):
2161 New function that unlocks a message and resets its header.
2163 (dbus_message_append_string_array),
2164 (dbus_message_get_fields_valist),
2165 (dbus_message_iter_get_field_type),
2166 (dbus_message_iter_get_string_array),
2167 (dbus_message_get_fields),
2168 (dbus_message_append_fields_valist):
2169 Handle string arrays.
2171 (dbus_message_set_sender):
2172 Make this function public since the bus daemon needs it.
2174 (decode_header_data):
2175 Set the reply serial to -1 initially.
2177 * dbus/dbus-message.h:
2178 Add dbus_message_set_sender.
2180 2003-01-24 Havoc Pennington <hp@pobox.com>
2182 * doc/dbus-specification.sgml: add some stuff
2184 2003-01-22 Havoc Pennington <hp@pobox.com>
2186 * doc/dbus-specification.sgml: Start to document the protocol.
2188 2003-01-22 Havoc Pennington <hp@pobox.com>
2190 * dbus/dbus-connection.c
2191 (dbus_connection_send_message_with_reply_and_block): add some @todo
2193 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2195 2003-01-21 Havoc Pennington <hp@pobox.com>
2197 (patch untested because can't compile)
2199 * bus/driver.c (create_unique_client_name): make this function
2200 never recycle client names. Also, caller should initialize
2203 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2205 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2207 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2208 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2209 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2210 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2211 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2212 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2213 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2214 * dbus/dbus-marshal.h:
2215 * dbus/dbus-protocol.h:
2216 Add support for marshalling and demarshalling integer, double
2219 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2224 * bus/connection.c: (connection_disconnect_handler):
2225 Remove the connection from the bus driver's list.
2227 (connection_watch_callback): Dispatch messages.
2229 (free_connection_data): Free connection name.
2231 (bus_connection_setup): Add connection to the bus driver's list.
2232 (bus_connection_remove_owned_service):
2233 (bus_connection_set_name), (bus_connection_get_name):
2234 Add functions for setting and getting the connection's name.
2237 Add function headers.
2239 * bus/driver.c: (create_unique_client_name),
2240 (bus_driver_handle_hello_message),
2241 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2242 (bus_driver_add_connection), (bus_driver_remove_connection):
2245 * bus/services.c: (bus_service_free):
2247 New file that handles communication and registreation with the bus
2250 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2252 * dbus/dbus-connection.c: (dbus_connection_send_message):
2253 Add a new client_serial parameter.
2255 (dbus_connection_send_message_with_reply):
2256 Remove a @todo since we've implemented the blocking function.
2258 (dbus_connection_send_message_with_reply_and_block):
2259 New function that sends a message and waits for a reply and
2260 then returns the reply.
2262 * dbus/dbus-connection.h:
2265 * dbus/dbus-errors.c: (dbus_result_to_string):
2266 * dbus/dbus-errors.h:
2267 Add new DBUS_RESULT.
2269 * dbus/dbus-message-internal.h:
2270 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2271 (_dbus_message_set_sender), (dbus_message_write_header),
2272 (dbus_message_new_reply), (decode_header_data),
2273 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2274 * dbus/dbus-message.h:
2275 Add new functions that set the reply serial and sender.
2276 Also marshal and demarshal them correctly and add test.
2278 * dbus/dbus-protocol.h:
2279 Add new DBUS_MESSAGE_TYPE_SENDER.
2282 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2283 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2284 (dbus_connection_hookup_with_g_main):
2285 * glib/test-dbus-glib.c: (main):
2286 Rewrite to use GIOChannel and remove the GSource crack.
2288 * test/echo-client.c: (main):
2289 * test/watch.c: (check_messages):
2290 Update for changed APIs
2292 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2294 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2296 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2297 Create a DBusTimeoutList.
2298 (dbus_connection_set_timeout_functions): Add new function to
2299 set timeout callbacks
2301 * dbus/dbus-connection.h: Add public DBusTimeout API.
2303 * dbus/dbus-message.c: (dbus_message_get_service):
2304 * dbus/dbus-message.h: New function.
2306 * dbus/dbus-server.c: Fix small doc typo.
2308 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2310 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2312 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2313 of the string, just as long as specified.
2315 2003-01-19 Havoc Pennington <hp@pobox.com>
2317 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2320 * dbus/dbus-server.c (dbus_server_set_max_connections)
2321 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2322 keep track of current number of connections, and add API for
2323 setting a max (but haven't implemented enforcing the max yet)
2325 2003-01-18 Havoc Pennington <hp@pobox.com>
2327 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2328 reading/writing if read_watch != NULL or write_watch != NULL.
2330 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2331 the message loader code to actually load message->header and
2332 message->body into the newly-created message.
2334 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2337 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2338 (dbus_connection_get_max_message_size)
2339 (dbus_connection_set_max_live_messages_size)
2340 (dbus_connection_get_max_live_messages_size): implement some
2341 resource limitation functions
2343 * dbus/dbus-resources.c: new file implementing some of the
2344 resource limits stuff
2346 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2347 missing docs, add @todo to handle OOM etc.
2349 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2352 2003-01-18 Havoc Pennington <hp@pobox.com>
2354 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2355 connection if it hasn't been already.
2357 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2358 replace with DisconnectFunction.
2360 2003-01-18 Havoc Pennington <hp@pobox.com>
2362 Building --disable-verbose-mode --disable-asserts --disable-tests
2363 cuts the library from 112K to 45K or so
2365 * configure.in: check for varargs macro support,
2366 add --enable-verbose-mode, --enable-asserts.
2368 * dbus/dbus-internals.h (_dbus_assert): support
2370 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2372 2003-01-18 Havoc Pennington <hp@pobox.com>
2374 * dbus/dbus-test.c: include config.h so that tests actually run
2376 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2377 so the failure mode when that assumption fails will be plenty
2380 2003-01-18 Havoc Pennington <hp@pobox.com>
2382 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2384 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2387 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2388 since we don't want to use those in make check
2390 2003-01-15 Havoc Pennington <hp@redhat.com>
2396 2003-01-15 Havoc Pennington <hp@redhat.com>
2398 * test/Makefile.am: fix so that test source code ends up in the
2399 distribution on make distcheck
2401 2003-01-15 Havoc Pennington <hp@redhat.com>
2407 2003-01-15 Havoc Pennington <hp@redhat.com>
2409 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2410 fix build when --disable-tests
2412 * Makefile.am (EXTRA_DIST): put HACKING in here
2414 * HACKING: document procedure for making a tarball release.
2416 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2418 * bus/connection.c: (connection_error_handler),
2419 (bus_connection_setup):
2420 * bus/main.c: (main):
2421 Make sure that the DBusConnectionData struct is NULLed
2422 out to prevent a segfault.
2424 * dbus/dbus-errors.c: (dbus_result_to_string):
2425 * dbus/dbus-errors.h:
2426 * dbus/dbus-message.c: (dbus_message_get_fields),
2427 (dbus_message_get_fields_valist), (_dbus_message_test):
2428 * dbus/dbus-message.h:
2429 Make dbus_message_get_fields return a result code so we can
2430 track invalid fields as well as oom.
2432 2003-01-11 Havoc Pennington <hp@pobox.com>
2434 * configure.in: change --enable-test/--enable-ansi action-if-given
2435 to enable_foo=$enableval instead of enable_foo=yes
2437 2003-01-08 Havoc Pennington <hp@pobox.com>
2439 * dbus/dbus-string.c (_dbus_string_align_length): new function
2441 * dbus/dbus-test-main.c: move main() for test app here
2443 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2444 symbol to run tests, because dbus-test isn't in the main
2447 Code review nitpicks.
2449 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2450 for people with narrow emacs ;-). Assert client_serial was filled
2451 in. Assert message->name != NULL.
2452 (dbus_message_append_fields): have "first_field_type" arg separate
2453 from va list, needed for C++ binding that also uses varargs IIRC
2454 and helps with type safety
2455 (dbus_message_new): add @todo about using DBusString to store
2456 service/name internally
2457 (dbus_message_new): don't leak ->service and ->name on OOM later
2459 (dbus_message_unref): free the service name
2460 (dbus_message_get_fields): same change to varargs
2461 i.e. first_field_type
2462 (_dbus_message_loader_return_buffer): assert that the message data
2463 is aligned (if not it's a bug in our code). Put in verbose griping
2464 about why we set corrupted = TRUE.
2465 (decode_header_data): add FIXME that char* is evil. Was going to
2466 add FIXME about evil locale-specific string.h strncmp, but just
2467 switched to wacky string-as-uint32 optimization. Move check for
2468 "no room for field name" above get_const_data_len() to avoid
2469 assertion failure in get_const_data_len if we have trailing 2
2470 bytes or the like. Check for service and name fields being
2471 provided twice. Don't leak service/name on error. Require field
2472 names to be aligned to 4 bytes.
2474 * dbus/dbus-marshal.c: move byte swap stuff to header
2475 (_dbus_pack_int32): uscore-prefix
2476 (_dbus_unpack_int32): uscore-prefix
2477 (_dbus_unpack_uint32): export
2478 (_dbus_demarshal_string): add @todo complaining about use of
2480 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2481 handling allowing corrupt data to go unchecked
2483 2003-01-08 Havoc Pennington <hp@redhat.com>
2485 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2486 to the select() as needed for authentication. (should be using
2487 _dbus_poll() not select, but for another day)
2489 * dbus/dbus.h: include dbus/dbus-protocol.h
2491 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2493 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2496 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2498 * dbus/dbus-internals.c: (_dbus_type_to_string):
2499 New function that returns a string describing a type.
2501 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2502 * dbus/dbus-marshal.h:
2503 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2504 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2505 (dbus_message_iter_get_byte_array):
2506 * dbus/dbus-message.h:
2507 Add new convenience functions for appending and getting message fields.
2508 Also add demarshalling routines for byte arrays.
2510 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2512 * dbus/dbus-connection-internal.h:
2513 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2514 (_dbus_connection_get_next_client_serial),
2515 (dbus_connection_send_message):
2516 * dbus/dbus-internals.h:
2517 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2518 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2519 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2520 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2521 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2522 (_dbus_verbose_bytes), (_dbus_marshal_test):
2523 * dbus/dbus-marshal.h:
2524 * dbus/dbus-message-internal.h:
2525 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2526 (dbus_message_write_header), (_dbus_message_lock),
2527 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2528 (dbus_message_get_name), (dbus_message_append_int32),
2529 (dbus_message_append_uint32), (dbus_message_append_double),
2530 (dbus_message_append_string), (dbus_message_append_byte_array),
2531 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2532 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2533 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2534 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2535 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2536 (decode_header_data), (_dbus_message_loader_return_buffer),
2537 (message_iter_test), (_dbus_message_test):
2538 * dbus/dbus-message.h:
2539 * dbus/dbus-protocol.h:
2540 * dbus/dbus-test.c: (main):
2542 * glib/test-dbus-glib.c: (message_handler), (main):
2543 * test/echo-client.c: (main):
2544 * test/watch.c: (check_messages):
2545 Make messages sendable and receivable for real.
2547 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2549 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2550 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2551 * dbus/dbus-message.c: (dbus_message_append_int32),
2552 (dbus_message_append_uint32), (dbus_message_append_double),
2553 (dbus_message_append_string), (dbus_message_append_byte_array):
2554 Handle OOM restoration.
2556 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2558 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2559 (_dbus_demarshal_string), (_dbus_marshal_test):
2560 * dbus/dbus-marshal.h:
2561 * dbus/dbus-message.c: (dbus_message_get_name),
2562 Document these functions.
2564 (dbus_message_append_int32), (dbus_message_append_uint32),
2565 (dbus_message_append_double), (dbus_message_append_string),
2566 (dbus_message_append_byte_array):
2567 * dbus/dbus-message.h:
2568 Add functions for adding message fields of different types.
2570 * dbus/dbus-protocol.h:
2571 Add the different types.
2573 2003-01-05 Havoc Pennington <hp@pobox.com>
2575 * bus/connection.c: implement routines for handling connections,
2576 first thing is keeping a list of owned services on each connection
2577 and setting up watches etc.
2579 * bus/services.c: implement a mapping from service names to lists
2582 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2584 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2585 to use static mutexes for global data
2587 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2588 collection of functions to set/get application-specific data
2589 on the DBusConnection.
2591 2003-01-04 Havoc Pennington <hp@pobox.com>
2593 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2594 (_dbus_poll): new function
2596 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2599 * bus/loop.c: initial code for the daemon main loop
2601 2003-01-04 Havoc Pennington <hp@pobox.com>
2603 * test/watch.c (error_handler): make it safe if the error handler
2604 is called multiple times (if we s/error handler/disconnect
2605 handler/ we should just guarantee it's called only once)
2607 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2608 error handler on disconnect (it's quite possible we should
2609 just change the error handler to a "disconnect handler," I'm
2610 not sure we have any other meaningful errors)
2612 * configure.in: check for getpwnam_r
2614 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2615 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2616 mechanism as in SASL spec, using socket credentials
2618 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2619 (_dbus_send_credentials_unix_socket): new function
2621 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2623 (_dbus_write): only check errno if <0 returned
2624 (_dbus_write_two): ditto
2626 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2628 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2629 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2630 (_dbus_marshal_test):
2631 * dbus/dbus-marshal.h:
2632 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2633 to _dbus_marshal_utf8_string. Also fix some tests.
2635 2002-12-28 Harri Porten <porten@kde.org>
2637 * configure.in: added check for C++ compiler and a very cheesy
2638 check for the Qt integration
2640 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2642 * qt/Makefile.am: added
2644 * qt/.cvsignore: added
2646 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2647 latter, added #ifdef QT_THREAD_SUPPORT guard.
2649 * dbus/Makefile.am: added missing headers for make dist
2651 2002-12-28 Kristian Rietveld <kris@gtk.org>
2653 * dbus/Makefile.am: fixup export-symbols-regex.
2655 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2657 * acinclude.m4: Add this file and put the
2658 PKG_CHECK_MODULE macro in it.
2660 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2662 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2663 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2664 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2665 (_dbus_marshal_test):
2666 Make the demarshalling routines align the pos argument.
2667 Add string marshalling tests and fix the obvious bugs
2670 2002-12-26 Havoc Pennington <hp@pobox.com>
2672 * dbus/dbus-auth.c: fixes fixes fixes
2674 * dbus/dbus-transport-unix.c: wire up support for
2675 encoding/decoding data on the wire
2677 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2678 (_dbus_auth_decode_data): append to target string
2679 instead of nuking it.
2681 2002-12-26 Havoc Pennington <hp@pobox.com>
2683 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2684 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2687 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2688 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2689 now). Main point is because I wanted unpack_uint32 to implement
2691 (_dbus_verbose_bytes): new function
2693 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2695 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2696 mechanism to handle a corrupt message stream
2697 (_dbus_message_loader_new): fix preallocation to only prealloc,
2700 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2701 (_dbus_string_test): enhance tests for copy/move and fix the
2704 * dbus/dbus-transport-unix.c: Hold references in more places to
2705 avoid reentrancy problems
2707 * dbus/dbus-transport.c: ditto
2709 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2710 leak reference count in no-message case
2712 * test/watch.c (do_mainloop): handle adding/removing watches
2713 during iteration over the watches. Also, ref the connection/server
2714 stored on a watch, so we don't try to mangle a destroyed one.
2716 * dbus/dbus-transport-unix.c (do_authentication): perform
2719 * dbus/dbus-auth.c (get_state): add a state
2720 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2721 (_dbus_auth_get_unused_bytes): append the unused bytes
2722 to the passed in string, rather than prepend
2724 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2725 the auth conversation DBusAuth
2727 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2728 (_dbus_transport_new_for_domain_socket): when creating a
2729 transport, pass in whether it's a client-side or server-side
2730 transport so we know which DBusAuth to create
2732 2002-12-03 Havoc Pennington <hp@pobox.com>
2734 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2735 _after_ finalizing the derived members
2736 (unix_connection_set): unref watch if we fail to add it
2738 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2739 transport first, so that the connection owned by the
2740 transport will be valid as the transport finalizes.
2742 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2743 if necessary, and remove watches from the connection.
2745 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2747 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2749 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2750 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2751 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2752 (_dbus_marshal_test):
2753 * dbus/dbus-marshal.h:
2754 Add string marshal functions and have the demarshal functions
2755 return the new position.
2757 2002-12-25 Havoc Pennington <hp@pobox.com>
2759 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2760 it is a simple protocol that just maps directly to SASL.
2762 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2763 initial implementation, not actually used yet.
2765 * dbus/dbus-string.c (_dbus_string_find): new function
2766 (_dbus_string_equal): new function
2767 (_dbus_string_base64_encode): new function
2768 (_dbus_string_base64_decode): new function
2770 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2773 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2774 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2775 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2776 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2777 * dbus/dbus-marshal.h:
2778 * dbus/dbus-protocol.h:
2779 * dbus/dbus-test.c: (main):
2781 Add un-optimized marshalling/demarshalling routines.
2783 2002-12-25 Harri Porten <porten@kde.org>
2785 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2787 2002-12-24 Zack Rusin <zack@kde.org>
2789 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2790 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2793 2002-12-24 Havoc Pennington <hp@pobox.com>
2795 * glib/dbus-gthread.c: fix include
2797 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2798 I think glib API needs to change, though, as you don't
2799 want to use DBusMessageFunction, you want to use the
2800 DBusMessageHandler object. Probably
2801 dbus_connection_open_with_g_main_loop()
2802 and dbus_connection_setup_g_main_loop() or something like that
2803 (but think of better names...) that just create a connection
2804 that has watch/timeout functions etc. already set up.
2806 * dbus/dbus-connection.c
2807 (dbus_connection_send_message_with_reply): new function just to
2808 show how the message handler helps us deal with replies.
2810 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2812 * dbus/dbus-string.c (_dbus_string_test): free a string that
2815 * dbus/dbus-hash.c: use memory pools for the hash entries
2816 (rebuild_table): be more paranoid about overflow, and
2817 shrink table when we can
2818 (_dbus_hash_test): reduce number of sprintfs and write
2819 valid C89. Add tests for case where we grow and then
2820 shrink the hash table.
2822 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2824 * dbus/dbus-connection.c (dbus_connection_register_handler)
2825 (dbus_connection_unregister_handler): new functions
2827 * dbus/dbus-message.c (dbus_message_get_name): new
2829 * dbus/dbus-list.c: fix docs typo
2831 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2832 an object representing a handler for messages.
2834 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2837 * glib/dbus-gthread.c: (dbus_gthread_init):
2838 Don't use the gdbus prefix for public functions.
2840 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2844 Add GLib checks and fixup .pc files
2848 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2849 (gdbus_connection_check), (gdbus_connection_dispatch),
2850 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2851 (dbus_connection_gsource_new):
2852 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2853 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2854 * glib/test-dbus-glib.c: (message_handler), (main):
2857 2002-12-15 Harri Porten <porten@kde.org>
2859 * autogen.sh: check for libtoolize before attempting to use it
2861 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2864 * .cvsignore: ignore more stamp files
2866 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2868 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2869 without make install.
2871 2002-12-15 Havoc Pennington <hp@pobox.com>
2873 * dbus/dbus-threads.c: add thread stubs that a higher library
2874 layer can fill in. e.g. the GLib wrapper might fill them in with
2875 GThread stuff. We still need to use this thread API to
2876 thread-safe-ize the library.
2878 2002-12-12 Havoc Pennington <hp@pobox.com>
2880 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2881 below new interfaces and include fewer system headers.
2883 * dbus/dbus-sysdeps.c (_dbus_read): new function
2884 (_dbus_write): new function
2885 (_dbus_write_two): new function
2886 (_dbus_connect_unix_socket): new function
2887 (_dbus_listen_unix_socket): new function
2889 * dbus/dbus-message-internal.h: change interfaces to use
2892 2002-12-11 Havoc Pennington <hp@pobox.com>
2894 * dbus/dbus-types.h: add dbus_unichar
2896 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2898 * dbus/dbus-connection.c (dbus_connection_send_message): return
2901 * dbus/dbus-transport.c: include dbus-watch.h
2903 * dbus/dbus-connection.c: include dbus-message-internal.h
2905 * HACKING: add file with coding guidelines stuff.
2907 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2908 handling here, for security purposes (as in vsftpd). Not actually
2909 using this class yet.
2911 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2912 system/libc usage here, as in vsftpd, for ease of auditing (and
2913 should also simplify portability). Haven't actually moved all the
2914 system/libc usage into here yet.
2916 2002-11-25 Havoc Pennington <hp@pobox.com>
2918 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2919 always print the first verbose message.
2921 2002-11-24 Havoc Pennington <hp@pobox.com>
2923 * test/echo-client.c, test/echo-server.c: cheesy test
2926 * configure.in (AC_CHECK_FUNCS): check for writev
2928 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2931 * dbus/dbus-list.c (_dbus_list_foreach): new function
2933 * dbus/dbus-internals.c (_dbus_verbose): new function
2935 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2936 representing a server that listens for connections.
2938 * dbus/.cvsignore: create
2940 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2941 public API for reporting errors
2943 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2944 public object representing a connection that
2945 sends/receives messages. (Same object used for
2946 both client and server.)
2948 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2949 Basic abstraction for different kinds of stream
2950 that we might read/write messages from.
2952 2002-11-23 Havoc Pennington <hp@pobox.com>
2954 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2957 * dbus/dbus-test.c (main): add list test, and include
2958 dbus-test.h as intended
2960 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2961 (_dbus_hash_table_remove_int): return value indicates
2962 whether the entry existed to remove
2964 * dbus/dbus-list.c: add linked list utility class,
2967 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2970 2002-11-23 Havoc Pennington <hp@pobox.com>
2972 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2973 DBUS_END_DECLS to nothing, that should fix this once and for all
2975 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2977 * dbus/dbus-message.c, dbus/dbus-hash.c:
2978 add some missing @brief
2980 2002-11-23 Havoc Pennington <hp@pobox.com>
2982 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2983 to avoid confusing Doxygen
2985 * dbus/dbus-hash.c: @} not }@
2987 * dbus/dbus-message.c (struct DBusMessage): split out
2990 2002-11-23 Havoc Pennington <hp@pobox.com>
2992 * configure.in: pile on more warning flags if using gcc
2994 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2995 to document static functions
2997 * configure.in: add summary to end of configure so it
2998 looks nice and attractive
3000 * dbus/dbus-hash.c: finish implementation and write unit
3003 * configure.in: add --enable-tests to enable unit tests
3005 * dbus/dbus-test.c: test program to run unit tests
3006 for all files in dbus/*, initially runs a test for
3009 * dbus/dbus-internals.h: file to hold some internal utility stuff
3011 2002-11-22 Havoc Pennington <hp@redhat.com>
3013 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3014 "ported" away from Tcl
3016 * dbus/dbus-types.h: header for types such as dbus_bool_t
3018 2002-11-22 Havoc Pennington <hp@redhat.com>
3020 * dbus/dbus.h: fixups for doc warnings
3022 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3024 (QUIET): make it quiet so we can see warnings
3026 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3028 2002-11-22 Havoc Pennington <hp@redhat.com>
3030 * Makefile.am: include "Doxyfile" target in all-local
3032 * configure.in: generate the Doxyfile
3034 * Doxyfile.in: move Doxyfile here, so we can use
3035 configure to generate a Doxyfile with the right
3038 2002-11-22 Havoc Pennington <hp@redhat.com>
3040 * dbus/dbus-message.c: move inline docs into .c file
3042 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3043 so all docs are under doc/
3044 (MAN_EXTENSION): generate man pages. Use extension
3045 ".3dbus" which matches ".3qt" on my system,
3046 I guess this is OK, I don't know really.
3047 (FILE_PATTERNS): look for .c files not .h, makes sense
3050 2002-11-22 Havoc Pennington <hp@pobox.com>
3052 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3053 because any app can be a server, and any app can be a client,
3054 the bus is a special kind of server.
3056 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3058 * Doxyfile : adding. Still needs Makefile rules to be generated
3059 automatically (just run "doxygen" in the toplevel dir for now to
3062 * dbus/dbus-message.h : Adding sample docs (javadoc since
3063 resembles gtk-doc a little more)
3065 * dbus/dbus.h : Adding sample docs
3067 2002-11-21 Havoc Pennington <hp@redhat.com>
3069 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3070 so we can allow ourselves to include files directly,
3071 instead of having to use dbus.h
3073 * dbus/dbus.h: fill in
3075 * dbus/dbus-message.h: sketch out a sample header file.
3076 Include griping if you include it directly instead of
3079 * dbus/dbus-macros.h: new file with macros for extern "C",
3080 TRUE/FALSE, NULL, etc.
3082 * doc/file-boilerplate.c: put include guards in here
3084 2002-11-21 Havoc Pennington <hp@redhat.com>
3086 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3088 * COPYING: include the GPL as well, and license code
3089 under both AFL and GPL.
3091 2002-11-21 Havoc Pennington <hp@redhat.com>
3093 * acconfig.h: get rid of this
3095 * autogen.sh (run_configure): add --no-configure option
3097 * configure.in: remove AC_ARG_PROGRAM to make
3098 autoconf complain less. add AC_PREREQ.
3099 add AC_DEFINE third arg.
3101 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3104 Fix references so we can distcheck.
3106 2002-11-21 Havoc Pennington <hp@redhat.com>
3108 * Initial module creation