1 2005-02-13 Havoc Pennington <hp@redhat.com>
3 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
4 (_dbus_connection_release_dispatch)
5 (_dbus_connection_acquire_io_path)
6 (_dbus_connection_release_io_path): make the mutex and condvar
7 control access to the "acquired" flag. Drop the connection lock
8 while waiting on the condvar. Hopefully these are baby steps in
9 roughly the right direction.
11 2005-02-13 Havoc Pennington <hp@redhat.com>
13 * dbus/dbus-connection.c: use separate mutexes for the condition
14 variables; this is some kind of baseline for sanity, but the
15 condition variables still aren't used correctly afaict
17 2005-02-13 Havoc Pennington <hp@redhat.com>
19 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
22 * dbus/dbus-connection.c
23 (_dbus_connection_detach_pending_call_unlocked): add this
25 Initial semi-correct pass through to fix thread locking; there are
26 still some issues with the condition variable paths I'm pretty
29 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
32 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
33 rename to add _unlocked
34 (struct DBusConnection): move "dispatch_acquired" and
35 "io_path_acquired" to use only one bit each.
36 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
37 (dbus_connection_set_watch_functions): hacky fix to reentrancy
38 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
39 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
40 (_dbus_connection_remove_timeout)
41 (_dbus_connection_toggle_timeout): drop lock when calling out to
42 user functions; done in a hacky/bad way.
43 (_dbus_connection_send_and_unlock): add a missing unlock
44 (_dbus_connection_block_for_reply): add a missing unlock
46 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
47 drop lock in a hacky probably unsafe way to call out to user
50 2005-02-12 Havoc Pennington <hp@redhat.com>
52 * tools/dbus-tree-view.c (info_set_func_text): display more
55 * bus/driver.c (bus_driver_handle_list_services): list the bus
58 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
60 * glib/dbus-gidl.c (signal_info_get_n_args): new function
61 (method_info_get_n_args): new function
63 2005-02-12 Havoc Pennington <hp@redhat.com>
65 * bus/driver.c (bus_driver_handle_introspect): add introspection
68 2005-02-12 Havoc Pennington <hp@redhat.com>
70 * bus/driver.c: put the signature of each bus driver method in the
71 table of handlers and check it on incoming calls; this isn't
72 really useful, but going to add introspect support in a minute.
74 2005-02-11 Joe Shaw <joeshaw@novell.com>
76 * mono/Connection.cs: The unpredictability of finalizers in mono
77 prevents us from deterministically disconnecting the filters from
78 the Service class's finalizer, so move tracking of filters and
79 matches here. Add API for that.
81 * mono/Service.cs: Remove the code, add code which calls the
82 methods now on the Connection class.
84 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
86 * python/dbus.py (class Sender): added to support dbus signals better
87 (Bus::add_signal_receiver): added expand_args parameter which defaults
88 to True. When expand args is True the signal handler will pass the
89 message arguments as parameters to the signal handler. If False
90 revert to previous behavior where the signal handler must get the
91 argument list from the message. This is to help port applications
92 like HAL that have a tendancy to send variable length argument lists.
93 self._match_rule_to_receivers is now a dict of dicts.
94 (Bus::remove_signal_receiver): pop handler off the dict intead of
95 removing it from a list
96 (Bus::_signal_func): change signal handlers so that interface,
97 signal_name, service, path and message are packed into a Sender
98 object and that is passed to the handler. If expand_args is True
99 extract the args list from the message and append it to the parameter
102 * python/dbus_bindings.pyx.in (class Signature): added to support
104 (MessageIter::__init__): changed iteration limit to match D-BUS
105 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
106 STRUCT and VARIENT type support
107 (MessageIter::python_value_to_dbus_sig): made recursive to support
109 (MessageIter::append*): added Signature, dict, tuple
112 * python/examples/example-client.py: added examples of getting tuples
115 * python/examples/example-service.py: added examples of sending tuples
118 * python/examples/example-signal-recipient.py: Fixed to handle new
119 signal callback format
121 2005-02-10 Havoc Pennington <hp@redhat.com>
123 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
124 (call dbus_g_proxy_add_signal)
126 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
128 (_dbus_server_new_for_domain_socket): escape the path
130 * dbus/dbus-address.c (dbus_address_escape_value): new
131 (dbus_address_unescape_value): new
132 (dbus_parse_address): unescape values
134 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
136 * doc/dbus-specification.xml: explain how to escape values in
139 2005-02-10 Havoc Pennington <hp@redhat.com>
141 * dbus/dbus-message-factory.c (generate_special): modify test to
142 avoid using a non-basic dict key
144 * dbus/dbus-marshal-validate-util.c: add test for the below
146 * doc/dbus-specification.xml: require that dict keys are a basic
149 * dbus/dbus-marshal-validate.c
150 (_dbus_validate_signature_with_reason): require that dict key is a
153 2005-02-10 Havoc Pennington <hp@redhat.com>
155 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
156 change to be _and_unlock instead of _unlocked
158 * dbus/dbus-connection.c
159 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
160 have no_update so we can find this bug quickly in future
162 2005-02-10 Havoc Pennington <hp@redhat.com>
164 * dbus/dbus-message-util.c (verify_test_message): tests for string
167 * dbus/dbus-message.c (dbus_message_append_args_valist): add
168 support for arrays of string/signature/path
170 2005-02-10 Joe Shaw <joeshaw@novell.com>
172 * dbus/dbus-connection.c
173 (_dbus_connection_queue_received_message_link,
174 _dbus_connection_message_sent): Add the path to
176 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
177 _dbus_connection_send_preallocated_unlocked(), updated the
178 dispatch status, and unlocks. Fixes a bug where certain
179 situations (like a broken pipe) could cause a Disconnect message
180 to not be sent, tricking the bus into thinking a service was still
181 there when the process had quit.
182 (_dbus_connection_send_preallocated): Call
183 _dbus_connection_send_preallocated_and_unlock().
184 (_dbus_connection_send_and_unlock): Added. Calls
185 _dbus_connection_send_preallocated_and_unlock().
186 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
187 (dbus_connection_send_with_reply): Update the dispatch status and
190 * mono/Service.cs (~Service): Added. Removes the filter so that
191 we don't get unmanaged code calling back into a GCed delegate.
192 (RemoveFilter); Added.
194 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
196 * dbus/dbus-message.c (dbus_message_iter_open_container):
197 - Removed check for iterator type being an array because
198 get_arg_type does not work with writer iterators
199 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
201 2005-02-07 Havoc Pennington <hp@redhat.com>
203 * doc/dbus-specification.xml: some more language cleanups; add
204 stuff about how to deal with invalid protocol and extension
205 points; add _ to allowed chars in auth commands; add EXTENSION_
208 2005-02-06 Havoc Pennington <hp@redhat.com>
210 * s/expected/required/ in a couple places for clarity
212 2005-02-07 Colin Walters <walters@verbum.org>
214 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
215 sender or proposed_recipient.
217 2005-02-06 Havoc Pennington <hp@redhat.com>
219 * dbus/dbus-message-factory.c (generate_special): more tests
221 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
222 array length that exceeds the maximum
224 2005-02-05 Havoc Pennington <hp@redhat.com>
226 * dbus/dbus-message-factory.c (generate_special): more test cases,
229 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
230 reason why a signature was invalid
232 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
233 skip the length of the string before we look at it in validation
235 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
238 * dbus/dbus-message.c (_dbus_message_loader_new): default
239 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
241 2005-02-05 Havoc Pennington <hp@redhat.com>
243 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
244 if the signature of a variant was empty
245 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
246 struct with no element type)
248 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
249 mangled messages to break things
251 2005-02-04 Havoc Pennington <hp@redhat.com>
253 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
254 g_quark_try_string() so it actually can return 0
255 (dbus_g_proxy_connect_signal): ditto
257 2005-02-04 Havoc Pennington <hp@redhat.com>
259 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
261 (tristring_from_message): assert cleanly on null path/interface
262 (should not be possible though I decided later)
263 (dbus_g_proxy_dispose): move proxy manager unregistration here
264 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
265 g_return_if_fail() checks
267 2005-02-04 Havoc Pennington <hp@redhat.com>
269 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
271 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
272 (with some minor changes)
274 * doc/dbus-specification.xml: add deprecated attribute to
277 2005-01-31 Havoc Pennington <hp@redhat.com>
279 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
280 think it's sort of right
282 2005-01-30 Havoc Pennington <hp@redhat.com>
284 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
286 2005-01-30 Havoc Pennington <hp@redhat.com>
288 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
290 * autogen.sh: change to autotools 1.9
292 * glib/dbus-gproxy.c: completely change how signals work
293 (dbus_g_proxy_add_signal): new function to specify signature of a
295 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
296 and g_warning if the incoming message has the wrong signature.
298 2005-01-30 Havoc Pennington <hp@redhat.com>
300 * tools/dbus-names-model.c (have_names_notify): fix this
302 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
303 up the string array handling a bit
305 2005-01-30 Havoc Pennington <hp@redhat.com>
307 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
308 (dbus_g_pending_call_cancel): new function
310 * dbus/dbus-glib.h: move GType decls for connection/message here;
311 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
312 here, just kind of rationalizing how we handle all that
314 * tools/dbus-names-model.c: new file for a tree model listing the
317 * tools/dbus-tree-view.c (model_new): use proper typing on the
320 2005-01-30 Havoc Pennington <hp@redhat.com>
322 * glib/dbus-gmain.c: add a custom GSource back that just checks
323 whether the message queue has anything in it; otherwise, there are
324 cases where we won't see messages in the queue since there was no
325 IO visible to the glib main loop
327 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
328 increase default message timeout to 25 seconds
330 2005-01-30 Havoc Pennington <hp@redhat.com>
332 * test/glib/test-profile.c (no_bus_stop_server): remove the
333 warning about the g_warning that I just fixed
335 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
336 custom source, seems to be a lot easier to understand and work
339 2005-01-30 Havoc Pennington <hp@redhat.com>
341 I think this main loop thing is conceptually broken, but here are
342 some band aids. I'll maybe rewrite it in a minute.
344 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
345 custom GSource, so don't pass it in; confusing
346 (gsource_server_finalize, gsource_connection_finalize): add
347 finalize handlers that remove all the watches.
349 2005-01-30 Havoc Pennington <hp@redhat.com>
351 * glib/dbus-gobject.c (introspect_properties): fix the XML
354 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
355 which effectively detects the use of freed messages
357 * glib/dbus-gobject.c (handle_introspect): modify and return the
358 reply message instead of the incoming message
360 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
361 gee, maybe it should SEND THE XML instead of just making a string
362 and freeing it again ;-)
364 * tools/dbus-print-message.c (print_message): improve printing of
367 * configure.in: add debug-glib.service to the output
369 2005-01-30 Havoc Pennington <hp@redhat.com>
371 dbus-viewer introspected and displayed the bus driver
373 * dbus/dbus-object-tree.c
374 (object_tree_test_iteration): add tests for a handler registered on "/"
376 * dbus/dbus-object-tree.c
377 (_dbus_decompose_path): fix to handle path "/" properly
378 (run_decompose_tests): add tests for path decomposition
380 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
383 * glib/dbus-gobject.c (handle_introspect): fix quotes
385 * test/glib/run-test.sh: support launching the bus, then running
388 * test/glib/test-service-glib.c (main): put in a trivial gobject
389 subclass and register it on the connection
391 * bus/driver.c (bus_driver_handle_introspect): implement
392 introspection of the bus driver service
394 * dbus/dbus-protocol.h: add #defines for the XML namespace,
395 identifiers, doctype decl
397 * bus/driver.c (bus_driver_handle_get_service_owner): handle
398 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
399 returning the service unchanged.
400 (bus_driver_handle_message): remove old check for reply_serial in
401 method calls, now the message type deals with that
402 (bus_driver_handle_message): handle NULL interface
404 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
406 * glib/dbus-gloader-expat.c (description_load_from_string): allow
409 * tools/dbus-viewer.c: add support for introspecting a service on
412 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
413 (dbus_g_pending_call_unref): add
415 2005-01-29 Havoc Pennington <hp@redhat.com>
417 * tools/dbus-tree-view.c: add support for displaying properties.
418 (run dbus-viewer with an introspect xml file as arg, then resize
419 the window so the tree elements show up, not sure what that is)
421 * glib/dbus-gobject.c (handle_introspect): return
422 org.freedesktop.Properties and org.freedesktop.Introspectable
423 interfaces when we are introspected.
425 * doc/dbus-specification.xml: allow empty interface name when
428 2005-01-29 Havoc Pennington <hp@redhat.com>
430 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
431 though it uses glib, it could be extended for any binding in
434 * glib/dbus-gobject.c (gobject_message_function): change to the
435 new way properties work
437 * dbus/dbus-protocol.h: add the new interfaces
439 * doc/dbus-specification.xml: document the introspection format,
440 Introspectable interface, and add an org.freedesktop.Properties
443 * glib/dbus-gparser.c: add support for a <property> element
445 * glib/dbus-gidl.c: add PropertyInfo
447 * glib/dbus-gobject.c (handle_introspect): put the outermost
448 <node> outside the signal and property descriptions.
449 (introspect_properties): export properties as <property> rather
452 2005-01-28 Havoc Pennington <hp@redhat.com>
454 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
455 related to authentication protocol
457 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
459 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
460 - BUS_ACTIVATION -> BUS_STARTER
461 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
462 - class MessageIter (__init__): Added recursion checking
463 so we throw a nice error instead of just disconnecting from the
465 (get): Added arg_type parameter for recursion.
467 Added signiture type placeholder (not implemented)
468 Added struct type placeholder (not implemented)
469 Added varient type placeholder (not implemented)
470 Commented out dict type for now
471 (get_element_type): renamed from get_array_type
472 (get_*): changed to use the dbus_message_iter_get_basic API
473 (get_*_array): removed in favor of recursive get_array method
474 (get_array): new recursive method which calls get to marshal
475 the elements of the array
476 (value_to_dbus_sig): New method returns the corrasponding
477 dbus signiture to a python value
478 (append): Comment out dict handling for now
479 Handle lists with the new recursive API
480 Comment out None handling for now
481 (append_nil): removed
482 (append_*): changed to use dbus_message_iter_append_basic API
483 (append_*_array): removed in favor of recursive append_array
485 (__str__): Make it easier to print out recursive iterators
487 - class Message (__str__): moved type inspection to the
488 MessageIter class' __str__ method
489 (get_iter): Added an append parameter wich defaults to False
490 If True use the new API's to create an append iterator
492 * python/dbus.py: Update to use new bindings API
493 - TYPE_ACTIVATION -> TYPE_STARTER
494 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
495 - class ActivationBus -> class StarterBus
496 - class RemoteObject (__call__): get an append iterator
497 - (_dispatch_dbus_method_call): get an append iterator
498 - class Object (emit_signal): get an append iterator
500 * python/examples/: Fixed up the examples to work with the new API
502 2005-01-28 Joe Shaw <joeshaw@novell.com>
504 * configure.in: Bump version up to 0.30.
506 * HACKING: Add a release item to bump the version number up after
509 2005-01-28 Havoc Pennington <hp@redhat.com>
511 * doc/dbus-specification.xml: update to describe 16-bit types and
514 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
517 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
520 * dbus/dbus-marshal-recursive.c: implement
522 2005-01-27 Havoc Pennington <hp@redhat.com>
524 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
526 * configure.in: find the right type for 16 and 32 bit ints as well
529 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
530 the 16-bit types so people don't have to stuff them in 32-bit or
533 2005-01-27 Havoc Pennington <hp@redhat.com>
535 * dbus/dbus-message.c: byteswap the message if you init an
536 iterator to read/write from it
538 * dbus/dbus-marshal-byteswap.c: new file implementing
539 _dbus_marshal_byteswap()
541 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
543 2005-01-26 Havoc Pennington <hp@redhat.com>
545 * dbus/dbus-marshal-validate-util.c: break this out (and fix
546 build, apparently - nobody noticed?)
548 2005-01-26 Havoc Pennington <hp@redhat.com>
550 * dbus/dbus-marshal-recursive.h: remove todo comment
552 2005-01-25 Joe Shaw <joeshaw@novell.com>
554 * Land the mono binding changes to conform to the new APIs.
556 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
557 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
559 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
560 type code as a string.
561 (InitAppending): Rename dbus_message_append_iter_init() to
562 dbus_message_iter_init_append().
564 * mono/BusDriver.cs: Rename ServiceEventHandler to
565 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
566 Rename ServiceOwnerChanged to NameOwnerChanged.
568 * mono/Connection.cs: Rename BaseService to UniqueName, and the
571 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
573 * mono/Service.cs: Rename Exists to HasOwner, internally rename
574 dbus_bus_acquire_service() to dbus_bus_request_name().
576 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
577 of Type.UnderlyingSystemType to get the correct element type for
579 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
580 dbus_message_get_{element|arg}_type() instead of
581 dbus_message_iter_init_array_iterator().
582 (Append): Replace dbus_message_iter_append_array() with
583 dbus_message_iter_open_container() and
584 dbus_message_iter_close_container().
586 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
587 types have been removed.
589 * mono/DBusType/*.cs: Replace calls of
590 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
591 but specify the type in the DllImport extern declaration. Ditto
592 for dbus_message_iter_append_[type]() ->
593 dbus_message_iter_append_basic().
595 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
596 NameOwnerChangedHandler.
598 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
600 * python/dbus_bindings.pyx.in: Rename of methods and bindings
601 - get_base_service -> get_unique_name
602 - bus_get_base_service -> bus_get_unique_name
603 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
604 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
605 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
606 - bus_activate_service -> bus_start_service_by_name
607 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
608 - bus_acquire_service -> bus_request_name
609 - dbus_bus_acquire_service -> dbus_bus_request_name
610 - bus_service_exists -> bus_name_has_owner
611 - dbus_bus_service_exists -> dbus_bus_name_has_owner
613 * python/dbus.py: Rename of methods
614 - activate_service -> start_service_by_name
615 - bus_acquire_service -> bus_request_name
616 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
617 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
620 2005-01-24 Joe Shaw <joeshaw@novell.com>
622 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
623 signature for the method that can't be found.
625 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
626 the message has any arguments, we need to call
627 _dbus_type_reader_get_current_type(), not
628 _dbus_type_reader_has_next().
630 2005-01-24 Havoc Pennington <hp@redhat.com>
632 * dbus/dbus-message-factory.c: more testing of message validation
634 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
637 2005-01-23 Havoc Pennington <hp@redhat.com>
639 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
640 get this all working, not many tests in the framework yet though
642 2005-01-22 Havoc Pennington <hp@redhat.com>
644 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
645 tutorial, based on work from David Wheeler.
647 2005-01-21 Havoc Pennington <hp@redhat.com>
649 * dbus/dbus-bus.c: add more return_if_fail checks
651 * dbus/dbus-message.c (load_message): have the "no validation"
652 mode (have to edit the code to toggle the mode for now though)
654 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
655 skips all validation; I want to use this at least for benchmark
656 baseline, I'm not sure if it should be a publicly-available switch.
658 2005-01-21 Havoc Pennington <hp@redhat.com>
660 * glib/dbus-gmain.c: don't put the GLib bindings in the same
661 toplevel doxygen group as the low-level API stuff
663 * dbus/dbus.h: note that libdbus is the low-level API
665 2005-01-20 Havoc Pennington <hp@redhat.com>
667 * update-dbus-docs.sh: script to update docs on the web site, only
668 works for me though. neener.
670 2005-01-20 Havoc Pennington <hp@redhat.com>
672 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
673 code can reveal bugs in it
675 2005-01-20 Havoc Pennington <hp@redhat.com>
677 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
678 select() version, patches from Tor Lillqvist
680 2005-01-20 Havoc Pennington <hp@redhat.com>
682 * doc/dbus-tutorial.xml: replace > with >
684 * bus/services.c (bus_registry_acquire_service): validate the name
685 and return a better error if it's no good.
687 * doc/dbus-specification.xml: note NO_AUTO_START change
689 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
690 from AUTO_START, we're toggling the default
692 * bus/dispatch.c: adapt the tests to change of auto-start default
694 2005-01-18 Havoc Pennington <hp@redhat.com>
696 * rename dbus-daemon-1 to dbus-daemon throughout
698 2005-01-18 Havoc Pennington <hp@redhat.com>
700 * Throughout, grand renaming to strip out the use of "service",
701 just say "name" instead (or "bus name" when ambiguous). Did not
702 change the internal code of the message bus itself, only the
703 programmer-facing API and messages.
705 * doc/dbus-specification.xml: further update the message bus section
707 * bus/config-parser.c (all_are_equiv): fix bug using freed string
710 2005-01-17 Havoc Pennington <hp@redhat.com>
712 * dbus/dbus-types.h: remove 16-bit types since we don't use them
715 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
716 "invalid name character" not only non-ASCII
718 * doc/dbus-specification.xml: further update spec, message bus
719 parts are still out-of-date but the marshaling etc. stuff is now
722 2005-01-17 Havoc Pennington <hp@redhat.com>
724 * doc/dbus-specification.xml: partially update spec
726 2005-01-17 Havoc Pennington <hp@redhat.com>
728 * Throughout, align variant bodies according to the contained
729 type, rather than always to 8. Should save a fair bit of space in
732 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
733 fix handling of case where p == end
735 * doc/TODO: remove the dbus_bool_t item and variant alignment items
737 2005-01-17 Havoc Pennington <hp@redhat.com>
739 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
741 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
742 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
743 are marshaling/unmarshaling a boolean.
745 2005-01-16 Havoc Pennington <hp@redhat.com>
747 This is about it on what can be disabled/deleted from libdbus
748 easily, back below 150K anyhow. Deeper cuts are more work than
749 just turning the code off as I've done here.
751 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
752 signed int convenience funcs
754 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
757 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
758 things out of libdbus
760 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
762 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
763 tests-enabled-only, though it should probably be deleted)
765 * dbus/dbus-message-util.c: same stuff
767 * dbus/dbus-auth-util.c: same stuff
769 2005-01-16 Havoc Pennington <hp@redhat.com>
771 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
773 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
774 way for stripping down dbus-userdb.c stuff included in libdbus.
775 Rename _dbus_parse_uid for consistency.
777 2005-01-16 Havoc Pennington <hp@redhat.com>
779 * dbus/dbus-internals.c (_dbus_real_assert): print the function
780 name the assertion failed in
782 * dbus/dbus-internals.h (_dbus_return_if_fail)
783 (_dbus_return_val_if_fail): assert that the name of the function
784 containing the check doesn't start with '_', since we only want to
785 use checks on public functions
787 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
790 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
791 change checks to asserts for private function
793 * dbus/dbus-message.c (_dbus_message_set_serial): checks
794 to asserts for private function
796 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
797 broken assertion that was breaking make check
798 (_dbus_type_reader_array_is_empty): remove this rather than fix
799 it, was only used in assertions
801 2005-01-16 Havoc Pennington <hp@redhat.com>
803 * test/unused-code-gc.py: hacky script to find code that's used
804 only by the bus (not libdbus) or used only by tests or not used at
805 all. It has some false alarms, but looks like we can clean up a
806 lot of size from libdbus.
808 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
809 dbus/Makefile.am: initially move 10K of binary size out of libdbus
811 2005-01-16 Havoc Pennington <hp@redhat.com>
813 * Add and fix docs according to Doxygen warnings throughout
816 * dbus/dbus-marshal-recursive.c
817 (_dbus_type_reader_array_is_empty): change this to just call
818 array_reader_get_array_len() and make it static
820 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
822 (dbus_message_iter_init_append): rename from append_iter_init
824 * dbus/dbus-marshal-recursive.c
825 (_dbus_type_reader_get_element_type): rename from
826 _dbus_type_reader_get_array_type
828 2005-01-15 Havoc Pennington <hp@redhat.com>
830 * test/glib/test-profile.c (with_bus_server_filter): fix crash
832 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
833 when DBUS_DISABLE_ASSERT
834 (_dbus_marshal_set_basic): be sure we align for the string length
836 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
839 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
841 (_dbus_string_set_byte): provide inline macro version
843 2005-01-15 Havoc Pennington <hp@redhat.com>
845 * Land the new message args API and type system.
847 This patch is huge, but the public API change is not
848 really large. The set of D-BUS types has changed somewhat,
849 and the arg "getters" are more geared toward language bindings;
850 they don't make a copy, etc.
852 There are also some known issues. See these emails for details
854 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
855 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
857 * dbus/dbus-marshal-*: all the new stuff
859 * dbus/dbus-message.c: basically rewritten
861 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
862 freed blocks to be all non-nul bytes so using freed memory is less
865 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
866 DBUS_FAIL_MALLOC=N environment variable, so you can do
867 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
868 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
871 * qt/message.cpp: port to the new message args API
872 (operator<<): use str.utf8() rather than str.unicode()
873 (pretty sure this is right from the Qt docs?)
875 * glib/dbus-gvalue.c: port to the new message args API
877 * bus/dispatch.c, bus/driver.c: port to the new message args API
879 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
880 "locked" flag to TRUE and align_offset to 0; I guess we never
881 looked at these anyhow, but seems cleaner.
883 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
884 move allocation padding macro to this header; use it to implement
885 (_DBUS_STRING_STATIC): ability to declare a static string.
887 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
888 change to return TRUE if the interface is not set.
890 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
891 to dbus-marshal-validate.[hc]
893 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
896 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
897 to dbus-marshal-*.[hc]
899 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
900 function here from dbus-marshal.c
902 2005-01-12 Joe Shaw <joeshaw@novell.com>
904 * NEWS: Update for 0.23.
906 * configure.in: Release 0.23.
908 2005-01-12 Joe Shaw <joeshaw@novell.com>
910 * mono/Makefile.am, mono/example/Makefile.am: Always build the
911 dbus DLL with --debug. Clean up after the .mdb files this leaves
914 * mono/doc/Makefile.am: Need to uninstall the docs on "make
917 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
918 is an enum, get the enum's underlying type. Another mono
921 2005-01-11 Joe Shaw <joeshaw@novell.com>
923 Patch from Sjoerd Simons <sjoerd@luon.net>
925 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
926 DESTDIR. It breaks stuff.
928 2005-01-11 Joe Shaw <joeshaw@novell.com>
930 Patch from Tambet Ingo <tambet@ximian.com>
932 * mono/DBusType/Array.cs (Get): Get the underlying element type by
933 calling type.GetElementType(). The code previously depended on
934 broken Mono behavior, which was fixed in Mono 1.1.3.
936 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
937 Activator.CreateInstance() so that the class's constructor is
938 called with the right parameters.
940 2005-01-11 Joe Shaw <joeshaw@novell.com>
942 Patch from Timo Teräs <ext-timo.teras@nokia.com>
944 * dbus/dbus-connection.c
945 (_dbus_connection_queue_received_message_link): Call
946 _dbus_connection_remove_timeout() instead of the _locked()
947 variant, since it's always called from
948 _dbus_connection_handle_watch(), which handles the locking.
949 Removed the _locked() variant since it's no longer used.
951 2005-01-03 Havoc Pennington <hp@redhat.com>
953 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
956 2004-12-26 Havoc Pennington <hp@redhat.com>
958 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
960 2005-01-03 Havoc Pennington <hp@redhat.com>
962 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
965 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
967 2005-01-02 Havoc Pennington <hp@redhat.com>
969 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
971 2005-01-01 Havoc Pennington <hp@redhat.com>
973 * configure.in: add -Wfloat-equal
975 2005-01-01 Havoc Pennington <hp@redhat.com>
977 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
978 for a variety of reasons '==' doesn't do this.
980 2004-12-31 Havoc Pennington <hp@redhat.com>
982 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
985 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
987 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
989 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
991 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
992 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
993 dbus-protocol.h. Because they are defines and not enums they are not
996 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
998 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
999 dbus_bus_activate_service
1001 * python/dbus.py (Bus.activate_service): activate a service on the
1004 2004-12-24 Havoc Pennington <hp@redhat.com>
1006 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1007 file format has also changed and I haven't adapted to that yet
1009 * Makefile.am: load .gcno files from latest gcc
1011 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1012 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1014 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1017 * python/dbus.py (get_unix_user): Added binding to
1018 call dbus_bindings.bus_get_unix_user
1020 * python/extract.py: Modified the proto_pat regex to
1021 handle unsigned long
1023 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1025 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1026 better POSIX compliance.
1028 2004-12-19 Havoc Pennington <hp@redhat.com>
1030 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1031 (_dbus_string_insert_8_aligned): new functions
1033 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1035 2004-12-18 Havoc Pennington <hp@redhat.com>
1037 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1040 * dbus/dbus-message.c: fix a comment, and add a still-unused
1041 not-implemented function
1043 * dbus/dbus-marshal.h: fix comment
1045 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1047 2004-12-17 Joe Shaw <joeshaw@novell.com>
1049 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1050 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1051 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1052 Type.UnderlyingSystemType to get the actual system type
1053 underneath. This code previously depended on the broken Mono
1054 behavior, which was fixed in 1.1.3.
1056 2004-11-27 Havoc Pennington <hp@redhat.com>
1058 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1060 (_dbus_string_get_const_data): inline when asserts are disabled
1062 * dbus/dbus-message.c: record the _dbus_current_generation of
1063 creation so we can complain if dbus_shutdown() is used improperly.
1064 Do this only if checks are enabled.
1066 * dbus/dbus-connection.c: ditto
1068 2004-11-26 Havoc Pennington <hp@redhat.com>
1070 * test/glib/test-profile.c: add with_bus mode to profile echoes
1071 that go through the bus.
1073 * test/glib/run-test.sh: add ability to run test-profile
1075 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1078 2004-11-26 Havoc Pennington <hp@redhat.com>
1080 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1081 thing was implemented
1083 2004-11-26 Havoc Pennington <hp@redhat.com>
1085 * test/glib/test-profile.c: tweak a bit, add support for some
1086 made-up minimal malloc overhead with plain sockets, since in
1087 real life some sort of buffers are unavoidable thus we could
1088 count them in the theoretical best case
1090 2004-11-26 Havoc Pennington <hp@redhat.com>
1092 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1093 where I was trying to cache one too many messages
1095 2004-11-26 Havoc Pennington <hp@redhat.com>
1097 * dbus/dbus-message.c: reimplement message cache as an array which
1098 makes the cache about twice as fast and saves maybe 1.5% overall
1100 2004-11-26 Havoc Pennington <hp@redhat.com>
1102 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1103 message cache lock here
1105 2004-11-26 Havoc Pennington <hp@redhat.com>
1107 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1108 the "char byte_order" next to each other to save 4 bytes
1109 (dbus_message_new_empty_header): reduce preallocation, since the
1110 message cache should achieve a similar effect
1111 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1112 message cache that keeps a few DBusMessage around in a pool,
1113 another 8% speedup or so.
1115 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1117 2004-11-25 Havoc Pennington <hp@redhat.com>
1119 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1120 to write, without reading or blocking, try it before the poll()
1121 and skip the poll() if nothing remains to write. This is about a
1122 3% speedup in the echo client/server
1124 2004-11-25 Havoc Pennington <hp@redhat.com>
1126 The primary change here is to always write() once before adding
1127 the write watch, which gives us about a 10% performance increase.
1129 * dbus/dbus-transport-unix.c: a number of modifications to cope
1130 with removing messages_pending
1131 (check_write_watch): properly handle
1132 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1133 messages_pending stuff
1134 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1136 (unix_handle_watch): after writing, see if the write watch can be
1138 (unix_do_iteration): assert that write_watch/read_watch are
1139 non-NULL rather than testing that they aren't, since they
1140 aren't allowed to be NULL. check_write_watch() at the end so
1141 we add the watch if we did not finish writing (e.g. got EAGAIN)
1143 * dbus/dbus-transport-protected.h: remove messages_pending call,
1144 since it resulted in too much inefficient watch adding/removing;
1145 instead we now require that the transport user does an iteration
1146 after queueing outgoing messages, and after trying the first
1147 write() we add a write watch if we got EAGAIN or exceeded our
1148 max bytes to write per iteration setting
1150 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1153 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1154 freed and then accessed, valgrind flagged this bug, fix it
1156 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1157 as the last valid field plus 1, where really it is equal to the
1158 last valid field. Corrects some message corruption issues.
1160 * dbus/dbus-mainloop.c: verbosity changes
1162 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1163 instead of aborting in one of the test codepaths
1165 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1166 caused not printing the pid ever again if a verbose was missing
1167 the newline at the end
1168 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1170 * dbus/dbus-connection.c: verbosity changes;
1171 (dbus_connection_has_messages_to_send): new function
1172 (_dbus_connection_message_sent): no longer call transport->messages_pending
1173 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1174 try to write() immediately, so we can avoid the write watch. This
1175 is the core purpose of this patchset
1176 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1177 dump the outgoing message queue, so nobody will get confused
1178 trying to send them or thinking stuff is pending to be sent
1180 * bus/test.c: verbosity changes
1182 * bus/driver.c: verbosity/assertion changes
1184 * bus/dispatch.c: a bunch of little tweaks to get it working again
1185 because this patchset changes when/where you need to block.
1187 2004-11-23 Havoc Pennington <hp@redhat.com>
1189 * test/glib/test-profile.c: modify to accept a plain_sockets
1190 argument in which case it will bench plain sockets instead of
1191 libdbus, for comparison purposes.
1193 2004-11-22 Havoc Pennington <hp@redhat.com>
1195 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1196 threads for more time, so sysprof can get a grip on it.
1198 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1201 2004-11-13 Havoc Pennington <hp@redhat.com>
1203 * test/glib/test-profile.c: fix this thing up a bit
1205 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1206 preallocation sizes by a fair bit; not sure if this will be an
1207 overall performance win or not, but it does reduce reallocs.
1209 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1210 the test hack that forced constant realloc if asserts are
1211 disabled, so we can profile sanely. Sprinkle in some
1212 _DBUS_UNLIKELY() which are probably pointless, but before I
1213 noticed the real performance problem I put them in.
1214 (_dbus_string_validate_utf8): micro-optimize this thing a little
1215 bit, though callgrind says it didn't help; then special-case
1216 ascii, which did help a lot; then be sure we detect nul bytes as
1217 invalid, which is a bugfix.
1218 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1219 superstition; use memset to nul the padding instead of a manual
1221 (_dbus_string_get_length): inline this as a
1222 macro; it showed up in the profile because it's used for loop
1225 2004-11-10 Colin Walters <walters@verbum.org>
1227 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1230 2004-11-09 Colin Walters <walters@verbum.org>
1232 * dbus/dbus-string.c (_dbus_string_get_length): New
1233 function, writes DBusString to C buffer.
1235 * dbus/dbus-string.h: Prototype it.
1237 * dbus/dbus-message.c (dbus_message_type_to_string): New
1238 function, converts message type into C string.
1240 * dbus/dbus-message.h: Prototype it.
1242 * bus/selinux.c (bus_selinux_check): Take source pid,
1243 target pid, and audit data. Pass audit data to
1245 (log_audit_callback): New function, appends extra
1247 (bus_selinux_allows_acquire_service): Also take
1248 service name, add it to audit data.
1249 (bus_selinux_allows_send): Also take message
1250 type, interface, method member, error name,
1251 and destination, and add them to audit data.
1252 (log_cb): Initialize func_audit.
1254 * bus/selinux.h (bus_selinux_allows_acquire_service)
1255 (bus_selinux_allows_send): Update prototypes
1257 * bus/services.c (bus_registry_acquire_service): Pass
1258 service name to bus_selinux_allows_acquire_service.
1260 * bus/bus.c (bus_context_check_security_policy): Pass
1261 additional audit data. Move assignment of dest
1264 2004-11-07 Colin Walters <walters@verbum.org>
1266 * dbus/dbus-transport-unix.c (do_authentication): Always
1267 initialize auth_completed.
1269 2004-11-07 Colin Walters <walters@verbum.org>
1271 * bus/bus.c (load_config): Break into three
1272 separate functions: process_config_first_time_only,
1273 process_config_every_time, and process_config_postinit.
1274 (process_config_every_time): Move call of
1275 bus_registry_set_service_context_table into
1276 process_config_postinit.
1277 (process_config_postinit): New function, does
1278 any processing that needs to happen late
1279 in initialization (and also on reload).
1280 (bus_context_new): Instead of calling load_config,
1281 open config parser here and call process_config_first_time_only
1282 and process_config_every_time directly. Later, after
1283 we have forked but before changing UID,
1284 invoke bus_selinux_full_init, and then call
1285 process_config_postinit.
1286 (bus_context_reload_config): As in bus_context_new,
1287 load parse file inside here, and call process_config_every_time
1288 and process_config_postinit.
1290 * bus/services.h, bus/services.c
1291 (bus_registry_set_service_context_table): Rename
1292 from bus_registry_set_sid_table. Take string hash from config
1293 parser, and convert them here into SIDs.
1295 * bus/config-parser.c (struct BusConfigParser): Have
1296 config parser only store a mapping of service->context
1298 (merge_service_context_hash): New function.
1299 (merge_included): Merge context string hashes instead
1300 of using bus_selinux_id_table_union.
1301 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1302 simply create a new string hash.
1303 (bus_config_parser_unref): Unref it.
1304 (start_selinux_child): Simply insert strings into hash,
1305 don't call bus_selinux_id_table_copy_over.
1307 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1308 (bus_selinux_id_table_copy_over): Delete.
1310 2004-11-03 Colin Walters <walters@verbum.org>
1312 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1315 2004-11-03 Colin Walters <walters@verbum.org>
1317 * bus/test-main.c (test_pre_hook): Fix test logic,
1318 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1320 2004-11-02 Colin Walters <walters@redhat.com>
1322 * bus/selinux.c (bus_selinux_init): Split into two functions,
1323 bus_selinux_pre_init and bus_selinux_post_init.
1324 (bus_selinux_pre_init): Just determine whether SELinux is
1326 (bus_selinux_post_init): Do everything else.
1328 * bus/main.c (main): Call bus_selinux_pre_init before parsing
1329 config file, and bus_selinux_post_init after. This ensures that
1330 we don't lose the policyreload notification thread that
1331 bus_selinux_init created before forking previously.
1333 * bus/test-main.c (test_pre_hook): Update for split.
1335 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
1337 Patch from Johan Fischer <linux@fischaz.com>
1339 * mono/doc/Makefile.am (install-data-local): Added directory
1342 2004-10-29 Colin Walters <walters@redhat.com>
1344 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1345 parameter for fd to write pid to.
1347 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1349 * bus/bus.c (bus_context_new): Pass print_pid_fd
1350 to _dbus_become_daemon (bug #1720)
1352 2004-10-29 Colin Walters <walters@redhat.com>
1354 Patch from Ed Catmur <ed@catmur.co.uk>
1356 * mono/doc/Makefile.am (install-data-local): Handle
1359 2004-10-29 Colin Walters <walters@redhat.com>
1361 * bus/.cvsignore, qt/.cvsignore: Update.
1363 2004-10-29 Colin Walters <walters@redhat.com>
1365 Patch from Kristof Vansant <de_lupus@pandora.be>
1367 * configure.in: Detect Slackware.
1368 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1369 * bus/rc.messagebus.in: New file.
1371 2004-10-29 Colin Walters <walters@redhat.com>
1373 * tools/dbus-monitor.c (filter_func): Return
1374 DBUS_HANDLER_RESULT_HANDLED in filter function
1376 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1378 2004-10-29 Colin Walters <walters@redhat.com>
1380 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1382 * bus/services.c (bus_registry_acquire_service):
1383 Correctly retrieve service name from DBusString
1386 2004-10-29 Colin Walters <walters@redhat.com>
1388 * dbus/dbus-glib.h: Update documentation to not
1389 refer to internal APIs.
1391 2004-10-27 Joe Shaw <joeshaw@novell.com>
1393 * mono/Arguments.cs (GetDBusTypeConstructor):
1394 type.UnderlyingSystemType will return "System.Byte" if you do it
1395 on "byte[]", which is not what we want. So check the type.IsArray
1396 property and use System.Array instead.
1398 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
1400 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
1401 the DBusUserInfo structure since this is passed into the function.
1402 This would cause a double free when the function that allocated
1403 the structure would try to free it when an error occured.
1405 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
1406 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
1407 for service activation to avoid 32bit/64bit parallel install issues
1409 2004-10-21 Colin Walters <walters@verbum.org>
1411 * AUTHORS: Fix my email address, the @gnu.org one
1412 has been bouncing for some time. Also add J5.
1414 2004-10-21 Colin Walters <walters@verbum.org>
1416 * dbus/dbus-transport-unix.c (do_authentication): Return
1417 authentication status to callers.
1418 (unix_handle_watch): If we completed authentication this round,
1419 don't do another read. Instead wait until the next iteration,
1420 after we've read any pending data in the auth buffer.
1421 (unix_do_iteration): Ditto.
1422 (unix_handle_watch): Updated for new do_authentication prototype.
1424 2004-10-18 Colin Walters <walters@verbum.org>
1426 * bus/selinux.c (bus_selinux_enabled): Handle
1427 --disable-selinux case.
1429 2004-10-18 Colin Walters <walters@verbum.org>
1431 * bus/selinux.h: Add bus_selinux_enabled.
1433 * bus/selinux.c (bus_selinux_enabled): Implement it.
1435 * bus/config-parser.c (struct include): Add
1436 if_selinux_enabled member.
1437 (start_busconfig_child): Parse if_selinux_enabled
1438 attribute for include.
1439 (bus_config_parser_content): Handle it.
1441 * bus/session.conf.in, bus/system.conf.in: Add
1442 inclusion of context mapping to default config files;
1443 conditional on SELinux being enabled.
1445 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
1447 * test/data/invalid-config-files/badselinux-1.conf,
1448 test/data/invalid-config-files/badselinux-2.conf:
1449 Test files for bad syntax.
1451 2004-10-17 Colin Walters <walters@verbum.org>
1453 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
1454 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
1455 format specifier mismatches.
1457 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
1459 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
1462 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
1463 pointer (bug #1540, Leonardo Boiko).
1465 2004-09-28 Jon Trowbridge <trow@ximian.com>
1467 * mono/BusDriver.cs: Changed BusDriver struct to remove
1468 the ServiceCreated and ServiceDeleted events and replace them
1469 with the new ServiceOwnerChanged event.
1471 * mono/example/BusListener.cs: Added a new example program,
1472 which listens for and reports any ServiceOwnerChanged events
1475 * mono/example/Makefile.am (DESTDIR): Build changes for the
1476 new BusListener.cs example.
1478 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
1480 * bus/signals.c (bus_match_rule_parse): validate the components of
1481 match rules (bug #1439).
1483 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
1485 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
1487 * doc/dbus-specification.xml: document ServiceOwnerChanged
1490 * bus/driver.c, bus/driver.h, bus/services.c: Use
1491 ServiceOwnerChanged signal instead of ServiceCreated and
1494 * bus/dispatch.c: update testcase for the new signal.
1496 2004-09-20 Jon Trowbridge <trow@ximian.com>
1498 Patch from Nat Friedman <nat@novell.com>
1500 * mono/Makefile.am: A number of small build fixes to allow "make
1501 distcheck" to succeed.
1503 * mono/example/Makefile.am: "make distcheck" fixes.
1505 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
1508 * test/Makefile.am: "make distcheck" fixes.
1510 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1512 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
1514 * doc/busconfig.dtd: update the DTD for the at_console attribute.
1516 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
1517 messages after the first one (bug #1389).
1519 * bus/dispatch.c (check_double_hello_message): add a test case for
1520 the double hello message bug.
1521 (check_existent_service_activation): fix check of spawning error.
1523 2004-09-16 David Zeuthen <david@fubar.dk>
1525 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
1527 2004-09-12 David Zeuthen <david@fubar.dk>
1529 Patch from Kay Sievers <kay.sievers@vrfy.org>
1531 * bus/bus.c (bus_context_new):
1533 * bus/main.c (usage)
1535 Add commandline option --nofork to override configuration file
1538 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1540 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
1541 compilers don't like it (bug #974).
1543 2004-09-04 Harald Fernengel <harry@kdevelop.org>
1545 * qt/connection.*: Applied patch by Jérôme Lodewyck
1546 <lodewyck@clipper.ens.fr> to integrate an existing
1547 connection into the Qt eventloop
1549 2004-08-30 Jon Trowbridge <trow@ximian.com>
1551 * mono/BusDriver.cs: Added. This is a class for interacting with
1552 the org.freedesktop.DBus service.
1554 * mono/Message.cs: Added a mechanism to expose the message that is
1555 currently being dispatched via the static Message.Current
1556 property. Added Message.Sender and Message.Destination
1559 * mono/Handler.cs: Expose the dispatched message via
1560 Message.Current when handling method calls.
1562 * mono/Service.cs: Expose the dispatched message via
1563 Message.Current when handling signal emissions.
1565 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
1566 Connection.BaseService property.
1568 2004-08-28 Havoc Pennington <hp@redhat.com>
1570 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
1572 More fixes from Steve Grubb
1574 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
1575 (_dbus_listen_tcp_socket): fix fd leak
1577 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
1578 EINTR to a bit lower in the code
1580 2004-08-26 Jon Trowbridge <trow@ximian.com>
1582 * bus/driver.c (bus_driver_handle_service_exists): Respond with
1583 TRUE if we are inquiring about the existence of the built-in
1584 org.freedesktop.DBus service.
1586 2004-08-25 John Palmieri <johnp@redhat.com>
1587 * bus/config-parser.c:
1588 (struct PolicyType): Add POLICY_CONSOLE
1589 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
1590 (start_busconfig_child): Sets up console element when
1591 <policy at_console=""> is encountered in a policy file
1592 (append_rule_from_element): Convert console elements to console
1596 (bus_policy_create_client_policy): Add console rules to the client
1597 policy based on if the client is at the console
1598 (bus_policy_append_console_rule): New function for adding a
1599 console rule to a policy
1600 (bus_policy_merge): Handle console rule merging
1602 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
1603 where we check for console user files
1605 * dbus/dbus-sysdeps.c:
1606 (_dbus_file_exists): New function which checks if the given
1608 (_dbus_user_at_console): New function which does the system
1609 specific process of checking if the user is at the console
1611 * dbus/dbus-userdb.c:
1612 (_dbus_is_console_user): New function converts a UID to user name
1613 and then calls the system specific _dbus_user_at_console to
1614 see if the user is at the console and therefor a console user
1616 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
1618 * bus/config-parser.c (set_limit):
1619 * bus/dbus-daemon-1.1.in:
1620 * test/data/valid-config-files/many-rules.conf: set the
1621 max_match_rules_per_connection limt from the config file.
1623 * doc/busconfig.dtd: update the DTD.
1625 * bus/driver.c: remove some unused variables.
1627 2004-08-24 Mikael Hallendal <micke@imendio.com>
1629 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
1630 it's been replaced by dbus_g_bus_get
1632 2004-08-23 Colin Walters <walters@redhat.com>
1634 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1636 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
1638 * bus/selinux.c: Create a thread for policy reload notification.
1639 (bus_selinux_get_policy_root): Implement.
1641 * bus/config-parser.c (start_busconfig_child)
1642 (bus_config_parser_content): Support SELinux-root relative
1645 * configure.in <HAVE_SELINUX>: Add -lpthread.
1647 * bus/test-main.c (test_pre_hook, test_post_hook): New.
1648 (test_post_hook): Move memory checking into here.
1649 (test_pre_hook, test_post_hook): Move SELinux checks in
1650 here, but conditional on a DBUS_TEST_SELINUX environment
1651 variable. Unfortunately we can't run the SELinux checks
1652 as a normal user, since they won't have any permissions
1653 for /selinux. So this will have to be tested manually
1654 for now, until we have virtualization for most of
1657 2004-08-23 Havoc Pennington <hp@redhat.com>
1659 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
1660 drop supplementary groups, suggested by Steve Grubb
1662 2004-08-20 Colin Walters <walters@redhat.com>
1664 * bus/config-parser.c (start_busconfig_child): Remove some unused
1667 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
1670 2004-08-17 Joe Shaw <joeshaw@novell.com>
1672 * configure.in: If --enable-mono is passed in, if we can't find
1675 * mono/Makefile.am: Use /gacutil to install assemblies into the
1678 2004-08-12 Havoc Pennington <hp@redhat.com>
1680 * NEWS: update for 0.22
1682 * configure.in: release 0.22
1684 2004-08-11 Colin Walters <walters@redhat.com>
1686 * tools/dbus-send.c (main, usage): Add --reply-timeout
1689 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
1691 * bus/bus.c (process_config_first_time_only): get rid of an unused
1692 DBusError that was causing a memoy leak (bug #989).
1694 * dbus/dbus-keyring.c, dbus/dbus-message.c:
1695 fix compilation on Solaris/Forte C (bug #974)
1697 * bus/main.c (main): plug two minuscule memleaks.
1699 2004-08-10 Havoc Pennington <hp@redhat.com>
1701 * doc/dbus-tutorial.xml: add some more info on GLib bindings
1703 2004-08-09 Havoc Pennington <hp@redhat.com>
1705 * COPYING: switch to Academic Free License version 2.1 instead of
1706 2.0, to resolve complaints about patent termination clause.
1708 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
1710 * README: added documentation for the --enable-python
1713 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1715 * bus/config-parser.c (bus_config_parser_new): fix an invalid
1716 _unref in the SELinux support.
1718 * doc/busconfig.dtd: update DTD for SELinux support.
1720 * bus/config-loader-libxml.c: fix error handler and parser
1721 initialisation/cleanup. OOM test now works with libxml2 HEAD.
1723 * configure.in: remove the warning about libxml2.
1725 * dbus/dbus-bus.c: silence doxygen warning.
1727 2004-07-31 Colin Walters <walters@redhat.com>
1729 * configure.in: Move #error in SELinux check to its own line.
1731 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1733 * dbus/dbus-internals.h (_DBUS_SET_OOM):
1734 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
1737 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
1738 broken by the change in the _SET_OOM macros.
1740 2004-07-31 Colin Walters <walters@redhat.com>
1742 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
1745 2004-07-31 Colin Walters <walters@redhat.com>
1747 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
1748 to correctly detect DBUS__ACQUIRE_SVC. Also add an
1751 2004-07-24 Havoc Pennington <hp@redhat.com>
1753 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1755 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
1758 * configure.in: add --enable-selinux
1760 * bus/policy.c (bus_policy_merge): add FIXME to a comment
1762 * bus/main.c (main): initialize and shut down selinux
1764 * bus/connection.c: store SELinux ID on each connection, to avoid
1765 repeated getting of the string context and converting it into
1768 * bus/bus.c (bus_context_get_policy): new accessor, though it
1770 (bus_context_check_security_policy): check whether the security
1771 context of sender connection can send to the security context of
1772 recipient connection
1774 * bus/config-parser.c: add parsing for <selinux> and <associate>
1776 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
1777 implement dbus_connection_get_unix_fd()
1779 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
1780 function, used by the selinux stuff
1782 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
1784 * bus/config-loader-libxml.c: complete the implementation of
1785 libxml backend for config file loader. Doesn't work with full OOM
1788 * configure.in: change error when selecting libxml into a warning.
1790 * test/data/invalid-config-files: add two non-well-formed XML
1793 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
1795 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
1796 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
1797 be necessary to read all the buffer. (bug #894)
1799 * bus/activation.c (bus_activation_activate_service): fix a
1800 potential assertion failure (bug #896). Small optimization in the
1801 case of auto-activation messages.
1803 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
1804 add test case for byte-through-vararg bug (#901). patch by Kimmo
1807 2004-07-28 Anders Carlsson <andersca@gnome.org>
1810 * python/dbus_bindings.pyx.in:
1811 Add dbus.init_gthreads (), allow emit_signal to pass
1812 arguments to the signal.
1814 2004-07-24 Havoc Pennington <hp@redhat.com>
1816 * AUTHORS: add some people, not really comprehensively, let me
1817 know if I missed you
1819 2004-07-24 Havoc Pennington <hp@redhat.com>
1821 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
1824 * test/Makefile.am (DIST_SUBDIRS): here also
1826 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1828 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
1829 breaking build on Solaris, reported by Farhad Saberi on the ML.
1831 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
1832 va_arg invocation to account for integer promotion in the case of
1833 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
1835 * bus/services.c (bus_service_remove_owner): fix bug #902, use
1836 _dbus_list_get_first_link, not _dbus_list_get_first.
1838 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
1840 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
1841 handler functions so that the asserts in _dbus_object_subtree_unref
1844 * dbus/dbus-transport-unix.c (do_reading):
1845 _dbus_transport_queue_messages return value is of type
1846 dbus_bool_t, not DBusDispatchStatus.
1848 2004-07-19 David Zeuthen <david@fubar.dk>
1850 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
1853 (check_get_connection_unix_user): Debug says GetProperty; but the
1854 method is called GetConnectionUnixUser
1855 (check_get_connection_unix_process_id): New function
1856 (bus_dispatch_test): Actually call check_get_connection_unix_user();
1857 also call check_get_connection_unix_process_id()
1860 (bus_driver_handle_get_connection_unix_process_id): New function,
1861 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
1865 (handle_server_data_external_mech): Set pid from the credentials
1866 obtained from the socket
1868 * dbus/dbus-connection.c:
1869 (dbus_connection_get_unix_process_id): New function
1871 * dbus/dbus-connection.h:
1872 Add prototype for dbus_connection_get_unix_process_id
1874 * dbus/dbus-transport.c:
1875 (_dbus_transport_get_unix_process_id): New function
1877 * dbus/dbus-transport.h:
1878 Add prototype for _dbus_transport_get_unix_process_id
1880 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
1882 * dbus/dbus-message.c: Message counter fix, patch by Christian
1883 Hammond <chipx86@gnupdate.org>
1885 2004-07-18 Seth Nickell <seth@gnome.org>
1888 * python/dbus_bindings.pyx.in:
1889 * python/tests/test-client.py:
1891 Add dbus.ByteArray and dbus_bindings.ByteArray
1892 types so that byte streams can be passed back.
1894 Give jdahlin the heaps of credit that are so
1897 2004-07-12 Seth Nickell <seth@gnome.org>
1901 Add message argument to the default object_method_handler
1904 * python/dbus_bindings.pyx.in:
1906 Automatically return NIL when passed an empty list
1907 (we can't pass back a list since lists are typed
1908 and we don't have any idea what type the the client
1909 intended the list to be... :-( )
1911 2004-07-10 Seth Nickell <seth@gnome.org>
1913 * python/examples/Makefile.am:
1915 Fix distcheck breakage caused by new examples.
1917 2004-07-10 Seth Nickell <seth@gnome.org>
1921 Add "message" argument to service-side dbus.Object
1922 methods. This will break existing services written
1923 using the python bindings, but will allow extraction
1924 of all the message information (e.g. who its from).
1926 Add improved "object oriented" signal handling/emission.
1928 * python/examples/example-service.py:
1932 * python/examples/example-signal-emitter.py:
1933 * python/examples/example-signal-recipient.py:
1935 Two new examples that show how to emit and receive
1936 signals using the new APIs.
1938 * python/examples/example-signals.py:
1939 * python/examples/gconf-proxy-service.py:
1940 * python/examples/gconf-proxy-service2.py:
1942 Add "message" argument to service methods.
1944 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
1946 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
1947 * dbus/bus.c (dbus_bus_get_unix_user)
1948 * doc/dbus-specification.xml: implement GetConnectionUnixUser
1949 method of org.freedesktop.DBus interface.
1951 * bus/dispatch.c: test case
1953 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
1955 * python/Makefile.am: switched include directory from glib/ to dbus/
1956 since dbus-glib.h moved
1958 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
1960 * configure.in: prevent building the gcj stuff and libxml loader
1961 since they are broken.
1963 2004-06-20 Havoc Pennington <hp@redhat.com>
1965 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
1966 codes from the dbus error names
1968 * glib/dbus-glib.h: move to subdir dbus/ since it's included
1969 as dbus/dbus-glib.h and that breakage is now visible due to
1970 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
1972 * glib/dbus-glib.h: s/gproxy/g_proxy/
1974 * dbus/dbus-shared.h: new header to hold stuff shared with
1977 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
1980 * glib/dbus-glib.h (dbus_set_g_error): move to
1981 dbus-glib-lowlevel.h
1983 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
1984 of stuff to enable this
1986 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
1988 * a bunch of other changes with the same basic "separate glib
1989 bindings from dbus.h" theme
1991 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
1993 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
1995 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
1997 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1999 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2000 the reply value of the ServiceExists message.
2002 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2004 * python/dbus_bindings.pyx.in: No longer need to parse path
2005 elements and pass them as arrays of strings. The C API now
2006 accepts plain path strings.
2007 (_build_parsed_path): removed
2009 2004-06-07 Havoc Pennington <hp@redhat.com>
2011 * doc/TODO: remove auto-activation item since it's done; sort
2012 items by importance/milestone
2014 2004-06-07 Havoc Pennington <hp@redhat.com>
2016 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2017 random signature when using REQUIRED_FIELDS (this hack won't work
2020 * dbus/dbus-message.c: change the signature to be a header field,
2021 instead of message->signature special-case string. Incremental
2022 step forward. Then we can fix up code to send the signature in the
2023 message, then fix up code to validate said signature, then fix up
2024 code to not put the typecodes inline, etc.
2025 (load_one_message): don't make up the signature after the fact
2026 (decode_header_data): require signature field for the known
2029 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2031 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2033 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2035 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2037 * mono/Handler.cs: Updated to follow new path argument for
2038 (un-)registering objects.
2040 * mono/example/Makefile.am:
2042 * configure.in: Bumped required version for mono and use new -pkg
2045 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2047 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2048 registration functions take the path argument as char* instead of
2051 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2052 split off the path decompostion part of
2053 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2056 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2058 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2060 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2061 machine approach. A state is implemented as a function that
2062 handles incoming events as specified for that state.
2064 * doc/dbus-specification.xml: Update auth protocol state machine
2065 specification to match implementation. Remove some leftover
2068 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2070 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2071 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2074 * Doxyfile.in: remove deprecated options.
2076 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2077 glib/test-thread.h, glib/test-thread-client.c,
2078 glib/test-thread-server.c, glib/test-profile.c,
2079 glib/test-dbus-glib.c: remove these unused files.
2081 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2083 * dbus/dbus-object-tree.c
2084 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2085 non-fallback handlers (bug #684).
2086 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2087 (find_subtree_recurse): report wether the returned subtree is an
2088 exact match or a "fallback" match higher up in the tree.
2089 (object_tree_test_iteration): update test case.
2091 2004-06-01 Seth Nickell <seth@gnome.org>
2093 * python/dbus_bindings.pyx.in:
2094 * python/tests/test-client.py:
2096 Round off basic type support. Add dicts (yay!), and
2097 remaining array types.
2099 Make MessageIter more general so it works for dicts too.
2101 Mark all loop variables as C integers.
2103 2004-05-31 Havoc Pennington <hp@redhat.com>
2105 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2108 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2110 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2111 option that runs the tests, and start filling in some code
2112 including for starters just dumping the interfaces to stdout
2114 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2116 * test/data/valid-introspection-files/lots-of-types.xml: test of
2117 an example introspection file
2119 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2122 2004-05-31 Seth Nickell <seth@gnome.org>
2124 * python/dbus_bindings.pyx.in:
2125 * python/tests/test-client.py:
2130 Fix string array memory trashing bug... oops...
2132 2004-05-30 Seth Nickell <seth@gnome.org>
2136 Add a nicer-but-less-flexible alternate API for handling
2137 calls to virtual objects in dbus.ObjectTree.
2139 Screw up the argument order to the dbus.Object constructor
2140 for consistency with dbus.ObjectTree (and to make dbus_methods
2141 optional for future extension)
2143 * python/examples/Makefile.am:
2144 * python/examples/gconf-proxy-service.py:
2145 * python/examples/gconf-proxy-service2.py:
2147 Alternate implementation of gconf-proxy-service using the
2148 nicer dbus.ObjectTree API.
2150 * python/examples/example-service.py:
2151 * python/tests/test-server.py
2153 Reverse the argument order to deal with dbus.Object constructor
2156 2004-05-30 Seth Nickell <seth@gnome.org>
2158 * python/examples/example-client.py:
2159 * python/examples/example-service.py:
2161 Take it back. Lists seem to work but they're broken
2162 in the test suite. Make the base examples use
2165 2004-05-30 Seth Nickell <seth@gnome.org>
2167 * python/dbus_bindings.pyx.in:
2168 * python/tests/test-client.py:
2170 Add some more tests and fix errors that crop up.
2171 Unfortunately, currently it seems like marshalling
2172 and unmarshalling of lists is completely broken :-(
2174 2004-05-30 Seth Nickell <seth@gnome.org>
2176 * python/dbus_bindings.pyx.in:
2178 Add support for ObjectPath type.
2182 Refactor message handling code to a common function.
2184 * python/tests/test-client.py:
2185 * python/tests/test-server.py:
2187 Add tests that check to make sure values of all types
2188 can be echoed from a service w/o mangling.
2190 2004-05-29 Seth Nickell <seth@gnome.org>
2194 Add ObjectTree class which allows implementation
2195 of trees of "virtual" objects. Basically the python
2196 wrapper for "register_fallback".
2198 * python/examples/Makefile.am
2199 * python/examples/gconf-proxy-client.py:
2200 * python/examples/gconf-proxy-service.py:
2202 Implement a simple GConf proxy service that supports
2203 get/set on string and int GConf keys using the ObjectTree.
2205 2004-05-29 Seth Nickell <seth@gnome.org>
2208 * python/examples/example-client.py:
2209 * python/examples/example-service.py:
2210 * python/examples/list-system-services.py:
2212 Add SessionBus, SystemBus and ActivationBus classes
2213 so you don't need to know the special little BUS_TYPE
2216 2004-05-29 Havoc Pennington <hp@redhat.com>
2218 * bus/config-parser.c (process_test_valid_subdir): temporarily
2219 stop testing config parser OOM handling, since expat has issues
2220 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2222 * bus/dbus-daemon-1.1.in: change requested_reply to
2223 send_requested_reply/receive_requested_reply so we can send the
2224 replies, not just receive them.
2226 * bus/config-parser.c: parse the new
2227 send_requested_reply/receive_requested_reply
2229 * bus/policy.c (bus_client_policy_check_can_send): add
2230 requested_reply argument and use it
2232 * bus/bus.c (bus_context_check_security_policy): pass through
2233 requested_reply status to message send check
2235 * bus/system.conf.in: adapt to requested_reply change
2237 2004-05-28 Havoc Pennington <hp@redhat.com>
2239 * test/glib/test-service-glib.c (main): remove unused variable
2241 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2243 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2244 from the enum, no longer in use.
2246 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2249 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2250 whether error_name passed in is a valid error name.
2252 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2254 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2255 OBJECT_PATH and OBJECT_PATH_ARRAY
2257 2004-05-28 Seth Nickell <seth@gnome.org>
2259 * python/examples/Makefile.am:
2261 Forget to add Makefile.am. Do not pass go.
2263 2004-05-28 Michael Meeks <michael@ximian.com>
2265 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2268 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2270 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2271 (_dbus_message_iter_get_basic_type_array): impl.
2272 drastically simplify ~all relevant _get methods to use these.
2273 (_dbus_message_iter_append_basic_array),
2274 (dbus_message_iter_append_basic): impl
2275 drastically simplify ~all relevant _append methods to use these.
2277 * dbus/dbus-message-builder.c (parse_basic_type)
2278 (parse_basic_array, lookup_basic_type): impl.
2279 (_dbus_message_data_load): prune scads of duplicate /
2282 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2283 (_dbus_demarshal_basic_type): implement,
2284 (demarshal_and_validate_len/arg): beef up debug.
2285 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2287 2004-05-27 Seth Nickell <seth@gnome.org>
2290 * python/Makefile.am:
2292 Include the example python apps in the tarball.
2294 * python/examples/list-system-services.py
2296 Add a python new example that fetches the list of services
2297 from the system bus.
2299 2004-05-27 Seth Nickell <seth@gnome.org>
2302 * python/dbus_bindings.pyx.in:
2304 Fix failure to notify that a signal was not handled,
2305 resulted in hung functions.
2307 2004-05-25 Colin Walters <walters@redhat.com>
2309 * tools/dbus-monitor.c (main): Monitor all types of messages.
2311 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2313 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2314 which unregisters the object path and disposes the handler.
2316 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2318 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2320 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2321 operands to && so we call dbus_message_iter_next () for the last
2324 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2326 * dbus/dbus-object-tree.c
2327 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2328 children even if the requested path isn't registered.
2329 (object_tree_test_iteration): test object_tree_list_registered.
2331 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2334 2004-05-20 Kristian Høgsberg <krh@redhat.com>
2336 * doc/TODO: Remove resolved items.
2338 * bus/expirelist.h (struct BusExpireList): remove unused n_items
2341 * bus/connection.c (bus_connections_expect_reply): Enforce the
2342 per-connection limit on pending replies.
2344 Patch from Jon Trowbridge <trow@ximian.com>:
2346 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
2347 up a watch that triggers a config reload when one end of the pipe
2349 (signal_handler): Instead of doing the config reload in our SIGHUP
2350 handler, just write to the reload pipe and let the associated
2351 watch handle the reload when control returns to the main loop.
2353 * bus/driver.c (bus_driver_handle_reload_config): Added.
2354 Implements a ReloadConfig method for requesting a configuration
2355 file reload via the bus driver.
2357 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
2359 * HACKING: Updated release instructions concerning the wiki page.
2361 2004-05-18 Kristian Høgsberg <krh@redhat.com>
2363 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2364 filter against auth->allowed_mechs; we only add allowed mechs in
2365 record_mechanisms().
2367 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2368 ALLOWED_MECHS to auth-script format so we can set the list of
2371 * data/auth/client-out-of-mechanisms.auth-script: New test to
2372 check client disconnects when it is out of mechanisms to try.
2374 * dbus/dbus-auth.c (process_command): Remove check for lines
2375 longer that 1 MB; we only buffer up maximum 16 kB.
2377 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2378 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2379 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2380 assume there might be unused bytes.
2382 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2383 client-out-of-mechs, it is handled in process_reject(). Move check
2384 for max failures to send_rejected(), as it's a server-only thing.
2386 * dbus/dbus-auth.c: Factor out protocol reply code into functions
2387 send_auth(), send_data(), send_rejected(), send_error(),
2388 send_ok(), send_begin() and send_cancel().
2390 2004-05-17 Kristian Høgsberg <krh@redhat.com>
2392 Remove base64 encoding, replace with hex encoding. Original patch
2393 from trow@ximian.com, added error handling.
2395 * dbus/dbus-string.c (_dbus_string_base64_encode)
2396 (_dbus_string_base64_decode): Remove.
2397 (_dbus_string_hex_decode): Add end_return argument so we can
2398 distinguish between OOM and invalid hex encoding.
2399 (_dbus_string_test): Remove base64 tests and add test case for
2402 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
2403 Replace base64 with hex.
2405 * test/data/auth/invalid-hex-encoding.auth-script: New test case
2406 for invalid hex encoded data in auth protocol.
2408 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2410 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
2413 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2415 * mono/dbus-sharp.dll.config.in: Added for GAC
2416 * mono/dbus-sharp.snk: Added for GAC
2417 * mono/Assembly.cs.in: Added for GAC
2418 * mono/Makefile.am: Changes for GAC installation
2419 * configure.in: Added refs for dbus-sharp.dll.config.in and
2420 Assembly.cs.in. More fixes for mono testing
2421 * mono/example/Makefile.am: Changed var to CSC
2422 * Makefile.am: Changed flag name to DBUS_USE_CSC
2424 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2426 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
2427 * mono/doc/*: Added documentation framework
2428 * configure.in: Added monodoc check
2429 * README: Added description of mono configure flags
2431 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
2433 * doc/dbus-specification.xml: Added a "Required" column to the
2434 header fields table and changed the "zero or more" verbage in
2435 the above paragraph to read "The header must contain the required
2436 named header fields and zero or more of the optional named header
2438 * test/data/invalid-messages/*.message: Added the required PATH
2439 named header field to the tests so that they don't fail on
2440 'Missing path field'
2442 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
2444 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
2445 the stack by implicitly defining variable and parameter types and
2446 removing the hack of defining C pointers as python objects and later
2449 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
2451 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
2453 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
2455 * mono/DBusType/Dict.cs: Handle empty dicts
2456 * mono/DBusType/Array.cs: Handle empty arrays
2457 * mono/Arguments.cs: Handle empty arguments
2459 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
2461 * dbus-sharp.pc.in: Modified to include include Libs and Requires
2464 2004-04-25 Kristian Høgsberg <krh@redhat.com>
2466 * test/data/valid-messages/standard-*.message: Update message
2467 test scripts to new header field names.
2469 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
2471 * test/break-loader.c (randomly_do_n_things): tracked down buffer
2472 overflow to times_we_did_each_thing array which would chop off the
2473 first character of the failure_dir string. Increased the size of
2474 the array to 7 to reflect the number of random mutation functions
2477 2004-04-21 Kristian Høgsberg <krh@redhat.com>
2479 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
2480 unix_server->watch here, it is unreffed in disconnect.
2481 (_dbus_server_new_for_tcp_socket): convert NULL host to
2482 "localhost" here so we don't append NULL to address.
2484 * dbus/dbus-server.c (_dbus_server_test): Add test case for
2485 various addresses, including tcp with no explicit host.
2487 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2489 * dbus/dbus-message.c (decode_header_data, decode_string_field):
2490 fix incorrect setting of .name_offset in the HeaderField (it was
2491 off by two bytes, positioned right after the name and typecode)
2493 * bus/bus.c (bus_context_new, bus_context_unref): test before
2494 calling dbus_server_free_data_slot and _dbus_user_database_unref
2495 in case of an error.
2497 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
2500 2004-04-19 Kristian Høgsberg <krh@redhat.com>
2502 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
2503 _dbus_poll() instead of select().
2505 2004-04-15 Jon Trowbridge <trow@ximian.com>
2507 * bus/main.c (signal_handler): Reload the configuration files
2509 (main): Set up our SIGHUP handler.
2511 * bus/bus.c (struct BusContext): Store the config file, user and
2512 fork flag in the BusContext.
2513 (process_config_first_time_only): Added. Contains the code
2514 (previously in bus_context_new) for setting up the BusContext from
2515 the BusConfigParser that should only be run the first time the
2516 config files are read.
2517 (process_config_every_time): Added. Contains the code (previously
2518 in bus_context_new) for setting up the BusContext from the
2519 BusConfigParser that should be run every time the config files are
2521 (load_config): Added. Builds a BusConfigParser from the config
2522 files and passes the resulting structure off to
2523 process_config_first_time_only (assuming this is the first time)
2524 and process_config_every_time.
2525 (bus_context_new): All of the config-related code has been moved
2526 to process_config_first_time_only and process_config_every_time.
2527 Now this function just does the non-config-related initializations
2528 and calls load_config.
2529 (bus_context_reload_config): Added.
2531 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
2533 * bus/driver.c (bus_driver_handle_get_service_owner):
2534 implement a GetServiceOwner method.
2535 * doc/dbus-specification.xml: document it.
2536 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
2538 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
2539 implement, using the bus GetServiceOwner method.
2541 * test/glib/test-dbus-glib.c:
2542 use dbus_gproxy_new_for_service_owner so that we can receive the
2545 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
2547 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2548 dbus/dbus-message.c, dbus/dbus-protocol.h
2549 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
2551 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2552 dbus/dbus-message.c, dbus/dbus-protocol.h
2553 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
2555 * dbus/dbus-internals.c (_dbus_header_field_to_string):
2556 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
2557 DBUS_HEADER_FIELD_SENDER resolves to "sender"
2559 * doc/dbus-specification.xml (Header Fields Table):
2560 s/SERVICE/DESTINATION
2561 s/SENDER_SERVICE/SENDER
2564 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
2566 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
2569 2004-04-13 Michael Meeks <michael@ximian.com>
2571 * glib/dbus-gobject.c (handle_introspect): split out
2572 (introspect_properties): this.
2573 (handle_introspect): implement this.
2575 * test/glib/Makefile.am: use the absolute path so the bus
2576 daemon's chdir ("/") doesn't kill us dead.
2578 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
2580 2004-04-12 Jon Trowbridge <trow@ximian.com>
2582 * bus/config-parser.c (struct BusConfigParser): Added
2583 included_files field.
2584 (seen_include): Added. Checks whether or not a file has already
2585 been included by any parent BusConfigParser.
2586 (bus_config_parser_new): Copy the parent's included_files.
2587 (include_file): Track which files have been included, and fail on
2588 circular inclusions.
2589 (process_test_valid_subdir): Changed printf to report if we are
2590 testing valid or invalid conf files.
2591 (all_are_equiv): Changed printf to be a bit clearer about
2592 what we are actually doing.
2593 (bus_config_parser_test): Test invalid configuration files.
2595 2004-04-09 Jon Trowbridge <trow@ximian.com>
2597 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
2598 argument. If non-null, the newly-constructed BusConfigParser will
2599 be initialized with the parent's BusLimits instead of the default
2601 (include_file): When including a config file, pass in
2602 the current parser as the parent and then copy the BusLimits
2603 from the included BusConfigParser pack to the current parser.
2604 (process_test_valid_subdir): Renamed from process_test_subdir.
2605 (process_test_equiv_subdir): Added. Walks through a directory,
2606 descending into each subdirectory and loading the config files
2607 it finds there. If any subdirectory contains two config files
2608 that don't produce identical BusConfigParser structs, fail.
2609 For now, the BusConfigParser's BusPolicies are not compared.
2610 (bus_config_parser_test): Call both process_test_valid_subdir and
2611 process_test_equiv_subdir.
2613 * bus/config-loader-libxml.c (bus_config_load): Take a parent
2614 argument and pass it along to the call to bus_config_parser_new.
2615 Also made a few small changes to allow this code to compile.
2617 * bus/config-loader-expat.c (bus_config_load): Take a parent
2618 argument and pass it along to the call to bus_config_parser_new.
2620 * bus/bus.c (bus_context_new): Load the config file
2621 with a NULL parent argument.
2623 2004-03-29 Michael Meeks <michael@ximian.com>
2625 * glib/dbus-gobject.c (introspect_properties): split
2626 out, fix mangled 'while' flow control.
2627 (introspect_signals): implement.
2628 (handle_introspect): update.
2630 2004-03-29 Michael Meeks <michael@ximian.com>
2632 * glib/dbus-gobject.c (set_object_property): split out /
2633 re-work, use the property type, and not the message type(!)
2634 (get_object_property): ditto.
2636 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
2637 (dbus_gvalue_marshal): make this code re-usable, needed
2638 for signals too, also on both proxy and server side.
2639 Re-write for more efficiency / readability.
2641 2004-03-29 Michael Meeks <michael@ximian.com>
2643 * dbus/dbus-message.c
2644 (dbus_message_new_error_printf): impl.
2646 * dbus/dbus-connection.c
2647 (dbus_connection_unregister_object_path): fix warning.
2649 * configure.in: fix no-mono-installed situation.
2651 2004-03-27 Havoc Pennington <hp@redhat.com>
2653 Patch from Timo Teräs:
2655 * tools/dbus-send.c (main): if --print-reply, assume type is
2656 method call; support boolean type args
2658 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
2659 bunch of memleak and logic bugs
2661 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2663 * mono/Arguments.cs:
2664 * mono/Introspector.cs:
2666 * mono/InterfaceProxy.cs:
2668 * mono/ProxyBuilder.cs:
2670 Added InterfaceProxy class to avoid building proxies for every
2674 * dbus-message.c (dbus_message_append_args_valist)
2675 (dbus_message_iter_get_object_path)
2676 (dbus_message_iter_get_object_path_array)
2677 (dbus_message_iter_append_object_path)
2678 (dbus_message_iter_append_object_path_array):
2679 Added object_path iter functions to handle OBJECT_PATH arguments
2681 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2683 First checkin of mono bindings.
2686 Build stuff for the bindings
2687 * dbus-sharp.pc.in: Added for pkgconfig
2689 2004-03-21 Havoc Pennington <hp@redhat.com>
2691 * test/test-service.c (main): remove debug spew
2693 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2695 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
2698 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
2699 (dbus_message_iter_init_array_iterator)
2700 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
2701 indicate whether the iterator is empty
2703 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
2706 2004-03-19 Havoc Pennington <hp@redhat.com>
2708 * NEWS: 0.21 updates
2710 * configure.in: 0.21
2712 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
2714 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
2715 you don't need pyrex to make dist
2717 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
2720 2004-03-18 Richard Hult <richard@imendio.com>
2722 * dbus/dbus-message.c (dbus_message_get_auto_activation)
2723 (dbus_message_set_auto_activation): Add doxygen docs.
2725 2004-03-16 Richard Hult <richard@imendio.com>
2727 * bus/activation.c: (bus_activation_service_created),
2728 (bus_activation_send_pending_auto_activation_messages),
2729 (bus_activation_activate_service):
2731 * bus/dispatch.c: (bus_dispatch),
2732 (check_nonexistent_service_auto_activation),
2733 (check_service_auto_activated),
2734 (check_segfault_service_auto_activation),
2735 (check_existent_service_auto_activation), (bus_dispatch_test):
2736 * bus/driver.c: (bus_driver_handle_activate_service):
2737 * bus/services.c: (bus_registry_acquire_service):
2738 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
2739 (dbus_message_get_auto_activation):
2740 * dbus/dbus-message.h:
2741 * dbus/dbus-protocol.h: Implement auto-activation.
2743 * doc/dbus-specification.xml: Add auto-activation to the spec.
2745 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
2747 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
2748 fix a bug with CUSTOM types.
2750 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
2751 a unit test for this bug (used to fail).
2753 2004-03-12 Mikael Hallendal <micke@imendio.com>
2756 (babysitter_watch_callback): notify all pending activations waiting for
2757 the same exec that the activation failed.
2758 (bus_activation_activate_service): shortcut the activation if we
2759 already waiting for the same executable to start up.
2761 2004-03-12 Mikael Hallendal <micke@imendio.com>
2764 - Added service file reloading.
2765 Each service files directory is kept in an hash table in
2766 BusActivation and each BusActivationEntry knows what .service-file it
2767 was read from. So when you try to activate a service the bus will
2768 check if it's been updated, removed or if new .service-files has
2770 - Test code at the bottom for the service file reloading.
2771 * bus/test-main.c: (main):
2773 - added service reloading test.
2774 * dbus/dbus-sysdeps.c:
2775 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
2777 2004-03-08 Michael Meeks <michael@ximian.com>
2779 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
2780 bail immediately if disconnected, to avoid busy loop.
2782 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
2783 cleanup cut/paste/inefficiency.
2785 2004-03-01 David Zeuthen <david@fubar.dk>
2787 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
2788 bug where args were used twice. This bug resulted in a segfault
2789 on a Debian/PPC system when starting the messagebus daemon. Include
2790 dbus-sysdeps.h for DBUS_VA_COPY
2792 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
2794 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
2795 appropriate va_copy implementation. From GLib
2797 2004-02-24 Joe Shaw <joe@ximian.com>
2799 * bus/services.c (bus_registry_acquire_service): We need to pass
2800 in the service name to dbus_set_error() to prevent a crash.
2802 2003-12-26 Anders Carlsson <andersca@gnome.org>
2804 * AUTHORS: Reveal my True identity.
2806 2003-12-17 Mikael Hallendal <micke@imendio.com>
2808 * dbus/dbus-message.c: (dbus_message_append_args_valist):
2809 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
2811 2003-12-13 Mikael Hallendal <micke@imendio.com>
2813 * doc/TODO: Added not about better error check of configuration files.
2815 2003-12-02 Richard Hult <richard@imendio.com>
2817 * Update AFL version to 2.0 throughout the source files to reflect
2818 the update that was done a while ago.
2820 2003-12-02 Richard Hult <richard@imendio.com>
2822 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
2823 wrote_dict_key to FALSE on the iter that the dict is appended to,
2824 just like when appending other types. Fixes a bug where a dict
2825 couldn't be put inside a dict.
2826 (dbus_message_iter_append_dict_key): Fix typo in warning message.
2827 (message_iter_test, _dbus_message_test): Add test case for dict
2830 2003-12-01 David Zeuthen <david@fubar.dk>
2832 * python/dbus.py: Add the actual message when calling the reciever
2833 of a signal such that parameters can be inspected. Add the method
2834 remove_signal_receiver
2836 2003-11-26 Mikael Hallendal <micke@imendio.com>
2840 * glib/*.[ch]: Made ref functions return the pointer
2842 2003-11-25 Zack Rusin <zack@kde.org>
2844 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
2846 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
2849 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
2850 the Integrator and to better fit with the server,
2852 2003-11-24 Zack Rusin <zack@kde.org>
2854 * qt/connection.h, qt/connection.cpp: removing initDbus method since
2855 the integrator handles it now
2857 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
2858 since QTimer wasn't really meant to be used the way DBusTimeout is
2860 2003-11-24 Zack Rusin <zack@kde.org>
2862 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
2863 Integrator class which integrates D-BUS with the Qt event loop,
2865 * qt/connection.h, qt/connection.cpp: Move all the code which
2866 was dealing with D-BUS integration to the Integrator class,
2867 and start using Integrator,
2869 2003-11-23 Zack Rusin <zack@kde.org>
2871 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
2874 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
2875 switching namespaces to DBusQt, reworking the class,
2877 * Makefile.cvs: switching dependencies so that it matches KDE
2880 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
2883 2003-11-19 Havoc Pennington <hp@redhat.com>
2887 * configure.in: bump version to 0.20
2889 * configure.in (have_qt): add yet another place to look for qt
2890 (someone hand trolltech a .pc file...)
2892 2003-11-01 Havoc Pennington <hp@redhat.com>
2894 * doc/dbus-specification.xml: add state machine docs on the auth
2895 protocol; just a first draft, I'm sure it's wrong.
2897 2003-10-28 David Zeuthen <david@fubar.dk>
2899 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
2900 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
2902 2003-10-28 Havoc Pennington <hp@redhat.com>
2904 * dbus/dbus-message.c (get_next_field): delete unused function
2906 2003-10-28 Havoc Pennington <hp@redhat.com>
2908 * bus/expirelist.c (do_expiration_with_current_time): detect
2909 failure of the expire_func due to OOM
2911 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
2913 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
2914 NoReply error that's now created by the bus when the service exits
2916 2003-10-28 Havoc Pennington <hp@redhat.com>
2918 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
2919 tests for set_path, set_interface, set_member, etc.
2921 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
2923 * dbus/dbus-message.c (set_string_field): always just delete and
2924 re-append the field; accept NULL for deletion
2925 (re_align_fields_recurse): reimplement
2927 2003-10-26 Havoc Pennington <hp@redhat.com>
2929 * dbus/dbus-connection.c: fix docs to properly describe the
2930 disconnected message
2931 (_dbus_connection_notify_disconnected): remove this function;
2932 we can't synchronously add the disconnected message, we have to
2933 do it after we've queued any remaining real messages
2934 (_dbus_connection_get_dispatch_status_unlocked): queue the
2935 disconnect message only if the transport has finished queueing all
2936 its real messages and is disconnected.
2937 (dbus_connection_disconnect): update the dispatch status here
2939 2003-10-22 Havoc Pennington <hp@redhat.com>
2941 * bus/bus.c (bus_context_check_security_policy): fix up assertion
2943 * bus/connection.c (bus_transaction_send_from_driver): set the
2944 destination to the connection's base service
2946 2003-10-20 Havoc Pennington <hp@redhat.com>
2948 hmm, make check is currently not passing.
2950 * doc/dbus-specification.xml: add requirement that custom type
2951 names follow the same rules as interface names.
2953 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
2954 duplication and allow 'c' to be 'custom'; dict is now 'm' for
2957 * doc/dbus-specification.xml: update type codes to match
2958 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
2959 CUSTOM. Add type OBJECT_PATH to the spec.
2961 2003-10-17 Havoc Pennington <hp@redhat.com>
2963 * bus/driver.c (create_unique_client_name): use "." as separator
2964 in base service names instead of '-'
2966 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
2967 byte at the end of the string
2969 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
2970 optimization macros since string validation seems to be a slow
2973 * doc/dbus-specification.xml: restrict valid
2974 service/interface/member/error names. Add test suite code for the
2977 * dbus/dbus-string.c: limit service/interface/member/error names
2980 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
2981 format arg to verbose spew
2983 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
2984 memory, return instead of g_error
2986 * test/test-service.c (path_message_func): support emitting a
2989 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
2990 activation bus type if DBUS_BUS_ACTIVATION was set; default to
2991 assuming the activation bus was the session bus so that services
2992 started manually will still register.
2993 (init_connections_unlocked): fix so that in OOM situation we get
2994 the same semantics when retrying the function
2996 * test/test-service.c (main): change to use path registration, to
2997 test those codepaths; register with DBUS_BUS_ACTIVATION rather
2998 than DBUS_BUS_SESSION
3000 2003-10-16 Havoc Pennington <hp@redhat.com>
3002 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3004 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3005 coverage of the tests
3006 (coverage-report.txt): don't move the .da and .bbg files around
3008 2003-10-16 Havoc Pennington <hp@redhat.com>
3010 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3013 2003-10-16 Havoc Pennington <hp@redhat.com>
3015 * bus/connection.c (bus_pending_reply_expired): either cancel or
3017 (bus_connections_check_reply): use unlink, not remove_link, as we
3018 don't want to free the link; fixes double free mess
3020 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3021 where no reply was received
3023 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3026 * bus/signals.c (match_rule_matches): add special cases for the
3027 bus driver, so you can match on sender/destination for it.
3029 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3030 DBUS_PRINT_BACKTRACE is set
3032 * dbus/dbus-internals.c: add pid to assertion failure messages
3034 * dbus/dbus-connection.c: add message type code to the debug spew
3036 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3037 sender=foo not service=foo
3039 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3040 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3041 DBUS_ACTIVATION_ADDRESS instead
3043 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3044 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3046 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3049 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3050 (dbus_message_iter_get_object_path_array): new function (half
3051 finished, disabled for the moment)
3053 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3054 DBUS_MESSAGE_TYPE_ERROR
3056 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3057 avoid redirecting stderr to /dev/null
3058 (babysit): close stdin if not doing the "exit_with_session" thing
3060 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3061 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3062 stdout/stdin, so things don't get confused
3064 * bus/system.conf.in: fix to allow replies, I modified .conf
3065 instead of .conf.in again.
3067 2003-10-14 David Zeuthen <david@fubar.dk>
3069 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3070 argtype to arg_type when raising unknown arg type exception.
3071 Changed type list to reflect the changes in dbus-protocol.h so
3072 the bindings actually work.
3074 2003-10-14 Havoc Pennington <hp@redhat.com>
3076 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3077 to have a bug keeping it from outputting the .da files sometimes
3078 (string_get_string): don't append garbage nul bytes to the string.
3080 2003-10-15 Seth Nickell <seth@gnome.org>
3082 * python/Makefile.am:
3084 Include dbus_h_wrapper.h in the dist tarball.
3086 2003-10-14 Havoc Pennington <hp@redhat.com>
3088 * bus/bus.c (bus_context_check_security_policy): revamp this to
3089 work more sanely with new policy-based requested reply setup
3091 * bus/connection.c (bus_transaction_send_from_driver): set bus
3092 driver messages as no reply
3094 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3095 requested_reply attribute on allow/deny rules
3097 * bus/system.conf: add <allow requested_reply="true"/>
3099 * bus/driver.c (bus_driver_handle_message): fix check for replies
3100 sent to the bus driver, which was backward. How did this ever work
3101 at all though? I think I'm missing something.
3103 * dbus/dbus-message.c (decode_header_data): require error and
3104 method return messages to have a reply serial field to be valid
3105 (_dbus_message_loader_queue_messages): break up this function;
3106 validate that reply serial and plain serial are nonzero;
3107 clean up the OOM/error handling.
3108 (get_uint_field): don't return -1 from this
3109 (dbus_message_create_header): fix signed/unsigned bug
3111 * bus/connection.c (bus_connections_expect_reply): save serial of
3112 the incoming message, not reply serial
3114 2003-10-14 Havoc Pennington <hp@redhat.com>
3116 * bus/connection.c: implement pending reply tracking using
3119 * bus/bus.c (bus_context_check_security_policy): verify that a
3120 reply is pending in order to allow a reply to be sent. Deny
3121 messages of unknown type.
3123 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3125 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3126 (bus_context_get_reply_timeout): new
3128 2003-10-13 Seth Nickell <seth@gnome.org>
3130 * python/Makefile.am:
3132 Pass "make distcheck": remove a couple files from DIST_FILES
3133 that weren't included in the final version.
3135 2003-10-12 Havoc Pennington <hp@pobox.com>
3137 Added test code that 1) starts an actual bus daemon and 2) uses
3138 DBusGProxy; fixed bugs that were revealed by the test. Lots
3139 more testing possible, but this is the basic framework.
3141 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3142 empty proxy lists from the proxy list hash
3144 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3145 couple of return_if_fail checks
3147 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3148 to allocate, so everything is cleared to NULL as it should be.
3150 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3151 source as data to dbus_connection_set_timeout_functions() as the
3152 timeout functions expected
3154 * test/glib/run-test.sh: add a little script to start up a message
3155 bus and run tests using it
3157 * tools/dbus-launch.1: updates
3159 * tools/dbus-launch.c (main): add --config-file option
3161 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3162 that could never be reached.
3164 * dbus/dbus-message.c (dbus_message_new_method_return)
3165 (dbus_message_new_error, dbus_message_new_signal): set the
3166 no-reply-expected flag on all these. Redundant, but may
3167 as well be consistent.
3169 2003-10-11 Havoc Pennington <hp@pobox.com>
3171 * test/decode-gcov.c (function_solve_graph): make broken block
3172 graph a nonfatal error since it seems to be broken. Need to debug
3175 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3176 can't just check type > INVALID < LAST anymore
3178 * dbus/dbus-message.c (dbus_message_get_signature): new function
3179 (dbus_message_has_signature): new function
3180 (struct DBusMessage): add signature field (right now it isn't sent
3181 over the wire, just generated on the fly)
3182 (dbus_message_copy): copy the signature, and init strings to
3183 proper length to avoid some reallocs
3184 (dbus_message_iter_init_array_iterator): return void, since it
3186 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3187 (_dbus_message_loader_queue_messages): add silly temporary hack to
3188 fill in message->signature on load
3190 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3191 characters, so they are relatively human-readable.
3193 2003-10-11 Havoc Pennington <hp@pobox.com>
3195 * dbus/dbus-message.c (_dbus_message_test): add more test
3196 coverage, but #if 0 for now since they uncover a bug
3197 not fixed yet; I think in re_align_field_recurse()
3198 (re_align_field_recurse): add FIXME about broken assertion
3200 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3202 * bus/connection.c: share a couple code bits with expirelist.c
3204 * bus/expirelist.h, bus/expirelist.c: implement a generic
3205 expire-items-after-N-seconds facility, was going to share between
3206 expiring connections and replies, decided not to use for expiring
3207 connections for now.
3209 * COPYING: include AFL 2.0 (still need to change all the file headers)
3211 2003-10-09 Havoc Pennington <hp@redhat.com>
3213 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3214 gcc 3.3. Not that we do anything about it yet.
3216 * bus/signals.c (bus_match_rule_parse): impose max length on the
3219 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3221 2003-10-09 Havoc Pennington <hp@redhat.com>
3223 Make matching rules theoretically work (add parser).
3225 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3226 the case where destination is explicitly specified as bus driver
3227 and someone else is eavesdropping.
3229 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3230 definition of eavesdropping and assertion
3232 * tools/dbus-send.c (main): use dbus_message_type_from_string
3234 * bus/signals.c (bus_match_rule_parse): implement
3236 * dbus/dbus-message.c (dbus_message_type_from_string): new
3238 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3240 2003-10-02 Havoc Pennington <hp@pobox.com>
3242 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3243 dbus_gproxy_oneway_call
3245 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3246 (dbus_server_setup_with_g_main): fix to allow calling them more
3247 than once on the same args
3248 (dbus_bus_get_with_g_main): new function
3250 2003-10-02 Havoc Pennington <hp@redhat.com>
3252 * doc/dbus-tutorial.xml: write some stuff
3254 2003-09-29 Havoc Pennington <hp@pobox.com>
3256 * configure.in: split checks for Doxygen from XML docs, check for
3259 * doc/Makefile.am: XML-ify all the docs, and add a blank
3262 2003-09-29 Havoc Pennington <hp@pobox.com>
3264 * Merge dbus-object-names branch. To see the entire patch
3265 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3266 it's huuuuge though.
3267 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3269 2003-09-28 Havoc Pennington <hp@pobox.com>
3271 * HACKING: update to reflect new server
3273 2003-09-26 Seth Nickell <seth@gnome.org>
3276 * python/examples/example-signals.py:
3278 Start implementing some notions of signals. The API
3279 is really terrible, but they sort of work (with the
3280 exception of being able to filter by service, and to
3281 transmit signals *as* a particular service). Need to
3282 figure out how to make messages come from the service
3285 * python/dbus_bindings.pyx.in:
3287 Removed duplicate message_handler callbacks.
3289 2003-09-25 Havoc Pennington <hp@redhat.com>
3291 * bus/session.conf.in: fix my mess
3293 2003-09-25 Havoc Pennington <hp@pobox.com>
3295 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3297 2003-09-25 Seth Nickell <seth@gnome.org>
3299 * python/examples/example-service.py:
3301 Johan notices complete wrong code in example-service, but
3302 completely wrong in a way that works exactly the same (!).
3303 Johan is confused, how could this possibly work? Example
3304 code fails to serve purpose of making things clear.
3307 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3309 * doc/dbus-specification.sgml: don't require header fields
3310 to be 4-byte aligned and specify that fields should be
3311 distinguished from padding by the fact that zero is not
3314 * doc/TODO: remove re-alignment item and add item to doc
3315 the OBJECT_PATH type.
3317 * dbus/dbus-message.c:
3318 (HeaderField): rename the original member to value_offset
3319 and introduce a name_offset member to keep track of where
3320 the field actually begins.
3321 (adjust_field_offsets): remove.
3322 (append_int_field), (append_uint_field),
3323 (append_string_field): don't align the start of the header
3324 field to a 4-byte boundary.
3325 (get_next_field): impl finding the next marhsalled field
3326 after a given field.
3327 (re_align_field_recurse): impl re-aligning a number of
3328 already marshalled fields.
3329 (delete_field): impl deleting a field of any type and
3330 re-aligning any following fields.
3331 (delete_int_or_uint_field), (delete_string_field): remove.
3332 (set_int_field), (set_uint_field): no need to re-check
3333 that we have the correct type for the field.
3334 (set_string_field): ditto and impl re-aligning any
3336 (decode_header_data): update to take into account that
3337 the fields aren't 4-byte aligned any more and the new
3338 way to distinguish padding from header fields. Also,
3339 don't exit when there is too much header padding.
3340 (process_test_subdir): print the directory.
3341 (_dbus_message_test): add test to make sure a following
3342 field is re-aligned correctly after field deletion.
3344 * dbus/dbus-string.[ch]:
3345 (_dbus_string_insert_bytes): rename from insert_byte and
3346 allow the insert of multiple bytes.
3347 (_dbus_string_test): test inserting multiple bytes.
3349 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3350 warning note to docs about having to re-align any
3351 marshalled values following the string.
3353 * dbus/dbus-message-builder.c:
3354 (append_string_field), (_dbus_message_data_load):
3355 don't align the header field.
3357 * dbus/dbus-auth.c: (process_test_subdir): print the
3360 * test/break-loader.c: (randomly_add_one_byte): upd. for
3363 * test/data/invalid-messages/bad-header-field-alignment.message:
3366 * test/data/valid-messages/unknown-header-field.message: shove
3367 a dict in the unknown field.
3369 2003-09-25 Seth Nickell <seth@gnome.org>
3372 * python/dbus_bindings.pyx.in:
3374 Handle return values.
3376 * python/examples/example-client.py:
3377 * python/examples/example-service.py:
3379 Pass back return values from the service to the client.
3381 2003-09-24 Seth Nickell <seth@gnome.org>
3385 Connect Object methods (when you are sharing an object) up... pass
3386 in a list of methods to be shared. Sharing all the methods just
3387 worked out too weird. You can now create nice Services over the
3390 * python/dbus_bindings.pyx.in:
3392 Keep references to user_data tuples passed into C functions so
3393 Python doesn't garbage collect on us.
3395 Implement MethodReturn and Error subclasses of Message for creating
3396 DBusMessage's of those types.
3398 * python/examples/example-client.py:
3399 * python/examples/example-service.py:
3401 Simple example code showing both how create DBus services and objects,
3402 and how to use them.
3404 2003-09-23 Havoc Pennington <hp@pobox.com>
3406 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
3408 2003-09-23 Havoc Pennington <hp@redhat.com>
3410 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
3411 (dbus_gproxy_disconnect_signal): implement
3412 (dbus_gproxy_manager_remove_signal_match): implement
3413 (dbus_gproxy_manager_add_signal_match): implement
3414 (dbus_gproxy_oneway_call): implement
3416 2003-09-23 Havoc Pennington <hp@pobox.com>
3418 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
3419 subclass. This means dropping the transparent thread safety of the
3420 proxy; you now need a separate proxy per-thread, or your own
3421 locking on the proxy. Probably right anyway.
3422 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
3424 2003-09-22 Havoc Pennington <hp@redhat.com>
3426 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
3428 2003-09-21 Seth Nickell <seth@gnome.org>
3430 First checkin of the Python bindings.
3432 * python/.cvsignore:
3433 * python/Makefile.am:
3434 * python/dbus_bindings.pyx.in:
3435 * python/dbus_h_wrapper.h:
3437 Pieces for Pyrex to operate on, building a dbus_bindings.so
3438 python module for low-level access to the DBus APIs.
3442 High-level Python module for accessing DBus objects.
3447 Build stuff for the python bindings.
3451 Extra macro needed for finding the Python C header files.
3453 2003-09-21 Havoc Pennington <hp@pobox.com>
3455 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
3456 implementing the proxy manager, didn't get very far.
3458 * dbus/dbus-bus.c (dbus_bus_add_match): new
3459 (dbus_bus_remove_match): new
3461 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
3462 path_name argument; adjust the other not-yet-implemented
3463 gproxy constructors to be what I think they should be.
3465 2003-09-21 Havoc Pennington <hp@pobox.com>
3467 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
3468 by default for message bus connections.
3470 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
3471 exit_on_disconnect flag is set and we process the disconnected
3473 (dbus_connection_set_exit_on_disconnect): new function
3475 2003-09-21 Havoc Pennington <hp@pobox.com>
3477 Get matching rules mostly working in the bus; only actually
3478 parsing the rule text remains. However, the client side of
3479 "signal connections" hasn't been started, this patch is only the
3482 * dbus/dispatch.c: fix for the matching rules changes
3484 * bus/driver.c (bus_driver_handle_remove_match)
3485 (bus_driver_handle_add_match): send an ack reply from these
3488 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
3489 arguments, reported by Seth Nickell
3491 * bus/config-parser.c (append_rule_from_element): support
3492 eavesdrop=true|false attribute on policies so match rules
3493 can be prevented from snooping on the system bus.
3495 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
3496 and "destination" in attribute names; fix some docs bugs;
3497 add eavesdrop=true|false attribute
3499 * bus/driver.c (bus_driver_handle_add_match)
3500 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
3503 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
3504 rid of broadcast service concept, signals are just always broadcast
3506 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
3507 mostly implement matching rules stuff (currently only exposed as signal
3510 2003-09-21 Mark McLoughlin <mark@skynet.ie>
3512 * doc/dbus-specification.sgml: Change the header field name
3513 to be an enum and update the rest of the spec to reference
3514 the fields using the conventinal name.
3516 * dbus/dbus-protocol.h: update to reflect the spec.
3518 * doc/TODO: add item to remove the 4 byte alignment requirement.
3520 * dbus/dbus-message.c: Remove the code to generalise the
3521 header/body length and serial number header fields as named
3522 header fields so we can reference field names using the
3524 (append_int_field), (append_uint_field), (append_string_field):
3525 Append the field name as a byte rather than four chars.
3526 (delete_int_or_uint_field), (delete_string_field): reflect the
3527 fact that the field name and typecode now occupy 4 bytes instead
3529 (decode_string_field), (decode_header_data): update to reflect
3530 protocol changes and move the field specific encoding from
3531 decode_string_field() back into decode_header_data().
3533 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
3534 Add utility to aid debugging.
3536 * dbus/dbus-message-builder.c:
3537 (append_string_field), (_dbus_message_data_load): Update to
3538 reflect protocol changes; Change the FIELD_NAME directive
3539 to HEADER_FIELD and allow it to take the field's conventional
3540 name rather than the actual value.
3542 * test/data/*/*.message: Update to use HEADER_FIELD instead
3543 of FIELD_NAME; Always align the header on an 8 byte boundary
3544 *before* updating the header length.
3546 2003-09-15 Havoc Pennington <hp@pobox.com>
3548 * dbus/dbus-pending-call.c: add the get/set object data
3549 boilerplate as for DBusConnection, etc. Use generic object data
3550 for the notify callback.
3552 * glib/dbus-gparser.c (parse_node): parse child nodes
3554 * tools/dbus-viewer.c: more hacking on the dbus-viewer
3556 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
3557 contain functions shared between the convenience lib and the
3560 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
3561 -export-symbols-regex to the GLib library
3563 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
3564 fix the locking in here, and add a default handler for
3565 Introspect() that just returns sub-nodes.
3567 2003-09-14 Havoc Pennington <hp@pobox.com>
3569 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
3570 rather than gfoo consistent
3572 * glib/dbus-gproxy.h: delete for now, move contents to
3573 dbus-glib.h, because the include files don't work right since we
3574 aren't in the dbus/ subdir.
3576 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
3577 (dbus_gproxy_end_call): finish
3578 (dbus_gproxy_begin_call): finish
3580 * glib/dbus-gmain.c (dbus_set_g_error): new
3582 * glib/dbus-gobject.c (handle_introspect): include information
3583 about child nodes in the introspection
3585 * dbus/dbus-connection.c (dbus_connection_list_registered): new
3586 function to help in implementation of introspection
3588 * dbus/dbus-object-tree.c
3589 (_dbus_object_tree_list_registered_and_unlock): new function
3591 2003-09-12 Havoc Pennington <hp@pobox.com>
3593 * glib/dbus-gidl.h: add common base class for all the foo_info
3596 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
3599 * test/Makefile.am: try test srcdir -ef . in addition to test
3600 srcdir = ., one of them should work (yeah lame)
3602 * glib/Makefile.am: build the "idl" parser stuff as a convenience
3605 * glib/dbus-gparser.h: make description_load routines return
3606 NodeInfo* not Parser*
3608 * Makefile.am (SUBDIRS): build test dir after all library dirs
3610 * configure.in: add GTK+ detection
3612 2003-09-07 Havoc Pennington <hp@pobox.com>
3614 * Make Doxygen contented.
3616 2003-09-07 Havoc Pennington <hp@pobox.com>
3618 * doc/dbus-specification.sgml: more updates
3620 2003-09-06 Havoc Pennington <hp@pobox.com>
3622 * doc/dbus-specification.sgml: partial updates
3624 * bus/dbus-daemon-1.1.in: fix the config file docs for the
3625 zillionth time; hopefully I edited the right file this time.
3627 * bus/config-parser.c (append_rule_from_element): support
3628 send_type, send_path, receive_type, receive_path
3630 * bus/policy.c: add message type and path to the list of things
3631 that can be "firewalled"
3633 2003-09-06 Havoc Pennington <hp@pobox.com>
3635 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
3636 (dbus_connection_register_object_path): make this not handle
3637 messages to paths below the given path
3639 2003-09-03 Havoc Pennington <hp@pobox.com>
3641 * test/glib/Makefile.am: add this with random glib-linked test
3644 * glib/Makefile.am: remove the random test programs from here,
3645 leave only the unit tests
3647 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
3648 uscore/javacaps conversion, and fix
3649 (get_object_property, set_object_property): change to .NET
3650 convention for mapping props to methods, set_FooBar/get_FooBar,
3651 since one language has such a convention we may as well copy it.
3652 Plus real methods in either getFooBar or get_foo_bar style won't
3653 collide with this convention.
3655 2003-09-01 Havoc Pennington <hp@pobox.com>
3657 * glib/dbus-gparser.c: implement
3659 * glib/dbus-gobject.c: start implementing skeletons support
3661 * configure.in: when disabling checks/assert, also define
3662 G_DISABLE_ASSERT and G_DISABLE_CHECKS
3664 2003-09-01 Havoc Pennington <hp@pobox.com>
3666 * glib/Makefile.am: rearrange a bunch of files and get "make
3667 check" framework set up
3669 2003-08-31 Havoc Pennington <hp@pobox.com>
3671 * fix build with --disable-tests
3673 2003-08-30 Havoc Pennington <hp@pobox.com>
3675 * dbus/dbus-connection.c: purge DBusMessageHandler
3677 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
3678 use callbacks everywhere
3680 2003-08-30 Havoc Pennington <hp@pobox.com>
3682 * test/data/valid-config-files/system.d/test.conf: change to
3683 root for the user so warnings don't get printed
3685 * dbus/dbus-message.c: add dbus_message_get_path,
3686 dbus_message_set_path
3688 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
3689 dispatching to a path
3691 * dbus/dbus-string.c (_dbus_string_validate_path): add
3693 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
3694 (_dbus_marshal_object_path): implement
3696 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
3697 to contain the path to the target object
3698 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
3699 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
3701 2003-08-30 Havoc Pennington <hp@pobox.com>
3703 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
3705 2003-08-29 Havoc Pennington <hp@pobox.com>
3707 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
3709 (struct DBusObjectSubtree): shrink this
3710 a lot, since we may have a lot of them
3711 (_dbus_object_tree_free_all_unlocked): implement
3712 (_dbus_object_tree_dispatch_and_unlock): implement
3714 2003-08-29 Havoc Pennington <hp@pobox.com>
3716 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
3718 2003-08-28 Havoc Pennington <hp@pobox.com>
3722 * dbus/dbus-connection.c: port to no ObjectID, create a
3723 DBusObjectTree, rename ObjectTree to ObjectPath in public API
3725 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
3726 everything except UnregisterFunction and MessageFunction
3728 * dbus/dbus-marshal.c: port away from DBusObjectID,
3729 add DBUS_TYPE_OBJECT_PATH
3731 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
3732 dbus/dbus-objectid.[hc]: remove these, we are moving to
3733 path-based object IDs
3735 2003-08-25 Havoc Pennington <hp@pobox.com>
3737 Just noticed that dbus_message_test is hosed, I wonder when I
3738 broke that. I thought make check was passing earlier...
3740 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
3741 container tree, will replace most of dbus-object-registry
3743 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
3746 2003-08-19 Havoc Pennington <hp@pobox.com>
3748 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
3749 (dbus_message_is_error): fix this function
3751 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
3754 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
3755 reflect clarified man page
3756 (bus_client_policy_check_can_send): ditto
3758 * bus/session.conf.in: fixup
3760 * bus/system.conf.in: fixup
3762 2003-08-18 Havoc Pennington <hp@redhat.com>
3764 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
3766 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3767 dumb bug created earlier (wrong order of args to
3768 decode_header_data())
3770 * tools/dbus-send.c: port
3772 * tools/dbus-print-message.c (print_message): port
3774 * test/data/*messages: port all messages over
3776 * dbus/dbus-message-builder.c: support including
3779 * bus/driver.c: port over
3781 * bus/dispatch.c: port over to new stuff
3783 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3784 rename disconnect signal to "Disconnected"
3786 2003-08-17 Havoc Pennington <hp@pobox.com>
3788 This doesn't compile yet, but syncing up so I can hack on it from
3789 work. What are branches for if not broken code? ;-)
3791 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
3792 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
3793 DBUS_HEADER_FIELD_ERROR_NAME
3795 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
3796 for the interface+member pairs
3797 (string_hash): change to use g_str_hash algorithm
3798 (find_direct_function, find_string_function): refactor these to
3801 * dbus/dbus-message.c: port all of this over to support
3802 interface/member fields instead of name field
3804 * dbus/dbus-object-registry.c: port over
3806 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
3807 from _dbus_string_validate_name
3809 * bus/dbus-daemon-1.1: change file format for the
3810 <deny>/<allow> stuff to match new message naming scheme
3812 * bus/policy.c: port over
3814 * bus/config-parser.c: parse new format
3816 2003-08-16 Havoc Pennington <hp@pobox.com>
3818 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
3821 * glib/dbus-gproxy.c: some hacking
3823 2003-08-15 Havoc Pennington <hp@redhat.com>
3825 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
3827 * dbus/dbus-connection.c
3828 (dbus_connection_send_with_reply_and_block): factor out internals;
3829 change to convert any error replies to DBusError instead of
3830 returning them as a message
3832 2003-08-15 Havoc Pennington <hp@pobox.com>
3834 * dbus/dbus-connection.c,
3835 dbus/dbus-pending-call.c: Finish the pending call stuff
3837 2003-08-14 Havoc Pennington <hp@redhat.com>
3839 * dbus/dbus-pending-call.c: start on new object that will replace
3840 DBusMessageHandler and ReplyHandlerData for tracking outstanding
3843 * dbus/dbus-gproxy.c: start on proxy object used to communicate
3844 with remote interfaces
3846 * dbus/dbus-gidl.c: do the boring boilerplate in here
3848 2003-08-12 Havoc Pennington <hp@pobox.com>
3850 * bus/dispatch.c (bus_dispatch): make this return proper
3851 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
3853 * dbus/dbus-errors.c (dbus_set_error): use
3854 _dbus_string_append_printf_valist
3856 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
3857 (_dbus_string_append_printf): new
3859 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
3862 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
3863 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
3864 message is unhandled.
3866 2003-08-11 Havoc Pennington <hp@pobox.com>
3868 * bus/test.c (client_disconnect_handler): change to return
3869 HANDLED (would have been REMOVE_MESSAGE)
3871 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
3872 HANDLED/NOT_YET_HANDLED instead of
3873 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
3876 2003-08-10 Havoc Pennington <hp@pobox.com>
3878 * tools/dbus-send.c (main): add --type argument, for now
3879 supporting only method_call and signal types.
3881 * tools/dbus-print-message.c: print message type
3883 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3884 init connection->objects
3886 * doc/dbus-specification.sgml: fix sgml
3888 * bus/*.c: port over to object-instance API changes
3890 * test/test-service.c: ditto
3892 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
3893 name, we will have to fix up the rest of the code to also handle
3895 (dbus_message_new): generic message-creation call
3896 (set_string_field): allow appending name field
3898 2003-08-06 Havoc Pennington <hp@pobox.com>
3900 * dbus/dbus-object-registry.c: implement signal connection
3903 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
3905 * dbus/dbus-internals.c (_dbus_memdup): new function
3907 2003-08-02 Havoc Pennington <hp@pobox.com>
3909 * dbus/dbus-message.c (dbus_message_get_no_reply)
3910 (dbus_message_set_no_reply): add these and remove
3911 set_is_error/get_is_error
3913 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
3914 remove the ERROR flag, since there's now an ERROR type
3916 2003-08-01 Havoc Pennington <hp@pobox.com>
3918 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
3921 * dbus/dbus-message.c (dbus_message_get_type): new function
3923 * doc/dbus-specification.sgml: add "type" byte to messages
3925 2003-08-01 Havoc Pennington <hp@pobox.com>
3927 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
3928 a message type enum to distinguish kinds of message
3929 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
3930 that need not be replied to
3932 2003-08-01 Havoc Pennington <hp@pobox.com>
3934 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
3935 (unpack_8_octets): fix no-64-bit-int bug
3937 * dbus/dbus-object-registry.c (validate_id): validate the
3938 connection ID bits, not just the instance ID.
3940 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
3941 the connection-global 33 bits of the object ID
3943 * dbus/dbus-object-registry.c (info_from_entry): fill in
3944 object ID in the new way
3946 * dbus/dbus-objectid.h: rather than high/low bits, specifically
3947 define server/client/instance bits.
3949 2003-07-30 Havoc Pennington <hp@pobox.com>
3951 * dbus/dbus-connection.c (dbus_connection_register_object): fix
3954 2003-07-13 Havoc Pennington <hp@pobox.com>
3956 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
3957 fields to DBusObjectVTable and DBusObjectInfo
3959 2003-07-12 Havoc Pennington <hp@pobox.com>
3961 * dbus/dbus-object-registry.c: implement unit test,
3962 fix bugs discovered in process
3964 * dbus/dbus-connection.c: remove handler_table and
3965 register_handler(), add DBusObjectRegistry usage
3967 * dbus/dbus-objectid.c (dbus_object_id_is_null)
3968 (dbus_object_id_set_null): new functions
3970 2003-07-08 Havoc Pennington <hp@pobox.com>
3972 * dbus/dbus-object.c: implement some of this
3974 * dbus/dbus-object-registry.c
3975 (_dbus_object_registry_add_and_unlock): fill in the object_id out
3977 (_dbus_object_registry_new): handle OOM
3979 2003-07-08 Havoc Pennington <hp@pobox.com>
3981 * dbus/dbus-object.h: sketch out an API for registering objects
3982 with a connection, that allows us to use as little as 24 bytes
3983 per object and lets application code represent an object in
3984 any conceivable way.
3986 * dbus/dbus-object-registry.c: implement the hard bits of the
3987 DBusConnection aspect of object API. Not yet wired up.
3989 2003-07-06 Havoc Pennington <hp@pobox.com>
3991 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
3992 (_dbus_marshal_object_id): new
3993 (_dbus_demarshal_object_id): new
3994 (_dbus_marshal_get_arg_end_pos): support object ID type, and
3995 consolidate identical switch cases. Don't conditionalize handling
3996 of DBUS_TYPE_UINT64, need to handle the type always.
3997 (_dbus_marshal_validate_arg): consolidate identical cases, and
3998 handle DBUS_TYPE_OBJECT_ID
4000 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4002 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4004 2003-09-28 Havoc Pennington <hp@pobox.com>
4008 2003-09-28 Havoc Pennington <hp@pobox.com>
4010 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4011 to work with Debian db2html
4013 2003-09-28 Havoc Pennington <hp@pobox.com>
4015 * configure.in: 0.13
4017 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4018 stylesheet-images for benefit of Debian
4020 Change back to using filesystem-linked sockets for the system
4021 bus, so only root can create the default system bus address.
4023 * bus/system.conf.in: change to use
4024 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4026 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4029 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4030 here, and AC_DEFINE DBUS_SYSTEM_PATH
4032 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4035 * doc/busconfig.dtd:
4038 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4040 * doc/dbus-specification.sgml:
4041 Add activation reply values.
4043 2003-08-05 Havoc Pennington <hp@redhat.com>
4045 * configure.in: 0.12
4047 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4049 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4050 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4051 (add_watch), (remove_watch), (create_source):
4052 Refcount fds, fixes some reentrancy issues.
4054 2003-07-30 Havoc Pennington <hp@redhat.com>
4056 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4057 bus address to be abstract if we have abstract sockets
4061 2003-07-28 Havoc Pennington <hp@redhat.com>
4063 * bus/messagebus.in: fix to avoid processname/servicename
4064 confusion, from Michael Kearey
4065 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4067 2003-07-23 Havoc Pennington <hp@pobox.com>
4069 * dbus/dbus-message.c (dbus_message_iter_get_named):
4070 fix from Andy Hanton to remove broken "+1"
4072 2003-07-16 Havoc Pennington <hp@pobox.com>
4074 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4075 babysitter process, as suggested by Thomas Leonard, so
4076 an "eval `dbus-launch --exit-with-session`" will actually
4079 2003-07-16 Havoc Pennington <hp@pobox.com>
4081 * configure.in: print out EXPANDED_* variables in the summary at
4082 the end; clean up the code that computes EXPANDED_ variables and
4083 get the ones using exec_prefix right. Should make things work
4084 when you build without --prefix
4086 2003-06-29 Havoc Pennington <hp@pobox.com>
4088 * mono/Test.cs (class Test): fire up a main loop and run it
4090 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4091 done once, the app has to do it
4093 2003-06-26 Havoc Pennington <hp@pobox.com>
4095 * mono/Connection.cs: set up connection with the glib main loop
4097 2003-07-01 Havoc Pennington <hp@redhat.com>
4099 * doc/dbus-specification.sgml: clarify the format of a type code,
4100 change suggested by Jim Blandy
4102 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4105 * tools/Makefile.am: Don't assume srcdir == builddir.
4107 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4108 the allocated block.
4109 (_dbus_memory_test): New function.
4110 * dbus/dbus-test.h: Add _dbus_memory_test ().
4111 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4113 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4115 (dbus_message_new): Remove obsolete @todo.
4117 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4118 (_dbus_marshal_set_uint64): Fix comment.
4120 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4121 hardcode FIELD_REPLY_SERIAL.
4123 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4124 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4126 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4127 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4129 2003-06-24 Havoc Pennington <hp@pobox.com>
4131 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4133 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4139 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4140 * gcj/org/.cvsignore:
4141 * gcj/org/Makefile.am:
4142 * gcj/org/freedesktop/.cvsignore:
4143 * gcj/org/freedesktop/Makefile.am:
4144 * gcj/org/freedesktop/dbus/.cvsignore:
4145 * gcj/org/freedesktop/dbus/Makefile.am:
4146 * gcj/org/freedesktop/dbus/Message.java: (Message),
4148 * gcj/org/freedesktop/dbus/natMessage.cc:
4149 Fix the build system.
4151 2003-06-22 Havoc Pennington <hp@pobox.com>
4153 * mono/Connection.cs: add more bindings
4155 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4158 2003-06-22 Havoc Pennington <hp@pobox.com>
4160 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4161 Start wrapping more stuff.
4163 2003-06-22 Havoc Pennington <hp@pobox.com>
4165 * mono/Message.cs: implement Message.Wrap() that ensures we only
4166 have a single C# wrapper per DBusMessage, assuming it works which
4167 it probably doesn't.
4169 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4170 (dbus_message_free_data_slot): new
4171 (dbus_message_set_data): new
4172 (dbus_message_get_data): new
4174 2003-06-22 Havoc Pennington <hp@pobox.com>
4176 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4177 (_dbus_data_slot_allocator_alloc): rework these to keep a
4178 reference count on each slot and automatically manage a global
4179 slot ID variable passed in by address
4181 * bus/bus.c: convert to new dataslot API
4183 * dbus/dbus-bus.c: convert to new dataslot API
4185 * dbus/dbus-connection.c: convert to new dataslot API
4187 * dbus/dbus-server.c: convert to new dataslot API
4189 * glib/dbus-gmain.c: ditto
4193 * bus/connection.c: ditto
4195 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4197 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4198 after the gcj checks so that the correct configuration tags
4199 will be added to libtool.
4201 * dbus-glib-1.pc.in: No need to specify any includes since
4202 dbus-1.pc.in has those.
4204 2003-06-22 Havoc Pennington <hp@pobox.com>
4206 * mono/*, gcj/*, configure.in, Makefile.am:
4207 Check in makefiles and subdirs for mono and gcj bindings.
4208 Neither binding actually exists, just trying to get through
4209 all the build and other boring bits.
4211 2003-06-21 Philip Blundell <philb@gnu.org>
4213 * tools/dbus-monitor.1: Updated.
4215 * tools/dbus-send.1: Likewise.
4217 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4219 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4220 for hangup and error after checking read so we won't discard
4221 pending data if both hangup and read are set.
4223 2003-06-19 Philip Blundell <philb@gnu.org>
4225 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4227 * tools/dbus-send.c: Accept both --system and --session.
4229 * tools/dbus-monitor.c: Same here.
4231 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4233 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4234 from C++ (Patch by Miloslav Trmac).
4236 2003-06-15 Joe Shaw <joe@assbarn.com>
4238 * configure.in: Check for socklen_t.
4240 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4242 * test/test-segfault.c: Add #include <sys/time.h>
4244 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4245 dbus-launch needs it.
4247 2003-06-09 Havoc Pennington <hp@redhat.com>
4249 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4250 SUN_LEN, it breaks abstract socket usage
4252 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4255 2003-06-04 Havoc Pennington <hp@pobox.com>
4257 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4258 using unix:abstract=/foo, and when listening in a tmpdir
4259 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4261 * dbus/dbus-transport.c (_dbus_transport_open): support
4264 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4265 support abstract sockets
4267 * dbus/dbus-transport-unix.c
4268 (_dbus_transport_new_for_domain_socket): support abstract sockets
4270 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4271 toggle as an argument, implement abstract namespace support
4272 (_dbus_listen_unix_socket): ditto
4274 * configure.in: add --enable-abstract-sockets and implement
4275 a configure check for autodetection of the right value.
4277 2003-06-01 Havoc Pennington <hp@pobox.com>
4279 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4280 in /tmp (though on Linux this will end up being useless,
4281 when we add abstract namespace support)
4283 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4286 2003-05-28 Colin Walters <walters@verbum.org>
4288 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4290 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4292 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4294 2003-05-17 Colin Walters <walters@gnu.org>
4296 * tools/dbus-send.c: Don't exit with an error code if --help was
4297 passed. Default to using the session bus instead of the system
4300 * tools/dbus-launch.c: Ditto.
4302 * tools/dbus-monitor.c: Ditto.
4304 * tools/dbus-send.1: Update with new arguments.
4306 * tools/dbus-launch.c: Emit code to export variables. New
4307 arguments -s and -c to specify shell syntax, and a bit of code to
4308 autodetect syntax. Also, allow specifying a program to run.
4310 * tools/dbus-launch.1: Update with new arguments.
4312 * tools/dbus-send.1: Ditto.
4314 * tools/dbus-monitor.1: Ditto.
4316 2003-05-17 Havoc Pennington <hp@pobox.com>
4318 * bus/config-parser.c (merge_included): merge in policies from
4319 child configuration file.
4321 * bus/policy.c (bus_policy_merge): function to merge two policies
4324 2003-05-16 Havoc Pennington <hp@redhat.com>
4326 * dbus/dbus-connection.c: disable verbose lock spew
4328 * tools/dbus-send.c: add --print-reply command line option
4330 * tools/dbus-print-message.h (print_message): new util function
4331 shared by dbus-send and dbus-monitor
4333 * tools/dbus-monitor.c (handler_func): exit on disconnect
4335 * dbus/dbus-transport-unix.c (do_reading): if the transport is
4336 disconnected, don't try to use the read_watch
4338 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4339 so we can find this bug more easily
4341 2003-05-16 Havoc Pennington <hp@redhat.com>
4343 * bus/policy.c (free_rule_list_func): avoid a crash when passed
4344 NULL as DBusHashTable is annoyingly likely to do.
4346 2003-05-16 Colin Walters <walters@verbum.org>
4348 * tools/dbus-monitor.c: Add --session argument and usage()
4351 * tools/dbus-monitor.1: Update with new --session arg.
4353 * bus/Makefile.am (install-data-hook): Create
4354 $(libdir)/dbus-1.0/services so that the session bus is happy.
4356 2003-05-15 Havoc Pennington <hp@redhat.com>
4358 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4359 on non-x86. ifdef's are evil.
4361 2003-05-15 Havoc Pennington <hp@redhat.com>
4363 * configure.in: 0.11
4367 * bus/Makefile.am (initddir): apparently we are supposed to put
4368 init scripts in /etc/rc.d/init.d not /etc/init.d
4370 * bus/Makefile.am: remove the "you must --enable-tests to make
4371 check" as it broke distcheck
4373 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4375 2003-05-13 James Willcox <jwillcox@gnome.org>
4378 * bus/activation.c: (bus_activation_service_created),
4379 (bus_activation_activate_service):
4380 * bus/driver.c: (bus_driver_send_service_deleted),
4381 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4382 (bus_driver_send_service_acquired),
4383 (bus_driver_send_welcome_message),
4384 (bus_driver_handle_list_services):
4385 * bus/session.conf.in:
4386 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4387 (dbus_bus_service_exists), (dbus_bus_activate_service):
4390 Add some convenience API which lets you activate a service, and did a
4391 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
4392 and dbus_message_get_args()
4394 2003-05-11 Havoc Pennington <hp@pobox.com>
4396 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
4397 calling _dbus_marshal_validate_arg() for every byte in a byte
4400 * dbus/dbus-message-handler.c: use atomic reference counting to
4401 reduce number of locks slightly; the global lock in here sucks
4403 * dbus/dbus-connection.c
4404 (_dbus_connection_update_dispatch_status_and_unlock): variant of
4405 update_dispatch_status that can be called with lock held; then use
4406 in a couple places to reduce locking/unlocking
4407 (dbus_connection_send): hold the lock over the whole function
4408 instead of acquiring it twice.
4410 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
4412 * bus/connection.c (bus_connections_setup_connection): fix access
4413 to already-freed memory.
4415 * dbus/dbus-connection.c: keep a little cache of linked list
4416 nodes, to avoid using the global linked list alloc lock in the
4417 normal send-message case. Instead we just use the connection lock
4418 that we already have to take.
4420 * dbus/dbus-list.c (_dbus_list_find_last): new function
4422 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
4423 change to use a struct for the atomic type; fix docs,
4424 they return value before increment, not after increment.
4426 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
4427 (_dbus_string_append_8_aligned): new functions to try to
4428 microoptimize this operation.
4429 (reallocate_for_length): break this out of set_length(), to
4430 improve profile info, and also so we can consider inlining the
4433 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
4434 strings with some preallocation, cuts down on our calls to realloc
4435 a fair bit. Though if we can get the "move entire string to empty
4436 string" optimization below to kick in here, it would be better.
4438 * dbus/dbus-string.c (_dbus_string_move): just call
4439 _dbus_string_move_len
4440 (_dbus_string_move_len): add a special case for moving
4441 an entire string into an empty string; we can just
4442 swap the string data instead of doing any reallocs.
4443 (_dbus_string_init_preallocated): new function
4445 2003-05-11 Havoc Pennington <hp@pobox.com>
4447 Write a "test-profile" that does echo client-server with threads;
4448 profile reveals lock contention, memcpy/realloc of buffers, and
4449 UTF-8 validation as hot spots. 20% of lock contention eliminated
4450 with dbus_atomic_inc/dec implementation on x86. Much remaining
4451 contention is global mempool locks for GList and DBusList.
4453 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
4456 * dbus/dbus-connection.c (struct DBusConnection): use
4457 dbus_atomic_t for the reference count
4459 * dbus/dbus-message.c (struct DBusMessage): declare
4460 dbus_atomic_t values as volatile
4462 * configure.in: code to detect ability to use atomic integer
4463 operations in assembly, from GLib patch
4465 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
4466 time, tired of it being wrong in threads and forked processes
4468 * glib/test-profile.c: a little program to bounce messages back
4469 and forth between threads and eat CPU
4471 * dbus/dbus-connection.c: add debug spew macros for debugging
4472 thread locks; include config.h at top; fix deadlock in
4473 dbus_connection_flush()
4475 2003-05-08 Havoc Pennington <hp@pobox.com>
4477 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
4478 data from getting written, and there wasn't a good reason to
4481 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
4482 dbus_verbose lines in test coverage
4483 (main): add list of functions sorted by # of untested blocks
4484 to the coverage report
4486 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
4488 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
4490 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
4491 extend test coverage
4493 * test/data/auth/cancel.auth-script: test canceling an
4496 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
4497 aren't used. in CVS history if we end up needing them.
4499 2003-05-04 Havoc Pennington <hp@pobox.com>
4501 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
4504 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
4505 function, which assumed length was in # of strings, not bytes
4507 * dbus/dbus-message.c (_dbus_message_test): add tests for some
4510 * dbus/dbus-connection.c
4511 (_dbus_connection_queue_received_message): disable function for
4512 now, we are only using it in test mode
4514 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4515 remove a mistaken FIXME
4517 2003-05-04 Havoc Pennington <hp@pobox.com>
4519 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
4520 unlock mutex on successful return, patch from Anders Gustafsson
4522 2003-05-04 Havoc Pennington <hp@pobox.com>
4524 * dbus-glib-1.pc.in (Requires): fix dependencies, from
4527 2003-05-04 Havoc Pennington <hp@pobox.com>
4529 * tools/dbus-launch.c: implement
4531 * bus/main.c (main), bus/bus.c (bus_context_new):
4532 implement --print-pid and --fork
4534 2003-05-03 Havoc Pennington <hp@redhat.com>
4536 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4537 the address had no value, and add to test suite. Fix and
4538 regression test from Miloslav Trmac
4540 2003-05-03 Havoc Pennington <hp@pobox.com>
4542 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
4543 watch is invalid when handled
4545 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
4546 dbus-launch utility to launch the bus from a shell script. Didn't
4547 actually implement dbus-launch yet, it's just a placeholder still.
4549 2003-05-03 Havoc Pennington <hp@pobox.com>
4551 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
4552 daemon; also documents daemon config file, so replaces
4553 doc/config-file.txt. Corrected some stuff from config-file.txt in
4554 the process of moving it.
4556 2003-05-03 Havoc Pennington <hp@pobox.com>
4558 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
4561 2003-05-03 Colin Walters <walters@verbum.org>
4563 * dbus/dbus-sysdeps.c (fill_user_info): Test against
4564 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
4566 * Makefile.am: Update to use new .pc versioning scheme.
4568 2003-05-02 Havoc Pennington <hp@redhat.com>
4570 * bus/system.conf.in: allow send/receive to/from message bus
4573 2003-04-30 Havoc Pennington <hp@redhat.com>
4575 * configure.in: print a note when building with unit tests and
4578 2003-04-30 Havoc Pennington <hp@redhat.com>
4580 * Makefile.am: add a check-local that complains if you didn't
4581 configure with --enable-tests
4583 2003-04-29 Havoc Pennington <hp@redhat.com>
4585 * glib/dbus-gmain.c: docs cleanups
4587 * dbus/dbus-types.h: add docs on int64 types
4589 * dbus/dbus-memory.c: fix docs to avoid putting private API in
4590 public API docs section
4592 2003-04-29 Havoc Pennington <hp@redhat.com>
4594 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
4595 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
4596 parallel install API version, not with the D-BUS package version.
4598 * HACKING: move some of README over here
4600 * README: updates, and document API/ABI policy
4602 * configure.in: reindentation
4604 2003-04-29 Havoc Pennington <hp@redhat.com>
4606 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
4607 to use this library" to be sure people have the right
4610 2003-04-28 Havoc Pennington <hp@redhat.com>
4612 * configure.in: add --enable-docs which by default is auto yes if
4613 doxygen and db2html found, no otherwise; but can be forced on/off
4615 * doc/Makefile.am: conditionalize whether to build docs on
4618 2003-04-28 Havoc Pennington <hp@redhat.com>
4620 * configure.in: 0.10
4624 * bus/system.conf.in: add <includedir>system.d</includedir>
4626 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
4627 username was provided but not uid
4629 * bus/config-parser.c (struct BusConfigParser): keep track of
4630 whether the parser is toplevel or was included; change some
4631 of the error handling if it's included.
4633 2003-04-27 Havoc Pennington <hp@pobox.com>
4637 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4638 report correct status if we finish processing authentication
4639 inside this function.
4641 * bus/activation.c (try_send_activation_failure): use
4642 bus_transaction_send_error_reply
4644 * bus/connection.c (bus_connection_get_groups): return an error
4645 explaining the problem
4647 * bus/bus.c (bus_context_check_security_policy): implement
4648 restriction here that inactive connections can only send the
4649 hello message. Also, allow bus driver to send anything to
4652 * bus/connection.c (bus_connection_complete): create the
4653 BusClientPolicy here instead of on-demand.
4654 (bus_connection_get_policy): don't return an error
4656 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
4657 sender field in message being replied to
4659 * bus/bus.c (bus_context_check_security_policy): fix silly typo
4660 causing it to return FALSE always
4662 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
4663 we checked sender rather than destination
4665 2003-04-25 Havoc Pennington <hp@redhat.com>
4667 test suite is slightly hosed at the moment, will fix soon
4669 * bus/connection.c (bus_connections_expire_incomplete): fix to
4670 properly disable the timeout when required
4671 (bus_connection_set_name): check whether we can remove incomplete
4672 connections timeout after we complete each connection.
4674 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
4675 probably still broken.
4677 * bus/services.c (bus_registry_acquire_service): implement max
4678 number of services owned, and honor allow/deny rules on which
4679 services a connection can own.
4681 * bus/connection.c (bus_connection_get_policy): report errors here
4683 * bus/activation.c: implement limit on number of pending
4686 2003-04-25 Havoc Pennington <hp@redhat.com>
4688 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
4689 where we used >= 0 instead of != DBUS_UID_UNSET.
4691 2003-04-25 Havoc Pennington <hp@redhat.com>
4693 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
4694 were toggled without add/remove, fix from Anders Gustafsson
4696 2003-04-24 Havoc Pennington <hp@redhat.com>
4698 * test/data/valid-config-files/basic.conf: add <limit> tags to
4701 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
4702 <limit> tag in configuration file.
4704 2003-04-24 Havoc Pennington <hp@redhat.com>
4706 * bus/dispatch.c: somehow missed some name_is
4708 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
4709 (_dbus_timeout_set_interval): new
4711 * bus/connection.c (bus_connections_setup_connection): record time
4712 when each connection is first set up, and expire them after the
4713 auth timeout passes.
4715 2003-04-24 Havoc Pennington <hp@redhat.com>
4717 * dbus/dbus-message.c (dbus_message_name_is): rename
4718 (dbus_message_service_is): rename
4719 (dbus_message_sender_is): rename
4720 (dbus_message_get_service): rename
4722 2003-04-24 Havoc Pennington <hp@redhat.com>
4724 * configure.in: add --enable-checks
4726 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
4728 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
4729 to use thread locks.
4730 (_dbus_connection_handler_destroyed_locked): move some private
4731 functions into proper docs group
4733 * dbus/dbus-internals.h: add _dbus_return_if_fail,
4734 _dbus_return_val_if_fail
4736 Throughout: use dbus_return_if_fail
4738 2003-04-23 James Willcox <jwillcox@gnome.org>
4741 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
4742 (dbus_connection_setup_with_g_main),
4743 (dbus_server_setup_with_g_main):
4744 * glib/test-dbus-glib.c: (main):
4745 * glib/test-thread-client.c: (main):
4746 * glib/test-thread-server.c: (new_connection_callback), (main):
4747 * tools/dbus-monitor.c: (main):
4749 Added a GMainContext argument to dbus_connection_setup_with_g_main()
4750 and dbus_server_setup_with_g_main().
4752 2003-04-20 Havoc Pennington <hp@pobox.com>
4754 * doc/dbus-specification.sgml: document the restrictions on
4755 message and service names
4757 2003-04-22 Havoc Pennington <hp@redhat.com>
4759 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4760 support, and do some code cleanups to share more code and
4761 speed up array marshal/demarshal.
4763 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
4765 * configure.in: generate dbus-arch-deps.h
4767 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
4770 2003-04-22 Havoc Pennington <hp@redhat.com>
4772 * test/data/valid-messages/opposite-endian.message: fix test
4773 to use proper type for rply field
4775 * test/data/invalid-messages: add tests for below validation
4777 * dbus/dbus-message.c (decode_header_data): validate field types,
4778 and validate that named fields are valid names
4779 (decode_name_field): consider messages in the
4780 org.freedesktop.Local. namespace to be invalid.
4782 * dbus/dbus-string.c (_dbus_string_validate_name): new
4784 2003-04-19 Havoc Pennington <hp@pobox.com>
4786 * bus/driver.c (bus_driver_handle_hello): check limits and
4787 return an error if they are exceeded.
4789 * bus/connection.c: maintain separate lists of active and inactive
4790 connections, and a count of each. Maintain count of completed
4791 connections per user. Implement code to check connection limits.
4793 * dbus/dbus-list.c (_dbus_list_unlink): export
4795 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
4796 number of bytes in the message queue for a connection
4798 2003-04-18 Havoc Pennington <hp@pobox.com>
4800 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
4802 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
4805 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
4806 on realloc be sure to update the pointer in the keyring
4808 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
4809 offset to avoid writing to unallocated memory
4811 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
4812 try the next mechanism, so we properly handle OOM
4814 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
4816 (_dbus_keyring_new): fix OOM bug
4817 (_dbus_keyring_new_homedir): always set error; impose a maximum
4818 number of keys we'll load from the file, mostly to speed up the
4819 test suite and make its OOM checks more useful, but also for
4822 * dbus/dbus-auth.c (process_error_server): reject authentication
4823 if we get an error from the client
4824 (process_cancel): on cancel, send REJECTED, per the spec
4825 (process_error_client): send CANCEL if we get an error from the
4828 2003-04-18 Havoc Pennington <hp@pobox.com>
4830 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
4833 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
4836 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
4837 about DBUS_TEST_HOMEDIR once
4839 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
4842 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
4843 config file so we test the right thing
4845 Throughout: assorted docs improvements
4847 2003-04-18 Havoc Pennington <hp@pobox.com>
4849 * glib/dbus-gmain.c: adapt to watch changes
4851 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
4853 * dbus/dbus-server.h: remove dbus_server_handle_watch
4855 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
4857 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
4858 like DBusTimeout, so we don't need dbus_connection_handle_watch
4861 2003-04-17 Havoc Pennington <hp@redhat.com>
4863 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
4864 database usage so it all goes via the DBusUserDatabase cache.
4866 2003-04-17 Havoc Pennington <hp@redhat.com>
4868 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
4869 there was an OOM watch we skipped, we always return TRUE so we
4870 iterate again to have a look at it again. Fixes test suite hang.
4871 Code rearrangement also lets us lose some memset and only iterate
4872 over callbacks once.
4874 * bus/driver.c (bus_driver_handle_message): sense of test for
4877 2003-04-16 Havoc Pennington <hp@pobox.com>
4879 * doc/dbus-specification.sgml: make spec say serials are unsigned
4881 * dbus/dbus-message.h: change message serials to unsigned
4883 * dbus/dbus-connection.c: adapt to message serials being unsigned
4885 2003-04-15 Havoc Pennington <hp@pobox.com>
4887 * bus/bus.c: create and keep around a shared DBusUserDatabase
4890 * bus/connection.c (bus_connection_get_groups): don't cache
4891 groups for user in the connection object, since user database
4892 object now does that.
4894 2003-04-16 Havoc Pennington <hp@redhat.com>
4896 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
4897 list of size counters
4898 (_dbus_message_loader_putback_message_link): put back a popped link
4900 * dbus/dbus-connection.c
4901 (dbus_connection_set_max_live_messages_size): rename
4903 (dbus_connection_get_outgoing_size): get size of outgoing
4905 (_dbus_connection_set_connection_counter): remove this cruft
4907 2003-04-14 Havoc Pennington <hp@redhat.com>
4909 * dbus/dbus-userdb.c: user database abstraction, mostly to get
4910 caching, but at some point we might want to be able to use a
4913 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
4914 SHA1 conf file to test the sha1 auth mechanism, since the regular
4915 test always uses EXTERNAL when available.
4918 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
4919 add conf file that requires use of sha1 auth
4921 2003-04-13 Havoc Pennington <hp@pobox.com>
4923 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
4924 from Philip Blundell to send messages and monitor them.
4926 2003-04-13 Havoc Pennington <hp@pobox.com>
4928 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
4931 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
4934 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4935 fix to only recover unused bytes if we're already authenticated
4936 (_dbus_transport_get_is_authenticated): fix to still mark us
4937 authenticated if there are unused bytes.
4939 * bus/dispatch.c: implement security policy checking
4941 * bus/connection.c (bus_transaction_send_from_driver): new
4943 * bus/bus.c (bus_context_check_security_policy): new
4945 * bus/dispatch.c (send_service_nonexistent_error): delete this,
4946 now we just set the DBusError and it gets converted to an error
4949 * bus/connection.c (allow_user_function): enable code using actual
4950 data from the config file
4952 * bus/policy.c (list_allows_user): handle wildcard rules for
4953 user/group connection perms
4955 2003-04-13 Havoc Pennington <hp@pobox.com>
4957 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
4959 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
4961 * bus/policy.c (bus_policy_append_mandatory_rule)
4962 (bus_policy_append_default_rule, bus_policy_append_user_rule)
4963 (bus_policy_append_group_rule): new functions
4965 2003-04-12 Havoc Pennington <hp@pobox.com>
4967 * bus/config-parser.c (bus_config_parser_new): fix a memleak
4969 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
4970 the pid/gid/uid, just for paranoia.
4972 * test/break-loader.c (randomly_do_n_things): find a byte
4973 containing a type code, and randomly change it to a different
4976 2003-04-12 Havoc Pennington <hp@pobox.com>
4978 * bus/policy.h: change BusPolicy to be the thing from the config
4979 file, and rename old BusPolicy to BusClientPolicy
4981 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
4982 match change in how policy works
4984 * dbus/dbus-internals.h: mark assert_not_reached as
4985 __attribute((noreturn))__
4987 2003-04-11 Havoc Pennington <hp@redhat.com>
4989 * doc/dbus-specification.sgml: fix a spot with the wrong name for
4990 the broadcast service. Use boolean return for ServiceExists.
4992 2003-04-11 Havoc Pennington <hp@redhat.com>
4994 * configure.in: add another directory to look for qt in.
4996 2003-04-11 Havoc Pennington <hp@redhat.com>
4998 * AUTHORS: add Colin Walters
5000 2003-04-11 Havoc Pennington <hp@redhat.com>
5006 2003-04-11 Havoc Pennington <hp@redhat.com>
5008 * bus/messagebus.in: remove pid file when stopping the
5009 message bus, since the bus won't have privileges to remove it
5012 2003-04-11 Havoc Pennington <hp@redhat.com>
5014 * bus/bus.c (bus_context_new): move credentials change after
5017 2003-04-11 Havoc Pennington <hp@pobox.com>
5019 * test/decode-gcov.c: add "below average functions" to the
5020 coverage report, and change how some of the code works.
5022 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5023 not in the coverage stats.
5025 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5026 couple places so running the test suite doesn't result in megaspam.
5028 2003-04-11 Havoc Pennington <hp@pobox.com>
5030 * bus/dispatch.c (check_existent_service_activation): accept a no
5031 memory error in a place we didn't before
5033 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5034 in case the first one failed," since the test suite is less
5037 2003-04-10 Havoc Pennington <hp@pobox.com>
5039 * bus/dispatch.c (check_segfault_service_activation): add test
5040 for launching an executable that just crashes.
5042 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5043 don't leave a million cores. We'll see how portable this is.
5045 2003-04-10 Havoc Pennington <hp@pobox.com>
5047 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5048 the possible parent failures before we fork, so that we don't
5049 fail to create a babysitter after creating the child.
5051 * bus/activation.c (bus_activation_activate_service): kill child
5052 if we don't successfully complete the activation.
5054 2003-04-10 Havoc Pennington <hp@redhat.com>
5056 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5057 the connection if it's disconnected
5059 * bus/activation.c (bus_activation_service_created): use new
5060 transaction features to roll back removal of pending activation if
5061 we don't successfully create the service after all. Don't remove
5062 pending activation if the function fails.
5064 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5065 (_dbus_list_insert_after_link): new code to facilitate
5068 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5069 new functionality, so we can preallocate the ability to insert
5072 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5073 allowing us to put custom hooks in a transaction to be used for
5074 cancelling said transaction
5076 * doc/dbus-specification.sgml: add some discussion of secondary
5077 service owners, and disallow zero-length service names
5079 * bus/services.c (bus_registry_acquire_service): new function,
5080 splits out part of bus_driver_handle_acquire_service() and fixes
5081 a bug where we didn't remove the service doing the acquiring
5082 from the secondary queue if we failed to remove the current owner
5083 from the front of the queue.
5085 2003-04-10 Alexander Larsson <alexl@redhat.com>
5087 * doc/dbus-specification.sgml:
5088 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5090 2003-04-10 Alexander Larsson <alexl@redhat.com>
5095 Added files to cvsignore
5097 * dbus/dbus-message.h:
5098 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5099 Make get_named() take two out argument and return a boolean.
5100 (dbus_message_iter_get_args_valist):
5101 Update usage of get_named().
5102 (dbus_message_iter_append_byte):
5104 (dbus_message_iter_append_named)
5106 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5109 2003-04-10 Alexander Larsson <alexl@redhat.com>
5111 * dbus/dbus-marshal.[ch]:
5112 Add array_type_pos argument to _dbus_marshal_validate_arg.
5113 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5115 * dbus/dbus-message.[ch]:
5116 Multi-dimensional arrays have full type specification in the
5117 outermost array. Iter code re-arranged to handle this.
5118 Added some more iter tests.
5120 * doc/dbus-specification.sgml:
5123 Update new array encoding description.
5124 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5126 * test/data/invalid-messages/array-with-mixed-types.message:
5127 * test/data/valid-messages/array-of-array-of-uint32.message:
5128 Change to the new array format.
5130 * test/data/invalid-messages/too-short-dict.message:
5133 * test/data/valid-messages/recursive-types.message:
5134 Fix up and extend test.
5136 2003-04-10 Havoc Pennington <hp@pobox.com>
5138 * bus/dispatch.c: lots of fixes
5140 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5141 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5142 that was crack, broke the test service.
5144 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5145 handling to avoid piling up errors if we get a failure on the
5148 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5149 pid in assertion failures.
5151 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5152 to some fixed size of file descriptor array. Don't return TRUE
5153 anytime a timeout exists, that led to lots of busy loop silliness
5156 2003-04-09 Havoc Pennington <hp@redhat.com>
5158 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5159 I'd checked this in earlier but hadn't.
5161 2003-04-09 Havoc Pennington <hp@redhat.com>
5163 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5164 the activation test (man this is getting old!)
5166 2003-04-09 Havoc Pennington <hp@redhat.com>
5168 * test/test-utils.c: use dispatch status function to fix this up
5170 * bus/connection.c (connection_watch_callback): don't dispatch
5172 (connection_timeout_callback): don't dispatch from here
5173 (bus_connections_setup_connection): set the dispatch status function
5174 (bus_connection_disconnected): unset it
5176 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5177 used to add a connection to be dispatched
5178 (_dbus_loop_iterate): do the dispatching at the end of each
5181 * dbus/dbus-connection.c
5182 (dbus_connection_set_dispatch_status_function): new function
5183 allowing us to fix up main loop usage
5184 (_dbus_connection_last_unref): free all the various function
5186 (dbus_connection_dispatch): call the DispatchStatusFunction
5187 whenever this function returns
5188 (dbus_connection_handle_watch): call DispatchStatusFunction
5189 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5190 (reply_handler_timeout): call DispatchStatusFunction
5191 (dbus_connection_flush): call DispatchStatusFunction
5193 2003-04-09 Havoc Pennington <hp@redhat.com>
5195 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5198 * bus/dispatch.c (check_service_activated): fix bug in test
5200 * dbus/dbus-mainloop.c (check_timeout): fix this up
5202 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5203 verbose output so we can sort out output from different processes,
5204 e.g. in the activation case.
5206 2003-04-08 Colin Walters <walters@gnu.org>
5208 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5210 (bus_context_new): Set it.
5211 (bus_context_unref): Use it to delete the pid file.
5213 2003-04-08 Havoc Pennington <hp@redhat.com>
5215 * test/data/invalid-messages/array-with-mixed-types.message:
5216 regression test that fails for the moment
5218 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5219 tests for convenience
5221 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5222 array of nil, it broke things.
5224 * test/data/invalid-messages/array-of-nil.message: regression test
5226 * test/data/valid-messages/array-of-array-of-uint32.message:
5227 happened to write this so added it to suite
5229 2003-04-08 Havoc Pennington <hp@redhat.com>
5231 * bus/driver.c (bus_driver_handle_acquire_service): init
5232 retval/reply before checking name
5234 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5235 recursion depth argument
5237 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5238 in the public struct for future extension
5240 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5243 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5246 * doc/dbus-specification.sgml: fix typo
5248 2003-04-08 Alexander Larsson <alexl@redhat.com>
5250 Implemented recursive types, named types and new-style iters
5253 * glib/test-thread-client.c: (thread_func):
5254 * glib/test-thread-server.c: (handle_test_message):
5255 * test/test-service.c: (handle_echo):
5264 * dbus/dbus-internals.c: (_dbus_type_to_string):
5265 Update for new types.
5267 * dbus/dbus-marshal.[ch]:
5268 Implement recursive types and the new marshalling format.
5269 Remove hardcoded dict marshalling.
5270 Marshal named types.
5272 * dbus/dbus-message-builder.c:
5274 Remove references to old types
5276 * dbus/dbus-message.[ch]:
5277 New non-refcounted iter API that supports recursive iters.
5278 Use iters for appending, including support for recursive
5280 Add byte and named type support.
5281 Update everything to new marshalling formats.
5282 Add tests for new API.
5284 * dbus/dbus-protocol.h:
5285 Remove old array types.
5286 Add types: BYTE, ARRAY, DICT, NAMED
5288 * dbus/dbus-string.c:
5289 * dbus/dbus-sysdeps.c:
5290 Make parse_double locale safe.
5292 * dbus/dbus-test-main.c:
5298 * doc/dbus-specification.sgml:
5301 * test/data/incomplete-messages/missing-body.message:
5302 * test/data/invalid-messages/bad-boolean.message:
5303 * test/data/invalid-messages/bad-boolean-array.message:
5304 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5305 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5306 * test/data/invalid-messages/too-short-dict.message:
5307 * test/data/valid-messages/dict-simple.message:
5308 * test/data/valid-messages/dict.message:
5309 * test/data/valid-messages/emptiness.message:
5310 * test/data/valid-messages/lots-of-arguments.message:
5311 * test/data/valid-messages/no-padding.message:
5312 * test/data/valid-messages/recursive-types.message:
5313 Add missing NAME fields
5314 Fix up dicts & arrays
5316 * test/data/invalid-messages/dict-with-nil-value.message:
5317 Removed, this is not invalid anymore.
5319 * test/data/valid-messages/recursive-types.message:
5320 Add new test for deeply recursive types.
5322 2003-04-07 Havoc Pennington <hp@pobox.com>
5324 * bus/driver.c (bus_driver_handle_acquire_service): return an
5325 error if you try to acquire a service that starts with ':'
5327 2003-04-07 Havoc Pennington <hp@redhat.com>
5329 * doc/dbus-specification.sgml: require that base service names
5330 start with ':' and that the base service is created/deleted
5331 as first and last things a connection does on the bus
5333 * bus/dispatch.c (check_existent_service_activation): lots more
5334 work on the activation test; it doesn't fully pass yet...
5336 * test/test-service.c (main): fix so we don't memleak the
5337 connection to the message bus
5338 (filter_func): accept a message asking us to exit
5340 2003-04-06 Havoc Pennington <hp@pobox.com>
5342 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5345 * configure.in: fixes to Qt detection from Colin Walters
5347 * doc/Makefile.am: Only remove generated docbook dirs if they
5348 exist, from Colin Walters
5350 * dbus/dbus-bus.c: change how we set well-known connections to
5351 NULL, so that it works if a single connection is stored in
5352 two well-known array slots.
5354 * test/Makefile.am: remove a lot of stuff that isn't immediately
5355 useful, it's in CVS history if we want it.
5357 * test/test-service.c: use dbus-mainloop instead of that
5360 2003-04-06 Havoc Pennington <hp@pobox.com>
5362 * dbus/Makefile.am: split lists of sources into stuff that goes in
5363 the library, util functions that go in the lib and are also used
5364 elsewhere, and util functions that are used in tests/daemon but
5365 don't go in the lib.
5367 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5368 here so it can be used in test binaries also
5370 2003-04-06 Havoc Pennington <hp@pobox.com>
5372 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5373 here in the parent process, so we can return an error if it
5374 fails. Also, move some of the code into the child so the parent
5375 is less hosed if we fail midway through.
5377 * bus/bus.c (bus_context_new): move pidfile detection further up
5378 in the function, before we start overwriting sockets and such.
5380 * bus/messagebus.in: adjust this a bit, not sure if it will work.
5382 * configure.in: add --with-system-pid-file and --with-system-socket
5384 2003-04-06 Colin Walters <walters@verbum.org>
5386 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5388 * bus/system.conf.in: Declare a pidfile.
5390 * bus/bus.c (bus_context_new): Test for an existing pid file, and
5391 create one (if appropriate).
5393 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
5394 (struct BusConfigParser) [pidfile]: New.
5395 (element_type_to_name, merge_included, start_busconfig_child)
5396 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
5397 (bus_config_parser_unref): Free it.
5398 (bus_config_parser_get_pidfile): New function.
5400 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
5402 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
5404 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
5406 * dbus/dbus-sysdeps.h: Prototype it.
5408 2003-04-06 Havoc Pennington <hp@pobox.com>
5410 * bus/bus.c (bus_context_new): print the address in here, rather
5411 than in main(), because we need to do it before forking the daemon
5413 * bus/dispatch.c (send_service_nonexistent_error): set the sender
5414 on the service nonexistent error
5416 * bus/driver.c (bus_driver_handle_acquire_service): set the
5417 sender on the AcquireService reply
5419 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
5420 server also listen on a UNIX socket so services can connect to it.
5422 2003-04-06 Havoc Pennington <hp@pobox.com>
5424 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
5425 so it detects deadlocks and also we actually init threads when
5428 2003-04-06 Havoc Pennington <hp@pobox.com>
5430 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5431 save the domain socket name, and unlink it when we disconnect the
5432 server. Means that at least when we exit normally, we won't leave
5433 a bunch of junk in /tmp
5435 * dbus/dbus-transport-unix.c
5436 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
5437 memory management). (I was making a real change here but then
5440 2003-04-06 Havoc Pennington <hp@pobox.com>
5442 * bus/bus.c (bus_context_new): fix wrong handling of
5443 server_data_slot_unref() in the error case.
5445 * dbus/dbus-internals.h (_dbus_assert): change so it passes
5446 "(condition) != 0" to _dbus_real_assert so that
5447 "_dbus_assert (pointer)" doesn't cause a warning
5449 * bus/main.c (main): accept --print-address option to print out
5450 the message bus address
5452 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
5454 * dbus/dbus-transport.c (_dbus_transport_open): special error for
5455 "tmpdir" option to unix: address on client side
5457 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
5460 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
5461 we can use to create sockets in the test suite.
5463 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
5464 cleanly. To be used for testing.
5466 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
5468 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
5470 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5471 handle trying to call this when there's no servers active
5473 2003-04-05 Havoc Pennington <hp@pobox.com>
5479 2003-04-05 Havoc Pennington <hp@pobox.com>
5481 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
5482 crash on startup. Need to get "try starting the daemon"
5483 in the test suite I guess. ;-)
5485 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
5486 tracked the number of open connections; it's better done in
5487 application-specific code as you want it to span all servers etc.
5489 2003-04-05 Havoc Pennington <hp@pobox.com>
5491 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
5492 patch from Colin Walters
5494 2003-04-05 Havoc Pennington <hp@pobox.com>
5496 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
5497 reality; in fact multiple mechanisms are allowed.
5499 * dbus/dbus-internals.c (_dbus_real_assert)
5500 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
5501 _dbus_assert_not_reached() into functions, so that they don't show
5502 up in basic block counts for test coverage, and don't use up as
5503 much disk space. Does mean slower execution speed though, so
5504 assumes --disable-asserts is the normal production case.
5506 2003-04-05 Havoc Pennington <hp@pobox.com>
5508 * test/Makefile.am (dist-hook): also dist *.in files
5514 2003-04-05 Havoc Pennington <hp@pobox.com>
5516 * dbus/dbus-string.c: docs warning
5518 * dbus/dbus-spawn.c: missing docs
5520 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
5522 2003-04-05 Havoc Pennington <hp@pobox.com>
5524 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
5527 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
5528 to -1 once we've reaped the babysitter
5529 (_dbus_babysitter_handle_watch): do as much work as we can, not
5532 * bus/activation.c: add code using DBusBabysitter so that we
5533 handle it when a service fails to start up properly.
5534 (bus_activation_service_created): don't remove the activation
5535 entries as we go, just let them get removed when we free the pending
5536 activation. Unref reply messages after sending them.
5538 2003-04-05 Havoc Pennington <hp@pobox.com>
5540 * test/decode-gcov.c (main): print per-directory stats in the report
5542 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
5544 2003-04-05 Havoc Pennington <hp@pobox.com>
5546 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
5548 * test/decode-gcov.c: hack up a little program to suck data
5549 out of gcov files. Yes this is sort of silly.
5551 * configure.in: define something in config.h and do an
5552 AM_CONDITIONAL when gcov is enabled
5554 2003-04-04 Havoc Pennington <hp@redhat.com>
5556 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
5557 return a "babysitter" object that is used to monitor the status of
5558 the spawned process and reap it when required.
5560 * test/test-segfault.c, test/test-exit.c,
5561 test/test-sleep-forever.c: binaries that do various lame things,
5562 used in the test suite.
5564 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
5566 2003-04-03 Havoc Pennington <hp@pobox.com>
5568 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
5569 in preparation for modifying it, dbus-sysdeps is getting
5572 2003-04-03 Havoc Pennington <hp@redhat.com>
5574 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
5577 * bus/*.[hc]: adapt to mainloop change
5579 2003-04-03 Havoc Pennington <hp@redhat.com>
5581 * bus/activation.c (load_directory): fix up memleaks
5582 (bus_activation_entry_free): free the entry
5584 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
5585 we get one from the message bus; fix memleaks.
5587 * dbus/dbus-message.c (dbus_set_error_from_message): new function
5589 2003-04-03 Havoc Pennington <hp@pobox.com>
5591 * bus/config-parser.c (bus_config_parser_unref): free
5592 list of mechanisms, bug discovered by test suite enhancements
5593 (putting system.conf and session.conf into suite)
5595 * test/Makefile.am, test/test-service.c: add placeholder for a
5596 test service that we'll activate as part of test suite. Doesn't
5599 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
5600 setting NULL value, and use system malloc not dbus_malloc()
5601 when we have unavoidable memleakage.
5603 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
5604 didn't work, and support DBUS_BUS_ACTIVATION.
5606 * bus/activation.c (child_setup): pass our well-known bus type to
5609 * bus/config-parser.c: support <type> to specify well-known type
5611 * doc/dbus-specification.sgml: document the env variables to
5612 locate well-known buses and find service activator
5614 2003-04-02 Havoc Pennington <hp@redhat.com>
5616 * test/Makefile.am (all-local): add a rule to copy tests to
5617 builddir, so we can have generated tests. Use this to remove the
5618 silly hack for testing system.conf and session.conf. Will use this
5619 shortly to generate .service files pointing to test binaries.
5621 2003-04-02 Havoc Pennington <hp@redhat.com>
5623 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
5624 current alloc and needed new length, not max of the doubled
5625 allocation and needed new length. Also, when building tests,
5626 don't do the double-allocation stuff, just realloc every time.
5628 2003-04-02 Havoc Pennington <hp@redhat.com>
5630 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
5632 (_dbus_string_get_dirname): new
5633 (_dbus_sysdeps_test): new
5634 (_dbus_directory_open): include dirnames in error messages
5636 * bus/config-parser.c: interpret <include> and <includedir> and
5637 <servicedir> relative to config file location if the given
5638 filename is not absolute.
5640 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
5642 2003-04-02 Havoc Pennington <hp@redhat.com>
5644 * bus/connection.c (bus_transaction_send_error_reply): set sender
5645 service for the error, and unref the reply on success
5647 * bus/activation.c: convert to use BusTransaction so OOM can be
5649 (bus_activation_service_created): set sender of the message
5651 2003-04-01 Havoc Pennington <hp@redhat.com>
5653 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
5654 <includedir> (at least mostly)
5656 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
5657 first, then the user ID
5659 2003-04-01 Havoc Pennington <hp@pobox.com>
5661 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
5664 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
5666 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
5668 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
5669 socket 0777, and unlink any existing socket.
5671 * bus/bus.c (bus_context_new): change our UID/GID and fork if
5672 the configuration file so specifies; set up auth mechanism
5675 * bus/config-parser.c (bus_config_parser_content): add support
5676 for <fork> option and fill in code for <auth>
5678 * bus/system.conf.in: add <fork/> to default configuration,
5679 and limit auth mechanisms to EXTERNAL
5681 * doc/config-file.txt (Elements): add <fork>
5683 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
5684 (_dbus_change_identity): new function
5686 2003-03-31 Havoc Pennington <hp@redhat.com>
5688 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
5689 (_dbus_listen_unix_socket): fix off-by-one error in null
5690 termination spotted by Nalin
5692 2003-03-31 Havoc Pennington <hp@redhat.com>
5694 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
5695 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
5696 having a real home directory available.
5698 2003-03-31 Havoc Pennington <hp@redhat.com>
5700 * bus/Makefile.am (install-data-hook): create /var/run/dbus
5702 * bus/messagebus.in: add init script for Red Hat /etc/init.d
5704 * configure.in: add support for specifying a style of init script
5707 2003-03-31 Havoc Pennington <hp@redhat.com>
5709 Fix some annoying DBusString API and fix all affected code.
5711 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
5713 (_dbus_string_get_data): change to return string instead of using
5715 (_dbus_string_get_const_data): ditto
5716 (_dbus_string_get_data_len): ditto
5717 (_dbus_string_get_const_data_len): ditto
5719 2003-03-31 Havoc Pennington <hp@redhat.com>
5721 * bus/main.c (main): fix up the command line arguments to be nicer
5723 2003-03-31 Havoc Pennington <hp@redhat.com>
5725 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
5726 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
5727 final location that lands in the config file
5729 * bus/config-loader-expat.c (bus_config_load): fix type of
5732 * doc/TODO: remove TODO item for dbus_bus_get()
5734 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
5736 2003-03-31 Havoc Pennington <hp@pobox.com>
5738 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
5739 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
5740 argument since they are always client side
5742 * dbus/dbus-server.c (dbus_server_get_address): new function
5744 * bus/main.c (main): take the configuration file as an argument.
5746 * test/data/valid-config-files/debug-allow-all.conf: new file to
5747 use with dispatch.c tests for example
5749 * bus/test-main.c (main): require test data dir
5751 * bus/bus.c (bus_context_new): change this to take a
5752 configuration file name as argument
5754 * doc/config-file.txt (Elements): add <servicedir>
5756 * bus/system.conf, bus/session.conf: new files
5758 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
5759 well-known socket if none set
5761 * configure.in: create system.conf and session.conf
5763 2003-03-30 Havoc Pennington <hp@pobox.com>
5765 * bus/config-parser.c: hacking
5767 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
5768 to shut down, since it could cause weirdness with the DBusList
5771 * dbus/dbus-list.c (_dbus_list_test): add tests for the
5772 link-oriented stack routines
5773 (alloc_link): free the mempool if the first alloc from it fails
5775 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
5777 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
5779 (_dbus_string_skip_white): new
5781 * doc/config-file.txt (Elements): add <includedir>
5783 2003-03-28 Havoc Pennington <hp@pobox.com>
5785 * dbus/dbus-string.c (_dbus_string_copy_data_len)
5786 (_dbus_string_copy_data): new functions
5788 2003-03-28 Anders Carlsson <andersca@codefactory.se>
5790 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
5794 * dbus/dbus-memory.c:
5797 2003-03-28 Havoc Pennington <hp@pobox.com>
5799 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
5800 I think it may have just been superstition. Not sure.
5802 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
5803 failures that were not being handled.
5805 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
5807 * dbus/dbus-memory.c: add ability to set number of mallocs in a
5808 row that will fail on out-of-memory.
5810 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
5811 function for testing out-of-memory handling.
5813 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
5814 allocation functions, they do map exactly to the expat ones.
5816 2003-03-27 Havoc Pennington <hp@redhat.com>
5818 * bus/config-loader-libxml.c (bus_config_load): add another error
5821 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5824 Add note about automatic service activation.
5826 * doc/dbus-specification.sgml:
5827 Rename the specification and clarify a few things.
5829 2003-03-26 Anders Carlsson <andersca@codefactory.se>
5832 * dbus/dbus-address.c:
5834 * dbus/dbus-marshal.c:
5835 * dbus/dbus-server-debug-pipe.c:
5836 * dbus/dbus-transport-unix.c:
5837 Fix documentation warnings.
5839 2003-03-26 Havoc Pennington <hp@pobox.com>
5841 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
5842 after every test so it's quick and easy to see which leaked, and
5843 so we test multiple dbus_shutdown() calls
5845 * configure.in: change configure.in XML stuff to also support
5848 * config-loader-libxml.c: some hacking
5850 * config-loader-expat.c: some hacking
5852 * config-parser.c: some hacking, plus tests
5854 2003-03-25 Havoc Pennington <hp@redhat.com>
5856 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
5858 * configure.in: add --with-xml option to specify XML library,
5859 right now only libxml is supported.
5861 * bus/config-loader-libxml.c, config-parser.c: sync some minor
5862 nonworking code between home and work, still just stubs
5864 2003-03-24 Havoc Pennington <hp@redhat.com>
5866 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
5869 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
5870 NULL argument for "message" if the error is a well-known one,
5871 fill in a generic message in this case.
5873 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
5876 * bus/test.c (bus_test_flush_bus): add
5878 * bus/policy.c (bus_policy_test): test code stub
5880 2003-03-24 Havoc Pennington <hp@pobox.com>
5882 * bus/connection.c (bus_connections_setup_connection): set up
5883 the "can this user connect" function, but it always returns
5884 TRUE until we have a config file parser so we can have a config
5885 file that allows connections.
5887 2003-03-23 Havoc Pennington <hp@pobox.com>
5889 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
5890 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
5891 the mutex, so we can check for proper memory management
5894 * dbus/dbus-dataslot.c: remove the mutex from
5895 DBusDataSlotAllocator and lock it manually when using it,
5896 to simplify fitting it into the global slots framework.
5898 * dbus/dbus-threads.c (init_static_locks): rework how we're
5899 handling global locks so they are easily shut down.
5901 * bus/policy.c (bus_policy_append_rule): fix
5903 * bus/test-main.c (main): check for memleaks
5905 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
5906 test suite check for memleaks
5908 * dbus/dbus-memory.c: add support in test mode for tracking
5909 number of outstanding blocks
5911 2003-03-23 Havoc Pennington <hp@pobox.com>
5913 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
5916 * dbus/dbus-hash.h: add ULONG hash keys
5918 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
5919 (_dbus_get_group_id): new function
5921 2003-03-20 Havoc Pennington <hp@redhat.com>
5923 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
5925 (dbus_connection_get_unix_user): new function
5927 2003-03-20 Havoc Pennington <hp@pobox.com>
5929 * bus/connection.c (bus_connection_send_oom_error): assert that
5930 message has a sender
5931 (connection_execute_transaction): ditto
5932 (bus_connection_preallocate_oom_error): fix to set the sender, and
5933 set recipient to the destination service, not the bus driver
5935 * bus/policy.c: hacking
5937 * dbus/dbus-message.c (dbus_message_service_is): new function
5938 (dbus_message_sender_is): new
5940 2003-03-19 Havoc Pennington <hp@redhat.com>
5942 * bus/policy.c: start sketching code for policy restrictions on
5943 what connections can do.
5945 2003-03-18 Havoc Pennington <hp@redhat.com>
5947 * doc/TODO: some notes on high-level todo items. Little nitpick
5948 stuff is all in @todo, so no need to add it here.
5950 * doc/config-file.txt: some notes on how config file might look
5952 2003-03-18 Anders Carlsson <andersca@codefactory.se>
5958 2003-03-17 Havoc Pennington <hp@redhat.com>
5960 * dbus/dbus-internals.h: add gcc attributes so that
5961 our printf-style functions warn on bad arguments to
5964 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
5967 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5970 2003-03-17 Havoc Pennington <hp@redhat.com>
5972 * bus/test-main.c (main): make it print something as it runs
5973 so make check doesn't look stuck
5975 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
5976 from CVS, now obsolete
5978 2003-03-17 Anders Carlsson <andersca@codefactory.se>
5980 * bus/dispatch.c: (bus_dispatch):
5981 Refetch the service name since it may have been reallocated
5982 when dbus_message_set_sender was called.
5984 * dbus/dbus-sysdeps.c: (_dbus_accept):
5985 Add address and address length variables and use them to stop
5986 valgrind from complaining.
5988 2003-03-17 Havoc Pennington <hp@pobox.com>
5990 All tests pass, no memleaks, no valgrind complaints.
5992 * bus/test.c: refcount handler_slot
5994 * bus/connection.c (bus_connections_new): refcount
5995 connection_data_slot
5997 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
5998 bytes so that auth scripts pass.
6000 * bus/dispatch.c: init message_handler_slot so it gets allocated
6003 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6005 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6006 dealloc server_pipe_hash when no longer used for benefit of
6009 * dbus/dbus-auth.c (process_command): memleak fix
6011 * bus/dispatch.c (check_hello_message): memleak fix
6013 2003-03-16 Havoc Pennington <hp@pobox.com>
6015 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6017 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6019 * bus/activation.c (bus_activation_activate_service): Append
6020 the pending activation entry to the list of pending activations.
6022 2003-03-16 Havoc Pennington <hp@pobox.com>
6024 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6027 * dbus/dbus-address.c (create_entry): fix OOM handling when
6028 failing to alloc entry->method
6030 2003-03-16 Havoc Pennington <hp@pobox.com>
6032 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6035 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6036 add some missing dbus_set_result
6038 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6039 alloc the DBusMessageHandler
6041 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6042 the transport here, since we call this from the finalizer; it
6043 resulted in a double-finalize.
6045 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6046 where we tried to use transport->connection that was NULL,
6047 happened when transport was disconnected early on due to OOM
6049 * bus/*.c: adapt to handle OOM for watches/timeouts
6051 * dbus/dbus-transport-unix.c: port to handle OOM during
6054 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6055 reference to unused bytes instead of a copy
6057 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6060 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6063 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6066 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6068 * doc/dbus-specification.sgml:
6069 Document reply message for ActivateService.
6071 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6073 * bus/activation.c: (bus_pending_activation_entry_free),
6074 (bus_pending_activation_free), (bus_activation_new),
6075 (bus_activation_unref), (bus_activation_service_created),
6076 (bus_activation_activate_service):
6078 * bus/bus.c: (bus_context_new):
6079 * bus/desktop-file.c: (new_section):
6080 * bus/driver.c: (bus_driver_send_service_deleted),
6081 (bus_driver_handle_activate_service):
6082 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6084 * dbus/dbus-connection.c:
6085 (dbus_connection_send_with_reply_and_block):
6086 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6087 * dbus/dbus-protocol.h:
6088 Make activation work better. Now pending activations will be queued
6089 and the daemon won't try to activate services that are already registered.
6091 2003-03-16 Havoc Pennington <hp@pobox.com>
6093 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6096 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6097 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6099 2003-03-16 Havoc Pennington <hp@pobox.com>
6101 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6102 this. always run the test suite before commit...
6104 * bus/*: adapt to DBusConnection API changes
6106 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6107 requires renaming stuff to avoid dbus_connection_dispatch name
6110 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6113 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6114 separate from _dbus_message_loader_return_buffer()
6116 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6117 this, because it's now always broken to use; the number of
6118 messages in queue vs. the number still buffered by the message
6119 loader is undefined/meaningless. Should use
6120 dbus_connection_get_dispatch_state().
6121 (dbus_connection_dispatch): rename from
6122 dbus_connection_dispatch_message
6124 2003-03-16 Havoc Pennington <hp@pobox.com>
6126 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6129 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6131 * dbus/dbus-connection.c:
6132 (dbus_connection_send_with_reply_and_block):
6133 Decrease connection->n_incoming when removing an entry
6135 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6136 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6137 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6138 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6139 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6140 (dbus_dict_get_byte_array):
6141 Handle NULL arrays and strings. Also add support for byte arrays.
6143 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6144 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6145 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6146 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6147 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6148 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6149 * dbus/dbus-marshal.h:
6150 Add support for marshalling and demarshalling empty arrays and strings.
6152 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6153 (dbus_message_append_string_array),
6154 (dbus_message_iter_get_boolean),
6155 (dbus_message_iter_get_boolean_array),
6156 (dbus_message_iter_get_int32_array),
6157 (dbus_message_iter_get_uint32_array),
6158 (dbus_message_iter_get_double_array),
6159 (dbus_message_iter_get_byte_array),
6160 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6161 (check_message_handling):
6162 Add support for getting empty arrays and dicts.
6164 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6165 Don't do any validation at all for now, that's better than just checking
6168 * test/data/valid-messages/emptiness.message:
6169 New test message with lots of empty arrays.
6171 2003-03-16 Havoc Pennington <hp@pobox.com>
6173 * dbus/dbus-connection.c
6174 (_dbus_connection_queue_received_message_link): new function that
6175 can't fail due to OOM
6177 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6178 new function pops a message together with a list link
6181 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6182 message queuing functions to avoid needing to alloc memory
6184 2003-03-16 Havoc Pennington <hp@pobox.com>
6186 Oops - test code was only testing failure of around 30 of the
6187 mallocs in the test path, but it turns out there are 500+
6188 mallocs. I believe this was due to misguided linking setup such
6189 that there was one copy of dbus_malloc etc. in the daemon and one
6190 in the shared lib, and only daemon mallocs were tested. In any
6191 case, the test case now tests all 500+ mallocs, and doesn't pass
6192 yet, though there are lots of fixes in this patch.
6194 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6195 this so that it doesn't need to allocate memory, since it
6196 has no way of indicating failure due to OOM (and would be
6197 annoying if it did).
6199 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6201 * bus/Makefile.am: rearrange to create two self-contained
6202 libraries, to avoid having libraries with overlapping symbols.
6203 that was resulting in weirdness, e.g. I'm pretty sure there
6204 were two copies of global static variables.
6206 * dbus/dbus-internals.c: move the malloc debug stuff to
6209 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6212 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6214 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6217 * bus/dispatch.c (bus_dispatch_add_connection): free
6218 message_handler_slot when no longer using it, so
6219 memory leak checkers are happy for the test suite.
6221 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6223 * bus/bus.c (new_connection_callback): disconnect in here if
6224 bus_connections_setup_connection fails.
6226 * bus/connection.c (bus_connections_unref): fix to free the
6228 (bus_connections_setup_connection): if this fails, don't
6229 disconnect the connection, just be sure there are no side
6232 * dbus/dbus-string.c (undo_alignment): unbreak this
6234 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6236 (_dbus_auth_new): fix the order in which we free strings
6239 * bus/connection.c (bus_connection_disconnected): fix to
6240 not send ServiceDeleted multiple times in case of memory
6243 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6244 get the base service name
6245 (dbus_bus_register_client): don't return base service name,
6246 instead store it on the DBusConnection and have an accessor
6248 (dbus_bus_register_client): rename dbus_bus_register()
6250 * bus/dispatch.c (check_hello_message): verify that other
6251 connections on the bus also got the correct results, not
6252 just the one sending hello
6254 2003-03-15 Havoc Pennington <hp@pobox.com>
6256 Make it pass the Hello handling test including all OOM codepaths.
6257 Now to do other messages...
6259 * bus/services.c (bus_service_remove_owner): fix crash when
6260 removing owner from an empty list of owners
6261 (bus_registry_ensure): don't leave service in the list of
6262 a connection's owned services if we fail to put the service
6265 * bus/connection.c (bus_connection_preallocate_oom_error): set
6266 error flag on the OOM error.
6268 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6269 handle _dbus_transport_set_connection failure
6271 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6272 to create watches up front and simply enable/disable them as
6274 (unix_connection_set): this can now fail on OOM
6276 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6277 of enabling/disabling a watch or timeout.
6279 * bus/loop.c (bus_loop_iterate): don't touch disabled
6282 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6284 2003-03-15 Havoc Pennington <hp@pobox.com>
6286 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6287 write useful test code, after all that futzing around ;-)
6289 Test does not yet pass because we can't handle OOM in
6290 _dbus_transport_messages_pending (basically,
6291 dbus_connection_preallocate_send() does not prealloc the write
6292 watch). To fix this, I think we need to add new stuff to
6293 set_watch_functions, namely a SetEnabled function so we can alloc
6294 the watch earlier, then enable it later.
6296 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6297 dbus-memory.c to the convenience lib
6299 * bus/test.c: rename some static functions to keep them clearly
6300 distinct from stuff in connection.c. Handle client disconnection.
6302 2003-03-14 Havoc Pennington <hp@pobox.com>
6304 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6305 transport, tests more of the real codepath. Set up clients
6306 with bus_setup_debug_client.
6308 * bus/test.c (bus_setup_debug_client): function to set up debug
6309 "clients" on the main loop
6311 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6314 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6317 * dbus/dbus-server-debug.c: support a debug server based on pipes
6319 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6320 (_dbus_close): new function
6322 * configure.in: check for socketpair
6324 2003-03-14 Havoc Pennington <hp@redhat.com>
6326 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6329 * dbus/dbus-transport-debug.c: rework this a good bit to be
6330 less complicated. hopefully still works.
6332 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6335 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6338 * dbus/dbus-message.c (dbus_message_copy): rename from
6339 dbus_message_new_from_message, fix it up to copy
6340 all the message fields, add test case
6342 * bus/dispatch.c (bus_dispatch_test): add some more test code,
6343 not quite passing yet
6345 2003-03-14 Havoc Pennington <hp@pobox.com>
6347 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6348 until no work remains" in test code. (the large diff here
6349 is just code movement, no actual changes)
6351 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6352 1, no point waiting around for test code.
6353 (_dbus_server_debug_accept_transport): unref the timeout
6354 after adding it (right?)
6356 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6358 2003-03-13 Havoc Pennington <hp@redhat.com>
6360 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6363 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6366 * dbus/dbus-connection.h: Make AddWatchFunction and
6367 AddTimeoutFunction return a bool so they can fail on out-of-memory
6369 * bus/bus.c (bus_context_new): set up timeout handlers
6371 * bus/connection.c (bus_connections_setup_connection): set up
6374 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6377 * bus/bus.c (bus_context_new): adapt to changes
6379 * bus/connection.c: adapt to changes
6381 * test/watch.c: adapt to DBusWatch changes
6383 * bus/dispatch.c (bus_dispatch_test): started adding this but
6386 2003-03-14 Anders Carlsson <andersca@codefactory.se>
6388 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6390 2003-03-13 Havoc Pennington <hp@pobox.com>
6392 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
6393 set up a test framework as for the library
6395 2003-03-12 Havoc Pennington <hp@pobox.com>
6397 Throughout: purge global variables, introduce BusActivation,
6398 BusConnections, BusRegistry, etc. objects instead.
6400 * bus/bus.h, bus/bus.c: introduce BusContext as a global
6403 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
6404 going to redo this a bit differently I think
6406 2003-03-12 Havoc Pennington <hp@redhat.com>
6408 Mega-patch that gets the message bus daemon initially handling
6409 out-of-memory. Work still needed. Also lots of random
6410 moving stuff to DBusError instead of ResultCode.
6412 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
6414 * dbus/dbus-connection.c
6415 (dbus_connection_send_with_reply_and_block): use DBusError
6417 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
6420 * dbus/dbus-connection.c (dbus_connection_send): drop the result
6421 code here, as the only failure possible is OOM.
6423 * bus/connection.c (bus_connection_disconnect):
6424 rename bus_connection_disconnected as it's a notification only
6426 * bus/driver.c (bus_driver_handle_acquire_service): don't free
6427 "name" on get_args failure, should be done by get_args;
6428 don't disconnect client for bad args, just return an error.
6429 (bus_driver_handle_service_exists): ditto
6431 * bus/services.c (bus_services_list): NULL-terminate returned array
6433 * bus/driver.c (bus_driver_send_service_lost)
6434 (bus_driver_send_service_acquired): send messages from driver to a
6435 specific client to the client's unique name, not to the broadcast
6438 * dbus/dbus-message.c (decode_header_data): reject messages that
6439 contain no name field
6440 (_dbus_message_get_client_serial): rename to
6441 dbus_message_get_serial and make public
6442 (_dbus_message_set_serial): rename from set_client_serial
6443 (_dbus_message_set_reply_serial): make public
6444 (_dbus_message_get_reply_serial): make public
6446 * bus/connection.c (bus_connection_foreach): allow stopping
6447 iteration by returning FALSE from foreach function.
6449 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
6450 (dbus_connection_free_preallocated_send)
6451 (dbus_connection_preallocate_send): new API for sending a message
6452 without possibility of malloc failure.
6453 (dbus_connection_send_message): rename to just
6454 dbus_connection_send (and same for whole function family)
6456 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
6458 * dbus/dbus-sysdeps.c (_dbus_exit): new function
6460 * bus/activation.c: handle/return errors
6462 * dbus/dbus-errors.h: add more DBUS_ERROR #define
6464 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
6465 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
6466 (_dbus_result_from_errno): move to this file
6468 2003-03-10 Anders Carlsson <andersca@codefactory.se>
6470 * dbus/dbus-marshal.c:
6471 (_dbus_marshal_set_string):
6472 Take a length argument so we can marshal the correct string
6475 (_dbus_marshal_dict), (_dbus_demarshal_dict),
6476 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
6477 (_dbus_marshal_test):
6478 * dbus/dbus-marshal.h:
6479 Add support for marshalling and demarshalling dicts.
6481 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6482 Add support for TYPE DICT.
6484 * dbus/dbus-message.c: (set_string_field):
6485 Adjust header padding.
6487 (dbus_message_append_args_valist), (dbus_message_append_dict),
6488 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
6489 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
6490 (check_message_handling), (check_have_valid_message):
6491 * dbus/dbus-message.h:
6492 Add functions for setting and getting dicts.
6494 * dbus/dbus-protocol.h:
6500 * doc/dbus-specification.sgml:
6501 Add information about how dicts are marshalled.
6503 * test/data/invalid-messages/dict-with-nil-value.message:
6504 * test/data/invalid-messages/too-short-dict.message:
6505 * test/data/valid-messages/dict-simple.message:
6506 * test/data/valid-messages/dict.message:
6507 Add sample messages containing dicts.
6509 2003-03-08 Anders Carlsson <andersca@codefactory.se>
6511 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
6513 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6516 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6517 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
6518 (dbus_dict_set_int32), (dbus_dict_set_uint32),
6519 (dbus_dict_set_double), (dbus_dict_set_string),
6520 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6521 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6522 (dbus_dict_set_string_array), (_dbus_dict_test):
6524 Fix according to comments from Havoc.
6526 2003-03-06 Michael Meeks <michael@server.home>
6528 * configure.in: if we don't have kde-config, disable have_qt.
6530 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6535 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6536 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
6537 (dbus_dict_remove), (dbus_dict_get_value_type),
6538 (dbus_dict_get_keys), (dbus_dict_put_boolean),
6539 (dbus_dict_put_int32), (dbus_dict_put_uint32),
6540 (dbus_dict_put_double), (dbus_dict_put_string),
6541 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
6542 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
6543 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
6544 (dbus_dict_get_int32), (dbus_dict_get_uint32),
6545 (dbus_dict_get_double), (dbus_dict_get_string),
6546 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
6547 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
6548 (dbus_dict_get_string_array), (_dbus_dict_test):
6550 Add DBusDict implementation
6552 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
6556 2003-03-04 Havoc Pennington <hp@pobox.com>
6558 * test/data/auth/*: adapt to changes
6560 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
6561 USERID_BASE64 and change USERNAME_BASE64 to put in username not
6564 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
6565 more stuff from being in a context name, to make the protocol
6566 simpler to deal with
6568 * dbus/dbus-errors.c (dbus_error_has_name): new function
6569 (dbus_error_is_set): new function
6571 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
6572 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
6574 * dbus/dbus-connection.c (dbus_connection_flush): also read
6575 messages during a flush operation
6577 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
6579 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6581 * configure.in: Check for gethostbyname on Solaris.
6583 * dbus/dbus-transport.c: (_dbus_transport_open):
6584 Remove duplicate "tcp" entry.
6586 * doc/dbus-specification.sgml:
6587 Clarify some things.
6589 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6591 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
6592 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
6593 (_dbus_keyring_test):
6594 * dbus/dbus-md5.c: (_dbus_md5_compute):
6595 * dbus/dbus-sha.c: (_dbus_sha_compute):
6598 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6600 * README: Add some things.
6602 2003-03-04 Anders Carlsson <andersca@codefactory.se>
6604 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
6605 after case DBUS_TYPE_BOOELAN.
6607 2003-03-02 Havoc Pennington <hp@pobox.com>
6609 * test/break-loader.c (randomly_set_extreme_ints): add test that
6610 sets really huge and small integers
6612 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
6613 that length of boolean array fits in the string, and that
6614 string has room for boolean value in single-bool case.
6616 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
6617 optional value to "ALIGN" command which is what to fill the
6620 * test/data/valid-messages/no-padding.message: add regression
6621 test for the message padding problem
6623 2003-03-02 Havoc Pennington <hp@pobox.com>
6625 * dbus/dbus-message.c (decode_header_data): fix to always init
6626 message_padding, from Benjamin Dauvergne
6628 2003-03-02 Havoc Pennington <hp@pobox.com>
6634 2003-03-01 Joe Shaw <joe@assbarn.com>
6636 * configure.in: Check for "struct cmsgcred" and try to access its
6637 members for BSD-like unices.
6639 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
6640 _dbus_read_credentials_unix_socket().
6641 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
6642 read() for reading the credential byte off the unix socket. Use
6643 struct cmsgcred on systems that support it.
6645 2003-02-27 Alexander Larsson <alexl@redhat.com>
6649 Make gthreads-2.0 dependency optional. Don't build thread test if
6652 2003-02-27 Havoc Pennington <hp@pobox.com>
6654 * dbus/dbus-connection.c
6655 (dbus_connection_send_message_with_reply_and_block): fix doh!
6656 doh! doh! bug that resulted in never removing a reply from the
6657 queue, no wonder we called get_reply_serial so much ;-)
6659 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
6660 and client serial instead of demarshaling them every time
6662 2003-02-27 Havoc Pennington <hp@pobox.com>
6664 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
6665 more inlined, using dbus-string-private.h, speeds things up
6668 * dbus/dbus-string.c (_dbus_string_free): apply align offset
6669 when freeing the string
6670 (_dbus_string_steal_data): fix for align offset
6671 (undo_alignment): new function
6673 2003-02-26 Havoc Pennington <hp@redhat.com>
6675 All kinds of audit fixes from Owen, plus initial attempt to
6676 handle unaligned memory returned from malloc.
6678 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
6679 leave room for align_offset and nul byte
6680 (fixup_alignment): function to track an align_offset and
6681 ensure real->str is aligned
6682 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
6683 to allow a nul byte plus align offset
6684 (_dbus_string_lock): fix overflow issue
6685 (_dbus_string_init_const_len): add assertions on sanity of len,
6686 assign allocated to be ALLOCATION_PADDING larger than len
6687 (set_length): fixup the overflow handling
6688 (_dbus_string_get_data_len): fix overflow in assertion
6689 (open_gap): detect overflow in size of gap to be opened
6690 (_dbus_string_lengthen): add overflow check
6691 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
6692 (_dbus_string_append): add overflow check
6693 (_dbus_string_append_unichar): overflow
6694 (_dbus_string_delete): fix overflow in assertion
6695 (_dbus_string_copy_len): overflow in assertion
6696 (_dbus_string_replace_len): overflows in assertions
6697 (_dbus_string_find): change to implement in terms of
6698 _dbus_string_find_to
6699 (_dbus_string_find_to): assorted fixage
6700 (_dbus_string_equal_c_str): assert c_str != NULL,
6701 fix logic so the function works
6702 (_dbus_string_ends_with_c_str): fix overflow thingy
6703 (_dbus_string_base64_encode): overflow fix
6704 (_dbus_string_validate_ascii): overflow
6705 (_dbus_string_validate_nul): overflow
6707 2003-02-26 Havoc Pennington <hp@redhat.com>
6709 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
6711 2003-02-26 Alexander Larsson <alexl@redhat.com>
6714 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
6716 * dbus/dbus-connection.c:
6717 * dbus/dbus-connection.h:
6718 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
6719 Add dbus_connection_set_wakeup_main_function and use it when queueing
6720 incoming and outgoing messages.
6723 * dbus/dbus-dataslot.c:
6724 Threadsafe usage of DBusDataSlotAllocator
6726 * dbus/dbus-message.c: (dbus_message_get_args_iter):
6729 * dbus/dbus-server-unix.c:
6732 * glib/dbus-gmain.c:
6733 Implement the new wakeup functions for glib.
6736 * glib/test-thread-client.c:
6737 * glib/test-thread-server.c:
6738 * glib/test-thread.h:
6739 Initial cut at some thread test code. Not really done yet.
6741 2003-02-26 Havoc Pennington <hp@pobox.com>
6743 * dbus/dbus-connection.c
6744 (dbus_connection_send_message_with_reply_and_block): fix crash
6745 where we ref'd the outgoing message instead of the returned reply
6747 * dbus/dbus-transport-unix.c (do_authentication): check read watch
6748 at the end of this function, so if we didn't need to read for
6749 authentication, we reinstall it for receiving messages
6751 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
6752 a NULL sender for peer-to-peer case
6754 * dbus/dbus-transport-unix.c (check_read_watch): handle
6755 !authenticated case correctly
6757 * glib/dbus-gmain.c: add support for DBusServer
6759 * dbus/dbus-server.c: add data slot support
6761 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
6762 return values and handle errors
6764 * dbus/dbus-dataslot.c: factor out the data slot stuff from
6767 * Doxyfile.in (INPUT): add glib subdir
6769 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
6770 setup_with_g_main instead of hookup_with_g_main; write docs
6772 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6774 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
6775 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6776 * dbus/dbus-message.c: (dbus_message_append_boolean),
6777 (dbus_message_append_boolean_array),
6778 (dbus_message_get_args_valist), (_dbus_message_test):
6779 * dbus/dbus-message.h:
6780 * doc/dbus-specification.sgml:
6781 Various fixes as pointed out by Havoc.
6783 * test/data/invalid-messages/bad-boolean-array.message:
6784 * test/data/invalid-messages/bad-boolean.message:
6785 Add invalid boolean value test cases.
6787 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6789 * dbus/dbus-internals.c: (_dbus_type_to_string):
6790 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6791 (_dbus_marshal_validate_arg):
6792 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6793 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6794 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
6795 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
6796 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
6797 (dbus_message_iter_get_double),
6798 (dbus_message_iter_get_boolean_array), (message_iter_test):
6799 * dbus/dbus-message.h:
6800 * dbus/dbus-protocol.h:
6801 * doc/dbus-specification.sgml:
6802 * test/data/valid-messages/lots-of-arguments.message:
6803 Add support for boolean and boolean array types.
6805 2003-02-23 Havoc Pennington <hp@pobox.com>
6807 * dbus/dbus-keyring.c: finish most of this implementation and
6810 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
6811 these barf if the error isn't cleared to NULL
6813 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
6814 (_dbus_create_directory): new function
6816 * dbus/dbus-errors.c (dbus_set_error): fix warning
6818 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
6819 (_dbus_string_hex_decode): new function
6820 (test_hex_roundtrip): test code
6822 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
6824 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
6826 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
6827 the save-to-temp/rename trick to atomically write the new file
6828 (_dbus_string_parse_uint): new function
6830 2003-02-22 Havoc Pennington <hp@pobox.com>
6832 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
6834 2003-02-22 Havoc Pennington <hp@pobox.com>
6836 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
6837 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
6839 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
6841 * dbus/test/data/sha-1: add US government test suite for SHA-1
6843 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6845 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6846 Make string arrays NULL-terminated.
6848 * dbus/dbus-memory.c: (dbus_free_string_array):
6849 * dbus/dbus-memory.h:
6850 New function for freeing NULL-terminated string arrays.
6852 * dbus/dbus-message-builder.c: (append_quoted_string),
6853 (_dbus_message_data_load):
6854 Add support for array types.
6856 * dbus/dbus-message.c: (check_message_handling):
6857 Add more types as test cases.
6859 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
6860 (_dbus_string_parse_double):
6861 Add the start offset to the end offset.
6863 * test/data/valid-messages/lots-of-arguments.message:
6864 New test message with lots of arguments.
6866 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6868 * dbus/dbus-message.c: (dbus_message_append_nil),
6869 (dbus_message_append_int32), (dbus_message_append_uint32),
6870 (dbus_message_append_double), (dbus_message_append_string),
6871 (dbus_message_append_int32_array),
6872 (dbus_message_append_uint32_array),
6873 (dbus_message_append_double_array),
6874 (dbus_message_append_byte_array),
6875 (dbus_message_append_string_array):
6876 Fix all out-of-memory handling in these functions.
6878 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6880 * dbus/dbus-message.c: (dbus_message_append_nil):
6883 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6885 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6886 (dbus_message_append_nil), (dbus_message_append_int32_array),
6887 (dbus_message_append_uint32_array),
6888 (dbus_message_append_double_array),
6889 (dbus_message_append_byte_array),
6890 (dbus_message_append_string_array), (dbus_message_get_args_valist),
6891 (dbus_message_iter_get_int32_array),
6892 (dbus_message_iter_get_uint32_array),
6893 (dbus_message_iter_get_double_array),
6894 (dbus_message_iter_get_byte_array),
6895 (dbus_message_iter_get_string_array):
6897 * dbus/dbus-message.h:
6898 Add functions for appending and getting arrays.
6900 2003-02-21 Anders Carlsson <andersca@codefactory.se>
6902 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
6903 element size at least 8 bytes, fixes mempool tests on
6906 2003-02-20 Alexander Larsson <alexl@redhat.com>
6908 * dbus/dbus-transport-unix.c (unix_do_iteration):
6909 Unlock the connection mutex during a blocking select call.
6910 Add todo about how we need a way to wake up the select.
6912 * dbus/dbus-connection-internal.h:
6913 * dbus/dbus-connection.c:
6914 Add _dbus_connection_lock and _dbus_connection_unlock.
6916 2003-02-19 Havoc Pennington <hp@pobox.com>
6918 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
6919 Doxyfile.in, not Doxyfile
6921 * dbus/dbus-keyring.c: do some hacking on this
6923 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
6925 * dbus/dbus-errors.c (dbus_set_error_const): do not call
6927 (dbus_set_error): remove dbus_error_init, check for message ==
6928 NULL *before* we sprintf into it, and add @todo about including
6929 system headers in this file
6931 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
6933 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
6935 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
6936 get various bits of user information based on either username
6938 (_dbus_homedir_from_username): new function
6940 2003-02-19 Anders Carlsson <andersca@codefactory.se>
6943 Add check for nonposix getpwnam_r
6945 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
6946 Align the pool element size to a sizeof (void *) boundary.
6948 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
6949 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
6950 General Solaris fixes.
6952 * test/data/valid-messages/simplest-manual.message:
6953 Explicitly state that we want little-endian packing.
6955 2003-02-19 Mikael Hallendal <micke@codefactory.se>
6957 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6959 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
6960 Added to create a transport connecting using a tcp/ip socket.
6962 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
6963 to a tcp socket at given host and port.
6964 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
6967 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
6969 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
6970 Added to create a server listening on a TCP/IP socket.
6972 2003-02-19 Havoc Pennington <hp@pobox.com>
6974 Throughout: mop up all the Doxygen warnings and undocumented
6977 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
6978 to search any paths.
6980 * dbus/dbus-threads.c: move global mutex initializers to
6981 dbus-internals.h, multiple prototypes was confusing doxygen
6982 besides being kind of ugly
6984 * Doxyfile (PREDEFINED): have Doxygen define
6985 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
6986 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
6987 (do not abuse the feature! it's for stuff like the autogenerated
6988 macros in dbus-md5.c, not just for things you don't feel like
6991 2003-02-18 Havoc Pennington <hp@pobox.com>
6993 * dbus/dbus-string.c (_dbus_string_zero): new function
6995 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
6996 wrap it in some dbus-friendly API
6998 * dbus/dbus-types.h: add 16-bit types
7000 2003-02-18 Joe Shaw <joe@assbarn.com>
7002 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7003 credentials from our currently running process.
7004 (get_word): Fix a buglet where we were copying the entire length
7005 instead of relative to our position.
7007 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7008 keys on the stack... it's 640k of data.
7010 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7011 read the credentials byte off the socket, even if we don't have
7013 (_dbus_poll): Implement poll() using select() for systems which
7016 * glib/test-dbus-glib.c (main): Print out an error if no
7017 parameters are given.
7019 * test/data/auth/fallback.auth-script: Added. Tests that a client
7020 can fallback to a secondary auth mechanism if the first fails.
7022 2003-02-18 Havoc Pennington <hp@pobox.com>
7026 2003-02-17 Havoc Pennington <hp@pobox.com>
7028 * doc/dbus-specification.sgml: lots of cosmetic
7029 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7030 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7031 s/server/bus/ (except in authentication section). Add a section
7032 "Message Bus Message Routing"
7034 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7040 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7042 * doc/dbus-specification.sgml:
7043 Specification updates.
7045 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7047 * bus/activation.c: (bus_activation_init), (child_setup),
7048 (bus_activation_activate_service):
7050 * bus/main.c: (main):
7051 Set DBUS_ADDRESS environment variable.
7053 * dbus/dbus-errors.c: (dbus_set_error):
7054 Don't use va_copy since that's a C99 feature.
7056 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7057 (_dbus_spawn_async):
7058 * dbus/dbus-sysdeps.h:
7059 Add child_setup_func to _dbus_spawn_async.
7061 * doc/dbus-specification.sgml:
7062 Update specification.
7064 * test/spawn-test.c: (setup_func), (main):
7067 2003-02-17 Alexander Larsson <alexl@redhat.com>
7069 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7072 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7076 * doc/dbus-test-plan.sgml:
7077 Add test plan document.
7082 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7084 * dbus/dbus-message.c: (decode_header_data),
7085 (_dbus_message_loader_return_buffer):
7086 Set the header padding amount when loading a message.
7088 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7090 * bus/dispatch.c: (send_one_message):
7091 Only send broadcast messages to registered connections.
7093 * dbus/dbus-message.c: (dbus_message_name_is):
7094 * dbus/dbus-message.h:
7095 New convenience function.
7097 * dbus/dbus-transport-debug.c: (do_reading):
7098 Only dispatch one message per run.
7101 * test/bus-test.c: (new_connection_callback), (die),
7102 (test_hello_client1_handler), (test_hello_client2_handler),
7103 (test_hello_replies), (main):
7105 * test/bus-test-loop.[ch]:
7108 2003-02-16 Havoc Pennington <hp@pobox.com>
7110 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7111 backward conditional
7113 2003-02-16 Alexander Larsson <alexl@redhat.com>
7115 * dbus/dbus-connection.c:
7116 Implement sent_message_with_reply. (with_reply_and block is still
7118 Made dispatch_message not lose message if OOM.
7120 * dbus/dbus-errors.h:
7121 Add NoReply error (for reply timeouts).
7123 2003-02-16 Alexander Larsson <alexl@redhat.com>
7125 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7126 Actually free keys and values when destroying hashtable.
7128 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7130 * dbus/dbus-auth.c: (client_try_next_mechanism):
7133 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7134 Return TRUE if there's no thread implementation around.
7136 * glib/dbus-gmain.c: (free_source),
7137 (dbus_connection_hookup_with_g_main):
7138 Make sure to remove the GSource when the connection is finalized.
7140 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7142 * bus/dispatch.c: (bus_dispatch_message_handler):
7143 * dbus/dbus-errors.h:
7144 Return an error if someone tries to send a message to a service
7147 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7149 * bus/activation.c: (load_directory), (bus_activation_init),
7150 (bus_activation_activate_service):
7153 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7154 More work on the activation handling.
7156 * dbus/dbus-errors.h:
7157 Add some error messages
7159 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7160 * dbus/dbus-message.h:
7161 New function that creates an error message.
7163 * dbus/dbus-protocol.h:
7164 Add ACTIVATE_SERVER message.
7166 * dbus/dbus-server-unix.c: (unix_handle_watch),
7167 (_dbus_server_new_for_domain_socket):
7168 Call _dbus_fd_set_close_on_exec.
7170 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7171 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7172 (_dbus_fd_set_close_on_exec):
7173 * dbus/dbus-sysdeps.h:
7174 Add _dbus_fd_set_close_on exec function. Also add function that checks
7175 that all open fds are set to close-on-exec and warns otherwise.
7177 * dbus/dbus-transport-unix.c:
7178 (_dbus_transport_new_for_domain_socket):
7179 Call _dbus_fd_set_close_on_exec.
7181 2003-02-16 Havoc Pennington <hp@pobox.com>
7183 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7184 allow people to avoid setting SIGPIPE to SIG_IGN
7185 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7186 we've been asked not to
7188 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7190 * dbus/dbus-list.c: (_dbus_list_append_link),
7191 (_dbus_list_prepend_link):
7192 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7196 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7199 * bus/activation.c: (bus_activation_entry_free),
7200 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7202 * bus/main.c: (main):
7203 Add simple activation support, doesn't work yet though.
7205 2003-02-15 Zack Rusin <zack@kde.org>
7207 * qt/dbus-qthread.cpp: small casting fix
7209 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7211 * dbus/dbus-errors.c: (dbus_set_error):
7212 * dbus/dbus-errors.h:
7213 Add a few errors and make dbus_set_error void.
7215 * dbus/dbus-sysdeps.c:
7216 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7217 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7218 * dbus/dbus-sysdeps.h:
7219 Add _dbus_spawn_async.
7221 * test/spawn-test.c: (main):
7222 Test for _dbus_spawn_async.
7224 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7226 * dbus/dbus-internals.h:
7227 Fix build without tests.
7229 * dbus/dbus-list.c: (alloc_link):
7230 Fix a segfault when a malloc fails.
7232 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7233 (dbus_malloc0), (dbus_realloc):
7234 Add support for malloc debugging.
7236 2003-02-15 Alexander Larsson <alexl@redhat.com>
7238 * dbus/dbus-threads.c:
7239 * dbus/dbus-threads.h:
7240 Add condvars. Remove static mutext from API.
7241 Implement static mutexes by initializing them from threads_init.
7243 * glib/dbus-gthread.c:
7244 * qt/dbus-qthread.cpp:
7245 Update with the thread api changes.
7250 Turn StaticMutex into normal mutex + init function.
7251 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7252 _dbus_list_append_link, _dbus_list_prepend_link
7255 * dbus/dbus-sysdeps.c:
7256 * dbus/dbus-sysdeps.h:
7257 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7258 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7260 * dbus/dbus-protocol.h:
7261 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7263 * dbus/dbus-message.c:
7264 Make ref/unref atomic.
7267 * dbus/dbus-connection-internal.h:
7268 * dbus/dbus-connection.c:
7269 * dbus/dbus-connection.h:
7271 Change _peek to _borrow,_return & _steal_borrowed.
7272 Change disconnect callback to event.
7273 Make dbus_connection_dispatch_messages reentrant.
7275 * dbus/dbus-transport.c:
7276 Don't ref the connection on calls to the transport
7279 * dbus/dbus-message-handler.c:
7282 * glib/dbus-gmain.c:
7283 Don't use peek_message anymore
7286 * test/debug-thread.c:
7287 * test/debug-thread.h:
7288 Simple thread implementation that asserts() on deadlocks in
7289 single-threaded code.
7292 (main) Call debug_threads_init.
7295 Use disconnect message instead of disconnect callback.
7299 Don't call dbus_connection_set_disconnect_function. Instead export
7300 bus_connection_disconnect.
7303 Call bus_connection_disconnect when we get a disconnected message.
7305 2003-02-15 Havoc Pennington <hp@pobox.com>
7307 * dbus/dbus-message.c (dbus_message_new): fool around with the
7310 2003-02-14 Havoc Pennington <hp@pobox.com>
7312 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7314 * dbus/dbus-memory.c: fail if the debug functions indicate we
7317 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7318 (_dbus_decrement_fail_alloc_counter): debug functions to
7319 simulate memory allocation failures
7321 2003-02-14 Havoc Pennington <hp@pobox.com>
7323 * dbus/dbus-errors.h (struct DBusError): add a word of padding
7326 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7328 * bus/driver.c: (bus_driver_handle_hello):
7330 * bus/services.c: (bus_service_lookup):
7331 Reorder message sending so we get a more sane order.
7333 * test/bus-test.c: (message_handler):
7336 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7338 * bus/driver.c: (bus_driver_send_service_deleted),
7339 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7340 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7341 (bus_driver_send_welcome_message),
7342 (bus_driver_handle_list_services),
7343 (bus_driver_handle_acquire_service),
7344 (bus_driver_handle_service_exists):
7345 * dbus/dbus-bus.c: (dbus_bus_register_client),
7346 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7347 * dbus/dbus-errors.c: (dbus_result_to_string):
7348 * dbus/dbus-errors.h:
7349 * dbus/dbus-message.c: (dbus_message_append_args),
7350 (dbus_message_append_args_valist), (dbus_message_get_args),
7351 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7352 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7353 (dbus_message_iter_get_byte_array),
7354 (dbus_message_iter_get_string_array), (message_iter_test),
7355 (check_message_handling), (_dbus_message_test):
7356 * dbus/dbus-message.h:
7357 * test/bus-test.c: (main):
7358 Change fields to arguments in messages, so that they won't be
7359 confused with header fields.
7361 * glib/test-dbus-glib.c: (main):
7362 Remove append_fields from hello message.
7364 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7366 * dbus/dbus-errors.c:
7367 * dbus/dbus-message.c:
7368 * dbus/dbus-string.c:
7369 Documentation fixes.
7371 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7373 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7375 Implement support for timeouts in dbus-glib.
7377 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7379 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7380 * dbus/dbus-message.c: (process_test_subdir):
7381 * test/break-loader.c: (find_breaks_based_on):
7382 Plug some memory leaks.
7384 2003-02-13 Richard Hult <rhult@codefactory.se>
7386 * bus/main.c: Fix build.
7388 * dbus/dbus-errors.h:
7389 * dbus/dbus-errors.c: Fix copyright for Anders.
7391 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7396 * bus/connection.c: (bus_connection_foreach):
7399 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
7400 (unescape_string), (new_section), (parse_section_start),
7401 (parse_key_value), (report_error), (bus_desktop_file_load),
7402 (bus_desktop_file_get_string):
7403 * bus/desktop-file.h:
7404 Use DBusError for error reporting.
7406 * bus/dispatch.c: (send_one_message),
7407 (bus_dispatch_message_handler):
7408 * bus/driver.c: (bus_driver_send_service_deleted),
7409 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7410 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7411 (bus_driver_send_welcome_message),
7412 (bus_driver_handle_list_services),
7413 (bus_driver_handle_acquire_service),
7414 (bus_driver_handle_service_exists):
7415 * bus/loop.c: (bus_loop_run):
7417 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
7419 * bus/utils.c: (bus_wait_for_memory):
7421 New files with general utility functions.
7423 * dbus/dbus-internals.h:
7424 Remove _DBUS_HANDLE_OOM.
7426 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7428 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
7429 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
7430 * dbus/dbus-errors.h:
7431 Add DBusError structure.
7433 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7435 * test/data/valid-messages/standard-acquire-service.message:
7436 * test/data/valid-messages/standard-hello.message:
7437 * test/data/valid-messages/standard-list-services.message:
7438 * test/data/valid-messages/standard-service-exists.message:
7439 Add some standard messages.
7441 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7443 * bus/driver.c: (bus_driver_send_welcome_message),
7444 (bus_driver_handle_list_services),
7445 (bus_driver_handle_acquire_service),
7446 (bus_driver_handle_service_exists), (bus_driver_handle_message):
7447 Update for API changes in libdbus.
7449 * dbus/dbus-message.c: (dbus_message_new_reply):
7450 * dbus/dbus-message.h:
7451 Remove the name argument. The spec states that replies shouldn't
7454 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7456 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
7457 (report_error), (bus_desktop_file_load), (lookup_section),
7458 (lookup_line), (bus_desktop_file_get_raw),
7459 (bus_desktop_file_get_string):
7460 * bus/desktop-file.h:
7461 Some fixes, and new functions for getting a key value from a section.
7463 2003-02-13 Havoc Pennington <hp@pobox.com>
7465 * test/data/auth/fail-after-n-attempts.auth-script: new test
7467 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
7470 2003-02-13 Havoc Pennington <hp@pobox.com>
7472 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
7473 dbus_credentials_match were backward
7475 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
7476 NO_CREDENTIALS and ROOT_CREDENTIALS
7478 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
7479 into here. Never process more commands after we've reached an
7480 end state; store further data as unused bytes.
7482 * test/data/auth/*: add more auth tests
7484 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
7485 command to match exact string and EXPECT_UNUSED to match unused
7488 * test/Makefile.am (dist-hook): fix to dist all the test stuff
7490 2003-02-12 Havoc Pennington <hp@pobox.com>
7492 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
7493 \r off of popped lines
7495 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
7498 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
7501 2003-02-12 Havoc Pennington <hp@pobox.com>
7503 * dbus/Makefile.am: remove break-loader from the build, since it
7506 * configure.in: add --enable-gcov to turn on coverage profiling
7507 flags and disable optimization
7509 2003-02-10 Havoc Pennington <hp@pobox.com>
7511 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
7512 initial cut at test framework for DBusAuth from laptop.
7513 Doesn't quite work yet but it compiles and I need to get
7514 it off the 266mhz laptop. ;-)
7516 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
7517 fix a memleak in error case
7519 2003-02-12 Anders Carlsson <andersca@codefactory.se>
7522 * bus/desktop-file.c:
7523 * bus/desktop-file.h:
7524 Add a desktop file parser.
7526 2003-02-11 Zack Rusin <zack@kde.org>
7528 * qt/message.[h|cpp]: sample implementation
7529 of the KDE wrapper for DBusMessage
7531 2003-02-09 Zack Rusin <zack@kde.org>
7533 * test/bus-test.c: make_it_compile
7534 * doc/dbus-specification.sgml: minimal semantic fix
7536 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7542 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7545 * dbus/dbus-break-loader.c:
7547 * test/break-loader.c:
7548 Move dbus-break-loader to test/ and rename it to break-loader.
7550 2003-02-02 Havoc Pennington <hp@pobox.com>
7552 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
7553 for code to manage cookies in your home directory
7555 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7557 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
7558 to authenticate, then disconnect the client.
7560 2003-02-03 Alexander Larsson <alexl@redhat.com>
7562 * dbus/dbus-message.c (dbus_message_append_fields):
7565 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7567 * doc/dbus-specification.sgml:
7568 Update address format section.
7570 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7573 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
7574 (message_handler), (new_connection_callback), (loop_quit),
7578 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7580 * bus/driver.c: (bus_driver_handle_service_exists):
7581 Simplify the code a bit.
7583 * dbus/dbus-bus.c: (dbus_bus_service_exists):
7586 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7589 Add libdbus-daemon.la and link to it.
7591 2003-02-01 James Willcox <jwillcox@gnome.org>
7593 * bus/driver.c: (bus_driver_handle_own_service):
7594 Actually include the service reply code in the message.
7596 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7598 * bus/driver.c: (bus_driver_handle_service_exists):
7599 Don't unref the incoming message.
7601 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7603 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
7605 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7607 * dbus/dbus-server.c: (dbus_server_listen):
7608 * dbus/dbus-transport.c: (_dbus_transport_open):
7609 ifdef out the calls to the debug transport and server.
7611 2003-02-02 Alexander Larsson <alexl@redhat.com>
7613 * dbus/dbus-watch.c (dbus_watch_get_flags):
7614 Add note in the docs that ERROR or HANGUP won't be returned
7615 and are assumed always on.
7617 * glib/dbus-gmain.c (add_watch):
7618 Always add IO_ERR | IO_HUP
7620 * dbus/dbus-message.h:
7621 Add semicolon after dbus_message_iter_get_string_array().
7622 Makes qt code build again
7624 2003-02-01 Anders Carlsson <andersca@codefactory.se>
7626 * bus/driver.c: (create_unique_client_name),
7627 (bus_driver_handle_hello):
7628 Don't take a name, just use a numeric id to identify
7632 * dbus/dbus-bus.c: (dbus_bus_register_client),
7633 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7635 Add new convenience functions for communicating with the bus.
7637 * dbus/dbus-message.h:
7639 * dbus/dbus-protocol.h:
7642 2003-02-01 Alexander Larsson <alexl@redhat.com>
7644 * dbus/dbus-message.c (dbus_message_append_fields):
7645 Add some more doc comments.
7647 2003-02-01 Havoc Pennington <hp@pobox.com>
7649 * dbus/dbus-break-loader.c (randomly_modify_length): change
7650 a 4-byte value in the message as if it were a length
7652 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
7653 execute bit on saved files
7655 2003-02-01 Havoc Pennington <hp@pobox.com>
7657 * dbus/dbus-break-loader.c (main): new program to find messages
7658 that break the loader.
7660 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
7661 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
7663 * dbus/dbus-string.c (_dbus_string_set_byte): new
7665 2003-01-31 Havoc Pennington <hp@pobox.com>
7667 * dbus/dbus-message.c: refactor the test code to be more general,
7668 in preparation for writing a "randomly permute test cases to
7669 try to break the loader" program.
7671 2003-01-31 Havoc Pennington <hp@pobox.com>
7673 * doc/dbus-specification.sgml: work on the specification
7675 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
7676 the protocol version of the message.
7678 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
7679 no longer specifies that.
7680 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
7683 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
7684 "break" for DBUS_TYPE_NIL, remove @todo
7686 2003-01-31 Havoc Pennington <hp@pobox.com>
7688 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
7689 just set_is_error/get_is_error as this is a commonly-used
7690 function, and write docs.
7692 2003-01-31 Anders Carlsson <andersca@codefactory.se>
7694 * dbus/dbus-address.c: (dbus_address_entry_free):
7695 Free key and value lists.
7697 * dbus/dbus-internals.c: (_dbus_type_to_string):
7698 Add the types we didn't have.
7700 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7701 (_dbus_marshal_validate_arg):
7704 * dbus/dbus-message.c: (dbus_message_set_sender):
7705 Remove todo about being able to set sender to NULL.
7707 (dbus_message_set_is_error_reply),
7708 (dbus_message_get_is_error_reply):
7709 * dbus/dbus-message.h:
7712 * dbus/dbus-protocol.h:
7713 Add error reply flag.
7715 * test/data/valid-messages/opposite-endian.message:
7716 Add NIL type to test.
7718 2003-01-31 Havoc Pennington <hp@pobox.com>
7720 * doc/dbus-specification.sgml: fully specify the header. Add
7721 flags and major protocol version, and change header/body len to
7724 * dbus/dbus-message-builder.c (append_saved_length): append length
7727 * dbus/dbus-message.c (dbus_message_create_header): change header
7728 length and body length to unsigned. Add the new fields from the
7730 (_dbus_message_loader_return_buffer): unsigned header/body len
7732 2003-01-30 Havoc Pennington <hp@pobox.com>
7734 * dbus/dbus-auth.c: rework to use only REJECTED, no
7737 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
7738 use REJECTED, suggested by Mark McLoughlin
7740 2003-01-30 Havoc Pennington <hp@pobox.com>
7742 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
7743 a better way to report errors here. e.g. "unix address lacks
7744 path" or something. also "no such file" when the path doesn't
7747 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
7749 (dbus_parse_address): add @todo about documenting address format,
7750 and allowing , and ; to be escaped
7752 2003-01-30 Anders Carlsson <andersca@codefactory.se>
7755 Add dbus-address.[ch]
7757 * dbus/dbus-address.c: (dbus_address_entry_free),
7758 (dbus_address_entries_free), (create_entry),
7759 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
7760 (dbus_parse_address), (_dbus_address_test):
7761 * dbus/dbus-address.h:
7762 New files for dealing with address parsing.
7764 * dbus/dbus-connection.c:
7765 Document timeout functions.
7767 * dbus/dbus-message.c:
7768 Document dbus_message_new_from_message.
7770 * dbus/dbus-server-debug.c:
7773 * dbus/dbus-server.c: (dbus_server_listen):
7774 Parse address and use correct server implementation.
7776 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
7777 * dbus/dbus-string.h:
7778 New function with test.
7780 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
7784 * dbus/dbus-transport-debug.c:
7787 * dbus/dbus-transport.c: (_dbus_transport_open):
7788 Parse address and use correct transport implementation.
7790 2003-01-30 Havoc Pennington <hp@pobox.com>
7792 * dbus/dbus-message.c: use message->byte_order instead of
7793 DBUS_COMPILER_BYTE_ORDER throughout.
7794 (dbus_message_create_header): pad header to align the
7795 start of the body of the message to 8-byte boundary
7797 * dbus/dbus-marshal.h: make all the demarshalers take const
7798 DBusString arguments.
7800 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
7801 validate message args here, so we don't have to do slow validation
7802 later, and so we catch bad messages as they are incoming. Also add
7803 better checks on header_len and body_len. Also fill in
7806 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
7807 implemented properly)
7808 (_dbus_string_validate_nul): new function to check all-nul
7810 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
7811 get_arg_end_pos and remove all validation
7812 (_dbus_marshal_validate_arg): actually do validation here.
7814 2003-01-29 Havoc Pennington <hp@pobox.com>
7816 * dbus/dbus-message.c (check_message_handling): fix assertion
7817 failure on set_client_serial
7819 2003-01-28 Havoc Pennington <hp@pobox.com>
7821 * dbus/dbus-server-debug.c: Add doc section comments
7823 * dbus/dbus-transport-debug.c: add doc section comments
7825 2003-01-28 Havoc Pennington <hp@redhat.com>
7827 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
7828 the reverse order from how I had it
7829 (_dbus_string_base64_encode): reverse encoding order. I was
7830 basically byteswapping everything during encoding.
7832 2003-01-28 Anders Carlsson <andersca@codefactory.se>
7834 * dbus/dbus-connection-internal.h:
7835 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
7836 (_dbus_connection_remove_timeout):
7837 Add functions for adding and removing timeouts.
7839 * dbus/dbus-message.c: (dbus_message_new_from_message):
7840 Add new function that takes a message and creates an exact
7841 copy of it, but with the refcount set to 1.
7842 (check_message_handling):
7845 * dbus/dbus-server-protected.h:
7846 * dbus/dbus-server.c: (_dbus_server_init_base),
7847 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
7848 (dbus_server_set_timeout_functions):
7849 (_dbus_server_remove_timeout):
7850 New functions so that a server can add and remove timeouts.
7852 (dbus_server_listen):
7853 Add commented out call to dbus_server_debug_new.
7855 * dbus/dbus-timeout.c: (_dbus_timeout_new):
7856 Actually set the handler, doh.
7858 * dbus/dbus-transport.c: (_dbus_transport_open):
7859 Add commented out call to dbus_transport_debug_client_new.
7862 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
7864 2003-01-28 Havoc Pennington <hp@pobox.com>
7866 * dbus/dbus-message.c (check_message_handling): function to check
7867 on the loaded message, iterates over it etc.
7869 2003-01-28 Havoc Pennington <hp@pobox.com>
7871 * test/Makefile.am (dist-hook): fix make distdir
7873 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
7875 2003-01-27 Havoc Pennington <hp@pobox.com>
7877 * dbus/dbus-mempool.c (time_for_size): replace printf with
7880 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
7881 empty lines; fix the SAVE_LENGTH stuff to be
7882 START_LENGTH/END_LENGTH so it actually works; couple other
7885 * test/Makefile.am (dist-hook): add dist-hook for .message files
7887 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
7888 can be constant or locked.
7889 (_dbus_string_free): allow freeing a const string as
7892 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
7894 * dbus/dbus-test-main.c (main): take an argument which is the
7895 directory containing test data
7897 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
7898 argument to this and load all the messages in test/data/
7899 checking that they can be loaded or not loaded as appropriate.
7901 2003-01-27 Anders Carlsson <andersca@codefactory.se>
7903 * bus/dispatch.c: (bus_dispatch_message_handler):
7904 Dispatch messages sent to services.
7906 * bus/driver.c: (bus_driver_send_service_deleted),
7907 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7908 (bus_driver_send_service_acquired):
7909 Add helper functions for sending service related messages.
7911 (bus_driver_send_welcome_message):
7912 Send HELLO_REPLY instead of WELCOME.
7914 (bus_driver_handle_list_services):
7915 Send LIST_SERVICES_REPLY instead of SERVICES.
7917 (bus_driver_handle_own_service),
7918 (bus_driver_handle_service_exists):
7919 New message handlers.
7921 (bus_driver_handle_message):
7922 Invoke new message handlers.
7924 (bus_driver_remove_connection):
7925 Don't remove any services here since that's done automatically
7926 by bus_service_remove_owner now.
7929 New function signatures.
7931 * bus/services.c: (bus_service_add_owner):
7932 Send ServiceAcquired message if we're the only primary owner.
7934 (bus_service_remove_owner):
7935 Send ServiceAcquired/ServiceLost messages.
7937 (bus_service_set_prohibit_replacement),
7938 (bus_service_get_prohibit_replacement):
7939 Functions for setting prohibit replacement.
7941 (bus_service_has_owner):
7942 New function that checks if a connection is in the owner queue of
7946 Add new function signatures.
7948 * dbus/dbus-list.c: (_dbus_list_test):
7949 Add tests for _dbus_list_remove_last and traversing the list backwards.
7952 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
7953 go any further, so return NULL then.
7955 * dbus/dbus-protocol.h:
7956 Add new messages, service flags and service replies.
7958 2003-01-26 Havoc Pennington <hp@pobox.com>
7960 * dbus/dbus-message-builder.c: implement, completely untested.
7962 * test/data/*: add data to be used in testing.
7963 ".message" files are our simple loadable text format.
7964 ".message-raw" will be binary dumps of messages.
7966 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
7968 2003-01-26 Havoc Pennington <hp@pobox.com>
7970 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
7972 * dbus/dbus-errors.c (dbus_result_to_string): add
7975 * dbus/dbus-message-builder.c: new file, will contain code to load
7976 up messages from files. Not implemented yet.
7978 2003-01-26 Havoc Pennington <hp@pobox.com>
7980 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
7981 the sender by setting to NULL
7983 2003-01-26 Havoc Pennington <hp@pobox.com>
7985 The unit tests pass, but otherwise untested. If it breaks, the
7986 tests should have been better. ;-)
7988 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
7991 * dbus/dbus-message.c: redo everything so we maintain
7992 message->header as the only copy of the various fields.
7993 This avoids the possibility of out-of-memory in some cases,
7994 for example dbus_message_lock() can't run out of memory anymore,
7995 and avoids extra copying. Figured I may as well go ahead and do
7996 this since it was busted for dbus_message_lock to not return
7997 failure on OOM, and dbus_message_write_header was totally
7998 unchecked for OOM. Also fixed some random other bugs.
8000 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8001 that strings are nul-terminated. Also, end_pos can be equal
8002 to string length just not greater than, I think.
8003 (_dbus_marshal_set_int32): new function
8004 (_dbus_marshal_set_uint32): new function
8005 (_dbus_marshal_set_string): new function
8007 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8008 a warning, init timeout_list to NULL
8009 (dbus_connection_send_message): don't use uninitialized variable
8012 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8014 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8016 * bus/driver.c: (bus_driver_handle_hello),
8017 (bus_driver_send_welcome_message):
8020 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8022 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8023 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8024 (dbus_connection_unref):
8025 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8026 * dbus/dbus-message.c: (dbus_message_unref),
8029 (dbus_message_get_fields):
8030 Remove debugging printout.
8032 (_dbus_message_loader_return_buffer):
8033 Don't store the header string.
8035 (_dbus_message_test):
8038 2003-01-26 Richard Hult <rhult@codefactory.se>
8040 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8041 the file descriptor list, since it can change under us.
8043 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8045 * glib/dbus-gmain.c: (dbus_connection_prepare),
8046 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8047 (remove_watch), (dbus_connection_hookup_with_g_main):
8048 Rewrite the glib handling to use its own GSource instead of a
8049 GIOChannel so we can catch messages put in the queue while waiting
8052 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8055 * bus/connection.c: (connection_disconnect_handler),
8056 (connection_watch_callback), (bus_connection_setup):
8057 * bus/dispatch.c: (send_one_message),
8058 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8059 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8061 * bus/driver.c: (bus_driver_send_service_deleted),
8062 (bus_driver_send_service_created), (bus_driver_handle_hello),
8063 (bus_driver_send_welcome_message),
8064 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8065 (bus_driver_handle_message):
8067 Refactor code, put the message dispatching in its own file. Use
8068 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8071 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8073 * dbus/dbus-internals.h:
8074 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8076 * dbus/dbus-message.c: (dbus_message_get_sender):
8077 * dbus/dbus-message.h:
8078 Implement dbus_message_get_sender.
8080 * dbus/dbus-protocol.h:
8081 Add message and service defines.
8083 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8085 * dbus/dbus-connection.c: (dbus_connection_send_message):
8086 * dbus/dbus-message-internal.h:
8087 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8088 (dbus_message_write_header):
8089 Remove _dbus_messag_unlock and don't set the client serial on a
8090 message if one already exists.
8092 2003-01-24 Havoc Pennington <hp@pobox.com>
8094 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8097 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8100 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8102 * dbus/dbus-list.c: (alloc_link), (free_link):
8103 Use a memory pool for the links.
8105 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8107 * bus/connection.c: (bus_connection_foreach):
8109 Add new bus_connection_foreach function.
8111 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8112 Add function that broadcasts a message to all clients.
8114 (bus_driver_send_service_created), (bus_driver_handle_hello),
8115 (bus_driver_send_welcome_message),
8116 (bus_driver_handle_list_services), (bus_driver_message_handler):
8117 Implement functions that take care of listing services, and notifying
8118 clients when new services are created.
8120 * bus/services.c: (bus_services_list):
8122 Add new function that returns an array of strings with the currently
8123 registered services.
8126 * glib/dbus-gmain.c:
8127 Update copyright year.
8129 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8131 * dbus/dbus-connection.c: (dbus_connection_send_message):
8132 Unlock the message in case it was sent earlier.
8134 (dbus_connection_send_message_with_reply_and_block):
8135 Remove the reply message from the list.
8137 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8138 Set array_len and new_pos correctly.
8140 (_dbus_marshal_test):
8141 Remove debug output.
8143 * dbus/dbus-message-internal.h:
8144 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8145 New function that returns the reply serial.
8147 (_dbus_message_unlock):
8148 New function that unlocks a message and resets its header.
8150 (dbus_message_append_string_array),
8151 (dbus_message_get_fields_valist),
8152 (dbus_message_iter_get_field_type),
8153 (dbus_message_iter_get_string_array),
8154 (dbus_message_get_fields),
8155 (dbus_message_append_fields_valist):
8156 Handle string arrays.
8158 (dbus_message_set_sender):
8159 Make this function public since the bus daemon needs it.
8161 (decode_header_data):
8162 Set the reply serial to -1 initially.
8164 * dbus/dbus-message.h:
8165 Add dbus_message_set_sender.
8167 2003-01-24 Havoc Pennington <hp@pobox.com>
8169 * doc/dbus-specification.sgml: add some stuff
8171 2003-01-22 Havoc Pennington <hp@pobox.com>
8173 * doc/dbus-specification.sgml: Start to document the protocol.
8175 2003-01-22 Havoc Pennington <hp@pobox.com>
8177 * dbus/dbus-connection.c
8178 (dbus_connection_send_message_with_reply_and_block): add some @todo
8180 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8182 2003-01-21 Havoc Pennington <hp@pobox.com>
8184 (patch untested because can't compile)
8186 * bus/driver.c (create_unique_client_name): make this function
8187 never recycle client names. Also, caller should initialize
8190 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8192 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8194 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8195 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8196 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8197 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8198 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8199 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8200 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8201 * dbus/dbus-marshal.h:
8202 * dbus/dbus-protocol.h:
8203 Add support for marshalling and demarshalling integer, double
8206 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8211 * bus/connection.c: (connection_disconnect_handler):
8212 Remove the connection from the bus driver's list.
8214 (connection_watch_callback): Dispatch messages.
8216 (free_connection_data): Free connection name.
8218 (bus_connection_setup): Add connection to the bus driver's list.
8219 (bus_connection_remove_owned_service):
8220 (bus_connection_set_name), (bus_connection_get_name):
8221 Add functions for setting and getting the connection's name.
8224 Add function headers.
8226 * bus/driver.c: (create_unique_client_name),
8227 (bus_driver_handle_hello_message),
8228 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8229 (bus_driver_add_connection), (bus_driver_remove_connection):
8232 * bus/services.c: (bus_service_free):
8234 New file that handles communication and registreation with the bus
8237 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8239 * dbus/dbus-connection.c: (dbus_connection_send_message):
8240 Add a new client_serial parameter.
8242 (dbus_connection_send_message_with_reply):
8243 Remove a @todo since we've implemented the blocking function.
8245 (dbus_connection_send_message_with_reply_and_block):
8246 New function that sends a message and waits for a reply and
8247 then returns the reply.
8249 * dbus/dbus-connection.h:
8252 * dbus/dbus-errors.c: (dbus_result_to_string):
8253 * dbus/dbus-errors.h:
8254 Add new DBUS_RESULT.
8256 * dbus/dbus-message-internal.h:
8257 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8258 (_dbus_message_set_sender), (dbus_message_write_header),
8259 (dbus_message_new_reply), (decode_header_data),
8260 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8261 * dbus/dbus-message.h:
8262 Add new functions that set the reply serial and sender.
8263 Also marshal and demarshal them correctly and add test.
8265 * dbus/dbus-protocol.h:
8266 Add new DBUS_MESSAGE_TYPE_SENDER.
8269 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8270 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8271 (dbus_connection_hookup_with_g_main):
8272 * glib/test-dbus-glib.c: (main):
8273 Rewrite to use GIOChannel and remove the GSource crack.
8275 * test/echo-client.c: (main):
8276 * test/watch.c: (check_messages):
8277 Update for changed APIs
8279 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8281 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8283 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8284 Create a DBusTimeoutList.
8285 (dbus_connection_set_timeout_functions): Add new function to
8286 set timeout callbacks
8288 * dbus/dbus-connection.h: Add public DBusTimeout API.
8290 * dbus/dbus-message.c: (dbus_message_get_service):
8291 * dbus/dbus-message.h: New function.
8293 * dbus/dbus-server.c: Fix small doc typo.
8295 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8297 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8299 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8300 of the string, just as long as specified.
8302 2003-01-19 Havoc Pennington <hp@pobox.com>
8304 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8307 * dbus/dbus-server.c (dbus_server_set_max_connections)
8308 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8309 keep track of current number of connections, and add API for
8310 setting a max (but haven't implemented enforcing the max yet)
8312 2003-01-18 Havoc Pennington <hp@pobox.com>
8314 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8315 reading/writing if read_watch != NULL or write_watch != NULL.
8317 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8318 the message loader code to actually load message->header and
8319 message->body into the newly-created message.
8321 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8324 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8325 (dbus_connection_get_max_message_size)
8326 (dbus_connection_set_max_live_messages_size)
8327 (dbus_connection_get_max_live_messages_size): implement some
8328 resource limitation functions
8330 * dbus/dbus-resources.c: new file implementing some of the
8331 resource limits stuff
8333 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8334 missing docs, add @todo to handle OOM etc.
8336 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8339 2003-01-18 Havoc Pennington <hp@pobox.com>
8341 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8342 connection if it hasn't been already.
8344 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8345 replace with DisconnectFunction.
8347 2003-01-18 Havoc Pennington <hp@pobox.com>
8349 Building --disable-verbose-mode --disable-asserts --disable-tests
8350 cuts the library from 112K to 45K or so
8352 * configure.in: check for varargs macro support,
8353 add --enable-verbose-mode, --enable-asserts.
8355 * dbus/dbus-internals.h (_dbus_assert): support
8357 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8359 2003-01-18 Havoc Pennington <hp@pobox.com>
8361 * dbus/dbus-test.c: include config.h so that tests actually run
8363 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8364 so the failure mode when that assumption fails will be plenty
8367 2003-01-18 Havoc Pennington <hp@pobox.com>
8369 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8371 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8374 * test/Makefile.am: don't use special variable "TESTS" for echo-*
8375 since we don't want to use those in make check
8377 2003-01-15 Havoc Pennington <hp@redhat.com>
8383 2003-01-15 Havoc Pennington <hp@redhat.com>
8385 * test/Makefile.am: fix so that test source code ends up in the
8386 distribution on make distcheck
8388 2003-01-15 Havoc Pennington <hp@redhat.com>
8394 2003-01-15 Havoc Pennington <hp@redhat.com>
8396 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
8397 fix build when --disable-tests
8399 * Makefile.am (EXTRA_DIST): put HACKING in here
8401 * HACKING: document procedure for making a tarball release.
8403 2003-01-14 Anders Carlsson <andersca@codefactory.se>
8405 * bus/connection.c: (connection_error_handler),
8406 (bus_connection_setup):
8407 * bus/main.c: (main):
8408 Make sure that the DBusConnectionData struct is NULLed
8409 out to prevent a segfault.
8411 * dbus/dbus-errors.c: (dbus_result_to_string):
8412 * dbus/dbus-errors.h:
8413 * dbus/dbus-message.c: (dbus_message_get_fields),
8414 (dbus_message_get_fields_valist), (_dbus_message_test):
8415 * dbus/dbus-message.h:
8416 Make dbus_message_get_fields return a result code so we can
8417 track invalid fields as well as oom.
8419 2003-01-11 Havoc Pennington <hp@pobox.com>
8421 * configure.in: change --enable-test/--enable-ansi action-if-given
8422 to enable_foo=$enableval instead of enable_foo=yes
8424 2003-01-08 Havoc Pennington <hp@pobox.com>
8426 * dbus/dbus-string.c (_dbus_string_align_length): new function
8428 * dbus/dbus-test-main.c: move main() for test app here
8430 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
8431 symbol to run tests, because dbus-test isn't in the main
8434 Code review nitpicks.
8436 * dbus/dbus-message.c (dbus_message_write_header): add newlines
8437 for people with narrow emacs ;-). Assert client_serial was filled
8438 in. Assert message->name != NULL.
8439 (dbus_message_append_fields): have "first_field_type" arg separate
8440 from va list, needed for C++ binding that also uses varargs IIRC
8441 and helps with type safety
8442 (dbus_message_new): add @todo about using DBusString to store
8443 service/name internally
8444 (dbus_message_new): don't leak ->service and ->name on OOM later
8446 (dbus_message_unref): free the service name
8447 (dbus_message_get_fields): same change to varargs
8448 i.e. first_field_type
8449 (_dbus_message_loader_return_buffer): assert that the message data
8450 is aligned (if not it's a bug in our code). Put in verbose griping
8451 about why we set corrupted = TRUE.
8452 (decode_header_data): add FIXME that char* is evil. Was going to
8453 add FIXME about evil locale-specific string.h strncmp, but just
8454 switched to wacky string-as-uint32 optimization. Move check for
8455 "no room for field name" above get_const_data_len() to avoid
8456 assertion failure in get_const_data_len if we have trailing 2
8457 bytes or the like. Check for service and name fields being
8458 provided twice. Don't leak service/name on error. Require field
8459 names to be aligned to 4 bytes.
8461 * dbus/dbus-marshal.c: move byte swap stuff to header
8462 (_dbus_pack_int32): uscore-prefix
8463 (_dbus_unpack_int32): uscore-prefix
8464 (_dbus_unpack_uint32): export
8465 (_dbus_demarshal_string): add @todo complaining about use of
8467 (_dbus_marshal_get_field_end_pos): add @todo about bad error
8468 handling allowing corrupt data to go unchecked
8470 2003-01-08 Havoc Pennington <hp@redhat.com>
8472 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
8473 to the select() as needed for authentication. (should be using
8474 _dbus_poll() not select, but for another day)
8476 * dbus/dbus.h: include dbus/dbus-protocol.h
8478 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8480 * dbus/Makefile.am (dbusinclude_HEADERS): Install
8483 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8485 * dbus/dbus-internals.c: (_dbus_type_to_string):
8486 New function that returns a string describing a type.
8488 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
8489 * dbus/dbus-marshal.h:
8490 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
8491 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
8492 (dbus_message_iter_get_byte_array):
8493 * dbus/dbus-message.h:
8494 Add new convenience functions for appending and getting message fields.
8495 Also add demarshalling routines for byte arrays.
8497 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8499 * dbus/dbus-connection-internal.h:
8500 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8501 (_dbus_connection_get_next_client_serial),
8502 (dbus_connection_send_message):
8503 * dbus/dbus-internals.h:
8504 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
8505 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
8506 (_dbus_marshal_uint32), (_dbus_demarshal_double),
8507 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
8508 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
8509 (_dbus_verbose_bytes), (_dbus_marshal_test):
8510 * dbus/dbus-marshal.h:
8511 * dbus/dbus-message-internal.h:
8512 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
8513 (dbus_message_write_header), (_dbus_message_lock),
8514 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
8515 (dbus_message_get_name), (dbus_message_append_int32),
8516 (dbus_message_append_uint32), (dbus_message_append_double),
8517 (dbus_message_append_string), (dbus_message_append_byte_array),
8518 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
8519 (dbus_message_iter_unref), (dbus_message_iter_has_next),
8520 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
8521 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
8522 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
8523 (decode_header_data), (_dbus_message_loader_return_buffer),
8524 (message_iter_test), (_dbus_message_test):
8525 * dbus/dbus-message.h:
8526 * dbus/dbus-protocol.h:
8527 * dbus/dbus-test.c: (main):
8529 * glib/test-dbus-glib.c: (message_handler), (main):
8530 * test/echo-client.c: (main):
8531 * test/watch.c: (check_messages):
8532 Make messages sendable and receivable for real.
8534 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8536 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8537 (_dbus_marshal_string), (_dbus_marshal_byte_array):
8538 * dbus/dbus-message.c: (dbus_message_append_int32),
8539 (dbus_message_append_uint32), (dbus_message_append_double),
8540 (dbus_message_append_string), (dbus_message_append_byte_array):
8541 Handle OOM restoration.
8543 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8545 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8546 (_dbus_demarshal_string), (_dbus_marshal_test):
8547 * dbus/dbus-marshal.h:
8548 * dbus/dbus-message.c: (dbus_message_get_name),
8549 Document these functions.
8551 (dbus_message_append_int32), (dbus_message_append_uint32),
8552 (dbus_message_append_double), (dbus_message_append_string),
8553 (dbus_message_append_byte_array):
8554 * dbus/dbus-message.h:
8555 Add functions for adding message fields of different types.
8557 * dbus/dbus-protocol.h:
8558 Add the different types.
8560 2003-01-05 Havoc Pennington <hp@pobox.com>
8562 * bus/connection.c: implement routines for handling connections,
8563 first thing is keeping a list of owned services on each connection
8564 and setting up watches etc.
8566 * bus/services.c: implement a mapping from service names to lists
8569 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
8571 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
8572 to use static mutexes for global data
8574 * dbus/dbus-connection.c (dbus_connection_set_data): add new
8575 collection of functions to set/get application-specific data
8576 on the DBusConnection.
8578 2003-01-04 Havoc Pennington <hp@pobox.com>
8580 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
8581 (_dbus_poll): new function
8583 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
8586 * bus/loop.c: initial code for the daemon main loop
8588 2003-01-04 Havoc Pennington <hp@pobox.com>
8590 * test/watch.c (error_handler): make it safe if the error handler
8591 is called multiple times (if we s/error handler/disconnect
8592 handler/ we should just guarantee it's called only once)
8594 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
8595 error handler on disconnect (it's quite possible we should
8596 just change the error handler to a "disconnect handler," I'm
8597 not sure we have any other meaningful errors)
8599 * configure.in: check for getpwnam_r
8601 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
8602 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
8603 mechanism as in SASL spec, using socket credentials
8605 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
8606 (_dbus_send_credentials_unix_socket): new function
8608 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
8610 (_dbus_write): only check errno if <0 returned
8611 (_dbus_write_two): ditto
8613 2003-01-02 Anders Carlsson <andersca@codefactory.se>
8615 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
8616 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
8617 (_dbus_marshal_test):
8618 * dbus/dbus-marshal.h:
8619 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
8620 to _dbus_marshal_utf8_string. Also fix some tests.
8622 2002-12-28 Harri Porten <porten@kde.org>
8624 * configure.in: added check for C++ compiler and a very cheesy
8625 check for the Qt integration
8627 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
8629 * qt/Makefile.am: added
8631 * qt/.cvsignore: added
8633 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
8634 latter, added #ifdef QT_THREAD_SUPPORT guard.
8636 * dbus/Makefile.am: added missing headers for make dist
8638 2002-12-28 Kristian Rietveld <kris@gtk.org>
8640 * dbus/Makefile.am: fixup export-symbols-regex.
8642 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8644 * acinclude.m4: Add this file and put the
8645 PKG_CHECK_MODULE macro in it.
8647 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8649 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8650 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8651 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8652 (_dbus_marshal_test):
8653 Make the demarshalling routines align the pos argument.
8654 Add string marshalling tests and fix the obvious bugs
8657 2002-12-26 Havoc Pennington <hp@pobox.com>
8659 * dbus/dbus-auth.c: fixes fixes fixes
8661 * dbus/dbus-transport-unix.c: wire up support for
8662 encoding/decoding data on the wire
8664 * dbus/dbus-auth.c (_dbus_auth_encode_data)
8665 (_dbus_auth_decode_data): append to target string
8666 instead of nuking it.
8668 2002-12-26 Havoc Pennington <hp@pobox.com>
8670 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
8671 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
8674 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
8675 avoid swap_bytes() overhead (ignoring possible assembly stuff for
8676 now). Main point is because I wanted unpack_uint32 to implement
8678 (_dbus_verbose_bytes): new function
8680 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
8682 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
8683 mechanism to handle a corrupt message stream
8684 (_dbus_message_loader_new): fix preallocation to only prealloc,
8687 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
8688 (_dbus_string_test): enhance tests for copy/move and fix the
8691 * dbus/dbus-transport-unix.c: Hold references in more places to
8692 avoid reentrancy problems
8694 * dbus/dbus-transport.c: ditto
8696 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
8697 leak reference count in no-message case
8699 * test/watch.c (do_mainloop): handle adding/removing watches
8700 during iteration over the watches. Also, ref the connection/server
8701 stored on a watch, so we don't try to mangle a destroyed one.
8703 * dbus/dbus-transport-unix.c (do_authentication): perform
8706 * dbus/dbus-auth.c (get_state): add a state
8707 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
8708 (_dbus_auth_get_unused_bytes): append the unused bytes
8709 to the passed in string, rather than prepend
8711 * dbus/dbus-transport.c (_dbus_transport_init_base): create
8712 the auth conversation DBusAuth
8714 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
8715 (_dbus_transport_new_for_domain_socket): when creating a
8716 transport, pass in whether it's a client-side or server-side
8717 transport so we know which DBusAuth to create
8719 2002-12-03 Havoc Pennington <hp@pobox.com>
8721 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
8722 _after_ finalizing the derived members
8723 (unix_connection_set): unref watch if we fail to add it
8725 * dbus/dbus-connection.c (dbus_connection_unref): delete the
8726 transport first, so that the connection owned by the
8727 transport will be valid as the transport finalizes.
8729 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
8730 if necessary, and remove watches from the connection.
8732 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
8734 2002-12-26 Anders Carlsson <andersca@codefactory.se>
8736 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8737 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8738 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8739 (_dbus_marshal_test):
8740 * dbus/dbus-marshal.h:
8741 Add string marshal functions and have the demarshal functions
8742 return the new position.
8744 2002-12-25 Havoc Pennington <hp@pobox.com>
8746 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
8747 it is a simple protocol that just maps directly to SASL.
8749 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
8750 initial implementation, not actually used yet.
8752 * dbus/dbus-string.c (_dbus_string_find): new function
8753 (_dbus_string_equal): new function
8754 (_dbus_string_base64_encode): new function
8755 (_dbus_string_base64_decode): new function
8757 2002-12-25 Anders Carlsson <andersca@codefactory.se>
8760 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
8761 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8762 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8763 (_dbus_demarshal_uint32), (_dbus_marshal_test):
8764 * dbus/dbus-marshal.h:
8765 * dbus/dbus-protocol.h:
8766 * dbus/dbus-test.c: (main):
8768 Add un-optimized marshalling/demarshalling routines.
8770 2002-12-25 Harri Porten <porten@kde.org>
8772 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
8774 2002-12-24 Zack Rusin <zack@kde.org>
8776 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
8777 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
8780 2002-12-24 Havoc Pennington <hp@pobox.com>
8782 * glib/dbus-gthread.c: fix include
8784 * glib/dbus-glib.h: rename DBusMessageHandler for now.
8785 I think glib API needs to change, though, as you don't
8786 want to use DBusMessageFunction, you want to use the
8787 DBusMessageHandler object. Probably
8788 dbus_connection_open_with_g_main_loop()
8789 and dbus_connection_setup_g_main_loop() or something like that
8790 (but think of better names...) that just create a connection
8791 that has watch/timeout functions etc. already set up.
8793 * dbus/dbus-connection.c
8794 (dbus_connection_send_message_with_reply): new function just to
8795 show how the message handler helps us deal with replies.
8797 * dbus/dbus-list.c (_dbus_list_remove_last): new function
8799 * dbus/dbus-string.c (_dbus_string_test): free a string that
8802 * dbus/dbus-hash.c: use memory pools for the hash entries
8803 (rebuild_table): be more paranoid about overflow, and
8804 shrink table when we can
8805 (_dbus_hash_test): reduce number of sprintfs and write
8806 valid C89. Add tests for case where we grow and then
8807 shrink the hash table.
8809 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
8811 * dbus/dbus-connection.c (dbus_connection_register_handler)
8812 (dbus_connection_unregister_handler): new functions
8814 * dbus/dbus-message.c (dbus_message_get_name): new
8816 * dbus/dbus-list.c: fix docs typo
8818 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
8819 an object representing a handler for messages.
8821 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8824 * glib/dbus-gthread.c: (dbus_gthread_init):
8825 Don't use the gdbus prefix for public functions.
8827 2002-12-16 Anders Carlsson <andersca@codefactory.se>
8831 Add GLib checks and fixup .pc files
8835 * glib/dbus-gmain.c: (gdbus_connection_prepare),
8836 (gdbus_connection_check), (gdbus_connection_dispatch),
8837 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
8838 (dbus_connection_gsource_new):
8839 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
8840 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
8841 * glib/test-dbus-glib.c: (message_handler), (main):
8844 2002-12-15 Harri Porten <porten@kde.org>
8846 * autogen.sh: check for libtoolize before attempting to use it
8848 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
8851 * .cvsignore: ignore more stamp files
8853 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
8855 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
8856 without make install.
8858 2002-12-15 Havoc Pennington <hp@pobox.com>
8860 * dbus/dbus-threads.c: add thread stubs that a higher library
8861 layer can fill in. e.g. the GLib wrapper might fill them in with
8862 GThread stuff. We still need to use this thread API to
8863 thread-safe-ize the library.
8865 2002-12-12 Havoc Pennington <hp@pobox.com>
8867 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
8868 below new interfaces and include fewer system headers.
8870 * dbus/dbus-sysdeps.c (_dbus_read): new function
8871 (_dbus_write): new function
8872 (_dbus_write_two): new function
8873 (_dbus_connect_unix_socket): new function
8874 (_dbus_listen_unix_socket): new function
8876 * dbus/dbus-message-internal.h: change interfaces to use
8879 2002-12-11 Havoc Pennington <hp@pobox.com>
8881 * dbus/dbus-types.h: add dbus_unichar
8883 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
8885 * dbus/dbus-connection.c (dbus_connection_send_message): return
8888 * dbus/dbus-transport.c: include dbus-watch.h
8890 * dbus/dbus-connection.c: include dbus-message-internal.h
8892 * HACKING: add file with coding guidelines stuff.
8894 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
8895 handling here, for security purposes (as in vsftpd). Not actually
8896 using this class yet.
8898 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
8899 system/libc usage here, as in vsftpd, for ease of auditing (and
8900 should also simplify portability). Haven't actually moved all the
8901 system/libc usage into here yet.
8903 2002-11-25 Havoc Pennington <hp@pobox.com>
8905 * dbus/dbus-internals.c (_dbus_verbose): fix to not
8906 always print the first verbose message.
8908 2002-11-24 Havoc Pennington <hp@pobox.com>
8910 * test/echo-client.c, test/echo-server.c: cheesy test
8913 * configure.in (AC_CHECK_FUNCS): check for writev
8915 * dbus/dbus-message.c (_dbus_message_get_network_data): new
8918 * dbus/dbus-list.c (_dbus_list_foreach): new function
8920 * dbus/dbus-internals.c (_dbus_verbose): new function
8922 * dbus/dbus-server.c, dbus/dbus-server.h: public object
8923 representing a server that listens for connections.
8925 * dbus/.cvsignore: create
8927 * dbus/dbus-errors.h, dbus/dbus-errors.c:
8928 public API for reporting errors
8930 * dbus/dbus-connection.h, dbus/dbus-connection.c:
8931 public object representing a connection that
8932 sends/receives messages. (Same object used for
8933 both client and server.)
8935 * dbus/dbus-transport.h, dbus/dbus-transport.c:
8936 Basic abstraction for different kinds of stream
8937 that we might read/write messages from.
8939 2002-11-23 Havoc Pennington <hp@pobox.com>
8941 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
8944 * dbus/dbus-test.c (main): add list test, and include
8945 dbus-test.h as intended
8947 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
8948 (_dbus_hash_table_remove_int): return value indicates
8949 whether the entry existed to remove
8951 * dbus/dbus-list.c: add linked list utility class,
8954 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
8957 2002-11-23 Havoc Pennington <hp@pobox.com>
8959 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
8960 DBUS_END_DECLS to nothing, that should fix this once and for all
8962 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
8964 * dbus/dbus-message.c, dbus/dbus-hash.c:
8965 add some missing @brief
8967 2002-11-23 Havoc Pennington <hp@pobox.com>
8969 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
8970 to avoid confusing Doxygen
8972 * dbus/dbus-hash.c: @} not }@
8974 * dbus/dbus-message.c (struct DBusMessage): split out
8977 2002-11-23 Havoc Pennington <hp@pobox.com>
8979 * configure.in: pile on more warning flags if using gcc
8981 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
8982 to document static functions
8984 * configure.in: add summary to end of configure so it
8985 looks nice and attractive
8987 * dbus/dbus-hash.c: finish implementation and write unit
8990 * configure.in: add --enable-tests to enable unit tests
8992 * dbus/dbus-test.c: test program to run unit tests
8993 for all files in dbus/*, initially runs a test for
8996 * dbus/dbus-internals.h: file to hold some internal utility stuff
8998 2002-11-22 Havoc Pennington <hp@redhat.com>
9000 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9001 "ported" away from Tcl
9003 * dbus/dbus-types.h: header for types such as dbus_bool_t
9005 2002-11-22 Havoc Pennington <hp@redhat.com>
9007 * dbus/dbus.h: fixups for doc warnings
9009 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9011 (QUIET): make it quiet so we can see warnings
9013 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9015 2002-11-22 Havoc Pennington <hp@redhat.com>
9017 * Makefile.am: include "Doxyfile" target in all-local
9019 * configure.in: generate the Doxyfile
9021 * Doxyfile.in: move Doxyfile here, so we can use
9022 configure to generate a Doxyfile with the right
9025 2002-11-22 Havoc Pennington <hp@redhat.com>
9027 * dbus/dbus-message.c: move inline docs into .c file
9029 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9030 so all docs are under doc/
9031 (MAN_EXTENSION): generate man pages. Use extension
9032 ".3dbus" which matches ".3qt" on my system,
9033 I guess this is OK, I don't know really.
9034 (FILE_PATTERNS): look for .c files not .h, makes sense
9037 2002-11-22 Havoc Pennington <hp@pobox.com>
9039 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9040 because any app can be a server, and any app can be a client,
9041 the bus is a special kind of server.
9043 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9045 * Doxyfile : adding. Still needs Makefile rules to be generated
9046 automatically (just run "doxygen" in the toplevel dir for now to
9049 * dbus/dbus-message.h : Adding sample docs (javadoc since
9050 resembles gtk-doc a little more)
9052 * dbus/dbus.h : Adding sample docs
9054 2002-11-21 Havoc Pennington <hp@redhat.com>
9056 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9057 so we can allow ourselves to include files directly,
9058 instead of having to use dbus.h
9060 * dbus/dbus.h: fill in
9062 * dbus/dbus-message.h: sketch out a sample header file.
9063 Include griping if you include it directly instead of
9066 * dbus/dbus-macros.h: new file with macros for extern "C",
9067 TRUE/FALSE, NULL, etc.
9069 * doc/file-boilerplate.c: put include guards in here
9071 2002-11-21 Havoc Pennington <hp@redhat.com>
9073 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9075 * COPYING: include the GPL as well, and license code
9076 under both AFL and GPL.
9078 2002-11-21 Havoc Pennington <hp@redhat.com>
9080 * acconfig.h: get rid of this
9082 * autogen.sh (run_configure): add --no-configure option
9084 * configure.in: remove AC_ARG_PROGRAM to make
9085 autoconf complain less. add AC_PREREQ.
9086 add AC_DEFINE third arg.
9088 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9091 Fix references so we can distcheck.
9093 2002-11-21 Havoc Pennington <hp@redhat.com>
9095 * Initial module creation