1 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3 * doc/dbus-specification.sgml:
4 Document reply message for ActivateService.
6 2003-03-16 Anders Carlsson <andersca@codefactory.se>
8 * bus/activation.c: (bus_pending_activation_entry_free),
9 (bus_pending_activation_free), (bus_activation_new),
10 (bus_activation_unref), (bus_activation_service_created),
11 (bus_activation_activate_service):
13 * bus/bus.c: (bus_context_new):
14 * bus/desktop-file.c: (new_section):
15 * bus/driver.c: (bus_driver_send_service_deleted),
16 (bus_driver_handle_activate_service):
17 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
19 * dbus/dbus-connection.c:
20 (dbus_connection_send_with_reply_and_block):
21 * dbus/dbus-message.c: (dbus_message_append_args_valist):
22 * dbus/dbus-protocol.h:
23 Make activation work better. Now pending activations will be queued
24 and the daemon won't try to activate services that are already registered.
26 2003-03-16 Havoc Pennington <hp@pobox.com>
28 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
31 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
32 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
34 2003-03-16 Havoc Pennington <hp@pobox.com>
36 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
37 this. always run the test suite before commit...
39 * bus/*: adapt to DBusConnection API changes
41 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
42 requires renaming stuff to avoid dbus_connection_dispatch name
45 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
48 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
49 separate from _dbus_message_loader_return_buffer()
51 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
52 this, because it's now always broken to use; the number of
53 messages in queue vs. the number still buffered by the message
54 loader is undefined/meaningless. Should use
55 dbus_connection_get_dispatch_state().
56 (dbus_connection_dispatch): rename from
57 dbus_connection_dispatch_message
59 2003-03-16 Havoc Pennington <hp@pobox.com>
61 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
64 2003-03-16 Anders Carlsson <andersca@codefactory.se>
66 * dbus/dbus-connection.c:
67 (dbus_connection_send_with_reply_and_block):
68 Decrease connection->n_incoming when removing an entry
70 * dbus/dbus-dict.c: (dbus_dict_entry_free),
71 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
72 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
73 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
74 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
75 (dbus_dict_get_byte_array):
76 Handle NULL arrays and strings. Also add support for byte arrays.
78 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
79 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
80 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
81 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
82 (_dbus_demarshal_dict), (demarshal_and_validate_len),
83 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
84 * dbus/dbus-marshal.h:
85 Add support for marshalling and demarshalling empty arrays and strings.
87 * dbus/dbus-message.c: (dbus_message_append_args_valist),
88 (dbus_message_append_string_array),
89 (dbus_message_iter_get_boolean),
90 (dbus_message_iter_get_boolean_array),
91 (dbus_message_iter_get_int32_array),
92 (dbus_message_iter_get_uint32_array),
93 (dbus_message_iter_get_double_array),
94 (dbus_message_iter_get_byte_array),
95 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
96 (check_message_handling):
97 Add support for getting empty arrays and dicts.
99 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
100 Don't do any validation at all for now, that's better than just checking
103 * test/data/valid-messages/emptiness.message:
104 New test message with lots of empty arrays.
106 2003-03-16 Havoc Pennington <hp@pobox.com>
108 * dbus/dbus-connection.c
109 (_dbus_connection_queue_received_message_link): new function that
110 can't fail due to OOM
112 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
113 new function pops a message together with a list link
116 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
117 message queuing functions to avoid needing to alloc memory
119 2003-03-16 Havoc Pennington <hp@pobox.com>
121 Oops - test code was only testing failure of around 30 of the
122 mallocs in the test path, but it turns out there are 500+
123 mallocs. I believe this was due to misguided linking setup such
124 that there was one copy of dbus_malloc etc. in the daemon and one
125 in the shared lib, and only daemon mallocs were tested. In any
126 case, the test case now tests all 500+ mallocs, and doesn't pass
127 yet, though there are lots of fixes in this patch.
129 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
130 this so that it doesn't need to allocate memory, since it
131 has no way of indicating failure due to OOM (and would be
134 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
136 * bus/Makefile.am: rearrange to create two self-contained
137 libraries, to avoid having libraries with overlapping symbols.
138 that was resulting in weirdness, e.g. I'm pretty sure there
139 were two copies of global static variables.
141 * dbus/dbus-internals.c: move the malloc debug stuff to
144 * dbus/dbus-list.c (free_link): free list mempool if it becomes
147 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
149 * dbus/dbus-address.c (dbus_parse_address): free list nodes
152 * bus/dispatch.c (bus_dispatch_add_connection): free
153 message_handler_slot when no longer using it, so
154 memory leak checkers are happy for the test suite.
156 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
158 * bus/bus.c (new_connection_callback): disconnect in here if
159 bus_connections_setup_connection fails.
161 * bus/connection.c (bus_connections_unref): fix to free the
163 (bus_connections_setup_connection): if this fails, don't
164 disconnect the connection, just be sure there are no side
167 * dbus/dbus-string.c (undo_alignment): unbreak this
169 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
171 (_dbus_auth_new): fix the order in which we free strings
174 * bus/connection.c (bus_connection_disconnected): fix to
175 not send ServiceDeleted multiple times in case of memory
178 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
179 get the base service name
180 (dbus_bus_register_client): don't return base service name,
181 instead store it on the DBusConnection and have an accessor
183 (dbus_bus_register_client): rename dbus_bus_register()
185 * bus/dispatch.c (check_hello_message): verify that other
186 connections on the bus also got the correct results, not
187 just the one sending hello
189 2003-03-15 Havoc Pennington <hp@pobox.com>
191 Make it pass the Hello handling test including all OOM codepaths.
192 Now to do other messages...
194 * bus/services.c (bus_service_remove_owner): fix crash when
195 removing owner from an empty list of owners
196 (bus_registry_ensure): don't leave service in the list of
197 a connection's owned services if we fail to put the service
200 * bus/connection.c (bus_connection_preallocate_oom_error): set
201 error flag on the OOM error.
203 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
204 handle _dbus_transport_set_connection failure
206 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
207 to create watches up front and simply enable/disable them as
209 (unix_connection_set): this can now fail on OOM
211 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
212 of enabling/disabling a watch or timeout.
214 * bus/loop.c (bus_loop_iterate): don't touch disabled
217 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
219 2003-03-15 Havoc Pennington <hp@pobox.com>
221 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
222 write useful test code, after all that futzing around ;-)
224 Test does not yet pass because we can't handle OOM in
225 _dbus_transport_messages_pending (basically,
226 dbus_connection_preallocate_send() does not prealloc the write
227 watch). To fix this, I think we need to add new stuff to
228 set_watch_functions, namely a SetEnabled function so we can alloc
229 the watch earlier, then enable it later.
231 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
232 dbus-memory.c to the convenience lib
234 * bus/test.c: rename some static functions to keep them clearly
235 distinct from stuff in connection.c. Handle client disconnection.
237 2003-03-14 Havoc Pennington <hp@pobox.com>
239 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
240 transport, tests more of the real codepath. Set up clients
241 with bus_setup_debug_client.
243 * bus/test.c (bus_setup_debug_client): function to set up debug
244 "clients" on the main loop
246 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
249 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
252 * dbus/dbus-server-debug.c: support a debug server based on pipes
254 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
255 (_dbus_close): new function
257 * configure.in: check for socketpair
259 2003-03-14 Havoc Pennington <hp@redhat.com>
261 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
264 * dbus/dbus-transport-debug.c: rework this a good bit to be
265 less complicated. hopefully still works.
267 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
270 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
273 * dbus/dbus-message.c (dbus_message_copy): rename from
274 dbus_message_new_from_message, fix it up to copy
275 all the message fields, add test case
277 * bus/dispatch.c (bus_dispatch_test): add some more test code,
278 not quite passing yet
280 2003-03-14 Havoc Pennington <hp@pobox.com>
282 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
283 until no work remains" in test code. (the large diff here
284 is just code movement, no actual changes)
286 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
287 1, no point waiting around for test code.
288 (_dbus_server_debug_accept_transport): unref the timeout
289 after adding it (right?)
291 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
293 2003-03-13 Havoc Pennington <hp@redhat.com>
295 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
298 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
301 * dbus/dbus-connection.h: Make AddWatchFunction and
302 AddTimeoutFunction return a bool so they can fail on out-of-memory
304 * bus/bus.c (bus_context_new): set up timeout handlers
306 * bus/connection.c (bus_connections_setup_connection): set up
309 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
312 * bus/bus.c (bus_context_new): adapt to changes
314 * bus/connection.c: adapt to changes
316 * test/watch.c: adapt to DBusWatch changes
318 * bus/dispatch.c (bus_dispatch_test): started adding this but
321 2003-03-14 Anders Carlsson <andersca@codefactory.se>
323 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
325 2003-03-13 Havoc Pennington <hp@pobox.com>
327 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
328 set up a test framework as for the library
330 2003-03-12 Havoc Pennington <hp@pobox.com>
332 Throughout: purge global variables, introduce BusActivation,
333 BusConnections, BusRegistry, etc. objects instead.
335 * bus/bus.h, bus/bus.c: introduce BusContext as a global
338 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
339 going to redo this a bit differently I think
341 2003-03-12 Havoc Pennington <hp@redhat.com>
343 Mega-patch that gets the message bus daemon initially handling
344 out-of-memory. Work still needed. Also lots of random
345 moving stuff to DBusError instead of ResultCode.
347 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
349 * dbus/dbus-connection.c
350 (dbus_connection_send_with_reply_and_block): use DBusError
352 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
355 * dbus/dbus-connection.c (dbus_connection_send): drop the result
356 code here, as the only failure possible is OOM.
358 * bus/connection.c (bus_connection_disconnect):
359 rename bus_connection_disconnected as it's a notification only
361 * bus/driver.c (bus_driver_handle_acquire_service): don't free
362 "name" on get_args failure, should be done by get_args;
363 don't disconnect client for bad args, just return an error.
364 (bus_driver_handle_service_exists): ditto
366 * bus/services.c (bus_services_list): NULL-terminate returned array
368 * bus/driver.c (bus_driver_send_service_lost)
369 (bus_driver_send_service_acquired): send messages from driver to a
370 specific client to the client's unique name, not to the broadcast
373 * dbus/dbus-message.c (decode_header_data): reject messages that
374 contain no name field
375 (_dbus_message_get_client_serial): rename to
376 dbus_message_get_serial and make public
377 (_dbus_message_set_serial): rename from set_client_serial
378 (_dbus_message_set_reply_serial): make public
379 (_dbus_message_get_reply_serial): make public
381 * bus/connection.c (bus_connection_foreach): allow stopping
382 iteration by returning FALSE from foreach function.
384 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
385 (dbus_connection_free_preallocated_send)
386 (dbus_connection_preallocate_send): new API for sending a message
387 without possibility of malloc failure.
388 (dbus_connection_send_message): rename to just
389 dbus_connection_send (and same for whole function family)
391 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
393 * dbus/dbus-sysdeps.c (_dbus_exit): new function
395 * bus/activation.c: handle/return errors
397 * dbus/dbus-errors.h: add more DBUS_ERROR #define
399 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
400 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
401 (_dbus_result_from_errno): move to this file
403 2003-03-10 Anders Carlsson <andersca@codefactory.se>
405 * dbus/dbus-marshal.c:
406 (_dbus_marshal_set_string):
407 Take a length argument so we can marshal the correct string
410 (_dbus_marshal_dict), (_dbus_demarshal_dict),
411 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
412 (_dbus_marshal_test):
413 * dbus/dbus-marshal.h:
414 Add support for marshalling and demarshalling dicts.
416 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
417 Add support for TYPE DICT.
419 * dbus/dbus-message.c: (set_string_field):
420 Adjust header padding.
422 (dbus_message_append_args_valist), (dbus_message_append_dict),
423 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
424 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
425 (check_message_handling), (check_have_valid_message):
426 * dbus/dbus-message.h:
427 Add functions for setting and getting dicts.
429 * dbus/dbus-protocol.h:
435 * doc/dbus-specification.sgml:
436 Add information about how dicts are marshalled.
438 * test/data/invalid-messages/dict-with-nil-value.message:
439 * test/data/invalid-messages/too-short-dict.message:
440 * test/data/valid-messages/dict-simple.message:
441 * test/data/valid-messages/dict.message:
442 Add sample messages containing dicts.
444 2003-03-08 Anders Carlsson <andersca@codefactory.se>
446 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
448 2003-03-07 Anders Carlsson <andersca@codefactory.se>
451 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
452 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
453 (dbus_dict_set_int32), (dbus_dict_set_uint32),
454 (dbus_dict_set_double), (dbus_dict_set_string),
455 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
456 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
457 (dbus_dict_set_string_array), (_dbus_dict_test):
459 Fix according to comments from Havoc.
461 2003-03-06 Michael Meeks <michael@server.home>
463 * configure.in: if we don't have kde-config, disable have_qt.
465 2003-03-07 Anders Carlsson <andersca@codefactory.se>
470 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
471 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
472 (dbus_dict_remove), (dbus_dict_get_value_type),
473 (dbus_dict_get_keys), (dbus_dict_put_boolean),
474 (dbus_dict_put_int32), (dbus_dict_put_uint32),
475 (dbus_dict_put_double), (dbus_dict_put_string),
476 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
477 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
478 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
479 (dbus_dict_get_int32), (dbus_dict_get_uint32),
480 (dbus_dict_get_double), (dbus_dict_get_string),
481 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
482 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
483 (dbus_dict_get_string_array), (_dbus_dict_test):
485 Add DBusDict implementation
487 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
491 2003-03-04 Havoc Pennington <hp@pobox.com>
493 * test/data/auth/*: adapt to changes
495 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
496 USERID_BASE64 and change USERNAME_BASE64 to put in username not
499 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
500 more stuff from being in a context name, to make the protocol
503 * dbus/dbus-errors.c (dbus_error_has_name): new function
504 (dbus_error_is_set): new function
506 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
507 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
509 * dbus/dbus-connection.c (dbus_connection_flush): also read
510 messages during a flush operation
512 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
514 2003-03-05 Anders Carlsson <andersca@codefactory.se>
516 * configure.in: Check for gethostbyname on Solaris.
518 * dbus/dbus-transport.c: (_dbus_transport_open):
519 Remove duplicate "tcp" entry.
521 * doc/dbus-specification.sgml:
524 2003-03-05 Anders Carlsson <andersca@codefactory.se>
526 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
527 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
528 (_dbus_keyring_test):
529 * dbus/dbus-md5.c: (_dbus_md5_compute):
530 * dbus/dbus-sha.c: (_dbus_sha_compute):
533 2003-03-05 Anders Carlsson <andersca@codefactory.se>
535 * README: Add some things.
537 2003-03-04 Anders Carlsson <andersca@codefactory.se>
539 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
540 after case DBUS_TYPE_BOOELAN.
542 2003-03-02 Havoc Pennington <hp@pobox.com>
544 * test/break-loader.c (randomly_set_extreme_ints): add test that
545 sets really huge and small integers
547 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
548 that length of boolean array fits in the string, and that
549 string has room for boolean value in single-bool case.
551 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
552 optional value to "ALIGN" command which is what to fill the
555 * test/data/valid-messages/no-padding.message: add regression
556 test for the message padding problem
558 2003-03-02 Havoc Pennington <hp@pobox.com>
560 * dbus/dbus-message.c (decode_header_data): fix to always init
561 message_padding, from Benjamin Dauvergne
563 2003-03-02 Havoc Pennington <hp@pobox.com>
569 2003-03-01 Joe Shaw <joe@assbarn.com>
571 * configure.in: Check for "struct cmsgcred" and try to access its
572 members for BSD-like unices.
574 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
575 _dbus_read_credentials_unix_socket().
576 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
577 read() for reading the credential byte off the unix socket. Use
578 struct cmsgcred on systems that support it.
580 2003-02-27 Alexander Larsson <alexl@redhat.com>
584 Make gthreads-2.0 dependency optional. Don't build thread test if
587 2003-02-27 Havoc Pennington <hp@pobox.com>
589 * dbus/dbus-connection.c
590 (dbus_connection_send_message_with_reply_and_block): fix doh!
591 doh! doh! bug that resulted in never removing a reply from the
592 queue, no wonder we called get_reply_serial so much ;-)
594 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
595 and client serial instead of demarshaling them every time
597 2003-02-27 Havoc Pennington <hp@pobox.com>
599 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
600 more inlined, using dbus-string-private.h, speeds things up
603 * dbus/dbus-string.c (_dbus_string_free): apply align offset
604 when freeing the string
605 (_dbus_string_steal_data): fix for align offset
606 (undo_alignment): new function
608 2003-02-26 Havoc Pennington <hp@redhat.com>
610 All kinds of audit fixes from Owen, plus initial attempt to
611 handle unaligned memory returned from malloc.
613 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
614 leave room for align_offset and nul byte
615 (fixup_alignment): function to track an align_offset and
616 ensure real->str is aligned
617 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
618 to allow a nul byte plus align offset
619 (_dbus_string_lock): fix overflow issue
620 (_dbus_string_init_const_len): add assertions on sanity of len,
621 assign allocated to be ALLOCATION_PADDING larger than len
622 (set_length): fixup the overflow handling
623 (_dbus_string_get_data_len): fix overflow in assertion
624 (open_gap): detect overflow in size of gap to be opened
625 (_dbus_string_lengthen): add overflow check
626 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
627 (_dbus_string_append): add overflow check
628 (_dbus_string_append_unichar): overflow
629 (_dbus_string_delete): fix overflow in assertion
630 (_dbus_string_copy_len): overflow in assertion
631 (_dbus_string_replace_len): overflows in assertions
632 (_dbus_string_find): change to implement in terms of
634 (_dbus_string_find_to): assorted fixage
635 (_dbus_string_equal_c_str): assert c_str != NULL,
636 fix logic so the function works
637 (_dbus_string_ends_with_c_str): fix overflow thingy
638 (_dbus_string_base64_encode): overflow fix
639 (_dbus_string_validate_ascii): overflow
640 (_dbus_string_validate_nul): overflow
642 2003-02-26 Havoc Pennington <hp@redhat.com>
644 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
646 2003-02-26 Alexander Larsson <alexl@redhat.com>
649 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
651 * dbus/dbus-connection.c:
652 * dbus/dbus-connection.h:
653 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
654 Add dbus_connection_set_wakeup_main_function and use it when queueing
655 incoming and outgoing messages.
658 * dbus/dbus-dataslot.c:
659 Threadsafe usage of DBusDataSlotAllocator
661 * dbus/dbus-message.c: (dbus_message_get_args_iter):
664 * dbus/dbus-server-unix.c:
668 Implement the new wakeup functions for glib.
671 * glib/test-thread-client.c:
672 * glib/test-thread-server.c:
673 * glib/test-thread.h:
674 Initial cut at some thread test code. Not really done yet.
676 2003-02-26 Havoc Pennington <hp@pobox.com>
678 * dbus/dbus-connection.c
679 (dbus_connection_send_message_with_reply_and_block): fix crash
680 where we ref'd the outgoing message instead of the returned reply
682 * dbus/dbus-transport-unix.c (do_authentication): check read watch
683 at the end of this function, so if we didn't need to read for
684 authentication, we reinstall it for receiving messages
686 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
687 a NULL sender for peer-to-peer case
689 * dbus/dbus-transport-unix.c (check_read_watch): handle
690 !authenticated case correctly
692 * glib/dbus-gmain.c: add support for DBusServer
694 * dbus/dbus-server.c: add data slot support
696 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
697 return values and handle errors
699 * dbus/dbus-dataslot.c: factor out the data slot stuff from
702 * Doxyfile.in (INPUT): add glib subdir
704 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
705 setup_with_g_main instead of hookup_with_g_main; write docs
707 2003-02-24 Anders Carlsson <andersca@codefactory.se>
709 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
710 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
711 * dbus/dbus-message.c: (dbus_message_append_boolean),
712 (dbus_message_append_boolean_array),
713 (dbus_message_get_args_valist), (_dbus_message_test):
714 * dbus/dbus-message.h:
715 * doc/dbus-specification.sgml:
716 Various fixes as pointed out by Havoc.
718 * test/data/invalid-messages/bad-boolean-array.message:
719 * test/data/invalid-messages/bad-boolean.message:
720 Add invalid boolean value test cases.
722 2003-02-24 Anders Carlsson <andersca@codefactory.se>
724 * dbus/dbus-internals.c: (_dbus_type_to_string):
725 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
726 (_dbus_marshal_validate_arg):
727 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
728 * dbus/dbus-message.c: (dbus_message_append_args_valist),
729 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
730 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
731 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
732 (dbus_message_iter_get_double),
733 (dbus_message_iter_get_boolean_array), (message_iter_test):
734 * dbus/dbus-message.h:
735 * dbus/dbus-protocol.h:
736 * doc/dbus-specification.sgml:
737 * test/data/valid-messages/lots-of-arguments.message:
738 Add support for boolean and boolean array types.
740 2003-02-23 Havoc Pennington <hp@pobox.com>
742 * dbus/dbus-keyring.c: finish most of this implementation and
745 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
746 these barf if the error isn't cleared to NULL
748 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
749 (_dbus_create_directory): new function
751 * dbus/dbus-errors.c (dbus_set_error): fix warning
753 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
754 (_dbus_string_hex_decode): new function
755 (test_hex_roundtrip): test code
757 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
759 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
761 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
762 the save-to-temp/rename trick to atomically write the new file
763 (_dbus_string_parse_uint): new function
765 2003-02-22 Havoc Pennington <hp@pobox.com>
767 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
769 2003-02-22 Havoc Pennington <hp@pobox.com>
771 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
772 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
774 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
776 * dbus/test/data/sha-1: add US government test suite for SHA-1
778 2003-02-21 Anders Carlsson <andersca@codefactory.se>
780 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
781 Make string arrays NULL-terminated.
783 * dbus/dbus-memory.c: (dbus_free_string_array):
784 * dbus/dbus-memory.h:
785 New function for freeing NULL-terminated string arrays.
787 * dbus/dbus-message-builder.c: (append_quoted_string),
788 (_dbus_message_data_load):
789 Add support for array types.
791 * dbus/dbus-message.c: (check_message_handling):
792 Add more types as test cases.
794 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
795 (_dbus_string_parse_double):
796 Add the start offset to the end offset.
798 * test/data/valid-messages/lots-of-arguments.message:
799 New test message with lots of arguments.
801 2003-02-21 Anders Carlsson <andersca@codefactory.se>
803 * dbus/dbus-message.c: (dbus_message_append_nil),
804 (dbus_message_append_int32), (dbus_message_append_uint32),
805 (dbus_message_append_double), (dbus_message_append_string),
806 (dbus_message_append_int32_array),
807 (dbus_message_append_uint32_array),
808 (dbus_message_append_double_array),
809 (dbus_message_append_byte_array),
810 (dbus_message_append_string_array):
811 Fix all out-of-memory handling in these functions.
813 2003-02-21 Anders Carlsson <andersca@codefactory.se>
815 * dbus/dbus-message.c: (dbus_message_append_nil):
818 2003-02-21 Anders Carlsson <andersca@codefactory.se>
820 * dbus/dbus-message.c: (dbus_message_append_args_valist),
821 (dbus_message_append_nil), (dbus_message_append_int32_array),
822 (dbus_message_append_uint32_array),
823 (dbus_message_append_double_array),
824 (dbus_message_append_byte_array),
825 (dbus_message_append_string_array), (dbus_message_get_args_valist),
826 (dbus_message_iter_get_int32_array),
827 (dbus_message_iter_get_uint32_array),
828 (dbus_message_iter_get_double_array),
829 (dbus_message_iter_get_byte_array),
830 (dbus_message_iter_get_string_array):
832 * dbus/dbus-message.h:
833 Add functions for appending and getting arrays.
835 2003-02-21 Anders Carlsson <andersca@codefactory.se>
837 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
838 element size at least 8 bytes, fixes mempool tests on
841 2003-02-20 Alexander Larsson <alexl@redhat.com>
843 * dbus/dbus-transport-unix.c (unix_do_iteration):
844 Unlock the connection mutex during a blocking select call.
845 Add todo about how we need a way to wake up the select.
847 * dbus/dbus-connection-internal.h:
848 * dbus/dbus-connection.c:
849 Add _dbus_connection_lock and _dbus_connection_unlock.
851 2003-02-19 Havoc Pennington <hp@pobox.com>
853 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
854 Doxyfile.in, not Doxyfile
856 * dbus/dbus-keyring.c: do some hacking on this
858 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
860 * dbus/dbus-errors.c (dbus_set_error_const): do not call
862 (dbus_set_error): remove dbus_error_init, check for message ==
863 NULL *before* we sprintf into it, and add @todo about including
864 system headers in this file
866 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
868 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
870 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
871 get various bits of user information based on either username
873 (_dbus_homedir_from_username): new function
875 2003-02-19 Anders Carlsson <andersca@codefactory.se>
878 Add check for nonposix getpwnam_r
880 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
881 Align the pool element size to a sizeof (void *) boundary.
883 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
884 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
885 General Solaris fixes.
887 * test/data/valid-messages/simplest-manual.message:
888 Explicitly state that we want little-endian packing.
890 2003-02-19 Mikael Hallendal <micke@codefactory.se>
892 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
894 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
895 Added to create a transport connecting using a tcp/ip socket.
897 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
898 to a tcp socket at given host and port.
899 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
902 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
904 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
905 Added to create a server listening on a TCP/IP socket.
907 2003-02-19 Havoc Pennington <hp@pobox.com>
909 Throughout: mop up all the Doxygen warnings and undocumented
912 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
915 * dbus/dbus-threads.c: move global mutex initializers to
916 dbus-internals.h, multiple prototypes was confusing doxygen
917 besides being kind of ugly
919 * Doxyfile (PREDEFINED): have Doxygen define
920 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
921 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
922 (do not abuse the feature! it's for stuff like the autogenerated
923 macros in dbus-md5.c, not just for things you don't feel like
926 2003-02-18 Havoc Pennington <hp@pobox.com>
928 * dbus/dbus-string.c (_dbus_string_zero): new function
930 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
931 wrap it in some dbus-friendly API
933 * dbus/dbus-types.h: add 16-bit types
935 2003-02-18 Joe Shaw <joe@assbarn.com>
937 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
938 credentials from our currently running process.
939 (get_word): Fix a buglet where we were copying the entire length
940 instead of relative to our position.
942 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
943 keys on the stack... it's 640k of data.
945 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
946 read the credentials byte off the socket, even if we don't have
948 (_dbus_poll): Implement poll() using select() for systems which
951 * glib/test-dbus-glib.c (main): Print out an error if no
952 parameters are given.
954 * test/data/auth/fallback.auth-script: Added. Tests that a client
955 can fallback to a secondary auth mechanism if the first fails.
957 2003-02-18 Havoc Pennington <hp@pobox.com>
961 2003-02-17 Havoc Pennington <hp@pobox.com>
963 * doc/dbus-specification.sgml: lots of cosmetic
964 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
965 env variable to DBUS_BUS_ADDRESS, s/client/application/,
966 s/server/bus/ (except in authentication section). Add a section
967 "Message Bus Message Routing"
969 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
975 2003-02-17 Anders Carlsson <andersca@codefactory.se>
977 * doc/dbus-specification.sgml:
978 Specification updates.
980 2003-02-17 Anders Carlsson <andersca@codefactory.se>
982 * bus/activation.c: (bus_activation_init), (child_setup),
983 (bus_activation_activate_service):
985 * bus/main.c: (main):
986 Set DBUS_ADDRESS environment variable.
988 * dbus/dbus-errors.c: (dbus_set_error):
989 Don't use va_copy since that's a C99 feature.
991 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
993 * dbus/dbus-sysdeps.h:
994 Add child_setup_func to _dbus_spawn_async.
996 * doc/dbus-specification.sgml:
997 Update specification.
999 * test/spawn-test.c: (setup_func), (main):
1002 2003-02-17 Alexander Larsson <alexl@redhat.com>
1004 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
1007 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1011 * doc/dbus-test-plan.sgml:
1012 Add test plan document.
1017 2003-02-17 Anders Carlsson <andersca@codefactory.se>
1019 * dbus/dbus-message.c: (decode_header_data),
1020 (_dbus_message_loader_return_buffer):
1021 Set the header padding amount when loading a message.
1023 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1025 * bus/dispatch.c: (send_one_message):
1026 Only send broadcast messages to registered connections.
1028 * dbus/dbus-message.c: (dbus_message_name_is):
1029 * dbus/dbus-message.h:
1030 New convenience function.
1032 * dbus/dbus-transport-debug.c: (do_reading):
1033 Only dispatch one message per run.
1036 * test/bus-test.c: (new_connection_callback), (die),
1037 (test_hello_client1_handler), (test_hello_client2_handler),
1038 (test_hello_replies), (main):
1040 * test/bus-test-loop.[ch]:
1043 2003-02-16 Havoc Pennington <hp@pobox.com>
1045 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1046 backward conditional
1048 2003-02-16 Alexander Larsson <alexl@redhat.com>
1050 * dbus/dbus-connection.c:
1051 Implement sent_message_with_reply. (with_reply_and block is still
1053 Made dispatch_message not lose message if OOM.
1055 * dbus/dbus-errors.h:
1056 Add NoReply error (for reply timeouts).
1058 2003-02-16 Alexander Larsson <alexl@redhat.com>
1060 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1061 Actually free keys and values when destroying hashtable.
1063 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1065 * dbus/dbus-auth.c: (client_try_next_mechanism):
1068 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1069 Return TRUE if there's no thread implementation around.
1071 * glib/dbus-gmain.c: (free_source),
1072 (dbus_connection_hookup_with_g_main):
1073 Make sure to remove the GSource when the connection is finalized.
1075 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1077 * bus/dispatch.c: (bus_dispatch_message_handler):
1078 * dbus/dbus-errors.h:
1079 Return an error if someone tries to send a message to a service
1082 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1084 * bus/activation.c: (load_directory), (bus_activation_init),
1085 (bus_activation_activate_service):
1088 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1089 More work on the activation handling.
1091 * dbus/dbus-errors.h:
1092 Add some error messages
1094 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1095 * dbus/dbus-message.h:
1096 New function that creates an error message.
1098 * dbus/dbus-protocol.h:
1099 Add ACTIVATE_SERVER message.
1101 * dbus/dbus-server-unix.c: (unix_handle_watch),
1102 (_dbus_server_new_for_domain_socket):
1103 Call _dbus_fd_set_close_on_exec.
1105 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1106 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1107 (_dbus_fd_set_close_on_exec):
1108 * dbus/dbus-sysdeps.h:
1109 Add _dbus_fd_set_close_on exec function. Also add function that checks
1110 that all open fds are set to close-on-exec and warns otherwise.
1112 * dbus/dbus-transport-unix.c:
1113 (_dbus_transport_new_for_domain_socket):
1114 Call _dbus_fd_set_close_on_exec.
1116 2003-02-16 Havoc Pennington <hp@pobox.com>
1118 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1119 allow people to avoid setting SIGPIPE to SIG_IGN
1120 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1121 we've been asked not to
1123 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1125 * dbus/dbus-list.c: (_dbus_list_append_link),
1126 (_dbus_list_prepend_link):
1127 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1131 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1134 * bus/activation.c: (bus_activation_entry_free),
1135 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1137 * bus/main.c: (main):
1138 Add simple activation support, doesn't work yet though.
1140 2003-02-15 Zack Rusin <zack@kde.org>
1142 * qt/dbus-qthread.cpp: small casting fix
1144 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1146 * dbus/dbus-errors.c: (dbus_set_error):
1147 * dbus/dbus-errors.h:
1148 Add a few errors and make dbus_set_error void.
1150 * dbus/dbus-sysdeps.c:
1151 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1152 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1153 * dbus/dbus-sysdeps.h:
1154 Add _dbus_spawn_async.
1156 * test/spawn-test.c: (main):
1157 Test for _dbus_spawn_async.
1159 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1161 * dbus/dbus-internals.h:
1162 Fix build without tests.
1164 * dbus/dbus-list.c: (alloc_link):
1165 Fix a segfault when a malloc fails.
1167 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1168 (dbus_malloc0), (dbus_realloc):
1169 Add support for malloc debugging.
1171 2003-02-15 Alexander Larsson <alexl@redhat.com>
1173 * dbus/dbus-threads.c:
1174 * dbus/dbus-threads.h:
1175 Add condvars. Remove static mutext from API.
1176 Implement static mutexes by initializing them from threads_init.
1178 * glib/dbus-gthread.c:
1179 * qt/dbus-qthread.cpp:
1180 Update with the thread api changes.
1185 Turn StaticMutex into normal mutex + init function.
1186 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1187 _dbus_list_append_link, _dbus_list_prepend_link
1190 * dbus/dbus-sysdeps.c:
1191 * dbus/dbus-sysdeps.h:
1192 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1193 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1195 * dbus/dbus-protocol.h:
1196 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1198 * dbus/dbus-message.c:
1199 Make ref/unref atomic.
1202 * dbus/dbus-connection-internal.h:
1203 * dbus/dbus-connection.c:
1204 * dbus/dbus-connection.h:
1206 Change _peek to _borrow,_return & _steal_borrowed.
1207 Change disconnect callback to event.
1208 Make dbus_connection_dispatch_messages reentrant.
1210 * dbus/dbus-transport.c:
1211 Don't ref the connection on calls to the transport
1214 * dbus/dbus-message-handler.c:
1217 * glib/dbus-gmain.c:
1218 Don't use peek_message anymore
1221 * test/debug-thread.c:
1222 * test/debug-thread.h:
1223 Simple thread implementation that asserts() on deadlocks in
1224 single-threaded code.
1227 (main) Call debug_threads_init.
1230 Use disconnect message instead of disconnect callback.
1234 Don't call dbus_connection_set_disconnect_function. Instead export
1235 bus_connection_disconnect.
1238 Call bus_connection_disconnect when we get a disconnected message.
1240 2003-02-15 Havoc Pennington <hp@pobox.com>
1242 * dbus/dbus-message.c (dbus_message_new): fool around with the
1245 2003-02-14 Havoc Pennington <hp@pobox.com>
1247 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1249 * dbus/dbus-memory.c: fail if the debug functions indicate we
1252 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1253 (_dbus_decrement_fail_alloc_counter): debug functions to
1254 simulate memory allocation failures
1256 2003-02-14 Havoc Pennington <hp@pobox.com>
1258 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1261 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1263 * bus/driver.c: (bus_driver_handle_hello):
1265 * bus/services.c: (bus_service_lookup):
1266 Reorder message sending so we get a more sane order.
1268 * test/bus-test.c: (message_handler):
1271 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1273 * bus/driver.c: (bus_driver_send_service_deleted),
1274 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1275 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1276 (bus_driver_send_welcome_message),
1277 (bus_driver_handle_list_services),
1278 (bus_driver_handle_acquire_service),
1279 (bus_driver_handle_service_exists):
1280 * dbus/dbus-bus.c: (dbus_bus_register_client),
1281 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1282 * dbus/dbus-errors.c: (dbus_result_to_string):
1283 * dbus/dbus-errors.h:
1284 * dbus/dbus-message.c: (dbus_message_append_args),
1285 (dbus_message_append_args_valist), (dbus_message_get_args),
1286 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1287 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1288 (dbus_message_iter_get_byte_array),
1289 (dbus_message_iter_get_string_array), (message_iter_test),
1290 (check_message_handling), (_dbus_message_test):
1291 * dbus/dbus-message.h:
1292 * test/bus-test.c: (main):
1293 Change fields to arguments in messages, so that they won't be
1294 confused with header fields.
1296 * glib/test-dbus-glib.c: (main):
1297 Remove append_fields from hello message.
1299 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1301 * dbus/dbus-errors.c:
1302 * dbus/dbus-message.c:
1303 * dbus/dbus-string.c:
1304 Documentation fixes.
1306 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1308 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1310 Implement support for timeouts in dbus-glib.
1312 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1314 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1315 * dbus/dbus-message.c: (process_test_subdir):
1316 * test/break-loader.c: (find_breaks_based_on):
1317 Plug some memory leaks.
1319 2003-02-13 Richard Hult <rhult@codefactory.se>
1321 * bus/main.c: Fix build.
1323 * dbus/dbus-errors.h:
1324 * dbus/dbus-errors.c: Fix copyright for Anders.
1326 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1331 * bus/connection.c: (bus_connection_foreach):
1334 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1335 (unescape_string), (new_section), (parse_section_start),
1336 (parse_key_value), (report_error), (bus_desktop_file_load),
1337 (bus_desktop_file_get_string):
1338 * bus/desktop-file.h:
1339 Use DBusError for error reporting.
1341 * bus/dispatch.c: (send_one_message),
1342 (bus_dispatch_message_handler):
1343 * bus/driver.c: (bus_driver_send_service_deleted),
1344 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1345 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1346 (bus_driver_send_welcome_message),
1347 (bus_driver_handle_list_services),
1348 (bus_driver_handle_acquire_service),
1349 (bus_driver_handle_service_exists):
1350 * bus/loop.c: (bus_loop_run):
1352 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1354 * bus/utils.c: (bus_wait_for_memory):
1356 New files with general utility functions.
1358 * dbus/dbus-internals.h:
1359 Remove _DBUS_HANDLE_OOM.
1361 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1363 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1364 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1365 * dbus/dbus-errors.h:
1366 Add DBusError structure.
1368 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1370 * test/data/valid-messages/standard-acquire-service.message:
1371 * test/data/valid-messages/standard-hello.message:
1372 * test/data/valid-messages/standard-list-services.message:
1373 * test/data/valid-messages/standard-service-exists.message:
1374 Add some standard messages.
1376 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1378 * bus/driver.c: (bus_driver_send_welcome_message),
1379 (bus_driver_handle_list_services),
1380 (bus_driver_handle_acquire_service),
1381 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1382 Update for API changes in libdbus.
1384 * dbus/dbus-message.c: (dbus_message_new_reply):
1385 * dbus/dbus-message.h:
1386 Remove the name argument. The spec states that replies shouldn't
1389 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1391 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1392 (report_error), (bus_desktop_file_load), (lookup_section),
1393 (lookup_line), (bus_desktop_file_get_raw),
1394 (bus_desktop_file_get_string):
1395 * bus/desktop-file.h:
1396 Some fixes, and new functions for getting a key value from a section.
1398 2003-02-13 Havoc Pennington <hp@pobox.com>
1400 * test/data/auth/fail-after-n-attempts.auth-script: new test
1402 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1405 2003-02-13 Havoc Pennington <hp@pobox.com>
1407 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1408 dbus_credentials_match were backward
1410 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1411 NO_CREDENTIALS and ROOT_CREDENTIALS
1413 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1414 into here. Never process more commands after we've reached an
1415 end state; store further data as unused bytes.
1417 * test/data/auth/*: add more auth tests
1419 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1420 command to match exact string and EXPECT_UNUSED to match unused
1423 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1425 2003-02-12 Havoc Pennington <hp@pobox.com>
1427 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1428 \r off of popped lines
1430 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1433 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1436 2003-02-12 Havoc Pennington <hp@pobox.com>
1438 * dbus/Makefile.am: remove break-loader from the build, since it
1441 * configure.in: add --enable-gcov to turn on coverage profiling
1442 flags and disable optimization
1444 2003-02-10 Havoc Pennington <hp@pobox.com>
1446 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1447 initial cut at test framework for DBusAuth from laptop.
1448 Doesn't quite work yet but it compiles and I need to get
1449 it off the 266mhz laptop. ;-)
1451 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1452 fix a memleak in error case
1454 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1457 * bus/desktop-file.c:
1458 * bus/desktop-file.h:
1459 Add a desktop file parser.
1461 2003-02-11 Zack Rusin <zack@kde.org>
1463 * qt/message.[h|cpp]: sample implementation
1464 of the KDE wrapper for DBusMessage
1466 2003-02-09 Zack Rusin <zack@kde.org>
1468 * test/bus-test.c: make_it_compile
1469 * doc/dbus-specification.sgml: minimal semantic fix
1471 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1477 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1480 * dbus/dbus-break-loader.c:
1482 * test/break-loader.c:
1483 Move dbus-break-loader to test/ and rename it to break-loader.
1485 2003-02-02 Havoc Pennington <hp@pobox.com>
1487 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1488 for code to manage cookies in your home directory
1490 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1492 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1493 to authenticate, then disconnect the client.
1495 2003-02-03 Alexander Larsson <alexl@redhat.com>
1497 * dbus/dbus-message.c (dbus_message_append_fields):
1500 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1502 * doc/dbus-specification.sgml:
1503 Update address format section.
1505 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1508 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1509 (message_handler), (new_connection_callback), (loop_quit),
1513 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1515 * bus/driver.c: (bus_driver_handle_service_exists):
1516 Simplify the code a bit.
1518 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1521 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1524 Add libdbus-daemon.la and link to it.
1526 2003-02-01 James Willcox <jwillcox@gnome.org>
1528 * bus/driver.c: (bus_driver_handle_own_service):
1529 Actually include the service reply code in the message.
1531 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1533 * bus/driver.c: (bus_driver_handle_service_exists):
1534 Don't unref the incoming message.
1536 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1538 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1540 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1542 * dbus/dbus-server.c: (dbus_server_listen):
1543 * dbus/dbus-transport.c: (_dbus_transport_open):
1544 ifdef out the calls to the debug transport and server.
1546 2003-02-02 Alexander Larsson <alexl@redhat.com>
1548 * dbus/dbus-watch.c (dbus_watch_get_flags):
1549 Add note in the docs that ERROR or HANGUP won't be returned
1550 and are assumed always on.
1552 * glib/dbus-gmain.c (add_watch):
1553 Always add IO_ERR | IO_HUP
1555 * dbus/dbus-message.h:
1556 Add semicolon after dbus_message_iter_get_string_array().
1557 Makes qt code build again
1559 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1561 * bus/driver.c: (create_unique_client_name),
1562 (bus_driver_handle_hello):
1563 Don't take a name, just use a numeric id to identify
1567 * dbus/dbus-bus.c: (dbus_bus_register_client),
1568 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1570 Add new convenience functions for communicating with the bus.
1572 * dbus/dbus-message.h:
1574 * dbus/dbus-protocol.h:
1577 2003-02-01 Alexander Larsson <alexl@redhat.com>
1579 * dbus/dbus-message.c (dbus_message_append_fields):
1580 Add some more doc comments.
1582 2003-02-01 Havoc Pennington <hp@pobox.com>
1584 * dbus/dbus-break-loader.c (randomly_modify_length): change
1585 a 4-byte value in the message as if it were a length
1587 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1588 execute bit on saved files
1590 2003-02-01 Havoc Pennington <hp@pobox.com>
1592 * dbus/dbus-break-loader.c (main): new program to find messages
1593 that break the loader.
1595 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1596 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1598 * dbus/dbus-string.c (_dbus_string_set_byte): new
1600 2003-01-31 Havoc Pennington <hp@pobox.com>
1602 * dbus/dbus-message.c: refactor the test code to be more general,
1603 in preparation for writing a "randomly permute test cases to
1604 try to break the loader" program.
1606 2003-01-31 Havoc Pennington <hp@pobox.com>
1608 * doc/dbus-specification.sgml: work on the specification
1610 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1611 the protocol version of the message.
1613 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1614 no longer specifies that.
1615 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1618 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1619 "break" for DBUS_TYPE_NIL, remove @todo
1621 2003-01-31 Havoc Pennington <hp@pobox.com>
1623 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1624 just set_is_error/get_is_error as this is a commonly-used
1625 function, and write docs.
1627 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1629 * dbus/dbus-address.c: (dbus_address_entry_free):
1630 Free key and value lists.
1632 * dbus/dbus-internals.c: (_dbus_type_to_string):
1633 Add the types we didn't have.
1635 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1636 (_dbus_marshal_validate_arg):
1639 * dbus/dbus-message.c: (dbus_message_set_sender):
1640 Remove todo about being able to set sender to NULL.
1642 (dbus_message_set_is_error_reply),
1643 (dbus_message_get_is_error_reply):
1644 * dbus/dbus-message.h:
1647 * dbus/dbus-protocol.h:
1648 Add error reply flag.
1650 * test/data/valid-messages/opposite-endian.message:
1651 Add NIL type to test.
1653 2003-01-31 Havoc Pennington <hp@pobox.com>
1655 * doc/dbus-specification.sgml: fully specify the header. Add
1656 flags and major protocol version, and change header/body len to
1659 * dbus/dbus-message-builder.c (append_saved_length): append length
1662 * dbus/dbus-message.c (dbus_message_create_header): change header
1663 length and body length to unsigned. Add the new fields from the
1665 (_dbus_message_loader_return_buffer): unsigned header/body len
1667 2003-01-30 Havoc Pennington <hp@pobox.com>
1669 * dbus/dbus-auth.c: rework to use only REJECTED, no
1672 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1673 use REJECTED, suggested by Mark McLoughlin
1675 2003-01-30 Havoc Pennington <hp@pobox.com>
1677 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1678 a better way to report errors here. e.g. "unix address lacks
1679 path" or something. also "no such file" when the path doesn't
1682 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1684 (dbus_parse_address): add @todo about documenting address format,
1685 and allowing , and ; to be escaped
1687 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1690 Add dbus-address.[ch]
1692 * dbus/dbus-address.c: (dbus_address_entry_free),
1693 (dbus_address_entries_free), (create_entry),
1694 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1695 (dbus_parse_address), (_dbus_address_test):
1696 * dbus/dbus-address.h:
1697 New files for dealing with address parsing.
1699 * dbus/dbus-connection.c:
1700 Document timeout functions.
1702 * dbus/dbus-message.c:
1703 Document dbus_message_new_from_message.
1705 * dbus/dbus-server-debug.c:
1708 * dbus/dbus-server.c: (dbus_server_listen):
1709 Parse address and use correct server implementation.
1711 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1712 * dbus/dbus-string.h:
1713 New function with test.
1715 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1719 * dbus/dbus-transport-debug.c:
1722 * dbus/dbus-transport.c: (_dbus_transport_open):
1723 Parse address and use correct transport implementation.
1725 2003-01-30 Havoc Pennington <hp@pobox.com>
1727 * dbus/dbus-message.c: use message->byte_order instead of
1728 DBUS_COMPILER_BYTE_ORDER throughout.
1729 (dbus_message_create_header): pad header to align the
1730 start of the body of the message to 8-byte boundary
1732 * dbus/dbus-marshal.h: make all the demarshalers take const
1733 DBusString arguments.
1735 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1736 validate message args here, so we don't have to do slow validation
1737 later, and so we catch bad messages as they are incoming. Also add
1738 better checks on header_len and body_len. Also fill in
1741 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1742 implemented properly)
1743 (_dbus_string_validate_nul): new function to check all-nul
1745 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1746 get_arg_end_pos and remove all validation
1747 (_dbus_marshal_validate_arg): actually do validation here.
1749 2003-01-29 Havoc Pennington <hp@pobox.com>
1751 * dbus/dbus-message.c (check_message_handling): fix assertion
1752 failure on set_client_serial
1754 2003-01-28 Havoc Pennington <hp@pobox.com>
1756 * dbus/dbus-server-debug.c: Add doc section comments
1758 * dbus/dbus-transport-debug.c: add doc section comments
1760 2003-01-28 Havoc Pennington <hp@redhat.com>
1762 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1763 the reverse order from how I had it
1764 (_dbus_string_base64_encode): reverse encoding order. I was
1765 basically byteswapping everything during encoding.
1767 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1769 * dbus/dbus-connection-internal.h:
1770 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1771 (_dbus_connection_remove_timeout):
1772 Add functions for adding and removing timeouts.
1774 * dbus/dbus-message.c: (dbus_message_new_from_message):
1775 Add new function that takes a message and creates an exact
1776 copy of it, but with the refcount set to 1.
1777 (check_message_handling):
1780 * dbus/dbus-server-protected.h:
1781 * dbus/dbus-server.c: (_dbus_server_init_base),
1782 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1783 (dbus_server_set_timeout_functions):
1784 (_dbus_server_remove_timeout):
1785 New functions so that a server can add and remove timeouts.
1787 (dbus_server_listen):
1788 Add commented out call to dbus_server_debug_new.
1790 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1791 Actually set the handler, doh.
1793 * dbus/dbus-transport.c: (_dbus_transport_open):
1794 Add commented out call to dbus_transport_debug_client_new.
1797 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1799 2003-01-28 Havoc Pennington <hp@pobox.com>
1801 * dbus/dbus-message.c (check_message_handling): function to check
1802 on the loaded message, iterates over it etc.
1804 2003-01-28 Havoc Pennington <hp@pobox.com>
1806 * test/Makefile.am (dist-hook): fix make distdir
1808 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1810 2003-01-27 Havoc Pennington <hp@pobox.com>
1812 * dbus/dbus-mempool.c (time_for_size): replace printf with
1815 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1816 empty lines; fix the SAVE_LENGTH stuff to be
1817 START_LENGTH/END_LENGTH so it actually works; couple other
1820 * test/Makefile.am (dist-hook): add dist-hook for .message files
1822 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1823 can be constant or locked.
1824 (_dbus_string_free): allow freeing a const string as
1827 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1829 * dbus/dbus-test-main.c (main): take an argument which is the
1830 directory containing test data
1832 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1833 argument to this and load all the messages in test/data/
1834 checking that they can be loaded or not loaded as appropriate.
1836 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1838 * bus/dispatch.c: (bus_dispatch_message_handler):
1839 Dispatch messages sent to services.
1841 * bus/driver.c: (bus_driver_send_service_deleted),
1842 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1843 (bus_driver_send_service_acquired):
1844 Add helper functions for sending service related messages.
1846 (bus_driver_send_welcome_message):
1847 Send HELLO_REPLY instead of WELCOME.
1849 (bus_driver_handle_list_services):
1850 Send LIST_SERVICES_REPLY instead of SERVICES.
1852 (bus_driver_handle_own_service),
1853 (bus_driver_handle_service_exists):
1854 New message handlers.
1856 (bus_driver_handle_message):
1857 Invoke new message handlers.
1859 (bus_driver_remove_connection):
1860 Don't remove any services here since that's done automatically
1861 by bus_service_remove_owner now.
1864 New function signatures.
1866 * bus/services.c: (bus_service_add_owner):
1867 Send ServiceAcquired message if we're the only primary owner.
1869 (bus_service_remove_owner):
1870 Send ServiceAcquired/ServiceLost messages.
1872 (bus_service_set_prohibit_replacement),
1873 (bus_service_get_prohibit_replacement):
1874 Functions for setting prohibit replacement.
1876 (bus_service_has_owner):
1877 New function that checks if a connection is in the owner queue of
1881 Add new function signatures.
1883 * dbus/dbus-list.c: (_dbus_list_test):
1884 Add tests for _dbus_list_remove_last and traversing the list backwards.
1887 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1888 go any further, so return NULL then.
1890 * dbus/dbus-protocol.h:
1891 Add new messages, service flags and service replies.
1893 2003-01-26 Havoc Pennington <hp@pobox.com>
1895 * dbus/dbus-message-builder.c: implement, completely untested.
1897 * test/data/*: add data to be used in testing.
1898 ".message" files are our simple loadable text format.
1899 ".message-raw" will be binary dumps of messages.
1901 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1903 2003-01-26 Havoc Pennington <hp@pobox.com>
1905 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1907 * dbus/dbus-errors.c (dbus_result_to_string): add
1910 * dbus/dbus-message-builder.c: new file, will contain code to load
1911 up messages from files. Not implemented yet.
1913 2003-01-26 Havoc Pennington <hp@pobox.com>
1915 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1916 the sender by setting to NULL
1918 2003-01-26 Havoc Pennington <hp@pobox.com>
1920 The unit tests pass, but otherwise untested. If it breaks, the
1921 tests should have been better. ;-)
1923 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1926 * dbus/dbus-message.c: redo everything so we maintain
1927 message->header as the only copy of the various fields.
1928 This avoids the possibility of out-of-memory in some cases,
1929 for example dbus_message_lock() can't run out of memory anymore,
1930 and avoids extra copying. Figured I may as well go ahead and do
1931 this since it was busted for dbus_message_lock to not return
1932 failure on OOM, and dbus_message_write_header was totally
1933 unchecked for OOM. Also fixed some random other bugs.
1935 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1936 that strings are nul-terminated. Also, end_pos can be equal
1937 to string length just not greater than, I think.
1938 (_dbus_marshal_set_int32): new function
1939 (_dbus_marshal_set_uint32): new function
1940 (_dbus_marshal_set_string): new function
1942 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1943 a warning, init timeout_list to NULL
1944 (dbus_connection_send_message): don't use uninitialized variable
1947 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1949 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1951 * bus/driver.c: (bus_driver_handle_hello),
1952 (bus_driver_send_welcome_message):
1955 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1957 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1958 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1959 (dbus_connection_unref):
1960 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1961 * dbus/dbus-message.c: (dbus_message_unref),
1964 (dbus_message_get_fields):
1965 Remove debugging printout.
1967 (_dbus_message_loader_return_buffer):
1968 Don't store the header string.
1970 (_dbus_message_test):
1973 2003-01-26 Richard Hult <rhult@codefactory.se>
1975 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1976 the file descriptor list, since it can change under us.
1978 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1980 * glib/dbus-gmain.c: (dbus_connection_prepare),
1981 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1982 (remove_watch), (dbus_connection_hookup_with_g_main):
1983 Rewrite the glib handling to use its own GSource instead of a
1984 GIOChannel so we can catch messages put in the queue while waiting
1987 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1990 * bus/connection.c: (connection_disconnect_handler),
1991 (connection_watch_callback), (bus_connection_setup):
1992 * bus/dispatch.c: (send_one_message),
1993 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1994 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1996 * bus/driver.c: (bus_driver_send_service_deleted),
1997 (bus_driver_send_service_created), (bus_driver_handle_hello),
1998 (bus_driver_send_welcome_message),
1999 (bus_driver_handle_list_services), (bus_driver_remove_connection),
2000 (bus_driver_handle_message):
2002 Refactor code, put the message dispatching in its own file. Use
2003 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
2006 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2008 * dbus/dbus-internals.h:
2009 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
2011 * dbus/dbus-message.c: (dbus_message_get_sender):
2012 * dbus/dbus-message.h:
2013 Implement dbus_message_get_sender.
2015 * dbus/dbus-protocol.h:
2016 Add message and service defines.
2018 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2020 * dbus/dbus-connection.c: (dbus_connection_send_message):
2021 * dbus/dbus-message-internal.h:
2022 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
2023 (dbus_message_write_header):
2024 Remove _dbus_messag_unlock and don't set the client serial on a
2025 message if one already exists.
2027 2003-01-24 Havoc Pennington <hp@pobox.com>
2029 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
2032 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2035 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2037 * dbus/dbus-list.c: (alloc_link), (free_link):
2038 Use a memory pool for the links.
2040 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2042 * bus/connection.c: (bus_connection_foreach):
2044 Add new bus_connection_foreach function.
2046 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2047 Add function that broadcasts a message to all clients.
2049 (bus_driver_send_service_created), (bus_driver_handle_hello),
2050 (bus_driver_send_welcome_message),
2051 (bus_driver_handle_list_services), (bus_driver_message_handler):
2052 Implement functions that take care of listing services, and notifying
2053 clients when new services are created.
2055 * bus/services.c: (bus_services_list):
2057 Add new function that returns an array of strings with the currently
2058 registered services.
2061 * glib/dbus-gmain.c:
2062 Update copyright year.
2064 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2066 * dbus/dbus-connection.c: (dbus_connection_send_message):
2067 Unlock the message in case it was sent earlier.
2069 (dbus_connection_send_message_with_reply_and_block):
2070 Remove the reply message from the list.
2072 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2073 Set array_len and new_pos correctly.
2075 (_dbus_marshal_test):
2076 Remove debug output.
2078 * dbus/dbus-message-internal.h:
2079 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2080 New function that returns the reply serial.
2082 (_dbus_message_unlock):
2083 New function that unlocks a message and resets its header.
2085 (dbus_message_append_string_array),
2086 (dbus_message_get_fields_valist),
2087 (dbus_message_iter_get_field_type),
2088 (dbus_message_iter_get_string_array),
2089 (dbus_message_get_fields),
2090 (dbus_message_append_fields_valist):
2091 Handle string arrays.
2093 (dbus_message_set_sender):
2094 Make this function public since the bus daemon needs it.
2096 (decode_header_data):
2097 Set the reply serial to -1 initially.
2099 * dbus/dbus-message.h:
2100 Add dbus_message_set_sender.
2102 2003-01-24 Havoc Pennington <hp@pobox.com>
2104 * doc/dbus-specification.sgml: add some stuff
2106 2003-01-22 Havoc Pennington <hp@pobox.com>
2108 * doc/dbus-specification.sgml: Start to document the protocol.
2110 2003-01-22 Havoc Pennington <hp@pobox.com>
2112 * dbus/dbus-connection.c
2113 (dbus_connection_send_message_with_reply_and_block): add some @todo
2115 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2117 2003-01-21 Havoc Pennington <hp@pobox.com>
2119 (patch untested because can't compile)
2121 * bus/driver.c (create_unique_client_name): make this function
2122 never recycle client names. Also, caller should initialize
2125 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2127 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2129 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2130 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2131 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2132 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2133 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2134 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2135 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2136 * dbus/dbus-marshal.h:
2137 * dbus/dbus-protocol.h:
2138 Add support for marshalling and demarshalling integer, double
2141 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2146 * bus/connection.c: (connection_disconnect_handler):
2147 Remove the connection from the bus driver's list.
2149 (connection_watch_callback): Dispatch messages.
2151 (free_connection_data): Free connection name.
2153 (bus_connection_setup): Add connection to the bus driver's list.
2154 (bus_connection_remove_owned_service):
2155 (bus_connection_set_name), (bus_connection_get_name):
2156 Add functions for setting and getting the connection's name.
2159 Add function headers.
2161 * bus/driver.c: (create_unique_client_name),
2162 (bus_driver_handle_hello_message),
2163 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2164 (bus_driver_add_connection), (bus_driver_remove_connection):
2167 * bus/services.c: (bus_service_free):
2169 New file that handles communication and registreation with the bus
2172 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2174 * dbus/dbus-connection.c: (dbus_connection_send_message):
2175 Add a new client_serial parameter.
2177 (dbus_connection_send_message_with_reply):
2178 Remove a @todo since we've implemented the blocking function.
2180 (dbus_connection_send_message_with_reply_and_block):
2181 New function that sends a message and waits for a reply and
2182 then returns the reply.
2184 * dbus/dbus-connection.h:
2187 * dbus/dbus-errors.c: (dbus_result_to_string):
2188 * dbus/dbus-errors.h:
2189 Add new DBUS_RESULT.
2191 * dbus/dbus-message-internal.h:
2192 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2193 (_dbus_message_set_sender), (dbus_message_write_header),
2194 (dbus_message_new_reply), (decode_header_data),
2195 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2196 * dbus/dbus-message.h:
2197 Add new functions that set the reply serial and sender.
2198 Also marshal and demarshal them correctly and add test.
2200 * dbus/dbus-protocol.h:
2201 Add new DBUS_MESSAGE_TYPE_SENDER.
2204 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2205 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2206 (dbus_connection_hookup_with_g_main):
2207 * glib/test-dbus-glib.c: (main):
2208 Rewrite to use GIOChannel and remove the GSource crack.
2210 * test/echo-client.c: (main):
2211 * test/watch.c: (check_messages):
2212 Update for changed APIs
2214 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2216 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2218 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2219 Create a DBusTimeoutList.
2220 (dbus_connection_set_timeout_functions): Add new function to
2221 set timeout callbacks
2223 * dbus/dbus-connection.h: Add public DBusTimeout API.
2225 * dbus/dbus-message.c: (dbus_message_get_service):
2226 * dbus/dbus-message.h: New function.
2228 * dbus/dbus-server.c: Fix small doc typo.
2230 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2232 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2234 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2235 of the string, just as long as specified.
2237 2003-01-19 Havoc Pennington <hp@pobox.com>
2239 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2242 * dbus/dbus-server.c (dbus_server_set_max_connections)
2243 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2244 keep track of current number of connections, and add API for
2245 setting a max (but haven't implemented enforcing the max yet)
2247 2003-01-18 Havoc Pennington <hp@pobox.com>
2249 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2250 reading/writing if read_watch != NULL or write_watch != NULL.
2252 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2253 the message loader code to actually load message->header and
2254 message->body into the newly-created message.
2256 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2259 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2260 (dbus_connection_get_max_message_size)
2261 (dbus_connection_set_max_live_messages_size)
2262 (dbus_connection_get_max_live_messages_size): implement some
2263 resource limitation functions
2265 * dbus/dbus-resources.c: new file implementing some of the
2266 resource limits stuff
2268 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2269 missing docs, add @todo to handle OOM etc.
2271 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2274 2003-01-18 Havoc Pennington <hp@pobox.com>
2276 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2277 connection if it hasn't been already.
2279 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2280 replace with DisconnectFunction.
2282 2003-01-18 Havoc Pennington <hp@pobox.com>
2284 Building --disable-verbose-mode --disable-asserts --disable-tests
2285 cuts the library from 112K to 45K or so
2287 * configure.in: check for varargs macro support,
2288 add --enable-verbose-mode, --enable-asserts.
2290 * dbus/dbus-internals.h (_dbus_assert): support
2292 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2294 2003-01-18 Havoc Pennington <hp@pobox.com>
2296 * dbus/dbus-test.c: include config.h so that tests actually run
2298 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2299 so the failure mode when that assumption fails will be plenty
2302 2003-01-18 Havoc Pennington <hp@pobox.com>
2304 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2306 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2309 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2310 since we don't want to use those in make check
2312 2003-01-15 Havoc Pennington <hp@redhat.com>
2318 2003-01-15 Havoc Pennington <hp@redhat.com>
2320 * test/Makefile.am: fix so that test source code ends up in the
2321 distribution on make distcheck
2323 2003-01-15 Havoc Pennington <hp@redhat.com>
2329 2003-01-15 Havoc Pennington <hp@redhat.com>
2331 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2332 fix build when --disable-tests
2334 * Makefile.am (EXTRA_DIST): put HACKING in here
2336 * HACKING: document procedure for making a tarball release.
2338 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2340 * bus/connection.c: (connection_error_handler),
2341 (bus_connection_setup):
2342 * bus/main.c: (main):
2343 Make sure that the DBusConnectionData struct is NULLed
2344 out to prevent a segfault.
2346 * dbus/dbus-errors.c: (dbus_result_to_string):
2347 * dbus/dbus-errors.h:
2348 * dbus/dbus-message.c: (dbus_message_get_fields),
2349 (dbus_message_get_fields_valist), (_dbus_message_test):
2350 * dbus/dbus-message.h:
2351 Make dbus_message_get_fields return a result code so we can
2352 track invalid fields as well as oom.
2354 2003-01-11 Havoc Pennington <hp@pobox.com>
2356 * configure.in: change --enable-test/--enable-ansi action-if-given
2357 to enable_foo=$enableval instead of enable_foo=yes
2359 2003-01-08 Havoc Pennington <hp@pobox.com>
2361 * dbus/dbus-string.c (_dbus_string_align_length): new function
2363 * dbus/dbus-test-main.c: move main() for test app here
2365 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2366 symbol to run tests, because dbus-test isn't in the main
2369 Code review nitpicks.
2371 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2372 for people with narrow emacs ;-). Assert client_serial was filled
2373 in. Assert message->name != NULL.
2374 (dbus_message_append_fields): have "first_field_type" arg separate
2375 from va list, needed for C++ binding that also uses varargs IIRC
2376 and helps with type safety
2377 (dbus_message_new): add @todo about using DBusString to store
2378 service/name internally
2379 (dbus_message_new): don't leak ->service and ->name on OOM later
2381 (dbus_message_unref): free the service name
2382 (dbus_message_get_fields): same change to varargs
2383 i.e. first_field_type
2384 (_dbus_message_loader_return_buffer): assert that the message data
2385 is aligned (if not it's a bug in our code). Put in verbose griping
2386 about why we set corrupted = TRUE.
2387 (decode_header_data): add FIXME that char* is evil. Was going to
2388 add FIXME about evil locale-specific string.h strncmp, but just
2389 switched to wacky string-as-uint32 optimization. Move check for
2390 "no room for field name" above get_const_data_len() to avoid
2391 assertion failure in get_const_data_len if we have trailing 2
2392 bytes or the like. Check for service and name fields being
2393 provided twice. Don't leak service/name on error. Require field
2394 names to be aligned to 4 bytes.
2396 * dbus/dbus-marshal.c: move byte swap stuff to header
2397 (_dbus_pack_int32): uscore-prefix
2398 (_dbus_unpack_int32): uscore-prefix
2399 (_dbus_unpack_uint32): export
2400 (_dbus_demarshal_string): add @todo complaining about use of
2402 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2403 handling allowing corrupt data to go unchecked
2405 2003-01-08 Havoc Pennington <hp@redhat.com>
2407 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2408 to the select() as needed for authentication. (should be using
2409 _dbus_poll() not select, but for another day)
2411 * dbus/dbus.h: include dbus/dbus-protocol.h
2413 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2415 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2418 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2420 * dbus/dbus-internals.c: (_dbus_type_to_string):
2421 New function that returns a string describing a type.
2423 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2424 * dbus/dbus-marshal.h:
2425 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2426 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2427 (dbus_message_iter_get_byte_array):
2428 * dbus/dbus-message.h:
2429 Add new convenience functions for appending and getting message fields.
2430 Also add demarshalling routines for byte arrays.
2432 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2434 * dbus/dbus-connection-internal.h:
2435 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2436 (_dbus_connection_get_next_client_serial),
2437 (dbus_connection_send_message):
2438 * dbus/dbus-internals.h:
2439 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2440 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2441 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2442 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2443 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2444 (_dbus_verbose_bytes), (_dbus_marshal_test):
2445 * dbus/dbus-marshal.h:
2446 * dbus/dbus-message-internal.h:
2447 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2448 (dbus_message_write_header), (_dbus_message_lock),
2449 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2450 (dbus_message_get_name), (dbus_message_append_int32),
2451 (dbus_message_append_uint32), (dbus_message_append_double),
2452 (dbus_message_append_string), (dbus_message_append_byte_array),
2453 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2454 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2455 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2456 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2457 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2458 (decode_header_data), (_dbus_message_loader_return_buffer),
2459 (message_iter_test), (_dbus_message_test):
2460 * dbus/dbus-message.h:
2461 * dbus/dbus-protocol.h:
2462 * dbus/dbus-test.c: (main):
2464 * glib/test-dbus-glib.c: (message_handler), (main):
2465 * test/echo-client.c: (main):
2466 * test/watch.c: (check_messages):
2467 Make messages sendable and receivable for real.
2469 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2471 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2472 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2473 * dbus/dbus-message.c: (dbus_message_append_int32),
2474 (dbus_message_append_uint32), (dbus_message_append_double),
2475 (dbus_message_append_string), (dbus_message_append_byte_array):
2476 Handle OOM restoration.
2478 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2480 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2481 (_dbus_demarshal_string), (_dbus_marshal_test):
2482 * dbus/dbus-marshal.h:
2483 * dbus/dbus-message.c: (dbus_message_get_name),
2484 Document these functions.
2486 (dbus_message_append_int32), (dbus_message_append_uint32),
2487 (dbus_message_append_double), (dbus_message_append_string),
2488 (dbus_message_append_byte_array):
2489 * dbus/dbus-message.h:
2490 Add functions for adding message fields of different types.
2492 * dbus/dbus-protocol.h:
2493 Add the different types.
2495 2003-01-05 Havoc Pennington <hp@pobox.com>
2497 * bus/connection.c: implement routines for handling connections,
2498 first thing is keeping a list of owned services on each connection
2499 and setting up watches etc.
2501 * bus/services.c: implement a mapping from service names to lists
2504 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2506 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2507 to use static mutexes for global data
2509 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2510 collection of functions to set/get application-specific data
2511 on the DBusConnection.
2513 2003-01-04 Havoc Pennington <hp@pobox.com>
2515 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2516 (_dbus_poll): new function
2518 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2521 * bus/loop.c: initial code for the daemon main loop
2523 2003-01-04 Havoc Pennington <hp@pobox.com>
2525 * test/watch.c (error_handler): make it safe if the error handler
2526 is called multiple times (if we s/error handler/disconnect
2527 handler/ we should just guarantee it's called only once)
2529 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2530 error handler on disconnect (it's quite possible we should
2531 just change the error handler to a "disconnect handler," I'm
2532 not sure we have any other meaningful errors)
2534 * configure.in: check for getpwnam_r
2536 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2537 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2538 mechanism as in SASL spec, using socket credentials
2540 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2541 (_dbus_send_credentials_unix_socket): new function
2543 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2545 (_dbus_write): only check errno if <0 returned
2546 (_dbus_write_two): ditto
2548 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2550 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2551 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2552 (_dbus_marshal_test):
2553 * dbus/dbus-marshal.h:
2554 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2555 to _dbus_marshal_utf8_string. Also fix some tests.
2557 2002-12-28 Harri Porten <porten@kde.org>
2559 * configure.in: added check for C++ compiler and a very cheesy
2560 check for the Qt integration
2562 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2564 * qt/Makefile.am: added
2566 * qt/.cvsignore: added
2568 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2569 latter, added #ifdef QT_THREAD_SUPPORT guard.
2571 * dbus/Makefile.am: added missing headers for make dist
2573 2002-12-28 Kristian Rietveld <kris@gtk.org>
2575 * dbus/Makefile.am: fixup export-symbols-regex.
2577 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2579 * acinclude.m4: Add this file and put the
2580 PKG_CHECK_MODULE macro in it.
2582 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2584 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2585 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2586 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2587 (_dbus_marshal_test):
2588 Make the demarshalling routines align the pos argument.
2589 Add string marshalling tests and fix the obvious bugs
2592 2002-12-26 Havoc Pennington <hp@pobox.com>
2594 * dbus/dbus-auth.c: fixes fixes fixes
2596 * dbus/dbus-transport-unix.c: wire up support for
2597 encoding/decoding data on the wire
2599 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2600 (_dbus_auth_decode_data): append to target string
2601 instead of nuking it.
2603 2002-12-26 Havoc Pennington <hp@pobox.com>
2605 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2606 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2609 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2610 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2611 now). Main point is because I wanted unpack_uint32 to implement
2613 (_dbus_verbose_bytes): new function
2615 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2617 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2618 mechanism to handle a corrupt message stream
2619 (_dbus_message_loader_new): fix preallocation to only prealloc,
2622 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2623 (_dbus_string_test): enhance tests for copy/move and fix the
2626 * dbus/dbus-transport-unix.c: Hold references in more places to
2627 avoid reentrancy problems
2629 * dbus/dbus-transport.c: ditto
2631 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2632 leak reference count in no-message case
2634 * test/watch.c (do_mainloop): handle adding/removing watches
2635 during iteration over the watches. Also, ref the connection/server
2636 stored on a watch, so we don't try to mangle a destroyed one.
2638 * dbus/dbus-transport-unix.c (do_authentication): perform
2641 * dbus/dbus-auth.c (get_state): add a state
2642 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2643 (_dbus_auth_get_unused_bytes): append the unused bytes
2644 to the passed in string, rather than prepend
2646 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2647 the auth conversation DBusAuth
2649 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2650 (_dbus_transport_new_for_domain_socket): when creating a
2651 transport, pass in whether it's a client-side or server-side
2652 transport so we know which DBusAuth to create
2654 2002-12-03 Havoc Pennington <hp@pobox.com>
2656 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2657 _after_ finalizing the derived members
2658 (unix_connection_set): unref watch if we fail to add it
2660 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2661 transport first, so that the connection owned by the
2662 transport will be valid as the transport finalizes.
2664 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2665 if necessary, and remove watches from the connection.
2667 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2669 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2671 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2672 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2673 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2674 (_dbus_marshal_test):
2675 * dbus/dbus-marshal.h:
2676 Add string marshal functions and have the demarshal functions
2677 return the new position.
2679 2002-12-25 Havoc Pennington <hp@pobox.com>
2681 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2682 it is a simple protocol that just maps directly to SASL.
2684 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2685 initial implementation, not actually used yet.
2687 * dbus/dbus-string.c (_dbus_string_find): new function
2688 (_dbus_string_equal): new function
2689 (_dbus_string_base64_encode): new function
2690 (_dbus_string_base64_decode): new function
2692 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2695 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2696 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2697 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2698 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2699 * dbus/dbus-marshal.h:
2700 * dbus/dbus-protocol.h:
2701 * dbus/dbus-test.c: (main):
2703 Add un-optimized marshalling/demarshalling routines.
2705 2002-12-25 Harri Porten <porten@kde.org>
2707 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2709 2002-12-24 Zack Rusin <zack@kde.org>
2711 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2712 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2715 2002-12-24 Havoc Pennington <hp@pobox.com>
2717 * glib/dbus-gthread.c: fix include
2719 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2720 I think glib API needs to change, though, as you don't
2721 want to use DBusMessageFunction, you want to use the
2722 DBusMessageHandler object. Probably
2723 dbus_connection_open_with_g_main_loop()
2724 and dbus_connection_setup_g_main_loop() or something like that
2725 (but think of better names...) that just create a connection
2726 that has watch/timeout functions etc. already set up.
2728 * dbus/dbus-connection.c
2729 (dbus_connection_send_message_with_reply): new function just to
2730 show how the message handler helps us deal with replies.
2732 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2734 * dbus/dbus-string.c (_dbus_string_test): free a string that
2737 * dbus/dbus-hash.c: use memory pools for the hash entries
2738 (rebuild_table): be more paranoid about overflow, and
2739 shrink table when we can
2740 (_dbus_hash_test): reduce number of sprintfs and write
2741 valid C89. Add tests for case where we grow and then
2742 shrink the hash table.
2744 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2746 * dbus/dbus-connection.c (dbus_connection_register_handler)
2747 (dbus_connection_unregister_handler): new functions
2749 * dbus/dbus-message.c (dbus_message_get_name): new
2751 * dbus/dbus-list.c: fix docs typo
2753 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2754 an object representing a handler for messages.
2756 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2759 * glib/dbus-gthread.c: (dbus_gthread_init):
2760 Don't use the gdbus prefix for public functions.
2762 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2766 Add GLib checks and fixup .pc files
2770 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2771 (gdbus_connection_check), (gdbus_connection_dispatch),
2772 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2773 (dbus_connection_gsource_new):
2774 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2775 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2776 * glib/test-dbus-glib.c: (message_handler), (main):
2779 2002-12-15 Harri Porten <porten@kde.org>
2781 * autogen.sh: check for libtoolize before attempting to use it
2783 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2786 * .cvsignore: ignore more stamp files
2788 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2790 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2791 without make install.
2793 2002-12-15 Havoc Pennington <hp@pobox.com>
2795 * dbus/dbus-threads.c: add thread stubs that a higher library
2796 layer can fill in. e.g. the GLib wrapper might fill them in with
2797 GThread stuff. We still need to use this thread API to
2798 thread-safe-ize the library.
2800 2002-12-12 Havoc Pennington <hp@pobox.com>
2802 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2803 below new interfaces and include fewer system headers.
2805 * dbus/dbus-sysdeps.c (_dbus_read): new function
2806 (_dbus_write): new function
2807 (_dbus_write_two): new function
2808 (_dbus_connect_unix_socket): new function
2809 (_dbus_listen_unix_socket): new function
2811 * dbus/dbus-message-internal.h: change interfaces to use
2814 2002-12-11 Havoc Pennington <hp@pobox.com>
2816 * dbus/dbus-types.h: add dbus_unichar
2818 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2820 * dbus/dbus-connection.c (dbus_connection_send_message): return
2823 * dbus/dbus-transport.c: include dbus-watch.h
2825 * dbus/dbus-connection.c: include dbus-message-internal.h
2827 * HACKING: add file with coding guidelines stuff.
2829 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2830 handling here, for security purposes (as in vsftpd). Not actually
2831 using this class yet.
2833 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2834 system/libc usage here, as in vsftpd, for ease of auditing (and
2835 should also simplify portability). Haven't actually moved all the
2836 system/libc usage into here yet.
2838 2002-11-25 Havoc Pennington <hp@pobox.com>
2840 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2841 always print the first verbose message.
2843 2002-11-24 Havoc Pennington <hp@pobox.com>
2845 * test/echo-client.c, test/echo-server.c: cheesy test
2848 * configure.in (AC_CHECK_FUNCS): check for writev
2850 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2853 * dbus/dbus-list.c (_dbus_list_foreach): new function
2855 * dbus/dbus-internals.c (_dbus_verbose): new function
2857 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2858 representing a server that listens for connections.
2860 * dbus/.cvsignore: create
2862 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2863 public API for reporting errors
2865 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2866 public object representing a connection that
2867 sends/receives messages. (Same object used for
2868 both client and server.)
2870 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2871 Basic abstraction for different kinds of stream
2872 that we might read/write messages from.
2874 2002-11-23 Havoc Pennington <hp@pobox.com>
2876 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2879 * dbus/dbus-test.c (main): add list test, and include
2880 dbus-test.h as intended
2882 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2883 (_dbus_hash_table_remove_int): return value indicates
2884 whether the entry existed to remove
2886 * dbus/dbus-list.c: add linked list utility class,
2889 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2892 2002-11-23 Havoc Pennington <hp@pobox.com>
2894 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2895 DBUS_END_DECLS to nothing, that should fix this once and for all
2897 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2899 * dbus/dbus-message.c, dbus/dbus-hash.c:
2900 add some missing @brief
2902 2002-11-23 Havoc Pennington <hp@pobox.com>
2904 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2905 to avoid confusing Doxygen
2907 * dbus/dbus-hash.c: @} not }@
2909 * dbus/dbus-message.c (struct DBusMessage): split out
2912 2002-11-23 Havoc Pennington <hp@pobox.com>
2914 * configure.in: pile on more warning flags if using gcc
2916 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2917 to document static functions
2919 * configure.in: add summary to end of configure so it
2920 looks nice and attractive
2922 * dbus/dbus-hash.c: finish implementation and write unit
2925 * configure.in: add --enable-tests to enable unit tests
2927 * dbus/dbus-test.c: test program to run unit tests
2928 for all files in dbus/*, initially runs a test for
2931 * dbus/dbus-internals.h: file to hold some internal utility stuff
2933 2002-11-22 Havoc Pennington <hp@redhat.com>
2935 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2936 "ported" away from Tcl
2938 * dbus/dbus-types.h: header for types such as dbus_bool_t
2940 2002-11-22 Havoc Pennington <hp@redhat.com>
2942 * dbus/dbus.h: fixups for doc warnings
2944 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2946 (QUIET): make it quiet so we can see warnings
2948 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2950 2002-11-22 Havoc Pennington <hp@redhat.com>
2952 * Makefile.am: include "Doxyfile" target in all-local
2954 * configure.in: generate the Doxyfile
2956 * Doxyfile.in: move Doxyfile here, so we can use
2957 configure to generate a Doxyfile with the right
2960 2002-11-22 Havoc Pennington <hp@redhat.com>
2962 * dbus/dbus-message.c: move inline docs into .c file
2964 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2965 so all docs are under doc/
2966 (MAN_EXTENSION): generate man pages. Use extension
2967 ".3dbus" which matches ".3qt" on my system,
2968 I guess this is OK, I don't know really.
2969 (FILE_PATTERNS): look for .c files not .h, makes sense
2972 2002-11-22 Havoc Pennington <hp@pobox.com>
2974 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2975 because any app can be a server, and any app can be a client,
2976 the bus is a special kind of server.
2978 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2980 * Doxyfile : adding. Still needs Makefile rules to be generated
2981 automatically (just run "doxygen" in the toplevel dir for now to
2984 * dbus/dbus-message.h : Adding sample docs (javadoc since
2985 resembles gtk-doc a little more)
2987 * dbus/dbus.h : Adding sample docs
2989 2002-11-21 Havoc Pennington <hp@redhat.com>
2991 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2992 so we can allow ourselves to include files directly,
2993 instead of having to use dbus.h
2995 * dbus/dbus.h: fill in
2997 * dbus/dbus-message.h: sketch out a sample header file.
2998 Include griping if you include it directly instead of
3001 * dbus/dbus-macros.h: new file with macros for extern "C",
3002 TRUE/FALSE, NULL, etc.
3004 * doc/file-boilerplate.c: put include guards in here
3006 2002-11-21 Havoc Pennington <hp@redhat.com>
3008 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
3010 * COPYING: include the GPL as well, and license code
3011 under both AFL and GPL.
3013 2002-11-21 Havoc Pennington <hp@redhat.com>
3015 * acconfig.h: get rid of this
3017 * autogen.sh (run_configure): add --no-configure option
3019 * configure.in: remove AC_ARG_PROGRAM to make
3020 autoconf complain less. add AC_PREREQ.
3021 add AC_DEFINE third arg.
3023 2002-11-21 Anders Carlsson <andersca@codefactory.se>
3026 Fix references so we can distcheck.
3028 2002-11-21 Havoc Pennington <hp@redhat.com>
3030 * Initial module creation