1 2003-03-18 Havoc Pennington <hp@redhat.com>
3 * doc/TODO: some notes on high-level todo items. Little nitpick
4 stuff is all in @todo, so no need to add it here.
6 * doc/config-file.txt: some notes on how config file might look
8 2003-03-18 Anders Carlsson <andersca@codefactory.se>
14 2003-03-17 Havoc Pennington <hp@redhat.com>
16 * dbus/dbus-internals.h: add gcc attributes so that
17 our printf-style functions warn on bad arguments to
20 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
23 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
26 2003-03-17 Havoc Pennington <hp@redhat.com>
28 * bus/test-main.c (main): make it print something as it runs
29 so make check doesn't look stuck
31 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
32 from CVS, now obsolete
34 2003-03-17 Anders Carlsson <andersca@codefactory.se>
36 * bus/dispatch.c: (bus_dispatch):
37 Refetch the service name since it may have been reallocated
38 when dbus_message_set_sender was called.
40 * dbus/dbus-sysdeps.c: (_dbus_accept):
41 Add address and address length variables and use them to stop
42 valgrind from complaining.
44 2003-03-17 Havoc Pennington <hp@pobox.com>
46 All tests pass, no memleaks, no valgrind complaints.
48 * bus/test.c: refcount handler_slot
50 * bus/connection.c (bus_connections_new): refcount
53 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
54 bytes so that auth scripts pass.
56 * bus/dispatch.c: init message_handler_slot so it gets allocated
59 * bus/dispatch.c (message_handler_slot_ref): fix memleak
61 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
62 dealloc server_pipe_hash when no longer used for benefit of
65 * dbus/dbus-auth.c (process_command): memleak fix
67 * bus/dispatch.c (check_hello_message): memleak fix
69 2003-03-16 Havoc Pennington <hp@pobox.com>
71 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
73 2003-03-17 Anders Carlsson <andersca@codefactory.se>
75 * bus/activation.c (bus_activation_activate_service): Append
76 the pending activation entry to the list of pending activations.
78 2003-03-16 Havoc Pennington <hp@pobox.com>
80 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
83 * dbus/dbus-address.c (create_entry): fix OOM handling when
84 failing to alloc entry->method
86 2003-03-16 Havoc Pennington <hp@pobox.com>
88 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
91 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
92 add some missing dbus_set_result
94 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
95 alloc the DBusMessageHandler
97 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
98 the transport here, since we call this from the finalizer; it
99 resulted in a double-finalize.
101 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
102 where we tried to use transport->connection that was NULL,
103 happened when transport was disconnected early on due to OOM
105 * bus/*.c: adapt to handle OOM for watches/timeouts
107 * dbus/dbus-transport-unix.c: port to handle OOM during
110 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
111 reference to unused bytes instead of a copy
113 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
116 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
119 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
122 2003-03-16 Anders Carlsson <andersca@codefactory.se>
124 * doc/dbus-specification.sgml:
125 Document reply message for ActivateService.
127 2003-03-16 Anders Carlsson <andersca@codefactory.se>
129 * bus/activation.c: (bus_pending_activation_entry_free),
130 (bus_pending_activation_free), (bus_activation_new),
131 (bus_activation_unref), (bus_activation_service_created),
132 (bus_activation_activate_service):
134 * bus/bus.c: (bus_context_new):
135 * bus/desktop-file.c: (new_section):
136 * bus/driver.c: (bus_driver_send_service_deleted),
137 (bus_driver_handle_activate_service):
138 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
140 * dbus/dbus-connection.c:
141 (dbus_connection_send_with_reply_and_block):
142 * dbus/dbus-message.c: (dbus_message_append_args_valist):
143 * dbus/dbus-protocol.h:
144 Make activation work better. Now pending activations will be queued
145 and the daemon won't try to activate services that are already registered.
147 2003-03-16 Havoc Pennington <hp@pobox.com>
149 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
152 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
153 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
155 2003-03-16 Havoc Pennington <hp@pobox.com>
157 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
158 this. always run the test suite before commit...
160 * bus/*: adapt to DBusConnection API changes
162 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
163 requires renaming stuff to avoid dbus_connection_dispatch name
166 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
169 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
170 separate from _dbus_message_loader_return_buffer()
172 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
173 this, because it's now always broken to use; the number of
174 messages in queue vs. the number still buffered by the message
175 loader is undefined/meaningless. Should use
176 dbus_connection_get_dispatch_state().
177 (dbus_connection_dispatch): rename from
178 dbus_connection_dispatch_message
180 2003-03-16 Havoc Pennington <hp@pobox.com>
182 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
185 2003-03-16 Anders Carlsson <andersca@codefactory.se>
187 * dbus/dbus-connection.c:
188 (dbus_connection_send_with_reply_and_block):
189 Decrease connection->n_incoming when removing an entry
191 * dbus/dbus-dict.c: (dbus_dict_entry_free),
192 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
193 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
194 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
195 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
196 (dbus_dict_get_byte_array):
197 Handle NULL arrays and strings. Also add support for byte arrays.
199 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
200 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
201 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
202 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
203 (_dbus_demarshal_dict), (demarshal_and_validate_len),
204 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
205 * dbus/dbus-marshal.h:
206 Add support for marshalling and demarshalling empty arrays and strings.
208 * dbus/dbus-message.c: (dbus_message_append_args_valist),
209 (dbus_message_append_string_array),
210 (dbus_message_iter_get_boolean),
211 (dbus_message_iter_get_boolean_array),
212 (dbus_message_iter_get_int32_array),
213 (dbus_message_iter_get_uint32_array),
214 (dbus_message_iter_get_double_array),
215 (dbus_message_iter_get_byte_array),
216 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
217 (check_message_handling):
218 Add support for getting empty arrays and dicts.
220 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
221 Don't do any validation at all for now, that's better than just checking
224 * test/data/valid-messages/emptiness.message:
225 New test message with lots of empty arrays.
227 2003-03-16 Havoc Pennington <hp@pobox.com>
229 * dbus/dbus-connection.c
230 (_dbus_connection_queue_received_message_link): new function that
231 can't fail due to OOM
233 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
234 new function pops a message together with a list link
237 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
238 message queuing functions to avoid needing to alloc memory
240 2003-03-16 Havoc Pennington <hp@pobox.com>
242 Oops - test code was only testing failure of around 30 of the
243 mallocs in the test path, but it turns out there are 500+
244 mallocs. I believe this was due to misguided linking setup such
245 that there was one copy of dbus_malloc etc. in the daemon and one
246 in the shared lib, and only daemon mallocs were tested. In any
247 case, the test case now tests all 500+ mallocs, and doesn't pass
248 yet, though there are lots of fixes in this patch.
250 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
251 this so that it doesn't need to allocate memory, since it
252 has no way of indicating failure due to OOM (and would be
255 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
257 * bus/Makefile.am: rearrange to create two self-contained
258 libraries, to avoid having libraries with overlapping symbols.
259 that was resulting in weirdness, e.g. I'm pretty sure there
260 were two copies of global static variables.
262 * dbus/dbus-internals.c: move the malloc debug stuff to
265 * dbus/dbus-list.c (free_link): free list mempool if it becomes
268 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
270 * dbus/dbus-address.c (dbus_parse_address): free list nodes
273 * bus/dispatch.c (bus_dispatch_add_connection): free
274 message_handler_slot when no longer using it, so
275 memory leak checkers are happy for the test suite.
277 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
279 * bus/bus.c (new_connection_callback): disconnect in here if
280 bus_connections_setup_connection fails.
282 * bus/connection.c (bus_connections_unref): fix to free the
284 (bus_connections_setup_connection): if this fails, don't
285 disconnect the connection, just be sure there are no side
288 * dbus/dbus-string.c (undo_alignment): unbreak this
290 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
292 (_dbus_auth_new): fix the order in which we free strings
295 * bus/connection.c (bus_connection_disconnected): fix to
296 not send ServiceDeleted multiple times in case of memory
299 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
300 get the base service name
301 (dbus_bus_register_client): don't return base service name,
302 instead store it on the DBusConnection and have an accessor
304 (dbus_bus_register_client): rename dbus_bus_register()
306 * bus/dispatch.c (check_hello_message): verify that other
307 connections on the bus also got the correct results, not
308 just the one sending hello
310 2003-03-15 Havoc Pennington <hp@pobox.com>
312 Make it pass the Hello handling test including all OOM codepaths.
313 Now to do other messages...
315 * bus/services.c (bus_service_remove_owner): fix crash when
316 removing owner from an empty list of owners
317 (bus_registry_ensure): don't leave service in the list of
318 a connection's owned services if we fail to put the service
321 * bus/connection.c (bus_connection_preallocate_oom_error): set
322 error flag on the OOM error.
324 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
325 handle _dbus_transport_set_connection failure
327 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
328 to create watches up front and simply enable/disable them as
330 (unix_connection_set): this can now fail on OOM
332 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
333 of enabling/disabling a watch or timeout.
335 * bus/loop.c (bus_loop_iterate): don't touch disabled
338 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
340 2003-03-15 Havoc Pennington <hp@pobox.com>
342 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
343 write useful test code, after all that futzing around ;-)
345 Test does not yet pass because we can't handle OOM in
346 _dbus_transport_messages_pending (basically,
347 dbus_connection_preallocate_send() does not prealloc the write
348 watch). To fix this, I think we need to add new stuff to
349 set_watch_functions, namely a SetEnabled function so we can alloc
350 the watch earlier, then enable it later.
352 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
353 dbus-memory.c to the convenience lib
355 * bus/test.c: rename some static functions to keep them clearly
356 distinct from stuff in connection.c. Handle client disconnection.
358 2003-03-14 Havoc Pennington <hp@pobox.com>
360 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
361 transport, tests more of the real codepath. Set up clients
362 with bus_setup_debug_client.
364 * bus/test.c (bus_setup_debug_client): function to set up debug
365 "clients" on the main loop
367 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
370 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
373 * dbus/dbus-server-debug.c: support a debug server based on pipes
375 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
376 (_dbus_close): new function
378 * configure.in: check for socketpair
380 2003-03-14 Havoc Pennington <hp@redhat.com>
382 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
385 * dbus/dbus-transport-debug.c: rework this a good bit to be
386 less complicated. hopefully still works.
388 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
391 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
394 * dbus/dbus-message.c (dbus_message_copy): rename from
395 dbus_message_new_from_message, fix it up to copy
396 all the message fields, add test case
398 * bus/dispatch.c (bus_dispatch_test): add some more test code,
399 not quite passing yet
401 2003-03-14 Havoc Pennington <hp@pobox.com>
403 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
404 until no work remains" in test code. (the large diff here
405 is just code movement, no actual changes)
407 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
408 1, no point waiting around for test code.
409 (_dbus_server_debug_accept_transport): unref the timeout
410 after adding it (right?)
412 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
414 2003-03-13 Havoc Pennington <hp@redhat.com>
416 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
419 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
422 * dbus/dbus-connection.h: Make AddWatchFunction and
423 AddTimeoutFunction return a bool so they can fail on out-of-memory
425 * bus/bus.c (bus_context_new): set up timeout handlers
427 * bus/connection.c (bus_connections_setup_connection): set up
430 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
433 * bus/bus.c (bus_context_new): adapt to changes
435 * bus/connection.c: adapt to changes
437 * test/watch.c: adapt to DBusWatch changes
439 * bus/dispatch.c (bus_dispatch_test): started adding this but
442 2003-03-14 Anders Carlsson <andersca@codefactory.se>
444 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
446 2003-03-13 Havoc Pennington <hp@pobox.com>
448 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
449 set up a test framework as for the library
451 2003-03-12 Havoc Pennington <hp@pobox.com>
453 Throughout: purge global variables, introduce BusActivation,
454 BusConnections, BusRegistry, etc. objects instead.
456 * bus/bus.h, bus/bus.c: introduce BusContext as a global
459 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
460 going to redo this a bit differently I think
462 2003-03-12 Havoc Pennington <hp@redhat.com>
464 Mega-patch that gets the message bus daemon initially handling
465 out-of-memory. Work still needed. Also lots of random
466 moving stuff to DBusError instead of ResultCode.
468 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
470 * dbus/dbus-connection.c
471 (dbus_connection_send_with_reply_and_block): use DBusError
473 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
476 * dbus/dbus-connection.c (dbus_connection_send): drop the result
477 code here, as the only failure possible is OOM.
479 * bus/connection.c (bus_connection_disconnect):
480 rename bus_connection_disconnected as it's a notification only
482 * bus/driver.c (bus_driver_handle_acquire_service): don't free
483 "name" on get_args failure, should be done by get_args;
484 don't disconnect client for bad args, just return an error.
485 (bus_driver_handle_service_exists): ditto
487 * bus/services.c (bus_services_list): NULL-terminate returned array
489 * bus/driver.c (bus_driver_send_service_lost)
490 (bus_driver_send_service_acquired): send messages from driver to a
491 specific client to the client's unique name, not to the broadcast
494 * dbus/dbus-message.c (decode_header_data): reject messages that
495 contain no name field
496 (_dbus_message_get_client_serial): rename to
497 dbus_message_get_serial and make public
498 (_dbus_message_set_serial): rename from set_client_serial
499 (_dbus_message_set_reply_serial): make public
500 (_dbus_message_get_reply_serial): make public
502 * bus/connection.c (bus_connection_foreach): allow stopping
503 iteration by returning FALSE from foreach function.
505 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
506 (dbus_connection_free_preallocated_send)
507 (dbus_connection_preallocate_send): new API for sending a message
508 without possibility of malloc failure.
509 (dbus_connection_send_message): rename to just
510 dbus_connection_send (and same for whole function family)
512 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
514 * dbus/dbus-sysdeps.c (_dbus_exit): new function
516 * bus/activation.c: handle/return errors
518 * dbus/dbus-errors.h: add more DBUS_ERROR #define
520 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
521 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
522 (_dbus_result_from_errno): move to this file
524 2003-03-10 Anders Carlsson <andersca@codefactory.se>
526 * dbus/dbus-marshal.c:
527 (_dbus_marshal_set_string):
528 Take a length argument so we can marshal the correct string
531 (_dbus_marshal_dict), (_dbus_demarshal_dict),
532 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
533 (_dbus_marshal_test):
534 * dbus/dbus-marshal.h:
535 Add support for marshalling and demarshalling dicts.
537 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
538 Add support for TYPE DICT.
540 * dbus/dbus-message.c: (set_string_field):
541 Adjust header padding.
543 (dbus_message_append_args_valist), (dbus_message_append_dict),
544 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
545 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
546 (check_message_handling), (check_have_valid_message):
547 * dbus/dbus-message.h:
548 Add functions for setting and getting dicts.
550 * dbus/dbus-protocol.h:
556 * doc/dbus-specification.sgml:
557 Add information about how dicts are marshalled.
559 * test/data/invalid-messages/dict-with-nil-value.message:
560 * test/data/invalid-messages/too-short-dict.message:
561 * test/data/valid-messages/dict-simple.message:
562 * test/data/valid-messages/dict.message:
563 Add sample messages containing dicts.
565 2003-03-08 Anders Carlsson <andersca@codefactory.se>
567 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
569 2003-03-07 Anders Carlsson <andersca@codefactory.se>
572 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
573 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
574 (dbus_dict_set_int32), (dbus_dict_set_uint32),
575 (dbus_dict_set_double), (dbus_dict_set_string),
576 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
577 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
578 (dbus_dict_set_string_array), (_dbus_dict_test):
580 Fix according to comments from Havoc.
582 2003-03-06 Michael Meeks <michael@server.home>
584 * configure.in: if we don't have kde-config, disable have_qt.
586 2003-03-07 Anders Carlsson <andersca@codefactory.se>
591 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
592 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
593 (dbus_dict_remove), (dbus_dict_get_value_type),
594 (dbus_dict_get_keys), (dbus_dict_put_boolean),
595 (dbus_dict_put_int32), (dbus_dict_put_uint32),
596 (dbus_dict_put_double), (dbus_dict_put_string),
597 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
598 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
599 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
600 (dbus_dict_get_int32), (dbus_dict_get_uint32),
601 (dbus_dict_get_double), (dbus_dict_get_string),
602 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
603 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
604 (dbus_dict_get_string_array), (_dbus_dict_test):
606 Add DBusDict implementation
608 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
612 2003-03-04 Havoc Pennington <hp@pobox.com>
614 * test/data/auth/*: adapt to changes
616 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
617 USERID_BASE64 and change USERNAME_BASE64 to put in username not
620 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
621 more stuff from being in a context name, to make the protocol
624 * dbus/dbus-errors.c (dbus_error_has_name): new function
625 (dbus_error_is_set): new function
627 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
628 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
630 * dbus/dbus-connection.c (dbus_connection_flush): also read
631 messages during a flush operation
633 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
635 2003-03-05 Anders Carlsson <andersca@codefactory.se>
637 * configure.in: Check for gethostbyname on Solaris.
639 * dbus/dbus-transport.c: (_dbus_transport_open):
640 Remove duplicate "tcp" entry.
642 * doc/dbus-specification.sgml:
645 2003-03-05 Anders Carlsson <andersca@codefactory.se>
647 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
648 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
649 (_dbus_keyring_test):
650 * dbus/dbus-md5.c: (_dbus_md5_compute):
651 * dbus/dbus-sha.c: (_dbus_sha_compute):
654 2003-03-05 Anders Carlsson <andersca@codefactory.se>
656 * README: Add some things.
658 2003-03-04 Anders Carlsson <andersca@codefactory.se>
660 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
661 after case DBUS_TYPE_BOOELAN.
663 2003-03-02 Havoc Pennington <hp@pobox.com>
665 * test/break-loader.c (randomly_set_extreme_ints): add test that
666 sets really huge and small integers
668 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
669 that length of boolean array fits in the string, and that
670 string has room for boolean value in single-bool case.
672 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
673 optional value to "ALIGN" command which is what to fill the
676 * test/data/valid-messages/no-padding.message: add regression
677 test for the message padding problem
679 2003-03-02 Havoc Pennington <hp@pobox.com>
681 * dbus/dbus-message.c (decode_header_data): fix to always init
682 message_padding, from Benjamin Dauvergne
684 2003-03-02 Havoc Pennington <hp@pobox.com>
690 2003-03-01 Joe Shaw <joe@assbarn.com>
692 * configure.in: Check for "struct cmsgcred" and try to access its
693 members for BSD-like unices.
695 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
696 _dbus_read_credentials_unix_socket().
697 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
698 read() for reading the credential byte off the unix socket. Use
699 struct cmsgcred on systems that support it.
701 2003-02-27 Alexander Larsson <alexl@redhat.com>
705 Make gthreads-2.0 dependency optional. Don't build thread test if
708 2003-02-27 Havoc Pennington <hp@pobox.com>
710 * dbus/dbus-connection.c
711 (dbus_connection_send_message_with_reply_and_block): fix doh!
712 doh! doh! bug that resulted in never removing a reply from the
713 queue, no wonder we called get_reply_serial so much ;-)
715 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
716 and client serial instead of demarshaling them every time
718 2003-02-27 Havoc Pennington <hp@pobox.com>
720 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
721 more inlined, using dbus-string-private.h, speeds things up
724 * dbus/dbus-string.c (_dbus_string_free): apply align offset
725 when freeing the string
726 (_dbus_string_steal_data): fix for align offset
727 (undo_alignment): new function
729 2003-02-26 Havoc Pennington <hp@redhat.com>
731 All kinds of audit fixes from Owen, plus initial attempt to
732 handle unaligned memory returned from malloc.
734 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
735 leave room for align_offset and nul byte
736 (fixup_alignment): function to track an align_offset and
737 ensure real->str is aligned
738 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
739 to allow a nul byte plus align offset
740 (_dbus_string_lock): fix overflow issue
741 (_dbus_string_init_const_len): add assertions on sanity of len,
742 assign allocated to be ALLOCATION_PADDING larger than len
743 (set_length): fixup the overflow handling
744 (_dbus_string_get_data_len): fix overflow in assertion
745 (open_gap): detect overflow in size of gap to be opened
746 (_dbus_string_lengthen): add overflow check
747 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
748 (_dbus_string_append): add overflow check
749 (_dbus_string_append_unichar): overflow
750 (_dbus_string_delete): fix overflow in assertion
751 (_dbus_string_copy_len): overflow in assertion
752 (_dbus_string_replace_len): overflows in assertions
753 (_dbus_string_find): change to implement in terms of
755 (_dbus_string_find_to): assorted fixage
756 (_dbus_string_equal_c_str): assert c_str != NULL,
757 fix logic so the function works
758 (_dbus_string_ends_with_c_str): fix overflow thingy
759 (_dbus_string_base64_encode): overflow fix
760 (_dbus_string_validate_ascii): overflow
761 (_dbus_string_validate_nul): overflow
763 2003-02-26 Havoc Pennington <hp@redhat.com>
765 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
767 2003-02-26 Alexander Larsson <alexl@redhat.com>
770 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
772 * dbus/dbus-connection.c:
773 * dbus/dbus-connection.h:
774 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
775 Add dbus_connection_set_wakeup_main_function and use it when queueing
776 incoming and outgoing messages.
779 * dbus/dbus-dataslot.c:
780 Threadsafe usage of DBusDataSlotAllocator
782 * dbus/dbus-message.c: (dbus_message_get_args_iter):
785 * dbus/dbus-server-unix.c:
789 Implement the new wakeup functions for glib.
792 * glib/test-thread-client.c:
793 * glib/test-thread-server.c:
794 * glib/test-thread.h:
795 Initial cut at some thread test code. Not really done yet.
797 2003-02-26 Havoc Pennington <hp@pobox.com>
799 * dbus/dbus-connection.c
800 (dbus_connection_send_message_with_reply_and_block): fix crash
801 where we ref'd the outgoing message instead of the returned reply
803 * dbus/dbus-transport-unix.c (do_authentication): check read watch
804 at the end of this function, so if we didn't need to read for
805 authentication, we reinstall it for receiving messages
807 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
808 a NULL sender for peer-to-peer case
810 * dbus/dbus-transport-unix.c (check_read_watch): handle
811 !authenticated case correctly
813 * glib/dbus-gmain.c: add support for DBusServer
815 * dbus/dbus-server.c: add data slot support
817 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
818 return values and handle errors
820 * dbus/dbus-dataslot.c: factor out the data slot stuff from
823 * Doxyfile.in (INPUT): add glib subdir
825 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
826 setup_with_g_main instead of hookup_with_g_main; write docs
828 2003-02-24 Anders Carlsson <andersca@codefactory.se>
830 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
831 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
832 * dbus/dbus-message.c: (dbus_message_append_boolean),
833 (dbus_message_append_boolean_array),
834 (dbus_message_get_args_valist), (_dbus_message_test):
835 * dbus/dbus-message.h:
836 * doc/dbus-specification.sgml:
837 Various fixes as pointed out by Havoc.
839 * test/data/invalid-messages/bad-boolean-array.message:
840 * test/data/invalid-messages/bad-boolean.message:
841 Add invalid boolean value test cases.
843 2003-02-24 Anders Carlsson <andersca@codefactory.se>
845 * dbus/dbus-internals.c: (_dbus_type_to_string):
846 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
847 (_dbus_marshal_validate_arg):
848 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
849 * dbus/dbus-message.c: (dbus_message_append_args_valist),
850 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
851 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
852 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
853 (dbus_message_iter_get_double),
854 (dbus_message_iter_get_boolean_array), (message_iter_test):
855 * dbus/dbus-message.h:
856 * dbus/dbus-protocol.h:
857 * doc/dbus-specification.sgml:
858 * test/data/valid-messages/lots-of-arguments.message:
859 Add support for boolean and boolean array types.
861 2003-02-23 Havoc Pennington <hp@pobox.com>
863 * dbus/dbus-keyring.c: finish most of this implementation and
866 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
867 these barf if the error isn't cleared to NULL
869 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
870 (_dbus_create_directory): new function
872 * dbus/dbus-errors.c (dbus_set_error): fix warning
874 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
875 (_dbus_string_hex_decode): new function
876 (test_hex_roundtrip): test code
878 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
880 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
882 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
883 the save-to-temp/rename trick to atomically write the new file
884 (_dbus_string_parse_uint): new function
886 2003-02-22 Havoc Pennington <hp@pobox.com>
888 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
890 2003-02-22 Havoc Pennington <hp@pobox.com>
892 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
893 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
895 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
897 * dbus/test/data/sha-1: add US government test suite for SHA-1
899 2003-02-21 Anders Carlsson <andersca@codefactory.se>
901 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
902 Make string arrays NULL-terminated.
904 * dbus/dbus-memory.c: (dbus_free_string_array):
905 * dbus/dbus-memory.h:
906 New function for freeing NULL-terminated string arrays.
908 * dbus/dbus-message-builder.c: (append_quoted_string),
909 (_dbus_message_data_load):
910 Add support for array types.
912 * dbus/dbus-message.c: (check_message_handling):
913 Add more types as test cases.
915 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
916 (_dbus_string_parse_double):
917 Add the start offset to the end offset.
919 * test/data/valid-messages/lots-of-arguments.message:
920 New test message with lots of arguments.
922 2003-02-21 Anders Carlsson <andersca@codefactory.se>
924 * dbus/dbus-message.c: (dbus_message_append_nil),
925 (dbus_message_append_int32), (dbus_message_append_uint32),
926 (dbus_message_append_double), (dbus_message_append_string),
927 (dbus_message_append_int32_array),
928 (dbus_message_append_uint32_array),
929 (dbus_message_append_double_array),
930 (dbus_message_append_byte_array),
931 (dbus_message_append_string_array):
932 Fix all out-of-memory handling in these functions.
934 2003-02-21 Anders Carlsson <andersca@codefactory.se>
936 * dbus/dbus-message.c: (dbus_message_append_nil):
939 2003-02-21 Anders Carlsson <andersca@codefactory.se>
941 * dbus/dbus-message.c: (dbus_message_append_args_valist),
942 (dbus_message_append_nil), (dbus_message_append_int32_array),
943 (dbus_message_append_uint32_array),
944 (dbus_message_append_double_array),
945 (dbus_message_append_byte_array),
946 (dbus_message_append_string_array), (dbus_message_get_args_valist),
947 (dbus_message_iter_get_int32_array),
948 (dbus_message_iter_get_uint32_array),
949 (dbus_message_iter_get_double_array),
950 (dbus_message_iter_get_byte_array),
951 (dbus_message_iter_get_string_array):
953 * dbus/dbus-message.h:
954 Add functions for appending and getting arrays.
956 2003-02-21 Anders Carlsson <andersca@codefactory.se>
958 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
959 element size at least 8 bytes, fixes mempool tests on
962 2003-02-20 Alexander Larsson <alexl@redhat.com>
964 * dbus/dbus-transport-unix.c (unix_do_iteration):
965 Unlock the connection mutex during a blocking select call.
966 Add todo about how we need a way to wake up the select.
968 * dbus/dbus-connection-internal.h:
969 * dbus/dbus-connection.c:
970 Add _dbus_connection_lock and _dbus_connection_unlock.
972 2003-02-19 Havoc Pennington <hp@pobox.com>
974 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
975 Doxyfile.in, not Doxyfile
977 * dbus/dbus-keyring.c: do some hacking on this
979 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
981 * dbus/dbus-errors.c (dbus_set_error_const): do not call
983 (dbus_set_error): remove dbus_error_init, check for message ==
984 NULL *before* we sprintf into it, and add @todo about including
985 system headers in this file
987 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
989 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
991 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
992 get various bits of user information based on either username
994 (_dbus_homedir_from_username): new function
996 2003-02-19 Anders Carlsson <andersca@codefactory.se>
999 Add check for nonposix getpwnam_r
1001 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
1002 Align the pool element size to a sizeof (void *) boundary.
1004 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
1005 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
1006 General Solaris fixes.
1008 * test/data/valid-messages/simplest-manual.message:
1009 Explicitly state that we want little-endian packing.
1011 2003-02-19 Mikael Hallendal <micke@codefactory.se>
1013 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1015 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
1016 Added to create a transport connecting using a tcp/ip socket.
1018 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
1019 to a tcp socket at given host and port.
1020 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
1023 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
1025 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1026 Added to create a server listening on a TCP/IP socket.
1028 2003-02-19 Havoc Pennington <hp@pobox.com>
1030 Throughout: mop up all the Doxygen warnings and undocumented
1033 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
1034 to search any paths.
1036 * dbus/dbus-threads.c: move global mutex initializers to
1037 dbus-internals.h, multiple prototypes was confusing doxygen
1038 besides being kind of ugly
1040 * Doxyfile (PREDEFINED): have Doxygen define
1041 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
1042 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
1043 (do not abuse the feature! it's for stuff like the autogenerated
1044 macros in dbus-md5.c, not just for things you don't feel like
1047 2003-02-18 Havoc Pennington <hp@pobox.com>
1049 * dbus/dbus-string.c (_dbus_string_zero): new function
1051 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
1052 wrap it in some dbus-friendly API
1054 * dbus/dbus-types.h: add 16-bit types
1056 2003-02-18 Joe Shaw <joe@assbarn.com>
1058 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
1059 credentials from our currently running process.
1060 (get_word): Fix a buglet where we were copying the entire length
1061 instead of relative to our position.
1063 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
1064 keys on the stack... it's 640k of data.
1066 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
1067 read the credentials byte off the socket, even if we don't have
1069 (_dbus_poll): Implement poll() using select() for systems which
1072 * glib/test-dbus-glib.c (main): Print out an error if no
1073 parameters are given.
1075 * test/data/auth/fallback.auth-script: Added. Tests that a client
1076 can fallback to a secondary auth mechanism if the first fails.
1078 2003-02-18 Havoc Pennington <hp@pobox.com>
1082 2003-02-17 Havoc Pennington <hp@pobox.com>
1084 * doc/dbus-specification.sgml: lots of cosmetic
1085 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
1086 env variable to DBUS_BUS_ADDRESS, s/client/application/,
1087 s/server/bus/ (except in authentication section). Add a section
1088 "Message Bus Message Routing"
1090 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
1096 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1098 * doc/dbus-specification.sgml:
1099 Specification updates.
1101 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1103 * bus/activation.c: (bus_activation_init), (child_setup),
1104 (bus_activation_activate_service):
1106 * bus/main.c: (main):
1107 Set DBUS_ADDRESS environment variable.
1109 * dbus/dbus-errors.c: (dbus_set_error):
1110 Don't use va_copy since that's a C99 feature.
1112 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
1113 (_dbus_spawn_async):
1114 * dbus/dbus-sysdeps.h:
1115 Add child_setup_func to _dbus_spawn_async.
1117 * doc/dbus-specification.sgml:
1118 Update specification.
1120 * test/spawn-test.c: (setup_func), (main):
1123 2003-02-17 Alexander Larsson <alexl@redhat.com>
1125 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1128 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1132 * doc/dbus-test-plan.sgml:
1133 Add test plan document.
1138 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1140 * dbus/dbus-message.c: (decode_header_data),
1141 (_dbus_message_loader_return_buffer):
1142 Set the header padding amount when loading a message.
1144 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1146 * bus/dispatch.c: (send_one_message):
1147 Only send broadcast messages to registered connections.
1149 * dbus/dbus-message.c: (dbus_message_name_is):
1150 * dbus/dbus-message.h:
1151 New convenience function.
1153 * dbus/dbus-transport-debug.c: (do_reading):
1154 Only dispatch one message per run.
1157 * test/bus-test.c: (new_connection_callback), (die),
1158 (test_hello_client1_handler), (test_hello_client2_handler),
1159 (test_hello_replies), (main):
1161 * test/bus-test-loop.[ch]:
1164 2003-02-16 Havoc Pennington <hp@pobox.com>
1166 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1167 backward conditional
1169 2003-02-16 Alexander Larsson <alexl@redhat.com>
1171 * dbus/dbus-connection.c:
1172 Implement sent_message_with_reply. (with_reply_and block is still
1174 Made dispatch_message not lose message if OOM.
1176 * dbus/dbus-errors.h:
1177 Add NoReply error (for reply timeouts).
1179 2003-02-16 Alexander Larsson <alexl@redhat.com>
1181 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1182 Actually free keys and values when destroying hashtable.
1184 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1186 * dbus/dbus-auth.c: (client_try_next_mechanism):
1189 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1190 Return TRUE if there's no thread implementation around.
1192 * glib/dbus-gmain.c: (free_source),
1193 (dbus_connection_hookup_with_g_main):
1194 Make sure to remove the GSource when the connection is finalized.
1196 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1198 * bus/dispatch.c: (bus_dispatch_message_handler):
1199 * dbus/dbus-errors.h:
1200 Return an error if someone tries to send a message to a service
1203 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1205 * bus/activation.c: (load_directory), (bus_activation_init),
1206 (bus_activation_activate_service):
1209 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1210 More work on the activation handling.
1212 * dbus/dbus-errors.h:
1213 Add some error messages
1215 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1216 * dbus/dbus-message.h:
1217 New function that creates an error message.
1219 * dbus/dbus-protocol.h:
1220 Add ACTIVATE_SERVER message.
1222 * dbus/dbus-server-unix.c: (unix_handle_watch),
1223 (_dbus_server_new_for_domain_socket):
1224 Call _dbus_fd_set_close_on_exec.
1226 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1227 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1228 (_dbus_fd_set_close_on_exec):
1229 * dbus/dbus-sysdeps.h:
1230 Add _dbus_fd_set_close_on exec function. Also add function that checks
1231 that all open fds are set to close-on-exec and warns otherwise.
1233 * dbus/dbus-transport-unix.c:
1234 (_dbus_transport_new_for_domain_socket):
1235 Call _dbus_fd_set_close_on_exec.
1237 2003-02-16 Havoc Pennington <hp@pobox.com>
1239 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1240 allow people to avoid setting SIGPIPE to SIG_IGN
1241 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1242 we've been asked not to
1244 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1246 * dbus/dbus-list.c: (_dbus_list_append_link),
1247 (_dbus_list_prepend_link):
1248 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1252 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1255 * bus/activation.c: (bus_activation_entry_free),
1256 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1258 * bus/main.c: (main):
1259 Add simple activation support, doesn't work yet though.
1261 2003-02-15 Zack Rusin <zack@kde.org>
1263 * qt/dbus-qthread.cpp: small casting fix
1265 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1267 * dbus/dbus-errors.c: (dbus_set_error):
1268 * dbus/dbus-errors.h:
1269 Add a few errors and make dbus_set_error void.
1271 * dbus/dbus-sysdeps.c:
1272 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1273 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1274 * dbus/dbus-sysdeps.h:
1275 Add _dbus_spawn_async.
1277 * test/spawn-test.c: (main):
1278 Test for _dbus_spawn_async.
1280 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1282 * dbus/dbus-internals.h:
1283 Fix build without tests.
1285 * dbus/dbus-list.c: (alloc_link):
1286 Fix a segfault when a malloc fails.
1288 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1289 (dbus_malloc0), (dbus_realloc):
1290 Add support for malloc debugging.
1292 2003-02-15 Alexander Larsson <alexl@redhat.com>
1294 * dbus/dbus-threads.c:
1295 * dbus/dbus-threads.h:
1296 Add condvars. Remove static mutext from API.
1297 Implement static mutexes by initializing them from threads_init.
1299 * glib/dbus-gthread.c:
1300 * qt/dbus-qthread.cpp:
1301 Update with the thread api changes.
1306 Turn StaticMutex into normal mutex + init function.
1307 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1308 _dbus_list_append_link, _dbus_list_prepend_link
1311 * dbus/dbus-sysdeps.c:
1312 * dbus/dbus-sysdeps.h:
1313 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1314 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1316 * dbus/dbus-protocol.h:
1317 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1319 * dbus/dbus-message.c:
1320 Make ref/unref atomic.
1323 * dbus/dbus-connection-internal.h:
1324 * dbus/dbus-connection.c:
1325 * dbus/dbus-connection.h:
1327 Change _peek to _borrow,_return & _steal_borrowed.
1328 Change disconnect callback to event.
1329 Make dbus_connection_dispatch_messages reentrant.
1331 * dbus/dbus-transport.c:
1332 Don't ref the connection on calls to the transport
1335 * dbus/dbus-message-handler.c:
1338 * glib/dbus-gmain.c:
1339 Don't use peek_message anymore
1342 * test/debug-thread.c:
1343 * test/debug-thread.h:
1344 Simple thread implementation that asserts() on deadlocks in
1345 single-threaded code.
1348 (main) Call debug_threads_init.
1351 Use disconnect message instead of disconnect callback.
1355 Don't call dbus_connection_set_disconnect_function. Instead export
1356 bus_connection_disconnect.
1359 Call bus_connection_disconnect when we get a disconnected message.
1361 2003-02-15 Havoc Pennington <hp@pobox.com>
1363 * dbus/dbus-message.c (dbus_message_new): fool around with the
1366 2003-02-14 Havoc Pennington <hp@pobox.com>
1368 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1370 * dbus/dbus-memory.c: fail if the debug functions indicate we
1373 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1374 (_dbus_decrement_fail_alloc_counter): debug functions to
1375 simulate memory allocation failures
1377 2003-02-14 Havoc Pennington <hp@pobox.com>
1379 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1382 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1384 * bus/driver.c: (bus_driver_handle_hello):
1386 * bus/services.c: (bus_service_lookup):
1387 Reorder message sending so we get a more sane order.
1389 * test/bus-test.c: (message_handler):
1392 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1394 * bus/driver.c: (bus_driver_send_service_deleted),
1395 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1396 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1397 (bus_driver_send_welcome_message),
1398 (bus_driver_handle_list_services),
1399 (bus_driver_handle_acquire_service),
1400 (bus_driver_handle_service_exists):
1401 * dbus/dbus-bus.c: (dbus_bus_register_client),
1402 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1403 * dbus/dbus-errors.c: (dbus_result_to_string):
1404 * dbus/dbus-errors.h:
1405 * dbus/dbus-message.c: (dbus_message_append_args),
1406 (dbus_message_append_args_valist), (dbus_message_get_args),
1407 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1408 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1409 (dbus_message_iter_get_byte_array),
1410 (dbus_message_iter_get_string_array), (message_iter_test),
1411 (check_message_handling), (_dbus_message_test):
1412 * dbus/dbus-message.h:
1413 * test/bus-test.c: (main):
1414 Change fields to arguments in messages, so that they won't be
1415 confused with header fields.
1417 * glib/test-dbus-glib.c: (main):
1418 Remove append_fields from hello message.
1420 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1422 * dbus/dbus-errors.c:
1423 * dbus/dbus-message.c:
1424 * dbus/dbus-string.c:
1425 Documentation fixes.
1427 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1429 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1431 Implement support for timeouts in dbus-glib.
1433 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1435 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1436 * dbus/dbus-message.c: (process_test_subdir):
1437 * test/break-loader.c: (find_breaks_based_on):
1438 Plug some memory leaks.
1440 2003-02-13 Richard Hult <rhult@codefactory.se>
1442 * bus/main.c: Fix build.
1444 * dbus/dbus-errors.h:
1445 * dbus/dbus-errors.c: Fix copyright for Anders.
1447 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1452 * bus/connection.c: (bus_connection_foreach):
1455 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1456 (unescape_string), (new_section), (parse_section_start),
1457 (parse_key_value), (report_error), (bus_desktop_file_load),
1458 (bus_desktop_file_get_string):
1459 * bus/desktop-file.h:
1460 Use DBusError for error reporting.
1462 * bus/dispatch.c: (send_one_message),
1463 (bus_dispatch_message_handler):
1464 * bus/driver.c: (bus_driver_send_service_deleted),
1465 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1466 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1467 (bus_driver_send_welcome_message),
1468 (bus_driver_handle_list_services),
1469 (bus_driver_handle_acquire_service),
1470 (bus_driver_handle_service_exists):
1471 * bus/loop.c: (bus_loop_run):
1473 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1475 * bus/utils.c: (bus_wait_for_memory):
1477 New files with general utility functions.
1479 * dbus/dbus-internals.h:
1480 Remove _DBUS_HANDLE_OOM.
1482 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1484 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1485 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1486 * dbus/dbus-errors.h:
1487 Add DBusError structure.
1489 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1491 * test/data/valid-messages/standard-acquire-service.message:
1492 * test/data/valid-messages/standard-hello.message:
1493 * test/data/valid-messages/standard-list-services.message:
1494 * test/data/valid-messages/standard-service-exists.message:
1495 Add some standard messages.
1497 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1499 * bus/driver.c: (bus_driver_send_welcome_message),
1500 (bus_driver_handle_list_services),
1501 (bus_driver_handle_acquire_service),
1502 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1503 Update for API changes in libdbus.
1505 * dbus/dbus-message.c: (dbus_message_new_reply):
1506 * dbus/dbus-message.h:
1507 Remove the name argument. The spec states that replies shouldn't
1510 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1512 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1513 (report_error), (bus_desktop_file_load), (lookup_section),
1514 (lookup_line), (bus_desktop_file_get_raw),
1515 (bus_desktop_file_get_string):
1516 * bus/desktop-file.h:
1517 Some fixes, and new functions for getting a key value from a section.
1519 2003-02-13 Havoc Pennington <hp@pobox.com>
1521 * test/data/auth/fail-after-n-attempts.auth-script: new test
1523 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1526 2003-02-13 Havoc Pennington <hp@pobox.com>
1528 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1529 dbus_credentials_match were backward
1531 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1532 NO_CREDENTIALS and ROOT_CREDENTIALS
1534 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1535 into here. Never process more commands after we've reached an
1536 end state; store further data as unused bytes.
1538 * test/data/auth/*: add more auth tests
1540 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1541 command to match exact string and EXPECT_UNUSED to match unused
1544 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1546 2003-02-12 Havoc Pennington <hp@pobox.com>
1548 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1549 \r off of popped lines
1551 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1554 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1557 2003-02-12 Havoc Pennington <hp@pobox.com>
1559 * dbus/Makefile.am: remove break-loader from the build, since it
1562 * configure.in: add --enable-gcov to turn on coverage profiling
1563 flags and disable optimization
1565 2003-02-10 Havoc Pennington <hp@pobox.com>
1567 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1568 initial cut at test framework for DBusAuth from laptop.
1569 Doesn't quite work yet but it compiles and I need to get
1570 it off the 266mhz laptop. ;-)
1572 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1573 fix a memleak in error case
1575 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1578 * bus/desktop-file.c:
1579 * bus/desktop-file.h:
1580 Add a desktop file parser.
1582 2003-02-11 Zack Rusin <zack@kde.org>
1584 * qt/message.[h|cpp]: sample implementation
1585 of the KDE wrapper for DBusMessage
1587 2003-02-09 Zack Rusin <zack@kde.org>
1589 * test/bus-test.c: make_it_compile
1590 * doc/dbus-specification.sgml: minimal semantic fix
1592 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1598 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1601 * dbus/dbus-break-loader.c:
1603 * test/break-loader.c:
1604 Move dbus-break-loader to test/ and rename it to break-loader.
1606 2003-02-02 Havoc Pennington <hp@pobox.com>
1608 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1609 for code to manage cookies in your home directory
1611 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1613 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1614 to authenticate, then disconnect the client.
1616 2003-02-03 Alexander Larsson <alexl@redhat.com>
1618 * dbus/dbus-message.c (dbus_message_append_fields):
1621 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1623 * doc/dbus-specification.sgml:
1624 Update address format section.
1626 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1629 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1630 (message_handler), (new_connection_callback), (loop_quit),
1634 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1636 * bus/driver.c: (bus_driver_handle_service_exists):
1637 Simplify the code a bit.
1639 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1642 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1645 Add libdbus-daemon.la and link to it.
1647 2003-02-01 James Willcox <jwillcox@gnome.org>
1649 * bus/driver.c: (bus_driver_handle_own_service):
1650 Actually include the service reply code in the message.
1652 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1654 * bus/driver.c: (bus_driver_handle_service_exists):
1655 Don't unref the incoming message.
1657 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1659 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1661 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1663 * dbus/dbus-server.c: (dbus_server_listen):
1664 * dbus/dbus-transport.c: (_dbus_transport_open):
1665 ifdef out the calls to the debug transport and server.
1667 2003-02-02 Alexander Larsson <alexl@redhat.com>
1669 * dbus/dbus-watch.c (dbus_watch_get_flags):
1670 Add note in the docs that ERROR or HANGUP won't be returned
1671 and are assumed always on.
1673 * glib/dbus-gmain.c (add_watch):
1674 Always add IO_ERR | IO_HUP
1676 * dbus/dbus-message.h:
1677 Add semicolon after dbus_message_iter_get_string_array().
1678 Makes qt code build again
1680 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1682 * bus/driver.c: (create_unique_client_name),
1683 (bus_driver_handle_hello):
1684 Don't take a name, just use a numeric id to identify
1688 * dbus/dbus-bus.c: (dbus_bus_register_client),
1689 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1691 Add new convenience functions for communicating with the bus.
1693 * dbus/dbus-message.h:
1695 * dbus/dbus-protocol.h:
1698 2003-02-01 Alexander Larsson <alexl@redhat.com>
1700 * dbus/dbus-message.c (dbus_message_append_fields):
1701 Add some more doc comments.
1703 2003-02-01 Havoc Pennington <hp@pobox.com>
1705 * dbus/dbus-break-loader.c (randomly_modify_length): change
1706 a 4-byte value in the message as if it were a length
1708 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1709 execute bit on saved files
1711 2003-02-01 Havoc Pennington <hp@pobox.com>
1713 * dbus/dbus-break-loader.c (main): new program to find messages
1714 that break the loader.
1716 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1717 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1719 * dbus/dbus-string.c (_dbus_string_set_byte): new
1721 2003-01-31 Havoc Pennington <hp@pobox.com>
1723 * dbus/dbus-message.c: refactor the test code to be more general,
1724 in preparation for writing a "randomly permute test cases to
1725 try to break the loader" program.
1727 2003-01-31 Havoc Pennington <hp@pobox.com>
1729 * doc/dbus-specification.sgml: work on the specification
1731 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1732 the protocol version of the message.
1734 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1735 no longer specifies that.
1736 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1739 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1740 "break" for DBUS_TYPE_NIL, remove @todo
1742 2003-01-31 Havoc Pennington <hp@pobox.com>
1744 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1745 just set_is_error/get_is_error as this is a commonly-used
1746 function, and write docs.
1748 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1750 * dbus/dbus-address.c: (dbus_address_entry_free):
1751 Free key and value lists.
1753 * dbus/dbus-internals.c: (_dbus_type_to_string):
1754 Add the types we didn't have.
1756 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1757 (_dbus_marshal_validate_arg):
1760 * dbus/dbus-message.c: (dbus_message_set_sender):
1761 Remove todo about being able to set sender to NULL.
1763 (dbus_message_set_is_error_reply),
1764 (dbus_message_get_is_error_reply):
1765 * dbus/dbus-message.h:
1768 * dbus/dbus-protocol.h:
1769 Add error reply flag.
1771 * test/data/valid-messages/opposite-endian.message:
1772 Add NIL type to test.
1774 2003-01-31 Havoc Pennington <hp@pobox.com>
1776 * doc/dbus-specification.sgml: fully specify the header. Add
1777 flags and major protocol version, and change header/body len to
1780 * dbus/dbus-message-builder.c (append_saved_length): append length
1783 * dbus/dbus-message.c (dbus_message_create_header): change header
1784 length and body length to unsigned. Add the new fields from the
1786 (_dbus_message_loader_return_buffer): unsigned header/body len
1788 2003-01-30 Havoc Pennington <hp@pobox.com>
1790 * dbus/dbus-auth.c: rework to use only REJECTED, no
1793 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1794 use REJECTED, suggested by Mark McLoughlin
1796 2003-01-30 Havoc Pennington <hp@pobox.com>
1798 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1799 a better way to report errors here. e.g. "unix address lacks
1800 path" or something. also "no such file" when the path doesn't
1803 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1805 (dbus_parse_address): add @todo about documenting address format,
1806 and allowing , and ; to be escaped
1808 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1811 Add dbus-address.[ch]
1813 * dbus/dbus-address.c: (dbus_address_entry_free),
1814 (dbus_address_entries_free), (create_entry),
1815 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1816 (dbus_parse_address), (_dbus_address_test):
1817 * dbus/dbus-address.h:
1818 New files for dealing with address parsing.
1820 * dbus/dbus-connection.c:
1821 Document timeout functions.
1823 * dbus/dbus-message.c:
1824 Document dbus_message_new_from_message.
1826 * dbus/dbus-server-debug.c:
1829 * dbus/dbus-server.c: (dbus_server_listen):
1830 Parse address and use correct server implementation.
1832 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1833 * dbus/dbus-string.h:
1834 New function with test.
1836 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1840 * dbus/dbus-transport-debug.c:
1843 * dbus/dbus-transport.c: (_dbus_transport_open):
1844 Parse address and use correct transport implementation.
1846 2003-01-30 Havoc Pennington <hp@pobox.com>
1848 * dbus/dbus-message.c: use message->byte_order instead of
1849 DBUS_COMPILER_BYTE_ORDER throughout.
1850 (dbus_message_create_header): pad header to align the
1851 start of the body of the message to 8-byte boundary
1853 * dbus/dbus-marshal.h: make all the demarshalers take const
1854 DBusString arguments.
1856 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1857 validate message args here, so we don't have to do slow validation
1858 later, and so we catch bad messages as they are incoming. Also add
1859 better checks on header_len and body_len. Also fill in
1862 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1863 implemented properly)
1864 (_dbus_string_validate_nul): new function to check all-nul
1866 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1867 get_arg_end_pos and remove all validation
1868 (_dbus_marshal_validate_arg): actually do validation here.
1870 2003-01-29 Havoc Pennington <hp@pobox.com>
1872 * dbus/dbus-message.c (check_message_handling): fix assertion
1873 failure on set_client_serial
1875 2003-01-28 Havoc Pennington <hp@pobox.com>
1877 * dbus/dbus-server-debug.c: Add doc section comments
1879 * dbus/dbus-transport-debug.c: add doc section comments
1881 2003-01-28 Havoc Pennington <hp@redhat.com>
1883 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1884 the reverse order from how I had it
1885 (_dbus_string_base64_encode): reverse encoding order. I was
1886 basically byteswapping everything during encoding.
1888 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1890 * dbus/dbus-connection-internal.h:
1891 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1892 (_dbus_connection_remove_timeout):
1893 Add functions for adding and removing timeouts.
1895 * dbus/dbus-message.c: (dbus_message_new_from_message):
1896 Add new function that takes a message and creates an exact
1897 copy of it, but with the refcount set to 1.
1898 (check_message_handling):
1901 * dbus/dbus-server-protected.h:
1902 * dbus/dbus-server.c: (_dbus_server_init_base),
1903 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1904 (dbus_server_set_timeout_functions):
1905 (_dbus_server_remove_timeout):
1906 New functions so that a server can add and remove timeouts.
1908 (dbus_server_listen):
1909 Add commented out call to dbus_server_debug_new.
1911 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1912 Actually set the handler, doh.
1914 * dbus/dbus-transport.c: (_dbus_transport_open):
1915 Add commented out call to dbus_transport_debug_client_new.
1918 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1920 2003-01-28 Havoc Pennington <hp@pobox.com>
1922 * dbus/dbus-message.c (check_message_handling): function to check
1923 on the loaded message, iterates over it etc.
1925 2003-01-28 Havoc Pennington <hp@pobox.com>
1927 * test/Makefile.am (dist-hook): fix make distdir
1929 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1931 2003-01-27 Havoc Pennington <hp@pobox.com>
1933 * dbus/dbus-mempool.c (time_for_size): replace printf with
1936 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1937 empty lines; fix the SAVE_LENGTH stuff to be
1938 START_LENGTH/END_LENGTH so it actually works; couple other
1941 * test/Makefile.am (dist-hook): add dist-hook for .message files
1943 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1944 can be constant or locked.
1945 (_dbus_string_free): allow freeing a const string as
1948 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1950 * dbus/dbus-test-main.c (main): take an argument which is the
1951 directory containing test data
1953 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1954 argument to this and load all the messages in test/data/
1955 checking that they can be loaded or not loaded as appropriate.
1957 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1959 * bus/dispatch.c: (bus_dispatch_message_handler):
1960 Dispatch messages sent to services.
1962 * bus/driver.c: (bus_driver_send_service_deleted),
1963 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1964 (bus_driver_send_service_acquired):
1965 Add helper functions for sending service related messages.
1967 (bus_driver_send_welcome_message):
1968 Send HELLO_REPLY instead of WELCOME.
1970 (bus_driver_handle_list_services):
1971 Send LIST_SERVICES_REPLY instead of SERVICES.
1973 (bus_driver_handle_own_service),
1974 (bus_driver_handle_service_exists):
1975 New message handlers.
1977 (bus_driver_handle_message):
1978 Invoke new message handlers.
1980 (bus_driver_remove_connection):
1981 Don't remove any services here since that's done automatically
1982 by bus_service_remove_owner now.
1985 New function signatures.
1987 * bus/services.c: (bus_service_add_owner):
1988 Send ServiceAcquired message if we're the only primary owner.
1990 (bus_service_remove_owner):
1991 Send ServiceAcquired/ServiceLost messages.
1993 (bus_service_set_prohibit_replacement),
1994 (bus_service_get_prohibit_replacement):
1995 Functions for setting prohibit replacement.
1997 (bus_service_has_owner):
1998 New function that checks if a connection is in the owner queue of
2002 Add new function signatures.
2004 * dbus/dbus-list.c: (_dbus_list_test):
2005 Add tests for _dbus_list_remove_last and traversing the list backwards.
2008 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
2009 go any further, so return NULL then.
2011 * dbus/dbus-protocol.h:
2012 Add new messages, service flags and service replies.
2014 2003-01-26 Havoc Pennington <hp@pobox.com>
2016 * dbus/dbus-message-builder.c: implement, completely untested.
2018 * test/data/*: add data to be used in testing.
2019 ".message" files are our simple loadable text format.
2020 ".message-raw" will be binary dumps of messages.
2022 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
2024 2003-01-26 Havoc Pennington <hp@pobox.com>
2026 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
2028 * dbus/dbus-errors.c (dbus_result_to_string): add
2031 * dbus/dbus-message-builder.c: new file, will contain code to load
2032 up messages from files. Not implemented yet.
2034 2003-01-26 Havoc Pennington <hp@pobox.com>
2036 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
2037 the sender by setting to NULL
2039 2003-01-26 Havoc Pennington <hp@pobox.com>
2041 The unit tests pass, but otherwise untested. If it breaks, the
2042 tests should have been better. ;-)
2044 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
2047 * dbus/dbus-message.c: redo everything so we maintain
2048 message->header as the only copy of the various fields.
2049 This avoids the possibility of out-of-memory in some cases,
2050 for example dbus_message_lock() can't run out of memory anymore,
2051 and avoids extra copying. Figured I may as well go ahead and do
2052 this since it was busted for dbus_message_lock to not return
2053 failure on OOM, and dbus_message_write_header was totally
2054 unchecked for OOM. Also fixed some random other bugs.
2056 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
2057 that strings are nul-terminated. Also, end_pos can be equal
2058 to string length just not greater than, I think.
2059 (_dbus_marshal_set_int32): new function
2060 (_dbus_marshal_set_uint32): new function
2061 (_dbus_marshal_set_string): new function
2063 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
2064 a warning, init timeout_list to NULL
2065 (dbus_connection_send_message): don't use uninitialized variable
2068 * dbus/dbus-string.c (_dbus_string_replace_len): new function
2070 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2072 * bus/driver.c: (bus_driver_handle_hello),
2073 (bus_driver_send_welcome_message):
2076 2003-01-26 Anders Carlsson <andersca@codefactory.se>
2078 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
2079 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2080 (dbus_connection_unref):
2081 * dbus/dbus-marshal.c: (_dbus_marshal_test):
2082 * dbus/dbus-message.c: (dbus_message_unref),
2085 (dbus_message_get_fields):
2086 Remove debugging printout.
2088 (_dbus_message_loader_return_buffer):
2089 Don't store the header string.
2091 (_dbus_message_test):
2094 2003-01-26 Richard Hult <rhult@codefactory.se>
2096 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
2097 the file descriptor list, since it can change under us.
2099 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2101 * glib/dbus-gmain.c: (dbus_connection_prepare),
2102 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
2103 (remove_watch), (dbus_connection_hookup_with_g_main):
2104 Rewrite the glib handling to use its own GSource instead of a
2105 GIOChannel so we can catch messages put in the queue while waiting
2108 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2111 * bus/connection.c: (connection_disconnect_handler),
2112 (connection_watch_callback), (bus_connection_setup):
2113 * bus/dispatch.c: (send_one_message),
2114 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
2115 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
2117 * bus/driver.c: (bus_driver_send_service_deleted),
2118 (bus_driver_send_service_created), (bus_driver_handle_hello),
2119 (bus_driver_send_welcome_message),
2120 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2121 (bus_driver_handle_message):
2123 Refactor code, put the message dispatching in its own file. Use
2124 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2127 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2129 * dbus/dbus-internals.h:
2130 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2132 * dbus/dbus-message.c: (dbus_message_get_sender):
2133 * dbus/dbus-message.h:
2134 Implement dbus_message_get_sender.
2136 * dbus/dbus-protocol.h:
2137 Add message and service defines.
2139 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2141 * dbus/dbus-connection.c: (dbus_connection_send_message):
2142 * dbus/dbus-message-internal.h:
2143 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2144 (dbus_message_write_header):
2145 Remove _dbus_messag_unlock and don't set the client serial on a
2146 message if one already exists.
2148 2003-01-24 Havoc Pennington <hp@pobox.com>
2150 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2153 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2156 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2158 * dbus/dbus-list.c: (alloc_link), (free_link):
2159 Use a memory pool for the links.
2161 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2163 * bus/connection.c: (bus_connection_foreach):
2165 Add new bus_connection_foreach function.
2167 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2168 Add function that broadcasts a message to all clients.
2170 (bus_driver_send_service_created), (bus_driver_handle_hello),
2171 (bus_driver_send_welcome_message),
2172 (bus_driver_handle_list_services), (bus_driver_message_handler):
2173 Implement functions that take care of listing services, and notifying
2174 clients when new services are created.
2176 * bus/services.c: (bus_services_list):
2178 Add new function that returns an array of strings with the currently
2179 registered services.
2182 * glib/dbus-gmain.c:
2183 Update copyright year.
2185 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2187 * dbus/dbus-connection.c: (dbus_connection_send_message):
2188 Unlock the message in case it was sent earlier.
2190 (dbus_connection_send_message_with_reply_and_block):
2191 Remove the reply message from the list.
2193 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2194 Set array_len and new_pos correctly.
2196 (_dbus_marshal_test):
2197 Remove debug output.
2199 * dbus/dbus-message-internal.h:
2200 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2201 New function that returns the reply serial.
2203 (_dbus_message_unlock):
2204 New function that unlocks a message and resets its header.
2206 (dbus_message_append_string_array),
2207 (dbus_message_get_fields_valist),
2208 (dbus_message_iter_get_field_type),
2209 (dbus_message_iter_get_string_array),
2210 (dbus_message_get_fields),
2211 (dbus_message_append_fields_valist):
2212 Handle string arrays.
2214 (dbus_message_set_sender):
2215 Make this function public since the bus daemon needs it.
2217 (decode_header_data):
2218 Set the reply serial to -1 initially.
2220 * dbus/dbus-message.h:
2221 Add dbus_message_set_sender.
2223 2003-01-24 Havoc Pennington <hp@pobox.com>
2225 * doc/dbus-specification.sgml: add some stuff
2227 2003-01-22 Havoc Pennington <hp@pobox.com>
2229 * doc/dbus-specification.sgml: Start to document the protocol.
2231 2003-01-22 Havoc Pennington <hp@pobox.com>
2233 * dbus/dbus-connection.c
2234 (dbus_connection_send_message_with_reply_and_block): add some @todo
2236 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2238 2003-01-21 Havoc Pennington <hp@pobox.com>
2240 (patch untested because can't compile)
2242 * bus/driver.c (create_unique_client_name): make this function
2243 never recycle client names. Also, caller should initialize
2246 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2248 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2250 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2251 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2252 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2253 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2254 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2255 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2256 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2257 * dbus/dbus-marshal.h:
2258 * dbus/dbus-protocol.h:
2259 Add support for marshalling and demarshalling integer, double
2262 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2267 * bus/connection.c: (connection_disconnect_handler):
2268 Remove the connection from the bus driver's list.
2270 (connection_watch_callback): Dispatch messages.
2272 (free_connection_data): Free connection name.
2274 (bus_connection_setup): Add connection to the bus driver's list.
2275 (bus_connection_remove_owned_service):
2276 (bus_connection_set_name), (bus_connection_get_name):
2277 Add functions for setting and getting the connection's name.
2280 Add function headers.
2282 * bus/driver.c: (create_unique_client_name),
2283 (bus_driver_handle_hello_message),
2284 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2285 (bus_driver_add_connection), (bus_driver_remove_connection):
2288 * bus/services.c: (bus_service_free):
2290 New file that handles communication and registreation with the bus
2293 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2295 * dbus/dbus-connection.c: (dbus_connection_send_message):
2296 Add a new client_serial parameter.
2298 (dbus_connection_send_message_with_reply):
2299 Remove a @todo since we've implemented the blocking function.
2301 (dbus_connection_send_message_with_reply_and_block):
2302 New function that sends a message and waits for a reply and
2303 then returns the reply.
2305 * dbus/dbus-connection.h:
2308 * dbus/dbus-errors.c: (dbus_result_to_string):
2309 * dbus/dbus-errors.h:
2310 Add new DBUS_RESULT.
2312 * dbus/dbus-message-internal.h:
2313 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2314 (_dbus_message_set_sender), (dbus_message_write_header),
2315 (dbus_message_new_reply), (decode_header_data),
2316 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2317 * dbus/dbus-message.h:
2318 Add new functions that set the reply serial and sender.
2319 Also marshal and demarshal them correctly and add test.
2321 * dbus/dbus-protocol.h:
2322 Add new DBUS_MESSAGE_TYPE_SENDER.
2325 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2326 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2327 (dbus_connection_hookup_with_g_main):
2328 * glib/test-dbus-glib.c: (main):
2329 Rewrite to use GIOChannel and remove the GSource crack.
2331 * test/echo-client.c: (main):
2332 * test/watch.c: (check_messages):
2333 Update for changed APIs
2335 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2337 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2339 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2340 Create a DBusTimeoutList.
2341 (dbus_connection_set_timeout_functions): Add new function to
2342 set timeout callbacks
2344 * dbus/dbus-connection.h: Add public DBusTimeout API.
2346 * dbus/dbus-message.c: (dbus_message_get_service):
2347 * dbus/dbus-message.h: New function.
2349 * dbus/dbus-server.c: Fix small doc typo.
2351 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2353 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2355 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2356 of the string, just as long as specified.
2358 2003-01-19 Havoc Pennington <hp@pobox.com>
2360 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2363 * dbus/dbus-server.c (dbus_server_set_max_connections)
2364 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2365 keep track of current number of connections, and add API for
2366 setting a max (but haven't implemented enforcing the max yet)
2368 2003-01-18 Havoc Pennington <hp@pobox.com>
2370 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2371 reading/writing if read_watch != NULL or write_watch != NULL.
2373 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2374 the message loader code to actually load message->header and
2375 message->body into the newly-created message.
2377 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2380 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2381 (dbus_connection_get_max_message_size)
2382 (dbus_connection_set_max_live_messages_size)
2383 (dbus_connection_get_max_live_messages_size): implement some
2384 resource limitation functions
2386 * dbus/dbus-resources.c: new file implementing some of the
2387 resource limits stuff
2389 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2390 missing docs, add @todo to handle OOM etc.
2392 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2395 2003-01-18 Havoc Pennington <hp@pobox.com>
2397 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2398 connection if it hasn't been already.
2400 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2401 replace with DisconnectFunction.
2403 2003-01-18 Havoc Pennington <hp@pobox.com>
2405 Building --disable-verbose-mode --disable-asserts --disable-tests
2406 cuts the library from 112K to 45K or so
2408 * configure.in: check for varargs macro support,
2409 add --enable-verbose-mode, --enable-asserts.
2411 * dbus/dbus-internals.h (_dbus_assert): support
2413 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2415 2003-01-18 Havoc Pennington <hp@pobox.com>
2417 * dbus/dbus-test.c: include config.h so that tests actually run
2419 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2420 so the failure mode when that assumption fails will be plenty
2423 2003-01-18 Havoc Pennington <hp@pobox.com>
2425 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2427 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2430 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2431 since we don't want to use those in make check
2433 2003-01-15 Havoc Pennington <hp@redhat.com>
2439 2003-01-15 Havoc Pennington <hp@redhat.com>
2441 * test/Makefile.am: fix so that test source code ends up in the
2442 distribution on make distcheck
2444 2003-01-15 Havoc Pennington <hp@redhat.com>
2450 2003-01-15 Havoc Pennington <hp@redhat.com>
2452 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2453 fix build when --disable-tests
2455 * Makefile.am (EXTRA_DIST): put HACKING in here
2457 * HACKING: document procedure for making a tarball release.
2459 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2461 * bus/connection.c: (connection_error_handler),
2462 (bus_connection_setup):
2463 * bus/main.c: (main):
2464 Make sure that the DBusConnectionData struct is NULLed
2465 out to prevent a segfault.
2467 * dbus/dbus-errors.c: (dbus_result_to_string):
2468 * dbus/dbus-errors.h:
2469 * dbus/dbus-message.c: (dbus_message_get_fields),
2470 (dbus_message_get_fields_valist), (_dbus_message_test):
2471 * dbus/dbus-message.h:
2472 Make dbus_message_get_fields return a result code so we can
2473 track invalid fields as well as oom.
2475 2003-01-11 Havoc Pennington <hp@pobox.com>
2477 * configure.in: change --enable-test/--enable-ansi action-if-given
2478 to enable_foo=$enableval instead of enable_foo=yes
2480 2003-01-08 Havoc Pennington <hp@pobox.com>
2482 * dbus/dbus-string.c (_dbus_string_align_length): new function
2484 * dbus/dbus-test-main.c: move main() for test app here
2486 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2487 symbol to run tests, because dbus-test isn't in the main
2490 Code review nitpicks.
2492 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2493 for people with narrow emacs ;-). Assert client_serial was filled
2494 in. Assert message->name != NULL.
2495 (dbus_message_append_fields): have "first_field_type" arg separate
2496 from va list, needed for C++ binding that also uses varargs IIRC
2497 and helps with type safety
2498 (dbus_message_new): add @todo about using DBusString to store
2499 service/name internally
2500 (dbus_message_new): don't leak ->service and ->name on OOM later
2502 (dbus_message_unref): free the service name
2503 (dbus_message_get_fields): same change to varargs
2504 i.e. first_field_type
2505 (_dbus_message_loader_return_buffer): assert that the message data
2506 is aligned (if not it's a bug in our code). Put in verbose griping
2507 about why we set corrupted = TRUE.
2508 (decode_header_data): add FIXME that char* is evil. Was going to
2509 add FIXME about evil locale-specific string.h strncmp, but just
2510 switched to wacky string-as-uint32 optimization. Move check for
2511 "no room for field name" above get_const_data_len() to avoid
2512 assertion failure in get_const_data_len if we have trailing 2
2513 bytes or the like. Check for service and name fields being
2514 provided twice. Don't leak service/name on error. Require field
2515 names to be aligned to 4 bytes.
2517 * dbus/dbus-marshal.c: move byte swap stuff to header
2518 (_dbus_pack_int32): uscore-prefix
2519 (_dbus_unpack_int32): uscore-prefix
2520 (_dbus_unpack_uint32): export
2521 (_dbus_demarshal_string): add @todo complaining about use of
2523 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2524 handling allowing corrupt data to go unchecked
2526 2003-01-08 Havoc Pennington <hp@redhat.com>
2528 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2529 to the select() as needed for authentication. (should be using
2530 _dbus_poll() not select, but for another day)
2532 * dbus/dbus.h: include dbus/dbus-protocol.h
2534 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2536 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2539 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2541 * dbus/dbus-internals.c: (_dbus_type_to_string):
2542 New function that returns a string describing a type.
2544 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2545 * dbus/dbus-marshal.h:
2546 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2547 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2548 (dbus_message_iter_get_byte_array):
2549 * dbus/dbus-message.h:
2550 Add new convenience functions for appending and getting message fields.
2551 Also add demarshalling routines for byte arrays.
2553 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2555 * dbus/dbus-connection-internal.h:
2556 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2557 (_dbus_connection_get_next_client_serial),
2558 (dbus_connection_send_message):
2559 * dbus/dbus-internals.h:
2560 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2561 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2562 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2563 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2564 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2565 (_dbus_verbose_bytes), (_dbus_marshal_test):
2566 * dbus/dbus-marshal.h:
2567 * dbus/dbus-message-internal.h:
2568 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2569 (dbus_message_write_header), (_dbus_message_lock),
2570 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2571 (dbus_message_get_name), (dbus_message_append_int32),
2572 (dbus_message_append_uint32), (dbus_message_append_double),
2573 (dbus_message_append_string), (dbus_message_append_byte_array),
2574 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2575 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2576 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2577 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2578 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2579 (decode_header_data), (_dbus_message_loader_return_buffer),
2580 (message_iter_test), (_dbus_message_test):
2581 * dbus/dbus-message.h:
2582 * dbus/dbus-protocol.h:
2583 * dbus/dbus-test.c: (main):
2585 * glib/test-dbus-glib.c: (message_handler), (main):
2586 * test/echo-client.c: (main):
2587 * test/watch.c: (check_messages):
2588 Make messages sendable and receivable for real.
2590 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2592 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2593 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2594 * dbus/dbus-message.c: (dbus_message_append_int32),
2595 (dbus_message_append_uint32), (dbus_message_append_double),
2596 (dbus_message_append_string), (dbus_message_append_byte_array):
2597 Handle OOM restoration.
2599 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2601 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2602 (_dbus_demarshal_string), (_dbus_marshal_test):
2603 * dbus/dbus-marshal.h:
2604 * dbus/dbus-message.c: (dbus_message_get_name),
2605 Document these functions.
2607 (dbus_message_append_int32), (dbus_message_append_uint32),
2608 (dbus_message_append_double), (dbus_message_append_string),
2609 (dbus_message_append_byte_array):
2610 * dbus/dbus-message.h:
2611 Add functions for adding message fields of different types.
2613 * dbus/dbus-protocol.h:
2614 Add the different types.
2616 2003-01-05 Havoc Pennington <hp@pobox.com>
2618 * bus/connection.c: implement routines for handling connections,
2619 first thing is keeping a list of owned services on each connection
2620 and setting up watches etc.
2622 * bus/services.c: implement a mapping from service names to lists
2625 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2627 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2628 to use static mutexes for global data
2630 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2631 collection of functions to set/get application-specific data
2632 on the DBusConnection.
2634 2003-01-04 Havoc Pennington <hp@pobox.com>
2636 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2637 (_dbus_poll): new function
2639 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2642 * bus/loop.c: initial code for the daemon main loop
2644 2003-01-04 Havoc Pennington <hp@pobox.com>
2646 * test/watch.c (error_handler): make it safe if the error handler
2647 is called multiple times (if we s/error handler/disconnect
2648 handler/ we should just guarantee it's called only once)
2650 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2651 error handler on disconnect (it's quite possible we should
2652 just change the error handler to a "disconnect handler," I'm
2653 not sure we have any other meaningful errors)
2655 * configure.in: check for getpwnam_r
2657 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2658 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2659 mechanism as in SASL spec, using socket credentials
2661 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2662 (_dbus_send_credentials_unix_socket): new function
2664 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2666 (_dbus_write): only check errno if <0 returned
2667 (_dbus_write_two): ditto
2669 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2671 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2672 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2673 (_dbus_marshal_test):
2674 * dbus/dbus-marshal.h:
2675 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2676 to _dbus_marshal_utf8_string. Also fix some tests.
2678 2002-12-28 Harri Porten <porten@kde.org>
2680 * configure.in: added check for C++ compiler and a very cheesy
2681 check for the Qt integration
2683 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2685 * qt/Makefile.am: added
2687 * qt/.cvsignore: added
2689 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2690 latter, added #ifdef QT_THREAD_SUPPORT guard.
2692 * dbus/Makefile.am: added missing headers for make dist
2694 2002-12-28 Kristian Rietveld <kris@gtk.org>
2696 * dbus/Makefile.am: fixup export-symbols-regex.
2698 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2700 * acinclude.m4: Add this file and put the
2701 PKG_CHECK_MODULE macro in it.
2703 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2705 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2706 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2707 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2708 (_dbus_marshal_test):
2709 Make the demarshalling routines align the pos argument.
2710 Add string marshalling tests and fix the obvious bugs
2713 2002-12-26 Havoc Pennington <hp@pobox.com>
2715 * dbus/dbus-auth.c: fixes fixes fixes
2717 * dbus/dbus-transport-unix.c: wire up support for
2718 encoding/decoding data on the wire
2720 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2721 (_dbus_auth_decode_data): append to target string
2722 instead of nuking it.
2724 2002-12-26 Havoc Pennington <hp@pobox.com>
2726 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2727 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2730 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2731 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2732 now). Main point is because I wanted unpack_uint32 to implement
2734 (_dbus_verbose_bytes): new function
2736 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2738 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2739 mechanism to handle a corrupt message stream
2740 (_dbus_message_loader_new): fix preallocation to only prealloc,
2743 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2744 (_dbus_string_test): enhance tests for copy/move and fix the
2747 * dbus/dbus-transport-unix.c: Hold references in more places to
2748 avoid reentrancy problems
2750 * dbus/dbus-transport.c: ditto
2752 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2753 leak reference count in no-message case
2755 * test/watch.c (do_mainloop): handle adding/removing watches
2756 during iteration over the watches. Also, ref the connection/server
2757 stored on a watch, so we don't try to mangle a destroyed one.
2759 * dbus/dbus-transport-unix.c (do_authentication): perform
2762 * dbus/dbus-auth.c (get_state): add a state
2763 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2764 (_dbus_auth_get_unused_bytes): append the unused bytes
2765 to the passed in string, rather than prepend
2767 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2768 the auth conversation DBusAuth
2770 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2771 (_dbus_transport_new_for_domain_socket): when creating a
2772 transport, pass in whether it's a client-side or server-side
2773 transport so we know which DBusAuth to create
2775 2002-12-03 Havoc Pennington <hp@pobox.com>
2777 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2778 _after_ finalizing the derived members
2779 (unix_connection_set): unref watch if we fail to add it
2781 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2782 transport first, so that the connection owned by the
2783 transport will be valid as the transport finalizes.
2785 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2786 if necessary, and remove watches from the connection.
2788 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2790 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2792 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2793 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2794 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2795 (_dbus_marshal_test):
2796 * dbus/dbus-marshal.h:
2797 Add string marshal functions and have the demarshal functions
2798 return the new position.
2800 2002-12-25 Havoc Pennington <hp@pobox.com>
2802 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2803 it is a simple protocol that just maps directly to SASL.
2805 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2806 initial implementation, not actually used yet.
2808 * dbus/dbus-string.c (_dbus_string_find): new function
2809 (_dbus_string_equal): new function
2810 (_dbus_string_base64_encode): new function
2811 (_dbus_string_base64_decode): new function
2813 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2816 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2817 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2818 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2819 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2820 * dbus/dbus-marshal.h:
2821 * dbus/dbus-protocol.h:
2822 * dbus/dbus-test.c: (main):
2824 Add un-optimized marshalling/demarshalling routines.
2826 2002-12-25 Harri Porten <porten@kde.org>
2828 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2830 2002-12-24 Zack Rusin <zack@kde.org>
2832 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2833 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2836 2002-12-24 Havoc Pennington <hp@pobox.com>
2838 * glib/dbus-gthread.c: fix include
2840 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2841 I think glib API needs to change, though, as you don't
2842 want to use DBusMessageFunction, you want to use the
2843 DBusMessageHandler object. Probably
2844 dbus_connection_open_with_g_main_loop()
2845 and dbus_connection_setup_g_main_loop() or something like that
2846 (but think of better names...) that just create a connection
2847 that has watch/timeout functions etc. already set up.
2849 * dbus/dbus-connection.c
2850 (dbus_connection_send_message_with_reply): new function just to
2851 show how the message handler helps us deal with replies.
2853 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2855 * dbus/dbus-string.c (_dbus_string_test): free a string that
2858 * dbus/dbus-hash.c: use memory pools for the hash entries
2859 (rebuild_table): be more paranoid about overflow, and
2860 shrink table when we can
2861 (_dbus_hash_test): reduce number of sprintfs and write
2862 valid C89. Add tests for case where we grow and then
2863 shrink the hash table.
2865 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2867 * dbus/dbus-connection.c (dbus_connection_register_handler)
2868 (dbus_connection_unregister_handler): new functions
2870 * dbus/dbus-message.c (dbus_message_get_name): new
2872 * dbus/dbus-list.c: fix docs typo
2874 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2875 an object representing a handler for messages.
2877 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2880 * glib/dbus-gthread.c: (dbus_gthread_init):
2881 Don't use the gdbus prefix for public functions.
2883 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2887 Add GLib checks and fixup .pc files
2891 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2892 (gdbus_connection_check), (gdbus_connection_dispatch),
2893 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2894 (dbus_connection_gsource_new):
2895 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2896 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2897 * glib/test-dbus-glib.c: (message_handler), (main):
2900 2002-12-15 Harri Porten <porten@kde.org>
2902 * autogen.sh: check for libtoolize before attempting to use it
2904 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2907 * .cvsignore: ignore more stamp files
2909 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2911 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2912 without make install.
2914 2002-12-15 Havoc Pennington <hp@pobox.com>
2916 * dbus/dbus-threads.c: add thread stubs that a higher library
2917 layer can fill in. e.g. the GLib wrapper might fill them in with
2918 GThread stuff. We still need to use this thread API to
2919 thread-safe-ize the library.
2921 2002-12-12 Havoc Pennington <hp@pobox.com>
2923 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2924 below new interfaces and include fewer system headers.
2926 * dbus/dbus-sysdeps.c (_dbus_read): new function
2927 (_dbus_write): new function
2928 (_dbus_write_two): new function
2929 (_dbus_connect_unix_socket): new function
2930 (_dbus_listen_unix_socket): new function
2932 * dbus/dbus-message-internal.h: change interfaces to use
2935 2002-12-11 Havoc Pennington <hp@pobox.com>
2937 * dbus/dbus-types.h: add dbus_unichar
2939 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2941 * dbus/dbus-connection.c (dbus_connection_send_message): return
2944 * dbus/dbus-transport.c: include dbus-watch.h
2946 * dbus/dbus-connection.c: include dbus-message-internal.h
2948 * HACKING: add file with coding guidelines stuff.
2950 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2951 handling here, for security purposes (as in vsftpd). Not actually
2952 using this class yet.
2954 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2955 system/libc usage here, as in vsftpd, for ease of auditing (and
2956 should also simplify portability). Haven't actually moved all the
2957 system/libc usage into here yet.
2959 2002-11-25 Havoc Pennington <hp@pobox.com>
2961 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2962 always print the first verbose message.
2964 2002-11-24 Havoc Pennington <hp@pobox.com>
2966 * test/echo-client.c, test/echo-server.c: cheesy test
2969 * configure.in (AC_CHECK_FUNCS): check for writev
2971 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2974 * dbus/dbus-list.c (_dbus_list_foreach): new function
2976 * dbus/dbus-internals.c (_dbus_verbose): new function
2978 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2979 representing a server that listens for connections.
2981 * dbus/.cvsignore: create
2983 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2984 public API for reporting errors
2986 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2987 public object representing a connection that
2988 sends/receives messages. (Same object used for
2989 both client and server.)
2991 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2992 Basic abstraction for different kinds of stream
2993 that we might read/write messages from.
2995 2002-11-23 Havoc Pennington <hp@pobox.com>
2997 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
3000 * dbus/dbus-test.c (main): add list test, and include
3001 dbus-test.h as intended
3003 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
3004 (_dbus_hash_table_remove_int): return value indicates
3005 whether the entry existed to remove
3007 * dbus/dbus-list.c: add linked list utility class,
3010 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
3013 2002-11-23 Havoc Pennington <hp@pobox.com>
3015 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
3016 DBUS_END_DECLS to nothing, that should fix this once and for all
3018 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
3020 * dbus/dbus-message.c, dbus/dbus-hash.c:
3021 add some missing @brief
3023 2002-11-23 Havoc Pennington <hp@pobox.com>
3025 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
3026 to avoid confusing Doxygen
3028 * dbus/dbus-hash.c: @} not }@
3030 * dbus/dbus-message.c (struct DBusMessage): split out
3033 2002-11-23 Havoc Pennington <hp@pobox.com>
3035 * configure.in: pile on more warning flags if using gcc
3037 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
3038 to document static functions
3040 * configure.in: add summary to end of configure so it
3041 looks nice and attractive
3043 * dbus/dbus-hash.c: finish implementation and write unit
3046 * configure.in: add --enable-tests to enable unit tests
3048 * dbus/dbus-test.c: test program to run unit tests
3049 for all files in dbus/*, initially runs a test for
3052 * dbus/dbus-internals.h: file to hold some internal utility stuff
3054 2002-11-22 Havoc Pennington <hp@redhat.com>
3056 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
3057 "ported" away from Tcl
3059 * dbus/dbus-types.h: header for types such as dbus_bool_t
3061 2002-11-22 Havoc Pennington <hp@redhat.com>
3063 * dbus/dbus.h: fixups for doc warnings
3065 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
3067 (QUIET): make it quiet so we can see warnings
3069 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
3071 2002-11-22 Havoc Pennington <hp@redhat.com>
3073 * Makefile.am: include "Doxyfile" target in all-local
3075 * configure.in: generate the Doxyfile
3077 * Doxyfile.in: move Doxyfile here, so we can use
3078 configure to generate a Doxyfile with the right
3081 2002-11-22 Havoc Pennington <hp@redhat.com>
3083 * dbus/dbus-message.c: move inline docs into .c file
3085 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
3086 so all docs are under doc/
3087 (MAN_EXTENSION): generate man pages. Use extension
3088 ".3dbus" which matches ".3qt" on my system,
3089 I guess this is OK, I don't know really.
3090 (FILE_PATTERNS): look for .c files not .h, makes sense
3093 2002-11-22 Havoc Pennington <hp@pobox.com>
3095 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
3096 because any app can be a server, and any app can be a client,
3097 the bus is a special kind of server.
3099 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
3101 * Doxyfile : adding. Still needs Makefile rules to be generated
3102 automatically (just run "doxygen" in the toplevel dir for now to
3105 * dbus/dbus-message.h : Adding sample docs (javadoc since
3106 resembles gtk-doc a little more)
3108 * dbus/dbus.h : Adding sample docs
3110 2002-11-21 Havoc Pennington <hp@redhat.com>
3112 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
3113 so we can allow ourselves to include files directly,
3114 instead of having to use dbus.h
3116 * dbus/dbus.h: fill in
3118 * dbus/dbus-message.h: sketch out a sample header file.
3119 Include griping if you include it directly instead of
3122 * dbus/dbus-macros.h: new file with macros for extern "C",
3123 TRUE/FALSE, NULL, etc.
3125 * doc/file-boilerplate.c: put include guards in here
3127 2002-11-21 Havoc Pennington <hp@redhat.com>
3129 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3131 * COPYING: include the GPL as well, and license code
3132 under both AFL and GPL.
3134 2002-11-21 Havoc Pennington <hp@redhat.com>
3136 * acconfig.h: get rid of this
3138 * autogen.sh (run_configure): add --no-configure option
3140 * configure.in: remove AC_ARG_PROGRAM to make
3141 autoconf complain less. add AC_PREREQ.
3142 add AC_DEFINE third arg.
3144 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3147 Fix references so we can distcheck.
3149 2002-11-21 Havoc Pennington <hp@redhat.com>
3151 * Initial module creation