1 2003-03-16 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4 this. always run the test suite before commit...
6 * bus/*: adapt to DBusConnection API changes
8 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9 requires renaming stuff to avoid dbus_connection_dispatch name
12 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
15 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
16 separate from _dbus_message_loader_return_buffer()
18 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
19 this, because it's now always broken to use; the number of
20 messages in queue vs. the number still buffered by the message
21 loader is undefined/meaningless. Should use
22 dbus_connection_get_dispatch_state().
23 (dbus_connection_dispatch): rename from
24 dbus_connection_dispatch_message
26 2003-03-16 Havoc Pennington <hp@pobox.com>
28 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
31 2003-03-16 Anders Carlsson <andersca@codefactory.se>
33 * dbus/dbus-connection.c:
34 (dbus_connection_send_with_reply_and_block):
35 Decrease connection->n_incoming when removing an entry
37 * dbus/dbus-dict.c: (dbus_dict_entry_free),
38 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
39 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
40 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
41 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
42 (dbus_dict_get_byte_array):
43 Handle NULL arrays and strings. Also add support for byte arrays.
45 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
46 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
47 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
48 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
49 (_dbus_demarshal_dict), (demarshal_and_validate_len),
50 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
51 * dbus/dbus-marshal.h:
52 Add support for marshalling and demarshalling empty arrays and strings.
54 * dbus/dbus-message.c: (dbus_message_append_args_valist),
55 (dbus_message_append_string_array),
56 (dbus_message_iter_get_boolean),
57 (dbus_message_iter_get_boolean_array),
58 (dbus_message_iter_get_int32_array),
59 (dbus_message_iter_get_uint32_array),
60 (dbus_message_iter_get_double_array),
61 (dbus_message_iter_get_byte_array),
62 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
63 (check_message_handling):
64 Add support for getting empty arrays and dicts.
66 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
67 Don't do any validation at all for now, that's better than just checking
70 * test/data/valid-messages/emptiness.message:
71 New test message with lots of empty arrays.
73 2003-03-16 Havoc Pennington <hp@pobox.com>
75 * dbus/dbus-connection.c
76 (_dbus_connection_queue_received_message_link): new function that
79 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
80 new function pops a message together with a list link
83 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
84 message queuing functions to avoid needing to alloc memory
86 2003-03-16 Havoc Pennington <hp@pobox.com>
88 Oops - test code was only testing failure of around 30 of the
89 mallocs in the test path, but it turns out there are 500+
90 mallocs. I believe this was due to misguided linking setup such
91 that there was one copy of dbus_malloc etc. in the daemon and one
92 in the shared lib, and only daemon mallocs were tested. In any
93 case, the test case now tests all 500+ mallocs, and doesn't pass
94 yet, though there are lots of fixes in this patch.
96 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
97 this so that it doesn't need to allocate memory, since it
98 has no way of indicating failure due to OOM (and would be
101 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
103 * bus/Makefile.am: rearrange to create two self-contained
104 libraries, to avoid having libraries with overlapping symbols.
105 that was resulting in weirdness, e.g. I'm pretty sure there
106 were two copies of global static variables.
108 * dbus/dbus-internals.c: move the malloc debug stuff to
111 * dbus/dbus-list.c (free_link): free list mempool if it becomes
114 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
116 * dbus/dbus-address.c (dbus_parse_address): free list nodes
119 * bus/dispatch.c (bus_dispatch_add_connection): free
120 message_handler_slot when no longer using it, so
121 memory leak checkers are happy for the test suite.
123 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
125 * bus/bus.c (new_connection_callback): disconnect in here if
126 bus_connections_setup_connection fails.
128 * bus/connection.c (bus_connections_unref): fix to free the
130 (bus_connections_setup_connection): if this fails, don't
131 disconnect the connection, just be sure there are no side
134 * dbus/dbus-string.c (undo_alignment): unbreak this
136 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
138 (_dbus_auth_new): fix the order in which we free strings
141 * bus/connection.c (bus_connection_disconnected): fix to
142 not send ServiceDeleted multiple times in case of memory
145 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
146 get the base service name
147 (dbus_bus_register_client): don't return base service name,
148 instead store it on the DBusConnection and have an accessor
150 (dbus_bus_register_client): rename dbus_bus_register()
152 * bus/dispatch.c (check_hello_message): verify that other
153 connections on the bus also got the correct results, not
154 just the one sending hello
156 2003-03-15 Havoc Pennington <hp@pobox.com>
158 Make it pass the Hello handling test including all OOM codepaths.
159 Now to do other messages...
161 * bus/services.c (bus_service_remove_owner): fix crash when
162 removing owner from an empty list of owners
163 (bus_registry_ensure): don't leave service in the list of
164 a connection's owned services if we fail to put the service
167 * bus/connection.c (bus_connection_preallocate_oom_error): set
168 error flag on the OOM error.
170 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
171 handle _dbus_transport_set_connection failure
173 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
174 to create watches up front and simply enable/disable them as
176 (unix_connection_set): this can now fail on OOM
178 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
179 of enabling/disabling a watch or timeout.
181 * bus/loop.c (bus_loop_iterate): don't touch disabled
184 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
186 2003-03-15 Havoc Pennington <hp@pobox.com>
188 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
189 write useful test code, after all that futzing around ;-)
191 Test does not yet pass because we can't handle OOM in
192 _dbus_transport_messages_pending (basically,
193 dbus_connection_preallocate_send() does not prealloc the write
194 watch). To fix this, I think we need to add new stuff to
195 set_watch_functions, namely a SetEnabled function so we can alloc
196 the watch earlier, then enable it later.
198 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
199 dbus-memory.c to the convenience lib
201 * bus/test.c: rename some static functions to keep them clearly
202 distinct from stuff in connection.c. Handle client disconnection.
204 2003-03-14 Havoc Pennington <hp@pobox.com>
206 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
207 transport, tests more of the real codepath. Set up clients
208 with bus_setup_debug_client.
210 * bus/test.c (bus_setup_debug_client): function to set up debug
211 "clients" on the main loop
213 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
216 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
219 * dbus/dbus-server-debug.c: support a debug server based on pipes
221 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
222 (_dbus_close): new function
224 * configure.in: check for socketpair
226 2003-03-14 Havoc Pennington <hp@redhat.com>
228 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
231 * dbus/dbus-transport-debug.c: rework this a good bit to be
232 less complicated. hopefully still works.
234 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
237 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
240 * dbus/dbus-message.c (dbus_message_copy): rename from
241 dbus_message_new_from_message, fix it up to copy
242 all the message fields, add test case
244 * bus/dispatch.c (bus_dispatch_test): add some more test code,
245 not quite passing yet
247 2003-03-14 Havoc Pennington <hp@pobox.com>
249 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
250 until no work remains" in test code. (the large diff here
251 is just code movement, no actual changes)
253 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
254 1, no point waiting around for test code.
255 (_dbus_server_debug_accept_transport): unref the timeout
256 after adding it (right?)
258 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
260 2003-03-13 Havoc Pennington <hp@redhat.com>
262 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
265 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
268 * dbus/dbus-connection.h: Make AddWatchFunction and
269 AddTimeoutFunction return a bool so they can fail on out-of-memory
271 * bus/bus.c (bus_context_new): set up timeout handlers
273 * bus/connection.c (bus_connections_setup_connection): set up
276 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
279 * bus/bus.c (bus_context_new): adapt to changes
281 * bus/connection.c: adapt to changes
283 * test/watch.c: adapt to DBusWatch changes
285 * bus/dispatch.c (bus_dispatch_test): started adding this but
288 2003-03-14 Anders Carlsson <andersca@codefactory.se>
290 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
292 2003-03-13 Havoc Pennington <hp@pobox.com>
294 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
295 set up a test framework as for the library
297 2003-03-12 Havoc Pennington <hp@pobox.com>
299 Throughout: purge global variables, introduce BusActivation,
300 BusConnections, BusRegistry, etc. objects instead.
302 * bus/bus.h, bus/bus.c: introduce BusContext as a global
305 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
306 going to redo this a bit differently I think
308 2003-03-12 Havoc Pennington <hp@redhat.com>
310 Mega-patch that gets the message bus daemon initially handling
311 out-of-memory. Work still needed. Also lots of random
312 moving stuff to DBusError instead of ResultCode.
314 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
316 * dbus/dbus-connection.c
317 (dbus_connection_send_with_reply_and_block): use DBusError
319 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
322 * dbus/dbus-connection.c (dbus_connection_send): drop the result
323 code here, as the only failure possible is OOM.
325 * bus/connection.c (bus_connection_disconnect):
326 rename bus_connection_disconnected as it's a notification only
328 * bus/driver.c (bus_driver_handle_acquire_service): don't free
329 "name" on get_args failure, should be done by get_args;
330 don't disconnect client for bad args, just return an error.
331 (bus_driver_handle_service_exists): ditto
333 * bus/services.c (bus_services_list): NULL-terminate returned array
335 * bus/driver.c (bus_driver_send_service_lost)
336 (bus_driver_send_service_acquired): send messages from driver to a
337 specific client to the client's unique name, not to the broadcast
340 * dbus/dbus-message.c (decode_header_data): reject messages that
341 contain no name field
342 (_dbus_message_get_client_serial): rename to
343 dbus_message_get_serial and make public
344 (_dbus_message_set_serial): rename from set_client_serial
345 (_dbus_message_set_reply_serial): make public
346 (_dbus_message_get_reply_serial): make public
348 * bus/connection.c (bus_connection_foreach): allow stopping
349 iteration by returning FALSE from foreach function.
351 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
352 (dbus_connection_free_preallocated_send)
353 (dbus_connection_preallocate_send): new API for sending a message
354 without possibility of malloc failure.
355 (dbus_connection_send_message): rename to just
356 dbus_connection_send (and same for whole function family)
358 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
360 * dbus/dbus-sysdeps.c (_dbus_exit): new function
362 * bus/activation.c: handle/return errors
364 * dbus/dbus-errors.h: add more DBUS_ERROR #define
366 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
367 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
368 (_dbus_result_from_errno): move to this file
370 2003-03-10 Anders Carlsson <andersca@codefactory.se>
372 * dbus/dbus-marshal.c:
373 (_dbus_marshal_set_string):
374 Take a length argument so we can marshal the correct string
377 (_dbus_marshal_dict), (_dbus_demarshal_dict),
378 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
379 (_dbus_marshal_test):
380 * dbus/dbus-marshal.h:
381 Add support for marshalling and demarshalling dicts.
383 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
384 Add support for TYPE DICT.
386 * dbus/dbus-message.c: (set_string_field):
387 Adjust header padding.
389 (dbus_message_append_args_valist), (dbus_message_append_dict),
390 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
391 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
392 (check_message_handling), (check_have_valid_message):
393 * dbus/dbus-message.h:
394 Add functions for setting and getting dicts.
396 * dbus/dbus-protocol.h:
402 * doc/dbus-specification.sgml:
403 Add information about how dicts are marshalled.
405 * test/data/invalid-messages/dict-with-nil-value.message:
406 * test/data/invalid-messages/too-short-dict.message:
407 * test/data/valid-messages/dict-simple.message:
408 * test/data/valid-messages/dict.message:
409 Add sample messages containing dicts.
411 2003-03-08 Anders Carlsson <andersca@codefactory.se>
413 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
415 2003-03-07 Anders Carlsson <andersca@codefactory.se>
418 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
419 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
420 (dbus_dict_set_int32), (dbus_dict_set_uint32),
421 (dbus_dict_set_double), (dbus_dict_set_string),
422 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
423 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
424 (dbus_dict_set_string_array), (_dbus_dict_test):
426 Fix according to comments from Havoc.
428 2003-03-06 Michael Meeks <michael@server.home>
430 * configure.in: if we don't have kde-config, disable have_qt.
432 2003-03-07 Anders Carlsson <andersca@codefactory.se>
437 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
438 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
439 (dbus_dict_remove), (dbus_dict_get_value_type),
440 (dbus_dict_get_keys), (dbus_dict_put_boolean),
441 (dbus_dict_put_int32), (dbus_dict_put_uint32),
442 (dbus_dict_put_double), (dbus_dict_put_string),
443 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
444 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
445 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
446 (dbus_dict_get_int32), (dbus_dict_get_uint32),
447 (dbus_dict_get_double), (dbus_dict_get_string),
448 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
449 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
450 (dbus_dict_get_string_array), (_dbus_dict_test):
452 Add DBusDict implementation
454 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
458 2003-03-04 Havoc Pennington <hp@pobox.com>
460 * test/data/auth/*: adapt to changes
462 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
463 USERID_BASE64 and change USERNAME_BASE64 to put in username not
466 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
467 more stuff from being in a context name, to make the protocol
470 * dbus/dbus-errors.c (dbus_error_has_name): new function
471 (dbus_error_is_set): new function
473 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
474 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
476 * dbus/dbus-connection.c (dbus_connection_flush): also read
477 messages during a flush operation
479 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
481 2003-03-05 Anders Carlsson <andersca@codefactory.se>
483 * configure.in: Check for gethostbyname on Solaris.
485 * dbus/dbus-transport.c: (_dbus_transport_open):
486 Remove duplicate "tcp" entry.
488 * doc/dbus-specification.sgml:
491 2003-03-05 Anders Carlsson <andersca@codefactory.se>
493 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
494 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
495 (_dbus_keyring_test):
496 * dbus/dbus-md5.c: (_dbus_md5_compute):
497 * dbus/dbus-sha.c: (_dbus_sha_compute):
500 2003-03-05 Anders Carlsson <andersca@codefactory.se>
502 * README: Add some things.
504 2003-03-04 Anders Carlsson <andersca@codefactory.se>
506 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
507 after case DBUS_TYPE_BOOELAN.
509 2003-03-02 Havoc Pennington <hp@pobox.com>
511 * test/break-loader.c (randomly_set_extreme_ints): add test that
512 sets really huge and small integers
514 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
515 that length of boolean array fits in the string, and that
516 string has room for boolean value in single-bool case.
518 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
519 optional value to "ALIGN" command which is what to fill the
522 * test/data/valid-messages/no-padding.message: add regression
523 test for the message padding problem
525 2003-03-02 Havoc Pennington <hp@pobox.com>
527 * dbus/dbus-message.c (decode_header_data): fix to always init
528 message_padding, from Benjamin Dauvergne
530 2003-03-02 Havoc Pennington <hp@pobox.com>
536 2003-03-01 Joe Shaw <joe@assbarn.com>
538 * configure.in: Check for "struct cmsgcred" and try to access its
539 members for BSD-like unices.
541 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
542 _dbus_read_credentials_unix_socket().
543 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
544 read() for reading the credential byte off the unix socket. Use
545 struct cmsgcred on systems that support it.
547 2003-02-27 Alexander Larsson <alexl@redhat.com>
551 Make gthreads-2.0 dependency optional. Don't build thread test if
554 2003-02-27 Havoc Pennington <hp@pobox.com>
556 * dbus/dbus-connection.c
557 (dbus_connection_send_message_with_reply_and_block): fix doh!
558 doh! doh! bug that resulted in never removing a reply from the
559 queue, no wonder we called get_reply_serial so much ;-)
561 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
562 and client serial instead of demarshaling them every time
564 2003-02-27 Havoc Pennington <hp@pobox.com>
566 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
567 more inlined, using dbus-string-private.h, speeds things up
570 * dbus/dbus-string.c (_dbus_string_free): apply align offset
571 when freeing the string
572 (_dbus_string_steal_data): fix for align offset
573 (undo_alignment): new function
575 2003-02-26 Havoc Pennington <hp@redhat.com>
577 All kinds of audit fixes from Owen, plus initial attempt to
578 handle unaligned memory returned from malloc.
580 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
581 leave room for align_offset and nul byte
582 (fixup_alignment): function to track an align_offset and
583 ensure real->str is aligned
584 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
585 to allow a nul byte plus align offset
586 (_dbus_string_lock): fix overflow issue
587 (_dbus_string_init_const_len): add assertions on sanity of len,
588 assign allocated to be ALLOCATION_PADDING larger than len
589 (set_length): fixup the overflow handling
590 (_dbus_string_get_data_len): fix overflow in assertion
591 (open_gap): detect overflow in size of gap to be opened
592 (_dbus_string_lengthen): add overflow check
593 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
594 (_dbus_string_append): add overflow check
595 (_dbus_string_append_unichar): overflow
596 (_dbus_string_delete): fix overflow in assertion
597 (_dbus_string_copy_len): overflow in assertion
598 (_dbus_string_replace_len): overflows in assertions
599 (_dbus_string_find): change to implement in terms of
601 (_dbus_string_find_to): assorted fixage
602 (_dbus_string_equal_c_str): assert c_str != NULL,
603 fix logic so the function works
604 (_dbus_string_ends_with_c_str): fix overflow thingy
605 (_dbus_string_base64_encode): overflow fix
606 (_dbus_string_validate_ascii): overflow
607 (_dbus_string_validate_nul): overflow
609 2003-02-26 Havoc Pennington <hp@redhat.com>
611 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
613 2003-02-26 Alexander Larsson <alexl@redhat.com>
616 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
618 * dbus/dbus-connection.c:
619 * dbus/dbus-connection.h:
620 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
621 Add dbus_connection_set_wakeup_main_function and use it when queueing
622 incoming and outgoing messages.
625 * dbus/dbus-dataslot.c:
626 Threadsafe usage of DBusDataSlotAllocator
628 * dbus/dbus-message.c: (dbus_message_get_args_iter):
631 * dbus/dbus-server-unix.c:
635 Implement the new wakeup functions for glib.
638 * glib/test-thread-client.c:
639 * glib/test-thread-server.c:
640 * glib/test-thread.h:
641 Initial cut at some thread test code. Not really done yet.
643 2003-02-26 Havoc Pennington <hp@pobox.com>
645 * dbus/dbus-connection.c
646 (dbus_connection_send_message_with_reply_and_block): fix crash
647 where we ref'd the outgoing message instead of the returned reply
649 * dbus/dbus-transport-unix.c (do_authentication): check read watch
650 at the end of this function, so if we didn't need to read for
651 authentication, we reinstall it for receiving messages
653 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
654 a NULL sender for peer-to-peer case
656 * dbus/dbus-transport-unix.c (check_read_watch): handle
657 !authenticated case correctly
659 * glib/dbus-gmain.c: add support for DBusServer
661 * dbus/dbus-server.c: add data slot support
663 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
664 return values and handle errors
666 * dbus/dbus-dataslot.c: factor out the data slot stuff from
669 * Doxyfile.in (INPUT): add glib subdir
671 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
672 setup_with_g_main instead of hookup_with_g_main; write docs
674 2003-02-24 Anders Carlsson <andersca@codefactory.se>
676 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
677 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
678 * dbus/dbus-message.c: (dbus_message_append_boolean),
679 (dbus_message_append_boolean_array),
680 (dbus_message_get_args_valist), (_dbus_message_test):
681 * dbus/dbus-message.h:
682 * doc/dbus-specification.sgml:
683 Various fixes as pointed out by Havoc.
685 * test/data/invalid-messages/bad-boolean-array.message:
686 * test/data/invalid-messages/bad-boolean.message:
687 Add invalid boolean value test cases.
689 2003-02-24 Anders Carlsson <andersca@codefactory.se>
691 * dbus/dbus-internals.c: (_dbus_type_to_string):
692 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
693 (_dbus_marshal_validate_arg):
694 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
695 * dbus/dbus-message.c: (dbus_message_append_args_valist),
696 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
697 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
698 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
699 (dbus_message_iter_get_double),
700 (dbus_message_iter_get_boolean_array), (message_iter_test):
701 * dbus/dbus-message.h:
702 * dbus/dbus-protocol.h:
703 * doc/dbus-specification.sgml:
704 * test/data/valid-messages/lots-of-arguments.message:
705 Add support for boolean and boolean array types.
707 2003-02-23 Havoc Pennington <hp@pobox.com>
709 * dbus/dbus-keyring.c: finish most of this implementation and
712 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
713 these barf if the error isn't cleared to NULL
715 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
716 (_dbus_create_directory): new function
718 * dbus/dbus-errors.c (dbus_set_error): fix warning
720 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
721 (_dbus_string_hex_decode): new function
722 (test_hex_roundtrip): test code
724 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
726 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
728 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
729 the save-to-temp/rename trick to atomically write the new file
730 (_dbus_string_parse_uint): new function
732 2003-02-22 Havoc Pennington <hp@pobox.com>
734 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
736 2003-02-22 Havoc Pennington <hp@pobox.com>
738 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
739 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
741 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
743 * dbus/test/data/sha-1: add US government test suite for SHA-1
745 2003-02-21 Anders Carlsson <andersca@codefactory.se>
747 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
748 Make string arrays NULL-terminated.
750 * dbus/dbus-memory.c: (dbus_free_string_array):
751 * dbus/dbus-memory.h:
752 New function for freeing NULL-terminated string arrays.
754 * dbus/dbus-message-builder.c: (append_quoted_string),
755 (_dbus_message_data_load):
756 Add support for array types.
758 * dbus/dbus-message.c: (check_message_handling):
759 Add more types as test cases.
761 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
762 (_dbus_string_parse_double):
763 Add the start offset to the end offset.
765 * test/data/valid-messages/lots-of-arguments.message:
766 New test message with lots of arguments.
768 2003-02-21 Anders Carlsson <andersca@codefactory.se>
770 * dbus/dbus-message.c: (dbus_message_append_nil),
771 (dbus_message_append_int32), (dbus_message_append_uint32),
772 (dbus_message_append_double), (dbus_message_append_string),
773 (dbus_message_append_int32_array),
774 (dbus_message_append_uint32_array),
775 (dbus_message_append_double_array),
776 (dbus_message_append_byte_array),
777 (dbus_message_append_string_array):
778 Fix all out-of-memory handling in these functions.
780 2003-02-21 Anders Carlsson <andersca@codefactory.se>
782 * dbus/dbus-message.c: (dbus_message_append_nil):
785 2003-02-21 Anders Carlsson <andersca@codefactory.se>
787 * dbus/dbus-message.c: (dbus_message_append_args_valist),
788 (dbus_message_append_nil), (dbus_message_append_int32_array),
789 (dbus_message_append_uint32_array),
790 (dbus_message_append_double_array),
791 (dbus_message_append_byte_array),
792 (dbus_message_append_string_array), (dbus_message_get_args_valist),
793 (dbus_message_iter_get_int32_array),
794 (dbus_message_iter_get_uint32_array),
795 (dbus_message_iter_get_double_array),
796 (dbus_message_iter_get_byte_array),
797 (dbus_message_iter_get_string_array):
799 * dbus/dbus-message.h:
800 Add functions for appending and getting arrays.
802 2003-02-21 Anders Carlsson <andersca@codefactory.se>
804 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
805 element size at least 8 bytes, fixes mempool tests on
808 2003-02-20 Alexander Larsson <alexl@redhat.com>
810 * dbus/dbus-transport-unix.c (unix_do_iteration):
811 Unlock the connection mutex during a blocking select call.
812 Add todo about how we need a way to wake up the select.
814 * dbus/dbus-connection-internal.h:
815 * dbus/dbus-connection.c:
816 Add _dbus_connection_lock and _dbus_connection_unlock.
818 2003-02-19 Havoc Pennington <hp@pobox.com>
820 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
821 Doxyfile.in, not Doxyfile
823 * dbus/dbus-keyring.c: do some hacking on this
825 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
827 * dbus/dbus-errors.c (dbus_set_error_const): do not call
829 (dbus_set_error): remove dbus_error_init, check for message ==
830 NULL *before* we sprintf into it, and add @todo about including
831 system headers in this file
833 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
835 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
837 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
838 get various bits of user information based on either username
840 (_dbus_homedir_from_username): new function
842 2003-02-19 Anders Carlsson <andersca@codefactory.se>
845 Add check for nonposix getpwnam_r
847 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
848 Align the pool element size to a sizeof (void *) boundary.
850 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
851 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
852 General Solaris fixes.
854 * test/data/valid-messages/simplest-manual.message:
855 Explicitly state that we want little-endian packing.
857 2003-02-19 Mikael Hallendal <micke@codefactory.se>
859 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
861 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
862 Added to create a transport connecting using a tcp/ip socket.
864 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
865 to a tcp socket at given host and port.
866 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
869 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
871 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
872 Added to create a server listening on a TCP/IP socket.
874 2003-02-19 Havoc Pennington <hp@pobox.com>
876 Throughout: mop up all the Doxygen warnings and undocumented
879 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
882 * dbus/dbus-threads.c: move global mutex initializers to
883 dbus-internals.h, multiple prototypes was confusing doxygen
884 besides being kind of ugly
886 * Doxyfile (PREDEFINED): have Doxygen define
887 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
888 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
889 (do not abuse the feature! it's for stuff like the autogenerated
890 macros in dbus-md5.c, not just for things you don't feel like
893 2003-02-18 Havoc Pennington <hp@pobox.com>
895 * dbus/dbus-string.c (_dbus_string_zero): new function
897 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
898 wrap it in some dbus-friendly API
900 * dbus/dbus-types.h: add 16-bit types
902 2003-02-18 Joe Shaw <joe@assbarn.com>
904 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
905 credentials from our currently running process.
906 (get_word): Fix a buglet where we were copying the entire length
907 instead of relative to our position.
909 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
910 keys on the stack... it's 640k of data.
912 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
913 read the credentials byte off the socket, even if we don't have
915 (_dbus_poll): Implement poll() using select() for systems which
918 * glib/test-dbus-glib.c (main): Print out an error if no
919 parameters are given.
921 * test/data/auth/fallback.auth-script: Added. Tests that a client
922 can fallback to a secondary auth mechanism if the first fails.
924 2003-02-18 Havoc Pennington <hp@pobox.com>
928 2003-02-17 Havoc Pennington <hp@pobox.com>
930 * doc/dbus-specification.sgml: lots of cosmetic
931 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
932 env variable to DBUS_BUS_ADDRESS, s/client/application/,
933 s/server/bus/ (except in authentication section). Add a section
934 "Message Bus Message Routing"
936 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
942 2003-02-17 Anders Carlsson <andersca@codefactory.se>
944 * doc/dbus-specification.sgml:
945 Specification updates.
947 2003-02-17 Anders Carlsson <andersca@codefactory.se>
949 * bus/activation.c: (bus_activation_init), (child_setup),
950 (bus_activation_activate_service):
952 * bus/main.c: (main):
953 Set DBUS_ADDRESS environment variable.
955 * dbus/dbus-errors.c: (dbus_set_error):
956 Don't use va_copy since that's a C99 feature.
958 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
960 * dbus/dbus-sysdeps.h:
961 Add child_setup_func to _dbus_spawn_async.
963 * doc/dbus-specification.sgml:
964 Update specification.
966 * test/spawn-test.c: (setup_func), (main):
969 2003-02-17 Alexander Larsson <alexl@redhat.com>
971 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
974 2003-02-17 Anders Carlsson <andersca@codefactory.se>
978 * doc/dbus-test-plan.sgml:
979 Add test plan document.
984 2003-02-17 Anders Carlsson <andersca@codefactory.se>
986 * dbus/dbus-message.c: (decode_header_data),
987 (_dbus_message_loader_return_buffer):
988 Set the header padding amount when loading a message.
990 2003-02-16 Anders Carlsson <andersca@codefactory.se>
992 * bus/dispatch.c: (send_one_message):
993 Only send broadcast messages to registered connections.
995 * dbus/dbus-message.c: (dbus_message_name_is):
996 * dbus/dbus-message.h:
997 New convenience function.
999 * dbus/dbus-transport-debug.c: (do_reading):
1000 Only dispatch one message per run.
1003 * test/bus-test.c: (new_connection_callback), (die),
1004 (test_hello_client1_handler), (test_hello_client2_handler),
1005 (test_hello_replies), (main):
1007 * test/bus-test-loop.[ch]:
1010 2003-02-16 Havoc Pennington <hp@pobox.com>
1012 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1013 backward conditional
1015 2003-02-16 Alexander Larsson <alexl@redhat.com>
1017 * dbus/dbus-connection.c:
1018 Implement sent_message_with_reply. (with_reply_and block is still
1020 Made dispatch_message not lose message if OOM.
1022 * dbus/dbus-errors.h:
1023 Add NoReply error (for reply timeouts).
1025 2003-02-16 Alexander Larsson <alexl@redhat.com>
1027 * dbus/dbus-hash.c (_dbus_hash_table_unref):
1028 Actually free keys and values when destroying hashtable.
1030 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1032 * dbus/dbus-auth.c: (client_try_next_mechanism):
1035 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
1036 Return TRUE if there's no thread implementation around.
1038 * glib/dbus-gmain.c: (free_source),
1039 (dbus_connection_hookup_with_g_main):
1040 Make sure to remove the GSource when the connection is finalized.
1042 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1044 * bus/dispatch.c: (bus_dispatch_message_handler):
1045 * dbus/dbus-errors.h:
1046 Return an error if someone tries to send a message to a service
1049 2003-02-16 Anders Carlsson <andersca@codefactory.se>
1051 * bus/activation.c: (load_directory), (bus_activation_init),
1052 (bus_activation_activate_service):
1055 (bus_driver_handle_activate_service), (bus_driver_handle_message):
1056 More work on the activation handling.
1058 * dbus/dbus-errors.h:
1059 Add some error messages
1061 * dbus/dbus-message.c: (dbus_message_new_error_reply):
1062 * dbus/dbus-message.h:
1063 New function that creates an error message.
1065 * dbus/dbus-protocol.h:
1066 Add ACTIVATE_SERVER message.
1068 * dbus/dbus-server-unix.c: (unix_handle_watch),
1069 (_dbus_server_new_for_domain_socket):
1070 Call _dbus_fd_set_close_on_exec.
1072 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
1073 (_dbus_spawn_async), (_dbus_disable_sigpipe),
1074 (_dbus_fd_set_close_on_exec):
1075 * dbus/dbus-sysdeps.h:
1076 Add _dbus_fd_set_close_on exec function. Also add function that checks
1077 that all open fds are set to close-on-exec and warns otherwise.
1079 * dbus/dbus-transport-unix.c:
1080 (_dbus_transport_new_for_domain_socket):
1081 Call _dbus_fd_set_close_on_exec.
1083 2003-02-16 Havoc Pennington <hp@pobox.com>
1085 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
1086 allow people to avoid setting SIGPIPE to SIG_IGN
1087 (_dbus_connection_new_for_transport): disable SIGPIPE unless
1088 we've been asked not to
1090 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1092 * dbus/dbus-list.c: (_dbus_list_append_link),
1093 (_dbus_list_prepend_link):
1094 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
1098 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1101 * bus/activation.c: (bus_activation_entry_free),
1102 (add_desktop_file_entry), (load_directory), (bus_activation_init):
1104 * bus/main.c: (main):
1105 Add simple activation support, doesn't work yet though.
1107 2003-02-15 Zack Rusin <zack@kde.org>
1109 * qt/dbus-qthread.cpp: small casting fix
1111 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1113 * dbus/dbus-errors.c: (dbus_set_error):
1114 * dbus/dbus-errors.h:
1115 Add a few errors and make dbus_set_error void.
1117 * dbus/dbus-sysdeps.c:
1118 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
1119 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
1120 * dbus/dbus-sysdeps.h:
1121 Add _dbus_spawn_async.
1123 * test/spawn-test.c: (main):
1124 Test for _dbus_spawn_async.
1126 2003-02-15 Anders Carlsson <andersca@codefactory.se>
1128 * dbus/dbus-internals.h:
1129 Fix build without tests.
1131 * dbus/dbus-list.c: (alloc_link):
1132 Fix a segfault when a malloc fails.
1134 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
1135 (dbus_malloc0), (dbus_realloc):
1136 Add support for malloc debugging.
1138 2003-02-15 Alexander Larsson <alexl@redhat.com>
1140 * dbus/dbus-threads.c:
1141 * dbus/dbus-threads.h:
1142 Add condvars. Remove static mutext from API.
1143 Implement static mutexes by initializing them from threads_init.
1145 * glib/dbus-gthread.c:
1146 * qt/dbus-qthread.cpp:
1147 Update with the thread api changes.
1152 Turn StaticMutex into normal mutex + init function.
1153 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
1154 _dbus_list_append_link, _dbus_list_prepend_link
1157 * dbus/dbus-sysdeps.c:
1158 * dbus/dbus-sysdeps.h:
1159 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
1160 _dbus_atomic_dec. Only slow fallback implementation at the moment.
1162 * dbus/dbus-protocol.h:
1163 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
1165 * dbus/dbus-message.c:
1166 Make ref/unref atomic.
1169 * dbus/dbus-connection-internal.h:
1170 * dbus/dbus-connection.c:
1171 * dbus/dbus-connection.h:
1173 Change _peek to _borrow,_return & _steal_borrowed.
1174 Change disconnect callback to event.
1175 Make dbus_connection_dispatch_messages reentrant.
1177 * dbus/dbus-transport.c:
1178 Don't ref the connection on calls to the transport
1181 * dbus/dbus-message-handler.c:
1184 * glib/dbus-gmain.c:
1185 Don't use peek_message anymore
1188 * test/debug-thread.c:
1189 * test/debug-thread.h:
1190 Simple thread implementation that asserts() on deadlocks in
1191 single-threaded code.
1194 (main) Call debug_threads_init.
1197 Use disconnect message instead of disconnect callback.
1201 Don't call dbus_connection_set_disconnect_function. Instead export
1202 bus_connection_disconnect.
1205 Call bus_connection_disconnect when we get a disconnected message.
1207 2003-02-15 Havoc Pennington <hp@pobox.com>
1209 * dbus/dbus-message.c (dbus_message_new): fool around with the
1212 2003-02-14 Havoc Pennington <hp@pobox.com>
1214 * dbus/dbus-mempool.c: fail if the debug functions so indicate
1216 * dbus/dbus-memory.c: fail if the debug functions indicate we
1219 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
1220 (_dbus_decrement_fail_alloc_counter): debug functions to
1221 simulate memory allocation failures
1223 2003-02-14 Havoc Pennington <hp@pobox.com>
1225 * dbus/dbus-errors.h (struct DBusError): add a word of padding
1228 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1230 * bus/driver.c: (bus_driver_handle_hello):
1232 * bus/services.c: (bus_service_lookup):
1233 Reorder message sending so we get a more sane order.
1235 * test/bus-test.c: (message_handler):
1238 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1240 * bus/driver.c: (bus_driver_send_service_deleted),
1241 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1242 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1243 (bus_driver_send_welcome_message),
1244 (bus_driver_handle_list_services),
1245 (bus_driver_handle_acquire_service),
1246 (bus_driver_handle_service_exists):
1247 * dbus/dbus-bus.c: (dbus_bus_register_client),
1248 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1249 * dbus/dbus-errors.c: (dbus_result_to_string):
1250 * dbus/dbus-errors.h:
1251 * dbus/dbus-message.c: (dbus_message_append_args),
1252 (dbus_message_append_args_valist), (dbus_message_get_args),
1253 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
1254 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
1255 (dbus_message_iter_get_byte_array),
1256 (dbus_message_iter_get_string_array), (message_iter_test),
1257 (check_message_handling), (_dbus_message_test):
1258 * dbus/dbus-message.h:
1259 * test/bus-test.c: (main):
1260 Change fields to arguments in messages, so that they won't be
1261 confused with header fields.
1263 * glib/test-dbus-glib.c: (main):
1264 Remove append_fields from hello message.
1266 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1268 * dbus/dbus-errors.c:
1269 * dbus/dbus-message.c:
1270 * dbus/dbus-string.c:
1271 Documentation fixes.
1273 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1275 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
1277 Implement support for timeouts in dbus-glib.
1279 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1281 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
1282 * dbus/dbus-message.c: (process_test_subdir):
1283 * test/break-loader.c: (find_breaks_based_on):
1284 Plug some memory leaks.
1286 2003-02-13 Richard Hult <rhult@codefactory.se>
1288 * bus/main.c: Fix build.
1290 * dbus/dbus-errors.h:
1291 * dbus/dbus-errors.c: Fix copyright for Anders.
1293 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1298 * bus/connection.c: (bus_connection_foreach):
1301 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
1302 (unescape_string), (new_section), (parse_section_start),
1303 (parse_key_value), (report_error), (bus_desktop_file_load),
1304 (bus_desktop_file_get_string):
1305 * bus/desktop-file.h:
1306 Use DBusError for error reporting.
1308 * bus/dispatch.c: (send_one_message),
1309 (bus_dispatch_message_handler):
1310 * bus/driver.c: (bus_driver_send_service_deleted),
1311 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1312 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
1313 (bus_driver_send_welcome_message),
1314 (bus_driver_handle_list_services),
1315 (bus_driver_handle_acquire_service),
1316 (bus_driver_handle_service_exists):
1317 * bus/loop.c: (bus_loop_run):
1319 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
1321 * bus/utils.c: (bus_wait_for_memory):
1323 New files with general utility functions.
1325 * dbus/dbus-internals.h:
1326 Remove _DBUS_HANDLE_OOM.
1328 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1330 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
1331 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
1332 * dbus/dbus-errors.h:
1333 Add DBusError structure.
1335 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1337 * test/data/valid-messages/standard-acquire-service.message:
1338 * test/data/valid-messages/standard-hello.message:
1339 * test/data/valid-messages/standard-list-services.message:
1340 * test/data/valid-messages/standard-service-exists.message:
1341 Add some standard messages.
1343 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1345 * bus/driver.c: (bus_driver_send_welcome_message),
1346 (bus_driver_handle_list_services),
1347 (bus_driver_handle_acquire_service),
1348 (bus_driver_handle_service_exists), (bus_driver_handle_message):
1349 Update for API changes in libdbus.
1351 * dbus/dbus-message.c: (dbus_message_new_reply):
1352 * dbus/dbus-message.h:
1353 Remove the name argument. The spec states that replies shouldn't
1356 2003-02-13 Anders Carlsson <andersca@codefactory.se>
1358 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
1359 (report_error), (bus_desktop_file_load), (lookup_section),
1360 (lookup_line), (bus_desktop_file_get_raw),
1361 (bus_desktop_file_get_string):
1362 * bus/desktop-file.h:
1363 Some fixes, and new functions for getting a key value from a section.
1365 2003-02-13 Havoc Pennington <hp@pobox.com>
1367 * test/data/auth/fail-after-n-attempts.auth-script: new test
1369 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
1372 2003-02-13 Havoc Pennington <hp@pobox.com>
1374 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
1375 dbus_credentials_match were backward
1377 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
1378 NO_CREDENTIALS and ROOT_CREDENTIALS
1380 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
1381 into here. Never process more commands after we've reached an
1382 end state; store further data as unused bytes.
1384 * test/data/auth/*: add more auth tests
1386 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
1387 command to match exact string and EXPECT_UNUSED to match unused
1390 * test/Makefile.am (dist-hook): fix to dist all the test stuff
1392 2003-02-12 Havoc Pennington <hp@pobox.com>
1394 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
1395 \r off of popped lines
1397 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
1400 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
1403 2003-02-12 Havoc Pennington <hp@pobox.com>
1405 * dbus/Makefile.am: remove break-loader from the build, since it
1408 * configure.in: add --enable-gcov to turn on coverage profiling
1409 flags and disable optimization
1411 2003-02-10 Havoc Pennington <hp@pobox.com>
1413 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
1414 initial cut at test framework for DBusAuth from laptop.
1415 Doesn't quite work yet but it compiles and I need to get
1416 it off the 266mhz laptop. ;-)
1418 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
1419 fix a memleak in error case
1421 2003-02-12 Anders Carlsson <andersca@codefactory.se>
1424 * bus/desktop-file.c:
1425 * bus/desktop-file.h:
1426 Add a desktop file parser.
1428 2003-02-11 Zack Rusin <zack@kde.org>
1430 * qt/message.[h|cpp]: sample implementation
1431 of the KDE wrapper for DBusMessage
1433 2003-02-09 Zack Rusin <zack@kde.org>
1435 * test/bus-test.c: make_it_compile
1436 * doc/dbus-specification.sgml: minimal semantic fix
1438 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1444 2003-02-06 Anders Carlsson <andersca@codefactory.se>
1447 * dbus/dbus-break-loader.c:
1449 * test/break-loader.c:
1450 Move dbus-break-loader to test/ and rename it to break-loader.
1452 2003-02-02 Havoc Pennington <hp@pobox.com>
1454 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
1455 for code to manage cookies in your home directory
1457 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
1459 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
1460 to authenticate, then disconnect the client.
1462 2003-02-03 Alexander Larsson <alexl@redhat.com>
1464 * dbus/dbus-message.c (dbus_message_append_fields):
1467 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1469 * doc/dbus-specification.sgml:
1470 Update address format section.
1472 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1475 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
1476 (message_handler), (new_connection_callback), (loop_quit),
1480 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1482 * bus/driver.c: (bus_driver_handle_service_exists):
1483 Simplify the code a bit.
1485 * dbus/dbus-bus.c: (dbus_bus_service_exists):
1488 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1491 Add libdbus-daemon.la and link to it.
1493 2003-02-01 James Willcox <jwillcox@gnome.org>
1495 * bus/driver.c: (bus_driver_handle_own_service):
1496 Actually include the service reply code in the message.
1498 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1500 * bus/driver.c: (bus_driver_handle_service_exists):
1501 Don't unref the incoming message.
1503 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1505 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
1507 2003-02-02 Anders Carlsson <andersca@codefactory.se>
1509 * dbus/dbus-server.c: (dbus_server_listen):
1510 * dbus/dbus-transport.c: (_dbus_transport_open):
1511 ifdef out the calls to the debug transport and server.
1513 2003-02-02 Alexander Larsson <alexl@redhat.com>
1515 * dbus/dbus-watch.c (dbus_watch_get_flags):
1516 Add note in the docs that ERROR or HANGUP won't be returned
1517 and are assumed always on.
1519 * glib/dbus-gmain.c (add_watch):
1520 Always add IO_ERR | IO_HUP
1522 * dbus/dbus-message.h:
1523 Add semicolon after dbus_message_iter_get_string_array().
1524 Makes qt code build again
1526 2003-02-01 Anders Carlsson <andersca@codefactory.se>
1528 * bus/driver.c: (create_unique_client_name),
1529 (bus_driver_handle_hello):
1530 Don't take a name, just use a numeric id to identify
1534 * dbus/dbus-bus.c: (dbus_bus_register_client),
1535 (dbus_bus_acquire_service), (dbus_bus_service_exists):
1537 Add new convenience functions for communicating with the bus.
1539 * dbus/dbus-message.h:
1541 * dbus/dbus-protocol.h:
1544 2003-02-01 Alexander Larsson <alexl@redhat.com>
1546 * dbus/dbus-message.c (dbus_message_append_fields):
1547 Add some more doc comments.
1549 2003-02-01 Havoc Pennington <hp@pobox.com>
1551 * dbus/dbus-break-loader.c (randomly_modify_length): change
1552 a 4-byte value in the message as if it were a length
1554 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
1555 execute bit on saved files
1557 2003-02-01 Havoc Pennington <hp@pobox.com>
1559 * dbus/dbus-break-loader.c (main): new program to find messages
1560 that break the loader.
1562 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
1563 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
1565 * dbus/dbus-string.c (_dbus_string_set_byte): new
1567 2003-01-31 Havoc Pennington <hp@pobox.com>
1569 * dbus/dbus-message.c: refactor the test code to be more general,
1570 in preparation for writing a "randomly permute test cases to
1571 try to break the loader" program.
1573 2003-01-31 Havoc Pennington <hp@pobox.com>
1575 * doc/dbus-specification.sgml: work on the specification
1577 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
1578 the protocol version of the message.
1580 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
1581 no longer specifies that.
1582 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1585 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
1586 "break" for DBUS_TYPE_NIL, remove @todo
1588 2003-01-31 Havoc Pennington <hp@pobox.com>
1590 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
1591 just set_is_error/get_is_error as this is a commonly-used
1592 function, and write docs.
1594 2003-01-31 Anders Carlsson <andersca@codefactory.se>
1596 * dbus/dbus-address.c: (dbus_address_entry_free):
1597 Free key and value lists.
1599 * dbus/dbus-internals.c: (_dbus_type_to_string):
1600 Add the types we didn't have.
1602 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
1603 (_dbus_marshal_validate_arg):
1606 * dbus/dbus-message.c: (dbus_message_set_sender):
1607 Remove todo about being able to set sender to NULL.
1609 (dbus_message_set_is_error_reply),
1610 (dbus_message_get_is_error_reply):
1611 * dbus/dbus-message.h:
1614 * dbus/dbus-protocol.h:
1615 Add error reply flag.
1617 * test/data/valid-messages/opposite-endian.message:
1618 Add NIL type to test.
1620 2003-01-31 Havoc Pennington <hp@pobox.com>
1622 * doc/dbus-specification.sgml: fully specify the header. Add
1623 flags and major protocol version, and change header/body len to
1626 * dbus/dbus-message-builder.c (append_saved_length): append length
1629 * dbus/dbus-message.c (dbus_message_create_header): change header
1630 length and body length to unsigned. Add the new fields from the
1632 (_dbus_message_loader_return_buffer): unsigned header/body len
1634 2003-01-30 Havoc Pennington <hp@pobox.com>
1636 * dbus/dbus-auth.c: rework to use only REJECTED, no
1639 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
1640 use REJECTED, suggested by Mark McLoughlin
1642 2003-01-30 Havoc Pennington <hp@pobox.com>
1644 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
1645 a better way to report errors here. e.g. "unix address lacks
1646 path" or something. also "no such file" when the path doesn't
1649 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
1651 (dbus_parse_address): add @todo about documenting address format,
1652 and allowing , and ; to be escaped
1654 2003-01-30 Anders Carlsson <andersca@codefactory.se>
1657 Add dbus-address.[ch]
1659 * dbus/dbus-address.c: (dbus_address_entry_free),
1660 (dbus_address_entries_free), (create_entry),
1661 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
1662 (dbus_parse_address), (_dbus_address_test):
1663 * dbus/dbus-address.h:
1664 New files for dealing with address parsing.
1666 * dbus/dbus-connection.c:
1667 Document timeout functions.
1669 * dbus/dbus-message.c:
1670 Document dbus_message_new_from_message.
1672 * dbus/dbus-server-debug.c:
1675 * dbus/dbus-server.c: (dbus_server_listen):
1676 Parse address and use correct server implementation.
1678 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
1679 * dbus/dbus-string.h:
1680 New function with test.
1682 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
1686 * dbus/dbus-transport-debug.c:
1689 * dbus/dbus-transport.c: (_dbus_transport_open):
1690 Parse address and use correct transport implementation.
1692 2003-01-30 Havoc Pennington <hp@pobox.com>
1694 * dbus/dbus-message.c: use message->byte_order instead of
1695 DBUS_COMPILER_BYTE_ORDER throughout.
1696 (dbus_message_create_header): pad header to align the
1697 start of the body of the message to 8-byte boundary
1699 * dbus/dbus-marshal.h: make all the demarshalers take const
1700 DBusString arguments.
1702 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
1703 validate message args here, so we don't have to do slow validation
1704 later, and so we catch bad messages as they are incoming. Also add
1705 better checks on header_len and body_len. Also fill in
1708 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
1709 implemented properly)
1710 (_dbus_string_validate_nul): new function to check all-nul
1712 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
1713 get_arg_end_pos and remove all validation
1714 (_dbus_marshal_validate_arg): actually do validation here.
1716 2003-01-29 Havoc Pennington <hp@pobox.com>
1718 * dbus/dbus-message.c (check_message_handling): fix assertion
1719 failure on set_client_serial
1721 2003-01-28 Havoc Pennington <hp@pobox.com>
1723 * dbus/dbus-server-debug.c: Add doc section comments
1725 * dbus/dbus-transport-debug.c: add doc section comments
1727 2003-01-28 Havoc Pennington <hp@redhat.com>
1729 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
1730 the reverse order from how I had it
1731 (_dbus_string_base64_encode): reverse encoding order. I was
1732 basically byteswapping everything during encoding.
1734 2003-01-28 Anders Carlsson <andersca@codefactory.se>
1736 * dbus/dbus-connection-internal.h:
1737 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
1738 (_dbus_connection_remove_timeout):
1739 Add functions for adding and removing timeouts.
1741 * dbus/dbus-message.c: (dbus_message_new_from_message):
1742 Add new function that takes a message and creates an exact
1743 copy of it, but with the refcount set to 1.
1744 (check_message_handling):
1747 * dbus/dbus-server-protected.h:
1748 * dbus/dbus-server.c: (_dbus_server_init_base),
1749 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
1750 (dbus_server_set_timeout_functions):
1751 (_dbus_server_remove_timeout):
1752 New functions so that a server can add and remove timeouts.
1754 (dbus_server_listen):
1755 Add commented out call to dbus_server_debug_new.
1757 * dbus/dbus-timeout.c: (_dbus_timeout_new):
1758 Actually set the handler, doh.
1760 * dbus/dbus-transport.c: (_dbus_transport_open):
1761 Add commented out call to dbus_transport_debug_client_new.
1764 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
1766 2003-01-28 Havoc Pennington <hp@pobox.com>
1768 * dbus/dbus-message.c (check_message_handling): function to check
1769 on the loaded message, iterates over it etc.
1771 2003-01-28 Havoc Pennington <hp@pobox.com>
1773 * test/Makefile.am (dist-hook): fix make distdir
1775 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
1777 2003-01-27 Havoc Pennington <hp@pobox.com>
1779 * dbus/dbus-mempool.c (time_for_size): replace printf with
1782 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
1783 empty lines; fix the SAVE_LENGTH stuff to be
1784 START_LENGTH/END_LENGTH so it actually works; couple other
1787 * test/Makefile.am (dist-hook): add dist-hook for .message files
1789 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
1790 can be constant or locked.
1791 (_dbus_string_free): allow freeing a const string as
1794 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
1796 * dbus/dbus-test-main.c (main): take an argument which is the
1797 directory containing test data
1799 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
1800 argument to this and load all the messages in test/data/
1801 checking that they can be loaded or not loaded as appropriate.
1803 2003-01-27 Anders Carlsson <andersca@codefactory.se>
1805 * bus/dispatch.c: (bus_dispatch_message_handler):
1806 Dispatch messages sent to services.
1808 * bus/driver.c: (bus_driver_send_service_deleted),
1809 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1810 (bus_driver_send_service_acquired):
1811 Add helper functions for sending service related messages.
1813 (bus_driver_send_welcome_message):
1814 Send HELLO_REPLY instead of WELCOME.
1816 (bus_driver_handle_list_services):
1817 Send LIST_SERVICES_REPLY instead of SERVICES.
1819 (bus_driver_handle_own_service),
1820 (bus_driver_handle_service_exists):
1821 New message handlers.
1823 (bus_driver_handle_message):
1824 Invoke new message handlers.
1826 (bus_driver_remove_connection):
1827 Don't remove any services here since that's done automatically
1828 by bus_service_remove_owner now.
1831 New function signatures.
1833 * bus/services.c: (bus_service_add_owner):
1834 Send ServiceAcquired message if we're the only primary owner.
1836 (bus_service_remove_owner):
1837 Send ServiceAcquired/ServiceLost messages.
1839 (bus_service_set_prohibit_replacement),
1840 (bus_service_get_prohibit_replacement):
1841 Functions for setting prohibit replacement.
1843 (bus_service_has_owner):
1844 New function that checks if a connection is in the owner queue of
1848 Add new function signatures.
1850 * dbus/dbus-list.c: (_dbus_list_test):
1851 Add tests for _dbus_list_remove_last and traversing the list backwards.
1854 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
1855 go any further, so return NULL then.
1857 * dbus/dbus-protocol.h:
1858 Add new messages, service flags and service replies.
1860 2003-01-26 Havoc Pennington <hp@pobox.com>
1862 * dbus/dbus-message-builder.c: implement, completely untested.
1864 * test/data/*: add data to be used in testing.
1865 ".message" files are our simple loadable text format.
1866 ".message-raw" will be binary dumps of messages.
1868 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
1870 2003-01-26 Havoc Pennington <hp@pobox.com>
1872 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
1874 * dbus/dbus-errors.c (dbus_result_to_string): add
1877 * dbus/dbus-message-builder.c: new file, will contain code to load
1878 up messages from files. Not implemented yet.
1880 2003-01-26 Havoc Pennington <hp@pobox.com>
1882 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
1883 the sender by setting to NULL
1885 2003-01-26 Havoc Pennington <hp@pobox.com>
1887 The unit tests pass, but otherwise untested. If it breaks, the
1888 tests should have been better. ;-)
1890 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
1893 * dbus/dbus-message.c: redo everything so we maintain
1894 message->header as the only copy of the various fields.
1895 This avoids the possibility of out-of-memory in some cases,
1896 for example dbus_message_lock() can't run out of memory anymore,
1897 and avoids extra copying. Figured I may as well go ahead and do
1898 this since it was busted for dbus_message_lock to not return
1899 failure on OOM, and dbus_message_write_header was totally
1900 unchecked for OOM. Also fixed some random other bugs.
1902 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
1903 that strings are nul-terminated. Also, end_pos can be equal
1904 to string length just not greater than, I think.
1905 (_dbus_marshal_set_int32): new function
1906 (_dbus_marshal_set_uint32): new function
1907 (_dbus_marshal_set_string): new function
1909 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
1910 a warning, init timeout_list to NULL
1911 (dbus_connection_send_message): don't use uninitialized variable
1914 * dbus/dbus-string.c (_dbus_string_replace_len): new function
1916 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1918 * bus/driver.c: (bus_driver_handle_hello),
1919 (bus_driver_send_welcome_message):
1922 2003-01-26 Anders Carlsson <andersca@codefactory.se>
1924 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
1925 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1926 (dbus_connection_unref):
1927 * dbus/dbus-marshal.c: (_dbus_marshal_test):
1928 * dbus/dbus-message.c: (dbus_message_unref),
1931 (dbus_message_get_fields):
1932 Remove debugging printout.
1934 (_dbus_message_loader_return_buffer):
1935 Don't store the header string.
1937 (_dbus_message_test):
1940 2003-01-26 Richard Hult <rhult@codefactory.se>
1942 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
1943 the file descriptor list, since it can change under us.
1945 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1947 * glib/dbus-gmain.c: (dbus_connection_prepare),
1948 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
1949 (remove_watch), (dbus_connection_hookup_with_g_main):
1950 Rewrite the glib handling to use its own GSource instead of a
1951 GIOChannel so we can catch messages put in the queue while waiting
1954 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1957 * bus/connection.c: (connection_disconnect_handler),
1958 (connection_watch_callback), (bus_connection_setup):
1959 * bus/dispatch.c: (send_one_message),
1960 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
1961 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
1963 * bus/driver.c: (bus_driver_send_service_deleted),
1964 (bus_driver_send_service_created), (bus_driver_handle_hello),
1965 (bus_driver_send_welcome_message),
1966 (bus_driver_handle_list_services), (bus_driver_remove_connection),
1967 (bus_driver_handle_message):
1969 Refactor code, put the message dispatching in its own file. Use
1970 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
1973 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1975 * dbus/dbus-internals.h:
1976 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
1978 * dbus/dbus-message.c: (dbus_message_get_sender):
1979 * dbus/dbus-message.h:
1980 Implement dbus_message_get_sender.
1982 * dbus/dbus-protocol.h:
1983 Add message and service defines.
1985 2003-01-25 Anders Carlsson <andersca@codefactory.se>
1987 * dbus/dbus-connection.c: (dbus_connection_send_message):
1988 * dbus/dbus-message-internal.h:
1989 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
1990 (dbus_message_write_header):
1991 Remove _dbus_messag_unlock and don't set the client serial on a
1992 message if one already exists.
1994 2003-01-24 Havoc Pennington <hp@pobox.com>
1996 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
1999 * bus/driver.c (bus_driver_handle_list_services): fix a leak
2002 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2004 * dbus/dbus-list.c: (alloc_link), (free_link):
2005 Use a memory pool for the links.
2007 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2009 * bus/connection.c: (bus_connection_foreach):
2011 Add new bus_connection_foreach function.
2013 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
2014 Add function that broadcasts a message to all clients.
2016 (bus_driver_send_service_created), (bus_driver_handle_hello),
2017 (bus_driver_send_welcome_message),
2018 (bus_driver_handle_list_services), (bus_driver_message_handler):
2019 Implement functions that take care of listing services, and notifying
2020 clients when new services are created.
2022 * bus/services.c: (bus_services_list):
2024 Add new function that returns an array of strings with the currently
2025 registered services.
2028 * glib/dbus-gmain.c:
2029 Update copyright year.
2031 2003-01-25 Anders Carlsson <andersca@codefactory.se>
2033 * dbus/dbus-connection.c: (dbus_connection_send_message):
2034 Unlock the message in case it was sent earlier.
2036 (dbus_connection_send_message_with_reply_and_block):
2037 Remove the reply message from the list.
2039 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2040 Set array_len and new_pos correctly.
2042 (_dbus_marshal_test):
2043 Remove debug output.
2045 * dbus/dbus-message-internal.h:
2046 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
2047 New function that returns the reply serial.
2049 (_dbus_message_unlock):
2050 New function that unlocks a message and resets its header.
2052 (dbus_message_append_string_array),
2053 (dbus_message_get_fields_valist),
2054 (dbus_message_iter_get_field_type),
2055 (dbus_message_iter_get_string_array),
2056 (dbus_message_get_fields),
2057 (dbus_message_append_fields_valist):
2058 Handle string arrays.
2060 (dbus_message_set_sender):
2061 Make this function public since the bus daemon needs it.
2063 (decode_header_data):
2064 Set the reply serial to -1 initially.
2066 * dbus/dbus-message.h:
2067 Add dbus_message_set_sender.
2069 2003-01-24 Havoc Pennington <hp@pobox.com>
2071 * doc/dbus-specification.sgml: add some stuff
2073 2003-01-22 Havoc Pennington <hp@pobox.com>
2075 * doc/dbus-specification.sgml: Start to document the protocol.
2077 2003-01-22 Havoc Pennington <hp@pobox.com>
2079 * dbus/dbus-connection.c
2080 (dbus_connection_send_message_with_reply_and_block): add some @todo
2082 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
2084 2003-01-21 Havoc Pennington <hp@pobox.com>
2086 (patch untested because can't compile)
2088 * bus/driver.c (create_unique_client_name): make this function
2089 never recycle client names. Also, caller should initialize
2092 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
2094 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2096 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2097 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2098 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
2099 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
2100 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2101 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2102 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
2103 * dbus/dbus-marshal.h:
2104 * dbus/dbus-protocol.h:
2105 Add support for marshalling and demarshalling integer, double
2108 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2113 * bus/connection.c: (connection_disconnect_handler):
2114 Remove the connection from the bus driver's list.
2116 (connection_watch_callback): Dispatch messages.
2118 (free_connection_data): Free connection name.
2120 (bus_connection_setup): Add connection to the bus driver's list.
2121 (bus_connection_remove_owned_service):
2122 (bus_connection_set_name), (bus_connection_get_name):
2123 Add functions for setting and getting the connection's name.
2126 Add function headers.
2128 * bus/driver.c: (create_unique_client_name),
2129 (bus_driver_handle_hello_message),
2130 (bus_driver_send_welcome_message), (bus_driver_message_handler),
2131 (bus_driver_add_connection), (bus_driver_remove_connection):
2134 * bus/services.c: (bus_service_free):
2136 New file that handles communication and registreation with the bus
2139 2003-01-21 Anders Carlsson <andersca@codefactory.se>
2141 * dbus/dbus-connection.c: (dbus_connection_send_message):
2142 Add a new client_serial parameter.
2144 (dbus_connection_send_message_with_reply):
2145 Remove a @todo since we've implemented the blocking function.
2147 (dbus_connection_send_message_with_reply_and_block):
2148 New function that sends a message and waits for a reply and
2149 then returns the reply.
2151 * dbus/dbus-connection.h:
2154 * dbus/dbus-errors.c: (dbus_result_to_string):
2155 * dbus/dbus-errors.h:
2156 Add new DBUS_RESULT.
2158 * dbus/dbus-message-internal.h:
2159 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
2160 (_dbus_message_set_sender), (dbus_message_write_header),
2161 (dbus_message_new_reply), (decode_header_data),
2162 (_dbus_message_loader_return_buffer), (_dbus_message_test):
2163 * dbus/dbus-message.h:
2164 Add new functions that set the reply serial and sender.
2165 Also marshal and demarshal them correctly and add test.
2167 * dbus/dbus-protocol.h:
2168 Add new DBUS_MESSAGE_TYPE_SENDER.
2171 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
2172 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
2173 (dbus_connection_hookup_with_g_main):
2174 * glib/test-dbus-glib.c: (main):
2175 Rewrite to use GIOChannel and remove the GSource crack.
2177 * test/echo-client.c: (main):
2178 * test/watch.c: (check_messages):
2179 Update for changed APIs
2181 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2183 * dbus/Makefile.am: Add dbus-timeout.[cħ]
2185 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
2186 Create a DBusTimeoutList.
2187 (dbus_connection_set_timeout_functions): Add new function to
2188 set timeout callbacks
2190 * dbus/dbus-connection.h: Add public DBusTimeout API.
2192 * dbus/dbus-message.c: (dbus_message_get_service):
2193 * dbus/dbus-message.h: New function.
2195 * dbus/dbus-server.c: Fix small doc typo.
2197 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
2199 2003-01-19 Anders Carlsson <andersca@codefactory.se>
2201 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
2202 of the string, just as long as specified.
2204 2003-01-19 Havoc Pennington <hp@pobox.com>
2206 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
2209 * dbus/dbus-server.c (dbus_server_set_max_connections)
2210 (dbus_server_get_max_connections, dbus_server_get_n_connections):
2211 keep track of current number of connections, and add API for
2212 setting a max (but haven't implemented enforcing the max yet)
2214 2003-01-18 Havoc Pennington <hp@pobox.com>
2216 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
2217 reading/writing if read_watch != NULL or write_watch != NULL.
2219 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
2220 the message loader code to actually load message->header and
2221 message->body into the newly-created message.
2223 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
2226 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
2227 (dbus_connection_get_max_message_size)
2228 (dbus_connection_set_max_live_messages_size)
2229 (dbus_connection_get_max_live_messages_size): implement some
2230 resource limitation functions
2232 * dbus/dbus-resources.c: new file implementing some of the
2233 resource limits stuff
2235 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
2236 missing docs, add @todo to handle OOM etc.
2238 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
2241 2003-01-18 Havoc Pennington <hp@pobox.com>
2243 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
2244 connection if it hasn't been already.
2246 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
2247 replace with DisconnectFunction.
2249 2003-01-18 Havoc Pennington <hp@pobox.com>
2251 Building --disable-verbose-mode --disable-asserts --disable-tests
2252 cuts the library from 112K to 45K or so
2254 * configure.in: check for varargs macro support,
2255 add --enable-verbose-mode, --enable-asserts.
2257 * dbus/dbus-internals.h (_dbus_assert): support
2259 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
2261 2003-01-18 Havoc Pennington <hp@pobox.com>
2263 * dbus/dbus-test.c: include config.h so that tests actually run
2265 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
2266 so the failure mode when that assumption fails will be plenty
2269 2003-01-18 Havoc Pennington <hp@pobox.com>
2271 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
2273 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
2276 * test/Makefile.am: don't use special variable "TESTS" for echo-*
2277 since we don't want to use those in make check
2279 2003-01-15 Havoc Pennington <hp@redhat.com>
2285 2003-01-15 Havoc Pennington <hp@redhat.com>
2287 * test/Makefile.am: fix so that test source code ends up in the
2288 distribution on make distcheck
2290 2003-01-15 Havoc Pennington <hp@redhat.com>
2296 2003-01-15 Havoc Pennington <hp@redhat.com>
2298 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
2299 fix build when --disable-tests
2301 * Makefile.am (EXTRA_DIST): put HACKING in here
2303 * HACKING: document procedure for making a tarball release.
2305 2003-01-14 Anders Carlsson <andersca@codefactory.se>
2307 * bus/connection.c: (connection_error_handler),
2308 (bus_connection_setup):
2309 * bus/main.c: (main):
2310 Make sure that the DBusConnectionData struct is NULLed
2311 out to prevent a segfault.
2313 * dbus/dbus-errors.c: (dbus_result_to_string):
2314 * dbus/dbus-errors.h:
2315 * dbus/dbus-message.c: (dbus_message_get_fields),
2316 (dbus_message_get_fields_valist), (_dbus_message_test):
2317 * dbus/dbus-message.h:
2318 Make dbus_message_get_fields return a result code so we can
2319 track invalid fields as well as oom.
2321 2003-01-11 Havoc Pennington <hp@pobox.com>
2323 * configure.in: change --enable-test/--enable-ansi action-if-given
2324 to enable_foo=$enableval instead of enable_foo=yes
2326 2003-01-08 Havoc Pennington <hp@pobox.com>
2328 * dbus/dbus-string.c (_dbus_string_align_length): new function
2330 * dbus/dbus-test-main.c: move main() for test app here
2332 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
2333 symbol to run tests, because dbus-test isn't in the main
2336 Code review nitpicks.
2338 * dbus/dbus-message.c (dbus_message_write_header): add newlines
2339 for people with narrow emacs ;-). Assert client_serial was filled
2340 in. Assert message->name != NULL.
2341 (dbus_message_append_fields): have "first_field_type" arg separate
2342 from va list, needed for C++ binding that also uses varargs IIRC
2343 and helps with type safety
2344 (dbus_message_new): add @todo about using DBusString to store
2345 service/name internally
2346 (dbus_message_new): don't leak ->service and ->name on OOM later
2348 (dbus_message_unref): free the service name
2349 (dbus_message_get_fields): same change to varargs
2350 i.e. first_field_type
2351 (_dbus_message_loader_return_buffer): assert that the message data
2352 is aligned (if not it's a bug in our code). Put in verbose griping
2353 about why we set corrupted = TRUE.
2354 (decode_header_data): add FIXME that char* is evil. Was going to
2355 add FIXME about evil locale-specific string.h strncmp, but just
2356 switched to wacky string-as-uint32 optimization. Move check for
2357 "no room for field name" above get_const_data_len() to avoid
2358 assertion failure in get_const_data_len if we have trailing 2
2359 bytes or the like. Check for service and name fields being
2360 provided twice. Don't leak service/name on error. Require field
2361 names to be aligned to 4 bytes.
2363 * dbus/dbus-marshal.c: move byte swap stuff to header
2364 (_dbus_pack_int32): uscore-prefix
2365 (_dbus_unpack_int32): uscore-prefix
2366 (_dbus_unpack_uint32): export
2367 (_dbus_demarshal_string): add @todo complaining about use of
2369 (_dbus_marshal_get_field_end_pos): add @todo about bad error
2370 handling allowing corrupt data to go unchecked
2372 2003-01-08 Havoc Pennington <hp@redhat.com>
2374 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
2375 to the select() as needed for authentication. (should be using
2376 _dbus_poll() not select, but for another day)
2378 * dbus/dbus.h: include dbus/dbus-protocol.h
2380 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2382 * dbus/Makefile.am (dbusinclude_HEADERS): Install
2385 2003-01-08 Anders Carlsson <andersca@codefactory.se>
2387 * dbus/dbus-internals.c: (_dbus_type_to_string):
2388 New function that returns a string describing a type.
2390 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
2391 * dbus/dbus-marshal.h:
2392 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
2393 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
2394 (dbus_message_iter_get_byte_array):
2395 * dbus/dbus-message.h:
2396 Add new convenience functions for appending and getting message fields.
2397 Also add demarshalling routines for byte arrays.
2399 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2401 * dbus/dbus-connection-internal.h:
2402 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
2403 (_dbus_connection_get_next_client_serial),
2404 (dbus_connection_send_message):
2405 * dbus/dbus-internals.h:
2406 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
2407 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
2408 (_dbus_marshal_uint32), (_dbus_demarshal_double),
2409 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
2410 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
2411 (_dbus_verbose_bytes), (_dbus_marshal_test):
2412 * dbus/dbus-marshal.h:
2413 * dbus/dbus-message-internal.h:
2414 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
2415 (dbus_message_write_header), (_dbus_message_lock),
2416 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
2417 (dbus_message_get_name), (dbus_message_append_int32),
2418 (dbus_message_append_uint32), (dbus_message_append_double),
2419 (dbus_message_append_string), (dbus_message_append_byte_array),
2420 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
2421 (dbus_message_iter_unref), (dbus_message_iter_has_next),
2422 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
2423 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
2424 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
2425 (decode_header_data), (_dbus_message_loader_return_buffer),
2426 (message_iter_test), (_dbus_message_test):
2427 * dbus/dbus-message.h:
2428 * dbus/dbus-protocol.h:
2429 * dbus/dbus-test.c: (main):
2431 * glib/test-dbus-glib.c: (message_handler), (main):
2432 * test/echo-client.c: (main):
2433 * test/watch.c: (check_messages):
2434 Make messages sendable and receivable for real.
2436 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2438 * dbus/dbus-marshal.c: (_dbus_marshal_double),
2439 (_dbus_marshal_string), (_dbus_marshal_byte_array):
2440 * dbus/dbus-message.c: (dbus_message_append_int32),
2441 (dbus_message_append_uint32), (dbus_message_append_double),
2442 (dbus_message_append_string), (dbus_message_append_byte_array):
2443 Handle OOM restoration.
2445 2003-01-07 Anders Carlsson <andersca@codefactory.se>
2447 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2448 (_dbus_demarshal_string), (_dbus_marshal_test):
2449 * dbus/dbus-marshal.h:
2450 * dbus/dbus-message.c: (dbus_message_get_name),
2451 Document these functions.
2453 (dbus_message_append_int32), (dbus_message_append_uint32),
2454 (dbus_message_append_double), (dbus_message_append_string),
2455 (dbus_message_append_byte_array):
2456 * dbus/dbus-message.h:
2457 Add functions for adding message fields of different types.
2459 * dbus/dbus-protocol.h:
2460 Add the different types.
2462 2003-01-05 Havoc Pennington <hp@pobox.com>
2464 * bus/connection.c: implement routines for handling connections,
2465 first thing is keeping a list of owned services on each connection
2466 and setting up watches etc.
2468 * bus/services.c: implement a mapping from service names to lists
2471 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
2473 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
2474 to use static mutexes for global data
2476 * dbus/dbus-connection.c (dbus_connection_set_data): add new
2477 collection of functions to set/get application-specific data
2478 on the DBusConnection.
2480 2003-01-04 Havoc Pennington <hp@pobox.com>
2482 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
2483 (_dbus_poll): new function
2485 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
2488 * bus/loop.c: initial code for the daemon main loop
2490 2003-01-04 Havoc Pennington <hp@pobox.com>
2492 * test/watch.c (error_handler): make it safe if the error handler
2493 is called multiple times (if we s/error handler/disconnect
2494 handler/ we should just guarantee it's called only once)
2496 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
2497 error handler on disconnect (it's quite possible we should
2498 just change the error handler to a "disconnect handler," I'm
2499 not sure we have any other meaningful errors)
2501 * configure.in: check for getpwnam_r
2503 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2504 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
2505 mechanism as in SASL spec, using socket credentials
2507 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
2508 (_dbus_send_credentials_unix_socket): new function
2510 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
2512 (_dbus_write): only check errno if <0 returned
2513 (_dbus_write_two): ditto
2515 2003-01-02 Anders Carlsson <andersca@codefactory.se>
2517 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
2518 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
2519 (_dbus_marshal_test):
2520 * dbus/dbus-marshal.h:
2521 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
2522 to _dbus_marshal_utf8_string. Also fix some tests.
2524 2002-12-28 Harri Porten <porten@kde.org>
2526 * configure.in: added check for C++ compiler and a very cheesy
2527 check for the Qt integration
2529 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
2531 * qt/Makefile.am: added
2533 * qt/.cvsignore: added
2535 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
2536 latter, added #ifdef QT_THREAD_SUPPORT guard.
2538 * dbus/Makefile.am: added missing headers for make dist
2540 2002-12-28 Kristian Rietveld <kris@gtk.org>
2542 * dbus/Makefile.am: fixup export-symbols-regex.
2544 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2546 * acinclude.m4: Add this file and put the
2547 PKG_CHECK_MODULE macro in it.
2549 2002-12-27 Anders Carlsson <andersca@codefactory.se>
2551 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2552 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2553 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2554 (_dbus_marshal_test):
2555 Make the demarshalling routines align the pos argument.
2556 Add string marshalling tests and fix the obvious bugs
2559 2002-12-26 Havoc Pennington <hp@pobox.com>
2561 * dbus/dbus-auth.c: fixes fixes fixes
2563 * dbus/dbus-transport-unix.c: wire up support for
2564 encoding/decoding data on the wire
2566 * dbus/dbus-auth.c (_dbus_auth_encode_data)
2567 (_dbus_auth_decode_data): append to target string
2568 instead of nuking it.
2570 2002-12-26 Havoc Pennington <hp@pobox.com>
2572 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
2573 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
2576 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
2577 avoid swap_bytes() overhead (ignoring possible assembly stuff for
2578 now). Main point is because I wanted unpack_uint32 to implement
2580 (_dbus_verbose_bytes): new function
2582 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
2584 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
2585 mechanism to handle a corrupt message stream
2586 (_dbus_message_loader_new): fix preallocation to only prealloc,
2589 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
2590 (_dbus_string_test): enhance tests for copy/move and fix the
2593 * dbus/dbus-transport-unix.c: Hold references in more places to
2594 avoid reentrancy problems
2596 * dbus/dbus-transport.c: ditto
2598 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
2599 leak reference count in no-message case
2601 * test/watch.c (do_mainloop): handle adding/removing watches
2602 during iteration over the watches. Also, ref the connection/server
2603 stored on a watch, so we don't try to mangle a destroyed one.
2605 * dbus/dbus-transport-unix.c (do_authentication): perform
2608 * dbus/dbus-auth.c (get_state): add a state
2609 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
2610 (_dbus_auth_get_unused_bytes): append the unused bytes
2611 to the passed in string, rather than prepend
2613 * dbus/dbus-transport.c (_dbus_transport_init_base): create
2614 the auth conversation DBusAuth
2616 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
2617 (_dbus_transport_new_for_domain_socket): when creating a
2618 transport, pass in whether it's a client-side or server-side
2619 transport so we know which DBusAuth to create
2621 2002-12-03 Havoc Pennington <hp@pobox.com>
2623 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
2624 _after_ finalizing the derived members
2625 (unix_connection_set): unref watch if we fail to add it
2627 * dbus/dbus-connection.c (dbus_connection_unref): delete the
2628 transport first, so that the connection owned by the
2629 transport will be valid as the transport finalizes.
2631 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
2632 if necessary, and remove watches from the connection.
2634 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
2636 2002-12-26 Anders Carlsson <andersca@codefactory.se>
2638 * dbus/dbus-marshal.c: (_dbus_marshal_string),
2639 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2640 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
2641 (_dbus_marshal_test):
2642 * dbus/dbus-marshal.h:
2643 Add string marshal functions and have the demarshal functions
2644 return the new position.
2646 2002-12-25 Havoc Pennington <hp@pobox.com>
2648 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
2649 it is a simple protocol that just maps directly to SASL.
2651 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
2652 initial implementation, not actually used yet.
2654 * dbus/dbus-string.c (_dbus_string_find): new function
2655 (_dbus_string_equal): new function
2656 (_dbus_string_base64_encode): new function
2657 (_dbus_string_base64_decode): new function
2659 2002-12-25 Anders Carlsson <andersca@codefactory.se>
2662 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
2663 (_dbus_marshal_int32), (_dbus_marshal_uint32),
2664 (_dbus_demarshal_double), (_dbus_demarshal_int32),
2665 (_dbus_demarshal_uint32), (_dbus_marshal_test):
2666 * dbus/dbus-marshal.h:
2667 * dbus/dbus-protocol.h:
2668 * dbus/dbus-test.c: (main):
2670 Add un-optimized marshalling/demarshalling routines.
2672 2002-12-25 Harri Porten <porten@kde.org>
2674 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
2676 2002-12-24 Zack Rusin <zack@kde.org>
2678 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
2679 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
2682 2002-12-24 Havoc Pennington <hp@pobox.com>
2684 * glib/dbus-gthread.c: fix include
2686 * glib/dbus-glib.h: rename DBusMessageHandler for now.
2687 I think glib API needs to change, though, as you don't
2688 want to use DBusMessageFunction, you want to use the
2689 DBusMessageHandler object. Probably
2690 dbus_connection_open_with_g_main_loop()
2691 and dbus_connection_setup_g_main_loop() or something like that
2692 (but think of better names...) that just create a connection
2693 that has watch/timeout functions etc. already set up.
2695 * dbus/dbus-connection.c
2696 (dbus_connection_send_message_with_reply): new function just to
2697 show how the message handler helps us deal with replies.
2699 * dbus/dbus-list.c (_dbus_list_remove_last): new function
2701 * dbus/dbus-string.c (_dbus_string_test): free a string that
2704 * dbus/dbus-hash.c: use memory pools for the hash entries
2705 (rebuild_table): be more paranoid about overflow, and
2706 shrink table when we can
2707 (_dbus_hash_test): reduce number of sprintfs and write
2708 valid C89. Add tests for case where we grow and then
2709 shrink the hash table.
2711 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
2713 * dbus/dbus-connection.c (dbus_connection_register_handler)
2714 (dbus_connection_unregister_handler): new functions
2716 * dbus/dbus-message.c (dbus_message_get_name): new
2718 * dbus/dbus-list.c: fix docs typo
2720 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
2721 an object representing a handler for messages.
2723 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2726 * glib/dbus-gthread.c: (dbus_gthread_init):
2727 Don't use the gdbus prefix for public functions.
2729 2002-12-16 Anders Carlsson <andersca@codefactory.se>
2733 Add GLib checks and fixup .pc files
2737 * glib/dbus-gmain.c: (gdbus_connection_prepare),
2738 (gdbus_connection_check), (gdbus_connection_dispatch),
2739 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
2740 (dbus_connection_gsource_new):
2741 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
2742 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
2743 * glib/test-dbus-glib.c: (message_handler), (main):
2746 2002-12-15 Harri Porten <porten@kde.org>
2748 * autogen.sh: check for libtoolize before attempting to use it
2750 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
2753 * .cvsignore: ignore more stamp files
2755 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
2757 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
2758 without make install.
2760 2002-12-15 Havoc Pennington <hp@pobox.com>
2762 * dbus/dbus-threads.c: add thread stubs that a higher library
2763 layer can fill in. e.g. the GLib wrapper might fill them in with
2764 GThread stuff. We still need to use this thread API to
2765 thread-safe-ize the library.
2767 2002-12-12 Havoc Pennington <hp@pobox.com>
2769 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
2770 below new interfaces and include fewer system headers.
2772 * dbus/dbus-sysdeps.c (_dbus_read): new function
2773 (_dbus_write): new function
2774 (_dbus_write_two): new function
2775 (_dbus_connect_unix_socket): new function
2776 (_dbus_listen_unix_socket): new function
2778 * dbus/dbus-message-internal.h: change interfaces to use
2781 2002-12-11 Havoc Pennington <hp@pobox.com>
2783 * dbus/dbus-types.h: add dbus_unichar
2785 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
2787 * dbus/dbus-connection.c (dbus_connection_send_message): return
2790 * dbus/dbus-transport.c: include dbus-watch.h
2792 * dbus/dbus-connection.c: include dbus-message-internal.h
2794 * HACKING: add file with coding guidelines stuff.
2796 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
2797 handling here, for security purposes (as in vsftpd). Not actually
2798 using this class yet.
2800 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
2801 system/libc usage here, as in vsftpd, for ease of auditing (and
2802 should also simplify portability). Haven't actually moved all the
2803 system/libc usage into here yet.
2805 2002-11-25 Havoc Pennington <hp@pobox.com>
2807 * dbus/dbus-internals.c (_dbus_verbose): fix to not
2808 always print the first verbose message.
2810 2002-11-24 Havoc Pennington <hp@pobox.com>
2812 * test/echo-client.c, test/echo-server.c: cheesy test
2815 * configure.in (AC_CHECK_FUNCS): check for writev
2817 * dbus/dbus-message.c (_dbus_message_get_network_data): new
2820 * dbus/dbus-list.c (_dbus_list_foreach): new function
2822 * dbus/dbus-internals.c (_dbus_verbose): new function
2824 * dbus/dbus-server.c, dbus/dbus-server.h: public object
2825 representing a server that listens for connections.
2827 * dbus/.cvsignore: create
2829 * dbus/dbus-errors.h, dbus/dbus-errors.c:
2830 public API for reporting errors
2832 * dbus/dbus-connection.h, dbus/dbus-connection.c:
2833 public object representing a connection that
2834 sends/receives messages. (Same object used for
2835 both client and server.)
2837 * dbus/dbus-transport.h, dbus/dbus-transport.c:
2838 Basic abstraction for different kinds of stream
2839 that we might read/write messages from.
2841 2002-11-23 Havoc Pennington <hp@pobox.com>
2843 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
2846 * dbus/dbus-test.c (main): add list test, and include
2847 dbus-test.h as intended
2849 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
2850 (_dbus_hash_table_remove_int): return value indicates
2851 whether the entry existed to remove
2853 * dbus/dbus-list.c: add linked list utility class,
2856 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
2859 2002-11-23 Havoc Pennington <hp@pobox.com>
2861 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
2862 DBUS_END_DECLS to nothing, that should fix this once and for all
2864 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
2866 * dbus/dbus-message.c, dbus/dbus-hash.c:
2867 add some missing @brief
2869 2002-11-23 Havoc Pennington <hp@pobox.com>
2871 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
2872 to avoid confusing Doxygen
2874 * dbus/dbus-hash.c: @} not }@
2876 * dbus/dbus-message.c (struct DBusMessage): split out
2879 2002-11-23 Havoc Pennington <hp@pobox.com>
2881 * configure.in: pile on more warning flags if using gcc
2883 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
2884 to document static functions
2886 * configure.in: add summary to end of configure so it
2887 looks nice and attractive
2889 * dbus/dbus-hash.c: finish implementation and write unit
2892 * configure.in: add --enable-tests to enable unit tests
2894 * dbus/dbus-test.c: test program to run unit tests
2895 for all files in dbus/*, initially runs a test for
2898 * dbus/dbus-internals.h: file to hold some internal utility stuff
2900 2002-11-22 Havoc Pennington <hp@redhat.com>
2902 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
2903 "ported" away from Tcl
2905 * dbus/dbus-types.h: header for types such as dbus_bool_t
2907 2002-11-22 Havoc Pennington <hp@redhat.com>
2909 * dbus/dbus.h: fixups for doc warnings
2911 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
2913 (QUIET): make it quiet so we can see warnings
2915 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
2917 2002-11-22 Havoc Pennington <hp@redhat.com>
2919 * Makefile.am: include "Doxyfile" target in all-local
2921 * configure.in: generate the Doxyfile
2923 * Doxyfile.in: move Doxyfile here, so we can use
2924 configure to generate a Doxyfile with the right
2927 2002-11-22 Havoc Pennington <hp@redhat.com>
2929 * dbus/dbus-message.c: move inline docs into .c file
2931 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
2932 so all docs are under doc/
2933 (MAN_EXTENSION): generate man pages. Use extension
2934 ".3dbus" which matches ".3qt" on my system,
2935 I guess this is OK, I don't know really.
2936 (FILE_PATTERNS): look for .c files not .h, makes sense
2939 2002-11-22 Havoc Pennington <hp@pobox.com>
2941 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
2942 because any app can be a server, and any app can be a client,
2943 the bus is a special kind of server.
2945 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
2947 * Doxyfile : adding. Still needs Makefile rules to be generated
2948 automatically (just run "doxygen" in the toplevel dir for now to
2951 * dbus/dbus-message.h : Adding sample docs (javadoc since
2952 resembles gtk-doc a little more)
2954 * dbus/dbus.h : Adding sample docs
2956 2002-11-21 Havoc Pennington <hp@redhat.com>
2958 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
2959 so we can allow ourselves to include files directly,
2960 instead of having to use dbus.h
2962 * dbus/dbus.h: fill in
2964 * dbus/dbus-message.h: sketch out a sample header file.
2965 Include griping if you include it directly instead of
2968 * dbus/dbus-macros.h: new file with macros for extern "C",
2969 TRUE/FALSE, NULL, etc.
2971 * doc/file-boilerplate.c: put include guards in here
2973 2002-11-21 Havoc Pennington <hp@redhat.com>
2975 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
2977 * COPYING: include the GPL as well, and license code
2978 under both AFL and GPL.
2980 2002-11-21 Havoc Pennington <hp@redhat.com>
2982 * acconfig.h: get rid of this
2984 * autogen.sh (run_configure): add --no-configure option
2986 * configure.in: remove AC_ARG_PROGRAM to make
2987 autoconf complain less. add AC_PREREQ.
2988 add AC_DEFINE third arg.
2990 2002-11-21 Anders Carlsson <andersca@codefactory.se>
2993 Fix references so we can distcheck.
2995 2002-11-21 Havoc Pennington <hp@redhat.com>
2997 * Initial module creation